Ewoms::RichardsPrimaryVariables< TypeTag > Class Template Reference

Represents the primary variables used in the Richards model. More...

#include <richardsprimaryvariables.hh>

Inheritance diagram for Ewoms::RichardsPrimaryVariables< TypeTag >:
Ewoms::FvBasePrimaryVariables< TypeTag >

Public Member Functions

 RichardsPrimaryVariables (Scalar value)
 Constructor with assignment from scalar. More...
 
 RichardsPrimaryVariables (const RichardsPrimaryVariables &value)=default
 Default constructor. More...
 
RichardsPrimaryVariablesoperator= (const RichardsPrimaryVariables &value)=default
 
void assignImmiscibleFromWetting (Scalar T, Scalar pw, Scalar Sw, const MaterialLawParams &matParams)
 Set the primary variables with the wetting phase pressure, saturation and temperature. More...
 
void assignImmiscibleFromNonWetting (Scalar T, Scalar pn, Scalar Sn, const MaterialLawParams &matParams)
 Set the primary variables with the non-wetting phase pressure, saturation and temperature. More...
 
template<class FluidState >
void assignMassConservative (const FluidState &fluidState, const MaterialLawParams &matParams, bool isInEquilibrium OPM_UNUSED=false)
 Set the primary variables from an arbitrary fluid state in a mass conservative way. More...
 
template<class FluidState >
void assignNaive (const FluidState &fluidState)
 Directly retrieve the primary variables from an arbitrary fluid state. More...
 
- Public Member Functions inherited from Ewoms::FvBasePrimaryVariables< TypeTag >
 FvBasePrimaryVariables (Scalar value)
 Construction from a scalar value.
 
 FvBasePrimaryVariables (const FvBasePrimaryVariables &value)=default
 Assignment from another primary variables object.
 
FvBasePrimaryVariablesoperator= (const FvBasePrimaryVariables &value)=default
 Assignment from another primary variables object.
 
Evaluation makeEvaluation (unsigned varIdx, unsigned timeIdx) const
 Return a primary variable intensive evaluation. More...
 
template<class FluidState >
void assignNaive (const FluidState &fluidState OPM_UNUSED)
 Assign the primary variables "somehow" from a fluid state. More...
 
void checkDefined () const
 Instruct valgrind to check the definedness of all attributes of this class.
 

Detailed Description

template<class TypeTag>
class Ewoms::RichardsPrimaryVariables< TypeTag >

Represents the primary variables used in the Richards model.

This class is basically a Dune::FieldVector which can retrieve its contents from an aribitatry fluid state.

Constructor & Destructor Documentation

◆ RichardsPrimaryVariables() [1/2]

template<class TypeTag >
Ewoms::RichardsPrimaryVariables< TypeTag >::RichardsPrimaryVariables ( Scalar  value)
inline

Constructor with assignment from scalar.

Parameters
valueThe scalar value to which all entries of the vector will be set.

◆ RichardsPrimaryVariables() [2/2]

template<class TypeTag >
Ewoms::RichardsPrimaryVariables< TypeTag >::RichardsPrimaryVariables ( const RichardsPrimaryVariables< TypeTag > &  value)
default

Default constructor.

Member Function Documentation

◆ assignImmiscibleFromNonWetting()

template<class TypeTag >
void Ewoms::RichardsPrimaryVariables< TypeTag >::assignImmiscibleFromNonWetting ( Scalar  T,
Scalar  pn,
Scalar  Sn,
const MaterialLawParams &  matParams 
)
inline

Set the primary variables with the non-wetting phase pressure, saturation and temperature.

Parameters
TThe temperature [K]
pnThe pressure of the non-wetting phase [Pa]
SnThe saturation of the non-wetting phase []
matParamsThe capillary pressure law parameters

◆ assignImmiscibleFromWetting()

template<class TypeTag >
void Ewoms::RichardsPrimaryVariables< TypeTag >::assignImmiscibleFromWetting ( Scalar  T,
Scalar  pw,
Scalar  Sw,
const MaterialLawParams &  matParams 
)
inline

Set the primary variables with the wetting phase pressure, saturation and temperature.

Parameters
TThe temperature [K]
pwThe pressure of the wetting phase [Pa]
SwThe saturation of the wetting phase []
matParamsThe capillary pressure law parameters

◆ assignMassConservative()

template<class TypeTag >
template<class FluidState >
void Ewoms::RichardsPrimaryVariables< TypeTag >::assignMassConservative ( const FluidState &  fluidState,
const MaterialLawParams &  matParams,
bool isInEquilibrium  OPM_UNUSED = false 
)
inline

Set the primary variables from an arbitrary fluid state in a mass conservative way.

If an energy equation is included, the fluid temperatures are the same as the one given in the fluid state, not the enthalpy.

Parameters
fluidStateThe fluid state which should be represented by the primary variables. The temperatures, pressures, compositions and densities of all phases must be defined.
matParamsThe capillary pressure law parameters
isInEquilibriumIf true, the fluid state expresses thermodynamic equilibrium assuming the relations expressed by the fluid system. This implies that in addition to the quantities mentioned above, the fugacities are also defined.

◆ assignNaive()

template<class TypeTag >
template<class FluidState >
void Ewoms::RichardsPrimaryVariables< TypeTag >::assignNaive ( const FluidState &  fluidState)
inline

Directly retrieve the primary variables from an arbitrary fluid state.

This method retrieves all primary variables from an abitrary fluid state without careing whether the state which is represented by the resulting primary variables features the equivalent mass as the given fluid state. This method is massively cheaper and simpler than assignMassConservative() but it should be used with care!

Parameters
fluidStateThe fluid state which should be represented by the primary variables. The temperatures, pressures, compositions and densities of all phases must be defined.

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