My Project
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 (OilPvtApproach approach, void *realOilPvt)
 
 OilPvtMultiplexer (const OilPvtMultiplexer< Scalar, enableThermal > &data)
 
void initEnd ()
 
unsigned numRegions () const
 Return the number of PVT regions which are considered by this PVT-object.
 
const Scalar oilReferenceDensity (unsigned regionIdx) const
 Return the reference density which are considered by this PVT-object.
 
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.
 
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.
 
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.
 
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.
 
template<class Evaluation >
Evaluation saturatedInverseFormationVolumeFactor (unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
 Returns the formation volume factor [-] of the fluid phase.
 
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.
 
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.
 
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, const LiveOilPvt< 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, const DeadOilPvt< 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, const ConstantCompressibilityOilPvt< 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, const OilPvtThermal< 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, const BrineCo2Pvt< 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.

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.)

◆ 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.

◆ 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...


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