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>>;
74 gasReferenceDensity_[regionIdx] = rhoRefGas;
92 { gasMu_[regionIdx] = mug; }
100 const SamplingPoints& samplePoints);
111 {
return gasReferenceDensity_.size(); }
116 template <
class Evaluation>
121 const Evaluation&)
const
123 throw std::runtime_error(
"Requested the enthalpy of gas but the thermal option is not enabled");
129 template <
class Evaluation>
131 const Evaluation& temperature,
132 const Evaluation& pressure,
134 const Evaluation& )
const
140 template <
class Evaluation>
143 const Evaluation& pressure)
const
145 const Evaluation& invBg = inverseGasB_[regionIdx].eval(pressure,
true);
146 const Evaluation& invMugBg = inverseGasBMu_[regionIdx].eval(pressure,
true);
148 return invBg/invMugBg;
154 template <
class Evaluation>
156 const Evaluation& temperature,
157 const Evaluation& pressure,
159 const Evaluation& )
const
165 template <
class Evaluation>
168 const Evaluation& pressure)
const
169 {
return inverseGasB_[regionIdx].eval(pressure,
true); }
177 template <
class Evaluation>
180 const Evaluation& )
const
186 template <
class Evaluation>
189 const Evaluation& )
const
195 template <
class Evaluation = Scalar>
199 const Evaluation& )
const
206 template <
class Evaluation>
211 const Evaluation& )
const
217 template <
class Evaluation>
220 const Evaluation& )
const
223 template <
class Evaluation>
224 Evaluation diffusionCoefficient(
const Evaluation& ,
228 throw std::runtime_error(
"Not implemented: The PVT model does not provide a diffusionCoefficient()");
231 Scalar gasReferenceDensity(
unsigned regionIdx)
const
232 {
return gasReferenceDensity_[regionIdx]; }
234 const std::vector<TabulatedOneDFunction>& inverseGasB()
const
235 {
return inverseGasB_; }
237 const std::vector<TabulatedOneDFunction>& gasMu()
const
240 const std::vector<TabulatedOneDFunction>& inverseGasBMu()
const
241 {
return inverseGasBMu_; }
244 std::vector<Scalar> gasReferenceDensity_;
245 std::vector<TabulatedOneDFunction> inverseGasB_;
246 std::vector<TabulatedOneDFunction> gasMu_;
247 std::vector<TabulatedOneDFunction> inverseGasBMu_;
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:141
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:178
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:117
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition: DryGasPvt.hpp:110
void setGasFormationVolumeFactor(unsigned regionIdx, const SamplingPoints &samplePoints)
Initialize the function for the formation volume factor of dry gas.
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:155
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:196
Evaluation saturatedOilVaporizationFactor(unsigned, const Evaluation &, const Evaluation &) const
Returns the oil vaporization factor [m^3/m^3] of the oil phase.
Definition: DryGasPvt.hpp:218
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:130
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:166
void initEnd()
Finish initializing the oil phase PVT properties.
Evaluation saturatedWaterVaporizationFactor(unsigned, const Evaluation &, const Evaluation &) const
Returns the water vaporization factor [m^3/m^3] of the water phase.
Definition: DryGasPvt.hpp:187
void setMolarMasses(unsigned, Scalar, Scalar, Scalar)
Initialize the reference densities of all fluids for a given PVT region.
Definition: DryGasPvt.hpp:80
void setGasViscosity(unsigned regionIdx, const TabulatedOneDFunction &mug)
Initialize the viscosity of the gas phase.
Definition: DryGasPvt.hpp:91
void setReferenceDensities(unsigned regionIdx, Scalar, Scalar rhoRefGas, Scalar)
Initialize the reference densities of all fluids for a given PVT region.
Definition: DryGasPvt.hpp:69
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:207
Definition: EclipseState.hpp:55
Definition: Schedule.hpp:130
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