Computes all quantities of a generic fluid state if a reference phase has been specified.
More...
#include <ComputeFromReferencePhase.hpp>
|
template<class FluidState , class ParameterCache > |
static void | solve (FluidState &fluidState, ParameterCache ¶mCache, unsigned refPhaseIdx, bool setViscosity, bool setEnthalpy) |
| Computes all quantities of a generic fluid state if a reference phase has been specified. More...
|
|
template<class Scalar, class FluidSystem, class Evaluation = Scalar>
class Opm::ComputeFromReferencePhase< Scalar, FluidSystem, Evaluation >
Computes all quantities of a generic fluid state if a reference phase has been specified.
This makes it is possible to specify just one phase and let the remaining ones be calculated by the constraint solver. This constraint solver assumes thermodynamic equilibrium. It assumes the following quantities to be set:
- composition (mole+mass fractions) of the reference phase
- temperature of the reference phase
- saturations of all phases
- pressures of all phases
after calling the solve() method the following quantities are calculated in addition:
- temperature of all phases
- density, molar density, molar volume of all phases
- composition in mole and mass fractions and molaries of all phases
- mean molar masses of all phases
- fugacity coefficients of all components in all phases
- if the setViscosity parameter is true, also dynamic viscosities of all phases
- if the setEnthalpy parameter is true, also specific enthalpies and internal energies of all phases
template<class Scalar , class FluidSystem , class Evaluation = Scalar>
template<class FluidState , class ParameterCache >
static void Opm::ComputeFromReferencePhase< Scalar, FluidSystem, Evaluation >::solve |
( |
FluidState & |
fluidState, |
|
|
ParameterCache & |
paramCache, |
|
|
unsigned |
refPhaseIdx, |
|
|
bool |
setViscosity, |
|
|
bool |
setEnthalpy |
|
) |
| |
|
inlinestatic |
Computes all quantities of a generic fluid state if a reference phase has been specified.
This makes it is possible to specify just one phase and let the remaining ones be calculated by the constraint solver. This constraint solver assumes thermodynamic equilibrium. It assumes the following quantities to be set:
- composition (mole+mass fractions) of the reference phase
- temperature of the all phases
- saturations of all phases
- pressures of all phases
after calling the solve() method the following quantities are calculated in addition:
- temperature of all phases
- density, molar density, molar volume of all phases
- composition in mole and mass fractions and molaries of all phases
- mean molar masses of all phases
- fugacity coefficients of all components in all phases
- if the setViscosity parameter is true, also dynamic viscosities of all phases
- if the setEnthalpy parameter is true, also specific enthalpies and internal energies of all phases
- Parameters
-
fluidState | Thermodynamic state of the fluids |
paramCache | Container for cache parameters |
refPhaseIdx | The phase index of the reference phase |
setViscosity | Specify whether the dynamic viscosity of each phase should also be set. |
setEnthalpy | Specify whether the specific enthalpy/internal energy of each phase should also be set. |
References Opm::CompositionFromFugacities< Scalar, FluidSystem, Evaluation >::solve().
The documentation for this class was generated from the following file: