Opm::BlackOilPrimaryVariables< TypeTag, VectorType > Class Template Reference

Represents the primary variables used by the black-oil model. More...

#include <blackoilprimaryvariables.hh>

Inheritance diagram for Opm::BlackOilPrimaryVariables< TypeTag, VectorType >:
Inheritance graph

Public Types

using WaterMeaning = ::Opm::BlackOil::WaterMeaning
 
using PressureMeaning = ::Opm::BlackOil::PressureMeaning
 
using GasMeaning = ::Opm::BlackOil::GasMeaning
 
using BrineMeaning = ::Opm::BlackOil::BrineMeaning
 
using SolventMeaning = ::Opm::BlackOil::SolventMeaning
 

Public Member Functions

template<class OtherTypeTag , template< class, int > class OtherVectorType>
OPM_HOST_DEVICE BlackOilPrimaryVariables (const BlackOilPrimaryVariables< OtherTypeTag, OtherVectorType > &other)
 Assignment from another primary variables object. More...
 
OPM_HOST_DEVICE BlackOilPrimaryVariables ()
 
 BlackOilPrimaryVariables (const BlackOilPrimaryVariables &value)=default
 Copy constructor. More...
 
OPM_HOST_DEVICE Evaluation makeEvaluation (unsigned varIdx, unsigned timeIdx, LinearizationType linearizationType=LinearizationType()) const
 
OPM_HOST_DEVICE void setPvtRegionIndex (unsigned value)
 Set the index of the region which should be used for PVT properties. More...
 
OPM_HOST_DEVICE unsigned pvtRegionIndex () const
 Return the index of the region which should be used for PVT properties. More...
 
OPM_HOST_DEVICE WaterMeaning primaryVarsMeaningWater () const
 Return the interpretation which should be applied to the switching primary variables. More...
 
OPM_HOST_DEVICE void setPrimaryVarsMeaningWater (WaterMeaning newMeaning)
 Set the interpretation which should be applied to the switching primary variables. More...
 
OPM_HOST_DEVICE PressureMeaning primaryVarsMeaningPressure () const
 Return the interpretation which should be applied to the switching primary variables. More...
 
OPM_HOST_DEVICE void setPrimaryVarsMeaningPressure (PressureMeaning newMeaning)
 Set the interpretation which should be applied to the switching primary variables. More...
 
OPM_HOST_DEVICE GasMeaning primaryVarsMeaningGas () const
 Return the interpretation which should be applied to the switching primary variables. More...
 
OPM_HOST_DEVICE void setPrimaryVarsMeaningGas (GasMeaning newMeaning)
 Set the interpretation which should be applied to the switching primary variables. More...
 
OPM_HOST_DEVICE BrineMeaning primaryVarsMeaningBrine () const
 
OPM_HOST_DEVICE void setPrimaryVarsMeaningBrine (BrineMeaning newMeaning)
 Set the interpretation which should be applied to the switching primary variables. More...
 
OPM_HOST_DEVICE SolventMeaning primaryVarsMeaningSolvent () const
 
OPM_HOST_DEVICE void setPrimaryVarsMeaningSolvent (SolventMeaning newMeaning)
 Set the interpretation which should be applied to the switching primary variables. More...
 
template<class FluidState >
OPM_HOST_DEVICE void assignNaive (const FluidState &fluidState)
 Directly retrieve the primary variables from an arbitrary fluid state. More...
 
bool adaptPrimaryVariables (const Problem &problem, unsigned globalDofIdx, Scalar swMaximum, Scalar thresholdWaterFilledCell, Scalar eps=0.0)
 Adapt the interpretation of the switching variables to be physically meaningful. More...
 
OPM_HOST_DEVICE bool chopAndNormalizeSaturations ()
 
BlackOilPrimaryVariablesoperator= (const BlackOilPrimaryVariables &other)=default
 
OPM_HOST_DEVICE void checkDefined () const
 < Import base class assignment operators. More...
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
OPM_HOST_DEVICE bool operator== (const BlackOilPrimaryVariables &rhs) const
 
FvBasePrimaryVariablesoperator= (const FvBasePrimaryVariables &value)=default
 Assignment from another primary variables object. More...
 

Static Public Member Functions

static BlackOilPrimaryVariables serializationTestObject ()
 
static void init ()
 
static void registerParameters ()
 

Friends

template<class OtherTypeTag , template< class, int > class OtherVectorType>
class BlackOilPrimaryVariables
 

Detailed Description

template<class TypeTag, template< class, int > class VectorType = Dune::FieldVector>
class Opm::BlackOilPrimaryVariables< TypeTag, VectorType >

Represents the primary variables used by the black-oil model.

Member Typedef Documentation

◆ BrineMeaning

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
using Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::BrineMeaning = ::Opm::BlackOil::BrineMeaning

◆ GasMeaning

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
using Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::GasMeaning = ::Opm::BlackOil::GasMeaning

◆ PressureMeaning

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
using Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::PressureMeaning = ::Opm::BlackOil::PressureMeaning

◆ SolventMeaning

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
using Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::SolventMeaning = ::Opm::BlackOil::SolventMeaning

◆ WaterMeaning

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
using Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::WaterMeaning = ::Opm::BlackOil::WaterMeaning

Constructor & Destructor Documentation

◆ BlackOilPrimaryVariables() [1/3]

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
template<class OtherTypeTag , template< class, int > class OtherVectorType>
OPM_HOST_DEVICE Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::BlackOilPrimaryVariables ( const BlackOilPrimaryVariables< OtherTypeTag, OtherVectorType > &  other)
inlineexplicit

Assignment from another primary variables object.

◆ BlackOilPrimaryVariables() [2/3]

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::BlackOilPrimaryVariables ( )
inline

◆ BlackOilPrimaryVariables() [3/3]

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::BlackOilPrimaryVariables ( const BlackOilPrimaryVariables< TypeTag, VectorType > &  value)
default

Copy constructor.

Parameters
valueThe primary variables that will be duplicated.

Member Function Documentation

◆ adaptPrimaryVariables()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
bool Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::adaptPrimaryVariables ( const Problem &  problem,
unsigned  globalDofIdx,
Scalar  swMaximum,
Scalar  thresholdWaterFilledCell,
Scalar  eps = 0.0 
)
inline

Adapt the interpretation of the switching variables to be physically meaningful.

If the meaning of the primary variables changes, their values are also adapted in a meaningful manner. A Scalar eps can be passed to make the switching condition more strict. Useful for avoiding ocsilation in the primaryVarsMeaning.

Returns
true Iff the interpretation of one of the switching variables was changed

References Opm::BlackOilBioeffectsModule< TypeTag, enableBioeffectsV >::hasPcfactTables(), Opm::BlackOilBrineModule< TypeTag, enableBrineV >::hasPcfactTables(), Opm::BlackOilSolventModule< TypeTag, enableSolventV >::isSolubleInWater(), Opm::BlackOilBioeffectsModule< TypeTag, enableBioeffectsV >::pcfactTable(), Opm::BlackOilBrineModule< TypeTag, enableBrineV >::pcfactTable(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningBrine(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningGas(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningPressure(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningSolvent(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningWater(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::pvtRegionIndex(), Opm::BlackOilExtboModule< TypeTag, enableExtboV >::rs(), Opm::BlackOil::Rs, Opm::BlackOilExtboModule< TypeTag, enableExtboV >::rv(), Opm::BlackOil::Rv, Opm::BlackOilBrineModule< TypeTag, enableBrineV >::saltSol(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPrimaryVarsMeaningBrine(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPrimaryVarsMeaningGas(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPrimaryVarsMeaningPressure(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPrimaryVarsMeaningSolvent(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPrimaryVarsMeaningWater(), Opm::BlackOil::Sg, Opm::BlackOilSolventModule< TypeTag, enableSolventV >::solubilityLimit(), and Opm::BlackOil::Sw.

◆ assignNaive()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
template<class FluidState >
OPM_HOST_DEVICE void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::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.

References Opm::BlackOilEnergyModule< TypeTag, activeModule >::assignPrimaryVars(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningGas(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningPressure(), Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningWater(), Opm::BlackOil::Rs, Opm::BlackOil::Rv, Opm::BlackOil::Sg, and Opm::BlackOil::Sw.

◆ checkDefined()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::checkDefined ( ) const
inline

< Import base class assignment operators.

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

We cannot simply check the definedness of the whole object because there might be "alignedness holes" in the memory layout which are caused by the pseudo primary variables.

◆ chopAndNormalizeSaturations()

◆ init()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
static void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::init ( )
inlinestatic

◆ makeEvaluation()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE Evaluation Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::makeEvaluation ( unsigned  varIdx,
unsigned  timeIdx,
LinearizationType  linearizationType = LinearizationType() 
) const
inline

◆ operator=() [1/2]

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
BlackOilPrimaryVariables & Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::operator= ( const BlackOilPrimaryVariables< TypeTag, VectorType > &  other)
default

◆ operator=() [2/2]

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
FvBasePrimaryVariables & Opm::FvBasePrimaryVariables< TypeTag, VectorType >::operator= ( const FvBasePrimaryVariables value)
default

Assignment from another primary variables object.

◆ operator==()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE bool Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::operator== ( const BlackOilPrimaryVariables< TypeTag, VectorType > &  rhs) const
inline

◆ primaryVarsMeaningBrine()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE BrineMeaning Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningBrine ( ) const
inline

◆ primaryVarsMeaningGas()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE GasMeaning Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningGas ( ) const
inline

◆ primaryVarsMeaningPressure()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE PressureMeaning Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningPressure ( ) const
inline

Return the interpretation which should be applied to the switching primary variables.

Referenced by Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::adaptPrimaryVariables(), and Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::assignNaive().

◆ primaryVarsMeaningSolvent()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE SolventMeaning Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningSolvent ( ) const
inline

◆ primaryVarsMeaningWater()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE WaterMeaning Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::primaryVarsMeaningWater ( ) const
inline

◆ pvtRegionIndex()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE unsigned Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::pvtRegionIndex ( ) const
inline

Return the index of the region which should be used for PVT properties.

Referenced by Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::adaptPrimaryVariables().

◆ registerParameters()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
static void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::registerParameters ( )
inlinestatic

◆ serializationTestObject()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
static BlackOilPrimaryVariables Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::serializationTestObject ( )
inlinestatic

References Opm::BlackOil::Rv.

◆ serializeOp()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
template<class Serializer >
void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::serializeOp ( Serializer &  serializer)
inline

◆ setPrimaryVarsMeaningBrine()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPrimaryVarsMeaningBrine ( BrineMeaning  newMeaning)
inline

Set the interpretation which should be applied to the switching primary variables.

Referenced by Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::adaptPrimaryVariables().

◆ setPrimaryVarsMeaningGas()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPrimaryVarsMeaningGas ( GasMeaning  newMeaning)
inline

Set the interpretation which should be applied to the switching primary variables.

Referenced by Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::adaptPrimaryVariables().

◆ setPrimaryVarsMeaningPressure()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPrimaryVarsMeaningPressure ( PressureMeaning  newMeaning)
inline

Set the interpretation which should be applied to the switching primary variables.

Referenced by Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::adaptPrimaryVariables().

◆ setPrimaryVarsMeaningSolvent()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPrimaryVarsMeaningSolvent ( SolventMeaning  newMeaning)
inline

Set the interpretation which should be applied to the switching primary variables.

Referenced by Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::adaptPrimaryVariables().

◆ setPrimaryVarsMeaningWater()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPrimaryVarsMeaningWater ( WaterMeaning  newMeaning)
inline

Set the interpretation which should be applied to the switching primary variables.

Referenced by Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::adaptPrimaryVariables().

◆ setPvtRegionIndex()

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
OPM_HOST_DEVICE void Opm::BlackOilPrimaryVariables< TypeTag, VectorType >::setPvtRegionIndex ( unsigned  value)
inline

Set the index of the region which should be used for PVT properties.

PVT regions represent spatial variation of the composition decribed by the pseudo-components used by the black oil model (i.e., oil, gas and water). This introduce spatially varying pvt behaviour.

Friends And Related Function Documentation

◆ BlackOilPrimaryVariables

template<class TypeTag , template< class, int > class VectorType = Dune::FieldVector>
template<class OtherTypeTag , template< class, int > class OtherVectorType>
friend class BlackOilPrimaryVariables
friend

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