Opm::FlashPrimaryVariables< TypeTag > Class Template Reference

Represents the primary variables used by the compositional flow model based on flash calculations. More...

#include <flashprimaryvariables.hh>

Inheritance diagram for Opm::FlashPrimaryVariables< TypeTag >:
Inheritance graph

Public Member Functions

 FlashPrimaryVariables ()
 
 FlashPrimaryVariables (Scalar value)
 Constructor with assignment from scalar. More...
 
 FlashPrimaryVariables (const FlashPrimaryVariables &value)=default
 
FlashPrimaryVariablesoperator= (const FlashPrimaryVariables &value)=default
 
template<class FluidState >
void assignMassConservative (const FluidState &fluidState, const MaterialLawParams &, bool=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...
 
void print (std::ostream &os=std::cout) const
 Prints the names of the primary variables and their values. More...
 
 FlashPrimaryVariables ()
 
 FlashPrimaryVariables (Scalar value)
 Constructor with assignment from scalar. More...
 
 FlashPrimaryVariables (const FlashPrimaryVariables &value)=default
 
FlashPrimaryVariablesoperator= (const FlashPrimaryVariables &value)=default
 
template<class FluidState >
void assignMassConservative (const FluidState &fluidState, const MaterialLawParams &, bool=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...
 
void print (std::ostream &os=std::cout) const
 Prints the names of the primary variables and their values. More...
 
Evaluation makeEvaluation (unsigned varIdx, unsigned timeIdx, LinearizationType linearizationType=LinearizationType()) const
 Return a primary variable intensive evaluation. More...
 
void checkDefined () const
 Instruct valgrind to check the definedness of all attributes of this class. More...
 

Static Public Member Functions

static void init ()
 
static void registerParameters ()
 

Detailed Description

template<class TypeTag>
class Opm::FlashPrimaryVariables< TypeTag >

Represents the primary variables used by the compositional flow model based on flash calculations.

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

Constructor & Destructor Documentation

◆ FlashPrimaryVariables() [1/6]

template<class TypeTag >
Opm::FlashPrimaryVariables< TypeTag >::FlashPrimaryVariables ( )
inline

◆ FlashPrimaryVariables() [2/6]

template<class TypeTag >
Opm::FlashPrimaryVariables< TypeTag >::FlashPrimaryVariables ( Scalar  value)
inline

Constructor with assignment from scalar.

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

◆ FlashPrimaryVariables() [3/6]

template<class TypeTag >
Opm::FlashPrimaryVariables< TypeTag >::FlashPrimaryVariables ( const FlashPrimaryVariables< TypeTag > &  value)
default

◆ FlashPrimaryVariables() [4/6]

template<class TypeTag >
Opm::FlashPrimaryVariables< TypeTag >::FlashPrimaryVariables ( )
inline

◆ FlashPrimaryVariables() [5/6]

template<class TypeTag >
Opm::FlashPrimaryVariables< TypeTag >::FlashPrimaryVariables ( Scalar  value)
inline

Constructor with assignment from scalar.

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

◆ FlashPrimaryVariables() [6/6]

template<class TypeTag >
Opm::FlashPrimaryVariables< TypeTag >::FlashPrimaryVariables ( const FlashPrimaryVariables< TypeTag > &  value)
default

Member Function Documentation

◆ assignMassConservative() [1/2]

template<class TypeTag >
template<class FluidState >
void Opm::FlashPrimaryVariables< TypeTag >::assignMassConservative ( const FluidState &  fluidState,
const MaterialLawParams &  ,
bool  = 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.

References Opm::FlashPrimaryVariables< TypeTag >::assignNaive().

◆ assignMassConservative() [2/2]

template<class TypeTag >
template<class FluidState >
void Opm::FlashPrimaryVariables< TypeTag >::assignMassConservative ( const FluidState &  fluidState,
const MaterialLawParams &  ,
bool  = 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.

References Opm::FlashPrimaryVariables< TypeTag >::assignNaive().

◆ assignNaive() [1/2]

template<class TypeTag >
template<class FluidState >
void Opm::FlashPrimaryVariables< 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.

Referenced by Opm::FlashPrimaryVariables< TypeTag >::assignMassConservative().

◆ assignNaive() [2/2]

template<class TypeTag >
template<class FluidState >
void Opm::FlashPrimaryVariables< 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.

◆ checkDefined()

template<class TypeTag >
void Opm::FvBasePrimaryVariables< TypeTag >::checkDefined ( ) const
inlineinherited

Instruct valgrind to check the definedness of all attributes of this class.

◆ init()

template<class TypeTag >
static void Opm::FvBasePrimaryVariables< TypeTag >::init ( )
inlinestaticinherited

◆ makeEvaluation()

template<class TypeTag >
Evaluation Opm::FvBasePrimaryVariables< TypeTag >::makeEvaluation ( unsigned  varIdx,
unsigned  timeIdx,
LinearizationType  linearizationType = LinearizationType() 
) const
inlineinherited

Return a primary variable intensive evaluation.

i.e., the result represents the function f = x_i if the time index is zero, else it represents the a constant f = x_i. (the difference is that in the first case, the derivative w.r.t. x_i is 1, while it is 0 in the second case.

◆ operator=() [1/2]

template<class TypeTag >
FlashPrimaryVariables & Opm::FlashPrimaryVariables< TypeTag >::operator= ( const FlashPrimaryVariables< TypeTag > &  value)
default

◆ operator=() [2/2]

template<class TypeTag >
FlashPrimaryVariables & Opm::FlashPrimaryVariables< TypeTag >::operator= ( const FlashPrimaryVariables< TypeTag > &  value)
default

◆ print() [1/2]

template<class TypeTag >
void Opm::FlashPrimaryVariables< TypeTag >::print ( std::ostream &  os = std::cout) const
inline

Prints the names of the primary variables and their values.

Parameters
osThe std::ostream which should be used for the output.

◆ print() [2/2]

template<class TypeTag >
void Opm::FlashPrimaryVariables< TypeTag >::print ( std::ostream &  os = std::cout) const
inline

Prints the names of the primary variables and their values.

Parameters
osThe std::ostream which should be used for the output.

◆ registerParameters()

template<class TypeTag >
static void Opm::FvBasePrimaryVariables< TypeTag >::registerParameters ( )
inlinestaticinherited

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