Opm::LiveOilPvt< Scalar > Class Template Reference

This class represents the Pressure-Volume-Temperature relations of the oil phas with dissolved gas. More...

#include <LiveOilPvt.hpp>

Public Types

using TabulatedTwoDFunction = UniformXTabulated2DFunction< Scalar >
 
using TabulatedOneDFunction = Tabulated1DFunction< Scalar >
 

Public Member Functions

 LiveOilPvt ()
 
 LiveOilPvt (const std::vector< Scalar > &gasReferenceDensity, const std::vector< Scalar > &oilReferenceDensity, const std::vector< TabulatedTwoDFunction > &inverseOilBTable, const std::vector< TabulatedTwoDFunction > &oilMuTable, const std::vector< TabulatedTwoDFunction > &inverseOilBMuTable, const std::vector< TabulatedOneDFunction > &saturatedOilMuTable, const std::vector< TabulatedOneDFunction > &inverseSaturatedOilBTable, const std::vector< TabulatedOneDFunction > &inverseSaturatedOilBMuTable, const std::vector< TabulatedOneDFunction > &saturatedGasDissolutionFactorTable, const std::vector< TabulatedOneDFunction > &saturationPressure, Scalar vapPar2)
 
void setNumRegions (size_t numRegions)
 
void setReferenceDensities (unsigned regionIdx, Scalar rhoRefOil, Scalar rhoRefGas, Scalar)
 Initialize the reference densities of all fluids for a given PVT region. More...
 
void setSaturatedOilGasDissolutionFactor (unsigned regionIdx, const SamplingPoints &samplePoints)
 Initialize the function for the gas dissolution factor $R_s$. More...
 
void setSaturatedOilFormationVolumeFactor (unsigned regionIdx, const SamplingPoints &samplePoints)
 Initialize the function for the oil formation volume factor. More...
 
void setInverseOilFormationVolumeFactor (unsigned regionIdx, const TabulatedTwoDFunction &invBo)
 Initialize the function for the oil formation volume factor. More...
 
void setOilViscosity (unsigned regionIdx, const TabulatedTwoDFunction &muo)
 Initialize the viscosity of the oil phase. More...
 
void setSaturatedOilViscosity (unsigned regionIdx, const SamplingPoints &samplePoints)
 Initialize the phase viscosity for gas saturated oil. More...
 
void initEnd ()
 Finish initializing the oil phase PVT properties. More...
 
unsigned numRegions () const
 Return the number of PVT regions which are considered by this PVT-object. More...
 
template<class Evaluation >
Evaluation internalEnergy (unsigned, const Evaluation &, const Evaluation &, const Evaluation &) const
 Returns the specific enthalpy [J/kg] of oil given a set of parameters. More...
 
template<class Evaluation >
Evaluation viscosity (unsigned regionIdx, const Evaluation &, 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 &, 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 &, 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 &, const Evaluation &pressure) const
 Returns the formation volume factor [-] of the fluid phase. More...
 
template<class Evaluation >
Evaluation saturatedGasDissolutionFactor (unsigned regionIdx, const Evaluation &, const Evaluation &pressure) const
 Returns the gas dissolution factor $R_s$ [m^3/m^3] of the oil phase. More...
 
template<class Evaluation >
Evaluation saturatedGasDissolutionFactor (unsigned regionIdx, const Evaluation &, const Evaluation &pressure, const Evaluation &oilSaturation, Evaluation maxOilSaturation) const
 Returns the gas dissolution factor $R_s$ [m^3/m^3] of the oil phase. More...
 
template<class Evaluation >
Evaluation saturationPressure (unsigned regionIdx, const Evaluation &, const Evaluation &Rs) const
 Returns the saturation pressure of the oil phase [Pa] depending on its mass fraction of the gas component. More...
 
template<class Evaluation >
Evaluation diffusionCoefficient (const Evaluation &, const Evaluation &, unsigned) const
 
const Scalar gasReferenceDensity (unsigned regionIdx) const
 
const Scalar oilReferenceDensity (unsigned regionIdx) const
 
const std::vector< TabulatedTwoDFunction > & inverseOilBTable () const
 
const std::vector< TabulatedTwoDFunction > & oilMuTable () const
 
const std::vector< TabulatedTwoDFunction > & inverseOilBMuTable () const
 
const std::vector< TabulatedOneDFunction > & saturatedOilMuTable () const
 
const std::vector< TabulatedOneDFunction > & inverseSaturatedOilBTable () const
 
const std::vector< TabulatedOneDFunction > & inverseSaturatedOilBMuTable () const
 
const std::vector< TabulatedOneDFunction > & saturatedGasDissolutionFactorTable () const
 
const std::vector< TabulatedOneDFunction > & saturationPressure () const
 
Scalar vapPar2 () const
 
bool operator== (const LiveOilPvt< Scalar > &data) const
 

Detailed Description

template<class Scalar>
class Opm::LiveOilPvt< Scalar >

This class represents the Pressure-Volume-Temperature relations of the oil phas with dissolved gas.

Member Typedef Documentation

◆ TabulatedOneDFunction

template<class Scalar >
using Opm::LiveOilPvt< Scalar >::TabulatedOneDFunction = Tabulated1DFunction<Scalar>

◆ TabulatedTwoDFunction

template<class Scalar >
using Opm::LiveOilPvt< Scalar >::TabulatedTwoDFunction = UniformXTabulated2DFunction<Scalar>

Constructor & Destructor Documentation

◆ LiveOilPvt() [1/2]

template<class Scalar >
Opm::LiveOilPvt< Scalar >::LiveOilPvt ( )
inline

◆ LiveOilPvt() [2/2]

template<class Scalar >
Opm::LiveOilPvt< Scalar >::LiveOilPvt ( const std::vector< Scalar > &  gasReferenceDensity,
const std::vector< Scalar > &  oilReferenceDensity,
const std::vector< TabulatedTwoDFunction > &  inverseOilBTable,
const std::vector< TabulatedTwoDFunction > &  oilMuTable,
const std::vector< TabulatedTwoDFunction > &  inverseOilBMuTable,
const std::vector< TabulatedOneDFunction > &  saturatedOilMuTable,
const std::vector< TabulatedOneDFunction > &  inverseSaturatedOilBTable,
const std::vector< TabulatedOneDFunction > &  inverseSaturatedOilBMuTable,
const std::vector< TabulatedOneDFunction > &  saturatedGasDissolutionFactorTable,
const std::vector< TabulatedOneDFunction > &  saturationPressure,
Scalar  vapPar2 
)
inline

Member Function Documentation

◆ diffusionCoefficient()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::LiveOilPvt< Scalar >::diffusionCoefficient ( const Evaluation &  ,
const Evaluation &  ,
unsigned   
) const
inline

◆ gasReferenceDensity()

template<class Scalar >
const Scalar Opm::LiveOilPvt< Scalar >::gasReferenceDensity ( unsigned  regionIdx) const
inline

◆ initEnd()

template<class Scalar >
void Opm::LiveOilPvt< Scalar >::initEnd ( )
inline

Finish initializing the oil phase PVT properties.

References Opm::LiveOilPvt< Scalar >::numRegions().

◆ internalEnergy()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::LiveOilPvt< Scalar >::internalEnergy ( unsigned  ,
const Evaluation &  ,
const Evaluation &  ,
const Evaluation &   
) const
inline

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

◆ inverseFormationVolumeFactor()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::LiveOilPvt< Scalar >::inverseFormationVolumeFactor ( unsigned  regionIdx,
const Evaluation &  ,
const Evaluation &  pressure,
const Evaluation &  Rs 
) const
inline

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

◆ inverseOilBMuTable()

template<class Scalar >
const std::vector< TabulatedTwoDFunction > & Opm::LiveOilPvt< Scalar >::inverseOilBMuTable ( ) const
inline

◆ inverseOilBTable()

template<class Scalar >
const std::vector< TabulatedTwoDFunction > & Opm::LiveOilPvt< Scalar >::inverseOilBTable ( ) const
inline

◆ inverseSaturatedOilBMuTable()

template<class Scalar >
const std::vector< TabulatedOneDFunction > & Opm::LiveOilPvt< Scalar >::inverseSaturatedOilBMuTable ( ) const
inline

◆ inverseSaturatedOilBTable()

template<class Scalar >
const std::vector< TabulatedOneDFunction > & Opm::LiveOilPvt< Scalar >::inverseSaturatedOilBTable ( ) const
inline

◆ numRegions()

template<class Scalar >
unsigned Opm::LiveOilPvt< Scalar >::numRegions ( ) const
inline

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

Referenced by Opm::LiveOilPvt< Scalar >::initEnd(), and Opm::LiveOilPvt< Scalar >::setNumRegions().

◆ oilMuTable()

template<class Scalar >
const std::vector< TabulatedTwoDFunction > & Opm::LiveOilPvt< Scalar >::oilMuTable ( ) const
inline

◆ oilReferenceDensity()

template<class Scalar >
const Scalar Opm::LiveOilPvt< Scalar >::oilReferenceDensity ( unsigned  regionIdx) const
inline

◆ operator==()

◆ saturatedGasDissolutionFactor() [1/2]

template<class Scalar >
template<class Evaluation >
Evaluation Opm::LiveOilPvt< Scalar >::saturatedGasDissolutionFactor ( unsigned  regionIdx,
const Evaluation &  ,
const Evaluation &  pressure 
) const
inline

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

Referenced by Opm::LiveOilPvt< Scalar >::setSaturatedOilFormationVolumeFactor(), and Opm::LiveOilPvt< Scalar >::setSaturatedOilViscosity().

◆ saturatedGasDissolutionFactor() [2/2]

template<class Scalar >
template<class Evaluation >
Evaluation Opm::LiveOilPvt< Scalar >::saturatedGasDissolutionFactor ( unsigned  regionIdx,
const Evaluation &  ,
const Evaluation &  pressure,
const Evaluation &  oilSaturation,
Evaluation  maxOilSaturation 
) const
inline

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

This variant of the method prevents all the oil to be vaporized even if the gas phase is still not saturated. This is physically quite dubious but it corresponds to how the Eclipse 100 simulator handles this. (cf the VAPPARS keyword.)

References Opm::max(), Opm::min(), and Opm::pow().

◆ saturatedGasDissolutionFactorTable()

template<class Scalar >
const std::vector< TabulatedOneDFunction > & Opm::LiveOilPvt< Scalar >::saturatedGasDissolutionFactorTable ( ) const
inline

◆ saturatedInverseFormationVolumeFactor()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::LiveOilPvt< Scalar >::saturatedInverseFormationVolumeFactor ( unsigned  regionIdx,
const Evaluation &  ,
const Evaluation &  pressure 
) const
inline

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

◆ saturatedOilMuTable()

template<class Scalar >
const std::vector< TabulatedOneDFunction > & Opm::LiveOilPvt< Scalar >::saturatedOilMuTable ( ) const
inline

◆ saturatedViscosity()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::LiveOilPvt< Scalar >::saturatedViscosity ( unsigned  regionIdx,
const Evaluation &  ,
const Evaluation &  pressure 
) const
inline

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

◆ saturationPressure() [1/2]

template<class Scalar >
const std::vector< TabulatedOneDFunction > & Opm::LiveOilPvt< Scalar >::saturationPressure ( ) const
inline

◆ saturationPressure() [2/2]

template<class Scalar >
template<class Evaluation >
Evaluation Opm::LiveOilPvt< Scalar >::saturationPressure ( unsigned  regionIdx,
const Evaluation &  ,
const Evaluation &  Rs 
) const
inline

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

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

References Opm::abs(), and Opm::scalarValue().

◆ setInverseOilFormationVolumeFactor()

template<class Scalar >
void Opm::LiveOilPvt< Scalar >::setInverseOilFormationVolumeFactor ( unsigned  regionIdx,
const TabulatedTwoDFunction invBo 
)
inline

Initialize the function for the oil formation volume factor.

The oil formation volume factor $B_o$ is a function of $(p_o, X_o^G)$ and represents the partial density of the oil component in the oil phase at a given pressure.

This method sets $1/B_o(R_s, p_o)$. Note that instead of the mass fraction of the gas component in the oil phase, this function depends on the gas dissolution factor. Also note, that the order of the arguments needs to be $(R_s, p_o)$ and not the other way around.

◆ setNumRegions()

template<class Scalar >
void Opm::LiveOilPvt< Scalar >::setNumRegions ( size_t  numRegions)
inline

◆ setOilViscosity()

template<class Scalar >
void Opm::LiveOilPvt< Scalar >::setOilViscosity ( unsigned  regionIdx,
const TabulatedTwoDFunction muo 
)
inline

Initialize the viscosity of the oil phase.

This is a function of $(R_s, p_o)$...

◆ setReferenceDensities()

template<class Scalar >
void Opm::LiveOilPvt< Scalar >::setReferenceDensities ( unsigned  regionIdx,
Scalar  rhoRefOil,
Scalar  rhoRefGas,
Scalar   
)
inline

Initialize the reference densities of all fluids for a given PVT region.

◆ setSaturatedOilFormationVolumeFactor()

template<class Scalar >
void Opm::LiveOilPvt< Scalar >::setSaturatedOilFormationVolumeFactor ( unsigned  regionIdx,
const SamplingPoints &  samplePoints 
)
inline

Initialize the function for the oil formation volume factor.

The oil formation volume factor $B_o$ is a function of $(p_o, X_o^G)$ and represents the partial density of the oil component in the oil phase at a given pressure. This method only requires the volume factor of gas-saturated oil (which only depends on pressure) while the dependence on the gas mass fraction is guesstimated.

References Opm::LiveOilPvt< Scalar >::saturatedGasDissolutionFactor().

◆ setSaturatedOilGasDissolutionFactor()

template<class Scalar >
void Opm::LiveOilPvt< Scalar >::setSaturatedOilGasDissolutionFactor ( unsigned  regionIdx,
const SamplingPoints &  samplePoints 
)
inline

Initialize the function for the gas dissolution factor $R_s$.

Parameters
samplePointsA container of (x,y) values.

◆ setSaturatedOilViscosity()

template<class Scalar >
void Opm::LiveOilPvt< Scalar >::setSaturatedOilViscosity ( unsigned  regionIdx,
const SamplingPoints &  samplePoints 
)
inline

Initialize the phase viscosity for gas saturated oil.

The oil viscosity is a function of $(p_o, X_o^G)$, but this method only requires the viscosity of gas-saturated oil (which only depends on pressure) while there is assumed to be no dependence on the gas mass fraction...

References Opm::LiveOilPvt< Scalar >::saturatedGasDissolutionFactor().

◆ vapPar2()

template<class Scalar >
Scalar Opm::LiveOilPvt< Scalar >::vapPar2 ( ) const
inline

◆ viscosity()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::LiveOilPvt< Scalar >::viscosity ( unsigned  regionIdx,
const Evaluation &  ,
const Evaluation &  pressure,
const Evaluation &  Rs 
) const
inline

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


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