Loading...
Searching...
No Matches
Opm::PvsPrimaryVariables< TypeTag > Class Template Reference

Represents the primary variables used in the primary variable switching compositional model. More...

`#include <pvsprimaryvariables.hh>`

Inheritance diagram for Opm::PvsPrimaryVariables< TypeTag >:

## Public Member Functions

| PvsPrimaryVariables (const PvsPrimaryVariables &value)
template<class FluidState>
void | assignMassConservative (const FluidState &fluidState, const MaterialLawParams &matParams, bool isInEquilibrium=false)
| < Import base class assignment operators.
short | phasePresence () const
| Return the fluid phases which are present in a given control volume.
void | setPhasePresence (short value)
| Set which fluid phases are present in a given control volume.
void | setPhasePresent (unsigned phaseIdx, bool yesno)
| Set whether a given indivividual phase should be present or not.
unsigned | implicitSaturationIdx () const
| Returns the index of the phase with's its saturation is determined by the closure condition of saturation.
bool | phaseIsPresent (unsigned phaseIdx) const
| Returns true iff a phase is present for the current phase presence.
unsigned | lowestPresentPhaseIdx () const
| Returns the phase with the lowest index that is present.
ThisType & | operator= (const Implementation &value)
| Assignment operator from an other primary variables object.
ThisType & | operator= (Scalar value)
| Assignment operator from a scalar value.
Evaluation | explicitSaturationValue (unsigned phaseIdx, unsigned timeIdx) const
| Returns an explcitly stored saturation for a given phase.
template<class FluidState>
void | assignNaive (const FluidState &fluidState)
| Directly retrieve the primary variables from an arbitrary fluid state.
void | print (std::ostream &os) const
| Prints the names of the primary variables and their values.
Public Member Functions inherited from Opm::FvBasePrimaryVariables< TypeTag >
| 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, LinearizationType linearizationType=LinearizationType()) const
| Return a primary variable intensive evaluation.
template<class FluidState>
void | assignNaive (const FluidState &)
| Assign the primary variables "somehow" from a fluid state.
void | checkDefined () const
| Instruct valgrind to check the definedness of all attributes of this class.

## Static Public Member Functions

static bool | phaseIsPresent (unsigned phaseIdx, short phasePresence)
| Returns true iff a phase is present for a given phase presence.
Static Public Member Functions inherited from Opm::FvBasePrimaryVariables< TypeTag >
static void | init ()
| < Import base class assignment operators.
static void | registerParameters ()

## Detailed Description

template<class TypeTag>
class Opm::PvsPrimaryVariables< TypeTag >

Represents the primary variables used in the primary variable switching compositional model.

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

## Constructor & Destructor Documentation

## PvsPrimaryVariables()

template<class TypeTag>

Opm::PvsPrimaryVariables< TypeTag >::PvsPrimaryVariables | ( | const PvsPrimaryVariables< TypeTag > & | value | ) |

inline

## Member Function Documentation

## assignMassConservative()

template<class TypeTag>
template<class FluidState>

void Opm::PvsPrimaryVariables< TypeTag >::assignMassConservative | ( | const FluidState & | fluidState,
|  | const MaterialLawParams & | matParams,
|  | bool | isInEquilibrium = false )

inline

< Import base class assignment operators.

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

  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.

## assignNaive()

template<class TypeTag>
template<class FluidState>

void Opm::PvsPrimaryVariables< 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

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

## explicitSaturationValue()

template<class TypeTag>

Evaluation Opm::PvsPrimaryVariables< TypeTag >::explicitSaturationValue | ( | unsigned | phaseIdx,
|  | unsigned | timeIdx ) const

inline

Returns an explcitly stored saturation for a given phase.

(or 0 if the saturation is not explicitly stored.)

## phaseIsPresent() [1/2]

template<class TypeTag>

bool Opm::PvsPrimaryVariables< TypeTag >::phaseIsPresent | ( | unsigned | phaseIdx | ) | const

inline

Returns true iff a phase is present for the current phase presence.

## phaseIsPresent() [2/2]

template<class TypeTag>

bool Opm::PvsPrimaryVariables< TypeTag >::phaseIsPresent | ( | unsigned | phaseIdx,
|  | short | phasePresence )

inline static

Returns true iff a phase is present for a given phase presence.

Parameters

  phaseIdx | The index of the phase which's presence is queried.
  phasePresence | The bit-map of present phases.

## print()

template<class TypeTag>

void Opm::PvsPrimaryVariables< TypeTag >::print | ( | std::ostream & | os | ) | const

inline

Prints the names of the primary variables and their values.

Parameters

  os | The `std::ostream` which should be used for the output.

## setPhasePresence()

template<class TypeTag>

void Opm::PvsPrimaryVariables< TypeTag >::setPhasePresence | ( | short | value | ) |

inline

Set which fluid phases are present in a given control volume.

Parameters

  value | The new phase presence. The phase with index i is present if the i-th bit of `value` is 1.

## setPhasePresent()

template<class TypeTag>

void Opm::PvsPrimaryVariables< TypeTag >::setPhasePresent | ( | unsigned | phaseIdx,
|  | bool | yesno )

inline

Set whether a given indivividual phase should be present or not.

Parameters

  phaseIdx | The index of the phase which's presence ought to be set or reset.
  yesno | If true, the presence of the phase is set, else it is reset

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

- opm/models/pvs/pvsprimaryvariables.hh