version 3.8
h2oair.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-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7
13#ifndef DUMUX_H2O_AIR_SYSTEM_HH
14#define DUMUX_H2O_AIR_SYSTEM_HH
15
16#include <cassert>
17#include <iomanip>
18
21
26
28
29#include <dumux/io/name.hh>
30
31namespace Dumux {
32namespace FluidSystems {
37template<bool fastButSimplifiedRelations = false>
39{
40 static constexpr bool useH2ODensityAsLiquidMixtureDensity() { return fastButSimplifiedRelations; }
41 static constexpr bool useIdealGasDensity() { return fastButSimplifiedRelations; }
42 static constexpr bool useAirViscosityAsGasMixtureViscosity() { return fastButSimplifiedRelations; }
43};
44
56template <class Scalar,
58 class Policy = H2OAirDefaultPolicy<>,
59 bool useKelvinVaporPressure = false>
60class H2OAir
61: public Base<Scalar, H2OAir<Scalar, H2Otype, Policy> >
62{
65
66public:
67 using H2O = H2Otype;
69
70 static constexpr int numPhases = 2;
71 static constexpr int numComponents = 2;
72
73 static constexpr int liquidPhaseIdx = 0;
74 static constexpr int gasPhaseIdx = 1;
75 static constexpr int phase0Idx = liquidPhaseIdx;
76 static constexpr int phase1Idx = gasPhaseIdx;
77
78 static constexpr int H2OIdx = 0;
79 static constexpr int AirIdx = 1;
80 static constexpr int comp0Idx = H2OIdx;
81 static constexpr int comp1Idx = AirIdx;
82 static constexpr int liquidCompIdx = H2OIdx;
83 static constexpr int gasCompIdx = AirIdx;
84
90 static std::string phaseName(int phaseIdx)
91 {
92 assert(0 <= phaseIdx && phaseIdx < numPhases);
93 switch (phaseIdx)
94 {
96 case gasPhaseIdx: return IOName::gaseousPhase();
97 }
98 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
99 }
100
104 static constexpr bool isMiscible()
105 { return true; }
106
112 static constexpr bool isGas(int phaseIdx)
113 {
114 assert(0 <= phaseIdx && phaseIdx < numPhases);
115 return phaseIdx == gasPhaseIdx;
116 }
117
132 static constexpr bool isIdealMixture(int phaseIdx)
133 {
134 assert(0 <= phaseIdx && phaseIdx < numPhases);
135 // we assume Henry's and Raoult's laws for the water phase and
136 // and no interaction between gas molecules of different
137 // components, so all phases are ideal mixtures!
138 return true;
139 }
140
150 static constexpr bool isCompressible(int phaseIdx)
151 {
152 assert(0 <= phaseIdx && phaseIdx < numPhases);
153 // ideal gases are always compressible
154 if (phaseIdx == gasPhaseIdx)
155 return true;
156 // the water component decides for the liquid phase...
157 return H2O::liquidIsCompressible();
158 }
159
166 static constexpr bool viscosityIsConstant(int phaseIdx)
167 {
168 // water decides for the liquid phase
169 if (phaseIdx == liquidPhaseIdx)
170 return H2O::liquidViscosityIsConstant();
171 // air decides if policy is enabled
172 else if (phaseIdx == gasPhaseIdx && Policy::useAirViscosityAsGasMixtureViscosity())
174 // in general it depends on the mixture
175 else
176 return false;
177 }
178
185 static constexpr bool isIdealGas(int phaseIdx)
186 {
187 assert(0 <= phaseIdx && phaseIdx < numPhases);
188
189 // let the fluids decide
190 if (phaseIdx == gasPhaseIdx)
191 return H2O::gasIsIdeal() && Air::gasIsIdeal();
192 return false; // not a gas
193 }
194
195 /****************************************
196 * Component related static parameters
197 ****************************************/
203 static std::string componentName(int compIdx)
204 {
205 switch (compIdx)
206 {
207 case H2OIdx: return H2O::name();
208 case AirIdx: return Air::name();
209 }
210 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << compIdx);
211 }
212
218 static Scalar molarMass(int compIdx)
219 {
220 switch (compIdx)
221 {
222 case H2OIdx: return H2O::molarMass();
223 case AirIdx: return Air::molarMass();
224 }
225 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << compIdx);
226 }
227
233 static Scalar criticalTemperature(int compIdx)
234 {
235 static const Scalar TCrit[] = {
236 H2O::criticalTemperature(),
238 };
239
240 assert(0 <= compIdx && compIdx < numComponents);
241 return TCrit[compIdx];
242 }
243
249 static Scalar criticalPressure(int compIdx)
250 {
251 static const Scalar pCrit[] = {
252 H2O::criticalPressure(),
254 };
255
256 assert(0 <= compIdx && compIdx < numComponents);
257 return pCrit[compIdx];
258 }
259
266 template <class FluidState>
267 static Scalar vaporPressure(const FluidState &fluidState, int compIdx)
268 {
269 if (compIdx == H2OIdx)
270 {
271 const auto t = fluidState.temperature(H2OIdx);
272 // cppcheck-suppress internalAstError
273 if constexpr (!useKelvinVaporPressure)
274 return H2O::vaporPressure(t);
275 else
276 {
277 const auto pc = (fluidState.wettingPhase() == (int) H2OIdx)
278 ? fluidState.pressure(AirIdx)-fluidState.pressure(H2OIdx)
279 : fluidState.pressure(H2OIdx)-fluidState.pressure(AirIdx);
280 return H2O::vaporPressure(t)*exp( -pc * molarMass(H2OIdx)
281 / density(fluidState, H2OIdx)
283 }
284 }
285 else if (compIdx == AirIdx)
286 // return Air::vaporPressure(fluidState.temperature(AirIdx));
287 DUNE_THROW(Dune::NotImplemented, "Air::vaporPressure(t)");
288 else
289 DUNE_THROW(Dune::NotImplemented, "Invalid component index " << compIdx);
290 }
291
297 static Scalar criticalMolarVolume(int compIdx)
298 {
299 DUNE_THROW(Dune::NotImplemented,
300 "H2OAirFluidSystem::criticalMolarVolume()");
301 }
302
308 static Scalar acentricFactor(int compIdx)
309 {
310 static const Scalar accFac[] = {
311 H2O::acentricFactor(),
312 Air::acentricFactor()
313 };
314
315 assert(0 <= compIdx && compIdx < numComponents);
316 return accFac[compIdx];
317 }
318
319 /****************************************
320 * thermodynamic relations
321 ****************************************/
322
329 static void init()
330 {
331 init(/*tempMin=*/273.15,
332 /*tempMax=*/623.15,
333 /*numTemp=*/100,
334 /*pMin=*/-10.,
335 /*pMax=*/20e6,
336 /*numP=*/200);
337 }
338
350 static void init(Scalar tempMin, Scalar tempMax, unsigned nTemp,
351 Scalar pressMin, Scalar pressMax, unsigned nPress)
352 {
353 std::cout << "The H2O-air fluid system was configured with the following policy:\n";
354 std::cout << " - use H2O density as liquid mixture density: " << std::boolalpha << Policy::useH2ODensityAsLiquidMixtureDensity() << "\n";
355 std::cout << " - use ideal gas density: " << std::boolalpha << Policy::useIdealGasDensity() << "\n";
356 std::cout << " - use air viscosity as gas mixture viscosity: " << std::boolalpha << Policy::useAirViscosityAsGasMixtureViscosity() << std::endl;
357
358 if (H2O::isTabulated)
359 {
360 H2O::init(tempMin, tempMax, nTemp,
361 pressMin, pressMax, nPress);
362 }
363 }
364
379 template <class FluidState>
380 static Scalar density(const FluidState &fluidState,
381 const int phaseIdx)
382 {
383 assert(0 <= phaseIdx && phaseIdx < numPhases);
384
385 const Scalar T = fluidState.temperature(phaseIdx);
386 const Scalar p = fluidState.pressure(phaseIdx);
387
388 if (phaseIdx == phase0Idx)
389 {
390 if (Policy::useH2ODensityAsLiquidMixtureDensity())
391 // assume pure water
392 return H2O::liquidDensity(T, p);
393 else
394 {
395 // See: Eq. (7) in Class et al. (2002a)
396 // This assumes each gas molecule displaces exactly one
397 // molecule in the liquid.
398 return H2O::liquidMolarDensity(T, p)
399 * (H2O::molarMass()*fluidState.moleFraction(liquidPhaseIdx, H2OIdx)
400 + Air::molarMass()*fluidState.moleFraction(liquidPhaseIdx, AirIdx));
401 }
402 }
403 else if (phaseIdx == gasPhaseIdx)
404 {
405 if (Policy::useIdealGasDensity())
406 // for the gas phase assume an ideal gas
407 {
408 const Scalar averageMolarMass = fluidState.averageMolarMass(gasPhaseIdx);
409 return IdealGas::density(averageMolarMass, T, p);
410 }
411
412 return H2O::gasDensity(T, fluidState.partialPressure(gasPhaseIdx, H2OIdx))
413 + Air::gasDensity(T, fluidState.partialPressure(gasPhaseIdx, AirIdx));
414 }
415 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
416 }
417
420 template <class FluidState>
421 static Scalar molarDensity(const FluidState &fluidState, int phaseIdx)
422 {
423 assert(0 <= phaseIdx && phaseIdx < numPhases);
424
425 const Scalar T = fluidState.temperature(phaseIdx);
426 const Scalar p = fluidState.pressure(phaseIdx);
427
428 if (phaseIdx == phase0Idx)
429 {
430 // assume pure water or that each gas molecule displaces exactly one
431 // molecule in the liquid.
432 return H2O::liquidMolarDensity(T, p);
433 }
434 else if (phaseIdx == phase1Idx)
435 {
436 if (Policy::useIdealGasDensity())
437 // for the gas phase assume an ideal gas
438 { return IdealGas::molarDensity(T, p); }
439
440 return H2O::gasMolarDensity(T, fluidState.partialPressure(phase1Idx, H2OIdx))
441 + Air::gasMolarDensity(T, fluidState.partialPressure(phase1Idx, AirIdx));
442 }
443 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
444 }
445
459 template <class FluidState>
460 static Scalar viscosity(const FluidState &fluidState,
461 int phaseIdx)
462 {
463 assert(0 <= phaseIdx && phaseIdx < numPhases);
464
465 Scalar T = fluidState.temperature(phaseIdx);
466 Scalar p = fluidState.pressure(phaseIdx);
467
468 if (phaseIdx == liquidPhaseIdx)
469 {
470 // assume pure water for the liquid phase
471 return H2O::liquidViscosity(T, p);
472 }
473 else if (phaseIdx == gasPhaseIdx)
474 {
475 if(Policy::useAirViscosityAsGasMixtureViscosity()){
476 return Air::gasViscosity(T, p);
477 }
478 else //using a complicated version of this fluid system
479 {
480 // Wilke method (Reid et al.):
481 Scalar muResult = 0;
482 const Scalar mu[numComponents] = {
485 };
486
487 // molar masses
488 const Scalar M[numComponents] = {
489 H2O::molarMass(),
491 };
492
493 for (int i = 0; i < numComponents; ++i)
494 {
495 Scalar divisor = 0;
496 using std::sqrt;
497 for (int j = 0; j < numComponents; ++j)
498 {
499 // 1 + (mu[i]/mu[j]^1/2 * (M[i]/M[j])^1/4)
500 Scalar phiIJ = 1 + sqrt(mu[i]/mu[j] * sqrt(M[j]/M[i]));
501 phiIJ = phiIJ * phiIJ / sqrt(8*(1 + M[i]/M[j]));
502 divisor += fluidState.moleFraction(phaseIdx, j)*phiIJ;
503 }
504 muResult += fluidState.moleFraction(phaseIdx, i)*mu[i] / divisor;
505 }
506 return muResult;
507 }
508 }
509 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
510 }
511
531 template <class FluidState>
532 static Scalar fugacityCoefficient(const FluidState &fluidState,
533 int phaseIdx,
534 int compIdx)
535 {
536 assert(0 <= phaseIdx && phaseIdx < numPhases);
537 assert(0 <= compIdx && compIdx < numComponents);
538
539 Scalar T = fluidState.temperature(phaseIdx);
540 Scalar p = fluidState.pressure(phaseIdx);
541
542 if (phaseIdx == liquidPhaseIdx) {
543 if (compIdx == H2OIdx)
544 return vaporPressure(fluidState, compIdx)/p;
545 return BinaryCoeff::H2O_Air::henry(T)/p;
546 }
547
548 // for the gas phase, assume an ideal gas when it comes to
549 // fugacity (-> fugacity == partial pressure)
550 return 1.0;
551 }
552
559 template <class FluidState>
560 static Scalar relativeHumidity(const FluidState &fluidState)
561 {
562 return fluidState.partialPressure(gasPhaseIdx, comp0Idx)
563 / H2O::vaporPressure(fluidState.temperature(gasPhaseIdx));
564 }
565
568 template <class FluidState>
569 static Scalar diffusionCoefficient(const FluidState &fluidState,
570 int phaseIdx,
571 int compIdx)
572 {
573 DUNE_THROW(Dune::NotImplemented, "FluidSystems::H2OAir::diffusionCoefficient()");
574 }
575
578 template <class FluidState>
579 static Scalar binaryDiffusionCoefficient(const FluidState &fluidState,
580 int phaseIdx,
581 int compIIdx,
582 int compJIdx)
583 {
584 using std::swap;
585 if (compIIdx > compJIdx)
586 swap(compIIdx, compJIdx);
587
588 Scalar T = fluidState.temperature(phaseIdx);
589 Scalar p = fluidState.pressure(phaseIdx);
590
591 // we are in the liquid phase
592 if (phaseIdx == liquidPhaseIdx)
593 {
594 if (compIIdx == H2OIdx && compJIdx == AirIdx)
596 else
597 DUNE_THROW(Dune::InvalidStateException,
598 "Binary diffusion coefficient of components "
599 << compIIdx << " and " << compJIdx
600 << " in phase " << phaseIdx << " is undefined!\n");
601 }
602
603 // we are in the gas phase
604 else if (phaseIdx == gasPhaseIdx)
605 {
606 if (compIIdx == H2OIdx && compJIdx == AirIdx)
608 else
609 DUNE_THROW(Dune::InvalidStateException,
610 "Binary diffusion coefficient of components "
611 << compIIdx << " and " << compJIdx
612 << " in phase " << phaseIdx << " is undefined!\n");
613 }
614
615 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
616 }
617
636 template <class FluidState>
637 static Scalar enthalpy(const FluidState &fluidState,
638 int phaseIdx)
639 {
640 const Scalar T = fluidState.temperature(phaseIdx);
641 const Scalar p = fluidState.pressure(phaseIdx);
642
643 if (phaseIdx == liquidPhaseIdx)
644 return H2O::liquidEnthalpy(T, p);
645
646 else if (phaseIdx == gasPhaseIdx)
647 return H2O::gasEnthalpy(T, p)*fluidState.massFraction(gasPhaseIdx, H2OIdx)
648 + Air::gasEnthalpy(T, p)*fluidState.massFraction(gasPhaseIdx, AirIdx);
649
650 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
651 }
652
660 template <class FluidState>
661 static Scalar componentEnthalpy(const FluidState &fluidState,
662 int phaseIdx,
663 int componentIdx)
664 {
665 const Scalar T = fluidState.temperature(phaseIdx);
666 const Scalar p = fluidState.pressure(phaseIdx);
667
668 if (phaseIdx == liquidPhaseIdx)
669 {
670 // the liquid enthalpy is constant
671 return H2O::liquidEnthalpy(T, p);
672 }
673 else if (phaseIdx == gasPhaseIdx)
674 {
675 if (componentIdx == H2OIdx)
676 {
677 return H2O::gasEnthalpy(T, p);
678 }
679 else if (componentIdx == AirIdx)
680 {
681 return Air::gasEnthalpy(T, p);
682 }
683 DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << componentIdx);
684 }
685 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
686 }
687
698 template <class FluidState>
699 static Scalar thermalConductivity(const FluidState &fluidState,
700 int phaseIdx)
701 {
702 assert(0 <= phaseIdx && phaseIdx < numPhases);
703
704 const Scalar temperature = fluidState.temperature(phaseIdx) ;
705 const Scalar pressure = fluidState.pressure(phaseIdx);
706 if (phaseIdx == liquidPhaseIdx)
707 {
708 return H2O::liquidThermalConductivity(temperature, pressure);
709 }
710 else if (phaseIdx == gasPhaseIdx)
711 {
713 }
714 else
715 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
716 }
717
729 template <class FluidState>
730 static Scalar heatCapacity(const FluidState &fluidState,
731 int phaseIdx)
732 {
733 const Scalar temperature = fluidState.temperature(phaseIdx);
734 const Scalar pressure = fluidState.pressure(phaseIdx);
735 if (phaseIdx == liquidPhaseIdx)
736 {
737 // influence of air is neglected
738 return H2O::liquidHeatCapacity(temperature, pressure);
739 }
740 else if (phaseIdx == gasPhaseIdx)
741 {
742 return Air::gasHeatCapacity(temperature, pressure) * fluidState.moleFraction(gasPhaseIdx, AirIdx)
743 + H2O::gasHeatCapacity(temperature, pressure) * fluidState.moleFraction(gasPhaseIdx, H2OIdx);
744 }
745 else
746 DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
747 }
748};
749
750} // end namespace FluidSystems
751} // end namespace Dumux
752
753#endif
A simple class for the air fluid properties.
static Scalar henry(Scalar temperature)
Henry coefficient for air in liquid water.
Definition: h2o_air.hh:36
static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
Binary diffusion coefficient for molecular water and air.
Definition: h2o_air.hh:56
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
Diffusion coefficient for molecular nitrogen in liquid water.
Definition: h2o_air.hh:89
A class for the air fluid properties.
Definition: air.hh:35
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of Air at a given pressure and temperature.
Definition: air.hh:73
static constexpr Scalar molarMass()
The molar mass in of Air.
Definition: air.hh:50
static const Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of pure air.
Definition: air.hh:301
static Scalar criticalPressure()
Returns the critical pressure of Air.
Definition: air.hh:62
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:181
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of air.
Definition: air.hh:339
static constexpr bool gasViscosityIsConstant()
Returns true if the gas phase viscosity is constant.
Definition: air.hh:103
static constexpr bool gasIsIdeal()
Returns true, the gas phase is assumed to be ideal.
Definition: air.hh:97
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of Air with 273.15 as basis.
Definition: air.hh:264
static Scalar criticalTemperature()
Returns the critical temperature of Air.
Definition: air.hh:56
static std::string name()
A human readable name for Air.
Definition: air.hh:42
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of air in , depending on pressure and temperature.
Definition: air.hh:85
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
Fluid system base class.
Definition: fluidsystems/base.hh:33
A compositional two-phase fluid system with water and air as components in both, the liquid and the g...
Definition: h2oair.hh:62
static Scalar viscosity(const FluidState &fluidState, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: h2oair.hh:460
static constexpr bool isGas(int phaseIdx)
Return whether a phase is gaseous.
Definition: h2oair.hh:112
static Scalar enthalpy(const FluidState &fluidState, int phaseIdx)
Given a phase's composition, temperature and pressure, return its specific enthalpy .
Definition: h2oair.hh:637
static Scalar criticalMolarVolume(int compIdx)
Molar volume of a component at the critical point .
Definition: h2oair.hh:297
static Scalar vaporPressure(const FluidState &fluidState, int compIdx)
Vapor pressure of a component .
Definition: h2oair.hh:267
static constexpr int comp1Idx
index of the second component
Definition: h2oair.hh:81
static constexpr bool isIdealGas(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be an ideal gas.
Definition: h2oair.hh:185
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: h2oair.hh:350
static std::string componentName(int compIdx)
Return the human readable name of a component.
Definition: h2oair.hh:203
static constexpr int numComponents
Number of components in the fluid system.
Definition: h2oair.hh:71
static constexpr int liquidPhaseIdx
index of the liquid phase
Definition: h2oair.hh:73
static constexpr int gasPhaseIdx
index of the gas phase
Definition: h2oair.hh:74
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Specific isobaric heat capacity of a fluid phase. .
Definition: h2oair.hh:730
static std::string phaseName(int phaseIdx)
Return the human readable name of a phase.
Definition: h2oair.hh:90
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: h2oair.hh:699
static Scalar componentEnthalpy(const FluidState &fluidState, int phaseIdx, int componentIdx)
Returns the specific enthalpy of a component in a specific phase.
Definition: h2oair.hh:661
static constexpr bool isIdealMixture(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
Definition: h2oair.hh:132
static Scalar criticalPressure(int compIdx)
Critical pressure of a component .
Definition: h2oair.hh:249
static constexpr int phase1Idx
index of the second phase
Definition: h2oair.hh:76
static constexpr int comp0Idx
index of the first component
Definition: h2oair.hh:80
static constexpr int numPhases
Number of phases in the fluid system.
Definition: h2oair.hh:70
static constexpr bool isCompressible(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: h2oair.hh:150
static constexpr int H2OIdx
index of the first component
Definition: h2oair.hh:78
static constexpr bool viscosityIsConstant(int phaseIdx)
Returns true if and only if a fluid phase is assumed to have a constant viscosity.
Definition: h2oair.hh:166
H2Otype H2O
Definition: h2oair.hh:67
static Scalar fugacityCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Returns the fugacity coefficient of a component in a phase.
Definition: h2oair.hh:532
static Scalar relativeHumidity(const FluidState &fluidState)
Returns the relative humidity of the gas phase.
Definition: h2oair.hh:560
static Scalar molarDensity(const FluidState &fluidState, int phaseIdx)
Calculate the molar density of a fluid phase.
Definition: h2oair.hh:421
static constexpr int liquidCompIdx
index of the liquid component
Definition: h2oair.hh:82
static void init()
Initialize the fluid system's static parameters generically.
Definition: h2oair.hh:329
static Scalar density(const FluidState &fluidState, const int phaseIdx)
Given a phase's composition, temperature, pressure, and the partial pressures of all components,...
Definition: h2oair.hh:380
static constexpr int AirIdx
index of the second component
Definition: h2oair.hh:79
static Scalar acentricFactor(int compIdx)
The acentric factor of a component .
Definition: h2oair.hh:308
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: h2oair.hh:579
static constexpr int phase0Idx
index of the first phase
Definition: h2oair.hh:75
static constexpr int gasCompIdx
index of the gas component
Definition: h2oair.hh:83
static constexpr bool isMiscible()
Returns whether the fluids are miscible.
Definition: h2oair.hh:104
static Scalar criticalTemperature(int compIdx)
Critical temperature of a component .
Definition: h2oair.hh:233
static Scalar diffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Calculate the binary molecular diffusion coefficient for a component in a fluid phase .
Definition: h2oair.hh:569
static Scalar molarMass(int compIdx)
Return the molar mass of a component .
Definition: h2oair.hh:218
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
Some exceptions thrown in DuMux
Fluid system base class.
Material properties of pure water .
Binary coefficients for water and air.
Relations valid for an ideal gas.
A collection of input/output field names for common physical quantities.
Scalar h2oGasViscosityInMixture(Scalar temperature, Scalar pressure)
The dynamic viscosity of steam in a gas mixture.
Definition: h2o.hh:961
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
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
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:22
Definition: adapt.hh:17
Policy for the H2O-air fluid system.
Definition: h2oair.hh:39
static constexpr bool useAirViscosityAsGasMixtureViscosity()
Definition: h2oair.hh:42
static constexpr bool useIdealGasDensity()
Definition: h2oair.hh:41
static constexpr bool useH2ODensityAsLiquidMixtureDensity()
Definition: h2oair.hh:40
Tabulates all thermodynamic properties of a given untabulated chemical species.