Interface to saturation functions from deck. More...
#include <SaturationPropsFromDeck.hpp>
Public Types | |
typedef Opm::ThreePhaseMaterialTraits < double, BlackoilPhases::Aqua, BlackoilPhases::Liquid, BlackoilPhases::Vapour > | MaterialTraits |
typedef Opm::EclMaterialLawManager < MaterialTraits > | MaterialLawManager |
![]() | |
enum | PhaseIndex { Aqua = 0, Liquid = 1, Vapour = 2 } |
Public Member Functions | |
SaturationPropsFromDeck () | |
Default constructor. | |
void | init (const PhaseUsage &phaseUsage, std::shared_ptr< MaterialLawManager > materialLawManager) |
Initialize from a MaterialLawManager object. More... | |
void | init (const Opm::Deck &deck, std::shared_ptr< MaterialLawManager > materialLawManager) |
Initialize from deck and MaterialLawManager. More... | |
int | numPhases () const |
void | relperm (const int n, const double *s, const int *cells, double *kr, double *dkrds) const |
Relative permeability. More... | |
void | capPress (const int n, const double *s, const int *cells, double *pc, double *dpcds) const |
Capillary pressure. More... | |
void | satRange (const int n, const int *cells, double *smin, double *smax) const |
Obtain the range of allowable saturation values. More... | |
void | updateSatHyst (const int n, const int *cells, const double *s) |
Update saturation state for the hysteresis tracking. More... | |
void | setGasOilHystParams (const int n, const int *cells, const double *pcswmdc, const double *krnswdc) |
Set hysteresis parameters for gas-oil. More... | |
void | getGasOilHystParams (const int n, const int *cells, double *pcswmdc, double *krnswdc) const |
Get hysteresis parameters for gas-oil. More... | |
void | setOilWaterHystParams (const int n, const int *cells, const double *pcswmdc, const double *krnswdc) |
Set hysteresis parameters for oil-water. More... | |
void | getOilWaterHystParams (const int n, const int *cells, double *pcswmdc, double *krnswdc) const |
Get hysteresis parameters for oil-water. More... | |
void | swatInitScaling (const int cell, const double pcow, double &swat) |
Update capillary pressure scaling according to pressure diff. More... | |
const MaterialLawManager & | materialLawManager () const |
Returns a reference to the MaterialLawManager. | |
![]() | |
virtual | ~SaturationPropsInterface () |
Virtual destructor. | |
Additional Inherited Members | |
![]() | |
static const int | MaxNumPhases = 3 |
Interface to saturation functions from deck.
|
virtual |
Capillary pressure.
[in] | n | Number of data points. |
[in] | s | Array of nP saturation values. |
[out] | pc | Array of nP capillary pressure values, array must be valid before calling. |
[out] | dpcds | If non-null: array of nP^2 derivative values, array must be valid before calling. The P^2 derivative matrix is m_{ij} = {dpc_i}{ds^j}, and is output in Fortran order (m_00 m_10 m_20 m01 ...) |
[in] | n | Number of data points. |
[in] | s | Array of nP saturation values. |
[in] | cells | Array of n cell indices to be associated with the s values. |
[out] | pc | Array of nP capillary pressure values, array must be valid before calling. |
[out] | dpcds | If non-null: array of nP^2 derivative values, array must be valid before calling. The P^2 derivative matrix is m_{ij} = {dpc_i}{ds^j}, and is output in Fortran order (m_00 m_10 m_20 m01 ...) |
Implements Opm::SaturationPropsInterface.
void Opm::SaturationPropsFromDeck::getGasOilHystParams | ( | const int | n, |
const int * | cells, | ||
double * | pcswmdc, | ||
double * | krnswdc | ||
) | const |
Get hysteresis parameters for gas-oil.
[in] | n | Number of data points. |
[in] | pcswmdc | Array of hysteresis parameters ( |
[in] | krnswdc | Array of hysteresis parameters ( |
void Opm::SaturationPropsFromDeck::getOilWaterHystParams | ( | const int | n, |
const int * | cells, | ||
double * | pcswmdc, | ||
double * | krnswdc | ||
) | const |
Get hysteresis parameters for oil-water.
[in] | n | Number of data points. |
[in] | pcswmdc | Array of hysteresis parameters ( |
[in] | krnswdc | Array of hysteresis parameters ( |
void Opm::SaturationPropsFromDeck::init | ( | const PhaseUsage & | phaseUsage, |
std::shared_ptr< MaterialLawManager > | materialLawManager | ||
) |
Initialize from a MaterialLawManager object.
Initialize from deck.
[in] | phaseUsage | Phase configuration |
[in] | materialLawManager | An initialized MaterialLawManager object |
|
inline |
Initialize from deck and MaterialLawManager.
[in] | deck | Input deck |
[in] | materialLawManager | An initialized MaterialLawManager object |
|
virtual |
Implements Opm::SaturationPropsInterface.
|
virtual |
Relative permeability.
[in] | n | Number of data points. |
[in] | s | Array of nP saturation values. |
[out] | kr | Array of nP relperm values, array must be valid before calling. |
[out] | dkrds | If non-null: array of nP^2 relperm derivative values, array must be valid before calling. The P^2 derivative matrix is m_{ij} = {dkr_i}{ds^j}, and is output in Fortran order (m_00 m_10 m_20 m01 ...) |
[in] | n | Number of data points. |
[in] | s | Array of nP saturation values. |
[in] | cells | Array of n cell indices to be associated with the s values. |
[out] | kr | Array of nP relperm values, array must be valid before calling. |
[out] | dkrds | If non-null: array of nP^2 relperm derivative values, array must be valid before calling. The P^2 derivative matrix is m_{ij} = {dkr_i}{ds^j}, and is output in Fortran order (m_00 m_10 m_20 m01 ...) |
Implements Opm::SaturationPropsInterface.
|
virtual |
Obtain the range of allowable saturation values.
[in] | n | Number of data points. |
[out] | smin | Array of nP minimum s values, array must be valid before calling. |
[out] | smax | Array of nP maximum s values, array must be valid before calling. |
[in] | n | Number of data points. |
[in] | cells | Array of n cell indices. |
[out] | smin | Array of nP minimum s values, array must be valid before calling. |
[out] | smax | Array of nP maximum s values, array must be valid before calling. |
Implements Opm::SaturationPropsInterface.
void Opm::SaturationPropsFromDeck::setGasOilHystParams | ( | const int | n, |
const int * | cells, | ||
const double * | pcswmdc, | ||
const double * | krnswdc | ||
) |
Set hysteresis parameters for gas-oil.
[in] | n | Number of data points. |
[in] | pcswmdc | Array of hysteresis parameters ( |
[in] | krnswdc | Array of hysteresis parameters ( |
void Opm::SaturationPropsFromDeck::setOilWaterHystParams | ( | const int | n, |
const int * | cells, | ||
const double * | pcswmdc, | ||
const double * | krnswdc | ||
) |
Set hysteresis parameters for oil-water.
[in] | n | Number of data points. |
[in] | pcswmdc | Array of hysteresis parameters ( |
[in] | krnswdc | Array of hysteresis parameters ( |
|
virtual |
Update capillary pressure scaling according to pressure diff.
and initial water saturation.
[in] | cell | Cell index. |
[in] | pcow | P_oil - P_water. |
in/out] | swat Water saturation. / Possibly modified Water saturation. |
Implements Opm::SaturationPropsInterface.
|
virtual |
Update saturation state for the hysteresis tracking.
[in] | n | Number of data points. |
[in] | s | Array of nP saturation values. |
Implements Opm::SaturationPropsInterface.