OilPvtThermal.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_OIL_PVT_THERMAL_HPP
28#define OPM_OIL_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 OilPvtMultiplexer;
41
48template <class Scalar>
50{
51public:
53 using IsothermalPvt = OilPvtMultiplexer<Scalar, /*enableThermal=*/false>;
54
56 {
57 enableThermalDensity_ = false;
58 enableJouleThomson_ = false;
59 enableThermalViscosity_ = false;
60 enableInternalEnergy_ = false;
61 isothermalPvt_ = nullptr;
62 }
63
65 const std::vector<TabulatedOneDFunction>& oilvisctCurves,
66 const std::vector<Scalar>& viscrefPress,
67 const std::vector<Scalar>& viscrefRs,
68 const std::vector<Scalar>& viscRef,
69 const std::vector<Scalar>& oildentRefTemp,
70 const std::vector<Scalar>& oildentCT1,
71 const std::vector<Scalar>& oildentCT2,
72 const std::vector<Scalar>& oilJTRefPres,
73 const std::vector<Scalar>& oilJTC,
74 const std::vector<TabulatedOneDFunction>& internalEnergyCurves,
76 bool enableJouleThomson,
79 : isothermalPvt_(isothermalPvt)
80 , oilvisctCurves_(oilvisctCurves)
81 , viscrefPress_(viscrefPress)
82 , viscrefRs_(viscrefRs)
83 , viscRef_(viscRef)
84 , oildentRefTemp_(oildentRefTemp)
85 , oildentCT1_(oildentCT1)
86 , oildentCT2_(oildentCT2)
87 , oilJTRefPres_(oilJTRefPres)
88 , oilJTC_(oilJTC)
89 , internalEnergyCurves_(internalEnergyCurves)
90 , enableThermalDensity_(enableThermalDensity)
91 , enableJouleThomson_(enableJouleThomson)
92 , enableThermalViscosity_(enableThermalViscosity)
93 , enableInternalEnergy_(enableInternalEnergy)
94 { }
95
97 { *this = data; }
98
100 { delete isothermalPvt_; }
101
102#if HAVE_ECL_INPUT
106 void initFromState(const EclipseState& eclState, const Schedule& schedule)
107 {
109 // initialize the isothermal part
111 isothermalPvt_ = new IsothermalPvt;
112 isothermalPvt_->initFromState(eclState, schedule);
113
115 // initialize the thermal part
117 const auto& tables = eclState.getTableManager();
118
119 enableThermalDensity_ = tables.OilDenT().size() > 0;
120 enableThermalViscosity_ = tables.hasTables("OILVISCT");
121 enableInternalEnergy_ = tables.hasTables("SPECHEAT");
122
123 unsigned numRegions = isothermalPvt_->numRegions();
125
126 // viscosity
127 if (enableThermalViscosity_) {
128 if (tables.getViscrefTable().empty())
129 throw std::runtime_error("VISCREF is required when OILVISCT is present");
130
131 const auto& oilvisctTables = tables.getOilvisctTables();
132 const auto& viscrefTable = tables.getViscrefTable();
133
134 assert(oilvisctTables.size() == numRegions);
135 assert(viscrefTable.size() == numRegions);
136
137 for (unsigned regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
138 const auto& TCol = oilvisctTables[regionIdx].getColumn("Temperature").vectorCopy();
139 const auto& muCol = oilvisctTables[regionIdx].getColumn("Viscosity").vectorCopy();
140 oilvisctCurves_[regionIdx].setXYContainers(TCol, muCol);
141
142 viscrefPress_[regionIdx] = viscrefTable[regionIdx].reference_pressure;
143 viscrefRs_[regionIdx] = viscrefTable[regionIdx].reference_rs;
144
145 // temperature used to calculate the reference viscosity [K]. the
146 // value does not really matter if the underlying PVT object really
147 // is isothermal...
148 constexpr const Scalar Tref = 273.15 + 20;
149
150 // compute the reference viscosity using the isothermal PVT object.
151 viscRef_[regionIdx] =
152 isothermalPvt_->viscosity(regionIdx,
153 Tref,
154 viscrefPress_[regionIdx],
155 viscrefRs_[regionIdx]);
156 }
157 }
158
159 // temperature dependence of oil density
160 const auto& oilDenT = tables.OilDenT();
161 if (oilDenT.size() > 0) {
162 assert(oilDenT.size() == numRegions);
163 for (unsigned regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
164 const auto& record = oilDenT[regionIdx];
165
166 oildentRefTemp_[regionIdx] = record.T0;
167 oildentCT1_[regionIdx] = record.C1;
168 oildentCT2_[regionIdx] = record.C2;
169 }
170 }
171
172 // Joule Thomson
173 if (enableJouleThomson_) {
174 const auto& oilJT = tables.OilJT();
175
176 assert(oilJT.size() == numRegions);
177 for (unsigned regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
178 const auto& record = oilJT[regionIdx];
179
180 oilJTRefPres_[regionIdx] = record.P0;
181 oilJTC_[regionIdx] = record.C1;
182 }
183
184 const auto& densityTable = eclState.getTableManager().getDensityTable();
185
186 assert(densityTable.size() == numRegions);
187 for (unsigned regionIdx = 0; regionIdx < numRegions; ++ regionIdx) {
188 rhoRefG_[regionIdx] = densityTable[regionIdx].gas;
189 }
190 }
191
192 if (enableInternalEnergy_) {
193 // the specific internal energy of liquid oil. be aware that ecl only specifies the
194 // heat capacity (via the SPECHEAT keyword) and we need to integrate it
195 // ourselfs to get the internal energy
196 for (unsigned regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
197 const auto& specheatTable = tables.getSpecheatTables()[regionIdx];
198 const auto& temperatureColumn = specheatTable.getColumn("TEMPERATURE");
199 const auto& cvOilColumn = specheatTable.getColumn("CV_OIL");
200
201 std::vector<double> uSamples(temperatureColumn.size());
202
203 Scalar u = temperatureColumn[0]*cvOilColumn[0];
204 for (size_t i = 0;; ++i) {
205 uSamples[i] = u;
206
207 if (i >= temperatureColumn.size() - 1)
208 break;
209
210 // integrate to the heat capacity from the current sampling point to the next
211 // one. this leads to a quadratic polynomial.
212 Scalar c_v0 = cvOilColumn[i];
213 Scalar c_v1 = cvOilColumn[i + 1];
214 Scalar T0 = temperatureColumn[i];
215 Scalar T1 = temperatureColumn[i + 1];
216 u += 0.5*(c_v0 + c_v1)*(T1 - T0);
217 }
218
219 internalEnergyCurves_[regionIdx].setXYContainers(temperatureColumn.vectorCopy(), uSamples);
220 }
221 }
222 }
223#endif // HAVE_ECL_INPUT
224
229 {
230 oilvisctCurves_.resize(numRegions);
231 viscrefPress_.resize(numRegions);
232 viscrefRs_.resize(numRegions);
233 viscRef_.resize(numRegions);
234 internalEnergyCurves_.resize(numRegions);
235 oildentRefTemp_.resize(numRegions);
236 oildentCT1_.resize(numRegions);
237 oildentCT2_.resize(numRegions);
238 oilJTRefPres_.resize(numRegions);
239 oilJTC_.resize(numRegions);
240 rhoRefG_.resize(numRegions);
241 }
242
246 void initEnd()
247 { }
248
253 { return enableThermalDensity_; }
254
259 { return enableJouleThomson_; }
260
265 { return enableThermalViscosity_; }
266
267 size_t numRegions() const
268 { return viscrefRs_.size(); }
269
273 template <class Evaluation>
274 Evaluation internalEnergy(unsigned regionIdx,
275 const Evaluation& temperature,
276 const Evaluation& pressure,
277 const Evaluation& Rs) const
278 {
279 if (!enableInternalEnergy_)
280 throw std::runtime_error("Requested the internal energy of oil but it is disabled");
281
282 if (!enableJouleThomson_) {
283 // compute the specific internal energy for the specified tempature. We use linear
284 // interpolation here despite the fact that the underlying heat capacities are
285 // piecewise linear (which leads to a quadratic function)
286 return internalEnergyCurves_[regionIdx].eval(temperature, /*extrapolate=*/true);
287 }
288 else {
289 Evaluation Tref = oildentRefTemp_[regionIdx];
290 Evaluation Pref = oilJTRefPres_[regionIdx];
291 Scalar JTC = oilJTC_[regionIdx]; // if JTC is default then JTC is calculated
292
293 Evaluation invB = inverseFormationVolumeFactor(regionIdx, temperature, pressure, Rs);
294 Evaluation Cp = internalEnergyCurves_[regionIdx].eval(temperature, /*extrapolate=*/true)/temperature;
295 Evaluation density = invB * (oilReferenceDensity(regionIdx) + Rs * rhoRefG_[regionIdx]);
296
297 Evaluation enthalpyPres;
298 if (JTC != 0) {
299 enthalpyPres = -Cp * JTC * (pressure -Pref);
300 }
301 else if(enableThermalDensity_) {
302 Scalar c1T = oildentCT1_[regionIdx];
303 Scalar c2T = oildentCT2_[regionIdx];
304
305 Evaluation alpha = (c1T + 2 * c2T * (temperature - Tref)) /
306 (1 + c1T *(temperature - Tref) + c2T * (temperature - Tref) * (temperature - Tref));
307
308 const int N = 100; // value is experimental
309 Evaluation deltaP = (pressure - Pref)/N;
310 Evaluation enthalpyPresPrev = 0;
311 for (size_t i = 0; i < N; ++i) {
312 Evaluation Pnew = Pref + i * deltaP;
313 Evaluation rho = inverseFormationVolumeFactor(regionIdx, temperature, Pnew, Rs) *
314 (oilReferenceDensity(regionIdx) + Rs * rhoRefG_[regionIdx]) ;
315 // see e.g.https://en.wikipedia.org/wiki/Joule-Thomson_effect for a derivation of the Joule-Thomson coeff.
316 Evaluation jouleThomsonCoefficient = -(1.0/Cp) * (1.0 - alpha * temperature)/rho;
317 Evaluation deltaEnthalpyPres = -Cp * jouleThomsonCoefficient * deltaP;
318 enthalpyPres = enthalpyPresPrev + deltaEnthalpyPres;
319 enthalpyPresPrev = enthalpyPres;
320 }
321 }
322 else {
323 throw std::runtime_error("Requested Joule-thomson calculation but thermal oil density (OILDENT) is not provided");
324 }
325
326 Evaluation enthalpy = Cp * (temperature - Tref) + enthalpyPres;
327
328 return enthalpy - pressure/density;
329 }
330 }
331
335 template <class Evaluation>
336 Evaluation viscosity(unsigned regionIdx,
337 const Evaluation& temperature,
338 const Evaluation& pressure,
339 const Evaluation& Rs) const
340 {
341 const auto& isothermalMu = isothermalPvt_->viscosity(regionIdx, temperature, pressure, Rs);
343 return isothermalMu;
344
345 // compute the viscosity deviation due to temperature
346 const auto& muOilvisct = oilvisctCurves_[regionIdx].eval(temperature, /*extrapolate=*/true);
347 return muOilvisct/viscRef_[regionIdx]*isothermalMu;
348 }
349
353 template <class Evaluation>
354 Evaluation saturatedViscosity(unsigned regionIdx,
355 const Evaluation& temperature,
356 const Evaluation& pressure) const
357 {
358 const auto& isothermalMu = isothermalPvt_->saturatedViscosity(regionIdx, temperature, pressure);
360 return isothermalMu;
361
362 // compute the viscosity deviation due to temperature
363 const auto& muOilvisct = oilvisctCurves_[regionIdx].eval(temperature, /*extrapolate=*/true);
364 return muOilvisct/viscRef_[regionIdx]*isothermalMu;
365 }
366
367
371 template <class Evaluation>
372 Evaluation inverseFormationVolumeFactor(unsigned regionIdx,
373 const Evaluation& temperature,
374 const Evaluation& pressure,
375 const Evaluation& Rs) const
376 {
377 const auto& b =
378 isothermalPvt_->inverseFormationVolumeFactor(regionIdx, temperature, pressure, Rs);
379
381 return b;
382
383 // we use the same approach as for the for water here, but with the OPM-specific
384 // OILDENT keyword.
385 Scalar TRef = oildentRefTemp_[regionIdx];
386 Scalar cT1 = oildentCT1_[regionIdx];
387 Scalar cT2 = oildentCT2_[regionIdx];
388 const Evaluation& Y = temperature - TRef;
389
390 return b/(1 + (cT1 + cT2*Y)*Y);
391 }
392
396 template <class Evaluation>
397 Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx,
398 const Evaluation& temperature,
399 const Evaluation& pressure) const
400 {
401 const auto& b =
402 isothermalPvt_->saturatedInverseFormationVolumeFactor(regionIdx, temperature, pressure);
403
405 return b;
406
407 // we use the same approach as for the for water here, but with the OPM-specific
408 // OILDENT keyword.
409 Scalar TRef = oildentRefTemp_[regionIdx];
410 Scalar cT1 = oildentCT1_[regionIdx];
411 Scalar cT2 = oildentCT2_[regionIdx];
412 const Evaluation& Y = temperature - TRef;
413
414 return b/(1 + (cT1 + cT2*Y)*Y);
415 }
416
424 template <class Evaluation>
425 Evaluation saturatedGasDissolutionFactor(unsigned regionIdx,
426 const Evaluation& temperature,
427 const Evaluation& pressure) const
428 { return isothermalPvt_->saturatedGasDissolutionFactor(regionIdx, temperature, pressure); }
429
437 template <class Evaluation>
438 Evaluation saturatedGasDissolutionFactor(unsigned regionIdx,
439 const Evaluation& temperature,
440 const Evaluation& pressure,
441 const Evaluation& oilSaturation,
442 const Evaluation& maxOilSaturation) const
443 { return isothermalPvt_->saturatedGasDissolutionFactor(regionIdx, temperature, pressure, oilSaturation, maxOilSaturation); }
444
452 template <class Evaluation>
453 Evaluation saturationPressure(unsigned regionIdx,
454 const Evaluation& temperature,
455 const Evaluation& pressure) const
456 { return isothermalPvt_->saturationPressure(regionIdx, temperature, pressure); }
457
458 template <class Evaluation>
459 Evaluation diffusionCoefficient(const Evaluation& temperature,
460 const Evaluation& pressure,
461 unsigned compIdx) const
462 {
463 return isothermalPvt_->diffusionCoefficient(temperature, pressure, compIdx);
464 }
465
467 { return isothermalPvt_; }
468
469 const Scalar oilReferenceDensity(unsigned regionIdx) const
470 { return isothermalPvt_->oilReferenceDensity(regionIdx); }
471
472 const std::vector<TabulatedOneDFunction>& oilvisctCurves() const
473 { return oilvisctCurves_; }
474
475 const std::vector<Scalar>& viscrefPress() const
476 { return viscrefPress_; }
477
478 const std::vector<Scalar>& viscrefRs() const
479 { return viscrefRs_; }
480
481 const std::vector<Scalar>& viscRef() const
482 { return viscRef_; }
483
484 const std::vector<Scalar>& oildentRefTemp() const
485 { return oildentRefTemp_; }
486
487 const std::vector<Scalar>& oildentCT1() const
488 { return oildentCT1_; }
489
490 const std::vector<Scalar>& oildentCT2() const
491 { return oildentCT2_; }
492
493 const std::vector<TabulatedOneDFunction> internalEnergyCurves() const
494 { return internalEnergyCurves_; }
495
497 { return enableInternalEnergy_; }
498
499 const std::vector<Scalar>& oilJTRefPres() const
500 { return oilJTRefPres_; }
501
502 const std::vector<Scalar>& oilJTC() const
503 { return oilJTC_; }
504
505 bool operator==(const OilPvtThermal<Scalar>& data) const
506 {
507 if (isothermalPvt_ && !data.isothermalPvt_)
508 return false;
509 if (!isothermalPvt_ && data.isothermalPvt_)
510 return false;
511
512 return (!this->isoThermalPvt() ||
513 (*this->isoThermalPvt() == *data.isoThermalPvt())) &&
514 this->oilvisctCurves() == data.oilvisctCurves() &&
515 this->viscrefPress() == data.viscrefPress() &&
516 this->viscrefRs() == data.viscrefRs() &&
517 this->viscRef() == data.viscRef() &&
518 this->oildentRefTemp() == data.oildentRefTemp() &&
519 this->oildentCT1() == data.oildentCT1() &&
520 this->oildentCT2() == data.oildentCT2() &&
521 this->oilJTRefPres() == data.oilJTRefPres() &&
522 this->oilJTC() == data.oilJTC() &&
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 oilvisctCurves_ = data.oilvisctCurves_;
537 viscrefPress_ = data.viscrefPress_;
538 viscrefRs_ = data.viscrefRs_;
539 viscRef_ = data.viscRef_;
540 oildentRefTemp_ = data.oildentRefTemp_;
541 oildentCT1_ = data.oildentCT1_;
542 oildentCT2_ = data.oildentCT2_;
543 oilJTRefPres_ = data.oilJTRefPres_;
544 oilJTC_ = data.oilJTC_;
545 internalEnergyCurves_ = data.internalEnergyCurves_;
546 enableThermalDensity_ = data.enableThermalDensity_;
547 enableJouleThomson_ = data.enableJouleThomson_;
548 enableThermalViscosity_ = data.enableThermalViscosity_;
549 enableInternalEnergy_ = data.enableInternalEnergy_;
550
551 return *this;
552 }
553
554private:
555 IsothermalPvt* isothermalPvt_;
556
557 // The PVT properties needed for temperature dependence of the viscosity. We need
558 // to store one value per PVT region.
559 std::vector<TabulatedOneDFunction> oilvisctCurves_;
560 std::vector<Scalar> viscrefPress_;
561 std::vector<Scalar> viscrefRs_;
562 std::vector<Scalar> viscRef_;
563
564 // The PVT properties needed for temperature dependence of the density.
565 std::vector<Scalar> oildentRefTemp_;
566 std::vector<Scalar> oildentCT1_;
567 std::vector<Scalar> oildentCT2_;
568
569 std::vector<Scalar> oilJTRefPres_;
570 std::vector<Scalar> oilJTC_;
571
572 std::vector<Scalar> rhoRefG_;
573
574 // piecewise linear curve representing the internal energy of oil
575 std::vector<TabulatedOneDFunction> internalEnergyCurves_;
576
577 bool enableThermalDensity_;
578 bool enableJouleThomson_;
579 bool enableThermalViscosity_;
580 bool enableInternalEnergy_;
581};
582
583} // namespace Opm
584
585#endif
This class represents the Pressure-Volume-Temperature relations of the oil phase in the black-oil mod...
Definition: OilPvtMultiplexer.hpp:96
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition: OilPvtMultiplexer.hpp:177
Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
Returns the formation volume factor [-] of the fluid phase.
Definition: OilPvtMultiplexer.hpp:219
Evaluation saturatedViscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition: OilPvtMultiplexer.hpp:210
Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the formation volume factor [-] of the fluid phase.
Definition: OilPvtMultiplexer.hpp:229
Evaluation saturatedGasDissolutionFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the gas dissolution factor [m^3/m^3] of saturated oil.
Definition: OilPvtMultiplexer.hpp:238
Evaluation viscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition: OilPvtMultiplexer.hpp:200
Evaluation saturationPressure(unsigned regionIdx, const Evaluation &temperature, const Evaluation &Rs) const
Returns the saturation pressure [Pa] of oil given the mass fraction of the gas component in the oil p...
Definition: OilPvtMultiplexer.hpp:262
const Scalar oilReferenceDensity(unsigned regionIdx) const
Return the reference density which are considered by this PVT-object.
Definition: OilPvtMultiplexer.hpp:183
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: OilPvtMultiplexer.hpp:271
This class implements temperature dependence of the PVT properties of oil.
Definition: OilPvtThermal.hpp:50
bool enableJouleThomsony() const
Returns true iff Joule-Thomson effect for the oil phase is active.
Definition: OilPvtThermal.hpp:258
OilPvtThermal()
Definition: OilPvtThermal.hpp:55
bool enableInternalEnergy() const
Definition: OilPvtThermal.hpp:496
void initEnd()
Finish initializing the thermal part of the oil phase PVT properties.
Definition: OilPvtThermal.hpp:246
OilPvtThermal(IsothermalPvt *isothermalPvt, const std::vector< TabulatedOneDFunction > &oilvisctCurves, const std::vector< Scalar > &viscrefPress, const std::vector< Scalar > &viscrefRs, const std::vector< Scalar > &viscRef, const std::vector< Scalar > &oildentRefTemp, const std::vector< Scalar > &oildentCT1, const std::vector< Scalar > &oildentCT2, const std::vector< Scalar > &oilJTRefPres, const std::vector< Scalar > &oilJTC, const std::vector< TabulatedOneDFunction > &internalEnergyCurves, bool enableThermalDensity, bool enableJouleThomson, bool enableThermalViscosity, bool enableInternalEnergy)
Definition: OilPvtThermal.hpp:64
const std::vector< Scalar > & oildentCT1() const
Definition: OilPvtThermal.hpp:487
const std::vector< TabulatedOneDFunction > internalEnergyCurves() const
Definition: OilPvtThermal.hpp:493
const std::vector< TabulatedOneDFunction > & oilvisctCurves() const
Definition: OilPvtThermal.hpp:472
OilPvtThermal(const OilPvtThermal &data)
Definition: OilPvtThermal.hpp:96
bool enableThermalDensity() const
Returns true iff the density of the oil phase is temperature dependent.
Definition: OilPvtThermal.hpp:252
const std::vector< Scalar > & oildentCT2() const
Definition: OilPvtThermal.hpp:490
bool operator==(const OilPvtThermal< Scalar > &data) const
Definition: OilPvtThermal.hpp:505
const std::vector< Scalar > & viscrefRs() const
Definition: OilPvtThermal.hpp:478
~OilPvtThermal()
Definition: OilPvtThermal.hpp:99
Evaluation saturatedGasDissolutionFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the gas dissolution factor [m^3/m^3] of the oil phase.
Definition: OilPvtThermal.hpp:425
Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
Returns the formation volume factor [-] of the fluid phase.
Definition: OilPvtThermal.hpp:372
Evaluation saturatedViscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition: OilPvtThermal.hpp:354
Evaluation internalEnergy(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
Returns the specific internal energy [J/kg] of oil given a set of parameters.
Definition: OilPvtThermal.hpp:274
Evaluation viscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition: OilPvtThermal.hpp:336
const std::vector< Scalar > & viscrefPress() const
Definition: OilPvtThermal.hpp:475
size_t numRegions() const
Definition: OilPvtThermal.hpp:267
const std::vector< Scalar > & oilJTRefPres() const
Definition: OilPvtThermal.hpp:499
const std::vector< Scalar > & oildentRefTemp() const
Definition: OilPvtThermal.hpp:484
const std::vector< Scalar > & viscRef() const
Definition: OilPvtThermal.hpp:481
OilPvtMultiplexer< Scalar, false > IsothermalPvt
Definition: OilPvtThermal.hpp:53
void setNumRegions(size_t numRegions)
Set the number of PVT-regions considered by this object.
Definition: OilPvtThermal.hpp:228
bool enableThermalViscosity() const
Returns true iff the viscosity of the oil phase is temperature dependent.
Definition: OilPvtThermal.hpp:264
OilPvtThermal< Scalar > & operator=(const OilPvtThermal< Scalar > &data)
Definition: OilPvtThermal.hpp:530
const std::vector< Scalar > & oilJTC() const
Definition: OilPvtThermal.hpp:502
Evaluation diffusionCoefficient(const Evaluation &temperature, const Evaluation &pressure, unsigned compIdx) const
Definition: OilPvtThermal.hpp:459
Evaluation saturationPressure(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the saturation pressure of the oil phase [Pa].
Definition: OilPvtThermal.hpp:453
const IsothermalPvt * isoThermalPvt() const
Definition: OilPvtThermal.hpp:466
Evaluation saturatedGasDissolutionFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &oilSaturation, const Evaluation &maxOilSaturation) const
Returns the gas dissolution factor [m^3/m^3] of the oil phase.
Definition: OilPvtThermal.hpp:438
Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the formation volume factor [-] of gas-saturated oil phase.
Definition: OilPvtThermal.hpp:397
const Scalar oilReferenceDensity(unsigned regionIdx) const
Definition: OilPvtThermal.hpp:469
Implements a linearly interpolated scalar function that depends on one variable.
Definition: Tabulated1DFunction.hpp:48
Definition: Air_Mesitylene.hpp:34