My Project
Loading...
Searching...
No Matches
Opm::PTFlashParameterCache< Scalar, FluidSystem > Class Template Reference

Specifies the parameter cache used by the SPE-5 fluid system. More...

#include <PTFlashParameterCache.hpp>

Inheritance diagram for Opm::PTFlashParameterCache< Scalar, FluidSystem >:
Opm::ParameterCacheBase< PTFlashParameterCache< Scalar, FluidSystem > >

Public Types

using OilPhaseParams = Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, oilPhaseIdx, false >
 The cached parameters for the oil phase.
 
using GasPhaseParams = Opm::PengRobinsonParamsMixture< Scalar, FluidSystem, gasPhaseIdx, false >
 The cached parameters for the gas phase.
 
- Public Types inherited from Opm::ParameterCacheBase< PTFlashParameterCache< Scalar, FluidSystem > >
enum  ExceptQuantities
 Constants for ORing the quantities of the fluid state that have not changed since the last update.
 

Public Member Functions

template<class FluidState >
void updatePhase (const FluidState &fluidState, unsigned phaseIdx, int exceptQuantities=ParentType::None)
 Update all cached parameters of a specific fluid phase.
 
template<class FluidState >
void updateSingleMoleFraction (const FluidState &fluidState, unsigned phaseIdx, unsigned compIdx)
 Update all cached parameters of a specific fluid phase which depend on the mole fraction of a single component.
 
Scalar a (unsigned phaseIdx) const
 The Peng-Robinson attractive parameter for a phase.
 
Scalar b (unsigned phaseIdx) const
 The Peng-Robinson covolume for a phase.
 
Scalar aPure (unsigned phaseIdx, unsigned compIdx) const
 The Peng-Robinson attractive parameter for a pure component given the same temperature and pressure of the phase.
 
Scalar bPure (unsigned phaseIdx, unsigned compIdx) const
 The Peng-Robinson covolume for a pure component given the same temperature and pressure of the phase.
 
Scalar aCache (unsigned phaseIdx, unsigned compIdx, unsigned compJIdx) const
 TODO.
 
Scalar molarVolume (unsigned phaseIdx) const
 Returns the molar volume of a phase [m^3/mol].
 
const OilPhaseParamsoilPhaseParams () const
 Returns the Peng-Robinson mixture parameters for the oil phase.
 
const GasPhaseParamsgasPhaseParams () const
 Returns the Peng-Robinson mixture parameters for the gas phase.
 
template<class FluidState >
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.
 
- Public Member Functions inherited from Opm::ParameterCacheBase< PTFlashParameterCache< Scalar, FluidSystem > >
void assignPersistentData (const OtherCache &)
 Copy the data which is not dependent on the type of the Scalars from another parameter cache.
 
void updateAll (const FluidState &fluidState, int=None)
 Update the quantities of the parameter cache for all phases.
 
void updateAllPressures (const FluidState &fluidState)
 Update pressure dependent quantities of the parameter cache for all phases.
 
void updateAllTemperatures (const FluidState &fluidState)
 Update temperature dependent quantities of the parameter cache for all phases.
 
void updatePhase (const FluidState &, unsigned, int=None)
 Update all cached parameters of a specific fluid phase.
 
void updateTemperature (const FluidState &fluidState, unsigned phaseIdx)
 Update all cached parameters of a specific fluid phase which depend on temperature.
 
void updatePressure (const FluidState &fluidState, unsigned phaseIdx)
 Update all cached parameters of a specific fluid phase which depend on pressure.
 
void updateComposition (const FluidState &fluidState, unsigned phaseIdx)
 Update all cached parameters of a specific fluid phase which depend on composition.
 
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.
 

Protected Member Functions

template<class FluidState >
void updatePure_ (const FluidState &fluidState, unsigned phaseIdx)
 Update all parameters of a phase which only depend on temperature and/or pressure.
 
template<class FluidState >
void updateMix_ (const FluidState &fluidState, unsigned phaseIdx)
 Update all parameters of a phase which depend on the fluid composition.
 
template<class FluidState >
void updateMolarVolume_ (const FluidState &fluidState, unsigned phaseIdx)
 

Protected Attributes

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

Detailed Description

template<class Scalar, class FluidSystem>
class Opm::PTFlashParameterCache< Scalar, FluidSystem >

Specifies the parameter cache used by the SPE-5 fluid system.

Member Function Documentation

◆ a()

template<class Scalar , class FluidSystem >
Scalar Opm::PTFlashParameterCache< Scalar, FluidSystem >::a ( unsigned  phaseIdx) const
inline

The Peng-Robinson attractive parameter for a phase.

Parameters
phaseIdxThe fluid phase of interest

◆ aCache()

template<class Scalar , class FluidSystem >
Scalar Opm::PTFlashParameterCache< Scalar, FluidSystem >::aCache ( unsigned  phaseIdx,
unsigned  compIdx,
unsigned  compJIdx 
) const
inline

TODO.

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

◆ aPure()

template<class Scalar , class FluidSystem >
Scalar Opm::PTFlashParameterCache< Scalar, FluidSystem >::aPure ( unsigned  phaseIdx,
unsigned  compIdx 
) const
inline

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

◆ b()

template<class Scalar , class FluidSystem >
Scalar Opm::PTFlashParameterCache< Scalar, FluidSystem >::b ( unsigned  phaseIdx) const
inline

The Peng-Robinson covolume for a phase.

Parameters
phaseIdxThe fluid phase of interest

◆ bPure()

template<class Scalar , class FluidSystem >
Scalar Opm::PTFlashParameterCache< Scalar, FluidSystem >::bPure ( unsigned  phaseIdx,
unsigned  compIdx 
) const
inline

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

◆ molarVolume()

template<class Scalar , class FluidSystem >
Scalar Opm::PTFlashParameterCache< Scalar, FluidSystem >::molarVolume ( unsigned  phaseIdx) const
inline

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

Parameters
phaseIdxThe fluid phase of interest

◆ updateEosParams()

template<class Scalar , class FluidSystem >
template<class FluidState >
void Opm::PTFlashParameterCache< Scalar, FluidSystem >::updateEosParams ( const FluidState &  fluidState,
unsigned  phaseIdx,
int  exceptQuantities = ParentType::None 
)
inline

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_()

template<class Scalar , class FluidSystem >
template<class FluidState >
void Opm::PTFlashParameterCache< Scalar, FluidSystem >::updateMix_ ( const FluidState &  fluidState,
unsigned  phaseIdx 
)
inlineprotected

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.

◆ updatePhase()

template<class Scalar , class FluidSystem >
template<class FluidState >
void Opm::PTFlashParameterCache< Scalar, FluidSystem >::updatePhase ( const FluidState &  fluidState,
unsigned  phaseIdx,
int  exceptQuantities = ParentType::None 
)
inline

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.

◆ updatePure_()

template<class Scalar , class FluidSystem >
template<class FluidState >
void Opm::PTFlashParameterCache< Scalar, FluidSystem >::updatePure_ ( const FluidState &  fluidState,
unsigned  phaseIdx 
)
inlineprotected

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

This usually means the parameters for the pure components.

◆ updateSingleMoleFraction()

template<class Scalar , class FluidSystem >
template<class FluidState >
void Opm::PTFlashParameterCache< Scalar, FluidSystem >::updateSingleMoleFraction ( const FluidState &  fluidState,
unsigned  phaseIdx,
unsigned  compIdx 
)
inline

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.

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