Opm::Spe5FluidSystem< Scalar >::ParameterCache< Evaluation > Struct Template Reference

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

#include <Spe5FluidSystem.hpp>

Inheritance diagram for Opm::Spe5FluidSystem< Scalar >::ParameterCache< Evaluation >:
Inheritance graph

Public Types

typedef PengRobinsonParamsMixture< Evaluation, ThisType, oilPhaseIdx, true > OilPhaseParams
 The cached parameters for the oil phase. More...
 
typedef PengRobinsonParamsMixture< Evaluation, ThisType, gasPhaseIdx, true > GasPhaseParams
 The cached parameters for the gas phase. More...
 
enum  ExceptQuantities
 Constants for ORing the quantities of the fluid state that have not changed since the last update. More...
 

Public Member Functions

void updatePhase (const FluidState &fluidState, unsigned phaseIdx, int exceptQuantities=ParentType::None)
 
void updateSingleMoleFraction (const FluidState &fluidState, unsigned phaseIdx, unsigned compIdx)
 
Evaluation a (unsigned phaseIdx) const
 The Peng-Robinson attractive parameter for a phase. More...
 
Evaluation b (unsigned phaseIdx) const
 The Peng-Robinson covolume for a phase. More...
 
Evaluation aPure (unsigned phaseIdx, unsigned compIdx) const
 The Peng-Robinson attractive parameter for a pure component given the same temperature and pressure of the phase. More...
 
Evaluation bPure (unsigned phaseIdx, unsigned compIdx) const
 The Peng-Robinson covolume for a pure component given the same temperature and pressure of the phase. More...
 
Evaluation aCache (unsigned phaseIdx, unsigned compIdx, unsigned compJIdx) const
 TODO. More...
 
Evaluation molarVolume (unsigned phaseIdx) const
 Returns the molar volume of a phase [m^3/mol]. More...
 
const OilPhaseParamsoilPhaseParams () const
 Returns the Peng-Robinson mixture parameters for the oil phase. More...
 
const GasPhaseParamsgasPhaseParams () const
 Returns the Peng-Robinson mixture parameters for the gas phase. More...
 
void updateEosParams (const FluidState &fluidState, unsigned phaseIdx, int exceptQuantities=ParentType::None)
 Update all parameters required by the equation of state to calculate some quantities for the phase. More...
 
void assignPersistentData (const OtherCache &)
 Copy the data which is not dependent on the type of the Scalars from another parameter cache. More...
 
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 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...
 

Protected Member Functions

void updatePure_ (const FluidState &fluidState, unsigned phaseIdx)
 Update all parameters of a phase which only depend on temperature and/or pressure. More...
 
void updateMix_ (const FluidState &fluidState, unsigned phaseIdx)
 Update all parameters of a phase which depend on the fluid composition. It is assumed that updatePure() has been called before this method. More...
 
void updateMolarVolume_ (const FluidState &fluidState, unsigned phaseIdx)
 

Protected Attributes

bool VmUpToDate_ [numPhases]
 
Evaluation Vm_ [numPhases]
 
OilPhaseParams oilPhaseParams_
 
GasPhaseParams gasPhaseParams_
 

Detailed Description

template<class Scalar>
template<class Evaluation>
struct Opm::Spe5FluidSystem< Scalar >::ParameterCache< Evaluation >

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

◆ GasPhaseParams

typedef PengRobinsonParamsMixture<Evaluation , ThisType , gasPhaseIdx, true> Opm::Spe5ParameterCache< Evaluation , ThisType >::GasPhaseParams
inherited

The cached parameters for the gas phase.

◆ OilPhaseParams

typedef PengRobinsonParamsMixture<Evaluation , ThisType , oilPhaseIdx, true> Opm::Spe5ParameterCache< Evaluation , ThisType >::OilPhaseParams
inherited

The cached parameters for the oil phase.

Member Enumeration Documentation

◆ ExceptQuantities

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

Member Function Documentation

◆ a()

Evaluation Opm::Spe5ParameterCache< Evaluation , ThisType >::a ( unsigned  phaseIdx) const
inlineinherited

The Peng-Robinson attractive parameter for a phase.

Parameters
phaseIdxThe fluid phase of interest

◆ aCache()

Evaluation Opm::Spe5ParameterCache< Evaluation , ThisType >::aCache ( unsigned  phaseIdx,
unsigned  compIdx,
unsigned  compJIdx 
) const
inlineinherited

TODO.

Parameters
phaseIdxThe fluid phase of interest
compIdxThe component phase of interest
compJIdxAdditional component index

◆ aPure()

Evaluation Opm::Spe5ParameterCache< Evaluation , ThisType >::aPure ( unsigned  phaseIdx,
unsigned  compIdx 
) const
inlineinherited

The Peng-Robinson attractive parameter for a pure component given the same temperature and pressure of the phase.

Parameters
phaseIdxThe fluid phase of interest
compIdxThe component phase of interest

◆ assignPersistentData()

void Opm::ParameterCacheBase< Spe5ParameterCache< Evaluation, ThisType > >::assignPersistentData ( const OtherCache &  )
inlineinherited

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

◆ b()

Evaluation Opm::Spe5ParameterCache< Evaluation , ThisType >::b ( unsigned  phaseIdx) const
inlineinherited

The Peng-Robinson covolume for a phase.

Parameters
phaseIdxThe fluid phase of interest

◆ bPure()

Evaluation Opm::Spe5ParameterCache< Evaluation , ThisType >::bPure ( unsigned  phaseIdx,
unsigned  compIdx 
) const
inlineinherited

The Peng-Robinson covolume for a pure component given the same temperature and pressure of the phase.

Parameters
phaseIdxThe fluid phase of interest
compIdxThe component phase of interest

◆ gasPhaseParams()

const GasPhaseParams & Opm::Spe5ParameterCache< Evaluation , ThisType >::gasPhaseParams ( ) const
inlineinherited

Returns the Peng-Robinson mixture parameters for the gas phase.

◆ molarVolume()

Evaluation Opm::Spe5ParameterCache< Evaluation , ThisType >::molarVolume ( unsigned  phaseIdx) const
inlineinherited

Returns the molar volume of a phase [m^3/mol].

Parameters
phaseIdxThe fluid phase of interest

◆ oilPhaseParams()

const OilPhaseParams & Opm::Spe5ParameterCache< Evaluation , ThisType >::oilPhaseParams ( ) const
inlineinherited

Returns the Peng-Robinson mixture parameters for the oil phase.

◆ updateAll()

void Opm::ParameterCacheBase< Spe5ParameterCache< Evaluation, ThisType > >::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< Spe5ParameterCache< Evaluation, ThisType > >::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< Spe5ParameterCache< Evaluation, ThisType > >::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< Spe5ParameterCache< Evaluation, ThisType > >::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.

◆ updateEosParams()

void Opm::Spe5ParameterCache< Evaluation , ThisType >::updateEosParams ( const FluidState &  fluidState,
unsigned  phaseIdx,
int  exceptQuantities = ParentType::None 
)
inlineinherited

Update all parameters required by the equation of state to calculate some quantities for the 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.

◆ updateMix_()

void Opm::Spe5ParameterCache< Evaluation , ThisType >::updateMix_ ( const FluidState &  fluidState,
unsigned  phaseIdx 
)
inlineprotectedinherited

Update all parameters of a phase which depend on the fluid composition. It is assumed that updatePure() has been called before this method.

Here, the mixing rule kicks in.

◆ updateMolarVolume_()

void Opm::Spe5ParameterCache< Evaluation , ThisType >::updateMolarVolume_ ( const FluidState &  fluidState,
unsigned  phaseIdx 
)
inlineprotectedinherited

◆ updatePhase()

void Opm::Spe5ParameterCache< Evaluation , ThisType >::updatePhase ( const FluidState &  fluidState,
unsigned  phaseIdx,
int  exceptQuantities = ParentType::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< Spe5ParameterCache< Evaluation, ThisType > >::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.

◆ updatePure_()

void Opm::Spe5ParameterCache< Evaluation , ThisType >::updatePure_ ( const FluidState &  fluidState,
unsigned  phaseIdx 
)
inlineprotectedinherited

Update all parameters of a phase which only depend on temperature and/or pressure.

This usually means the parameters for the pure components.

◆ updateSingleMoleFraction()

void Opm::Spe5ParameterCache< Evaluation , ThisType >::updateSingleMoleFraction ( const FluidState &  fluidState,
unsigned  phaseIdx,
unsigned  compIdx 
)
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< Spe5ParameterCache< Evaluation, ThisType > >::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.

Member Data Documentation

◆ gasPhaseParams_

GasPhaseParams Opm::Spe5ParameterCache< Evaluation , ThisType >::gasPhaseParams_
protectedinherited

◆ oilPhaseParams_

OilPhaseParams Opm::Spe5ParameterCache< Evaluation , ThisType >::oilPhaseParams_
protectedinherited

◆ Vm_

Evaluation Opm::Spe5ParameterCache< Evaluation , ThisType >::Vm_[numPhases]
protectedinherited

◆ VmUpToDate_

bool Opm::Spe5ParameterCache< Evaluation , ThisType >::VmUpToDate_[numPhases]
protectedinherited

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