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