Opm::EffToAbsLaw< EffLawT, ParamsT > Class Template Reference

This material law takes a material law defined for effective saturations and converts it to a material law defined on absolute saturations. More...

#include <EffToAbsLaw.hpp>

Inheritance diagram for Opm::EffToAbsLaw< EffLawT, ParamsT >:
Inheritance graph

Public Types

typedef EffLaw::Traits Traits
 
typedef ParamsT Params
 
typedef EffLaw::Scalar Scalar
 

Static Public Member Functions

template<class Container , class FluidState >
static void capillaryPressures (Container &values, const Params &params, const FluidState &fs)
 The capillary pressure-saturation curves depending on absolute saturations. More...
 
template<class Container , class FluidState >
static void relativePermeabilities (Container &values, const Params &params, const FluidState &fs)
 The relative permeability-saturation curves depending on absolute saturations. More...
 
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation pcnw (const Params &params, const FluidState &fs)
 The capillary pressure-saturation curve. More...
 
template<class Evaluation >
static std::enable_if< implementsTwoPhaseSatApi, Evaluation >::type twoPhaseSatPcnw (const Params &params, const Evaluation &SwAbs)
 
template<class Container , class FluidState >
static void saturations (Container &values, const Params &params, const FluidState &fs)
 The saturation-capillary pressure curves. More...
 
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation Sw (const Params &params, const FluidState &fs)
 Calculate wetting liquid phase saturation given that the rest of the fluid state has been initialized. More...
 
template<class Evaluation >
static std::enable_if< implementsTwoPhaseSatApi, Evaluation >::type twoPhaseSatSw (const Params &params, const Evaluation &Sw)
 
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation Sn (const Params &params, const FluidState &fs)
 Calculate non-wetting liquid phase saturation given that the rest of the fluid state has been initialized. More...
 
template<class Evaluation >
static std::enable_if< implementsTwoPhaseSatApi, Evaluation >::type twoPhaseSatSn (const Params &params, const Evaluation &Sw)
 
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static std::enable_if<(Traits::numPhases >2), Evaluation >::type Sg (const Params &params, const FluidState &fs)
 Calculate gas phase saturation given that the rest of the fluid state has been initialized. More...
 
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation krw (const Params &params, const FluidState &fs)
 The relative permeability for the wetting phase. More...
 
template<class Evaluation >
static std::enable_if< implementsTwoPhaseSatApi, Evaluation >::type twoPhaseSatKrw (const Params &params, const Evaluation &Sw)
 
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation krn (const Params &params, const FluidState &fs)
 The relative permeability of the non-wetting phase. More...
 
template<class Evaluation >
static std::enable_if< implementsTwoPhaseSatApi, Evaluation >::type twoPhaseSatKrn (const Params &params, const Evaluation &Sw)
 
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static std::enable_if<(Traits::numPhases >2), Evaluation >::type krg (const Params &params, const FluidState &fs)
 The relative permability of the gas phase. More...
 
template<class Evaluation >
static Evaluation effectiveSaturation (const Params &params, const Evaluation &S, unsigned phaseIdx)
 Convert an absolute saturation to an effective one. More...
 
template<class Evaluation >
static Evaluation absoluteSaturation (const Params &params, const Evaluation &S, unsigned phaseIdx)
 Convert an effective saturation to an absolute one. More...
 

Static Public Attributes

static const int numPhases = EffLaw::numPhases
 The number of fluid phases. More...
 
static const bool implementsTwoPhaseApi = EffLaw::implementsTwoPhaseApi
 
static const bool implementsTwoPhaseSatApi = EffLaw::implementsTwoPhaseSatApi
 
static const bool isSaturationDependent = EffLaw::isSaturationDependent
 
static const bool isPressureDependent = EffLaw::isPressureDependent
 
static const bool isTemperatureDependent = EffLaw::isTemperatureDependent
 
static const bool isCompositionDependent = EffLaw::isCompositionDependent
 

Detailed Description

template<class EffLawT, class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
class Opm::EffToAbsLaw< EffLawT, ParamsT >

This material law takes a material law defined for effective saturations and converts it to a material law defined on absolute saturations.

The idea: "material laws" (like VanGenuchten or BrooksCorey) are defined for effective saturations. The numeric calculations however are performed with absolute saturations. The EffToAbsLaw class gets the "material laws" actually used as well as the corresponding parameter container as template arguments.

Subsequently, the desired function (pc, Sw... ) of the actually used "material laws" are called but with the saturations already converted from absolute to effective.

This approach makes sure that in the "material laws" only effective saturations are considered, which makes sense, as these laws only deal with effective saturations. This also allows for changing the calculation of the effective saturations easily, as this is subject of discussion / may be problem specific.

Additionally, handing over effective saturations to the "material laws" in stead of them calculating effective saturations prevents accidently "converting twice".

This boils down to:

  • the actual material laws (linear, VanGenuchten...) do not need to deal with any kind of conversion
  • the definition of the material law in the spatial parameters is not really intuitive, but using it is: Hand in values, get back values, do not deal with conversion.

Member Typedef Documentation

◆ Params

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
typedef ParamsT Opm::EffToAbsLaw< EffLawT, ParamsT >::Params

◆ Scalar

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
typedef EffLaw::Scalar Opm::EffToAbsLaw< EffLawT, ParamsT >::Scalar

◆ Traits

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
typedef EffLaw::Traits Opm::EffToAbsLaw< EffLawT, ParamsT >::Traits

Member Function Documentation

◆ absoluteSaturation()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class Evaluation >
static Evaluation Opm::EffToAbsLaw< EffLawT, ParamsT >::absoluteSaturation ( const Params params,
const Evaluation &  S,
unsigned  phaseIdx 
)
inlinestatic

◆ capillaryPressures()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class Container , class FluidState >
static void Opm::EffToAbsLaw< EffLawT, ParamsT >::capillaryPressures ( Container &  values,
const Params params,
const FluidState &  fs 
)
inlinestatic

The capillary pressure-saturation curves depending on absolute saturations.

Parameters
valuesA random access container which stores the relative pressure of each fluid phase.
paramsThe parameter object expressing the coefficients required by the van Genuchten law.
fsThe fluid state for which the capillary pressure ought to be calculated

References Opm::EffToAbsLaw< EffLawT, ParamsT >::effectiveSaturation(), and Opm::EffToAbsLaw< EffLawT, ParamsT >::numPhases.

◆ effectiveSaturation()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class Evaluation >
static Evaluation Opm::EffToAbsLaw< EffLawT, ParamsT >::effectiveSaturation ( const Params params,
const Evaluation &  S,
unsigned  phaseIdx 
)
inlinestatic

◆ krg()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static std::enable_if<(Traits::numPhases >2), Evaluation >::type Opm::EffToAbsLaw< EffLawT, ParamsT >::krg ( const Params params,
const FluidState &  fs 
)
inlinestatic

The relative permability of the gas phase.

This method is only available for at least three fluid phases

References Opm::EffToAbsLaw< EffLawT, ParamsT >::effectiveSaturation(), and Opm::EffToAbsLaw< EffLawT, ParamsT >::numPhases.

◆ krn()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation Opm::EffToAbsLaw< EffLawT, ParamsT >::krn ( const Params params,
const FluidState &  fs 
)
inlinestatic

The relative permeability of the non-wetting phase.

References Opm::EffToAbsLaw< EffLawT, ParamsT >::effectiveSaturation(), and Opm::EffToAbsLaw< EffLawT, ParamsT >::numPhases.

◆ krw()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation Opm::EffToAbsLaw< EffLawT, ParamsT >::krw ( const Params params,
const FluidState &  fs 
)
inlinestatic

The relative permeability for the wetting phase.

Parameters
paramsA container object that is populated with the appropriate coefficients for the respective law. Therefore, in the (problem specific) spatialParameters first, the material law is chosen, and then the params container is constructed accordingly. Afterwards the values are set there, too.
Returns
Relative permeability of the wetting phase calculated as implied by EffLaw e.g. Brooks & Corey, van Genuchten, linear... .

References Opm::EffToAbsLaw< EffLawT, ParamsT >::effectiveSaturation(), and Opm::EffToAbsLaw< EffLawT, ParamsT >::numPhases.

◆ pcnw()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation Opm::EffToAbsLaw< EffLawT, ParamsT >::pcnw ( const Params params,
const FluidState &  fs 
)
inlinestatic

The capillary pressure-saturation curve.

Parameters
paramsA object that stores the appropriate coefficients for the respective law.
Returns
Capillary pressure [Pa] calculated by specific constitutive relation (e.g. Brooks & Corey, van Genuchten, linear...)

References Opm::EffToAbsLaw< EffLawT, ParamsT >::effectiveSaturation(), and Opm::EffToAbsLaw< EffLawT, ParamsT >::numPhases.

◆ relativePermeabilities()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class Container , class FluidState >
static void Opm::EffToAbsLaw< EffLawT, ParamsT >::relativePermeabilities ( Container &  values,
const Params params,
const FluidState &  fs 
)
inlinestatic

The relative permeability-saturation curves depending on absolute saturations.

Parameters
valuesA random access container which stores the relative permeability of each fluid phase.
paramsThe parameter object expressing the coefficients required by the van Genuchten law.
fsThe fluid state for which the relative permeabilities ought to be calculated

References Opm::EffToAbsLaw< EffLawT, ParamsT >::effectiveSaturation(), and Opm::EffToAbsLaw< EffLawT, ParamsT >::numPhases.

◆ saturations()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class Container , class FluidState >
static void Opm::EffToAbsLaw< EffLawT, ParamsT >::saturations ( Container &  values,
const Params params,
const FluidState &  fs 
)
inlinestatic

◆ Sg()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static std::enable_if<(Traits::numPhases >2), Evaluation >::type Opm::EffToAbsLaw< EffLawT, ParamsT >::Sg ( const Params params,
const FluidState &  fs 
)
inlinestatic

Calculate gas phase saturation given that the rest of the fluid state has been initialized.

This method is only available for at least three fluid phases

References Opm::EffToAbsLaw< EffLawT, ParamsT >::absoluteSaturation().

◆ Sn()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation Opm::EffToAbsLaw< EffLawT, ParamsT >::Sn ( const Params params,
const FluidState &  fs 
)
inlinestatic

Calculate non-wetting liquid phase saturation given that the rest of the fluid state has been initialized.

References Opm::EffToAbsLaw< EffLawT, ParamsT >::absoluteSaturation().

◆ Sw()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation Opm::EffToAbsLaw< EffLawT, ParamsT >::Sw ( const Params params,
const FluidState &  fs 
)
inlinestatic

◆ twoPhaseSatKrn()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class Evaluation >
static std::enable_if< implementsTwoPhaseSatApi, Evaluation >::type Opm::EffToAbsLaw< EffLawT, ParamsT >::twoPhaseSatKrn ( const Params params,
const Evaluation &  Sw 
)
inlinestatic

◆ twoPhaseSatKrw()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class Evaluation >
static std::enable_if< implementsTwoPhaseSatApi, Evaluation >::type Opm::EffToAbsLaw< EffLawT, ParamsT >::twoPhaseSatKrw ( const Params params,
const Evaluation &  Sw 
)
inlinestatic

◆ twoPhaseSatPcnw()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class Evaluation >
static std::enable_if< implementsTwoPhaseSatApi, Evaluation >::type Opm::EffToAbsLaw< EffLawT, ParamsT >::twoPhaseSatPcnw ( const Params params,
const Evaluation &  SwAbs 
)
inlinestatic

◆ twoPhaseSatSn()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class Evaluation >
static std::enable_if< implementsTwoPhaseSatApi, Evaluation >::type Opm::EffToAbsLaw< EffLawT, ParamsT >::twoPhaseSatSn ( const Params params,
const Evaluation &  Sw 
)
inlinestatic

◆ twoPhaseSatSw()

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
template<class Evaluation >
static std::enable_if< implementsTwoPhaseSatApi, Evaluation >::type Opm::EffToAbsLaw< EffLawT, ParamsT >::twoPhaseSatSw ( const Params params,
const Evaluation &  Sw 
)
inlinestatic

Member Data Documentation

◆ implementsTwoPhaseApi

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
const bool Opm::EffToAbsLaw< EffLawT, ParamsT >::implementsTwoPhaseApi = EffLaw::implementsTwoPhaseApi
static

Specify whether this material law implements the two-phase convenience API

◆ implementsTwoPhaseSatApi

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
const bool Opm::EffToAbsLaw< EffLawT, ParamsT >::implementsTwoPhaseSatApi = EffLaw::implementsTwoPhaseSatApi
static

Specify whether this material law implements the two-phase convenience API which only depends on the phase saturations

◆ isCompositionDependent

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
const bool Opm::EffToAbsLaw< EffLawT, ParamsT >::isCompositionDependent = EffLaw::isCompositionDependent
static

Specify whether the quantities defined by this material law are dependent on the phase composition

◆ isPressureDependent

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
const bool Opm::EffToAbsLaw< EffLawT, ParamsT >::isPressureDependent = EffLaw::isPressureDependent
static

Specify whether the quantities defined by this material law are dependent on the absolute pressure

◆ isSaturationDependent

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
const bool Opm::EffToAbsLaw< EffLawT, ParamsT >::isSaturationDependent = EffLaw::isSaturationDependent
static

Specify whether the quantities defined by this material law are saturation dependent

◆ isTemperatureDependent

template<class EffLawT , class ParamsT = EffToAbsLawParams<typename EffLawT::Params, EffLawT::numPhases>>
const bool Opm::EffToAbsLaw< EffLawT, ParamsT >::isTemperatureDependent = EffLaw::isTemperatureDependent
static

Specify whether the quantities defined by this material law are temperature dependent

◆ numPhases


The documentation for this class was generated from the following file: