Loading [MathJax]/extensions/tex2jax.js
3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
42
43#include <dumux/io/name.hh>
44
45#include "brine.hh"
46
47namespace Dumux {
48namespace FluidSystems {
49
54template<bool fastButSimplifiedRelations = false>
56{
57 static constexpr bool useBrineDensityAsLiquidMixtureDensity() { return fastButSimplifiedRelations;}
58 static constexpr bool useIdealGasDensity() { return fastButSimplifiedRelations; }
59};
60
69template <class Scalar,
71 class Policy = BrineAirDefaultPolicy<>>
73: public Base<Scalar, BrineAir<Scalar, H2Otype, Policy>>
74{
78
79public:
81 using H2O = H2Otype;
84
87
90
93
94 /****************************************
95 * Fluid phase related static parameters
96 ****************************************/
97 static constexpr int numPhases = 2; // one liquid and one gas phase
98 static constexpr int numComponents = 3; // H2O, Air, NaCl
99
100 static constexpr int liquidPhaseIdx = 0; // index of the liquid phase
101 static constexpr int gasPhaseIdx = 1; // index of the gas phase
102
103 static constexpr int phase0Idx = liquidPhaseIdx; // index of the first phase
104 static constexpr int phase1Idx = gasPhaseIdx; // index of the second phase
105
106 // export component indices to indicate the main component
107 // of the corresponding phase at atmospheric pressure 1 bar
108 // and room temperature 20°C:
109 static constexpr int H2OIdx = 0;
110 static constexpr int AirIdx = 1;
111 static constexpr int NaClIdx = 2;
112 static constexpr int comp0Idx = H2OIdx;
113 static constexpr int comp1Idx = AirIdx;
114 static constexpr int comp2Idx = NaClIdx;
115
116private:
117 struct BrineAdapterPolicy
118 {
119 using FluidSystem = Brine;
120
121 static constexpr int phaseIdx(int brinePhaseIdx) { return liquidPhaseIdx; }
122 static constexpr int compIdx(int brineCompIdx)
123 {
124 switch (brineCompIdx)
125 {
126 case Brine::H2OIdx: return H2OIdx;
127 case Brine::NaClIdx: return NaClIdx;
128 default: return 0; // this will never be reached, only needed to suppress compiler warning
129 }
130 }
131 };
132
133 template<class FluidState>
135
136public:
137
138 /****************************************
139 * phase related static parameters
140 ****************************************/
141
146 static std::string phaseName(int phaseIdx)
147 {
148 assert(0 <= phaseIdx && phaseIdx < numPhases);
149 switch (phaseIdx)
150 {
151 case liquidPhaseIdx: return IOName::liquidPhase();
152 case gasPhaseIdx: return IOName::gaseousPhase();
153 }
154 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
155 }
156
160 static constexpr bool isMiscible()
161 { return true; }
162
167 static constexpr bool isGas(int phaseIdx)
168 {
169 assert(0 <= phaseIdx && phaseIdx < numPhases);
170 return phaseIdx == gasPhaseIdx;
171 }
172
187 static bool isIdealMixture(int phaseIdx)
188 {
189 assert(0 <= phaseIdx && phaseIdx < numPhases);
190 // we assume Henry's and Raoult's laws for the water phase and
191 // and no interaction between gas molecules of different
192 // components, so all phases are ideal mixtures!
193 return true;
194 }
195
205 static constexpr bool isCompressible(int phaseIdx)
206 {
207 assert(0 <= phaseIdx && phaseIdx < numPhases);
208 // ideal gases are always compressible
209 if (phaseIdx == gasPhaseIdx)
210 return true;
211 // let brine decide for the liquid phase...
213 }
214
220 static bool isIdealGas(int phaseIdx)
221 {
222 assert(0 <= phaseIdx && phaseIdx < numPhases);
223 // let the fluids decide
224 if (phaseIdx == gasPhaseIdx)
225 return H2O::gasIsIdeal() && Air::gasIsIdeal();
226 return false; // not a gas
227 }
228
233 static constexpr int getMainComponent(int phaseIdx)
234 {
235 assert(0 <= phaseIdx && phaseIdx < numPhases);
236 if (phaseIdx == liquidPhaseIdx)
237 return H2OIdx;
238 else
239 return AirIdx;
240 }
241
242 /****************************************
243 * Component related static parameters
244 ****************************************/
249 static std::string componentName(int compIdx)
250 {
251 assert(0 <= compIdx && compIdx < numComponents);
252 switch (compIdx)
253 {
254 case H2OIdx: return H2O::name();
255 case AirIdx: return Air::name();
256 case NaClIdx: return NaCl::name();
257 }
258 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << compIdx);
259 }
260
265 static Scalar molarMass(int compIdx)
266 {
267 assert(0 <= compIdx && compIdx < numComponents);
268 switch (compIdx)
269 {
270 case H2OIdx: return H2O::molarMass();
271 case AirIdx: return Air::molarMass();
272 case NaClIdx: return NaCl::molarMass();
273 }
274 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << compIdx);
275 }
276
283 template <class FluidState>
284 static Scalar vaporPressure(const FluidState& fluidState, int compIdx)
285 {
286 // The vapor pressure of the water is affected by the
287 // salinity, thus, we forward to the interface of Brine here
288 if (compIdx == H2OIdx)
290 else if (compIdx == NaClIdx)
291 DUNE_THROW(Dune::NotImplemented, "NaCl::vaporPressure(t)");
292 else
293 DUNE_THROW(Dune::NotImplemented, "Invalid component index " << compIdx);
294 }
295
296 /****************************************
297 * thermodynamic relations
298 ****************************************/
305 static void init()
306 {
307 init(/*tempMin=*/273.15,
308 /*tempMax=*/800.0,
309 /*numTemptempSteps=*/200,
310 /*startPressure=*/-10,
311 /*endPressure=*/20e6,
312 /*pressureSteps=*/200);
313 }
314
326 static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp,
327 Scalar pressMin, Scalar pressMax, unsigned nPress)
328 {
329 std::cout << "The brine-air fluid system was configured with the following policy:\n";
330 std::cout << " - use brine density as liquid mixture density: " << std::boolalpha << Policy::useBrineDensityAsLiquidMixtureDensity() << "\n";
331 std::cout << " - use ideal gas density: " << std::boolalpha << Policy::useIdealGasDensity() << std::endl;
332
333 if (H2O::isTabulated)
334 H2O::init(tempMin, tempMax, nTemp, pressMin, pressMax, nPress);
335 }
336
337 using Base::density;
351 template <class FluidState>
352 static Scalar density(const FluidState &fluidState, int phaseIdx)
353 {
354 assert(0 <= phaseIdx && phaseIdx < numPhases);
355
356 const auto T = fluidState.temperature(phaseIdx);
357 const auto p = fluidState.pressure(phaseIdx);
358
359 if (phaseIdx == liquidPhaseIdx)
360 {
361 // assume pure brine
362 if (Policy::useBrineDensityAsLiquidMixtureDensity())
364
365 // assume one molecule of gas replaces one "brine" molecule
366 else
368 *(H2O::molarMass()*fluidState.moleFraction(liquidPhaseIdx, H2OIdx)
369 + NaCl::molarMass()*fluidState.moleFraction(liquidPhaseIdx, NaClIdx)
370 + Air::molarMass()*fluidState.moleFraction(liquidPhaseIdx, AirIdx));
371 }
372 else if (phaseIdx == phase1Idx)
373 {
374 // for the gas phase assume an ideal gas
375 if (Policy::useIdealGasDensity())
376 return IdealGas::density(fluidState.averageMolarMass(phase1Idx), T, p);
377
378 // if useComplexRelations = true, compute density. NaCl is assumed
379 // not to be present in gas phase, NaCl has only solid interfaces implemented
380 return H2O::gasDensity(T, fluidState.partialPressure(phase1Idx, H2OIdx))
381 + Air::gasDensity(T, fluidState.partialPressure(phase1Idx, AirIdx));
382 }
383 else
384 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
385 }
386
387 using Base::molarDensity;
397 template <class FluidState>
398 static Scalar molarDensity(const FluidState& fluidState, int phaseIdx)
399 {
400 if (phaseIdx == liquidPhaseIdx)
402 else if (phaseIdx == phase1Idx)
403 {
404 const Scalar T = fluidState.temperature(phaseIdx);
405
406 // for the gas phase assume an ideal gas
407 if (Policy::useIdealGasDensity())
408 return IdealGas::molarDensity(T, fluidState.pressure(phaseIdx));
409
410 // if useComplexRelations = true, compute density. NaCl is assumed
411 // not to be present in gas phase, NaCl has only solid interfaces implemented
412 return H2O::gasMolarDensity(T, fluidState.partialPressure(phase1Idx, H2OIdx))
413 + Air::gasMolarDensity(T, fluidState.partialPressure(phase1Idx, AirIdx));
414 }
415 else
416 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
417 }
418
419 using Base::viscosity;
430 template <class FluidState>
431 static Scalar viscosity(const FluidState& fluidState, int phaseIdx)
432 {
433 assert(0 <= phaseIdx && phaseIdx < numPhases);
434
435 if (phaseIdx == liquidPhaseIdx)
437 else
438 return Air::gasViscosity(fluidState.temperature(phaseIdx), fluidState.pressure(phaseIdx));
439 }
440
463 template <class FluidState>
464 static Scalar fugacityCoefficient(const FluidState& fluidState, int phaseIdx, int compIdx)
465 {
466 assert(0 <= phaseIdx && phaseIdx < numPhases);
467 assert(0 <= compIdx && compIdx < numComponents);
468
469 Scalar T = fluidState.temperature(phaseIdx);
470 Scalar p = fluidState.pressure(phaseIdx);
471
472 if (phaseIdx == gasPhaseIdx)
473 return 1.0;
474
475 else if (phaseIdx == liquidPhaseIdx)
476 {
477 // TODO: Should we use the vapor pressure of the mixture (brine) here?
478 // The presence of NaCl lowers the vapor pressure, thus, we would
479 // expect the fugacity coefficient to be lower as well. However,
480 // with the fugacity coefficient being dependent on the salinity,
481 // the equation system for the phase equilibria becomes non-linear
482 // and our constraint solvers assume linear system of equations.
483 if (compIdx == H2OIdx)
484 return H2O::vaporPressure(T)/p;
485
486 else if (compIdx == AirIdx)
487 return BinaryCoeff::H2O_Air::henry(T)/p;
488
489 // we assume nacl always stays in the liquid phase
490 else
491 return 0.0;
492 }
493
494 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
495 }
496
498 template <class FluidState>
499 static Scalar diffusionCoefficient(const FluidState &fluidState,
500 int phaseIdx,
501 int compIdx)
502 {
503 DUNE_THROW(Dune::NotImplemented, "Diffusion coefficients");
504 }
505
517 template <class FluidState>
518 static Scalar binaryDiffusionCoefficient(const FluidState& fluidState,
519 int phaseIdx,
520 int compIIdx,
521 int compJIdx)
522 {
523 assert(0 <= phaseIdx && phaseIdx < numPhases);
524 assert(0 <= compIIdx && compIIdx < numComponents);
525 assert(0 <= compJIdx && compJIdx < numComponents);
526
527 const auto T = fluidState.temperature(phaseIdx);
528 const auto p = fluidState.pressure(phaseIdx);
529
530 if (compIIdx > compJIdx)
531 std::swap(compIIdx, compJIdx);
532
533 if (phaseIdx == liquidPhaseIdx)
534 {
535 if(compIIdx == H2OIdx && compJIdx == AirIdx)
536 return H2O_Air::liquidDiffCoeff(T, p);
537 else if (compIIdx == H2OIdx && compJIdx == NaClIdx)
539 else
540 DUNE_THROW(Dune::NotImplemented, "Binary diffusion coefficient of components "
541 << compIIdx << " and " << compJIdx
542 << " in phase " << phaseIdx);
543 }
544 else if (phaseIdx == gasPhaseIdx)
545 {
546 if (compIIdx == H2OIdx && compJIdx == AirIdx)
547 return H2O_Air::gasDiffCoeff(T, p);
548
549 // NaCl is expected to never be present in the gas phase. we need to
550 // return a diffusion coefficient that does not case numerical problems.
551 // We choose a very small value here.
552 else if (compIIdx == AirIdx && compJIdx == NaClIdx)
553 return 1e-12;
554
555 else
556 DUNE_THROW(Dune::NotImplemented, "Binary diffusion coefficient of components "
557 << compIIdx << " and " << compJIdx
558 << " in phase " << phaseIdx);
559 }
560
561 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
562 }
563
564 using Base::enthalpy;
584 template <class FluidState>
585 static Scalar enthalpy(const FluidState& fluidState, int phaseIdx)
586 {
587 assert(0 <= phaseIdx && phaseIdx < numPhases);
588
589 const Scalar T = fluidState.temperature(phaseIdx);
590 const Scalar p = fluidState.pressure(phaseIdx);
591
592 if (phaseIdx == liquidPhaseIdx)
594 else
595 {
596 // This assumes NaCl not to be present in the gas phase
597 const Scalar XAir = fluidState.massFraction(gasPhaseIdx, AirIdx);
598 const Scalar XH2O = fluidState.massFraction(gasPhaseIdx, H2OIdx);
599 return XH2O*H2O::gasEnthalpy(T, p) + XAir*Air::gasEnthalpy(T, p);
600 }
601 }
602
609 template <class FluidState>
610 static Scalar componentEnthalpy(const FluidState& fluidState, int phaseIdx, int componentIdx)
611 {
612 const Scalar T = fluidState.temperature(gasPhaseIdx);
613 const Scalar p = fluidState.pressure(gasPhaseIdx);
614
615 if (phaseIdx == liquidPhaseIdx)
616 DUNE_THROW(Dune::NotImplemented, "The component enthalpies in the liquid phase are not implemented.");
617
618 else if (phaseIdx == gasPhaseIdx)
619 {
620 if (componentIdx == H2OIdx)
621 return H2O::gasEnthalpy(T, p);
622 else if (componentIdx == AirIdx)
623 return Air::gasEnthalpy(T, p);
624 else if (componentIdx == NaClIdx)
625 DUNE_THROW(Dune::InvalidStateException, "Implementation assumes NaCl not to be present in gas phase");
626 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << componentIdx);
627 }
628 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
629 }
630
641 template <class FluidState>
642 static Scalar thermalConductivity(const FluidState& fluidState, int phaseIdx)
643 {
644 if (phaseIdx == liquidPhaseIdx)
646 else if (phaseIdx == gasPhaseIdx)
647 return Air::gasThermalConductivity(fluidState.temperature(phaseIdx), fluidState.pressure(phaseIdx));
648
649 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
650 }
651
662 using Base::heatCapacity;
663 template <class FluidState>
664 static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
665 {
666 const Scalar T = fluidState.temperature(phaseIdx);
667 const Scalar p = fluidState.pressure(phaseIdx);
668
669 if (phaseIdx == liquidPhaseIdx)
671
672 // We assume NaCl not to be present in the gas phase here
673 else if (phaseIdx == gasPhaseIdx)
674 return Air::gasHeatCapacity(T, p)*fluidState.moleFraction(gasPhaseIdx, AirIdx)
675 + H2O::gasHeatCapacity(T, p)*fluidState.moleFraction(gasPhaseIdx, H2OIdx);
676
677 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
678 }
679};
680
681} // end namespace FluidSystems
682} // end namespace Dumux
683
684#endif
A collection of input/output field names for common physical quantities.
Some exceptions thrown in DuMux
Binary coefficients for water and air.
Adapter class for fluid states with different indices.
Material properties of pure salt .
A simple class for the air fluid properties.
Material properties of pure water .
Tabulates all thermodynamic properties of a given untabulated chemical species.
Relations valid for an ideal gas.
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:47
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of Air at a given pressure and temperature.
Definition: air.hh:85
static constexpr Scalar molarMass()
The molar mass in of Air.
Definition: air.hh:62
static const Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of pure air.
Definition: air.hh:307
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:187
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of air.
Definition: air.hh:345
static constexpr bool gasIsIdeal()
Returns true, the gas phase is assumed to be ideal.
Definition: air.hh:109
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of Air with 273.15 as basis.
Definition: air.hh:270
static std::string name()
A human readable name for Air.
Definition: air.hh:54
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of air in , depending on pressure and temperature.
Definition: air.hh:97
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:47
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:281
static constexpr int H2OIdx
index of the water component
Definition: fluidsystems/brine.hh:62
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:63
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:60
static bool isCompressible(int phaseIdx=liquidPhaseIdx)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: fluidsystems/brine.hh:125
static Scalar density(const FluidState &fluidState, int phaseIdx=liquidPhaseIdx)
Return the phase density [kg/m^3].
Definition: fluidsystems/brine.hh:225
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:56
static constexpr bool useIdealGasDensity()
Definition: brineair.hh:58
static constexpr bool useBrineDensityAsLiquidMixtureDensity()
Definition: brineair.hh:57
A compositional two-phase fluid system with a liquid and a gaseous phase and , and (dissolved miner...
Definition: brineair.hh:74
static Scalar componentEnthalpy(const FluidState &fluidState, int phaseIdx, int componentIdx)
Returns the specific enthalpy of a component in a specific phase.
Definition: brineair.hh:610
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:352
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: brineair.hh:642
static constexpr int comp0Idx
Definition: brineair.hh:112
static constexpr bool isCompressible(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: brineair.hh:205
static constexpr int liquidPhaseIdx
Definition: brineair.hh:100
static constexpr int AirIdx
Definition: brineair.hh:110
static constexpr int NaClIdx
Definition: brineair.hh:111
static void init()
Initialize the fluid system's static parameters generically.
Definition: brineair.hh:305
static constexpr int numPhases
Definition: brineair.hh:97
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Definition: brineair.hh:664
static constexpr int numComponents
Definition: brineair.hh:98
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:518
H2Otype H2O
export the involved components
Definition: brineair.hh:81
static Scalar viscosity(const FluidState &fluidState, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: brineair.hh:431
static constexpr int comp2Idx
Definition: brineair.hh:114
static Scalar enthalpy(const FluidState &fluidState, int phaseIdx)
Given a phase's composition, temperature and pressure, return its specific enthalpy .
Definition: brineair.hh:585
static Scalar molarDensity(const FluidState &fluidState, int phaseIdx)
The molar density of a fluid phase in .
Definition: brineair.hh:398
static constexpr int getMainComponent(int phaseIdx)
Get the main component of a given phase if possible.
Definition: brineair.hh:233
static constexpr bool isGas(int phaseIdx)
Return whether a phase is gaseous.
Definition: brineair.hh:167
static Scalar fugacityCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Returns the fugacity coefficient of a component in a phase.
Definition: brineair.hh:464
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:326
static Scalar molarMass(int compIdx)
Return the molar mass of a component in .
Definition: brineair.hh:265
static Scalar vaporPressure(const FluidState &fluidState, int compIdx)
Vapor pressure of a component .
Definition: brineair.hh:284
static std::string componentName(int compIdx)
Return the human readable name of a component.
Definition: brineair.hh:249
static std::string phaseName(int phaseIdx)
Return the human readable name of a fluid phase.
Definition: brineair.hh:146
static constexpr int comp1Idx
Definition: brineair.hh:113
static constexpr int phase1Idx
Definition: brineair.hh:104
static constexpr int phase0Idx
Definition: brineair.hh:103
static constexpr bool isMiscible()
Returns whether the fluids are miscible.
Definition: brineair.hh:160
static Scalar diffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Definition: brineair.hh:499
static bool isIdealGas(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be an ideal gas.
Definition: brineair.hh:220
static constexpr int gasPhaseIdx
Definition: brineair.hh:101
static bool isIdealMixture(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
Definition: brineair.hh:187
Dumux::FluidSystems::Brine< Scalar, H2Otype > Brine
export the underlying brine fluid system for the liquid phase
Definition: brineair.hh:86
static constexpr int H2OIdx
Definition: brineair.hh:109
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.