Represents the primary variables used by the black-oil model. More...
#include <blackoilprimaryvariables.hh>
Public Types | |
enum | PrimaryVarsMeaning { Sw_po_Sg, Sw_po_Rs, Sw_pg_Rv } |
Public Member Functions | |
BlackOilPrimaryVariables (Scalar value) | |
Constructor with assignment from scalar. More... | |
BlackOilPrimaryVariables (const BlackOilPrimaryVariables &value)=default | |
Copy constructor. More... | |
void | setPvtRegionIndex (unsigned value) |
Set the index of the region which should be used for PVT properties. More... | |
unsigned | pvtRegionIndex () const |
Return the index of the region which should be used for PVT properties. | |
PrimaryVarsMeaning | primaryVarsMeaning () const |
Return the interpretation which should be applied to the switching primary variables. | |
void | setPrimaryVarsMeaning (PrimaryVarsMeaning newMeaning) |
Set the interpretation which should be applied to the switching primary variables. | |
template<class FluidState > | |
void | assignMassConservative (const FluidState &fluidState, const MaterialLawParams &matParams, bool isInEquilibrium=false) |
Set the primary variables from an arbitrary fluid state in a mass conservative way. More... | |
template<class FluidState , class SolventContainer > | |
void | assignMassConservative (const FluidState &fluidState, const MaterialLawParams &matParams, Scalar solSat, bool isInEquilibrium=false) |
template<class FluidState > | |
void | assignNaive (const FluidState &fluidState) |
Directly retrieve the primary variables from an arbitrary fluid state. More... | |
bool | adaptPrimaryVariables (const Problem &problem, unsigned globalDofIdx, Scalar eps=0.0) |
Adapt the interpretation of the switching variables to be physically meaningful. More... | |
BlackOilPrimaryVariables & | operator= (const BlackOilPrimaryVariables &other)=default |
BlackOilPrimaryVariables & | operator= (Scalar value) |
![]() | |
FvBasePrimaryVariables (Scalar value) | |
Construction from a scalar value. | |
FvBasePrimaryVariables (const FvBasePrimaryVariables &value)=default | |
Assignment from another primary variables object. | |
FvBasePrimaryVariables & | operator= (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. | |
Represents the primary variables used by the black-oil model.
|
inline |
Constructor with assignment from scalar.
value | The scalar value to which all entries of the vector will be set. |
|
default |
Copy constructor.
value | The primary variables that will be duplicated. |
|
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. (e.g. if the gas phase appears and the composition switching variable changes its meaning from the gas dissolution factor Rs to the gas saturation Sg, the value for this variable is set to zero.) A Scalar eps can be passed to make the switching condition more strict. Useful for avoiding ocsilation in the primaryVarsMeaning.
|
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.
fluidState | The fluid state which should be represented by the primary variables. The temperatures, pressures, compositions and densities of all phases must be defined. |
matParams | The capillary pressure law parameters |
isInEquilibrium | If 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. |
|
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!
fluidState | The fluid state which should be represented by the primary variables. The temperatures, pressures, compositions and densities of all phases must be defined. |
|
inline |
Set the index of the region which should be used for PVT properties.
The concept of PVT regions is a hack to work around the fact that the pseudo-components used by the black oil model (i.e., oil, gas and water) change their composition within the spatial domain. We implement them because, the ECL file format mandates them.