version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
brineair.hh
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// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_BRINE_AIR_FLUID_SYSTEM_HH
13#define DUMUX_BRINE_AIR_FLUID_SYSTEM_HH
14
15#include <array>
16#include <cassert>
17#include <iomanip>
18
28
30
31#include <dumux/io/name.hh>
32
33#include "brine.hh"
34
35namespace Dumux::FluidSystems {
36
41template<bool fastButSimplifiedRelations = false>
43{
44 static constexpr bool useBrineDensityAsLiquidMixtureDensity() { return fastButSimplifiedRelations;}
45 static constexpr bool useIdealGasDensity() { return fastButSimplifiedRelations; }
46 static constexpr bool useKelvinVaporPressure() { return false; }
47};
48
57template <class Scalar,
59 class Policy = BrineAirDefaultPolicy<>>
61: public Base<Scalar, BrineAir<Scalar, H2Otype, Policy>>
62{
65
66public:
68 using H2O = H2Otype;
71
74
77
80
81 /****************************************
82 * Fluid phase related static parameters
83 ****************************************/
84 static constexpr int numPhases = 2; // one liquid and one gas phase
85 static constexpr int numComponents = 3; // H2O, Air, NaCl
86
87 static constexpr int liquidPhaseIdx = 0; // index of the liquid phase
88 static constexpr int gasPhaseIdx = 1; // index of the gas phase
89
90 static constexpr int phase0Idx = liquidPhaseIdx; // index of the first phase
91 static constexpr int phase1Idx = gasPhaseIdx; // index of the second phase
92
93 // export component indices to indicate the main component
94 // of the corresponding phase at atmospheric pressure 1 bar
95 // and room temperature 20°C:
96 static constexpr int H2OIdx = 0;
97 static constexpr int AirIdx = 1;
98 static constexpr int NaClIdx = 2;
99 static constexpr int comp0Idx = H2OIdx;
100 static constexpr int comp1Idx = AirIdx;
101 static constexpr int comp2Idx = NaClIdx;
102
103private:
104 struct BrineAdapterPolicy
105 {
106 using FluidSystem = Brine;
107
108 static constexpr int phaseIdx(int brinePhaseIdx) { return liquidPhaseIdx; }
109 static constexpr int compIdx(int brineCompIdx)
110 {
111 switch (brineCompIdx)
112 {
113 case Brine::H2OIdx: return H2OIdx;
114 case Brine::NaClIdx: return NaClIdx;
115 default: return 0; // this will never be reached, only needed to suppress compiler warning
116 }
117 }
118 };
119
120 template<class FluidState>
122
123public:
124
125 /****************************************
126 * phase related static parameters
127 ****************************************/
128
133 static std::string phaseName(int phaseIdx)
134 {
135 assert(0 <= phaseIdx && phaseIdx < numPhases);
136 switch (phaseIdx)
137 {
138 case liquidPhaseIdx: return IOName::liquidPhase();
139 case gasPhaseIdx: return IOName::gaseousPhase();
140 }
141 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
142 }
143
147 static constexpr bool isMiscible()
148 { return true; }
149
154 static constexpr bool isGas(int phaseIdx)
155 {
156 assert(0 <= phaseIdx && phaseIdx < numPhases);
157 return phaseIdx == gasPhaseIdx;
158 }
159
174 static bool isIdealMixture(int phaseIdx)
175 {
176 assert(0 <= phaseIdx && phaseIdx < numPhases);
177 // we assume Henry's and Raoult's laws for the water phase and
178 // and no interaction between gas molecules of different
179 // components, so all phases are ideal mixtures!
180 return true;
181 }
182
192 static constexpr bool isCompressible(int phaseIdx)
193 {
194 assert(0 <= phaseIdx && phaseIdx < numPhases);
195 // ideal gases are always compressible
196 if (phaseIdx == gasPhaseIdx)
197 return true;
198 // let brine decide for the liquid phase...
200 }
201
207 static bool isIdealGas(int phaseIdx)
208 {
209 assert(0 <= phaseIdx && phaseIdx < numPhases);
210 // let the fluids decide
211 if (phaseIdx == gasPhaseIdx)
212 return H2O::gasIsIdeal() && Air::gasIsIdeal();
213 return false; // not a gas
214 }
215
220 static constexpr int getMainComponent(int phaseIdx)
221 {
222 assert(0 <= phaseIdx && phaseIdx < numPhases);
223 if (phaseIdx == liquidPhaseIdx)
224 return H2OIdx;
225 else
226 return AirIdx;
227 }
228
229 /****************************************
230 * Component related static parameters
231 ****************************************/
236 static std::string componentName(int compIdx)
237 {
238 assert(0 <= compIdx && compIdx < numComponents);
239 switch (compIdx)
240 {
241 case H2OIdx: return H2O::name();
242 case AirIdx: return Air::name();
243 case NaClIdx: return NaCl::name();
244 }
245 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << compIdx);
246 }
247
252 static Scalar molarMass(int compIdx)
253 {
254 assert(0 <= compIdx && compIdx < numComponents);
255 switch (compIdx)
256 {
257 case H2OIdx: return H2O::molarMass();
258 case AirIdx: return Air::molarMass();
259 case NaClIdx: return NaCl::molarMass();
260 }
261 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << compIdx);
262 }
263
270 template <class FluidState>
271 static Scalar vaporPressure(const FluidState& fluidState, int compIdx)
272 {
273 // The vapor pressure of the water is affected by the
274 // salinity, thus, we forward to the interface of Brine here
275 if (compIdx == H2OIdx)
276 {
277 if (!Policy::useKelvinVaporPressure())
279 else
280 {
281 //additionally taking the influence of the capillary pressure on the vapor pressure, described by Kelvin's equation, into account.
282 const auto t = fluidState.temperature(liquidPhaseIdx);
283 const auto pc = (fluidState.wettingPhase() == (int) liquidPhaseIdx)
284 ? fluidState.pressure(gasPhaseIdx)-fluidState.pressure(liquidPhaseIdx)
285 : fluidState.pressure(liquidPhaseIdx)-fluidState.pressure(gasPhaseIdx);
286 //influence of the capillary pressure on the vapor pressure, the influence of the salt concentration is already taken into account in the brine vapour pressure
288 *exp( -pc / (Brine::molarDensity(fluidState, liquidPhaseIdx) * (Dumux::Constants<Scalar>::R*t)));
289 }
290 }
291 else if (compIdx == NaClIdx)
292 DUNE_THROW(Dune::NotImplemented, "NaCl::vaporPressure(t)");
293 else
294 DUNE_THROW(Dune::NotImplemented, "Invalid component index " << compIdx);
295 }
296
297 /****************************************
298 * thermodynamic relations
299 ****************************************/
306 static void init()
307 {
308 init(/*tempMin=*/273.15,
309 /*tempMax=*/800.0,
310 /*numTemptempSteps=*/200,
311 /*startPressure=*/-10,
312 /*endPressure=*/20e6,
313 /*pressureSteps=*/200);
314 }
315
327 static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp,
328 Scalar pressMin, Scalar pressMax, unsigned nPress)
329 {
330 std::cout << "The brine-air fluid system was configured with the following policy:\n";
331 std::cout << " - use brine density as liquid mixture density: " << std::boolalpha << Policy::useBrineDensityAsLiquidMixtureDensity() << "\n";
332 std::cout << " - use ideal gas density: " << std::boolalpha << Policy::useIdealGasDensity() << std::endl;
333
334 if (H2O::isTabulated)
335 H2O::init(tempMin, tempMax, nTemp, pressMin, pressMax, nPress);
336 }
337
352 template <class FluidState>
353 static Scalar density(const FluidState &fluidState, int phaseIdx)
354 {
355 assert(0 <= phaseIdx && phaseIdx < numPhases);
356
357 const auto T = fluidState.temperature(phaseIdx);
358 const auto p = fluidState.pressure(phaseIdx);
359
360 if (phaseIdx == liquidPhaseIdx)
361 {
362 // assume pure brine
363 if (Policy::useBrineDensityAsLiquidMixtureDensity())
365
366 // assume one molecule of gas replaces one "brine" molecule
367 else
369 *(H2O::molarMass()*fluidState.moleFraction(liquidPhaseIdx, H2OIdx)
370 + NaCl::molarMass()*fluidState.moleFraction(liquidPhaseIdx, NaClIdx)
371 + Air::molarMass()*fluidState.moleFraction(liquidPhaseIdx, AirIdx));
372 }
373 else if (phaseIdx == phase1Idx)
374 {
375 // for the gas phase assume an ideal gas
376 if (Policy::useIdealGasDensity())
377 return IdealGas::density(fluidState.averageMolarMass(phase1Idx), T, p);
378
379 // if useComplexRelations = true, compute density. NaCl is assumed
380 // not to be present in gas phase, NaCl has only solid interfaces implemented
381 return H2O::gasDensity(T, fluidState.partialPressure(phase1Idx, H2OIdx))
382 + Air::gasDensity(T, fluidState.partialPressure(phase1Idx, AirIdx));
383 }
384 else
385 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
386 }
387
390 template <class FluidState>
391 static Scalar molarDensity(const FluidState& fluidState, int phaseIdx)
392 {
393 if (phaseIdx == liquidPhaseIdx)
395 else if (phaseIdx == phase1Idx)
396 {
397 const Scalar T = fluidState.temperature(phaseIdx);
398
399 // for the gas phase assume an ideal gas
400 if (Policy::useIdealGasDensity())
401 return IdealGas::molarDensity(T, fluidState.pressure(phaseIdx));
402
403 // if useComplexRelations = true, compute density. NaCl is assumed
404 // not to be present in gas phase, NaCl has only solid interfaces implemented
405 return H2O::gasMolarDensity(T, fluidState.partialPressure(phase1Idx, H2OIdx))
406 + Air::gasMolarDensity(T, fluidState.partialPressure(phase1Idx, AirIdx));
407 }
408 else
409 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
410 }
411
423 template <class FluidState>
424 static Scalar viscosity(const FluidState& fluidState, int phaseIdx)
425 {
426 assert(0 <= phaseIdx && phaseIdx < numPhases);
427
428 if (phaseIdx == liquidPhaseIdx)
430 else
431 return Air::gasViscosity(fluidState.temperature(phaseIdx), fluidState.pressure(phaseIdx));
432 }
433
456 template <class FluidState>
457 static Scalar fugacityCoefficient(const FluidState& fluidState, int phaseIdx, int compIdx)
458 {
459 assert(0 <= phaseIdx && phaseIdx < numPhases);
460 assert(0 <= compIdx && compIdx < numComponents);
461
462 Scalar T = fluidState.temperature(phaseIdx);
463 Scalar p = fluidState.pressure(phaseIdx);
464
465 if (phaseIdx == gasPhaseIdx)
466 return 1.0;
467
468 else if (phaseIdx == liquidPhaseIdx)
469 {
470 // TODO: Should we use the vapor pressure of the mixture (brine) here?
471 // The presence of NaCl lowers the vapor pressure, thus, we would
472 // expect the fugacity coefficient to be lower as well. However,
473 // with the fugacity coefficient being dependent on the salinity,
474 // the equation system for the phase equilibria becomes non-linear
475 // and our constraint solvers assume linear system of equations.
476 if (compIdx == H2OIdx)
477 return H2O::vaporPressure(T)/p;
478
479 else if (compIdx == AirIdx)
480 return BinaryCoeff::H2O_Air::henry(T)/p;
481
482 // we assume nacl always stays in the liquid phase
483 else
484 return 0.0;
485 }
486
487 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
488 }
489
492 template <class FluidState>
493 static Scalar diffusionCoefficient(const FluidState &fluidState,
494 int phaseIdx,
495 int compIdx)
496 {
497 DUNE_THROW(Dune::NotImplemented, "Diffusion coefficients");
498 }
499
502 template <class FluidState>
503 static Scalar binaryDiffusionCoefficient(const FluidState& fluidState,
504 int phaseIdx,
505 int compIIdx,
506 int compJIdx)
507 {
508 assert(0 <= phaseIdx && phaseIdx < numPhases);
509 assert(0 <= compIIdx && compIIdx < numComponents);
510 assert(0 <= compJIdx && compJIdx < numComponents);
511
512 const auto T = fluidState.temperature(phaseIdx);
513 const auto p = fluidState.pressure(phaseIdx);
514
515 if (compIIdx > compJIdx)
516 std::swap(compIIdx, compJIdx);
517
518 if (phaseIdx == liquidPhaseIdx)
519 {
520 if(compIIdx == H2OIdx && compJIdx == AirIdx)
521 return H2O_Air::liquidDiffCoeff(T, p);
522 else if (compIIdx == H2OIdx && compJIdx == NaClIdx)
524 else
525 DUNE_THROW(Dune::NotImplemented, "Binary diffusion coefficient of components "
526 << compIIdx << " and " << compJIdx
527 << " in phase " << phaseIdx);
528 }
529 else if (phaseIdx == gasPhaseIdx)
530 {
531 if (compIIdx == H2OIdx && compJIdx == AirIdx)
532 return H2O_Air::gasDiffCoeff(T, p);
533
534 // NaCl is expected to never be present in the gas phase. we need to
535 // return a diffusion coefficient that does not case numerical problems.
536 // We choose a very small value here.
537 else if (compIIdx == AirIdx && compJIdx == NaClIdx)
538 return 1e-12;
539
540 else
541 DUNE_THROW(Dune::NotImplemented, "Binary diffusion coefficient of components "
542 << compIIdx << " and " << compJIdx
543 << " in phase " << phaseIdx);
544 }
545
546 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
547 }
548
569 template <class FluidState>
570 static Scalar enthalpy(const FluidState& fluidState, int phaseIdx)
571 {
572 assert(0 <= phaseIdx && phaseIdx < numPhases);
573
574 const Scalar T = fluidState.temperature(phaseIdx);
575 const Scalar p = fluidState.pressure(phaseIdx);
576
577 if (phaseIdx == liquidPhaseIdx)
579 else if (phaseIdx == gasPhaseIdx)
580 {
581 // This assumes NaCl not to be present in the gas phase
582 const Scalar XAir = fluidState.massFraction(gasPhaseIdx, AirIdx);
583 const Scalar XH2O = fluidState.massFraction(gasPhaseIdx, H2OIdx);
584 return XH2O*H2O::gasEnthalpy(T, p) + XAir*Air::gasEnthalpy(T, p);
585 }
586
587 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
588 }
589
596 template <class FluidState>
597 static Scalar componentEnthalpy(const FluidState& fluidState, int phaseIdx, int componentIdx)
598 {
599 const Scalar T = fluidState.temperature(gasPhaseIdx);
600 const Scalar p = fluidState.pressure(gasPhaseIdx);
601
602 if (phaseIdx == liquidPhaseIdx)
603 DUNE_THROW(Dune::NotImplemented, "The component enthalpies in the liquid phase are not implemented.");
604
605 else if (phaseIdx == gasPhaseIdx)
606 {
607 if (componentIdx == H2OIdx)
608 return H2O::gasEnthalpy(T, p);
609 else if (componentIdx == AirIdx)
610 return Air::gasEnthalpy(T, p);
611 else if (componentIdx == NaClIdx)
612 DUNE_THROW(Dune::InvalidStateException, "Implementation assumes NaCl not to be present in gas phase");
613 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << componentIdx);
614 }
615 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
616 }
617
630 template <class FluidState>
631 static Scalar thermalConductivity(const FluidState& fluidState, int phaseIdx)
632 {
633 if (phaseIdx == liquidPhaseIdx)
635 // This assumes NaCl not to be present in the gas phase
636 else if (phaseIdx == gasPhaseIdx)
637 return Air::gasThermalConductivity(fluidState.temperature(phaseIdx), fluidState.pressure(phaseIdx)) * fluidState.massFraction(gasPhaseIdx, AirIdx)
638 + H2O::gasThermalConductivity(fluidState.temperature(phaseIdx), fluidState.pressure(phaseIdx)) * fluidState.massFraction(gasPhaseIdx, H2OIdx);
639
640 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
641 }
642
654 template <class FluidState>
655 static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
656 {
657 const Scalar T = fluidState.temperature(phaseIdx);
658 const Scalar p = fluidState.pressure(phaseIdx);
659
660 if (phaseIdx == liquidPhaseIdx)
662
663 // We assume NaCl not to be present in the gas phase here
664 else if (phaseIdx == gasPhaseIdx)
665 return Air::gasHeatCapacity(T, p)*fluidState.massFraction(gasPhaseIdx, AirIdx)
666 + H2O::gasHeatCapacity(T, p)*fluidState.massFraction(gasPhaseIdx, H2OIdx);
667
668 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
669 }
670};
671
672} // end namespace Dumux::FluidSystems
673
674#endif
Adapter class for fluid states with different indices.
A simple class for the air fluid properties.
Binary coefficients for water and air.
Definition: h2o_air.hh:24
static Scalar henry(Scalar temperature)
Henry coefficient for air in liquid water.
Definition: h2o_air.hh:35
static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
Binary diffusion coefficient for molecular water and air.
Definition: h2o_air.hh:55
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
Diffusion coefficient for molecular nitrogen in liquid water.
Definition: h2o_air.hh:88
A class for the air fluid properties.
Definition: air.hh:33
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of Air at a given pressure and temperature.
Definition: air.hh:71
static constexpr Scalar molarMass()
The molar mass in of Air.
Definition: air.hh:48
static const Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of pure air.
Definition: air.hh:299
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:179
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of air.
Definition: air.hh:337
static constexpr bool gasIsIdeal()
Returns true, the gas phase is assumed to be ideal.
Definition: air.hh:95
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of Air with 273.15 as basis.
Definition: air.hh:262
static std::string name()
A human readable name for Air.
Definition: air.hh:40
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of air in , depending on pressure and temperature.
Definition: air.hh:83
A class for the NaCl properties.
Definition: nacl.hh:34
static std::string name()
A human readable name for the NaCl.
Definition: nacl.hh:39
static constexpr Scalar molarMass()
The molar mass of NaCl in .
Definition: nacl.hh:47
Tabulates all thermodynamic properties of a given component.
Definition: tabulatedcomponent.hh:672
A central place for various physical constants occurring in some equations.
Definition: constants.hh:27
Adapter class for fluid states with different indices.
Definition: adapter.hh:32
Fluid system base class.
Definition: fluidsystems/base.hh:32
A compositional two-phase fluid system with a liquid and a gaseous phase and , and (dissolved miner...
Definition: brineair.hh:62
static Scalar componentEnthalpy(const FluidState &fluidState, int phaseIdx, int componentIdx)
Returns the specific enthalpy of a component in a specific phase.
Definition: brineair.hh:597
static Scalar density(const FluidState &fluidState, int phaseIdx)
Given a phase's composition, temperature, pressure, and the partial pressures of all components,...
Definition: brineair.hh:353
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: brineair.hh:631
static constexpr int comp0Idx
Definition: brineair.hh:99
static constexpr bool isCompressible(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: brineair.hh:192
static constexpr int liquidPhaseIdx
Definition: brineair.hh:87
static constexpr int AirIdx
Definition: brineair.hh:97
static constexpr int NaClIdx
Definition: brineair.hh:98
static void init()
Initialize the fluid system's static parameters generically.
Definition: brineair.hh:306
static constexpr int numPhases
Definition: brineair.hh:84
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Specific isobaric heat capacity of a fluid phase. .
Definition: brineair.hh:655
static constexpr int numComponents
Definition: brineair.hh:85
static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIIdx, int compJIdx)
Given a phase's composition, temperature and pressure, return the binary diffusion coefficient for c...
Definition: brineair.hh:503
H2Otype H2O
export the involved components
Definition: brineair.hh:68
static Scalar viscosity(const FluidState &fluidState, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: brineair.hh:424
static constexpr int comp2Idx
Definition: brineair.hh:101
static Scalar enthalpy(const FluidState &fluidState, int phaseIdx)
Given a phase's composition, temperature and pressure, return its specific enthalpy .
Definition: brineair.hh:570
static Scalar molarDensity(const FluidState &fluidState, int phaseIdx)
Calculate the molar density of a fluid phase.
Definition: brineair.hh:391
static constexpr int getMainComponent(int phaseIdx)
Get the main component of a given phase if possible.
Definition: brineair.hh:220
static constexpr bool isGas(int phaseIdx)
Return whether a phase is gaseous.
Definition: brineair.hh:154
static Scalar fugacityCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Returns the fugacity coefficient of a component in a phase.
Definition: brineair.hh:457
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: brineair.hh:327
static Scalar molarMass(int compIdx)
Return the molar mass of a component in .
Definition: brineair.hh:252
static Scalar vaporPressure(const FluidState &fluidState, int compIdx)
Vapor pressure of a component .
Definition: brineair.hh:271
static std::string componentName(int compIdx)
Return the human readable name of a component.
Definition: brineair.hh:236
static std::string phaseName(int phaseIdx)
Return the human readable name of a fluid phase.
Definition: brineair.hh:133
static constexpr int comp1Idx
Definition: brineair.hh:100
static constexpr int phase1Idx
Definition: brineair.hh:91
static constexpr int phase0Idx
Definition: brineair.hh:90
static constexpr bool isMiscible()
Returns whether the fluids are miscible.
Definition: brineair.hh:147
static Scalar diffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Calculate the binary molecular diffusion coefficient for a component in a fluid phase .
Definition: brineair.hh:493
static bool isIdealGas(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be an ideal gas.
Definition: brineair.hh:207
static constexpr int gasPhaseIdx
Definition: brineair.hh:88
static bool isIdealMixture(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
Definition: brineair.hh:174
Dumux::FluidSystems::Brine< Scalar, H2Otype > Brine
export the underlying brine fluid system for the liquid phase
Definition: brineair.hh:73
static constexpr int H2OIdx
Definition: brineair.hh:96
A compositional single phase fluid system consisting of two components, which are H2O and NaCl.
Definition: fluidsystems/brine.hh:34
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: fluidsystems/brine.hh:434
static Scalar viscosity(const FluidState &fluidState, int phaseIdx=liquidPhaseIdx)
Return the viscosity of the phase.
Definition: fluidsystems/brine.hh:275
static constexpr int H2OIdx
index of the water component
Definition: fluidsystems/brine.hh:48
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Specific isobaric heat capacity of a fluid phase .
Definition: fluidsystems/brine.hh:450
static Scalar enthalpy(const FluidState &fluidState, int phaseIdx)
Given a phase's composition, temperature and pressure, return its specific enthalpy .
Definition: fluidsystems/brine.hh:335
static Scalar vaporPressure(const FluidState &fluidState, int compIdx)
Vapor pressure of a component .
Definition: fluidsystems/brine.hh:306
static constexpr int NaClIdx
index of the NaCl component
Definition: fluidsystems/brine.hh:49
static Scalar molarDensity(const FluidState &fluidState, int phaseIdx=liquidPhaseIdx)
Calculate the molar density of a fluid phase.
Definition: fluidsystems/brine.hh:372
static constexpr int liquidPhaseIdx
The one considered phase is liquid.
Definition: fluidsystems/brine.hh:46
static bool isCompressible(int phaseIdx=liquidPhaseIdx)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: fluidsystems/brine.hh:111
static Scalar density(const FluidState &fluidState, int phaseIdx=liquidPhaseIdx)
Return the phase density [kg/m^3].
Definition: fluidsystems/brine.hh:217
static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIIdx, int compJIdx)
Given a phase's composition, temperature and pressure, return the binary diffusion coefficient for c...
Definition: fluidsystems/brine.hh:401
Relations valid for an ideal gas.
Definition: idealgas.hh:25
static constexpr Scalar density(Scalar avgMolarMass, Scalar temperature, Scalar pressure)
The density of the gas in , depending on pressure, temperature and average molar mass of the gas.
Definition: idealgas.hh:37
static constexpr Scalar molarDensity(Scalar temperature, Scalar pressure)
The molar density of the gas , depending on pressure and temperature.
Definition: idealgas.hh:58
The a parameter cache which does nothing.
Definition: nullparametercache.hh:22
Some exceptions thrown in DuMux
Fluid system base class.
A fluid system for brine, i.e. H2O with dissolved NaCl.
Material properties of pure water .
Binary coefficients for water and air.
Relations valid for an ideal gas.
Material properties of pure salt .
A collection of input/output field names for common physical quantities.
Definition: h2o.hh:901
std::string gaseousPhase() noexcept
I/O name of gaseous phase.
Definition: name.hh:111
std::string liquidPhase() noexcept
I/O name of liquid phase.
Definition: name.hh:107
Policy for the brine-air fluid system.
Definition: brineair.hh:43
static constexpr bool useIdealGasDensity()
Definition: brineair.hh:45
static constexpr bool useKelvinVaporPressure()
Definition: brineair.hh:46
static constexpr bool useBrineDensityAsLiquidMixtureDensity()
Definition: brineair.hh:44
Tabulates all thermodynamic properties of a given untabulated chemical species.