Opm::WetGasPvt< Scalar > Class Template Reference

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

#include <WetGasPvt.hpp>

Public Types

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

Public Member Functions

 WetGasPvt ()
 
 WetGasPvt (const std::vector< Scalar > &gasReferenceDensity, const std::vector< Scalar > &oilReferenceDensity, const std::vector< TabulatedTwoDFunction > &inverseGasB, const std::vector< TabulatedOneDFunction > &inverseSaturatedGasB, const std::vector< TabulatedTwoDFunction > &gasMu, const std::vector< TabulatedTwoDFunction > &inverseGasBMu, const std::vector< TabulatedOneDFunction > &inverseSaturatedGasBMu, const std::vector< TabulatedOneDFunction > &saturatedOilVaporizationFactorTable, const std::vector< TabulatedOneDFunction > &saturationPressure, Scalar vapPar1)
 
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 setSaturatedGasOilVaporizationFactor (unsigned regionIdx, const SamplingPoints &samplePoints)
 Initialize the function for the oil vaporization factor $R_v$. More...
 
void setSaturatedGasFormationVolumeFactor (unsigned regionIdx, const SamplingPoints &samplePoints)
 Initialize the function for the gas formation volume factor. More...
 
void setInverseGasFormationVolumeFactor (unsigned regionIdx, const TabulatedTwoDFunction &invBg)
 Initialize the function for the gas formation volume factor. More...
 
void setGasViscosity (unsigned regionIdx, const TabulatedTwoDFunction &mug)
 Initialize the viscosity of the gas phase. More...
 
void setSaturatedGasViscosity (unsigned regionIdx, const SamplingPoints &samplePoints)
 Initialize the phase viscosity for oil saturated gas. More...
 
void initEnd ()
 Finish initializing the gas 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 gas given a set of parameters. More...
 
template<class Evaluation >
Evaluation viscosity (unsigned regionIdx, const Evaluation &, const Evaluation &pressure, const Evaluation &Rv, const Evaluation &) 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 oil saturated gas at a given pressure. More...
 
template<class Evaluation >
Evaluation inverseFormationVolumeFactor (unsigned regionIdx, const Evaluation &, const Evaluation &pressure, const Evaluation &Rv, const Evaluation &) 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 oil saturated gas at a given pressure. More...
 
template<class Evaluation >
Evaluation saturatedWaterVaporizationFactor (unsigned, const Evaluation &, const Evaluation &) const
 Returns the water vaporization factor $R_vw$ [m^3/m^3] of the gasphase. More...
 
template<class Evaluation = Scalar>
Evaluation saturatedWaterVaporizationFactor (unsigned, const Evaluation &, const Evaluation &, const Evaluation &) const
 Returns the water vaporization factor $R_vw$ [m^3/m^3] of water saturated gas. More...
 
template<class Evaluation >
Evaluation saturatedOilVaporizationFactor (unsigned regionIdx, const Evaluation &, const Evaluation &pressure) const
 Returns the oil vaporization factor $R_v$ [m^3/m^3] of the gas phase. More...
 
template<class Evaluation >
Evaluation saturatedOilVaporizationFactor (unsigned regionIdx, const Evaluation &, const Evaluation &pressure, const Evaluation &oilSaturation, Evaluation maxOilSaturation) const
 Returns the oil vaporization factor $R_v$ [m^3/m^3] of the gas phase. More...
 
template<class Evaluation >
Evaluation saturationPressure (unsigned regionIdx, const Evaluation &, const Evaluation &Rv) const
 Returns the saturation pressure of the gas phase [Pa] depending on its mass fraction of the oil 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 > & inverseGasB () const
 
const std::vector< TabulatedOneDFunction > & inverseSaturatedGasB () const
 
const std::vector< TabulatedTwoDFunction > & gasMu () const
 
const std::vector< TabulatedTwoDFunction > & inverseGasBMu () const
 
const std::vector< TabulatedOneDFunction > & inverseSaturatedGasBMu () const
 
const std::vector< TabulatedOneDFunction > & saturatedOilVaporizationFactorTable () const
 
const std::vector< TabulatedOneDFunction > & saturationPressure () const
 
Scalar vapPar1 () const
 
bool operator== (const WetGasPvt< Scalar > &data) const
 

Detailed Description

template<class Scalar>
class Opm::WetGasPvt< Scalar >

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

Member Typedef Documentation

◆ TabulatedOneDFunction

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

◆ TabulatedTwoDFunction

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

Constructor & Destructor Documentation

◆ WetGasPvt() [1/2]

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

◆ WetGasPvt() [2/2]

template<class Scalar >
Opm::WetGasPvt< Scalar >::WetGasPvt ( const std::vector< Scalar > &  gasReferenceDensity,
const std::vector< Scalar > &  oilReferenceDensity,
const std::vector< TabulatedTwoDFunction > &  inverseGasB,
const std::vector< TabulatedOneDFunction > &  inverseSaturatedGasB,
const std::vector< TabulatedTwoDFunction > &  gasMu,
const std::vector< TabulatedTwoDFunction > &  inverseGasBMu,
const std::vector< TabulatedOneDFunction > &  inverseSaturatedGasBMu,
const std::vector< TabulatedOneDFunction > &  saturatedOilVaporizationFactorTable,
const std::vector< TabulatedOneDFunction > &  saturationPressure,
Scalar  vapPar1 
)
inline

Member Function Documentation

◆ diffusionCoefficient()

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

◆ gasMu()

template<class Scalar >
const std::vector< TabulatedTwoDFunction > & Opm::WetGasPvt< Scalar >::gasMu ( ) const
inline

◆ gasReferenceDensity()

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

◆ initEnd()

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

Finish initializing the gas phase PVT properties.

References Opm::WetGasPvt< Scalar >::gasMu(), and Opm::WetGasPvt< Scalar >::numRegions().

◆ internalEnergy()

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

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

◆ inverseFormationVolumeFactor()

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

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

◆ inverseGasB()

template<class Scalar >
const std::vector< TabulatedTwoDFunction > & Opm::WetGasPvt< Scalar >::inverseGasB ( ) const
inline

◆ inverseGasBMu()

template<class Scalar >
const std::vector< TabulatedTwoDFunction > & Opm::WetGasPvt< Scalar >::inverseGasBMu ( ) const
inline

◆ inverseSaturatedGasB()

template<class Scalar >
const std::vector< TabulatedOneDFunction > & Opm::WetGasPvt< Scalar >::inverseSaturatedGasB ( ) const
inline

◆ inverseSaturatedGasBMu()

template<class Scalar >
const std::vector< TabulatedOneDFunction > & Opm::WetGasPvt< Scalar >::inverseSaturatedGasBMu ( ) const
inline

◆ numRegions()

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

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

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

◆ oilReferenceDensity()

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

◆ operator==()

◆ saturatedInverseFormationVolumeFactor()

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

Returns the formation volume factor [-] of oil saturated gas at a given pressure.

◆ saturatedOilVaporizationFactor() [1/2]

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

Returns the oil vaporization factor $R_v$ [m^3/m^3] of the gas phase.

◆ saturatedOilVaporizationFactor() [2/2]

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

Returns the oil vaporization factor $R_v$ [m^3/m^3] of the gas 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().

◆ saturatedOilVaporizationFactorTable()

template<class Scalar >
const std::vector< TabulatedOneDFunction > & Opm::WetGasPvt< Scalar >::saturatedOilVaporizationFactorTable ( ) const
inline

◆ saturatedViscosity()

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

Returns the dynamic viscosity [Pa s] of oil saturated gas at a given pressure.

◆ saturatedWaterVaporizationFactor() [1/2]

template<class Scalar >
template<class Evaluation >
Evaluation Opm::WetGasPvt< Scalar >::saturatedWaterVaporizationFactor ( unsigned  ,
const Evaluation &  ,
const Evaluation &   
) const
inline

Returns the water vaporization factor $R_vw$ [m^3/m^3] of the gasphase.

◆ saturatedWaterVaporizationFactor() [2/2]

template<class Scalar >
template<class Evaluation = Scalar>
Evaluation Opm::WetGasPvt< Scalar >::saturatedWaterVaporizationFactor ( unsigned  ,
const Evaluation &  ,
const Evaluation &  ,
const Evaluation &   
) const
inline

Returns the water vaporization factor $R_vw$ [m^3/m^3] of water saturated gas.

◆ saturationPressure() [1/2]

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

◆ saturationPressure() [2/2]

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

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

This method uses the standard blackoil assumptions: This means that the Rv value does not depend on the saturation of oil. (cf. the Eclipse VAPPARS keyword.)

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

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

Referenced by Opm::WetGasPvt< Scalar >::operator==().

◆ setGasViscosity()

template<class Scalar >
void Opm::WetGasPvt< Scalar >::setGasViscosity ( unsigned  regionIdx,
const TabulatedTwoDFunction mug 
)
inline

Initialize the viscosity of the gas phase.

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

◆ setInverseGasFormationVolumeFactor()

template<class Scalar >
void Opm::WetGasPvt< Scalar >::setInverseGasFormationVolumeFactor ( unsigned  regionIdx,
const TabulatedTwoDFunction invBg 
)
inline

Initialize the function for the gas formation volume factor.

The gas formation volume factor $B_g$ is a function of $(p_g, X_g^O)$ and represents the partial density of the oil component in the gas phase at a given pressure.

This method sets $1/B_g(R_v, p_g)$. Note that instead of the mass fraction of the oil component in the gas 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::WetGasPvt< Scalar >::setNumRegions ( size_t  numRegions)
inline

◆ setReferenceDensities()

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

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

◆ setSaturatedGasFormationVolumeFactor()

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

Initialize the function for the gas formation volume factor.

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

References Opm::Tabulated1DFunction< Scalar >::eval(), Opm::WetGasPvt< Scalar >::saturationPressure(), and Opm::Tabulated1DFunction< Scalar >::setContainerOfTuples().

◆ setSaturatedGasOilVaporizationFactor()

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

Initialize the function for the oil vaporization factor $R_v$.

Parameters
samplePointsA container of (x,y) values.

◆ setSaturatedGasViscosity()

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

Initialize the phase viscosity for oil saturated gas.

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

References Opm::Tabulated1DFunction< Scalar >::eval(), and Opm::Tabulated1DFunction< Scalar >::setContainerOfTuples().

◆ vapPar1()

template<class Scalar >
Scalar Opm::WetGasPvt< Scalar >::vapPar1 ( ) const
inline

◆ viscosity()

template<class Scalar >
template<class Evaluation >
Evaluation Opm::WetGasPvt< Scalar >::viscosity ( unsigned  regionIdx,
const Evaluation &  ,
const Evaluation &  pressure,
const Evaluation &  Rv,
const Evaluation &   
) 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: