My Project
|
Specifies the parameter cache used by the SPE-5 fluid system. More...
#include <PTFlashParameterCache.hpp>
Public Types | |
using | OilPhaseParams = Opm::CubicEOSParams< Scalar, FluidSystem, oilPhaseIdx > |
The cached parameters for the oil phase. | |
using | GasPhaseParams = Opm::CubicEOSParams< Scalar, FluidSystem, gasPhaseIdx > |
The cached parameters for the gas phase. | |
![]() | |
enum | ExceptQuantities |
Constants for ORing the quantities of the fluid state that have not changed since the last update. | |
Public Member Functions | |
PTFlashParameterCache (EOSType eos_type) | |
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 |
Scalar | B (unsigned phaseIdx) const |
Scalar | Bi (unsigned phaseIdx, unsigned compIdx) const |
Scalar | m1 (unsigned phaseIdx) const |
Scalar | m2 (unsigned phaseIdx) const |
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 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. | |
![]() | |
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_ |
Specifies the parameter cache used by the SPE-5 fluid system.
|
inline |
The Peng-Robinson attractive parameter for a phase.
phaseIdx | The fluid phase of interest |
|
inline |
TODO.
phaseIdx | The fluid phase of interest |
compIdx | The component phase of interest |
compJIdx | Additional component index |
|
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 |
|
inline |
The Peng-Robinson covolume for a phase.
phaseIdx | The fluid phase of interest |
|
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 |
|
inline |
Returns the molar volume of a phase [m^3/mol].
phaseIdx | The fluid phase of interest |
|
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. |
|
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.
|
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. |
|
inlineprotected |
Update all parameters of a phase which only depend on temperature and/or pressure.
This usually means the parameters for the pure components.
|
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. |