Loading...
Searching...
No Matches
Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage > Class Template Reference

A fluid system which uses the black-oil model assumptions to calculate termodynamically meaningful quantities. More...

`#include <BlackOilFluidSystem_macrotemplate.hpp>`

Inheritance diagram for Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >:

## Public Types

using | GasPvt
using | OilPvt
using | WaterPvt
using | IndexTraitsType = IndexTraits
template<class EvaluationT>
using | ParameterCache
Public Types inherited from Opm::BaseFluidSystem< Scalar, FLUIDSYSTEM_CLASSNAME< Scalar, BlackOilDefaultFluidSystemIndices, VectorWithDefaultAllocator > >
typedef Scalar | Scalar
| The type used for scalar quantities.

## Public Member Functions

template<template< typename > typename StorageT>
| FLUIDSYSTEM_CLASSNAME (const FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, StorageT > &other)
| Default copy constructor.

FLUIDSYSTEM_CLASSNAME (Scalar _surfacePressure_, Scalar _surfaceTemperature_, Scalar _reservoirTemperature_, const GasPvt &_gasPvt_, const OilPvt &_oilPvt_, const WaterPvt &_waterPvt_, bool _enableDissolvedGas_, bool _enableDissolvedGasInWater_, bool _enableVaporizedOil_, bool _enableVaporizedWater_, bool _enableDiffusion_, Storage< std::array< Scalar, 3 > > &&_referenceDensity_, Storage< std::array< Scalar, 3 > > &&_molarMass_, Storage< std::array< Scalar, 3 *3 > > &&_diffusionCoefficients_, const PhaseUsageInfo< IndexTraits > &_phaseUsageInfo_, bool _isInitialized_, bool _useSaturatedTables_, bool _enthalpy_eq_energy_)

STATIC_OR_NOTHING void | initBegin (std::size_t numPvtRegions)
| Begin the initialization of the black oil fluid system.
STATIC_OR_DEVICE void | setEnableDissolvedGas (bool yesno)
| Specify whether the fluid system should consider that the gas component can dissolve in the oil phase.
STATIC_OR_DEVICE void | setEnableVaporizedOil (bool yesno)
| Specify whether the fluid system should consider that the oil component can dissolve in the gas phase.
STATIC_OR_DEVICE void | setEnableVaporizedWater (bool yesno)
| Specify whether the fluid system should consider that the water component can dissolve in the gas phase.
STATIC_OR_DEVICE void | setEnableDissolvedGasInWater (bool yesno)
| Specify whether the fluid system should consider that the gas component can dissolve in the water phase.
STATIC_OR_DEVICE void | setEnableDiffusion (bool yesno)
| Specify whether the fluid system should consider diffusion.
STATIC_OR_DEVICE void | setUseSaturatedTables (bool yesno)
| Specify whether the saturated tables should be used.
STATIC_OR_DEVICE void | setGasPvt (std::shared_ptr< GasPvt > pvtObj)
| Set the pressure-volume-saturation (PVT) relations for the gas phase.
STATIC_OR_DEVICE void | setOilPvt (std::shared_ptr< OilPvt > pvtObj)
| Set the pressure-volume-saturation (PVT) relations for the oil phase.
STATIC_OR_DEVICE void | setWaterPvt (std::shared_ptr< WaterPvt > pvtObj)
| Set the pressure-volume-saturation (PVT) relations for the water phase.
STATIC_OR_DEVICE void | setVapPars (const Scalar par1, const Scalar par2)
STATIC_OR_DEVICE void | setReferenceDensities (Scalar rhoOil, Scalar rhoWater, Scalar rhoGas, unsigned regionIdx)
| Initialize the values of the reference densities.
STATIC_OR_DEVICE void | initEnd ()
| Finish initializing the black oil fluid system.
STATIC_OR_DEVICE bool | isInitialized () NOTHING_OR_CONST
STATIC_OR_NOTHING std::string_view | phaseName (unsigned phaseIdx) NOTHING_OR_CONST
| Return the human readable name of a fluid phase.
STATIC_OR_DEVICE bool | isLiquid (unsigned phaseIdx) NOTHING_OR_CONST
| Return whether a phase is liquid.
STATIC_OR_DEVICE const PhaseUsageInfo< IndexTraits > & | phaseUsage () NOTHING_OR_CONST
| Returns a const reference to PhaseUsageInfo.
STATIC_OR_DEVICE unsigned | numActivePhases () NOTHING_OR_CONST
| Returns the number of active fluid phases (i.e., usually three).
STATIC_OR_DEVICE bool | phaseIsActive (unsigned phaseIdx) NOTHING_OR_CONST
| Returns whether a fluid phase is active.
STATIC_OR_DEVICE unsigned | solventComponentIndex (unsigned phaseIdx) NOTHING_OR_CONST
| returns the index of "primary" component of a phase (solvent)
STATIC_OR_DEVICE unsigned | soluteComponentIndex (unsigned phaseIdx) NOTHING_OR_CONST
| returns the index of "secondary" component of a phase (solute)
STATIC_OR_NOTHING std::string_view | componentName (unsigned compIdx) NOTHING_OR_CONST
| Return the human readable name of a component.
STATIC_OR_DEVICE Scalar | molarMass (unsigned compIdx, unsigned regionIdx=0) NOTHING_OR_CONST
| Return the molar mass of a component in [kg/mol].
STATIC_OR_DEVICE bool | isIdealMixture (unsigned)
| Returns true if and only if a fluid phase is assumed to be an ideal mixture.
STATIC_OR_DEVICE bool | isCompressible (unsigned) NOTHING_OR_CONST
| Returns true if and only if a fluid phase is assumed to be compressible.
STATIC_OR_DEVICE bool | isIdealGas (unsigned) NOTHING_OR_CONST
| Returns true if and only if a fluid phase is assumed to be an ideal gas.
STATIC_OR_DEVICE std::size_t | numRegions () NOTHING_OR_CONST
| Returns the number of PVT regions which are considered.
STATIC_OR_DEVICE bool | enableDissolvedGas () NOTHING_OR_CONST
| Returns whether the fluid system should consider that the gas component can dissolve in the oil phase.
STATIC_OR_DEVICE bool | enableDissolvedGasInWater () NOTHING_OR_CONST
| Returns whether the fluid system should consider that the gas component can dissolve in the water phase.
STATIC_OR_DEVICE bool | enableVaporizedOil () NOTHING_OR_CONST
| Returns whether the fluid system should consider that the oil component can dissolve in the gas phase.
STATIC_OR_DEVICE bool | enableVaporizedWater () NOTHING_OR_CONST
| Returns whether the fluid system should consider that the water component can dissolve in the gas phase.
STATIC_OR_DEVICE bool | enableDiffusion () NOTHING_OR_CONST
| Returns whether the fluid system should consider diffusion.
STATIC_OR_DEVICE bool | useSaturatedTables () NOTHING_OR_CONST
| Returns whether the saturated tables should be used.
STATIC_OR_DEVICE Scalar | referenceDensity (unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
| Returns the density of a fluid phase at surface pressure [kg/m^3].
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
STATIC_OR_DEVICE LhsEval | density (const FluidState &fluidState, const ParameterCache< ParamCacheEval > &paramCache, unsigned phaseIdx) NOTHING_OR_CONST
| Calculate the density [kg/m^3] of a fluid phase.
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
STATIC_OR_DEVICE LhsEval | fugacityCoefficient (const FluidState &fluidState, const ParameterCache< ParamCacheEval > &paramCache, unsigned phaseIdx, unsigned compIdx) NOTHING_OR_CONST
| Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase.
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
STATIC_OR_DEVICE LhsEval | viscosity (const FluidState &fluidState, const ParameterCache< ParamCacheEval > &paramCache, unsigned phaseIdx) NOTHING_OR_CONST
| Calculate the dynamic viscosity of a fluid phase [Pa*s].
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
STATIC_OR_DEVICE LhsEval | enthalpy (const FluidState &fluidState, const ParameterCache< ParamCacheEval > &paramCache, unsigned phaseIdx)
| Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy [J/kg].
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
STATIC_OR_DEVICE LhsEval | internalEnergy (const FluidState &fluidState, const ParameterCache< ParamCacheEval > &paramCache, unsigned phaseIdx) NOTHING_OR_CONST
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | density (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
| Calculate the density [kg/m^3] of a fluid phase.
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | saturatedDensity (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
| Compute the density of a saturated fluid phase.
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | inverseFormationVolumeFactor (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
| Returns the formation volume factor of an "undersaturated" fluid phase.
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE std::pair< LhsEval, LhsEval > | inverseFormationVolumeFactorAndViscosity (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx)
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | saturatedInverseFormationVolumeFactor (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
| Returns the formation volume factor of a "saturated" fluid phase.
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | fugacityCoefficient (const FluidState &fluidState, unsigned phaseIdx, unsigned compIdx, unsigned regionIdx) NOTHING_OR_CONST
| Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase.
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | viscosity (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
| Calculate the dynamic viscosity of a fluid phase [Pa*s].
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | internalEnergy (const FluidState &fluidState, const unsigned phaseIdx, const unsigned regionIdx) NOTHING_OR_CONST
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | internalMixingTotalEnergy (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | enthalpy (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
| Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy [J/kg].
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | saturatedVaporizationFactor (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
| Returns the water vaporization factor of saturated phase.
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | saturatedDissolutionFactor (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx, const LhsEval &maxOilSaturation) NOTHING_OR_CONST
| Returns the dissolution factor of a saturated fluid phase.
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | saturatedDissolutionFactor (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
| Returns the dissolution factor of a saturated fluid phase.
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | bubblePointPressure (const FluidState &fluidState, unsigned regionIdx) NOTHING_OR_CONST
| Returns the bubble point pressure $P_b$ using the current Rs.
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | dewPointPressure (const FluidState &fluidState, unsigned regionIdx) NOTHING_OR_CONST
| Returns the dew point pressure $P_d$ using the current Rv.
template<class FluidState, class LhsEval = typename FluidState::Scalar>
STATIC_OR_DEVICE LhsEval | saturationPressure (const FluidState &fluidState, unsigned phaseIdx, unsigned regionIdx) NOTHING_OR_CONST
| Returns the saturation pressure of a given phase [Pa] depending on its composition.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertXoGToRs (const LhsEval &XoG, unsigned regionIdx) NOTHING_OR_CONST
| Convert the mass fraction of the gas component in the oil phase to the corresponding gas dissolution factor.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertXwGToRsw (const LhsEval &XwG, unsigned regionIdx) NOTHING_OR_CONST
| Convert the mass fraction of the gas component in the water phase to the corresponding gas dissolution factor.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertXgOToRv (const LhsEval &XgO, unsigned regionIdx) NOTHING_OR_CONST
| Convert the mass fraction of the oil component in the gas phase to the corresponding oil vaporization factor.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertXgWToRvw (const LhsEval &XgW, unsigned regionIdx) NOTHING_OR_CONST
| Convert the mass fraction of the water component in the gas phase to the corresponding water vaporization factor.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertRsToXoG (const LhsEval &Rs, unsigned regionIdx) NOTHING_OR_CONST
| Convert a gas dissolution factor to the the corresponding mass fraction of the gas component in the oil phase.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertRswToXwG (const LhsEval &Rsw, unsigned regionIdx) NOTHING_OR_CONST
| Convert a gas dissolution factor to the the corresponding mass fraction of the gas component in the water phase.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertRvToXgO (const LhsEval &Rv, unsigned regionIdx) NOTHING_OR_CONST
| Convert an oil vaporization factor to the corresponding mass fraction of the oil component in the gas phase.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertRvwToXgW (const LhsEval &Rvw, unsigned regionIdx) NOTHING_OR_CONST
| Convert an water vaporization factor to the corresponding mass fraction of the water component in the gas phase.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertXgWToxgW (const LhsEval &XgW, unsigned regionIdx) NOTHING_OR_CONST
| Convert a water mass fraction in the gas phase the corresponding mole fraction.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertXwGToxwG (const LhsEval &XwG, unsigned regionIdx) NOTHING_OR_CONST
| Convert a gas mass fraction in the water phase the corresponding mole fraction.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertXoGToxoG (const LhsEval &XoG, unsigned regionIdx) NOTHING_OR_CONST
| Convert a gas mass fraction in the oil phase the corresponding mole fraction.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertxoGToXoG (const LhsEval &xoG, unsigned regionIdx) NOTHING_OR_CONST
| Convert a gas mole fraction in the oil phase the corresponding mass fraction.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertXgOToxgO (const LhsEval &XgO, unsigned regionIdx) NOTHING_OR_CONST
| Convert a oil mass fraction in the gas phase the corresponding mole fraction.
template<class LhsEval>
STATIC_OR_DEVICE LhsEval | convertxgOToXgO (const LhsEval &xgO, unsigned regionIdx) NOTHING_OR_CONST
| Convert a oil mole fraction in the gas phase the corresponding mass fraction.
STATIC_OR_DEVICE const GasPvt & | gasPvt () NOTHING_OR_CONST
| Return a reference to the low-level object which calculates the gas phase quantities.
STATIC_OR_DEVICE const OilPvt & | oilPvt () NOTHING_OR_CONST
| Return a reference to the low-level object which calculates the oil phase quantities.
STATIC_OR_DEVICE const WaterPvt & | waterPvt () NOTHING_OR_CONST
| Return a reference to the low-level object which calculates the water phase quantities.
STATIC_OR_DEVICE Scalar | reservoirTemperature (unsigned=0) NOTHING_OR_CONST
| Set the temperature of the reservoir.
STATIC_OR_DEVICE void | setReservoirTemperature (Scalar value) NOTHING_OR_CONST
| Return the temperature of the reservoir.
STATIC_OR_DEVICE short | activeToCanonicalPhaseIdx (unsigned activePhaseIdx) NOTHING_OR_CONST
STATIC_OR_DEVICE short | canonicalToActivePhaseIdx (unsigned phaseIdx) NOTHING_OR_CONST
STATIC_OR_DEVICE short | activeToCanonicalCompIdx (unsigned activeCompIdx) NOTHING_OR_CONST
STATIC_OR_DEVICE short | canonicalToActiveCompIdx (unsigned compIdx) NOTHING_OR_CONST
STATIC_OR_DEVICE short | activePhaseToActiveCompIdx (unsigned activePhaseIdx) NOTHING_OR_CONST
STATIC_OR_DEVICE short | activeCompToActivePhaseIdx (unsigned activeCompIdx) NOTHING_OR_CONST
STATIC_OR_DEVICE Scalar | diffusionCoefficient (unsigned compIdx, unsigned phaseIdx, unsigned regionIdx=0) NOTHING_OR_CONST
| Calculate the binary molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (kg*m^3)].
STATIC_OR_DEVICE void | setDiffusionCoefficient (Scalar coefficient, unsigned compIdx, unsigned phaseIdx, unsigned regionIdx=0) NOTHING_OR_CONST
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
STATIC_OR_DEVICE LhsEval | diffusionCoefficient (const FluidState &fluidState, const ParameterCache< ParamCacheEval > &paramCache, unsigned phaseIdx, unsigned compIdx) NOTHING_OR_CONST
| Calculate the binary molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (kg*m^3)].
STATIC_OR_DEVICE void | setEnergyEqualEnthalpy (bool enthalpy_eq_energy)
STATIC_OR_DEVICE bool | enthalpyEqualEnergy ()

## Public Attributes

STATIC_OR_NOTHING Scalar | surfacePressure
| The pressure at the surface.
STATIC_OR_NOTHING Scalar | surfaceTemperature
| The temperature at the surface.

## Static Public Attributes

static constexpr unsigned | numPhases = IndexTraits::numPhases
| Number of fluid phases in the fluid system.
static constexpr unsigned | waterPhaseIdx = IndexTraits::waterPhaseIdx
| Index of the water phase.
static constexpr unsigned | oilPhaseIdx = IndexTraits::oilPhaseIdx
| Index of the oil phase.
static constexpr unsigned | gasPhaseIdx = IndexTraits::gasPhaseIdx
| Index of the gas phase.
static constexpr unsigned | numComponents = IndexTraits::numComponents
| Number of chemical species in the fluid system.
static constexpr int | oilCompIdx = IndexTraits::oilCompIdx
| Index of the oil component.
static constexpr int | waterCompIdx = IndexTraits::waterCompIdx
| Index of the water component.
static constexpr int | gasCompIdx = IndexTraits::gasCompIdx
| Index of the gas component.
Static Public Attributes inherited from Opm::BaseFluidSystem< Scalar, FLUIDSYSTEM_CLASSNAME< Scalar, BlackOilDefaultFluidSystemIndices, VectorWithDefaultAllocator > >
static const int | numComponents
| Number of chemical species in the fluid system.
static const int | numPhases
| Number of fluid phases in the fluid system.

## Friends

template<class ScalarT, class IndexTraitsT, template< typename > typename StorageT>
class | FLUIDSYSTEM_CLASSNAME_STATIC

## Additional Inherited Members

Static Public Member Functions inherited from Opm::BaseFluidSystem< Scalar, FLUIDSYSTEM_CLASSNAME< Scalar, BlackOilDefaultFluidSystemIndices, VectorWithDefaultAllocator > >
static std::string_view | phaseName (unsigned)
| Return the human readable name of a fluid phase.
static bool | isLiquid (unsigned)
| Return whether a phase is liquid.
static bool | isIdealMixture (unsigned)
| Returns true if and only if a fluid phase is assumed to be an ideal mixture.
static bool | isCompressible (unsigned)
| Returns true if and only if a fluid phase is assumed to be compressible.
static bool | isIdealGas (unsigned)
| Returns true if and only if a fluid phase is assumed to be an ideal gas.
static std::string_view | componentName (unsigned)
| Return the human readable name of a component.
static Scalar | molarMass (unsigned)
| Return the molar mass of a component in [kg/mol].
static Scalar | acentricFactor (unsigned)
| Return the acetntric factor of a component.
static void | init ()
| Initialize the fluid system's static parameters.
static LhsEval | density (const FluidState &, const ParamCache &, unsigned)
| Calculate the density [kg/m^3] of a fluid phase.
static LhsEval | fugacityCoefficient (const FluidState &, ParamCache &, unsigned, unsigned)
| Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase.
static LhsEval | viscosity (const FluidState &, ParamCache &, unsigned)
| Calculate the dynamic viscosity of a fluid phase [Pa*s].
static LhsEval | diffusionCoefficient (const FluidState &, ParamCache &, unsigned, unsigned)
| Calculate the binary molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (kg*m^3)].
static LhsEval | enthalpy (const FluidState &, ParamCache &, unsigned)
| Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy [J/kg].
static LhsEval | thermalConductivity (const FluidState &, ParamCache &, unsigned)
| Thermal conductivity of a fluid phase [W/(m K)].
static LhsEval | heatCapacity (const FluidState &, ParamCache &, unsigned)
| Specific isobaric heat capacity of a fluid phase [J/kg].
static bool | phaseIsActive (unsigned)
| Returns whether a fluid phase is active.

## Detailed Description

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
class Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >

A fluid system which uses the black-oil model assumptions to calculate termodynamically meaningful quantities.

Template Parameters

  Scalar | The type used for scalar floating point values

## Member Typedef Documentation

## GasPvt

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

using Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::GasPvt

Initial value:

## OilPvt

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

using Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::OilPvt

Initial value:

## ParameterCache

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class EvaluationT>

using Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::ParameterCache

Initial value:

## WaterPvt

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

using Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::WaterPvt

Initial value:

## Constructor & Destructor Documentation

## FLUIDSYSTEM_CLASSNAME()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<template< typename > typename StorageT>

Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::FLUIDSYSTEM_CLASSNAME | ( | const FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, StorageT > & | other | ) |

inline explicit

Default copy constructor.

This can be used to copy from one storage type (say std::vector) to another (say GPUBuffer).

## Member Function Documentation

## componentName()

template<class Scalar, class IndexTraits, template< typename > typename Storage>

std::string_view Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::componentName | ( | unsigned | compIdx | ) |

Return the human readable name of a component.

## density() [1/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::density | ( | const FluidState & | fluidState,
|  | const ParameterCache< ParamCacheEval > & | paramCache,
|  | unsigned | phaseIdx )

inline

Calculate the density [kg/m^3] of a fluid phase.

## density() [2/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::density | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx )

inline

Calculate the density [kg/m^3] of a fluid phase.

## diffusionCoefficient() [1/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::diffusionCoefficient | ( | const FluidState & | fluidState,
|  | const ParameterCache< ParamCacheEval > & | paramCache,
|  | unsigned | phaseIdx,
|  | unsigned | compIdx )

inline

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.

## diffusionCoefficient() [2/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE Scalar Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::diffusionCoefficient | ( | unsigned | compIdx,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx = 0 )

inline

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.

## enableDiffusion()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE bool Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::enableDiffusion | ( |  | ) |

inline

Returns whether the fluid system should consider diffusion.

By default, diffusion is not considered.

## enableDissolvedGas()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE bool Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::enableDissolvedGas | ( |  | ) |

inline

Returns whether the fluid system should consider that the gas component can dissolve in the oil phase.

By default, dissolved gas is considered.

## enableDissolvedGasInWater()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE bool Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::enableDissolvedGasInWater | ( |  | ) |

inline

Returns whether the fluid system should consider that the gas component can dissolve in the water phase.

By default, dissolved gas is considered.

## enableVaporizedOil()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE bool Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::enableVaporizedOil | ( |  | ) |

inline

Returns whether the fluid system should consider that the oil component can dissolve in the gas phase.

By default, vaporized oil is not considered.

## enableVaporizedWater()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE bool Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::enableVaporizedWater | ( |  | ) |

inline

Returns whether the fluid system should consider that the water component can dissolve in the gas phase.

By default, vaporized water is not considered.

## enthalpy() [1/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::enthalpy | ( | const FluidState & | fluidState,
|  | const ParameterCache< ParamCacheEval > & | paramCache,
|  | unsigned | phaseIdx )

inline

Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy [J/kg].

## enthalpy() [2/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::enthalpy | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx )

inline

Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy [J/kg].

## fugacityCoefficient() [1/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::fugacityCoefficient | ( | const FluidState & | fluidState,
|  | const ParameterCache< ParamCacheEval > & | paramCache,
|  | unsigned | phaseIdx,
|  | unsigned | compIdx )

inline

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

## fugacityCoefficient() [2/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::fugacityCoefficient | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | compIdx,
|  | unsigned | regionIdx )

inline

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

## gasPvt()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE const GasPvt & Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::gasPvt | ( |  | ) |

inline

Return a reference to the low-level object which calculates the gas phase quantities.

Note
  It is not recommended to use this method directly, but the black-oil specific methods of the fluid systems from above should be used instead.

## initBegin()

template<class Scalar, class IndexTraits, template< typename > typename Storage>

void Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::initBegin | ( | std::size_t | numPvtRegions | ) |

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, updateIndexMapping_() must be called to finalize the initialization.

## inverseFormationVolumeFactor()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::inverseFormationVolumeFactor | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx )

inline

Returns the formation volume factor of an "undersaturated" fluid phase.

For the oil (gas) phase, "undersaturated" means that the concentration of the gas (oil) component is not assumed to be at the thermodynamically possible maximum at the given temperature and pressure.

## isCompressible()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE bool Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::isCompressible | ( | unsigned |  | ) |

inline

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.

## isIdealGas()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE bool Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::isIdealGas | ( | unsigned |  | ) |

inline

Returns true if and only if a fluid phase is assumed to be an ideal gas.

## isIdealMixture()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE bool Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::isIdealMixture | ( | unsigned |  | ) |

inline

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.

## isLiquid()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE bool Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::isLiquid | ( | unsigned | phaseIdx | ) |

inline

Return whether a phase is liquid.

## molarMass()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE Scalar Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::molarMass | ( | unsigned | compIdx,
|  | unsigned | regionIdx = 0 )

inline

Return the molar mass of a component in [kg/mol].

## numRegions()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE std::size_t Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::numRegions | ( |  | ) |

inline

Returns the number of PVT regions which are considered.

By default, this is 1.

## oilPvt()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE const OilPvt & Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::oilPvt | ( |  | ) |

inline

Return a reference to the low-level object which calculates the oil phase quantities.

Note
  It is not recommended to use this method directly, but the black-oil specific methods of the fluid systems from above should be used instead.

## phaseName()

template<class Scalar, class IndexTraits, template< typename > typename Storage>

std::string_view Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::phaseName | ( | unsigned | phaseIdx | ) |

Return the human readable name of a fluid phase.

## referenceDensity()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE Scalar Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::referenceDensity | ( | unsigned | phaseIdx,
|  | unsigned | regionIdx )

inline

Returns the density of a fluid phase at surface pressure [kg/m^3].

## reservoirTemperature()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE Scalar Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::reservoirTemperature | ( | unsigned | = 0 | ) |

inline

Set the temperature of the reservoir.

This method is black-oil specific and only makes sense for isothermal simulations.

## saturatedDensity()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::saturatedDensity | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx )

inline

Compute the density of a saturated fluid phase.

This means the density of the given fluid phase if the dissolved component (gas for the oil phase and oil for the gas phase) is at the thermodynamically possible maximum. For the water phase, there's no difference to the density() method for the standard blackoil model. If enableDissolvedGasInWater is enabled the water density takes into account the amount of dissolved gas

## saturatedDissolutionFactor() [1/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::saturatedDissolutionFactor | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx )

inline

Returns the dissolution factor of a saturated fluid phase.

For the oil (gas) phase, this means the R_s and R_v factors, for the water phase, it is always 0. The difference of this method compared to the previous one is that this method does not prevent dissolving a given component if the corresponding phase's saturation is small-

## saturatedDissolutionFactor() [2/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::saturatedDissolutionFactor | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx,
|  | const LhsEval & | maxOilSaturation )

inline

Returns the dissolution factor of a saturated fluid phase.

For the oil (gas) phase, this means the R_s and R_v factors, for the water phase, it is always 0.

## saturatedInverseFormationVolumeFactor()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::saturatedInverseFormationVolumeFactor | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx )

inline

Returns the formation volume factor of a "saturated" fluid phase.

For the oil phase, this means that it is gas saturated, the gas phase is oil saturated and for the water phase, there is no difference to formationVolumeFactor() for the standard blackoil model. If enableDissolvedGasInWater is enabled the water density takes into account the amount of dissolved gas

## saturatedVaporizationFactor()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::saturatedVaporizationFactor | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx )

inline

Returns the water vaporization factor of saturated phase.

For the gas phase, this means the R_vw factor, for the water and oil phase, it is always 0.

## saturationPressure()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::saturationPressure | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx )

inline

Returns the saturation pressure of a given phase [Pa] depending on its composition.

In the black-oil model, the saturation pressure it the pressure at which the fluid phase is in equilibrium with the gas phase, i.e., it is the inverse of the "dissolution factor". Note that a-priori this quantity is undefined for the water phase (because water is assumed to be immiscible with everything else). This method here just returns 0, though.

## setDiffusionCoefficient()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE void Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::setDiffusionCoefficient | ( | Scalar | coefficient,
|  | unsigned | compIdx,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx = 0 )

inline

## setEnableDiffusion()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE void Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::setEnableDiffusion | ( | bool | yesno | ) |

inline

Specify whether the fluid system should consider diffusion.

By default, diffusion is not considered.

## setEnableDissolvedGas()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE void Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::setEnableDissolvedGas | ( | bool | yesno | ) |

inline

Specify whether the fluid system should consider that the gas component can dissolve in the oil phase.

By default, dissolved gas is considered.

## setEnableDissolvedGasInWater()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE void Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::setEnableDissolvedGasInWater | ( | bool | yesno | ) |

inline

Specify whether the fluid system should consider that the gas component can dissolve in the water phase.

By default, dissovled gas in water is not considered.

## setEnableVaporizedOil()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE void Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::setEnableVaporizedOil | ( | bool | yesno | ) |

inline

Specify whether the fluid system should consider that the oil component can dissolve in the gas phase.

By default, vaporized oil is not considered.

## setEnableVaporizedWater()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE void Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::setEnableVaporizedWater | ( | bool | yesno | ) |

inline

Specify whether the fluid system should consider that the water component can dissolve in the gas phase.

By default, vaporized water is not considered.

## setReferenceDensities()

template<class Scalar, class IndexTraits, template< typename > typename Storage>

NOTHING_OR_DEVICE void Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::setReferenceDensities | ( | Scalar | rhoOil,
|  | Scalar | rhoWater,
|  | Scalar | rhoGas,
|  | unsigned | regionIdx )

Initialize the values of the reference densities.

Parameters

  rhoOil | The reference density of (gas saturated) oil phase.
  rhoWater | The reference density of the water phase.
  rhoGas | The reference density of the gas phase.
  regionIdx | Region index to use.

## setReservoirTemperature()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE void Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::setReservoirTemperature | ( | Scalar | value | ) |

inline

Return the temperature of the reservoir.

This method is black-oil specific and only makes sense for isothermal simulations.

## setUseSaturatedTables()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE void Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::setUseSaturatedTables | ( | bool | yesno | ) |

inline

Specify whether the saturated tables should be used.

By default, saturated tables are used

## useSaturatedTables()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE bool Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::useSaturatedTables | ( |  | ) |

inline

Returns whether the saturated tables should be used.

By default, saturated tables are used. If false the unsaturated tables are extrapolated

## viscosity() [1/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::viscosity | ( | const FluidState & | fluidState,
|  | const ParameterCache< ParamCacheEval > & | paramCache,
|  | unsigned | phaseIdx )

inline

Calculate the dynamic viscosity of a fluid phase [Pa*s].

## viscosity() [2/2]

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>
template<class FluidState, class LhsEval = typename FluidState::Scalar>

STATIC_OR_DEVICE LhsEval Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::viscosity | ( | const FluidState & | fluidState,
|  | unsigned | phaseIdx,
|  | unsigned | regionIdx )

inline

Calculate the dynamic viscosity of a fluid phase [Pa*s].

## waterPvt()

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

STATIC_OR_DEVICE const WaterPvt & Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::waterPvt | ( |  | ) |

inline

Return a reference to the low-level object which calculates the water phase quantities.

Note
  It is not recommended to use this method directly, but the black-oil specific methods of the fluid systems from above should be used instead.

## Member Data Documentation

## numComponents

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

unsigned Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::numComponents = IndexTraits::numComponents

static constexpr

Number of chemical species in the fluid system.

## numPhases

template<class Scalar, class IndexTraits = BlackOilDefaultFluidSystemIndices, template< typename > typename Storage = VectorWithDefaultAllocator>

unsigned Opm::FLUIDSYSTEM_CLASSNAME< Scalar, IndexTraits, Storage >::numPhases = IndexTraits::numPhases

static constexpr

Number of fluid phases in the fluid system.

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

- opm/material/fluidsystems/BlackOilFluidSystem_macrotemplate.hpp