3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program 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 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_BRINE_AIR_FLUID_SYSTEM_HH
25#define DUMUX_BRINE_AIR_FLUID_SYSTEM_HH
26
27#include <array>
28#include <cassert>
29#include <iomanip>
30
40
43
44#include <dumux/io/name.hh>
45
46#include "brine.hh"
47
48namespace Dumux {
49namespace FluidSystems {
50
55template<bool fastButSimplifiedRelations = false>
57{
58 static constexpr bool useBrineDensityAsLiquidMixtureDensity() { return fastButSimplifiedRelations;}
59 static constexpr bool useIdealGasDensity() { return fastButSimplifiedRelations; }
60};
61
70template <class Scalar,
72 class Policy = BrineAirDefaultPolicy<>>
74: public Base<Scalar, BrineAir<Scalar, H2Otype, Policy>>
75{
79
80public:
82 using H2O = H2Otype;
85
88
91
94
95 /****************************************
96 * Fluid phase related static parameters
97 ****************************************/
98 static constexpr int numPhases = 2; // one liquid and one gas phase
99 static constexpr int numComponents = 3; // H2O, Air, NaCl
100
101 static constexpr int liquidPhaseIdx = 0; // index of the liquid phase
102 static constexpr int gasPhaseIdx = 1; // index of the gas phase
103
104 static constexpr int phase0Idx = liquidPhaseIdx; // index of the first phase
105 static constexpr int phase1Idx = gasPhaseIdx; // index of the second phase
106
107 // export component indices to indicate the main component
108 // of the corresponding phase at atmospheric pressure 1 bar
109 // and room temperature 20°C:
110 static constexpr int H2OIdx = 0;
111 static constexpr int AirIdx = 1;
112 static constexpr int NaClIdx = 2;
113 static constexpr int comp0Idx = H2OIdx;
114 static constexpr int comp1Idx = AirIdx;
115 static constexpr int comp2Idx = NaClIdx;
116
117private:
118 struct BrineAdapterPolicy
119 {
120 using FluidSystem = Brine;
121
122 static constexpr int phaseIdx(int brinePhaseIdx) { return liquidPhaseIdx; }
123 static constexpr int compIdx(int brineCompIdx)
124 {
125 switch (brineCompIdx)
126 {
127 assert(brineCompIdx == Brine::H2OIdx || brineCompIdx == Brine::NaClIdx);
128 case Brine::H2OIdx: return H2OIdx;
129 case Brine::NaClIdx: return NaClIdx;
130 default: return 0; // this will never be reached, only needed to suppress compiler warning
131 }
132 }
133 };
134
135 template<class FluidState>
137
138public:
139
140 /****************************************
141 * phase related static parameters
142 ****************************************/
143
148 static std::string phaseName(int phaseIdx)
149 {
150 assert(0 <= phaseIdx && phaseIdx < numPhases);
151 switch (phaseIdx)
152 {
153 case liquidPhaseIdx: return IOName::liquidPhase();
154 case gasPhaseIdx: return IOName::gaseousPhase();
155 }
156 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
157 }
158
162 static constexpr bool isMiscible()
163 { return true; }
164
169 static constexpr bool isGas(int phaseIdx)
170 {
171 assert(0 <= phaseIdx && phaseIdx < numPhases);
172 return phaseIdx == gasPhaseIdx;
173 }
174
189 static bool isIdealMixture(int phaseIdx)
190 {
191 assert(0 <= phaseIdx && phaseIdx < numPhases);
192 // we assume Henry's and Raoult's laws for the water phase and
193 // and no interaction between gas molecules of different
194 // components, so all phases are ideal mixtures!
195 return true;
196 }
197
207 static constexpr bool isCompressible(int phaseIdx)
208 {
209 assert(0 <= phaseIdx && phaseIdx < numPhases);
210 // ideal gases are always compressible
211 if (phaseIdx == gasPhaseIdx)
212 return true;
213 // let brine decide for the liquid phase...
215 }
216
222 static bool isIdealGas(int phaseIdx)
223 {
224 assert(0 <= phaseIdx && phaseIdx < numPhases);
225 // let the fluids decide
226 if (phaseIdx == gasPhaseIdx)
227 return H2O::gasIsIdeal() && Air::gasIsIdeal();
228 return false; // not a gas
229 }
230
235 static constexpr int getMainComponent(int phaseIdx)
236 {
237 assert(0 <= phaseIdx && phaseIdx < numPhases);
238 if (phaseIdx == liquidPhaseIdx)
239 return H2OIdx;
240 else
241 return AirIdx;
242 }
243
244 /****************************************
245 * Component related static parameters
246 ****************************************/
251 static std::string componentName(int compIdx)
252 {
253 assert(0 <= compIdx && compIdx < numComponents);
254 switch (compIdx)
255 {
256 case H2OIdx: return H2O::name();
257 case AirIdx: return Air::name();
258 case NaClIdx: return NaCl::name();
259 }
260 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << compIdx);
261 }
262
267 static Scalar molarMass(int compIdx)
268 {
269 assert(0 <= compIdx && compIdx < numComponents);
270 switch (compIdx)
271 {
272 case H2OIdx: return H2O::molarMass();
273 case AirIdx: return Air::molarMass();
274 case NaClIdx: return NaCl::molarMass();
275 }
276 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << compIdx);
277 }
278
285 template <class FluidState>
286 static Scalar vaporPressure(const FluidState& fluidState, int compIdx)
287 {
288 // The vapor pressure of the water is affected by the
289 // salinity, thus, we forward to the interface of Brine here
290 if (compIdx == H2OIdx)
292 else if (compIdx == NaClIdx)
293 DUNE_THROW(Dune::NotImplemented, "NaCl::vaporPressure(t)");
294 else
295 DUNE_THROW(Dune::NotImplemented, "Invalid component index " << compIdx);
296 }
297
298 /****************************************
299 * thermodynamic relations
300 ****************************************/
307 static void init()
308 {
309 init(/*tempMin=*/273.15,
310 /*tempMax=*/800.0,
311 /*numTemptempSteps=*/200,
312 /*startPressure=*/-10,
313 /*endPressure=*/20e6,
314 /*pressureSteps=*/200);
315 }
316
328 static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp,
329 Scalar pressMin, Scalar pressMax, unsigned nPress)
330 {
331 std::cout << "The brine-air fluid system was configured with the following policy:\n";
332 std::cout << " - use brine density as liquid mixture density: " << std::boolalpha << Policy::useBrineDensityAsLiquidMixtureDensity() << "\n";
333 std::cout << " - use ideal gas density: " << std::boolalpha << Policy::useIdealGasDensity() << std::endl;
334
335 if (H2O::isTabulated)
336 H2O::init(tempMin, tempMax, nTemp, pressMin, pressMax, nPress);
337 }
338
339 using Base::density;
353 template <class FluidState>
354 static Scalar density(const FluidState &fluidState, int phaseIdx)
355 {
356 assert(0 <= phaseIdx && phaseIdx < numPhases);
357
358 const auto T = fluidState.temperature(phaseIdx);
359 const auto p = fluidState.pressure(phaseIdx);
360
361 if (phaseIdx == liquidPhaseIdx)
362 {
363 // assume pure brine
364 if (Policy::useBrineDensityAsLiquidMixtureDensity())
366
367 // assume one molecule of gas replaces one "brine" molecule
368 else
370 *(H2O::molarMass()*fluidState.moleFraction(liquidPhaseIdx, H2OIdx)
371 + NaCl::molarMass()*fluidState.moleFraction(liquidPhaseIdx, NaClIdx)
372 + Air::molarMass()*fluidState.moleFraction(liquidPhaseIdx, AirIdx));
373 }
374 else if (phaseIdx == phase1Idx)
375 {
376 // for the gas phase assume an ideal gas
377 if (Policy::useIdealGasDensity())
378 return IdealGas::density(fluidState.averageMolarMass(phase1Idx), T, p);
379
380 // if useComplexRelations = true, compute density. NaCl is assumed
381 // not to be present in gas phase, NaCl has only solid interfaces implemented
382 return H2O::gasDensity(T, fluidState.partialPressure(phase1Idx, H2OIdx))
383 + Air::gasDensity(T, fluidState.partialPressure(phase1Idx, AirIdx));
384 }
385 else
386 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
387 }
388
389 using Base::molarDensity;
399 template <class FluidState>
400 static Scalar molarDensity(const FluidState& fluidState, int phaseIdx)
401 {
402 if (phaseIdx == liquidPhaseIdx)
404 else if (phaseIdx == phase1Idx)
405 {
406 const Scalar T = fluidState.temperature(phaseIdx);
407
408 // for the gas phase assume an ideal gas
409 if (Policy::useIdealGasDensity())
410 return IdealGas::molarDensity(T, fluidState.pressure(phaseIdx));
411
412 // if useComplexRelations = true, compute density. NaCl is assumed
413 // not to be present in gas phase, NaCl has only solid interfaces implemented
414 return H2O::gasMolarDensity(T, fluidState.partialPressure(phase1Idx, H2OIdx))
415 + Air::gasMolarDensity(T, fluidState.partialPressure(phase1Idx, AirIdx));
416 }
417 else
418 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
419 }
420
421 using Base::viscosity;
432 template <class FluidState>
433 static Scalar viscosity(const FluidState& fluidState, int phaseIdx)
434 {
435 assert(0 <= phaseIdx && phaseIdx < numPhases);
436
437 if (phaseIdx == liquidPhaseIdx)
439 else
440 return Air::gasViscosity(fluidState.temperature(phaseIdx), fluidState.pressure(phaseIdx));
441 }
442
465 template <class FluidState>
466 static Scalar fugacityCoefficient(const FluidState& fluidState, int phaseIdx, int compIdx)
467 {
468 assert(0 <= phaseIdx && phaseIdx < numPhases);
469 assert(0 <= compIdx && compIdx < numComponents);
470
471 Scalar T = fluidState.temperature(phaseIdx);
472 Scalar p = fluidState.pressure(phaseIdx);
473
474 if (phaseIdx == gasPhaseIdx)
475 return 1.0;
476
477 else if (phaseIdx == liquidPhaseIdx)
478 {
479 // TODO: Should we use the vapor pressure of the mixture (brine) here?
480 // The presence of NaCl lowers the vapor pressure, thus, we would
481 // expect the fugacity coefficient to be lower as well. However,
482 // with the fugacity coefficient being dependent on the salinity,
483 // the equation system for the phase equilibria becomes non-linear
484 // and our constraint solvers assume linear system of equations.
485 if (compIdx == H2OIdx)
486 return H2O::vaporPressure(T)/p;
487
488 else if (compIdx == AirIdx)
489 return BinaryCoeff::H2O_Air::henry(T)/p;
490
491 // we assume nacl always stays in the liquid phase
492 else
493 return 0.0;
494 }
495
496 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
497 }
498
500 template <class FluidState>
501 static Scalar diffusionCoefficient(const FluidState &fluidState,
502 int phaseIdx,
503 int compIdx)
504 {
505 DUNE_THROW(Dune::NotImplemented, "Diffusion coefficients");
506 }
507
519 template <class FluidState>
520 static Scalar binaryDiffusionCoefficient(const FluidState& fluidState,
521 int phaseIdx,
522 int compIIdx,
523 int compJIdx)
524 {
525 assert(0 <= phaseIdx && phaseIdx < numPhases);
526 assert(0 <= compIIdx && compIIdx < numComponents);
527 assert(0 <= compJIdx && compJIdx < numComponents);
528
529 const auto T = fluidState.temperature(phaseIdx);
530 const auto p = fluidState.pressure(phaseIdx);
531
532 if (compIIdx > compJIdx)
533 std::swap(compIIdx, compJIdx);
534
535 if (phaseIdx == liquidPhaseIdx)
536 {
537 if(compIIdx == H2OIdx && compJIdx == AirIdx)
538 return H2O_Air::liquidDiffCoeff(T, p);
539 else if (compIIdx == H2OIdx && compJIdx == NaClIdx)
541 else
542 DUNE_THROW(Dune::NotImplemented, "Binary diffusion coefficient of components "
543 << compIIdx << " and " << compJIdx
544 << " in phase " << phaseIdx);
545 }
546 else if (phaseIdx == gasPhaseIdx)
547 {
548 if (compIIdx == H2OIdx && compJIdx == AirIdx)
549 return H2O_Air::gasDiffCoeff(T, p);
550
551 // NaCl is expected to never be present in the gas phase. we need to
552 // return a diffusion coefficient that does not case numerical problems.
553 // We choose a very small value here.
554 else if (compIIdx == AirIdx && compJIdx == NaClIdx)
555 return 1e-12;
556
557 else
558 DUNE_THROW(Dune::NotImplemented, "Binary diffusion coefficient of components "
559 << compIIdx << " and " << compJIdx
560 << " in phase " << phaseIdx);
561 }
562
563 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
564 }
565
566 using Base::enthalpy;
586 template <class FluidState>
587 static Scalar enthalpy(const FluidState& fluidState, int phaseIdx)
588 {
589 assert(0 <= phaseIdx && phaseIdx < numPhases);
590
591 Scalar T = fluidState.temperature(phaseIdx);
592 Scalar p = fluidState.pressure(phaseIdx);
593
594 if (phaseIdx == liquidPhaseIdx)
596 else
597 {
598 // This assumes NaCl not to be present in the gas phase
599 Scalar XAir = fluidState.massFraction(gasPhaseIdx, AirIdx);
600 Scalar XH2O = fluidState.massFraction(gasPhaseIdx, H2OIdx);
601
602 Scalar result = 0;
603 result += XH2O * H2O::gasEnthalpy(T, p);
604 result += XAir * Air::gasEnthalpy(T, p);
606 return result;
607 }
608 }
609
616 template <class FluidState>
617 static Scalar componentEnthalpy(const FluidState& fluidState, int phaseIdx, int componentIdx)
618 {
619 const Scalar T = fluidState.temperature(gasPhaseIdx);
620 const Scalar p = fluidState.pressure(gasPhaseIdx);
621
622 if (phaseIdx == liquidPhaseIdx)
623 DUNE_THROW(Dune::NotImplemented, "The component enthalpies in the liquid phase are not implemented.");
624
625 else if (phaseIdx == gasPhaseIdx)
626 {
627 if (componentIdx == H2OIdx)
628 return H2O::gasEnthalpy(T, p);
629 else if (componentIdx == AirIdx)
630 return Air::gasEnthalpy(T, p);
631 else if (componentIdx == NaClIdx)
632 DUNE_THROW(Dune::InvalidStateException, "Implementation assumes NaCl not to be present in gas phase");
633 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << componentIdx);
634 }
635 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
636 }
637
648 template <class FluidState>
649 static Scalar thermalConductivity(const FluidState& fluidState, int phaseIdx)
650 {
651 if (phaseIdx == liquidPhaseIdx)
653 else if (phaseIdx == gasPhaseIdx)
654 return Air::gasThermalConductivity(fluidState.temperature(phaseIdx), fluidState.pressure(phaseIdx));
655
656 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
657 }
658
669 using Base::heatCapacity;
670 template <class FluidState>
671 static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
672 {
673 const Scalar T = fluidState.temperature(phaseIdx);
674 const Scalar p = fluidState.pressure(phaseIdx);
675
676 if (phaseIdx == liquidPhaseIdx)
678
679 // We assume NaCl not to be present in the gas phase here
680 else if (phaseIdx == gasPhaseIdx)
681 return Air::gasHeatCapacity(T, p)*fluidState.moleFraction(gasPhaseIdx, AirIdx)
682 + H2O::gasHeatCapacity(T, p)*fluidState.moleFraction(gasPhaseIdx, H2OIdx);
683
684 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
685 }
686};
687
688} // end namespace FluidSystems
689} // end namespace Dumux
690
691#endif
Some exceptions thrown in DuMux
Some templates to wrap the valgrind macros.
A collection of input/output field names for common physical quantities.
Binary coefficients for water and air.
A simple class for the air fluid properties.
Material properties of pure water .
Material properties of pure salt .
Tabulates all thermodynamic properties of a given untabulated chemical species.
Adapter class for fluid states with different indices.
Relations valid for an ideal gas.
bool CheckDefined(const T &value)
Make valgrind complain if the object occupied by an object is undefined.
Definition: valgrind.hh:72
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
std::string gaseousPhase() noexcept
I/O name of gaseous phase.
Definition: name.hh:123
std::string liquidPhase() noexcept
I/O name of liquid phase.
Definition: name.hh:119
Binary coefficients for water and air.
Definition: h2o_air.hh:37
static Scalar henry(Scalar temperature)
Henry coefficient for air in liquid water.
Definition: h2o_air.hh:48
static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
Binary diffusion coefficient for molecular water and air.
Definition: h2o_air.hh:68
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
Diffusion coefficient for molecular nitrogen in liquid water.
Definition: h2o_air.hh:101
A class for the air fluid properties.
Definition: air.hh:46
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of Air at a given pressure and temperature.
Definition: air.hh:84
static constexpr Scalar molarMass()
The molar mass in of Air.
Definition: air.hh:61
static const Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of pure air.
Definition: air.hh:305
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:186
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of air.
Definition: air.hh:342
static constexpr bool gasIsIdeal()
Returns true, the gas phase is assumed to be ideal.
Definition: air.hh:108
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of Air with 273.15 as basis.
Definition: air.hh:268
static std::string name()
A human readable name for Air.
Definition: air.hh:53
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of air in , depending on pressure and temperature.
Definition: air.hh:96
A class for the NaCl properties.
Definition: nacl.hh:47
static std::string name()
A human readable name for the NaCl.
Definition: nacl.hh:52
static constexpr Scalar molarMass()
The molar mass of NaCl in .
Definition: nacl.hh:60
Tabulates all thermodynamic properties of a given untabulated chemical species.
Definition: tabulatedcomponent.hh:82
Adapter class for fluid states with different indices.
Definition: adapter.hh:44
Fluid system base class.
Definition: fluidsystems/base.hh:45
static Scalar density(const FluidState &fluidState, int phaseIdx)
Calculate the density of a fluid phase.
Definition: fluidsystems/base.hh:134
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: fluidsystems/base.hh:390
static Scalar fugacityCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Calculate the fugacity coefficient of an individual component in a fluid phase.
Definition: fluidsystems/base.hh:197
static Scalar diffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Calculate the binary molecular diffusion coefficient for a component in a fluid phase .
Definition: fluidsystems/base.hh:278
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/base.hh:326
static Scalar enthalpy(const FluidState &fluidState, int phaseIdx)
Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy .
Definition: fluidsystems/base.hh:363
static Scalar molarDensity(const FluidState &fluidState, int phaseIdx)
Calculate the molar density of a fluid phase.
Definition: fluidsystems/base.hh:160
static Scalar viscosity(const FluidState &fluidState, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: fluidsystems/base.hh:236
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Specific isobaric heat capacity of a fluid phase .
Definition: fluidsystems/base.hh:424
A compositional single phase fluid system consisting of two components, which are H2O and NaCl.
Definition: fluidsystems/brine.hh:48
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: fluidsystems/brine.hh:483
static Scalar viscosity(const FluidState &fluidState, int phaseIdx=liquidPhaseIdx)
Return the viscosity of the phase.
Definition: fluidsystems/brine.hh:282
static constexpr int H2OIdx
index of the water component
Definition: fluidsystems/brine.hh:63
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Specific isobaric heat capacity of a fluid phase. .
Definition: fluidsystems/brine.hh:501
static Scalar enthalpy(const FluidState &fluidState, int phaseIdx)
Given a phase's composition, temperature and pressure, return its specific enthalpy .
Definition: fluidsystems/brine.hh:337
static Scalar vaporPressure(const FluidState &fluidState, int compIdx)
Vapor pressure of a component .
Definition: fluidsystems/brine.hh:308
static constexpr int NaClIdx
index of the NaCl component
Definition: fluidsystems/brine.hh:64
static Scalar molarDensity(const FluidState &fluidState, int phaseIdx=liquidPhaseIdx)
The molar density of the fluid phase in .
Definition: fluidsystems/brine.hh:418
static constexpr int liquidPhaseIdx
The one considered phase is liquid.
Definition: fluidsystems/brine.hh:61
static bool isCompressible(int phaseIdx=liquidPhaseIdx)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: fluidsystems/brine.hh:126
static Scalar density(const FluidState &fluidState, int phaseIdx=liquidPhaseIdx)
Return the phase density [kg/m^3].
Definition: fluidsystems/brine.hh:226
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:445
Policy for the brine-air fluid system.
Definition: brineair.hh:57
static constexpr bool useIdealGasDensity()
Definition: brineair.hh:59
static constexpr bool useBrineDensityAsLiquidMixtureDensity()
Definition: brineair.hh:58
A compositional two-phase fluid system with a liquid and a gaseous phase and , and (dissolved miner...
Definition: brineair.hh:75
static Scalar componentEnthalpy(const FluidState &fluidState, int phaseIdx, int componentIdx)
Returns the specific enthalpy of a component in a specific phase.
Definition: brineair.hh:617
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:354
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: brineair.hh:649
static constexpr int comp0Idx
Definition: brineair.hh:113
static constexpr bool isCompressible(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: brineair.hh:207
static constexpr int liquidPhaseIdx
Definition: brineair.hh:101
static constexpr int AirIdx
Definition: brineair.hh:111
static constexpr int NaClIdx
Definition: brineair.hh:112
static void init()
Initialize the fluid system's static parameters generically.
Definition: brineair.hh:307
static constexpr int numPhases
Definition: brineair.hh:98
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Definition: brineair.hh:671
static constexpr int numComponents
Definition: brineair.hh:99
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:520
H2Otype H2O
export the involved components
Definition: brineair.hh:82
static Scalar viscosity(const FluidState &fluidState, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: brineair.hh:433
static constexpr int comp2Idx
Definition: brineair.hh:115
static Scalar enthalpy(const FluidState &fluidState, int phaseIdx)
Given a phase's composition, temperature and pressure, return its specific enthalpy .
Definition: brineair.hh:587
static Scalar molarDensity(const FluidState &fluidState, int phaseIdx)
The molar density of a fluid phase in .
Definition: brineair.hh:400
static constexpr int getMainComponent(int phaseIdx)
Get the main component of a given phase if possible.
Definition: brineair.hh:235
static constexpr bool isGas(int phaseIdx)
Return whether a phase is gaseous.
Definition: brineair.hh:169
static Scalar fugacityCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Returns the fugacity coefficient of a component in a phase.
Definition: brineair.hh:466
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:328
static Scalar molarMass(int compIdx)
Return the molar mass of a component in .
Definition: brineair.hh:267
static Scalar vaporPressure(const FluidState &fluidState, int compIdx)
Vapor pressure of a component .
Definition: brineair.hh:286
static std::string componentName(int compIdx)
Return the human readable name of a component.
Definition: brineair.hh:251
static std::string phaseName(int phaseIdx)
Return the human readable name of a fluid phase.
Definition: brineair.hh:148
static constexpr int comp1Idx
Definition: brineair.hh:114
static constexpr int phase1Idx
Definition: brineair.hh:105
static constexpr int phase0Idx
Definition: brineair.hh:104
static constexpr bool isMiscible()
Returns whether the fluids are miscible.
Definition: brineair.hh:162
static Scalar diffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Definition: brineair.hh:501
static bool isIdealGas(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be an ideal gas.
Definition: brineair.hh:222
static constexpr int gasPhaseIdx
Definition: brineair.hh:102
static bool isIdealMixture(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
Definition: brineair.hh:189
Dumux::FluidSystems::Brine< Scalar, H2Otype > Brine
export the underlying brine fluid system for the liquid phase
Definition: brineair.hh:87
static constexpr int H2OIdx
Definition: brineair.hh:110
The a parameter cache which does nothing.
Definition: nullparametercache.hh:34
Relations valid for an ideal gas.
Definition: idealgas.hh:37
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:49
static constexpr Scalar molarDensity(Scalar temperature, Scalar pressure)
The molar density of the gas , depending on pressure and temperature.
Definition: idealgas.hh:70
Fluid system base class.
A fluid system for brine, i.e. H2O with dissolved NaCl.