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 Types

enum  OilPvtApproach {
  NoOilPvt, LiveOilPvt, DeadOilPvt, ConstantCompressibilityOilPvt,
  ThermalOilPvt
}
 
typedef Opm::OilPvtThermal< Scalar > OilPvtThermal
 

Public Member Functions

void initEnd ()
 
unsigned numRegions () const
 Return the number of PVT regions which are considered by this PVT-object.
 
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, Scalar 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...
 
void setApproach (OilPvtApproach appr)
 
OilPvtApproach approach () const
 Returns the concrete approach for calculating the PVT relations. More...
 
template<OilPvtApproach approachV>
std::enable_if< approachV==LiveOilPvt, Opm::LiveOilPvt< Scalar > >::type & getRealPvt ()
 
template<OilPvtApproach approachV>
std::enable_if< approachV==LiveOilPvt, const Opm::LiveOilPvt< Scalar > >::type & getRealPvt () const
 
template<OilPvtApproach approachV>
std::enable_if< approachV==DeadOilPvt, Opm::DeadOilPvt< Scalar > >::type & getRealPvt ()
 
template<OilPvtApproach approachV>
std::enable_if< approachV==DeadOilPvt, const Opm::DeadOilPvt< Scalar > >::type & getRealPvt () const
 
template<OilPvtApproach approachV>
std::enable_if< approachV==ConstantCompressibilityOilPvt, Opm::ConstantCompressibilityOilPvt< Scalar > >::type & getRealPvt ()
 
template<OilPvtApproach approachV>
std::enable_if< approachV==ConstantCompressibilityOilPvt, const Opm::ConstantCompressibilityOilPvt< Scalar > >::type & getRealPvt () const
 
template<OilPvtApproach approachV>
std::enable_if< approachV==ThermalOilPvt, Opm::OilPvtThermal< Scalar > >::type & getRealPvt ()
 
template<OilPvtApproach approachV>
std::enable_if< approachV==ThermalOilPvt, const Opm::OilPvtThermal< Scalar > >::type & getRealPvt () const
 

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

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