27#ifndef OPM_DRY_GAS_PVT_HPP
28#define OPM_DRY_GAS_PVT_HPP
48template <
class Scalar>
51 using SamplingPoints = std::vector<std::pair<Scalar, Scalar>>;
67 void setVapPars(
const Scalar,
const Scalar)
79 gasReferenceDensity_[regionIdx] = rhoRefGas;
97 { gasMu_[regionIdx] = mug; }
105 const SamplingPoints& samplePoints);
116 {
return gasReferenceDensity_.size(); }
121 template <
class Evaluation>
126 const Evaluation&)
const
128 throw std::runtime_error(
"Requested the enthalpy of gas but the thermal "
129 "option is not enabled");
132 Scalar hVap(
unsigned)
const
134 throw std::runtime_error(
"Requested the hvap of oil but the thermal "
135 "option is not enabled");
140 template <
class Evaluation>
142 const Evaluation& temperature,
143 const Evaluation& pressure,
145 const Evaluation& )
const
151 template <
class Evaluation>
154 const Evaluation& pressure)
const
156 const Evaluation& invBg = inverseGasB_[regionIdx].eval(pressure,
true);
157 const Evaluation& invMugBg = inverseGasBMu_[regionIdx].eval(pressure,
true);
159 return invBg / invMugBg;
165 template <
class Evaluation>
167 const Evaluation& temperature,
168 const Evaluation& pressure,
170 const Evaluation& )
const
176 template <
class Evaluation>
179 const Evaluation& pressure)
const
180 {
return inverseGasB_[regionIdx].eval(pressure,
true); }
189 template <
class Evaluation>
192 const Evaluation& )
const
198 template <
class Evaluation>
201 const Evaluation& )
const
207 template <
class Evaluation = Scalar>
211 const Evaluation& )
const
217 template <
class Evaluation>
222 const Evaluation& )
const
228 template <
class Evaluation>
231 const Evaluation& )
const
234 template <
class Evaluation>
235 Evaluation diffusionCoefficient(
const Evaluation& ,
239 throw std::runtime_error(
"Not implemented: The PVT model does not provide "
240 "a diffusionCoefficient()");
243 Scalar gasReferenceDensity(
unsigned regionIdx)
const
244 {
return gasReferenceDensity_[regionIdx]; }
246 const std::vector<TabulatedOneDFunction>& inverseGasB()
const
247 {
return inverseGasB_; }
249 const std::vector<TabulatedOneDFunction>& gasMu()
const
252 const std::vector<TabulatedOneDFunction>& inverseGasBMu()
const
253 {
return inverseGasBMu_; }
256 std::vector<Scalar> gasReferenceDensity_{};
257 std::vector<TabulatedOneDFunction> inverseGasB_{};
258 std::vector<TabulatedOneDFunction> gasMu_{};
259 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:50
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:152
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:190
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:122
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition DryGasPvt.hpp:115
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:166
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:208
Evaluation saturatedOilVaporizationFactor(unsigned, const Evaluation &, const Evaluation &) const
Returns the oil vaporization factor [m^3/m^3] of the oil phase.
Definition DryGasPvt.hpp:229
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:141
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:177
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:199
void setMolarMasses(unsigned, Scalar, Scalar, Scalar)
Initialize the reference densities of all fluids for a given PVT region.
Definition DryGasPvt.hpp:85
void setGasViscosity(unsigned regionIdx, const TabulatedOneDFunction &mug)
Initialize the viscosity of the gas phase.
Definition DryGasPvt.hpp:96
void setReferenceDensities(unsigned regionIdx, Scalar, Scalar rhoRefGas, Scalar)
Initialize the reference densities of all fluids for a given PVT region.
Definition DryGasPvt.hpp:74
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:218
Definition EclipseState.hpp:63
Definition Schedule.hpp:89
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