Opm::BlackOilFluidSystem< Scalar, IndexTraits >::ParameterCache< EvaluationT > Struct Template Reference

The type of the fluid system's parameter cache. More...

#include <BlackOilFluidSystem.hpp>

Inheritance diagram for Opm::BlackOilFluidSystem< Scalar, IndexTraits >::ParameterCache< EvaluationT >:
Inheritance graph

Public Types

using Evaluation = EvaluationT
 
enum  ExceptQuantities
 Constants for ORing the quantities of the fluid state that have not changed since the last update. More...
 

Public Member Functions

 ParameterCache (Scalar maxOilSat=1.0, unsigned regionIdx=0)
 
template<class OtherCache >
void assignPersistentData (const OtherCache &other)
 Copy the data which is not dependent on the type of the Scalars from another parameter cache. More...
 
unsigned regionIndex () const
 Return the index of the region which should be used to determine the thermodynamic properties. More...
 
void setRegionIndex (unsigned val)
 Set the index of the region which should be used to determine the thermodynamic properties. More...
 
const EvaluationmaxOilSat () const
 
void setMaxOilSat (const Evaluation &val)
 
void updateAll (const FluidState &fluidState, int=None)
 Update the quantities of the parameter cache for all phases. More...
 
void updateAllPressures (const FluidState &fluidState)
 Update pressure dependent quantities of the parameter cache for all phases. More...
 
void updateAllTemperatures (const FluidState &fluidState)
 Update temperature dependent quantities of the parameter cache for all phases. More...
 
void updatePhase (const FluidState &, unsigned, int=None)
 Update all cached parameters of a specific fluid phase. More...
 
void updateTemperature (const FluidState &fluidState, unsigned phaseIdx)
 Update all cached parameters of a specific fluid phase which depend on temperature. More...
 
void updatePressure (const FluidState &fluidState, unsigned phaseIdx)
 Update all cached parameters of a specific fluid phase which depend on pressure. More...
 
void updateComposition (const FluidState &fluidState, unsigned phaseIdx)
 Update all cached parameters of a specific fluid phase which depend on composition. More...
 
void updateSingleMoleFraction (const FluidState &fluidState, unsigned phaseIdx, unsigned)
 Update all cached parameters of a specific fluid phase which depend on the mole fraction of a single component. More...
 

Detailed Description

template<class Scalar, class IndexTraits = BlackOilDefaultIndexTraits>
template<class EvaluationT>
struct Opm::BlackOilFluidSystem< Scalar, IndexTraits >::ParameterCache< EvaluationT >

The type of the fluid system's parameter cache.

The parameter cache can be used to avoid re-calculating expensive parameters for multiple quantities. Be aware that what the parameter cache actually does is specific for each fluid system and that it is opaque outside the fluid system.

Member Typedef Documentation

◆ Evaluation

template<class Scalar , class IndexTraits = BlackOilDefaultIndexTraits>
template<class EvaluationT >
using Opm::BlackOilFluidSystem< Scalar, IndexTraits >::ParameterCache< EvaluationT >::Evaluation = EvaluationT

Member Enumeration Documentation

◆ ExceptQuantities

Constants for ORing the quantities of the fluid state that have not changed since the last update.

Constructor & Destructor Documentation

◆ ParameterCache()

template<class Scalar , class IndexTraits = BlackOilDefaultIndexTraits>
template<class EvaluationT >
Opm::BlackOilFluidSystem< Scalar, IndexTraits >::ParameterCache< EvaluationT >::ParameterCache ( Scalar  maxOilSat = 1.0,
unsigned  regionIdx = 0 
)
inline

Member Function Documentation

◆ assignPersistentData()

template<class Scalar , class IndexTraits = BlackOilDefaultIndexTraits>
template<class EvaluationT >
template<class OtherCache >
void Opm::BlackOilFluidSystem< Scalar, IndexTraits >::ParameterCache< EvaluationT >::assignPersistentData ( const OtherCache &  other)
inline

Copy the data which is not dependent on the type of the Scalars from another parameter cache.

For the black-oil parameter cache this means that the region index must be copied.

◆ maxOilSat()

template<class Scalar , class IndexTraits = BlackOilDefaultIndexTraits>
template<class EvaluationT >
const Evaluation & Opm::BlackOilFluidSystem< Scalar, IndexTraits >::ParameterCache< EvaluationT >::maxOilSat ( ) const
inline

◆ regionIndex()

template<class Scalar , class IndexTraits = BlackOilDefaultIndexTraits>
template<class EvaluationT >
unsigned Opm::BlackOilFluidSystem< Scalar, IndexTraits >::ParameterCache< EvaluationT >::regionIndex ( ) const
inline

Return the index of the region which should be used to determine the thermodynamic properties.

This is only required because "oil" and "gas" are pseudo-components, i.e. for more comprehensive equations of state there would only be one "region".

Referenced by Opm::BlackOilFluidSystem< Scalar, IndexTraits >::density(), Opm::BlackOilFluidSystem< Scalar, IndexTraits >::diffusionCoefficient(), Opm::BlackOilFluidSystem< Scalar, IndexTraits >::enthalpy(), Opm::BlackOilFluidSystem< Scalar, IndexTraits >::fugacityCoefficient(), and Opm::BlackOilFluidSystem< Scalar, IndexTraits >::viscosity().

◆ setMaxOilSat()

template<class Scalar , class IndexTraits = BlackOilDefaultIndexTraits>
template<class EvaluationT >
void Opm::BlackOilFluidSystem< Scalar, IndexTraits >::ParameterCache< EvaluationT >::setMaxOilSat ( const Evaluation val)
inline

◆ setRegionIndex()

template<class Scalar , class IndexTraits = BlackOilDefaultIndexTraits>
template<class EvaluationT >
void Opm::BlackOilFluidSystem< Scalar, IndexTraits >::ParameterCache< EvaluationT >::setRegionIndex ( unsigned  val)
inline

Set the index of the region which should be used to determine the thermodynamic properties.

This is only required because "oil" and "gas" are pseudo-components, i.e. for more comprehensive equations of state there would only be one "region".

◆ updateAll()

void Opm::ParameterCacheBase< NullParameterCache< EvaluationT > >::updateAll ( const FluidState &  fluidState,
int  = None 
)
inlineinherited

Update the quantities of the parameter cache for all phases.

Parameters
fluidStateThe representation of the thermodynamic system of interest.
exceptQuantitiesThe quantities of the fluid state that have not changed since the last update.

◆ updateAllPressures()

void Opm::ParameterCacheBase< NullParameterCache< EvaluationT > >::updateAllPressures ( const FluidState &  fluidState)
inlineinherited

Update pressure dependent quantities of the parameter cache for all phases.

This method should be called if only the phase pressures changed since the last call to an update() method.

Parameters
fluidStateThe representation of the thermodynamic system of interest.

◆ updateAllTemperatures()

void Opm::ParameterCacheBase< NullParameterCache< EvaluationT > >::updateAllTemperatures ( const FluidState &  fluidState)
inlineinherited

Update temperature dependent quantities of the parameter cache for all phases.

This method should be called if only the phase temperatures changed since the last call to an update() method.

Parameters
fluidStateThe representation of the thermodynamic system of interest.

◆ updateComposition()

void Opm::ParameterCacheBase< NullParameterCache< EvaluationT > >::updateComposition ( const FluidState &  fluidState,
unsigned  phaseIdx 
)
inlineinherited

Update all cached parameters of a specific fluid phase which depend on composition.

Only use this method if neither the pressure nor the temperature of the phase changed between two update*() calls. If more changed, call updatePhase()!

Parameters
fluidStateThe representation of the thermodynamic system of interest.
phaseIdxThe index of the fluid phase of interest.

◆ updatePhase()

void Opm::ParameterCacheBase< NullParameterCache< EvaluationT > >::updatePhase ( const FluidState &  ,
unsigned  ,
int  = None 
)
inlineinherited

Update all cached parameters of a specific fluid phase.

Parameters
fluidStateThe representation of the thermodynamic system of interest.
phaseIdxThe index of the fluid phase of interest.
exceptQuantitiesThe quantities of the fluid state that have not changed since the last update.

◆ updatePressure()

void Opm::ParameterCacheBase< NullParameterCache< EvaluationT > >::updatePressure ( const FluidState &  fluidState,
unsigned  phaseIdx 
)
inlineinherited

Update all cached parameters of a specific fluid phase which depend on pressure.

Only use this method if only the pressure of a phase changed between two update*() calls. If more changed, call updatePhase()!

Parameters
fluidStateThe representation of the thermodynamic system of interest.
phaseIdxThe index of the fluid phase of interest.

◆ updateSingleMoleFraction()

void Opm::ParameterCacheBase< NullParameterCache< EvaluationT > >::updateSingleMoleFraction ( const FluidState &  fluidState,
unsigned  phaseIdx,
unsigned   
)
inlineinherited

Update all cached parameters of a specific fluid phase which depend on the mole fraction of a single component.

Only use this method if just a single component's concentration changed between two update*() calls. If more than one concentration changed, call updatePhaseComposition() of updatePhase()!

Parameters
fluidStateThe representation of the thermodynamic system of interest.
phaseIdxThe index of the fluid phase of interest.
compIdxThe component index of the component for which the mole fraction was modified in the fluid phase of interest.

◆ updateTemperature()

void Opm::ParameterCacheBase< NullParameterCache< EvaluationT > >::updateTemperature ( const FluidState &  fluidState,
unsigned  phaseIdx 
)
inlineinherited

Update all cached parameters of a specific fluid phase which depend on temperature.

Only use this method if only the temperature of a phase changed between two update*() calls. If more changed, call updatePhase()!

Parameters
fluidStateThe representation of the thermodynamic system of interest.
phaseIdxThe index of the fluid phase of interest.

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