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

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

#include <OilPvtMultiplexer.hpp>

Public Member Functions

 OilPvtMultiplexer ()
 
 OilPvtMultiplexer (OilPvtApproach approach, void *realOilPvt)
 
 OilPvtMultiplexer (const OilPvtMultiplexer< Scalar, enableThermal > &data)
 
 ~OilPvtMultiplexer ()
 
void initEnd ()
 
unsigned numRegions () const
 Return the number of PVT regions which are considered by this PVT-object. More...
 
const Scalar oilReferenceDensity (unsigned regionIdx) const
 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 &Rs) const
 Returns the specific enthalpy [J/kg] oil given a set of parameters. More...
 
template<class Evaluation >
Evaluation viscosity (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
 Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters. More...
 
template<class Evaluation >
Evaluation saturatedViscosity (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
 Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters. More...
 
template<class Evaluation >
Evaluation inverseFormationVolumeFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
 Returns the formation volume factor [-] of the fluid phase. More...
 
template<class Evaluation >
Evaluation saturatedInverseFormationVolumeFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
 Returns the formation volume factor [-] of the fluid phase. More...
 
template<class Evaluation >
Evaluation saturatedGasDissolutionFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
 Returns the gas dissolution factor $R_s$ [m^3/m^3] of saturated oil. More...
 
template<class Evaluation >
Evaluation saturatedGasDissolutionFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &oilSaturation, const Evaluation &maxOilSaturation) const
 Returns the gas dissolution factor $R_s$ [m^3/m^3] of saturated oil. More...
 
template<class Evaluation >
Evaluation saturationPressure (unsigned regionIdx, const Evaluation &temperature, const Evaluation &Rs) const
 Returns the saturation pressure [Pa] of oil given the mass fraction of the gas component in the oil phase. 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...
 
void setApproach (OilPvtApproach appr)
 
OilPvtApproach approach () const
 Returns the concrete approach for calculating the PVT relations. More...
 
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::LiveOilPvt, LiveOilPvt< Scalar > >::type & getRealPvt ()
 
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::LiveOilPvt, constLiveOilPvt< Scalar > >::type & getRealPvt () const
 
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::DeadOilPvt, DeadOilPvt< Scalar > >::type & getRealPvt ()
 
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::DeadOilPvt, constDeadOilPvt< Scalar > >::type & getRealPvt () const
 
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ConstantCompressibilityOilPvt, ConstantCompressibilityOilPvt< Scalar > >::type & getRealPvt ()
 
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ConstantCompressibilityOilPvt, constConstantCompressibilityOilPvt< Scalar > >::type & getRealPvt () const
 
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ThermalOilPvt, OilPvtThermal< Scalar > >::type & getRealPvt ()
 
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ThermalOilPvt, constOilPvtThermal< Scalar > >::type & getRealPvt () const
 
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::BrineCo2Pvt, BrineCo2Pvt< Scalar > >::type & getRealPvt ()
 
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::BrineCo2Pvt, constBrineCo2Pvt< Scalar > >::type & getRealPvt () const
 
const void * realOilPvt () const
 
bool operator== (const OilPvtMultiplexer< Scalar, enableThermal > &data) const
 
OilPvtMultiplexer< Scalar, enableThermal > & operator= (const OilPvtMultiplexer< Scalar, enableThermal > &data)
 

Detailed Description

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

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

This is the base class which which provides an API for the actual PVT implementation classes which based on dynamic polymorphism. The rationale to use dynamic polymorphism here is that this enables the fluid system to easily switch the used PVT relations for the individual fluid phases.

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

Constructor & Destructor Documentation

◆ OilPvtMultiplexer() [1/3]

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

References Opm::NoOilPvt.

◆ OilPvtMultiplexer() [2/3]

template<class Scalar , bool enableThermal = true>
Opm::OilPvtMultiplexer< Scalar, enableThermal >::OilPvtMultiplexer ( OilPvtApproach  approach,
void *  realOilPvt 
)
inline

◆ OilPvtMultiplexer() [3/3]

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

◆ ~OilPvtMultiplexer()

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

Member Function Documentation

◆ approach()

template<class Scalar , bool enableThermal = true>
OilPvtApproach Opm::OilPvtMultiplexer< Scalar, enableThermal >::approach ( ) const
inline

Returns the concrete approach for calculating the PVT relations.

(This is only determined at runtime.)

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

◆ diffusionCoefficient()

template<class Scalar , bool enableThermal = true>
template<class Evaluation >
Evaluation Opm::OilPvtMultiplexer< 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_OIL_PVT_MULTIPLEXER_CALL.

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

◆ getRealPvt() [1/10]

template<class Scalar , bool enableThermal = true>
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::LiveOilPvt, LiveOilPvt< Scalar > >::type & Opm::OilPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [2/10]

template<class Scalar , bool enableThermal = true>
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::DeadOilPvt, DeadOilPvt< Scalar > >::type & Opm::OilPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [3/10]

template<class Scalar , bool enableThermal = true>
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ConstantCompressibilityOilPvt, ConstantCompressibilityOilPvt< Scalar > >::type & Opm::OilPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [4/10]

template<class Scalar , bool enableThermal = true>
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ThermalOilPvt, OilPvtThermal< Scalar > >::type & Opm::OilPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [5/10]

template<class Scalar , bool enableThermal = true>
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::BrineCo2Pvt, BrineCo2Pvt< Scalar > >::type & Opm::OilPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( )
inline

◆ getRealPvt() [6/10]

template<class Scalar , bool enableThermal = true>
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::LiveOilPvt, constLiveOilPvt< Scalar > >::type & Opm::OilPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ getRealPvt() [7/10]

template<class Scalar , bool enableThermal = true>
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::DeadOilPvt, constDeadOilPvt< Scalar > >::type & Opm::OilPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ getRealPvt() [8/10]

template<class Scalar , bool enableThermal = true>
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ConstantCompressibilityOilPvt, constConstantCompressibilityOilPvt< Scalar > >::type & Opm::OilPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ getRealPvt() [9/10]

template<class Scalar , bool enableThermal = true>
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ThermalOilPvt, constOilPvtThermal< Scalar > >::type & Opm::OilPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ getRealPvt() [10/10]

template<class Scalar , bool enableThermal = true>
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::BrineCo2Pvt, constBrineCo2Pvt< Scalar > >::type & Opm::OilPvtMultiplexer< Scalar, enableThermal >::getRealPvt ( ) const
inline

◆ initEnd()

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

◆ internalEnergy()

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

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

References OPM_OIL_PVT_MULTIPLEXER_CALL.

◆ inverseFormationVolumeFactor()

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

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

References OPM_OIL_PVT_MULTIPLEXER_CALL.

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

◆ numRegions()

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

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

References OPM_OIL_PVT_MULTIPLEXER_CALL.

◆ oilReferenceDensity()

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

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

References OPM_OIL_PVT_MULTIPLEXER_CALL.

Referenced by Opm::OilPvtThermal< Scalar >::oilReferenceDensity().

◆ operator=()

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

◆ operator==()

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

◆ realOilPvt()

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

◆ saturatedGasDissolutionFactor() [1/2]

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

Returns the gas dissolution factor $R_s$ [m^3/m^3] of saturated oil.

References OPM_OIL_PVT_MULTIPLEXER_CALL.

Referenced by Opm::OilPvtThermal< Scalar >::saturatedGasDissolutionFactor().

◆ saturatedGasDissolutionFactor() [2/2]

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

Returns the gas dissolution factor $R_s$ [m^3/m^3] of saturated oil.

References OPM_OIL_PVT_MULTIPLEXER_CALL.

◆ saturatedInverseFormationVolumeFactor()

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

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

References OPM_OIL_PVT_MULTIPLEXER_CALL.

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

◆ saturatedViscosity()

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

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

References OPM_OIL_PVT_MULTIPLEXER_CALL.

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

◆ saturationPressure()

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

Returns the saturation pressure [Pa] of oil given the mass fraction of the gas component in the oil phase.

Calling this method only makes sense for live oil. All other implementations of the black-oil PVT interface will just throw an exception...

References OPM_OIL_PVT_MULTIPLEXER_CALL.

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

◆ setApproach()

template<class Scalar , bool enableThermal = true>
void Opm::OilPvtMultiplexer< Scalar, enableThermal >::setApproach ( OilPvtApproach  appr)
inline

◆ viscosity()

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

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

References OPM_OIL_PVT_MULTIPLEXER_CALL.

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


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