My Project
Loading...
Searching...
No Matches
BrineH2Pvt.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/*
4This file is part of the Open Porous Media project (OPM).
5
6OPM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 2 of the License, or
9(at your option) any later version.
10
11OPM is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19Consult the COPYING file in the top-level source directory of this
20module for the precise wording of the license and the list of
21copyright holders.
22*/
27#ifndef OPM_BRINE_H2_PVT_HPP
28#define OPM_BRINE_H2_PVT_HPP
29
31
38
39#include <vector>
40
41namespace Opm {
42
43#if HAVE_ECL_INPUT
44class EclipseState;
45class Schedule;
46#endif
47
51template <class Scalar>
53{
54 static const bool extrapolate = true;
55public:
58 using H2 = ::Opm::H2<Scalar>;
59
60 // The binary coefficients for brine and H2 used by this fluid system
62
63 explicit BrineH2Pvt() = default;
64
65 BrineH2Pvt(const std::vector<Scalar>& salinity,
66 Scalar T_ref = 288.71, //(273.15 + 15.56)
67 Scalar P_ref = 101325)
68 : salinity_(salinity)
69 {
70 int num_regions = salinity_.size();
71 h2ReferenceDensity_.resize(num_regions);
72 brineReferenceDensity_.resize(num_regions);
73 for (int i = 0; i < num_regions; ++i) {
74 h2ReferenceDensity_[i] = H2::gasDensity(T_ref, P_ref, true);
75 brineReferenceDensity_[i] = Brine::liquidDensity(T_ref, P_ref, salinity_[i], true);
76 }
77 }
78
79#if HAVE_ECL_INPUT
84 void initFromState(const EclipseState& eclState, const Schedule&);
85#endif
86
87 void setNumRegions(size_t numRegions)
88 {
89 brineReferenceDensity_.resize(numRegions);
90 h2ReferenceDensity_.resize(numRegions);
91 salinity_.resize(numRegions);
92 }
93
94 void setVapPars(const Scalar, const Scalar)
95 {
96 }
97
101 void setReferenceDensities(unsigned regionIdx,
102 Scalar rhoRefBrine,
103 Scalar rhoRefH2,
104 Scalar /*rhoRefWater*/)
105 {
106 brineReferenceDensity_[regionIdx] = rhoRefBrine;
107 h2ReferenceDensity_[regionIdx] = rhoRefH2;
108 }
109
113 void initEnd()
114 {
115 }
116
123 void setEnableDissolvedGas(bool yesno)
124 { enableDissolution_ = yesno; }
125
133 { enableSaltConcentration_ = yesno; }
134
138 unsigned numRegions() const
139 { return brineReferenceDensity_.size(); }
140
144 template <class Evaluation>
145 Evaluation internalEnergy(unsigned regionIdx,
146 const Evaluation& temperature,
147 const Evaluation& pressure,
148 const Evaluation& Rs,
149 const Evaluation& saltConcentration) const
150 {
151 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
152 const Evaluation xlH2 = convertRsToXoG_(Rs,regionIdx);
153 return (liquidEnthalpyBrineH2_(temperature,
154 pressure,
155 salinity,
156 xlH2)
157 - pressure / density_(regionIdx, temperature, pressure, Rs, salinity ));
158 }
159
163 template <class Evaluation>
164 Evaluation internalEnergy(unsigned regionIdx,
165 const Evaluation& temperature,
166 const Evaluation& pressure,
167 const Evaluation& Rs) const
168 {
169 const Evaluation xlH2 = convertRsToXoG_(Rs,regionIdx);
170 return (liquidEnthalpyBrineH2_(temperature,
171 pressure,
172 Evaluation(salinity_[regionIdx]),
173 xlH2)
174 - pressure / density_(regionIdx, temperature, pressure, Rs, Evaluation(salinity_[regionIdx])));
175 }
176
180 template <class Evaluation>
181 Evaluation viscosity(unsigned regionIdx,
182 const Evaluation& temperature,
183 const Evaluation& pressure,
184 const Evaluation& /*Rs*/) const
185 {
186 //TODO: The viscosity does not yet depend on the composition
187 return saturatedViscosity(regionIdx, temperature, pressure);
188 }
189
193 template <class Evaluation>
194 Evaluation saturatedViscosity(unsigned regionIdx,
195 const Evaluation& temperature,
196 const Evaluation& pressure,
197 const Evaluation& saltConcentration) const
198 {
199 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
200 return Brine::liquidViscosity(temperature, pressure, salinity);
201 }
202
206 template <class Evaluation>
207 Evaluation viscosity(unsigned regionIdx,
208 const Evaluation& temperature,
209 const Evaluation& pressure,
210 const Evaluation& /*Rsw*/,
211 const Evaluation& saltConcentration) const
212 {
213 //TODO: The viscosity does not yet depend on the composition
214 return saturatedViscosity(regionIdx, temperature, pressure, saltConcentration);
215 }
216
220 template <class Evaluation>
221 Evaluation saturatedViscosity(unsigned regionIdx,
222 const Evaluation& temperature,
223 const Evaluation& pressure) const
224 {
225 return Brine::liquidViscosity(temperature, pressure, Evaluation(salinity_[regionIdx]));
226 }
227
231 template <class Evaluation>
232 Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx,
233 const Evaluation& temperature,
234 const Evaluation& pressure,
235 const Evaluation& saltconcentration) const
236 {
237 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltconcentration);
238 Evaluation rsSat = rsSat_(regionIdx, temperature, pressure, salinity);
239 return (1.0 - convertRsToXoG_(rsSat,regionIdx)) *
240 density_(regionIdx, temperature, pressure, rsSat, salinity) / brineReferenceDensity_[regionIdx];
241 }
242
246 template <class Evaluation>
247 Evaluation inverseFormationVolumeFactor(unsigned regionIdx,
248 const Evaluation& temperature,
249 const Evaluation& pressure,
250 const Evaluation& Rs,
251 const Evaluation& saltConcentration) const
252 {
253 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
254 return (1.0 - convertRsToXoG_(Rs,regionIdx)) *
255 density_(regionIdx, temperature, pressure, Rs, salinity) / brineReferenceDensity_[regionIdx];
256 }
257
261 template <class Evaluation>
262 Evaluation inverseFormationVolumeFactor(unsigned regionIdx,
263 const Evaluation& temperature,
264 const Evaluation& pressure,
265 const Evaluation& Rs) const
266 {
267 return (1.0 - convertRsToXoG_(Rs, regionIdx)) *
268 density_(regionIdx, temperature, pressure, Rs, Evaluation(salinity_[regionIdx])) /
269 brineReferenceDensity_[regionIdx];
270 }
271
275 template <class Evaluation>
276 Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx,
277 const Evaluation& temperature,
278 const Evaluation& pressure) const
279 {
280 Evaluation rsSat = rsSat_(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
281 return (1.0 - convertRsToXoG_(rsSat, regionIdx)) *
282 density_(regionIdx, temperature, pressure, rsSat, Evaluation(salinity_[regionIdx])) /
283 brineReferenceDensity_[regionIdx];
284 }
285
291 template <class Evaluation>
292 Evaluation saturationPressure(unsigned /*regionIdx*/,
293 const Evaluation& /*temperature*/,
294 const Evaluation& /*Rs*/) const
295 {
296 throw std::runtime_error("Saturation pressure for the Brine-H2 PVT module has not been implemented yet!");
297 }
298
304 template <class Evaluation>
305 Evaluation saturationPressure(unsigned /*regionIdx*/,
306 const Evaluation& /*temperature*/,
307 const Evaluation& /*Rs*/,
308 const Evaluation& /*saltConcentration*/) const
309 {
310 throw std::runtime_error("Saturation pressure for the Brine-H2 PVT module has not been implemented yet!");
311 }
312
316 template <class Evaluation>
317 Evaluation saturatedGasDissolutionFactor(unsigned regionIdx,
318 const Evaluation& temperature,
319 const Evaluation& pressure,
320 const Evaluation& /*oilSaturation*/,
321 const Evaluation& /*maxOilSaturation*/) const
322 {
323 //TODO support VAPPARS
324 return rsSat_(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
325 }
326
330 template <class Evaluation>
331 Evaluation saturatedGasDissolutionFactor(unsigned regionIdx,
332 const Evaluation& temperature,
333 const Evaluation& pressure,
334 const Evaluation& saltConcentration) const
335 {
336 const Evaluation salinity = salinityFromConcentration(regionIdx, temperature, pressure, saltConcentration);
337 return rsSat_(regionIdx, temperature, pressure, salinity);
338 }
339
343 template <class Evaluation>
344 Evaluation saturatedGasDissolutionFactor(unsigned regionIdx,
345 const Evaluation& temperature,
346 const Evaluation& pressure) const
347 {
348 return rsSat_(regionIdx, temperature, pressure, Evaluation(salinity_[regionIdx]));
349 }
350
351 const Scalar oilReferenceDensity(unsigned regionIdx) const
352 { return brineReferenceDensity_[regionIdx]; }
353
354 const Scalar waterReferenceDensity(unsigned regionIdx) const
355 { return brineReferenceDensity_[regionIdx]; }
356
357 const Scalar gasReferenceDensity(unsigned regionIdx) const
358 { return h2ReferenceDensity_[regionIdx]; }
359
360 const Scalar salinity(unsigned regionIdx) const
361 { return salinity_[regionIdx]; }
362
366 template <class Evaluation>
367 Evaluation diffusionCoefficient(const Evaluation& temperature,
368 const Evaluation& pressure,
369 unsigned /*compIdx*/) const
370 {
371 // Diffusion coefficient of H2 in pure water according to Ferrell & Himmelbau, AIChE Journal, 13(4), 1967 (Eq.
372 // 23)
373 // Some intermediate calculations and definitions
374 const Scalar vm = 28.45; // molar volume at normal boiling point (20.271 K and 1 atm) in cm2/mol
375 const Scalar sigma = 2.96 * 1e-8; // Lennard-Jones 6-12 potential in cm (1 Å = 1e-8 cm)
376 const Scalar avogadro = 6.022e23; // Avogrado's number in mol^-1
377 const Scalar alpha = sigma / pow((vm / avogadro), 1 / 3); // Eq. (19)
378 const Scalar lambda = 1.729; // quantum parameter [-]
379 const Evaluation& mu_pure = H2O::liquidViscosity(temperature, pressure, extrapolate) * 1e3; // [cP]
380 const Evaluation& mu_brine = Brine::liquidViscosity(temperature, pressure, Evaluation(salinity_[0])) * 1e3;
381
382 // Diffusion coeff in pure water in cm2/s
383 const Evaluation D_pure = ((4.8e-7 * temperature) / pow(mu_pure, alpha)) * pow((1 + pow(lambda, 2)) / vm, 0.6);
384
385 // Diffusion coefficient in brine using Ratcliff and Holdcroft, J. G. Trans. Inst. Chem. Eng, 1963. OBS: Value
386 // of n is noted as the recommended single value according to Akita, Ind. Eng. Chem. Fundam., 1981.
387 const Evaluation log_D_brine = log10(D_pure) - 0.637 * log10(mu_brine / mu_pure);
388
389 return pow(Evaluation(10), log_D_brine) * 1e-4; // convert from cm2/s to m2/s
390 }
391
392private:
393 std::vector<Scalar> brineReferenceDensity_;
394 std::vector<Scalar> h2ReferenceDensity_;
395 std::vector<Scalar> salinity_;
396 bool enableDissolution_ = true;
397 bool enableSaltConcentration_ = false;
398
406 template <class LhsEval>
407 LhsEval density_(unsigned regionIdx,
408 const LhsEval& temperature,
409 const LhsEval& pressure,
410 const LhsEval& Rs,
411 const LhsEval& salinity) const
412 {
413 // convert Rs to mole fraction (via mass fraction)
414 LhsEval xlH2 = convertXoGToxoG_(convertRsToXoG_(Rs,regionIdx), salinity);
415
416 // calculate the density of solution
417 LhsEval result = liquidDensity_(temperature,
418 pressure,
419 xlH2,
420 salinity);
421
422 Valgrind::CheckDefined(result);
423 return result;
424 }
425
434 template <class LhsEval>
435 LhsEval liquidDensity_(const LhsEval& T,
436 const LhsEval& pl,
437 const LhsEval& xlH2,
438 const LhsEval& salinity) const
439 {
440 // check input variables
441 Valgrind::CheckDefined(T);
442 Valgrind::CheckDefined(pl);
443 Valgrind::CheckDefined(xlH2);
444
445 // check if pressure and temperature is valid
446 if(!extrapolate && T < 273.15) {
447 const std::string msg =
448 "Liquid density for Brine and H2 is only "
449 "defined above 273.15K (is " +
450 std::to_string(getValue(T)) + "K)";
451 throw NumericalProblem(msg);
452 }
453 if(!extrapolate && pl >= 2.5e8) {
454 const std::string msg =
455 "Liquid density for Brine and H2 is only "
456 "defined below 250MPa (is " +
457 std::to_string(getValue(pl)) + "Pa)";
458 throw NumericalProblem(msg);
459 }
460
461 // calculate individual contribution to density
462 const LhsEval& rho_brine = Brine::liquidDensity(T, pl, salinity, extrapolate);
463 const LhsEval& rho_pure = H2O::liquidDensity(T, pl, extrapolate);
464 const LhsEval& rho_lH2 = liquidDensityWaterH2_(T, pl, xlH2);
465 const LhsEval& contribH2 = rho_lH2 - rho_pure;
466
467 return rho_brine + contribH2;
468 }
469
478 template <class LhsEval>
479 LhsEval liquidDensityWaterH2_(const LhsEval& temperature,
480 const LhsEval& pl,
481 const LhsEval& xlH2) const
482 {
483 // molar masses
484 Scalar M_H2 = H2::molarMass();
485 Scalar M_H2O = H2O::molarMass();
486
487 // density of pure water
488 const LhsEval& rho_pure = H2O::liquidDensity(temperature, pl, extrapolate);
489
490 // (apparent) molar volume of H2, Eq. (14) in Li et al. (2018)
491 const LhsEval& A1 = 51.1904 - 0.208062*temperature + 3.4427e-4*(temperature*temperature);
492 const LhsEval& A2 = -0.022;
493 const LhsEval& V_phi = (A1 + A2 * (pl / 1e6)) / 1e6; // pressure in [MPa] and Vphi in [m3/mol] (from [cm3/mol])
494
495 // density of solution, Eq. (19) in Garcia (2001)
496 const LhsEval xlH2O = 1.0 - xlH2;
497 const LhsEval& M_T = M_H2O * xlH2O + M_H2 * xlH2;
498 const LhsEval& rho_aq = 1 / (xlH2 * V_phi/M_T + M_H2O * xlH2O / (rho_pure * M_T));
499
500 return rho_aq;
501 }
502
510 template <class LhsEval>
511 LhsEval convertRsToXoG_(const LhsEval& Rs, unsigned regionIdx) const
512 {
513 Scalar rho_oRef = brineReferenceDensity_[regionIdx];
514 Scalar rho_gRef = h2ReferenceDensity_[regionIdx];
515
516 const LhsEval& rho_oG = Rs*rho_gRef;
517 return rho_oG/(rho_oRef + rho_oG);
518 }
519
525 template <class LhsEval>
526 LhsEval convertXoGToxoG_(const LhsEval& XoG, const LhsEval& salinity) const
527 {
528 Scalar M_H2 = H2::molarMass();
529 LhsEval M_Brine = Brine::molarMass(salinity);
530 return XoG*M_Brine / (M_H2*(1 - XoG) + XoG*M_Brine);
531 }
532
538 template <class LhsEval>
539 LhsEval convertxoGToXoG(const LhsEval& xoG, const LhsEval& salinity) const
540 {
541 Scalar M_H2 = H2::molarMass();
542 LhsEval M_Brine = Brine::molarMass(salinity);
543
544 return xoG*M_H2 / (xoG*(M_H2 - M_Brine) + M_Brine);
545 }
546
554 template <class LhsEval>
555 LhsEval convertXoGToRs(const LhsEval& XoG, unsigned regionIdx) const
556 {
557 Scalar rho_oRef = brineReferenceDensity_[regionIdx];
558 Scalar rho_gRef = h2ReferenceDensity_[regionIdx];
559
560 return XoG/(1.0 - XoG)*(rho_oRef/rho_gRef);
561 }
562
570 template <class LhsEval>
571 LhsEval rsSat_(unsigned regionIdx,
572 const LhsEval& temperature,
573 const LhsEval& pressure,
574 const LhsEval& salinity) const
575 {
576 // Return Rs=0.0 if dissolution is disabled
577 if (!enableDissolution_)
578 return 0.0;
579
580 // calulate the equilibrium composition for the given temperature and pressure
581 LhsEval xlH2 = BinaryCoeffBrineH2::calculateMoleFractions(temperature, pressure, salinity, extrapolate);
582
583 // normalize the phase compositions
584 xlH2 = max(0.0, min(1.0, xlH2));
585
586 return convertXoGToRs(convertxoGToXoG(xlH2, salinity), regionIdx);
587 }
588
589 template <class LhsEval>
590 static LhsEval liquidEnthalpyBrineH2_(const LhsEval& T,
591 const LhsEval& p,
592 const LhsEval& salinity,
593 const LhsEval& X_H2_w)
594 {
595 /* X_H2_w : mass fraction of H2 in brine */
596 /*NOTE: The heat of dissolution of H2 in brine is not included at the moment!*/
597
598 /*Numerical coefficents from PALLISER*/
599 static constexpr Scalar f[] = {
600 2.63500E-1, 7.48368E-6, 1.44611E-6, -3.80860E-10
601 };
602
603 /*Numerical coefficents from MICHAELIDES for the enthalpy of brine*/
604 static constexpr Scalar a[4][3] = {
605 { 9633.6, -4080.0, +286.49 },
606 { +166.58, +68.577, -4.6856 },
607 { -0.90963, -0.36524, +0.249667E-1 },
608 { +0.17965E-2, +0.71924E-3, -0.4900E-4 }
609 };
610
611 LhsEval theta, h_NaCl;
612 LhsEval h_ls1, d_h;
613 LhsEval delta_h;
614 LhsEval hg, hw;
615
616 // Temperature in Celsius
617 theta = T - 273.15;
618
619 // Regularization
620 Scalar scalarTheta = scalarValue(theta);
621 Scalar S_lSAT = f[0] + scalarTheta*(f[1] + scalarTheta*(f[2] + scalarTheta*f[3]));
622
623 LhsEval S = salinity;
624 if (S > S_lSAT)
625 S = S_lSAT;
626
627 hw = H2O::liquidEnthalpy(T, p) /1E3; /* kJ/kg */
628
629 /*DAUBERT and DANNER*/
630 /*U=*/h_NaCl = (3.6710E4*T + 0.5*(6.2770E1)*T*T - ((6.6670E-2)/3)*T*T*T
631 +((2.8000E-5)/4)*(T*T*T*T))/(58.44E3)- 2.045698e+02; /* kJ/kg */
632
633 LhsEval m = 1E3/58.44 * S/(1-S);
634 int i = 0;
635 int j = 0;
636 d_h = 0;
637
638 for (i = 0; i<=3; i++) {
639 for (j=0; j<=2; j++) {
640 d_h = d_h + a[i][j] * pow(theta, static_cast<Scalar>(i)) * pow(m, j);
641 }
642 }
643 /* heat of dissolution for halite according to Michaelides 1971 */
644 delta_h = (4.184/(1E3 + (58.44 * m)))*d_h;
645
646 /* Enthalpy of brine without H2 */
647 h_ls1 =(1-S)*hw + S*h_NaCl + S*delta_h; /* kJ/kg */
648
649 /* enthalpy contribution of H2 gas (kJ/kg) */
650 hg = H2::gasEnthalpy(T, p, extrapolate) / 1E3;
651
652 /* Enthalpy of brine with dissolved H2 */
653 return (h_ls1 - X_H2_w*hw + hg*X_H2_w)*1E3; /*J/kg*/
654 }
655
656 template <class LhsEval>
657 const LhsEval salinityFromConcentration(unsigned regionIdx,
658 const LhsEval&T,
659 const LhsEval& P,
660 const LhsEval& saltConcentration) const
661 {
662 if (enableSaltConcentration_)
663 return saltConcentration/H2O::liquidDensity(T, P, true);
664
665 return salinity(regionIdx);
666 }
667
668}; // end class BrineH2Pvt
669} // end namespace Opm
670#endif
A class for the brine fluid properties.
Binary coefficients for brine and H2.
Provides the OPM specific exception classes.
Properties of pure molecular hydrogen .
A simple version of pure water with density from Hu et al.
Implements a scalar function that depends on two variables and which is sampled on an uniform X-Y gri...
Some templates to wrap the valgrind client request macros.
Binary coefficients for brine and H2.
Definition Brine_H2.hpp:41
static Evaluation calculateMoleFractions(const Evaluation &temperature, const Evaluation &pg, const Evaluation &salinity, bool extrapolate=false)
Returns the mol (!) fraction of H2 in the liquid phase for a given temperature, pressure,...
Definition Brine_H2.hpp:57
A class for the brine fluid properties.
Definition BrineDynamic.hpp:48
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:263
static Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &, const Evaluation &salinity)
The dynamic viscosity of pure water.
Definition BrineDynamic.hpp:340
This class represents the Pressure-Volume-Temperature relations of the liquid phase for a H2-Brine sy...
Definition BrineH2Pvt.hpp:53
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 BrineH2Pvt.hpp:221
Evaluation inverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &Rs) const
Returns the formation volume factor [-] of the fluid phase.
Definition BrineH2Pvt.hpp:262
void setEnableSaltConcentration(bool yesno)
Specify whether the PVT model should consider salt concentration from the fluidstate or a fixed salin...
Definition BrineH2Pvt.hpp:132
void initEnd()
Finish initializing the oil phase PVT properties.
Definition BrineH2Pvt.hpp:113
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 BrineH2Pvt.hpp:305
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 BrineH2Pvt.hpp:247
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 BrineH2Pvt.hpp:164
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 BrineH2Pvt.hpp:194
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 BrineH2Pvt.hpp:317
void setEnableDissolvedGas(bool yesno)
Specify whether the PVT model should consider that the H2 component can dissolve in the brine phase.
Definition BrineH2Pvt.hpp:123
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 BrineH2Pvt.hpp:181
unsigned numRegions() const
Return the number of PVT regions which are considered by this PVT-object.
Definition BrineH2Pvt.hpp:138
Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns the formation volume factor [-] of brine saturated with H2 at a given pressure.
Definition BrineH2Pvt.hpp:276
Evaluation diffusionCoefficient(const Evaluation &temperature, const Evaluation &pressure, unsigned) const
Diffusion coefficient of H2 in water.
Definition BrineH2Pvt.hpp:367
Evaluation saturatedGasDissolutionFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure) const
Returns thegas dissoluiton factor [m^3/m^3] of the liquid phase.
Definition BrineH2Pvt.hpp:344
void setReferenceDensities(unsigned regionIdx, Scalar rhoRefBrine, Scalar rhoRefH2, Scalar)
Initialize the reference densities of all fluids for a given PVT region.
Definition BrineH2Pvt.hpp:101
Evaluation saturatedInverseFormationVolumeFactor(unsigned regionIdx, const Evaluation &temperature, const Evaluation &pressure, const Evaluation &saltconcentration) const
Returns the formation volume factor [-] of the fluid phase.
Definition BrineH2Pvt.hpp:232
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 BrineH2Pvt.hpp:292
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 BrineH2Pvt.hpp:207
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 BrineH2Pvt.hpp:331
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 BrineH2Pvt.hpp:145
static Scalar molarMass()
The molar mass in of the component.
Definition Component.hpp:93
Definition EclipseState.hpp:63
Properties of pure molecular hydrogen .
Definition H2.hpp:58
static constexpr Scalar molarMass()
The molar mass in of molecular hydrogen.
Definition H2.hpp:77
static Evaluation gasDensity(Evaluation temperature, Evaluation pressure, bool extrapolate=false)
The density of at a given pressure and temperature.
Definition H2.hpp:167
static const Evaluation gasEnthalpy(Evaluation temperature, Evaluation pressure, bool extrapolate=false)
Specific enthalpy of pure hydrogen gas.
Definition H2.hpp:232
Definition Schedule.hpp:88
A simple version of pure water with density from Hu et al.
Definition SimpleHuDuanH2O.hpp:65
static Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &)
Specific enthalpy of liquid water .
Definition SimpleHuDuanH2O.hpp:198
static Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &pressure, bool extrapolate)
The dynamic viscosity of pure water.
Definition SimpleHuDuanH2O.hpp:351
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:310
static Scalar molarMass()
The molar mass in of water.
Definition SimpleHuDuanH2O.hpp:99
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30