Specifies the parameter cache used by the SPE-5 fluid system. More...
#include <Spe5ParameterCache.hpp>
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 OilPhaseParams & | oilPhaseParams () const |
Returns the Peng-Robinson mixture parameters for the oil phase. | |
const GasPhaseParams & | gasPhaseParams () 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_ |
Specifies the parameter cache used by the SPE-5 fluid system.
Scalar Opm::Spe5ParameterCache< Scalar, FluidSystem >::a | ( | unsigned | phaseIdx | ) | const [inline] |
The Peng-Robinson attractive parameter for a phase.
phaseIdx | The fluid phase of interest |
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.
phaseIdx | The fluid phase of interest | |
compIdx | The component phase of interest |
Scalar Opm::Spe5ParameterCache< Scalar, FluidSystem >::b | ( | unsigned | phaseIdx | ) | const [inline] |
The Peng-Robinson covolume for a phase.
phaseIdx | The fluid phase of interest |
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.
phaseIdx | The fluid phase of interest | |
compIdx | The component phase of interest |
Scalar Opm::Spe5ParameterCache< Scalar, FluidSystem >::molarVolume | ( | unsigned | phaseIdx | ) | const [inline] |
Returns the molar volume of a phase [m^3/mol].
phaseIdx | The fluid phase of interest |
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.
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. |
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.
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.
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 > >.
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.
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()!
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 > >.