All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BrineCO2FluidSystem.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 */
28 #ifndef OPM_BRINE_CO2_SYSTEM_HPP
29 #define OPM_BRINE_CO2_SYSTEM_HPP
30 
31 #include "BaseFluidSystem.hpp"
32 #include "NullParameterCache.hpp"
33 
35 
41 
45 
46 #include <opm/common/Unused.hpp>
47 
48 #include <iostream>
49 
50 namespace Opm {
51 namespace FluidSystems {
52 
60 template <class Scalar, class CO2Tables>
61 class BrineCO2
62  : public BaseFluidSystem<Scalar, BrineCO2<Scalar, CO2Tables> >
63 {
68 
69  typedef H2O_Tabulated H2O;
70 
71 public:
72  template <class Evaluation>
73  struct ParameterCache : public Opm::NullParameterCache<Evaluation>
74  {};
75 
78 
79  /****************************************
80  * Fluid phase related static parameters
81  ****************************************/
82 
84  static const int numPhases = 2;
85 
87  static const int liquidPhaseIdx = 0;
89  static const int gasPhaseIdx = 1;
90 
94  static const char* phaseName(unsigned phaseIdx)
95  {
96  static const char* name[] = {
97  "liquid",
98  "gas"
99  };
100 
101  assert(0 <= phaseIdx && phaseIdx < numPhases);
102  return name[phaseIdx];
103  }
104 
108  static bool isLiquid(unsigned phaseIdx)
109  {
110  assert(0 <= phaseIdx && phaseIdx < numPhases);
111 
112  return phaseIdx != gasPhaseIdx;
113  }
114 
118  static bool isIdealGas(unsigned phaseIdx)
119  {
120  assert(0 <= phaseIdx && phaseIdx < numPhases);
121 
122  if (phaseIdx == gasPhaseIdx)
123  return CO2::gasIsIdeal();
124  return false;
125  }
126 
130  static bool isIdealMixture(unsigned phaseIdx OPM_OPTIM_UNUSED)
131  {
132  assert(0 <= phaseIdx && phaseIdx < numPhases);
133 
134  return true;
135  }
136 
140  static bool isCompressible(unsigned phaseIdx OPM_OPTIM_UNUSED)
141  {
142  assert(0 <= phaseIdx && phaseIdx < numPhases);
143 
144  return true;
145  }
146 
147  /****************************************
148  * Component related static parameters
149  ****************************************/
151  static const int numComponents = 2;
152 
154  static const int BrineIdx = 0;
156  static const int CO2Idx = 1;
157 
162 
166  static const char* componentName(unsigned compIdx)
167  {
168  static const char* name[] = {
169  Brine::name(),
170  CO2::name(),
171  };
172 
173  assert(0 <= compIdx && compIdx < numComponents);
174  return name[compIdx];
175  }
176 
180  static Scalar molarMass(unsigned compIdx)
181  {
182  assert(0 <= compIdx && compIdx < numComponents);
183  return (compIdx==BrineIdx)
184  ? Brine::molarMass()
185  : CO2::molarMass();
186  }
187 
188  /****************************************
189  * thermodynamic relations
190  ****************************************/
191 
195  static void init()
196  {
197  init(/*startTemp=*/273.15, /*endTemp=*/623.15, /*tempSteps=*/50,
198  /*startPressure=*/1e4, /*endPressure=*/40e6, /*pressureSteps=*/50);
199  }
200 
212  static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp,
213  Scalar pressMin, Scalar pressMax, unsigned nPress)
214  {
215  if (H2O::isTabulated) {
216  H2O_Tabulated::init(tempMin, tempMax, nTemp,
217  pressMin, pressMax, nPress);
218  }
219 
220  // set the salinity of brine to the one used by the CO2 tables
221  Brine_IAPWS::salinity = CO2Tables::brineSalinity;
222 
223  if (Brine::isTabulated) {
224  Brine_Tabulated::init(tempMin, tempMax, nTemp,
225  pressMin, pressMax, nPress);
226  }
227  }
228 
232  template <class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
233  static LhsEval density(const FluidState& fluidState,
234  const ParameterCache<ParamCacheEval>& /*paramCache*/,
235  unsigned phaseIdx)
236  {
237  assert(0 <= phaseIdx && phaseIdx < numPhases);
238 
239  const LhsEval& temperature = Opm::decay<LhsEval>(fluidState.temperature(phaseIdx));
240  const LhsEval& pressure = Opm::decay<LhsEval>(fluidState.pressure(phaseIdx));
241 
242  if (phaseIdx == liquidPhaseIdx) {
243  // use normalized composition for to calculate the density
244  // (the relations don't seem to take non-normalized
245  // compositions too well...)
246  LhsEval xlBrine = Opm::min(1.0, Opm::max(0.0, Opm::decay<LhsEval>(fluidState.moleFraction(liquidPhaseIdx, BrineIdx))));
247  LhsEval xlCO2 = Opm::min(1.0, Opm::max(0.0, Opm::decay<LhsEval>(fluidState.moleFraction(liquidPhaseIdx, CO2Idx))));
248  LhsEval sumx = xlBrine + xlCO2;
249  xlBrine /= sumx;
250  xlCO2 /= sumx;
251 
252  LhsEval result = liquidDensity_(temperature,
253  pressure,
254  xlBrine,
255  xlCO2);
256 
257  Valgrind::CheckDefined(result);
258  return result;
259  }
260 
261  assert(phaseIdx == gasPhaseIdx);
262 
263  // use normalized composition for to calculate the density
264  // (the relations don't seem to take non-normalized
265  // compositions too well...)
266  LhsEval xgBrine = Opm::min(1.0, Opm::max(0.0, Opm::decay<LhsEval>(fluidState.moleFraction(gasPhaseIdx, BrineIdx))));
267  LhsEval xgCO2 = Opm::min(1.0, Opm::max(0.0, Opm::decay<LhsEval>(fluidState.moleFraction(gasPhaseIdx, CO2Idx))));
268  LhsEval sumx = xgBrine + xgCO2;
269  xgBrine /= sumx;
270  xgCO2 /= sumx;
271 
272  LhsEval result = gasDensity_(temperature,
273  pressure,
274  xgBrine,
275  xgCO2);
276  Valgrind::CheckDefined(result);
277  return result;
278  }
279 
283  template <class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
284  static LhsEval viscosity(const FluidState& fluidState,
285  const ParameterCache<ParamCacheEval>& /*paramCache*/,
286  unsigned phaseIdx)
287  {
288  assert(0 <= phaseIdx && phaseIdx < numPhases);
289 
290  const LhsEval& temperature = Opm::decay<LhsEval>(fluidState.temperature(phaseIdx));
291  const LhsEval& pressure = Opm::decay<LhsEval>(fluidState.pressure(phaseIdx));
292 
293  if (phaseIdx == liquidPhaseIdx) {
294  // assume pure brine for the liquid phase. TODO: viscosity
295  // of mixture
296  LhsEval result = Brine::liquidViscosity(temperature, pressure);
297  Valgrind::CheckDefined(result);
298  return result;
299  }
300 
301  assert(phaseIdx == gasPhaseIdx);
302  LhsEval result = CO2::gasViscosity(temperature, pressure);
303  Valgrind::CheckDefined(result);
304  return result;
305  }
306 
310  template <class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
311  static LhsEval fugacityCoefficient(const FluidState& fluidState,
312  const ParameterCache<ParamCacheEval>& /*paramCache*/,
313  unsigned phaseIdx,
314  unsigned compIdx)
315  {
316  assert(0 <= phaseIdx && phaseIdx < numPhases);
317  assert(0 <= compIdx && compIdx < numComponents);
318 
319  if (phaseIdx == gasPhaseIdx)
320  // use the fugacity coefficients of an ideal gas. the
321  // actual value of the fugacity is not relevant, as long
322  // as the relative fluid compositions are observed,
323  return 1.0;
324 
325  const LhsEval& temperature = Opm::decay<LhsEval>(fluidState.temperature(phaseIdx));
326  const LhsEval& pressure = Opm::decay<LhsEval>(fluidState.pressure(phaseIdx));
327  assert(temperature > 0);
328  assert(pressure > 0);
329 
330  // calulate the equilibrium composition for the given
331  // temperature and pressure. TODO: calculateMoleFractions()
332  // could use some cleanup.
333  LhsEval xlH2O, xgH2O;
334  LhsEval xlCO2, xgCO2;
336  pressure,
338  /*knownPhaseIdx=*/-1,
339  xlCO2,
340  xgH2O);
341 
342  // normalize the phase compositions
343  xlCO2 = Opm::max(0.0, Opm::min(1.0, xlCO2));
344  xgH2O = Opm::max(0.0, Opm::min(1.0, xgH2O));
345 
346  xlH2O = 1.0 - xlCO2;
347  xgCO2 = 1.0 - xgH2O;
348 
349  if (compIdx == BrineIdx) {
350  Scalar phigH2O = 1.0;
351  return phigH2O * xgH2O / xlH2O;
352  }
353  else {
354  assert(compIdx == CO2Idx);
355 
356  Scalar phigCO2 = 1.0;
357  return phigCO2 * xgCO2 / xlCO2;
358  };
359  }
360 
364  template <class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
365  static LhsEval diffusionCoefficient(const FluidState& fluidState,
366  const ParameterCache<ParamCacheEval>& /*paramCache*/,
367  unsigned phaseIdx,
368  unsigned /*compIdx*/)
369  {
370  const LhsEval& temperature = Opm::decay<LhsEval>(fluidState.temperature(phaseIdx));
371  const LhsEval& pressure = Opm::decay<LhsEval>(fluidState.pressure(phaseIdx));
372  if (phaseIdx == liquidPhaseIdx)
373  return BinaryCoeffBrineCO2::liquidDiffCoeff(temperature, pressure);
374 
375  assert(phaseIdx == gasPhaseIdx);
376  return BinaryCoeffBrineCO2::gasDiffCoeff(temperature, pressure);
377  }
378 
382  template <class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
383  static LhsEval enthalpy(const FluidState& fluidState,
384  const ParameterCache<ParamCacheEval>& /*paramCache*/,
385  unsigned phaseIdx)
386  {
387  assert(0 <= phaseIdx && phaseIdx < numPhases);
388 
389  const LhsEval& temperature = Opm::decay<LhsEval>(fluidState.temperature(phaseIdx));
390  const LhsEval& pressure = Opm::decay<LhsEval>(fluidState.pressure(phaseIdx));
391 
392  if (phaseIdx == liquidPhaseIdx) {
393  const LhsEval& XlCO2 = Opm::decay<LhsEval>(fluidState.massFraction(phaseIdx, CO2Idx));
394  const LhsEval& result = liquidEnthalpyBrineCO2_(temperature,
395  pressure,
397  XlCO2);
398  Valgrind::CheckDefined(result);
399  return result;
400  }
401  else {
402  const LhsEval& XCO2 = Opm::decay<LhsEval>(fluidState.massFraction(gasPhaseIdx, CO2Idx));
403  const LhsEval& XBrine = Opm::decay<LhsEval>(fluidState.massFraction(gasPhaseIdx, BrineIdx));
404 
405  LhsEval result = 0;
406  result += XBrine * Brine::gasEnthalpy(temperature, pressure);
407  result += XCO2 * CO2::gasEnthalpy(temperature, pressure);
408  Valgrind::CheckDefined(result);
409  return result;
410  }
411  }
412 
416  template <class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
417  static LhsEval thermalConductivity(const FluidState& /*fluidState*/,
418  const ParameterCache<ParamCacheEval>& /*paramCache*/,
419  unsigned phaseIdx)
420  {
421  // TODO way too simple!
422  if (phaseIdx == liquidPhaseIdx)
423  return 0.6; // conductivity of water[W / (m K ) ]
424 
425  // gas phase
426  return 0.025; // conductivity of air [W / (m K ) ]
427  }
428 
441  template <class FluidState, class LhsEval = typename FluidState::Scalar, class ParamCacheEval = LhsEval>
442  static LhsEval heatCapacity(const FluidState& fluidState,
443  const ParameterCache<ParamCacheEval>& /*paramCache*/,
444  unsigned phaseIdx)
445  {
446  assert(0 <= phaseIdx && phaseIdx < numPhases);
447 
448  const LhsEval& temperature = Opm::decay<LhsEval>(fluidState.temperature(phaseIdx));
449  const LhsEval& pressure = Opm::decay<LhsEval>(fluidState.pressure(phaseIdx));
450 
451  if(phaseIdx == liquidPhaseIdx)
452  return H2O::liquidHeatCapacity(temperature, pressure);
453  else
454  return CO2::gasHeatCapacity(temperature, pressure);
455  }
456 
457 private:
458  template <class LhsEval>
459  static LhsEval gasDensity_(const LhsEval& T,
460  const LhsEval& pg,
461  const LhsEval& xgH2O,
462  const LhsEval& xgCO2)
463  {
464  Valgrind::CheckDefined(T);
465  Valgrind::CheckDefined(pg);
466  Valgrind::CheckDefined(xgH2O);
467  Valgrind::CheckDefined(xgCO2);
468 
469  return CO2::gasDensity(T, pg);
470  }
471 
472  /***********************************************************************/
473  /* */
474  /* Total brine density with dissolved CO2 */
475  /* rho_{b,CO2} = rho_w + contribution(salt) + contribution(CO2) */
476  /* */
477  /***********************************************************************/
478  template <class LhsEval>
479  static LhsEval liquidDensity_(const LhsEval& T,
480  const LhsEval& pl,
481  const LhsEval& xlH2O,
482  const LhsEval& xlCO2)
483  {
484  Valgrind::CheckDefined(T);
485  Valgrind::CheckDefined(pl);
486  Valgrind::CheckDefined(xlH2O);
487  Valgrind::CheckDefined(xlCO2);
488 
489  if(T < 273.15) {
490  OPM_THROW(NumericalProblem,
491  "Liquid density for Brine and CO2 is only "
492  "defined above 273.15K (is " << T << "K)");
493  }
494  if(pl >= 2.5e8) {
495  OPM_THROW(NumericalProblem,
496  "Liquid density for Brine and CO2 is only "
497  "defined below 250MPa (is " << pl << "Pa)");
498  }
499 
500  const LhsEval& rho_brine = Brine::liquidDensity(T, pl);
501  const LhsEval& rho_pure = H2O::liquidDensity(T, pl);
502  const LhsEval& rho_lCO2 = liquidDensityWaterCO2_(T, pl, xlH2O, xlCO2);
503  const LhsEval& contribCO2 = rho_lCO2 - rho_pure;
504 
505  return rho_brine + contribCO2;
506  }
507 
508  template <class LhsEval>
509  static LhsEval liquidDensityWaterCO2_(const LhsEval& temperature,
510  const LhsEval& pl,
511  const LhsEval& /*xlH2O*/,
512  const LhsEval& xlCO2)
513  {
514  Scalar M_CO2 = CO2::molarMass();
515  Scalar M_H2O = H2O::molarMass();
516 
517  const LhsEval& tempC = temperature - 273.15; /* tempC : temperature in °C */
518  const LhsEval& rho_pure = H2O::liquidDensity(temperature, pl);
519  // calculate the mole fraction of CO2 in the liquid. note that xlH2O is available
520  // as a function parameter, but in the case of a pure gas phase the value of M_T
521  // for the virtual liquid phase can become very large
522  const LhsEval xlH2O = 1.0 - xlCO2;
523  const LhsEval& M_T = M_H2O * xlH2O + M_CO2 * xlCO2;
524  const LhsEval& V_phi =
525  (37.51 +
526  tempC*(-9.585e-2 +
527  tempC*(8.74e-4 -
528  tempC*5.044e-7))) / 1.0e6;
529  return 1/ (xlCO2 * V_phi/M_T + M_H2O * xlH2O / (rho_pure * M_T));
530  }
531 
532  template <class LhsEval>
533  static LhsEval liquidEnthalpyBrineCO2_(const LhsEval& T,
534  const LhsEval& p,
535  Scalar S, // salinity
536  const LhsEval& X_CO2_w)
537  {
538  /* X_CO2_w : mass fraction of CO2 in brine */
539 
540  /* same function as enthalpy_brine, only extended by CO2 content */
541 
542  /*Numerical coefficents from PALLISER*/
543  static Scalar f[] = {
544  2.63500E-1, 7.48368E-6, 1.44611E-6, -3.80860E-10
545  };
546 
547  /*Numerical coefficents from MICHAELIDES for the enthalpy of brine*/
548  static Scalar a[4][3] = {
549  { 9633.6, -4080.0, +286.49 },
550  { +166.58, +68.577, -4.6856 },
551  { -0.90963, -0.36524, +0.249667E-1 },
552  { +0.17965E-2, +0.71924E-3, -0.4900E-4 }
553  };
554 
555  LhsEval theta, h_NaCl;
556  LhsEval h_ls1, d_h;
557  LhsEval delta_h;
558  LhsEval delta_hCO2, hg, hw;
559 
560  theta = T - 273.15;
561 
562  // Regularization
563  Scalar scalarTheta = Opm::scalarValue(theta);
564  Scalar S_lSAT = f[0] + scalarTheta*(f[1] + scalarTheta*(f[2] + scalarTheta*f[3]));
565  if (S > S_lSAT)
566  S = S_lSAT;
567 
568  hw = H2O::liquidEnthalpy(T, p) /1E3; /* kJ/kg */
569 
570  /*DAUBERT and DANNER*/
571  /*U=*/h_NaCl = (3.6710E4*T + 0.5*(6.2770E1)*T*T - ((6.6670E-2)/3)*T*T*T
572  +((2.8000E-5)/4)*(T*T*T*T))/(58.44E3)- 2.045698e+02; /* kJ/kg */
573 
574  Scalar m = 1E3/58.44 * S/(1-S);
575  int i = 0;
576  int j = 0;
577  d_h = 0;
578 
579  for (i = 0; i<=3; i++) {
580  for (j=0; j<=2; j++) {
581  d_h = d_h + a[i][j] * Opm::pow(theta, static_cast<Scalar>(i)) * std::pow(m, j);
582  }
583  }
584  /* heat of dissolution for halite according to Michaelides 1971 */
585  delta_h = (4.184/(1E3 + (58.44 * m)))*d_h;
586 
587  /* Enthalpy of brine without CO2 */
588  h_ls1 =(1-S)*hw + S*h_NaCl + S*delta_h; /* kJ/kg */
589 
590  /* heat of dissolution for CO2 according to Fig. 6 in Duan and Sun 2003. (kJ/kg)
591  In the relevant temperature ranges CO2 dissolution is
592  exothermal */
593  delta_hCO2 = (-57.4375 + T * 0.1325) * 1000/44;
594 
595  /* enthalpy contribution of CO2 (kJ/kg) */
596  hg = CO2::gasEnthalpy(T, p)/1E3 + delta_hCO2;
597 
598  /* Enthalpy of brine with dissolved CO2 */
599  return (h_ls1 - X_CO2_w*hw + hg*X_CO2_w)*1E3; /*J/kg*/
600  }
601 };
602 
603 } // namespace FluidSystems
604 } // namespace Opm
605 
606 #endif
Material properties of pure water .
Definition: H2O.hpp:61
static Evaluation liquidDensity(const Evaluation &temperature, const Evaluation &pressure)
The density of liquid at a given pressure and temperature .
Definition: TabulatedComponent.hpp:435
static Evaluation liquidEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of the liquid .
Definition: TabulatedComponent.hpp:290
static void calculateMoleFractions(const Evaluation &temperature, const Evaluation &pg, Scalar salinity, const int knownPhaseIdx, Evaluation &xlCO2, Evaluation &ygH2O)
Returns the mol (!) fraction of CO2 in the liquid phase and the mol_ (!) fraction of H2O in the gas p...
Definition: Brine_CO2.hpp:101
A simplistic class representing the fluid properties.
static LhsEval fugacityCoefficient(const FluidState &fluidState, const ParameterCache< ParamCacheEval > &, unsigned phaseIdx, unsigned compIdx)
Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase.
Definition: BrineCO2FluidSystem.hpp:311
static const int CO2Idx
The index of the CO2 component.
Definition: BrineCO2FluidSystem.hpp:156
static Evaluation liquidHeatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of the liquid .
Definition: TabulatedComponent.hpp:324
static LhsEval viscosity(const FluidState &fluidState, const ParameterCache< ParamCacheEval > &, unsigned phaseIdx)
Calculate the dynamic viscosity of a fluid phase [Pa*s].
Definition: BrineCO2FluidSystem.hpp:284
static LhsEval density(const FluidState &fluidState, const ParameterCache< ParamCacheEval > &, unsigned phaseIdx)
Calculate the density [kg/m^3] of a fluid phase.
Definition: BrineCO2FluidSystem.hpp:233
A class for the CO2 fluid properties.
static Scalar molarMass()
The molar mass in of the component.
Definition: TabulatedComponent.hpp:224
A simple version of pure water.
Relations valid for an ideal gas.
A class for the brine fluid properties.
static bool isIdealGas(unsigned phaseIdx)
Returns true if and only if a fluid phase is assumed to be an ideal gas.
Definition: BrineCO2FluidSystem.hpp:118
static Evaluation gasEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of gaseous CO2 [J/kg].
Definition: CO2.hpp:167
static LhsEval thermalConductivity(const FluidState &, const ParameterCache< ParamCacheEval > &, unsigned phaseIdx)
Thermal conductivity of a fluid phase [W/(m K)].
Definition: BrineCO2FluidSystem.hpp:417
static LhsEval enthalpy(const FluidState &fluidState, const ParameterCache< ParamCacheEval > &, unsigned phaseIdx)
Given a phase&#39;s composition, temperature, pressure and density, calculate its specific enthalpy [J/kg...
Definition: BrineCO2FluidSystem.hpp:383
static const int gasPhaseIdx
The index of the gas phase.
Definition: BrineCO2FluidSystem.hpp:89
static const int numComponents
Number of chemical species in the fluid system.
Definition: BrineCO2FluidSystem.hpp:151
A class for the brine fluid properties.
Definition: Brine.hpp:45
static Scalar molarMass(unsigned compIdx)
Return the molar mass of a component in [kg/mol].
Definition: BrineCO2FluidSystem.hpp:180
Opm::CO2< Scalar, CO2Tables > CO2
The type of the component for pure CO2 used by the fluid system.
Definition: BrineCO2FluidSystem.hpp:161
A parameter cache which does nothing.
Binary coefficients for water and CO2.
Binary coefficients for brine and CO2.
Definition: Brine_CO2.hpp:44
A two-phase fluid system with water and CO2.
Definition: BrineCO2FluidSystem.hpp:61
static Scalar salinity
The mass fraction of salt assumed to be in the brine.
Definition: Brine.hpp:49
static const char * phaseName(unsigned phaseIdx)
Return the human readable name of a fluid phase.
Definition: BrineCO2FluidSystem.hpp:94
A class for the CO2 fluid properties.
Definition: CO2.hpp:54
static const char * name()
A human readable name for the component.
Definition: TabulatedComponent.hpp:218
static const int numPhases
The number of phases considered by the fluid system.
Definition: BrineCO2FluidSystem.hpp:84
static Evaluation gasHeatCapacity(const Evaluation &temperature, const Evaluation &pressure)
Specific isobaric heat capacity of the component [J/kg] as a liquid.
Definition: CO2.hpp:252
static void init()
Initialize the fluid system&#39;s static parameters.
Definition: BrineCO2FluidSystem.hpp:195
static const char * name()
A human readable name for the CO2.
Definition: CO2.hpp:63
static Evaluation gasViscosity(Evaluation temperature, const Evaluation &pressure)
The dynamic viscosity [Pa s] of CO2.
Definition: CO2.hpp:202
static bool isCompressible(unsigned phaseIdx OPM_OPTIM_UNUSED)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: BrineCO2FluidSystem.hpp:140
static const char * componentName(unsigned compIdx)
Return the human readable name of a component.
Definition: BrineCO2FluidSystem.hpp:166
A generic class which tabulates all thermodynamic properties of a given component.
The base class for all fluid systems.
Definition: BaseFluidSystem.hpp:43
Opm::BinaryCoeff::Brine_CO2< Scalar, CO2Tables > BinaryCoeffBrineCO2
The binary coefficients for brine and CO2 used by this fluid system.
Definition: BrineCO2FluidSystem.hpp:77
static Scalar molarMass()
The mass in [kg] of one mole of CO2.
Definition: CO2.hpp:69
A generic class which tabulates all thermodynamic properties of a given component.
Definition: TabulatedComponent.hpp:58
static Evaluation gasDensity(const Evaluation &temperature, const Evaluation &pressure)
The density of CO2 at a given pressure and temperature [kg/m^3].
Definition: CO2.hpp:190
static bool isLiquid(unsigned phaseIdx)
Return whether a phase is liquid.
Definition: BrineCO2FluidSystem.hpp:108
static bool gasIsIdeal()
Returns true iff the gas phase is assumed to be ideal.
Definition: CO2.hpp:160
static Evaluation liquidDiffCoeff(const Evaluation &, const Evaluation &)
Binary diffusion coefficent [m^2/s] of CO2 in the brine phase.
Definition: Brine_CO2.hpp:77
A parameter cache which does nothing.
Definition: NullParameterCache.hpp:39
static const int BrineIdx
The index of the brine component.
Definition: BrineCO2FluidSystem.hpp:154
Binary coefficients for brine and CO2.
Scalar Scalar
The type used for scalar quantities.
Definition: BaseFluidSystem.hpp:49
static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp, Scalar pressMin, Scalar pressMax, unsigned nPress)
Initialize the tables.
Definition: TabulatedComponent.hpp:75
static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp, Scalar pressMin, Scalar pressMax, unsigned nPress)
Initialize the fluid system&#39;s static parameters using problem specific temperature and pressure range...
Definition: BrineCO2FluidSystem.hpp:212
Definition: BrineCO2FluidSystem.hpp:73
static Evaluation gasEnthalpy(const Evaluation &temperature, const Evaluation &pressure)
Specific enthalpy of the gas .
Definition: TabulatedComponent.hpp:273
static const int liquidPhaseIdx
The index of the liquid phase.
Definition: BrineCO2FluidSystem.hpp:87
static Evaluation liquidViscosity(const Evaluation &temperature, const Evaluation &pressure)
The dynamic viscosity of liquid.
Definition: TabulatedComponent.hpp:469
Brine_Tabulated Brine
The type of the component for brine used by the fluid system.
Definition: BrineCO2FluidSystem.hpp:159
static Evaluation gasDiffCoeff(const Evaluation &temperature, const Evaluation &pressure)
Binary diffusion coefficent [m^2/s] of water in the CO2 phase.
Definition: Brine_CO2.hpp:60
static bool isIdealMixture(unsigned phaseIdx OPM_OPTIM_UNUSED)
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
Definition: BrineCO2FluidSystem.hpp:130
static LhsEval diffusionCoefficient(const FluidState &fluidState, const ParameterCache< ParamCacheEval > &, unsigned phaseIdx, unsigned)
Calculate the binary molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (k...
Definition: BrineCO2FluidSystem.hpp:365
static LhsEval heatCapacity(const FluidState &fluidState, const ParameterCache< ParamCacheEval > &, unsigned phaseIdx)
Specific isobaric heat capacity of a fluid phase [J/kg].
Definition: BrineCO2FluidSystem.hpp:442
The base class for all fluid systems.
Binary coefficients for water and nitrogen.