Loading...
Searching...
No Matches
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 >:

## 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.
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.
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation | pcnw (const Params &params, const FluidState &fs)
| The capillary pressure-saturation curve.
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.
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.
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.
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.
template<class FluidState , class Evaluation = typename FluidState::Scalar>
static Evaluation | krw (const Params &params, const FluidState &fs)
| The relative permeability for the wetting phase.
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.
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.
template<class Evaluation >
static Evaluation | effectiveSaturation (const Params &params, const Evaluation &S, unsigned phaseIdx)
| Convert an absolute saturation to an effective one.
template<class Evaluation >
static Evaluation | absoluteSaturation (const Params &params, const Evaluation &S, unsigned phaseIdx)
| Convert an effective saturation to an absolute one.

## Static Public Attributes

static const int | numPhases = EffLaw::numPhases
| The number of fluid phases.
static const bool | implementsTwoPhaseApi = EffLaw::implementsTwoPhaseApi
| Specify whether this material law implements the two-phase convenience API.
static const bool | implementsTwoPhaseSatApi = EffLaw::implementsTwoPhaseSatApi
| Specify whether this material law implements the two-phase convenience API which only depends on the phase saturations.
static const bool | isSaturationDependent = EffLaw::isSaturationDependent
| Specify whether the quantities defined by this material law are saturation dependent.
static const bool | isPressureDependent = EffLaw::isPressureDependent
| Specify whether the quantities defined by this material law are dependent on the absolute pressure.
static const bool | isTemperatureDependent = EffLaw::isTemperatureDependent
| Specify whether the quantities defined by this material law are temperature dependent.
static const bool | isCompositionDependent = EffLaw::isCompositionDependent
| Specify whether the quantities defined by this material law are dependent on the phase composition.

## 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 Function Documentation

## 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
| ) |  |

inline static

The capillary pressure-saturation curves depending on absolute saturations.

Parameters

  values | A random access container which stores the relative pressure of each fluid phase.
  params | The parameter object expressing the coefficients required by the van Genuchten law.
  fs | The fluid state for which the capillary pressure ought to be calculated

## 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
| ) |  |

inline static

The relative permability of the gas phase.

This method is only available for at least three fluid phases

## 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
| ) |  |

inline static

The relative permeability for the wetting phase.

Parameters

  params | A 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... .

## 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
| ) |  |

inline static

The capillary pressure-saturation curve.

Parameters

  params | A 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...)

## 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
| ) |  |

inline static

The relative permeability-saturation curves depending on absolute saturations.

Parameters

  values | A random access container which stores the relative permeability of each fluid phase.
  params | The parameter object expressing the coefficients required by the van Genuchten law.
  fs | The fluid state for which the relative permeabilities ought to be calculated

## 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
| ) |  |

inline static

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

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

- opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp