My Project
Loading...
Searching...
No Matches
BrineCo2Pvt.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_BRINE_CO2_PVT_HPP
28#define OPM_BRINE_CO2_PVT_HPP
29
31#include <opm/common/TimingMacros.hpp>
32#include <opm/common/ErrorMacros.hpp>
33
35
43
44#include <vector>
45
46namespace Opm {
47
48#if HAVE_ECL_INPUT
49class EclipseState;
50class Schedule;
51#endif
52
57template <class Scalar>
59{
60 static constexpr bool extrapolate = true;
61 //typedef H2O<Scalar> H2O_IAPWS;
62 //typedef Brine<Scalar, H2O_IAPWS> Brine_IAPWS;
63 //typedef TabulatedComponent<Scalar, H2O_IAPWS> H2O_Tabulated;
64 //typedef TabulatedComponent<Scalar, Brine_IAPWS> Brine_Tabulated;
65
66 //typedef H2O_Tabulated H2O;
67 //typedef Brine_Tabulated Brine;
68
69
70public:
73 using CO2 = ::Opm::CO2<Scalar>;
74
77
78 explicit BrineCo2Pvt() = default;
79
80 BrineCo2Pvt(const std::vector<Scalar>& salinity,
81 Scalar T_ref = 288.71, //(273.15 + 15.56)
82 Scalar P_ref = 101325)
83 : salinity_(salinity)
84 {
85 // Throw an error if reference state is not (T, p) = (15.56 C, 1 atm) = (288.71 K, 1.01325e5 Pa)
86 if (T_ref != Scalar(288.71) || P_ref != Scalar(1.01325e5)) {
87 OPM_THROW(std::runtime_error,
88 "BrineCo2Pvt class can only be used with default reference state (T, P) = (288.71 K, 1.01325e5 Pa)!");
89 }
90 int num_regions = salinity_.size();
91 co2ReferenceDensity_.resize(num_regions);
92 brineReferenceDensity_.resize(num_regions);
93 for (int i = 0; i < num_regions; ++i) {
94 co2ReferenceDensity_[i] = CO2::gasDensity(T_ref, P_ref, true);
95 brineReferenceDensity_[i] = Brine::liquidDensity(T_ref, P_ref, salinity_[i], true);
96 }
97 }
98
99#if HAVE_ECL_INPUT
104 void initFromState(const EclipseState& eclState, const Schedule&);
105#endif
106
107 void setNumRegions(size_t numRegions)
108 {
109 brineReferenceDensity_.resize(numRegions);
110 co2ReferenceDensity_.resize(numRegions);
111 salinity_.resize(numRegions);
112 }
113
114 void setVapPars(const Scalar, const Scalar)
115 {
116 }
117
121 void setReferenceDensities(unsigned regionIdx,
122 Scalar rhoRefBrine,
123 Scalar rhoRefCO2,
124 Scalar /*rhoRefWater*/)
125 {
126 brineReferenceDensity_[regionIdx] = rhoRefBrine;
127 co2ReferenceDensity_[regionIdx] = rhoRefCO2;
128 }
129
130
134 void initEnd()
135 {
136
137 }
138
145 void setEnableDissolvedGas(bool yesno)
146 { enableDissolution_ = yesno; }
147
155 { enableSaltConcentration_ = yesno; }
156
160 unsigned numRegions() const
161 { return brineReferenceDensity_.size(); }
162
166 template <class Evaluation>
167 Evaluation internalEnergy(unsigned regionIdx,
168 const Evaluation& temperature,
169 const Evaluation& pressure,
170 const Evaluation& Rs,
171 const Evaluation& saltConcentration) const
172 {
173 OPM_TIMEFUNCTION_LOCAL();
174 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
175 const Evaluation xlCO2 = convertRsToXoG_(Rs,regionIdx);
176 return (liquidEnthalpyBrineCO2_(temperature,
177 pressure,
178 salinity,
179 xlCO2)
180 - pressure / density_(regionIdx, temperature, pressure, Rs, salinity ));
181 }
185 template <class Evaluation>
186 Evaluation internalEnergy(unsigned regionIdx,
187 const Evaluation& temperature,
188 const Evaluation& pressure,
189 const Evaluation& Rs) const
190 {
191 OPM_TIMEFUNCTION_LOCAL();
192 const Evaluation xlCO2 = convertRsToXoG_(Rs,regionIdx);
193 return (liquidEnthalpyBrineCO2_(temperature,
194 pressure,
195 Evaluation(salinity_[regionIdx]),
196 xlCO2)
197 - pressure / density_(regionIdx, temperature, pressure, Rs, Evaluation(salinity_[regionIdx])));
198 }
199
203 template <class Evaluation>
204 Evaluation viscosity(unsigned regionIdx,
205 const Evaluation& temperature,
206 const Evaluation& pressure,
207 const Evaluation& /*Rs*/) const
208 {
209 //TODO: The viscosity does not yet depend on the composition
210 return saturatedViscosity(regionIdx, temperature, pressure);
211 }
212
216 template <class Evaluation>
217 Evaluation saturatedViscosity(unsigned regionIdx,
218 const Evaluation& temperature,
219 const Evaluation& pressure,
220 const Evaluation& saltConcentration) const
221 {
222 OPM_TIMEFUNCTION_LOCAL();
223 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
224 return Brine::liquidViscosity(temperature, pressure, salinity);
225 }
226
230 template <class Evaluation>
231 Evaluation viscosity(unsigned regionIdx,
232 const Evaluation& temperature,
233 const Evaluation& pressure,
234 const Evaluation& /*Rsw*/,
235 const Evaluation& saltConcentration) const
236 {
237 OPM_TIMEFUNCTION_LOCAL();
238 //TODO: The viscosity does not yet depend on the composition
239 return saturatedViscosity(regionIdx, temperature, pressure, saltConcentration);
240 }
241
245 template <class Evaluation>
246 Evaluation saturatedViscosity(unsigned regionIdx,
247 const Evaluation& temperature,
248 const Evaluation& pressure) const
249 {
250 OPM_TIMEFUNCTION_LOCAL();
251 return Brine::liquidViscosity(temperature, pressure, Evaluation(salinity_[regionIdx]));
252 }
253
254
258 template <class Evaluation>
259 Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx,
260 const Evaluation& temperature,
261 const Evaluation& pressure,
262 const Evaluation& saltconcentration) const
263 {
264 OPM_TIMEFUNCTION_LOCAL();
265 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltconcentration);
266 Evaluation rsSat = rsSat_(regionIdx, temperature, pressure, salinity);
267 return (1.0 - convertRsToXoG_(rsSat,regionIdx)) * density_(regionIdx, temperature, pressure, rsSat, salinity)/brineReferenceDensity_[regionIdx];
268 }
272 template <class Evaluation>
273 Evaluation inverseFormationVolumeFactor(unsigned regionIdx,
274 const Evaluation& temperature,
275 const Evaluation& pressure,
276 const Evaluation& Rs,
277 const Evaluation& saltConcentration) const
278 {
279 OPM_TIMEFUNCTION_LOCAL();
280 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
281 return (1.0 - convertRsToXoG_(Rs,regionIdx)) * density_(regionIdx, temperature, pressure, Rs, salinity)/brineReferenceDensity_[regionIdx];
282 }
286 template <class Evaluation>
287 Evaluation inverseFormationVolumeFactor(unsigned regionIdx,
288 const Evaluation& temperature,
289 const Evaluation& pressure,
290 const Evaluation& Rs) const
291 {
292 return (1.0 - convertRsToXoG_(Rs,regionIdx)) * density_(regionIdx, temperature, pressure, Rs, Evaluation(salinity_[regionIdx]))/brineReferenceDensity_[regionIdx];
293 }
294
298 template <class Evaluation>
299 Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx,
300 const Evaluation& temperature,
301 const Evaluation& pressure) const
302 {
303 OPM_TIMEFUNCTION_LOCAL();
304 Evaluation rsSat = rsSat_(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
305 return (1.0 - convertRsToXoG_(rsSat,regionIdx)) * density_(regionIdx, temperature, pressure, rsSat, Evaluation(salinity_[regionIdx]))/brineReferenceDensity_[regionIdx];
306 }
307
314 template <class Evaluation>
315 Evaluation saturationPressure(unsigned /*regionIdx*/,
316 const Evaluation& /*temperature*/,
317 const Evaluation& /*Rs*/) const
318 {
319 throw std::runtime_error("Requested the saturation pressure for the brine-co2 pvt module. Not yet implemented.");
320 }
321
328 template <class Evaluation>
329 Evaluation saturationPressure(unsigned /*regionIdx*/,
330 const Evaluation& /*temperature*/,
331 const Evaluation& /*Rs*/,
332 const Evaluation& /*saltConcentration*/) const
333 {
334 throw std::runtime_error("Requested the saturation pressure for the brine-co2 pvt module. Not yet implemented.");
335 }
336
340 template <class Evaluation>
341 Evaluation saturatedGasDissolutionFactor(unsigned regionIdx,
342 const Evaluation& temperature,
343 const Evaluation& pressure,
344 const Evaluation& /*oilSaturation*/,
345 const Evaluation& /*maxOilSaturation*/) const
346 {
347 //TODO support VAPPARS
348 return rsSat_(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
349 }
350
354 template <class Evaluation>
355 Evaluation saturatedGasDissolutionFactor(unsigned regionIdx,
356 const Evaluation& temperature,
357 const Evaluation& pressure,
358 const Evaluation& saltConcentration) const
359 {
360 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
361 return rsSat_(regionIdx, temperature, pressure, salinity);
362 }
363
367 template <class Evaluation>
368 Evaluation saturatedGasDissolutionFactor(unsigned regionIdx,
369 const Evaluation& temperature,
370 const Evaluation& pressure) const
371 {
372 return rsSat_(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
373 }
374
375 const Scalar oilReferenceDensity(unsigned regionIdx) const
376 { return brineReferenceDensity_[regionIdx]; }
377
378 const Scalar waterReferenceDensity(unsigned regionIdx) const
379 { return brineReferenceDensity_[regionIdx]; }
380
381 const Scalar gasReferenceDensity(unsigned regionIdx) const
382 { return co2ReferenceDensity_[regionIdx]; }
383
384 const Scalar salinity(unsigned regionIdx) const
385 { return salinity_[regionIdx]; }
386
387
388 template <class Evaluation>
389 Evaluation diffusionCoefficient(const Evaluation& temperature,
390 const Evaluation& pressure,
391 unsigned /*compIdx*/) const
392 {
393 OPM_TIMEFUNCTION_LOCAL();
394 //Diffusion coefficient of CO2 in pure water according to (McLachlan and Danckwerts, 1972)
395 const Evaluation log_D_H20 = -4.1764 + 712.52 / temperature - 2.5907e5 / (temperature*temperature);
396
397 //Diffusion coefficient of CO2 in the brine phase modified following (Ratcliff and Holdcroft,1963 and Al-Rawajfeh, 2004)
398 const Evaluation& mu_H20 = H2O::liquidViscosity(temperature, pressure, extrapolate); // Water viscosity
399 const Evaluation& mu_Brine = Brine::liquidViscosity(temperature, pressure, Evaluation(salinity_[0])); // Brine viscosity
400 const Evaluation log_D_Brine = log_D_H20 - 0.87*log10(mu_Brine / mu_H20);
401
402 return pow(Evaluation(10), log_D_Brine) * 1e-4; // convert from cm2/s to m2/s
403 }
404
405private:
406 std::vector<Scalar> brineReferenceDensity_;
407 std::vector<Scalar> co2ReferenceDensity_;
408 std::vector<Scalar> salinity_;
409 bool enableDissolution_ = true;
410 bool enableSaltConcentration_ = false;
411
412 template <class LhsEval>
413 LhsEval density_(unsigned regionIdx,
414 const LhsEval& temperature,
415 const LhsEval& pressure,
416 const LhsEval& Rs,
417 const LhsEval& salinity) const
418 {
419 OPM_TIMEFUNCTION_LOCAL();
420 LhsEval xlCO2 = convertXoGToxoG_(convertRsToXoG_(Rs,regionIdx), salinity);
421 LhsEval result = liquidDensity_(temperature,
422 pressure,
423 xlCO2,
424 salinity);
425
426 Valgrind::CheckDefined(result);
427 return result;
428 }
429
430
431 template <class LhsEval>
432 LhsEval liquidDensity_(const LhsEval& T,
433 const LhsEval& pl,
434 const LhsEval& xlCO2,
435 const LhsEval& salinity) const
436 {
437 OPM_TIMEFUNCTION_LOCAL();
438 Valgrind::CheckDefined(T);
439 Valgrind::CheckDefined(pl);
440 Valgrind::CheckDefined(xlCO2);
441
442 if(!extrapolate && T < 273.15) {
443 const std::string msg =
444 "Liquid density for Brine and CO2 is only "
445 "defined above 273.15K (is " +
446 std::to_string(getValue(T)) + "K)";
447 throw NumericalProblem(msg);
448 }
449 if(!extrapolate && pl >= 2.5e8) {
450 const std::string msg =
451 "Liquid density for Brine and CO2 is only "
452 "defined below 250MPa (is " +
453 std::to_string(getValue(pl)) + "Pa)";
454 throw NumericalProblem(msg);
455 }
456
457 const LhsEval& rho_brine = Brine::liquidDensity(T, pl, salinity, extrapolate);
458 const LhsEval& rho_pure = H2O::liquidDensity(T, pl, extrapolate);
459 const LhsEval& rho_lCO2 = liquidDensityWaterCO2_(T, pl, xlCO2);
460 const LhsEval& contribCO2 = rho_lCO2 - rho_pure;
461
462 return rho_brine + contribCO2;
463 }
464
465 template <class LhsEval>
466 LhsEval liquidDensityWaterCO2_(const LhsEval& temperature,
467 const LhsEval& pl,
468 const LhsEval& xlCO2) const
469 {
470 OPM_TIMEFUNCTION_LOCAL();
471 Scalar M_CO2 = CO2::molarMass();
472 Scalar M_H2O = H2O::molarMass();
473
474 const LhsEval& tempC = temperature - 273.15; /* tempC : temperature in °C */
475 const LhsEval& rho_pure = H2O::liquidDensity(temperature, pl, extrapolate);
476 // calculate the mole fraction of CO2 in the liquid. note that xlH2O is available
477 // as a function parameter, but in the case of a pure gas phase the value of M_T
478 // for the virtual liquid phase can become very large
479 const LhsEval xlH2O = 1.0 - xlCO2;
480 const LhsEval& M_T = M_H2O * xlH2O + M_CO2 * xlCO2;
481 const LhsEval& V_phi =
482 (37.51 +
483 tempC*(-9.585e-2 +
484 tempC*(8.74e-4 -
485 tempC*5.044e-7))) / 1.0e6;
486 return 1/ (xlCO2 * V_phi/M_T + M_H2O * xlH2O / (rho_pure * M_T));
487 }
488
493 template <class LhsEval>
494 LhsEval convertRsToXoG_(const LhsEval& Rs, unsigned regionIdx) const
495 {
496 OPM_TIMEFUNCTION_LOCAL();
497 Scalar rho_oRef = brineReferenceDensity_[regionIdx];
498 Scalar rho_gRef = co2ReferenceDensity_[regionIdx];
499
500 const LhsEval& rho_oG = Rs*rho_gRef;
501 return rho_oG/(rho_oRef + rho_oG);
502 }
503
504
508 template <class LhsEval>
509 LhsEval convertXoGToxoG_(const LhsEval& XoG, const LhsEval& salinity) const
510 {
511 OPM_TIMEFUNCTION_LOCAL();
512 Scalar M_CO2 = CO2::molarMass();
513 LhsEval M_Brine = Brine::molarMass(salinity);
514 return XoG*M_Brine / (M_CO2*(1 - XoG) + XoG*M_Brine);
515 }
516
517
521 template <class LhsEval>
522 LhsEval convertxoGToXoG(const LhsEval& xoG, const LhsEval& salinity) const
523 {
524 OPM_TIMEBLOCK_LOCAL(convertxoGToXoG);
525 Scalar M_CO2 = CO2::molarMass();
526 LhsEval M_Brine = Brine::molarMass(salinity);
527
528 return xoG*M_CO2 / (xoG*(M_CO2 - M_Brine) + M_Brine);
529 }
530
531
536 template <class LhsEval>
537 LhsEval convertXoGToRs(const LhsEval& XoG, unsigned regionIdx) const
538 {
539 Scalar rho_oRef = brineReferenceDensity_[regionIdx];
540 Scalar rho_gRef = co2ReferenceDensity_[regionIdx];
541
542 return XoG/(1.0 - XoG)*(rho_oRef/rho_gRef);
543 }
544
545
546 template <class LhsEval>
547 LhsEval rsSat_(unsigned regionIdx,
548 const LhsEval& temperature,
549 const LhsEval& pressure,
550 const LhsEval& salinity) const
551 {
552 OPM_TIMEFUNCTION_LOCAL();
553 if (!enableDissolution_)
554 return 0.0;
555
556 // calulate the equilibrium composition for the given
557 // temperature and pressure.
558 LhsEval xgH2O;
559 LhsEval xlCO2;
561 pressure,
562 salinity,
563 /*knownPhaseIdx=*/-1,
564 xlCO2,
565 xgH2O,
566 extrapolate);
567
568 // normalize the phase compositions
569 xlCO2 = max(0.0, min(1.0, xlCO2));
570
571 return convertXoGToRs(convertxoGToXoG(xlCO2, salinity), regionIdx);
572 }
573
574 template <class LhsEval>
575 static LhsEval liquidEnthalpyBrineCO2_(const LhsEval& T,
576 const LhsEval& p,
577 const LhsEval& salinity,
578 const LhsEval& X_CO2_w)
579 {
580 OPM_TIMEFUNCTION_LOCAL();
581 /* X_CO2_w : mass fraction of CO2 in brine */
582
583 /* same function as enthalpy_brine, only extended by CO2 content */
584
585 /*Numerical coefficents from PALLISER*/
586 static constexpr Scalar f[] = {
587 2.63500E-1, 7.48368E-6, 1.44611E-6, -3.80860E-10
588 };
589
590 /*Numerical coefficents from MICHAELIDES for the enthalpy of brine*/
591 static constexpr Scalar a[4][3] = {
592 { 9633.6, -4080.0, +286.49 },
593 { +166.58, +68.577, -4.6856 },
594 { -0.90963, -0.36524, +0.249667E-1 },
595 { +0.17965E-2, +0.71924E-3, -0.4900E-4 }
596 };
597
598 LhsEval theta, h_NaCl;
599 LhsEval h_ls1, d_h;
600 LhsEval delta_h;
601 LhsEval delta_hCO2, hg, hw;
602
603 theta = T - 273.15;
604
605 // Regularization
606 Scalar scalarTheta = scalarValue(theta);
607 Scalar S_lSAT = f[0] + scalarTheta*(f[1] + scalarTheta*(f[2] + scalarTheta*f[3]));
608
609 LhsEval S = salinity;
610 if (S > S_lSAT)
611 S = S_lSAT;
612
613 hw = H2O::liquidEnthalpy(T, p) /1E3; /* kJ/kg */
614
615 /*DAUBERT and DANNER*/
616 /*U=*/h_NaCl = (3.6710E4*T + 0.5*(6.2770E1)*T*T - ((6.6670E-2)/3)*T*T*T
617 +((2.8000E-5)/4)*(T*T*T*T))/(58.44E3)- 2.045698e+02; /* kJ/kg */
618
619 LhsEval m = 1E3/58.44 * S/(1-S);
620 int i = 0;
621 int j = 0;
622 d_h = 0;
623
624 for (i = 0; i<=3; i++) {
625 for (j=0; j<=2; j++) {
626 d_h = d_h + a[i][j] * pow(theta, static_cast<Scalar>(i)) * pow(m, j);
627 }
628 }
629 /* heat of dissolution for halite according to Michaelides 1971 */
630 delta_h = (4.184/(1E3 + (58.44 * m)))*d_h;
631
632 /* Enthalpy of brine without CO2 */
633 h_ls1 =(1-S)*hw + S*h_NaCl + S*delta_h; /* kJ/kg */
634
635 /* heat of dissolution for CO2 according to Fig. 6 in Duan and Sun 2003. (kJ/kg)
636 In the relevant temperature ranges CO2 dissolution is
637 exothermal */
638 delta_hCO2 = (-57.4375 + T * 0.1325) * 1000/44;
639
640 /* enthalpy contribution of CO2 (kJ/kg) */
641 hg = CO2::gasEnthalpy(T, p, extrapolate)/1E3 + delta_hCO2;
642
643 /* Enthalpy of brine with dissolved CO2 */
644 return (h_ls1 - X_CO2_w*hw + hg*X_CO2_w)*1E3; /*J/kg*/
645 }
646
647 template <class LhsEval>
648 const LhsEval salinityFromConcentration(unsigned regionIdx, const LhsEval&T, const LhsEval& P, const LhsEval& saltConcentration) const
649 {
650 if (enableSaltConcentration_)
651 return saltConcentration/H2O::liquidDensity(T, P, true);
652
653 return salinity(regionIdx);
654 }
655};
656
657} // namespace Opm
658
659#endif
A class for the brine fluid properties.
Binary coefficients for brine and CO2.
A class for the CO2 fluid properties.
A central place for various physical constants occuring in some equations.
Provides the OPM specific exception classes.
Binary coefficients for water and CO2.
A simple version of pure water with density from Hu et al.
A generic class which tabulates all thermodynamic properties of a given component.
Implements a scalar function that depends on two variables and which is sampled on an uniform X-Y gri...
Binary coefficients for brine and CO2.
Definition Brine_CO2.hpp:42
static void calculateMoleFractions(const Evaluation &temperature, const Evaluation &pg, const Evaluation &salinity, const int knownPhaseIdx, Evaluation &xlCO2, Evaluation &ygH2O, bool extrapolate=false)
Returns the mol (!) fraction of CO2 in the liquid phase and the mol_ (!) fraction of H2O in the gas p...
Definition Brine_CO2.hpp:97
This class represents the Pressure-Volume-Temperature relations of the liquid phase for a CO2-Brine s...
Definition BrineCo2Pvt.hpp:59
Evaluation internalEnergy(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
Returns the specific enthalpy [J/kg] of gas given a set of parameters.
Definition BrineCo2Pvt.hpp:186
Evaluation viscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &, const Evaluation &saltConcentration) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition BrineCo2Pvt.hpp:231
Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs, const Evaluation &saltConcentration) const
Returns the formation volume factor [-] of the fluid phase.
Definition BrineCo2Pvt.hpp:273
Evaluation internalEnergy(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs, const Evaluation &saltConcentration) const
Returns the specific enthalpy [J/kg] of gas given a set of parameters.
Definition BrineCo2Pvt.hpp:167
Evaluation saturatedGasDissolutionFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &, const Evaluation &) const
Returns the gas dissoluiton factor [m^3/m^3] of the liquid phase.
Definition BrineCo2Pvt.hpp:341
Evaluation saturatedGasDissolutionFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &saltConcentration) const
Returns the gas dissoluiton factor [m^3/m^3] of the liquid phase.
Definition BrineCo2Pvt.hpp:355
Evaluation saturatedViscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the dynamic viscosity [Pa s] of oil saturated gas at given pressure.
Definition BrineCo2Pvt.hpp:246
Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
Returns the formation volume factor [-] of the fluid phase.
Definition BrineCo2Pvt.hpp:287
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition BrineCo2Pvt.hpp:160
Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &saltconcentration) const
Returns the formation volume factor [-] of the fluid phase.
Definition BrineCo2Pvt.hpp:259
Evaluation saturationPressure(unsigned, const Evaluation &, const Evaluation &) const
Returns the saturation pressure of the brine phase [Pa] depending on its mass fraction of the gas com...
Definition BrineCo2Pvt.hpp:315
void initEnd()
Finish initializing the oil phase PVT properties.
Definition BrineCo2Pvt.hpp:134
Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the formation volume factor [-] of brine saturated with CO2 at a given pressure.
Definition BrineCo2Pvt.hpp:299
Evaluation saturationPressure(unsigned, const Evaluation &, const Evaluation &, const Evaluation &) const
Returns the saturation pressure of the brine phase [Pa] depending on its mass fraction of the gas com...
Definition BrineCo2Pvt.hpp:329
Evaluation saturatedViscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &saltConcentration) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition BrineCo2Pvt.hpp:217
void setReferenceDensities(unsigned regionIdx, Scalar rhoRefBrine, Scalar rhoRefCO2, Scalar)
Initialize the reference densities of all fluids for a given PVT region.
Definition BrineCo2Pvt.hpp:121
void setEnableSaltConcentration(bool yesno)
Specify whether the PVT model should consider salt concentration from the fluidstate or a fixed salin...
Definition BrineCo2Pvt.hpp:154
Evaluation viscosity(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &) const
Returns the dynamic viscosity [Pa s] of the fluid phase given a set of parameters.
Definition BrineCo2Pvt.hpp:204
Evaluation saturatedGasDissolutionFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns thegas dissoluiton factor [m^3/m^3] of the liquid phase.
Definition BrineCo2Pvt.hpp:368
void setEnableDissolvedGas(bool yesno)
Specify whether the PVT model should consider that the CO2 component can dissolve in the brine phase.
Definition BrineCo2Pvt.hpp:145
A class for the brine fluid properties.
Definition BrineDynamic.hpp:46
static Evaluation liquidDensity(const Evaluation &temperature, const Evaluation &pressure, const Evaluation &salinity, bool extrapolate=false)
The density of the liquid component at a given pressure in and temperature in .
Definition BrineDynamic.hpp:261
static Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &, const Evaluation &salinity)
The dynamic viscosity of pure water.
Definition BrineDynamic.hpp:338
A class for the CO2 fluid properties.
Definition CO2.hpp:53
static Evaluation gasEnthalpy(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
Specific enthalpy of gaseous CO2 [J/kg].
Definition CO2.hpp:168
static Scalar molarMass()
The mass in [kg] of one mole of CO2.
Definition CO2.hpp:70
static Evaluation gasDensity(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate=false)
The density of CO2 at a given pressure and temperature [kg/m^3].
Definition CO2.hpp:193
static Scalar molarMass()
The molar mass in of the component.
Definition Component.hpp:91
Definition EclipseState.hpp:57
Definition Schedule.hpp:133
A simple version of pure water with density from Hu et al.
Definition SimpleHuDuanH2O.hpp:64
static Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &)
Specific enthalpy of liquid water .
Definition SimpleHuDuanH2O.hpp:197
static Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate)
The dynamic viscosity of pure water.
Definition SimpleHuDuanH2O.hpp:350
static Evaluation liquidDensity(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate)
The density of pure water at a given pressure and temperature .
Definition SimpleHuDuanH2O.hpp:309
static Scalar molarMass()
The molar mass in of water.
Definition SimpleHuDuanH2O.hpp:98
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30