Opm::Spe5ParameterCache< Scalar, FluidSystem > Class Template Reference

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

#include <Spe5ParameterCache.hpp>

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

List of all members.

Public Types

typedef
Opm::PengRobinsonParamsMixture
< Scalar, FluidSystem,
oilPhaseIdx, true > 
OilPhaseParams
 The cached parameters for the oil phase.
typedef
Opm::PengRobinsonParamsMixture
< Scalar, FluidSystem,
gasPhaseIdx, true > 
GasPhaseParams
 The cached parameters for the gas phase.

Public Member Functions

template<class FluidState >
void updatePhase (const FluidState &fluidState, unsigned phaseIdx, int exceptQuantities=ParentType::None)
template<class FluidState >
void updateSingleMoleFraction (const FluidState &fluidState, unsigned phaseIdx, unsigned compIdx)
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 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.

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::Spe5ParameterCache< Scalar, FluidSystem >

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


Member Function Documentation

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

The Peng-Robinson attractive parameter for a phase.

Parameters:
phaseIdx The fluid phase of interest
template<class Scalar, class FluidSystem>
Scalar Opm::Spe5ParameterCache< 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:
phaseIdx The fluid phase of interest
compIdx The component phase of interest
template<class Scalar, class FluidSystem>
Scalar Opm::Spe5ParameterCache< Scalar, FluidSystem >::b ( unsigned  phaseIdx  )  const [inline]

The Peng-Robinson covolume for a phase.

Parameters:
phaseIdx The fluid phase of interest
template<class Scalar, class FluidSystem>
Scalar Opm::Spe5ParameterCache< 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:
phaseIdx The fluid phase of interest
compIdx The component phase of interest
template<class Scalar, class FluidSystem>
Scalar Opm::Spe5ParameterCache< Scalar, FluidSystem >::molarVolume ( unsigned  phaseIdx  )  const [inline]

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

Parameters:
phaseIdx The fluid phase of interest
template<class Scalar, class FluidSystem>
template<class FluidState >
void Opm::Spe5ParameterCache< 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:
fluidState The representation of the thermodynamic system of interest.
phaseIdx The index of the fluid phase of interest.
exceptQuantities The quantities of the fluid state that have not changed since the last update.
template<class Scalar, class FluidSystem>
template<class FluidState >
void Opm::Spe5ParameterCache< Scalar, FluidSystem >::updateMix_ ( const FluidState &  fluidState,
unsigned  phaseIdx 
) [inline, protected]

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.

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

Update all cached parameters of a specific fluid phase.

Parameters:
fluidState The representation of the thermodynamic system of interest.
phaseIdx The index of the fluid phase of interest.
exceptQuantities The quantities of the fluid state that have not changed since the last update.

Reimplemented from Opm::ParameterCacheBase< Spe5ParameterCache< Scalar, FluidSystem > >.

template<class Scalar, class FluidSystem>
template<class FluidState >
void Opm::Spe5ParameterCache< Scalar, FluidSystem >::updatePure_ ( const FluidState &  fluidState,
unsigned  phaseIdx 
) [inline, protected]

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

This usually means the parameters for the pure components.

template<class Scalar, class FluidSystem>
template<class FluidState >
void Opm::Spe5ParameterCache< 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:
fluidState The representation of the thermodynamic system of interest.
phaseIdx The index of the fluid phase of interest.
compIdx The component index of the component for which the mole fraction was modified in the fluid phase of interest.

Reimplemented from Opm::ParameterCacheBase< Spe5ParameterCache< Scalar, FluidSystem > >.


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

Generated on 25 Mar 2018 by  doxygen 1.6.1