28#ifndef OPM_BINARY_COEFF_BRINE_H2_HPP
29#define OPM_BINARY_COEFF_BRINE_H2_HPP
34namespace BinaryCoeff {
40template<
class Scalar,
class H2O,
class H2,
bool verbose = true>
42 static const int liquidPhaseIdx = 0;
43 static const int gasPhaseIdx = 1;
56 template <
class Evaluation>
59 const Evaluation& salinity,
60 bool extrapolate =
false)
63 Evaluation X_NaCl = salinityToMolality_(salinity);
67 Evaluation lnPg = log(pg / 1e6);
74 Evaluation xH2 = exp(lnYH2 + lnPg + lnPhiH2 - lnKh - PF - lnGammaH2);
84 template <
class Evaluation>
89 static const Scalar a[4] = {6.156755, -2.502396e-2, 4.140593e-5, -1.322988e-3};
92 Evaluation pg_mpa = pg / 1.0e6;
93 Evaluation PF = a[0]*pg_mpa/temperature + a[1]*pg_mpa + a[2]*temperature*pg_mpa + a[3]*pg_mpa*pg_mpa/temperature;
105 template <
class Evaluation>
109 static const Scalar a[2] = {0.64485, 0.00142};
112 Evaluation lnGamma = (a[0] - a[1]*temperature)*salinity;
121 template <
class Evaluation>
125 static const Scalar a[5] = {2.68721e-5, -0.05121, 33.55196, -3411.0432, -31258.74683};
128 Evaluation lnKh = a[0]*temperature*temperature + a[1]*temperature + a[2] + a[3]/temperature
129 + a[4]/(temperature*temperature);
140 template <
class Evaluation>
147 Evaluation lnyH2 = log(1 - (pw_sat / pg));
159 template <
class Evaluation>
161 const Evaluation& pg,
162 bool extrapolate =
false)
175 Evaluation lnPhiH2 = resHelm + rho_red * dResHelm_dRedRho - log(rho_red * dResHelm_dRedRho + 1);
185 template <
class Evaluation>
186 static Evaluation
gasDiffCoeff(
const Evaluation& temperature,
const Evaluation& pressure)
189 const Scalar SigmaNu[2] = { 13.1 , 7.07 };
201 template <
class Evaluation>
202 static Evaluation salinityToMolality_(
const Evaluation& salinity) {
204 const Scalar M_NaCl = 58.44e-3;
207 const Evaluation X_NaCl = salinity / ((1 - salinity) * M_NaCl);
Estimate binary diffusion coefficents in gases according to the method by Fuller.
Evaluation fullerMethod(const Scalar *M, const Scalar *SigmaNu, const Evaluation &temperature, const Evaluation &pressure)
Estimate binary diffusion coefficents in gases according to the method by Fuller.
Definition FullerMethod.hpp:56
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
static Evaluation activityCoefficient_(const Evaluation &temperature, const Evaluation &salinity)
Returns the activity coefficient of H2 in brine which is needed in calculation of H2 solubility in Li...
Definition Brine_H2.hpp:106
static Evaluation gasDiffCoeff(const Evaluation &temperature, const Evaluation &pressure)
Binary diffusion coefficent [m^2/s] for molecular water and H2 as an approximation for brine-H2 diffu...
Definition Brine_H2.hpp:186
static Evaluation henrysConstant_(const Evaluation &temperature)
Returns Henry's constant of H2 in brine which is needed in calculation of H2 solubility in Li et al (...
Definition Brine_H2.hpp:122
static Evaluation moleFractionGasH2_(const Evaluation &temperature, const Evaluation &pg)
Returns mole fraction of H2 in gasous phase which is needed in calculation of H2 solubility in Li et ...
Definition Brine_H2.hpp:141
static Evaluation computePoyntingFactor_(const Evaluation &temperature, const Evaluation &pg)
Returns the Poynting Factor (PF) which is needed in calculation of H2 solubility in Li et al (2018).
Definition Brine_H2.hpp:85
static Evaluation fugacityCoefficientH2(const Evaluation &temperature, const Evaluation &pg, bool extrapolate=false)
Calculate fugacity coefficient for H2 which is needed in calculation of H2 solubility in Li et al (20...
Definition Brine_H2.hpp:160
static Evaluation vaporPressure(Evaluation temperature)
The vapor pressure in of pure water at a given temperature.
Definition H2O.hpp:141
static const Scalar molarMass()
The molar mass in of water.
Definition H2O.hpp:83
static Evaluation residualPartHelmholtz(const Evaluation &T_red, const Evaluation &rho_red)
The residual part of Helmholtz energy.
Definition H2.hpp:464
static Scalar criticalTemperature()
Returns the critical temperature of molecular hydrogen.
Definition H2.hpp:83
static Evaluation reducedMolarDensity(const Evaluation &temperature, const Evaluation &pg, bool extrapolate=false)
Calculate reduced density (rho/rho_crit) from pressure and temperature.
Definition H2.hpp:380
static Evaluation derivResHelmholtzWrtRedRho(const Evaluation &T_red, const Evaluation &rho_red)
Derivative of the residual part of Helmholtz energy wrt.
Definition H2.hpp:498
static constexpr Scalar molarMass()
The molar mass in of molecular hydrogen.
Definition H2.hpp:77
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30