Opm::GasPvtMultiplexer< Scalar, enableThermal > Class Template Reference

This class represents the Pressure-Volume-Temperature relations of the gas phase in the black-oil model. More...

#include <GasPvtMultiplexer.hpp>

Public Member Functions

 GasPvtMultiplexer ()
 
 GasPvtMultiplexer (GasPvtApproach approach, void *realGasPvt)
 
 GasPvtMultiplexer (const GasPvtMultiplexer< Scalar, enableThermal > &data)
 
 ~GasPvtMultiplexer ()
 
void setApproach (GasPvtApproach gasPvtAppr)
 
void initEnd ()
 
unsigned numRegions () const
 Return the number of PVT regions which are considered by this PVT-object. More...
 
const Scalar gasReferenceDensity (unsigned regionIdx)
 Return the reference density which are considered by this PVT-object. More...
 
template<class Evaluation >
Evaluation internalEnergy (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rv) const
 Returns the specific enthalpy [J/kg] of gas given a set of parameters. More...
 
template<class Evaluation = Scalar>
Evaluation viscosity (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rv, const Evaluation &Rvw) const
 Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters. More...
 
template<class Evaluation = Scalar>
Evaluation saturatedViscosity (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
 Returns the dynamic viscosity [Pa s] of oil saturated gas given a set of parameters. More...
 
template<class Evaluation = Scalar>
Evaluation inverseFormationVolumeFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rv, const Evaluation &Rvw) const
 Returns the formation volume factor [-] of the fluid phase. More...
 
template<class Evaluation = Scalar>
Evaluation saturatedInverseFormationVolumeFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
 Returns the formation volume factor [-] of oil saturated gas given a set of parameters. More...
 
template<class Evaluation = Scalar>
Evaluation saturatedOilVaporizationFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
 Returns the oil vaporization factor $R_v$ [m^3/m^3] of oil saturated gas. More...
 
template<class Evaluation = Scalar>
Evaluation saturatedOilVaporizationFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &oilSaturation, const Evaluation &maxOilSaturation) const
 Returns the oil vaporization factor $R_v$ [m^3/m^3] of oil saturated gas. More...
 
template<class Evaluation = Scalar>
Evaluation saturatedWaterVaporizationFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
 Returns the water vaporization factor $R_vw$ [m^3/m^3] of water saturated gas. More...
 
template<class Evaluation = Scalar>
Evaluation saturatedWaterVaporizationFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &saltConcentration) const
 Returns the water vaporization factor $R_vw$ [m^3/m^3] of water saturated gas. More...
 
template<class Evaluation = Scalar>
Evaluation saturationPressure (unsigned regionIdx, const Evaluation &temperature, const Evaluation &Rv) const
 Returns the saturation pressure of the gas phase [Pa] depending on its mass fraction of the oil component. More...
 
template<class Evaluation >
Evaluation diffusionCoefficient (const Evaluation &temperature, const Evaluation &pressure, unsigned compIdx) const
 Calculate the binary molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (kg*m^3)]. More...
 
GasPvtApproach gasPvtApproach () const
 Returns the concrete approach for calculating the PVT relations. More...
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::DryGasPvt, DryGasPvt< Scalar > >::type & getRealPvt ()
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::DryGasPvt, constDryGasPvt< Scalar > >::type & getRealPvt () const
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::DryHumidGasPvt, DryHumidGasPvt< Scalar > >::type & getRealPvt ()
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::DryHumidGasPvt, constDryHumidGasPvt< Scalar > >::type & getRealPvt () const
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::WetHumidGasPvt, WetHumidGasPvt< Scalar > >::type & getRealPvt ()
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::WetHumidGasPvt, constWetHumidGasPvt< Scalar > >::type & getRealPvt () const
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::WetGasPvt, WetGasPvt< Scalar > >::type & getRealPvt ()
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::WetGasPvt, constWetGasPvt< Scalar > >::type & getRealPvt () const
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::ThermalGasPvt, GasPvtThermal< Scalar > >::type & getRealPvt ()
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::ThermalGasPvt, constGasPvtThermal< Scalar > >::type & getRealPvt () const
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::Co2GasPvt, Co2GasPvt< Scalar > >::type & getRealPvt ()
 
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::Co2GasPvt, constCo2GasPvt< Scalar > >::type & getRealPvt () const
 
const void * realGasPvt () const
 
bool operator== (const GasPvtMultiplexer< Scalar, enableThermal > &data) const
 
GasPvtMultiplexer< Scalar, enableThermal > & operator= (const GasPvtMultiplexer< Scalar, enableThermal > &data)
 

Detailed Description

template<class Scalar, bool enableThermal = true>
class Opm::GasPvtMultiplexer< Scalar, enableThermal >

This class represents the Pressure-Volume-Temperature relations of the gas phase in the black-oil model.

This is a multiplexer class which forwards all calls to the real implementation.

Note that, since the main application for this class is the black oil fluid system, the API exposed by this class is pretty specific to the assumptions made by the black oil model.

Constructor & Destructor Documentation

◆ GasPvtMultiplexer() [1/3]

template<class Scalar , bool enableThermal = true>
Opm::GasPvtMultiplexer< Scalar, enableThermal >::GasPvtMultiplexer ( )
inline

References Opm::NoGasPvt.

◆ GasPvtMultiplexer() [2/3]

template<class Scalar , bool enableThermal = true>
Opm::GasPvtMultiplexer< Scalar, enableThermal >::GasPvtMultiplexer ( GasPvtApproach  approach,
void *  realGasPvt 
)
inline

◆ GasPvtMultiplexer() [3/3]

template<class Scalar , bool enableThermal = true>
Opm::GasPvtMultiplexer< Scalar, enableThermal >::GasPvtMultiplexer ( const GasPvtMultiplexer< Scalar, enableThermal > &  data)
inline

◆ ~GasPvtMultiplexer()

template<class Scalar , bool enableThermal = true>
Opm::GasPvtMultiplexer< Scalar, enableThermal >::~GasPvtMultiplexer ( )
inline

Member Function Documentation

◆ diffusionCoefficient()

template<class Scalar , bool enableThermal = true>
template<class Evaluation >
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::diffusionCoefficient ( const Evaluation &  temperature,
const Evaluation &  pressure,
unsigned  compIdx 
) const
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 $\kappa$ is caused by a gradient of the mole fraction and follows the law

\[ J = - D \mathbf{grad} x^\kappa_\alpha \]

where $x_\alpha^\kappa$ is the component's mole fraction in phase $\alpha$, $D$ is the diffusion coefficient and $J$ is the diffusive flux.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

Referenced by Opm::GasPvtThermal< Scalar >::diffusionCoefficient(), and Opm::BlackOilFluidSystem< Scalar, IndexTraits >::diffusionCoefficient().

◆ gasPvtApproach()

template<class Scalar , bool enableThermal = true>
GasPvtApproach Opm::GasPvtMultiplexer< Scalar, enableThermal >::gasPvtApproach ( ) const
inline

Returns the concrete approach for calculating the PVT relations.

(This is only determined at runtime.)

Referenced by Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt(), and Opm::GasPvtMultiplexer< Scalar, enableThermal >::operator==().

◆ gasReferenceDensity()

template<class Scalar , bool enableThermal = true>
const Scalar Opm::GasPvtMultiplexer< Scalar, enableThermal >::gasReferenceDensity ( unsigned  regionIdx)
inline

Return the reference density which are considered by this PVT-object.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

Referenced by Opm::GasPvtThermal< Scalar >::gasReferenceDensity().

◆ getRealPvt() [1/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::DryGasPvt, DryGasPvt< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [2/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::DryHumidGasPvt, DryHumidGasPvt< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [3/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::WetHumidGasPvt, WetHumidGasPvt< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [4/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::WetGasPvt, WetGasPvt< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [5/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::ThermalGasPvt, GasPvtThermal< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [6/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::Co2GasPvt, Co2GasPvt< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [7/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::DryGasPvt, constDryGasPvt< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ getRealPvt() [8/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::DryHumidGasPvt, constDryHumidGasPvt< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ getRealPvt() [9/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::WetHumidGasPvt, constWetHumidGasPvt< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ getRealPvt() [10/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::WetGasPvt, constWetGasPvt< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ getRealPvt() [11/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::ThermalGasPvt, constGasPvtThermal< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ getRealPvt() [12/12]

template<class Scalar , bool enableThermal = true>
template<GasPvtApproach approachV>
std::enable_if< approachV==GasPvtApproach::Co2GasPvt, constCo2GasPvt< Scalar > >::type & Opm::GasPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ initEnd()

template<class Scalar , bool enableThermal = true>
void Opm::GasPvtMultiplexer< Scalar, enableThermal >::initEnd ( )
inline

◆ internalEnergy()

template<class Scalar , bool enableThermal = true>
template<class Evaluation >
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::internalEnergy ( unsigned  regionIdx,
const Evaluation &  temperature,
const Evaluation &  pressure,
const Evaluation &  Rv 
) const
inline

Returns the specific enthalpy [J/kg] of gas given a set of parameters.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

◆ inverseFormationVolumeFactor()

template<class Scalar , bool enableThermal = true>
template<class Evaluation = Scalar>
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::inverseFormationVolumeFactor ( unsigned  regionIdx,
const Evaluation &  temperature,
const Evaluation &  pressure,
const Evaluation &  Rv,
const Evaluation &  Rvw 
) const
inline

Returns the formation volume factor [-] of the fluid phase.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

Referenced by Opm::GasPvtThermal< Scalar >::inverseFormationVolumeFactor().

◆ numRegions()

template<class Scalar , bool enableThermal = true>
unsigned Opm::GasPvtMultiplexer< Scalar, enableThermal >::numRegions ( ) const
inline

Return the number of PVT regions which are considered by this PVT-object.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

◆ operator=()

template<class Scalar , bool enableThermal = true>
GasPvtMultiplexer< Scalar, enableThermal > & Opm::GasPvtMultiplexer< Scalar, enableThermal >::operator= ( const GasPvtMultiplexer< Scalar, enableThermal > &  data)
inline

◆ operator==()

template<class Scalar , bool enableThermal = true>
bool Opm::GasPvtMultiplexer< Scalar, enableThermal >::operator== ( const GasPvtMultiplexer< Scalar, enableThermal > &  data) const
inline

◆ realGasPvt()

template<class Scalar , bool enableThermal = true>
const void * Opm::GasPvtMultiplexer< Scalar, enableThermal >::realGasPvt ( ) const
inline

◆ saturatedInverseFormationVolumeFactor()

template<class Scalar , bool enableThermal = true>
template<class Evaluation = Scalar>
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::saturatedInverseFormationVolumeFactor ( unsigned  regionIdx,
const Evaluation &  temperature,
const Evaluation &  pressure 
) const
inline

Returns the formation volume factor [-] of oil saturated gas given a set of parameters.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

Referenced by Opm::GasPvtThermal< Scalar >::saturatedInverseFormationVolumeFactor().

◆ saturatedOilVaporizationFactor() [1/2]

template<class Scalar , bool enableThermal = true>
template<class Evaluation = Scalar>
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::saturatedOilVaporizationFactor ( unsigned  regionIdx,
const Evaluation &  temperature,
const Evaluation &  pressure 
) const
inline

Returns the oil vaporization factor $R_v$ [m^3/m^3] of oil saturated gas.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

Referenced by Opm::GasPvtThermal< Scalar >::saturatedOilVaporizationFactor().

◆ saturatedOilVaporizationFactor() [2/2]

template<class Scalar , bool enableThermal = true>
template<class Evaluation = Scalar>
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::saturatedOilVaporizationFactor ( unsigned  regionIdx,
const Evaluation &  temperature,
const Evaluation &  pressure,
const Evaluation &  oilSaturation,
const Evaluation &  maxOilSaturation 
) const
inline

Returns the oil vaporization factor $R_v$ [m^3/m^3] of oil saturated gas.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

◆ saturatedViscosity()

template<class Scalar , bool enableThermal = true>
template<class Evaluation = Scalar>
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::saturatedViscosity ( unsigned  regionIdx,
const Evaluation &  temperature,
const Evaluation &  pressure 
) const
inline

Returns the dynamic viscosity [Pa s] of oil saturated gas given a set of parameters.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

Referenced by Opm::GasPvtThermal< Scalar >::saturatedViscosity().

◆ saturatedWaterVaporizationFactor() [1/2]

template<class Scalar , bool enableThermal = true>
template<class Evaluation = Scalar>
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::saturatedWaterVaporizationFactor ( unsigned  regionIdx,
const Evaluation &  temperature,
const Evaluation &  pressure 
) const
inline

Returns the water vaporization factor $R_vw$ [m^3/m^3] of water saturated gas.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

◆ saturatedWaterVaporizationFactor() [2/2]

template<class Scalar , bool enableThermal = true>
template<class Evaluation = Scalar>
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::saturatedWaterVaporizationFactor ( unsigned  regionIdx,
const Evaluation &  temperature,
const Evaluation &  pressure,
const Evaluation &  saltConcentration 
) const
inline

Returns the water vaporization factor $R_vw$ [m^3/m^3] of water saturated gas.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

◆ saturationPressure()

template<class Scalar , bool enableThermal = true>
template<class Evaluation = Scalar>
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::saturationPressure ( unsigned  regionIdx,
const Evaluation &  temperature,
const Evaluation &  Rv 
) const
inline

Returns the saturation pressure of the gas phase [Pa] depending on its mass fraction of the oil component.

Parameters
RvThe surface volume of oil component dissolved in what will yield one cubic meter of gas at the surface [-]

References OPM_GAS_PVT_MULTIPLEXER_CALL.

Referenced by Opm::GasPvtThermal< Scalar >::saturationPressure().

◆ setApproach()

template<class Scalar , bool enableThermal = true>
void Opm::GasPvtMultiplexer< Scalar, enableThermal >::setApproach ( GasPvtApproach  gasPvtAppr)
inline

◆ viscosity()

template<class Scalar , bool enableThermal = true>
template<class Evaluation = Scalar>
Evaluation Opm::GasPvtMultiplexer< Scalar, enableThermal >::viscosity ( unsigned  regionIdx,
const Evaluation &  temperature,
const Evaluation &  pressure,
const Evaluation &  Rv,
const Evaluation &  Rvw 
) const
inline

Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.

References OPM_GAS_PVT_MULTIPLEXER_CALL.

Referenced by Opm::GasPvtThermal< Scalar >::viscosity().


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