27#ifndef OPM_DRY_GAS_PVT_HPP
28#define OPM_DRY_GAS_PVT_HPP
47template <
class Scalar>
50 using SamplingPoints = std::vector<std::pair<Scalar, Scalar>>;
66 void setVapPars(
const Scalar,
const Scalar)
78 gasReferenceDensity_[regionIdx] = rhoRefGas;
96 { gasMu_[regionIdx] = mug; }
104 const SamplingPoints& samplePoints);
115 {
return gasReferenceDensity_.size(); }
120 template <
class Evaluation>
125 const Evaluation&)
const
127 throw std::runtime_error(
"Requested the enthalpy of gas but the thermal option is not enabled");
133 template <
class Evaluation>
135 const Evaluation& temperature,
136 const Evaluation& pressure,
138 const Evaluation& )
const
144 template <
class Evaluation>
147 const Evaluation& pressure)
const
149 const Evaluation& invBg = inverseGasB_[regionIdx].eval(pressure,
true);
150 const Evaluation& invMugBg = inverseGasBMu_[regionIdx].eval(pressure,
true);
152 return invBg/invMugBg;
158 template <
class Evaluation>
160 const Evaluation& temperature,
161 const Evaluation& pressure,
163 const Evaluation& )
const
169 template <
class Evaluation>
172 const Evaluation& pressure)
const
173 {
return inverseGasB_[regionIdx].eval(pressure,
true); }
181 template <
class Evaluation>
184 const Evaluation& )
const
190 template <
class Evaluation>
193 const Evaluation& )
const
199 template <
class Evaluation = Scalar>
203 const Evaluation& )
const
210 template <
class Evaluation>
215 const Evaluation& )
const
221 template <
class Evaluation>
224 const Evaluation& )
const
227 template <
class Evaluation>
228 Evaluation diffusionCoefficient(
const Evaluation& ,
232 throw std::runtime_error(
"Not implemented: The PVT model does not provide a diffusionCoefficient()");
235 Scalar gasReferenceDensity(
unsigned regionIdx)
const
236 {
return gasReferenceDensity_[regionIdx]; }
238 const std::vector<TabulatedOneDFunction>& inverseGasB()
const
239 {
return inverseGasB_; }
241 const std::vector<TabulatedOneDFunction>& gasMu()
const
244 const std::vector<TabulatedOneDFunction>& inverseGasBMu()
const
245 {
return inverseGasBMu_; }
248 std::vector<Scalar> gasReferenceDensity_;
249 std::vector<TabulatedOneDFunction> inverseGasB_;
250 std::vector<TabulatedOneDFunction> gasMu_;
251 std::vector<TabulatedOneDFunction> inverseGasBMu_;
A central place for various physical constants occuring in some equations.
Implements a linearly interpolated scalar function that depends on one variable.
This class represents the Pressure-Volume-Temperature relations of the gas phase without vaporized oi...
Definition DryGasPvt.hpp:49
Evaluation saturatedViscosity(unsigned regionIdx, const Evaluation &, const Evaluation &pressure) const
Returns the dynamic viscosity [Pa s] of oil saturated gas at given pressure.
Definition DryGasPvt.hpp:145
Evaluation saturationPressure(unsigned, const Evaluation &, const Evaluation &) const
Returns the saturation pressure of the gas phase [Pa] depending on its mass fraction of the oil compo...
Definition DryGasPvt.hpp:182
Evaluation internalEnergy(unsigned, const Evaluation &, const Evaluation &, const Evaluation &, const Evaluation &) const
Returns the specific enthalpy [J/kg] of gas given a set of parameters.
Definition DryGasPvt.hpp:121
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition DryGasPvt.hpp:114
void setGasFormationVolumeFactor(unsigned regionIdx, const SamplingPoints &samplePoints)
Initialize the function for the formation volume factor of dry gas.
Definition DryGasPvt.cpp:103
Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &, const Evaluation &) const
Returns the formation volume factor [-] of the fluid phase.
Definition DryGasPvt.hpp:159
Evaluation saturatedWaterVaporizationFactor(unsigned, const Evaluation &, const Evaluation &, const Evaluation &) const
Returns the water vaporization factor [m^3/m^3] of water saturated gas.
Definition DryGasPvt.hpp:200
Evaluation saturatedOilVaporizationFactor(unsigned, const Evaluation &, const Evaluation &) const
Returns the oil vaporization factor [m^3/m^3] of the oil phase.
Definition DryGasPvt.hpp:222
Evaluation viscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &, const Evaluation &) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition DryGasPvt.hpp:134
Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &, const Evaluation &pressure) const
Returns the formation volume factor [-] of oil saturated gas at given pressure.
Definition DryGasPvt.hpp:170
void initEnd()
Finish initializing the oil phase PVT properties.
Definition DryGasPvt.cpp:117
Evaluation saturatedWaterVaporizationFactor(unsigned, const Evaluation &, const Evaluation &) const
Returns the water vaporization factor [m^3/m^3] of the water phase.
Definition DryGasPvt.hpp:191
void setMolarMasses(unsigned, Scalar, Scalar, Scalar)
Initialize the reference densities of all fluids for a given PVT region.
Definition DryGasPvt.hpp:84
void setGasViscosity(unsigned regionIdx, const TabulatedOneDFunction &mug)
Initialize the viscosity of the gas phase.
Definition DryGasPvt.hpp:95
void setReferenceDensities(unsigned regionIdx, Scalar, Scalar rhoRefGas, Scalar)
Initialize the reference densities of all fluids for a given PVT region.
Definition DryGasPvt.hpp:73
Evaluation saturatedOilVaporizationFactor(unsigned, const Evaluation &, const Evaluation &, const Evaluation &, const Evaluation &) const
Returns the oil vaporization factor [m^3/m^3] of the oil phase.
Definition DryGasPvt.hpp:211
Definition EclipseState.hpp:63
Definition Schedule.hpp:88
Implements a linearly interpolated scalar function that depends on one variable.
Definition Tabulated1DFunction.hpp:51
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30