A fluid system which uses the black-oil parameters to calculate termodynamically meaningful quantities.
More...
#include <BlackOilFluidSystem.hpp>
|
static void | initBegin (size_t numPvtRegions) |
| Begin the initialization of the black oil fluid system. More...
|
|
static void | setEnableDissolvedGas (bool yesno) |
| Specify whether the fluid system should consider that the gas component can dissolve in the oil phase. More...
|
|
static void | setEnableVaporizedOil (bool yesno) |
| Specify whether the fluid system should consider that the oil component can dissolve in the gas phase. More...
|
|
static void | setGasPvt (std::shared_ptr< GasPvt > pvtObj) |
| Set the pressure-volume-saturation (PVT) relations for the gas phase. More...
|
|
static void | setOilPvt (std::shared_ptr< OilPvt > pvtObj) |
| Set the pressure-volume-saturation (PVT) relations for the oil phase. More...
|
|
static void | setWaterPvt (std::shared_ptr< WaterPvt > pvtObj) |
| Set the pressure-volume-saturation (PVT) relations for the water phase. More...
|
|
static void | setReferenceDensities (Scalar rhoOil, Scalar rhoWater, Scalar rhoGas, unsigned regionIdx) |
| Initialize the values of the reference densities. More...
|
|
static void | initEnd () |
| Finish initializing the black oil fluid system. More...
|
|
static const char * | phaseName (const unsigned phaseIdx) |
| Return the human readable name of a fluid phase. More...
|
|
static bool | isLiquid (const unsigned phaseIdx) |
| Return whether a phase is liquid. More...
|
|
static const char * | componentName (unsigned compIdx) |
| Return the human readable name of a component. More...
|
|
static Scalar | molarMass (unsigned compIdx, unsigned regionIdx=0) |
| Return the molar mass of a component in [kg/mol]. More...
|
|
static bool | isIdealMixture (unsigned) |
| Returns true if and only if a fluid phase is assumed to be an ideal mixture. More...
|
|
static bool | isCompressible (unsigned) |
| Returns true if and only if a fluid phase is assumed to be compressible. More...
|
|
static bool | isIdealGas (unsigned) |
| Returns true if and only if a fluid phase is assumed to be an ideal gas. More...
|
|
template<class FluidState , class LhsEval = typename FluidState::Scalar> |
static LhsEval | density (const FluidState &fluidState, ParameterCache ¶mCache, const unsigned phaseIdx) |
| Calculate the density [kg/m^3] of a fluid phase. More...
|
|
template<class FluidState , class LhsEval = typename FluidState::Scalar> |
static LhsEval | fugacityCoefficient (const FluidState &fluidState, const ParameterCache ¶mCache, unsigned phaseIdx, unsigned compIdx) |
| Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase. More...
|
|
template<class FluidState , class LhsEval = typename FluidState::Scalar> |
static LhsEval | viscosity (const FluidState &fluidState, const ParameterCache ¶mCache, unsigned phaseIdx) |
| Calculate the dynamic viscosity of a fluid phase [Pa*s]. More...
|
|
static bool | enableDissolvedGas () |
| Returns whether the fluid system should consider that the gas component can dissolve in the oil phase. More...
|
|
static bool | enableVaporizedOil () |
| Returns whether the fluid system should consider that the oil component can dissolve in the gas phase. More...
|
|
static Scalar | referenceDensity (unsigned phaseIdx, unsigned regionIdx) |
| Returns the density of a fluid phase at surface pressure [kg/m^3]. More...
|
|
template<class LhsEval > |
static LhsEval | saturatedOilFormationVolumeFactor (const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| Returns the oil formation volume factor of saturated oil for a given pressure. More...
|
|
template<class LhsEval > |
static LhsEval | waterFormationVolumeFactor (const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| Return the formation volume factor of water. More...
|
|
template<class LhsEval > |
static LhsEval | gasDissolutionFactor (const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| Returns the gas dissolution factor for a given pressure. More...
|
|
template<class LhsEval > |
static LhsEval | oilVaporizationFactor (const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| Returns the oil vaporization factor for a given pressure. More...
|
|
template<class LhsEval > |
static LhsEval | fugCoefficientInWater (unsigned compIdx, const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| Returns the fugacity coefficient of a given component in the water phase. More...
|
|
template<class LhsEval > |
static LhsEval | fugCoefficientInGas (unsigned compIdx, const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| Returns the fugacity coefficient of a given component in the gas phase. More...
|
|
template<class LhsEval > |
static LhsEval | fugCoefficientInOil (unsigned compIdx, const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| Returns the fugacity coefficient of a given component in the oil phase. More...
|
|
template<class LhsEval > |
static LhsEval | oilSaturationPressure (const LhsEval &temperature, const LhsEval &XoG, unsigned regionIdx) |
| Returns the saturation pressure of the oil phase [Pa] depending on its mass fraction of the gas component. More...
|
|
template<class LhsEval > |
static LhsEval | saturatedOilGasMassFraction (const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| The maximum mass fraction of the gas component in the oil phase. More...
|
|
template<class LhsEval > |
static LhsEval | saturatedOilGasMoleFraction (const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| The maximum mole fraction of the gas component in the oil phase. More...
|
|
template<class LhsEval > |
static LhsEval | saturatedGasOilMassFraction (const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| The maximum mass fraction of the oil component in the gas phase. More...
|
|
template<class LhsEval > |
static LhsEval | saturatedGasOilMoleFraction (const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| The maximum mole fraction of the oil component in the gas phase. More...
|
|
template<class LhsEval > |
static LhsEval | oilFormationVolumeFactor (const LhsEval &temperature, const LhsEval &pressure, const LhsEval &XoG, unsigned regionIdx) |
| Return the normalized formation volume factor of (potentially) under-saturated oil. More...
|
|
template<class LhsEval > |
static LhsEval | oilDensity (const LhsEval &temperature, const LhsEval &pressure, const LhsEval &XoG, unsigned regionIdx) |
| Return the density of (potentially) under-saturated oil. More...
|
|
template<class LhsEval > |
static LhsEval | saturatedOilDensity (const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| Return the density of gas-saturated oil. More...
|
|
template<class LhsEval > |
static LhsEval | gasFormationVolumeFactor (const LhsEval &temperature, const LhsEval &pressure, const LhsEval &XgO, unsigned regionIdx) |
| Return the formation volume factor of gas. More...
|
|
template<class LhsEval > |
static LhsEval | gasDensity (const LhsEval &temperature, const LhsEval &pressure, const LhsEval &XgO, unsigned regionIdx) |
| Return the density of dry gas. More...
|
|
template<class LhsEval > |
static LhsEval | waterDensity (const LhsEval &temperature, const LhsEval &pressure, unsigned regionIdx) |
| Return the density of water. More...
|
|
static Scalar | molarMass (unsigned) |
| Return the molar mass of a component in [kg/mol]. More...
|
|
static void | init () |
| Initialize the fluid system's static parameters. More...
|
|
static LhsEval | density (const FluidState &, const ParameterCache &, unsigned) |
| Calculate the density [kg/m^3] of a fluid phase. More...
|
|
static LhsEval | fugacityCoefficient (const FluidState &, const ParameterCache &, unsigned, unsigned) |
| Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase. More...
|
|
static LhsEval | viscosity (const FluidState &, const ParameterCache &, unsigned) |
| Calculate the dynamic viscosity of a fluid phase [Pa*s]. More...
|
|
static LhsEval | diffusionCoefficient (const FluidState &, const ParameterCache &, unsigned, unsigned) |
| Calculate the binary molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (kg*m^3)]. More...
|
|
static LhsEval | enthalpy (const FluidState &, const ParameterCache &, unsigned) |
| Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy [J/kg]. More...
|
|
static LhsEval | thermalConductivity (const FluidState &, const ParameterCache &, unsigned) |
| Thermal conductivity of a fluid phase [W/(m K)]. More...
|
|
static LhsEval | heatCapacity (const FluidState &, const ParameterCache &, unsigned) |
| Specific isobaric heat capacity of a fluid phase [J/kg]. More...
|
|
template<class Scalar>
class Opm::FluidSystems::BlackOil< Scalar >
A fluid system which uses the black-oil parameters to calculate termodynamically meaningful quantities.
The type of the fluid system's parameter cache.
The parameter cache can be used to avoid re-calculating expensive parameters for multiple quantities. Be aware that what the parameter cache actually does is specific for each fluid system and that it is opaque outside the fluid system.
Return the human readable name of a component.
Calculate the density [kg/m^3] of a fluid phase.
template<class Scalar >
template<class FluidState , class LhsEval = typename FluidState::Scalar>
Calculate the binary molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (kg*m^3)].
Molecular diffusion of a compoent is caused by a gradient of the mole fraction and follows the law
where is the component's mole fraction in phase , is the diffusion coefficient and is the diffusive flux.
Returns whether the fluid system should consider that the gas component can dissolve in the oil phase.
By default, dissolved gas is considered.
Returns whether the fluid system should consider that the oil component can dissolve in the gas phase.
By default, vaporized oil is not considered.
Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy [J/kg].
Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase.
The fugacity coefficient is connected to the fugacity and the component's molarity by means of the relation
template<class Scalar >
template<class FluidState , class LhsEval = typename FluidState::Scalar>
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::fugCoefficientInGas |
( |
unsigned |
compIdx, |
|
|
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Returns the fugacity coefficient of a given component in the gas phase.
- Parameters
-
compIdx | The index of the component of interest |
pressure | The pressure of interest [Pa] |
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::fugCoefficientInOil |
( |
unsigned |
compIdx, |
|
|
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Returns the fugacity coefficient of a given component in the oil phase.
- Parameters
-
compIdx | The index of the component of interest |
pressure | The pressure of interest [Pa] |
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::fugCoefficientInWater |
( |
unsigned |
compIdx, |
|
|
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Returns the fugacity coefficient of a given component in the water phase.
- Parameters
-
compIdx | The index of the component of interest |
pressure | The pressure of interest [Pa] |
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::gasDensity |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
const LhsEval & |
XgO, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Return the density of dry gas.
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::gasDissolutionFactor |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Returns the gas dissolution factor for a given pressure.
- Parameters
-
pressure | The pressure of interest [Pa] |
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::gasFormationVolumeFactor |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
const LhsEval & |
XgO, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Return the formation volume factor of gas.
Specific isobaric heat capacity of a fluid phase [J/kg].
Initialize the fluid system's static parameters.
Begin the initialization of the black oil fluid system.
After calling this method the reference densities, all dissolution and formation volume factors, the oil bubble pressure, all viscosities and the water compressibility must be set. Before the fluid system can be used, initEnd() must be called to finalize the initialization.
Returns true if and only if a fluid phase is assumed to be compressible.
Compressible means that the partial derivative of the density to the fluid pressure is always larger than zero.
Returns true if and only if a fluid phase is assumed to be an ideal gas.
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
We define an ideal mixture as a fluid phase where the fugacity coefficients of all components times the pressure of the phase are independent on the fluid composition. This assumption is true if Henry's law and Rault's law apply. If you are unsure what this function should return, it is safe to return false. The only damage done will be (slightly) increased computation times in some cases.
Return the molar mass of a component in [kg/mol].
Return the molar mass of a component in [kg/mol].
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::oilDensity |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
const LhsEval & |
XoG, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Return the density of (potentially) under-saturated oil.
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::oilFormationVolumeFactor |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
const LhsEval & |
XoG, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::oilSaturationPressure |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
XoG, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Returns the saturation pressure of the oil phase [Pa] depending on its mass fraction of the gas component.
- Parameters
-
XoG | The mass fraction of the gas component in the oil phase [-] |
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::oilVaporizationFactor |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Returns the oil vaporization factor for a given pressure.
- Parameters
-
pressure | The pressure of interest [Pa] |
Return the human readable name of a fluid phase.
Returns the density of a fluid phase at surface pressure [kg/m^3].
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::saturatedGasOilMassFraction |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
The maximum mass fraction of the oil component in the gas phase.
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::saturatedGasOilMoleFraction |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
The maximum mole fraction of the oil component in the gas phase.
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::saturatedOilDensity |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::saturatedOilFormationVolumeFactor |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::saturatedOilGasMassFraction |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::saturatedOilGasMoleFraction |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
The maximum mole fraction of the gas component in the oil phase.
Specify whether the fluid system should consider that the gas component can dissolve in the oil phase.
By default, dissolved gas is considered.
Specify whether the fluid system should consider that the oil component can dissolve in the gas phase.
By default, vaporized oil is not considered.
Set the pressure-volume-saturation (PVT) relations for the gas phase.
Set the pressure-volume-saturation (PVT) relations for the oil phase.
template<class Scalar >
static void Opm::FluidSystems::BlackOil< Scalar >::setReferenceDensities |
( |
Scalar |
rhoOil, |
|
|
Scalar |
rhoWater, |
|
|
Scalar |
rhoGas, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Set the pressure-volume-saturation (PVT) relations for the water phase.
Thermal conductivity of a fluid phase [W/(m K)].
Calculate the dynamic viscosity of a fluid phase [Pa*s].
template<class Scalar >
template<class FluidState , class LhsEval = typename FluidState::Scalar>
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::waterDensity |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Return the density of water.
template<class Scalar >
template<class LhsEval >
static LhsEval Opm::FluidSystems::BlackOil< Scalar >::waterFormationVolumeFactor |
( |
const LhsEval & |
temperature, |
|
|
const LhsEval & |
pressure, |
|
|
unsigned |
regionIdx |
|
) |
| |
|
inlinestatic |
Return the formation volume factor of water.
Number of chemical species in the fluid system.
Number of fluid phases in the fluid system.
The documentation for this class was generated from the following file:
|