Loading...
Searching...
No Matches
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)
bool | mixingEnergy () const
void | initEnd ()
unsigned | numRegions () const
| Return the number of PVT regions which are considered by this PVT-object.
void | setVapPars (const Scalar par1, const Scalar par2)
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.
Scalar | hVap (unsigned regionIdx) const
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 [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 [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.
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)].
void | setApproach (OilPvtApproach appr)
OilPvtApproach | approach () const
| Returns the concrete approach for calculating the PVT relations.
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::LiveOil, LiveOilPvt< Scalar > >::type & | getRealPvt ()
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::LiveOil, constLiveOilPvt< Scalar > >::type & | getRealPvt () const
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::DeadOil, DeadOilPvt< Scalar > >::type & | getRealPvt ()
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::DeadOil, constDeadOilPvt< Scalar > >::type & | getRealPvt () const
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ConstantCompressibilityOil, ConstantCompressibilityOilPvt< Scalar > >::type & | getRealPvt ()
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ConstantCompressibilityOil, constConstantCompressibilityOilPvt< Scalar > >::type & | getRealPvt () const
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ThermalOil, OilPvtThermal< Scalar > >::type & | getRealPvt ()
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::ThermalOil, constOilPvtThermal< Scalar > >::type & | getRealPvt () const
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::BrineCo2, BrineCo2Pvt< Scalar > >::type & | getRealPvt ()
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::BrineCo2, constBrineCo2Pvt< Scalar > >::type & | getRealPvt () const
const void * | realOilPvt () const
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::BrineH2, BrineH2Pvt< Scalar > >::type & | getRealPvt ()
template<OilPvtApproach approachV>
std::enable_if< approachV==OilPvtApproach::BrineH2, constBrineH2Pvt< Scalar > >::type & | getRealPvt () 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 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.

## 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 files:

- opm/material/fluidsystems/blackoilpvt/OilPvtMultiplexer.hpp
- opm/material/fluidsystems/blackoilpvt/OilPvtMultiplexer.cpp