GasPvtThermal.hpp
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
27#ifndef OPM_GAS_PVT_THERMAL_HPP
28#define OPM_GAS_PVT_THERMAL_HPP
29
31
32#if HAVE_ECL_INPUT
33#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
34#include <opm/input/eclipse/EclipseState/Tables/SimpleTable.hpp>
35#include <opm/input/eclipse/EclipseState/Tables/TableManager.hpp>
36#endif
37
38namespace Opm {
39template <class Scalar, bool enableThermal>
40class GasPvtMultiplexer;
41
48template <class Scalar>
50{
51public:
52 using IsothermalPvt = GasPvtMultiplexer<Scalar, /*enableThermal=*/false>;
54
56 {
57 enableThermalDensity_ = false;
58 enableJouleThomson_ = false;
59 enableThermalViscosity_ = false;
60 isothermalPvt_ = nullptr;
61 }
62
64 const std::vector<TabulatedOneDFunction>& gasvisctCurves,
65 const std::vector<Scalar>& gasdentRefTemp,
66 const std::vector<Scalar>& gasdentCT1,
67 const std::vector<Scalar>& gasdentCT2,
68 const std::vector<Scalar>& gasJTRefPres,
69 const std::vector<Scalar>& gasJTC,
70 const std::vector<TabulatedOneDFunction>& internalEnergyCurves,
72 bool enableJouleThomson,
75 : isothermalPvt_(isothermalPvt)
76 , gasvisctCurves_(gasvisctCurves)
77 , gasdentRefTemp_(gasdentRefTemp)
78 , gasdentCT1_(gasdentCT1)
79 , gasdentCT2_(gasdentCT2)
80 , gasJTRefPres_(gasJTRefPres)
81 , gasJTC_(gasJTC)
82 , internalEnergyCurves_(internalEnergyCurves)
83 , enableThermalDensity_(enableThermalDensity)
84 , enableJouleThomson_(enableJouleThomson)
85 , enableThermalViscosity_(enableThermalViscosity)
86 , enableInternalEnergy_(enableInternalEnergy)
87 { }
88
90 { *this = data; }
91
93 { delete isothermalPvt_; }
94
95#if HAVE_ECL_INPUT
99 void initFromState(const EclipseState& eclState, const Schedule& schedule)
100 {
102 // initialize the isothermal part
104 isothermalPvt_ = new IsothermalPvt;
105 isothermalPvt_->initFromState(eclState, schedule);
106
108 // initialize the thermal part
110 const auto& tables = eclState.getTableManager();
111
112 enableThermalDensity_ = tables.GasDenT().size() > 0;
113 enableJouleThomson_ = tables.GasJT().size() > 0;
114 enableThermalViscosity_ = tables.hasTables("GASVISCT");
115 enableInternalEnergy_ = tables.hasTables("SPECHEAT");
116
117 unsigned numRegions = isothermalPvt_->numRegions();
119
120 // viscosity
121 if (enableThermalViscosity_) {
122 const auto& gasvisctTables = tables.getGasvisctTables();
123 auto gasCompIdx = tables.gas_comp_index();
124 std::string gasvisctColumnName = "Viscosity" + std::to_string(static_cast<long long>(gasCompIdx));
125
126 for (unsigned regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
127 const auto& T = gasvisctTables[regionIdx].getColumn("Temperature").vectorCopy();
128 const auto& mu = gasvisctTables[regionIdx].getColumn(gasvisctColumnName).vectorCopy();
129 gasvisctCurves_[regionIdx].setXYContainers(T, mu);
130 }
131 }
132
133 // temperature dependence of gas density
134 if (enableThermalDensity_) {
135 const auto& gasDenT = tables.GasDenT();
136
137 assert(gasDenT.size() == numRegions);
138 for (unsigned regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
139 const auto& record = gasDenT[regionIdx];
140
141 gasdentRefTemp_[regionIdx] = record.T0;
142 gasdentCT1_[regionIdx] = record.C1;
143 gasdentCT2_[regionIdx] = record.C2;
144 }
145 }
146
147 // Joule Thomson
148 if (enableJouleThomson_) {
149 const auto& gasJT = tables.GasJT();
150
151 assert(gasJT.size() == numRegions);
152 for (unsigned regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
153 const auto& record = gasJT[regionIdx];
154
155 gasJTRefPres_[regionIdx] = record.P0;
156 gasJTC_[regionIdx] = record.C1;
157 }
158
159 const auto& densityTable = eclState.getTableManager().getDensityTable();
160
161 assert(densityTable.size() == numRegions);
162 for (unsigned regionIdx = 0; regionIdx < numRegions; ++ regionIdx) {
163 rhoRefO_[regionIdx] = densityTable[regionIdx].oil;
164 }
165 }
166
167 if (enableInternalEnergy_) {
168 // the specific internal energy of gas. be aware that ecl only specifies the heat capacity
169 // (via the SPECHEAT keyword) and we need to integrate it ourselfs to get the
170 // internal energy
171 for (unsigned regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
172 const auto& specHeatTable = tables.getSpecheatTables()[regionIdx];
173 const auto& temperatureColumn = specHeatTable.getColumn("TEMPERATURE");
174 const auto& cvGasColumn = specHeatTable.getColumn("CV_GAS");
175
176 std::vector<double> uSamples(temperatureColumn.size());
177
178 // the specific enthalpy of vaporization. since ECL does not seem to
179 // feature a proper way to specify this quantity, we use the value for
180 // methane. A proper model would also need to consider the enthalpy
181 // change due to dissolution, i.e. the enthalpies of the gas and oil
182 // phases should depend on the phase composition
183 const Scalar hVap = 480.6e3; // [J / kg]
184
185 Scalar u = temperatureColumn[0]*cvGasColumn[0] + hVap;
186 for (size_t i = 0;; ++i) {
187 uSamples[i] = u;
188
189 if (i >= temperatureColumn.size() - 1)
190 break;
191
192 // integrate to the heat capacity from the current sampling point to the next
193 // one. this leads to a quadratic polynomial.
194 Scalar c_v0 = cvGasColumn[i];
195 Scalar c_v1 = cvGasColumn[i + 1];
196 Scalar T0 = temperatureColumn[i];
197 Scalar T1 = temperatureColumn[i + 1];
198 u += 0.5*(c_v0 + c_v1)*(T1 - T0);
199 }
200
201 internalEnergyCurves_[regionIdx].setXYContainers(temperatureColumn.vectorCopy(), uSamples);
202 }
203 }
204 }
205#endif // HAVE_ECL_INPUT
206
211 {
212 gasvisctCurves_.resize(numRegions);
213 internalEnergyCurves_.resize(numRegions);
214 gasdentRefTemp_.resize(numRegions);
215 gasdentCT1_.resize(numRegions);
216 gasdentCT2_.resize(numRegions);
217 gasJTRefPres_.resize(numRegions);
218 gasJTC_.resize(numRegions);
219 rhoRefO_.resize(numRegions);
220 }
221
225 void initEnd()
226 { }
227
228 size_t numRegions() const
229 { return gasvisctCurves_.size(); }
230
235 { return enableThermalDensity_; }
236
241 { return enableJouleThomson_; }
242
247 { return enableThermalViscosity_; }
248
252 template <class Evaluation>
253 Evaluation internalEnergy(unsigned regionIdx,
254 const Evaluation& temperature,
255 const Evaluation& pressure,
256 const Evaluation& Rv) const
257 {
258 if (!enableInternalEnergy_)
259 throw std::runtime_error("Requested the internal energy of gas but it is disabled");
260
261 if (!enableJouleThomson_) {
262 // compute the specific internal energy for the specified tempature. We use linear
263 // interpolation here despite the fact that the underlying heat capacities are
264 // piecewise linear (which leads to a quadratic function)
265 return internalEnergyCurves_[regionIdx].eval(temperature, /*extrapolate=*/true);
266 }
267 else {
268 Evaluation Tref = gasdentRefTemp_[regionIdx];
269 Evaluation Pref = gasJTRefPres_[regionIdx];
270 Scalar JTC = gasJTC_[regionIdx]; // if JTC is default then JTC is calculated
271 Evaluation Rvw = 0.0;
272
273 Evaluation invB = inverseFormationVolumeFactor(regionIdx, temperature, pressure, Rv, Rvw);
274 constexpr const Scalar hVap = 480.6e3; // [J / kg]
275 Evaluation Cp = (internalEnergyCurves_[regionIdx].eval(temperature, /*extrapolate=*/true) - hVap)/temperature;
276 Evaluation density = invB * (gasReferenceDensity(regionIdx) + Rv * rhoRefO_[regionIdx]);
277
278 Evaluation enthalpyPres;
279 if (JTC != 0) {
280 enthalpyPres = -Cp * JTC * (pressure -Pref);
281 }
282 else if(enableThermalDensity_) {
283 Scalar c1T = gasdentCT1_[regionIdx];
284 Scalar c2T = gasdentCT2_[regionIdx];
285
286 Evaluation alpha = (c1T + 2 * c2T * (temperature - Tref)) /
287 (1 + c1T *(temperature - Tref) + c2T * (temperature - Tref) * (temperature - Tref));
288
289 constexpr const int N = 100; // value is experimental
290 Evaluation deltaP = (pressure - Pref)/N;
291 Evaluation enthalpyPresPrev = 0;
292 for (size_t i = 0; i < N; ++i) {
293 Evaluation Pnew = Pref + i * deltaP;
294 Evaluation rho = inverseFormationVolumeFactor(regionIdx, temperature, Pnew, Rv, Rvw) *
295 (gasReferenceDensity(regionIdx) + Rv * rhoRefO_[regionIdx]);
296 // see e.g.https://en.wikipedia.org/wiki/Joule-Thomson_effect for a derivation of the Joule-Thomson coeff.
297 Evaluation jouleThomsonCoefficient = -(1.0/Cp) * (1.0 - alpha * temperature)/rho;
298 Evaluation deltaEnthalpyPres = -Cp * jouleThomsonCoefficient * deltaP;
299 enthalpyPres = enthalpyPresPrev + deltaEnthalpyPres;
300 enthalpyPresPrev = enthalpyPres;
301 }
302 }
303 else {
304 throw std::runtime_error("Requested Joule-thomson calculation but thermal gas density (GASDENT) is not provided");
305 }
306
307 Evaluation enthalpy = Cp * (temperature - Tref) + enthalpyPres;
308
309 return enthalpy - pressure/density;
310 }
311 }
312
316 template <class Evaluation>
317 Evaluation viscosity(unsigned regionIdx,
318 const Evaluation& temperature,
319 const Evaluation& pressure,
320 const Evaluation& Rv,
321 const Evaluation& Rvw) const
322 {
324 return isothermalPvt_->viscosity(regionIdx, temperature, pressure, Rv, Rvw);
325
326 // compute the viscosity deviation due to temperature
327 const auto& muGasvisct = gasvisctCurves_[regionIdx].eval(temperature);
328 return muGasvisct;
329 }
330
334 template <class Evaluation>
335 Evaluation saturatedViscosity(unsigned regionIdx,
336 const Evaluation& temperature,
337 const Evaluation& pressure) const
338 {
340 return isothermalPvt_->saturatedViscosity(regionIdx, temperature, pressure);
341
342 // compute the viscosity deviation due to temperature
343 const auto& muGasvisct = gasvisctCurves_[regionIdx].eval(temperature, true);
344 return muGasvisct;
345 }
346
350 template <class Evaluation>
351 Evaluation inverseFormationVolumeFactor(unsigned regionIdx,
352 const Evaluation& temperature,
353 const Evaluation& pressure,
354 const Evaluation& Rv,
355 const Evaluation& /*Rvw*/) const
356 {
357 const Evaluation& Rvw = 0.0;
358 const auto& b =
359 isothermalPvt_->inverseFormationVolumeFactor(regionIdx, temperature, pressure, Rv, Rvw);
360
362 return b;
363
364 // we use the same approach as for the for water here, but with the OPM-specific
365 // GASDENT keyword.
366 //
367 // TODO: Since gas is quite a bit more compressible than water, it might be
368 // necessary to make GASDENT to a table keyword. If the current temperature
369 // is relatively close to the reference temperature, the current approach
370 // should be good enough, though.
371 Scalar TRef = gasdentRefTemp_[regionIdx];
372 Scalar cT1 = gasdentCT1_[regionIdx];
373 Scalar cT2 = gasdentCT2_[regionIdx];
374 const Evaluation& Y = temperature - TRef;
375
376 return b/(1 + (cT1 + cT2*Y)*Y);
377 }
378
382 template <class Evaluation>
383 Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx,
384 const Evaluation& temperature,
385 const Evaluation& pressure) const
386 {
387 const auto& b =
388 isothermalPvt_->saturatedInverseFormationVolumeFactor(regionIdx, temperature, pressure);
389
391 return b;
392
393 // we use the same approach as for the for water here, but with the OPM-specific
394 // GASDENT keyword.
395 //
396 // TODO: Since gas is quite a bit more compressible than water, it might be
397 // necessary to make GASDENT to a table keyword. If the current temperature
398 // is relatively close to the reference temperature, the current approach
399 // should be good enough, though.
400 Scalar TRef = gasdentRefTemp_[regionIdx];
401 Scalar cT1 = gasdentCT1_[regionIdx];
402 Scalar cT2 = gasdentCT2_[regionIdx];
403 const Evaluation& Y = temperature - TRef;
404
405 return b/(1 + (cT1 + cT2*Y)*Y);
406 }
407
411 template <class Evaluation>
412 Evaluation saturatedWaterVaporizationFactor(unsigned /*regionIdx*/,
413 const Evaluation& /*temperature*/,
414 const Evaluation& /*pressure*/) const
415 { return 0.0; }
416
420 template <class Evaluation = Scalar>
421 Evaluation saturatedWaterVaporizationFactor(unsigned /*regionIdx*/,
422 const Evaluation& /*temperature*/,
423 const Evaluation& /*pressure*/,
424 const Evaluation& /*saltConcentration*/) const
425 { return 0.0; }
426
427
428
436 template <class Evaluation>
437 Evaluation saturatedOilVaporizationFactor(unsigned regionIdx,
438 const Evaluation& temperature,
439 const Evaluation& pressure) const
440 { return isothermalPvt_->saturatedOilVaporizationFactor(regionIdx, temperature, pressure); }
441
449 template <class Evaluation>
450 Evaluation saturatedOilVaporizationFactor(unsigned regionIdx,
451 const Evaluation& temperature,
452 const Evaluation& pressure,
453 const Evaluation& oilSaturation,
454 const Evaluation& maxOilSaturation) const
455 { return isothermalPvt_->saturatedOilVaporizationFactor(regionIdx, temperature, pressure, oilSaturation, maxOilSaturation); }
456
464 template <class Evaluation>
465 Evaluation saturationPressure(unsigned regionIdx,
466 const Evaluation& temperature,
467 const Evaluation& pressure) const
468 { return isothermalPvt_->saturationPressure(regionIdx, temperature, pressure); }
469
470 template <class Evaluation>
471 Evaluation diffusionCoefficient(const Evaluation& temperature,
472 const Evaluation& pressure,
473 unsigned compIdx) const
474 {
475 return isothermalPvt_->diffusionCoefficient(temperature, pressure, compIdx);
476 }
478 { return isothermalPvt_; }
479
480 const Scalar gasReferenceDensity(unsigned regionIdx) const
481 { return isothermalPvt_->gasReferenceDensity(regionIdx); }
482
483 const std::vector<TabulatedOneDFunction>& gasvisctCurves() const
484 { return gasvisctCurves_; }
485
486 const std::vector<Scalar>& gasdentRefTemp() const
487 { return gasdentRefTemp_; }
488
489 const std::vector<Scalar>& gasdentCT1() const
490 { return gasdentCT1_; }
491
492 const std::vector<Scalar>& gasdentCT2() const
493 { return gasdentCT2_; }
494
495 const std::vector<TabulatedOneDFunction>& internalEnergyCurves() const
496 { return internalEnergyCurves_; }
497
499 { return enableInternalEnergy_; }
500
501 const std::vector<Scalar>& gasJTRefPres() const
502 { return gasJTRefPres_; }
503
504 const std::vector<Scalar>& gasJTC() const
505 { return gasJTC_; }
506
507
508 bool operator==(const GasPvtThermal<Scalar>& data) const
509 {
510 if (isothermalPvt_ && !data.isothermalPvt_)
511 return false;
512 if (!isothermalPvt_ && data.isothermalPvt_)
513 return false;
514
515 return (!this->isoThermalPvt() ||
516 (*this->isoThermalPvt() == *data.isoThermalPvt())) &&
517 this->gasvisctCurves() == data.gasvisctCurves() &&
518 this->gasdentRefTemp() == data.gasdentRefTemp() &&
519 this->gasdentCT1() == data.gasdentCT1() &&
520 this->gasdentCT2() == data.gasdentCT2() &&
521 this->gasJTRefPres() == data.gasJTRefPres() &&
522 this->gasJTC() == data.gasJTC() &&
523 this->internalEnergyCurves() == data.internalEnergyCurves() &&
524 this->enableThermalDensity() == data.enableThermalDensity() &&
525 this->enableJouleThomson() == data.enableJouleThomson() &&
528 }
529
531 {
532 if (data.isothermalPvt_)
533 isothermalPvt_ = new IsothermalPvt(*data.isothermalPvt_);
534 else
535 isothermalPvt_ = nullptr;
536 gasvisctCurves_ = data.gasvisctCurves_;
537 gasdentRefTemp_ = data.gasdentRefTemp_;
538 gasdentCT1_ = data.gasdentCT1_;
539 gasdentCT2_ = data.gasdentCT2_;
540 gasJTRefPres_ = data.gasJTRefPres_;
541 gasJTC_ = data.gasJTC_;
542 internalEnergyCurves_ = data.internalEnergyCurves_;
543 enableThermalDensity_ = data.enableThermalDensity_;
544 enableJouleThomson_ = data.enableJouleThomson_;
545 enableThermalViscosity_ = data.enableThermalViscosity_;
546 enableInternalEnergy_ = data.enableInternalEnergy_;
547
548 return *this;
549 }
550
551private:
552 IsothermalPvt* isothermalPvt_;
553
554 // The PVT properties needed for temperature dependence of the viscosity. We need
555 // to store one value per PVT region.
556 std::vector<TabulatedOneDFunction> gasvisctCurves_;
557
558 std::vector<Scalar> gasdentRefTemp_;
559 std::vector<Scalar> gasdentCT1_;
560 std::vector<Scalar> gasdentCT2_;
561
562 std::vector<Scalar> gasJTRefPres_;
563 std::vector<Scalar> gasJTC_;
564
565 std::vector<Scalar> rhoRefO_;
566
567 // piecewise linear curve representing the internal energy of gas
568 std::vector<TabulatedOneDFunction> internalEnergyCurves_;
569
570 bool enableThermalDensity_;
571 bool enableJouleThomson_;
572 bool enableThermalViscosity_;
573 bool enableInternalEnergy_;
574};
575
576} // namespace Opm
577
578#endif
This class represents the Pressure-Volume-Temperature relations of the gas phase in the black-oil mod...
Definition: GasPvtMultiplexer.hpp:100
Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the formation volume factor [-] of oil saturated gas given a set of parameters.
Definition: GasPvtMultiplexer.hpp:272
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition: GasPvtMultiplexer.hpp:218
Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rv, const Evaluation &Rvw) const
Returns the formation volume factor [-] of the fluid phase.
Definition: GasPvtMultiplexer.hpp:261
Evaluation viscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rv, const Evaluation &Rvw) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition: GasPvtMultiplexer.hpp:241
Evaluation diffusionCoefficient(const Evaluation &temperature, const Evaluation &pressure, unsigned compIdx) const
Calculate the binary molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (k...
Definition: GasPvtMultiplexer.hpp:332
Evaluation saturatedOilVaporizationFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the oil vaporization factor [m^3/m^3] of oil saturated gas.
Definition: GasPvtMultiplexer.hpp:281
const Scalar gasReferenceDensity(unsigned regionIdx)
Return the reference density which are considered by this PVT-object.
Definition: GasPvtMultiplexer.hpp:224
Evaluation saturationPressure(unsigned regionIdx, const Evaluation &temperature, const Evaluation &Rv) const
Returns the saturation pressure of the gas phase [Pa] depending on its mass fraction of the oil compo...
Definition: GasPvtMultiplexer.hpp:323
Evaluation saturatedViscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the dynamic viscosity [Pa s] of oil saturated gas given a set of parameters.
Definition: GasPvtMultiplexer.hpp:252
This class implements temperature dependence of the PVT properties of gas.
Definition: GasPvtThermal.hpp:50
bool enableThermalDensity() const
Returns true iff the density of the gas phase is temperature dependent.
Definition: GasPvtThermal.hpp:234
Evaluation viscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rv, const Evaluation &Rvw) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition: GasPvtThermal.hpp:317
const std::vector< TabulatedOneDFunction > & gasvisctCurves() const
Definition: GasPvtThermal.hpp:483
const std::vector< TabulatedOneDFunction > & internalEnergyCurves() const
Definition: GasPvtThermal.hpp:495
GasPvtThermal(IsothermalPvt *isothermalPvt, const std::vector< TabulatedOneDFunction > &gasvisctCurves, const std::vector< Scalar > &gasdentRefTemp, const std::vector< Scalar > &gasdentCT1, const std::vector< Scalar > &gasdentCT2, const std::vector< Scalar > &gasJTRefPres, const std::vector< Scalar > &gasJTC, const std::vector< TabulatedOneDFunction > &internalEnergyCurves, bool enableThermalDensity, bool enableJouleThomson, bool enableThermalViscosity, bool enableInternalEnergy)
Definition: GasPvtThermal.hpp:63
GasPvtThermal< Scalar > & operator=(const GasPvtThermal< Scalar > &data)
Definition: GasPvtThermal.hpp:530
const std::vector< Scalar > & gasJTC() const
Definition: GasPvtThermal.hpp:504
bool enableInternalEnergy() const
Definition: GasPvtThermal.hpp:498
~GasPvtThermal()
Definition: GasPvtThermal.hpp:92
GasPvtThermal(const GasPvtThermal &data)
Definition: GasPvtThermal.hpp:89
Evaluation saturatedOilVaporizationFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &oilSaturation, const Evaluation &maxOilSaturation) const
Returns the oil vaporization factor [m^3/m^3] of the gas phase.
Definition: GasPvtThermal.hpp:450
Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the formation volume factor [-] of oil-saturated gas.
Definition: GasPvtThermal.hpp:383
Evaluation diffusionCoefficient(const Evaluation &temperature, const Evaluation &pressure, unsigned compIdx) const
Definition: GasPvtThermal.hpp:471
GasPvtThermal()
Definition: GasPvtThermal.hpp:55
const std::vector< Scalar > & gasJTRefPres() const
Definition: GasPvtThermal.hpp:501
bool enableJouleThomsony() const
Returns true iff Joule-Thomson effect for the gas phase is active.
Definition: GasPvtThermal.hpp:240
Evaluation saturatedOilVaporizationFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the oil vaporization factor [m^3/m^3] of the gas phase.
Definition: GasPvtThermal.hpp:437
const Scalar gasReferenceDensity(unsigned regionIdx) const
Definition: GasPvtThermal.hpp:480
Evaluation saturatedWaterVaporizationFactor(unsigned, const Evaluation &, const Evaluation &, const Evaluation &) const
Returns the water vaporization factor [m^3/m^3] of water saturated gas.
Definition: GasPvtThermal.hpp:421
void initEnd()
Finish initializing the thermal part of the gas phase PVT properties.
Definition: GasPvtThermal.hpp:225
void setNumRegions(size_t numRegions)
Set the number of PVT-regions considered by this object.
Definition: GasPvtThermal.hpp:210
const std::vector< Scalar > & gasdentRefTemp() const
Definition: GasPvtThermal.hpp:486
Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rv, const Evaluation &) const
Returns the formation volume factor [-] of the fluid phase.
Definition: GasPvtThermal.hpp:351
size_t numRegions() const
Definition: GasPvtThermal.hpp:228
bool operator==(const GasPvtThermal< Scalar > &data) const
Definition: GasPvtThermal.hpp:508
const std::vector< Scalar > & gasdentCT1() const
Definition: GasPvtThermal.hpp:489
bool enableThermalViscosity() const
Returns true iff the viscosity of the gas phase is temperature dependent.
Definition: GasPvtThermal.hpp:246
Evaluation saturatedWaterVaporizationFactor(unsigned, const Evaluation &, const Evaluation &) const
Returns the water vaporization factor [m^3/m^3] of the water phase.
Definition: GasPvtThermal.hpp:412
const std::vector< Scalar > & gasdentCT2() const
Definition: GasPvtThermal.hpp:492
Evaluation internalEnergy(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rv) const
Returns the specific internal energy [J/kg] of gas given a set of parameters.
Definition: GasPvtThermal.hpp:253
Evaluation saturatedViscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the dynamic viscosity [Pa s] of the oil-saturated gas phase given a set of parameters.
Definition: GasPvtThermal.hpp:335
Evaluation saturationPressure(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the saturation pressure of the gas phase [Pa].
Definition: GasPvtThermal.hpp:465
const IsothermalPvt * isoThermalPvt() const
Definition: GasPvtThermal.hpp:477
GasPvtMultiplexer< Scalar, false > IsothermalPvt
Definition: GasPvtThermal.hpp:52
Implements a linearly interpolated scalar function that depends on one variable.
Definition: Tabulated1DFunction.hpp:48
Definition: Air_Mesitylene.hpp:34