version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
air.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_AIR_HH
13#define DUMUX_AIR_HH
14
15#include <dune/common/math.hh>
16
21
29template <class Scalar>
30class Air
31: public Components::Base<Scalar, Air<Scalar> >
32, public Components::Gas<Scalar, Air<Scalar> >
33{
35
36public:
40 static std::string name()
41 { return "Air"; }
42
48 static constexpr Scalar molarMass()
49 { return 0.02896; /* [kg/mol] */ }
50
55 { return 132.6312; /* [K] */ }
56
61 { return 37.86e5; /* [Pa] */ }
62
72 {
73 // Assume an ideal gas
75 }
76
85
89 static constexpr bool gasIsCompressible()
90 { return true; }
91
95 static constexpr bool gasIsIdeal()
96 { return true; }
97
101 static constexpr bool gasViscosityIsConstant()
102 { return false; }
103
113 {
114 // Assume an ideal gas
116 }
117
142 {
143 const Scalar Tc = criticalTemperature();
144 const Scalar Vc = 84.525138; // critical specific volume [cm^3/mol]
145 const Scalar omega = 0.078; // accentric factor
146 const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
147
148 const Scalar Fc = 1.0 - 0.2756*omega;
149 const Scalar Tstar = 1.2593*temperature/Tc;
150
151 using std::exp;
152 using std::pow;
153 const Scalar Omega_v = 1.16145*pow(Tstar, -0.14874)
154 + 0.52487*exp(-0.77320*Tstar)
155 + 2.16178*exp(-2.43787*Tstar);
156
157 using std::cbrt;
158 using std::sqrt;
159 const Scalar mu = 40.785 * Fc * sqrt(M * temperature)/(cbrt(Vc * Vc) * Omega_v);
160
161 // conversion from micro poise to Pa s
162 return mu/1.0e6/10.0;
163 }
164
180 {
181 // above 1200 K, the function becomes inaccurate
182 // since this should realistically never happen, we can live with it
183 const Scalar tempCelsius = temperature - 273.15;
184 const Scalar pressureCorrectionFactor = 9.7115e-9*tempCelsius*tempCelsius - 5.5e-6*tempCelsius + 0.0010809;
185
186 using std::sqrt;
187 const Scalar mu = 1.496e-6 * sqrt(temperature * temperature * temperature) / (temperature + 120.0)
188 * (1.0 + (pressure/1.0e5 - 1.0)*pressureCorrectionFactor);
189 return mu;
190 }
191
204 {
205 // above 1200 K, the function becomes inaccurate
206 // since this should realistically never happen, we can live with it
207 using std::sqrt;
208 return 1.496e-6 * sqrt(temperature * temperature * temperature) / (temperature + 120.0);
209 }
210
223 {
224 const Scalar epsk = 103.3; // [K]
225
226 using std::log;
227 using std::exp;
228 using std::sqrt;
229 const Scalar logTstar = log(temperature/epsk);
230 const Scalar Omega = exp(0.431
231 - 0.4623*logTstar
232 + 0.08406*logTstar*logTstar
233 + 0.005341*logTstar*logTstar*logTstar
234 - 0.00331*logTstar*logTstar*logTstar*logTstar);
235
236 const Scalar sigma = 0.36; // [nm]
237 const Scalar eta0 = 0.0266958*sqrt(1000.0*molarMass()*temperature)/(sigma*sigma*Omega);
238
239 using std::pow;
240 using Dune::power;
242 const Scalar rhoc = 10.4477; // [mol/m^3]
243 const Scalar delta = 0.001*pressure/(temperature*8.3144598)/rhoc;
244 const Scalar etaR = 10.72 * pow(tau, 0.2) * delta
245 + 1.122 * pow(tau, 0.05) * power(delta, 4)
246 + 0.002019 * pow(tau, 2.4) * power(delta, 9)
247 - 8.876 * pow(tau, 0.6) * delta * exp(-delta)
248 - 0.02916 * pow(tau, 3.6) * power(delta, 8) * exp(-delta);
249
250 return (eta0 + etaR)*1e-6;
251 }
252
263 {
265 }
266
280 {
282 - IdealGas::R * temperature // = pressure * molar volume for an ideal gas
283 / molarMass(); // conversion from [J/(mol K)] to [J/(kg K)]
284 }
285
301 {
302 // scale temperature with reference temp of 100K
303 Scalar phi = temperature/100;
304
305 using std::pow;
306 using Dune::power;
307 Scalar c_p = 0.661738E+01
308 -0.105885E+01 * phi
309 +0.201650E+00 * power(phi,2)
310 -0.196930E-01 * power(phi,3)
311 +0.106460E-02 * power(phi,4)
312 -0.303284E-04 * power(phi,5)
313 +0.355861E-06 * power(phi,6);
314 c_p += -0.549169E+01 * power(phi,-1)
315 +0.585171E+01 * power(phi,-2)
316 -0.372865E+01 * power(phi,-3)
317 +0.133981E+01 * power(phi,-4)
318 -0.233758E+00 * power(phi,-5)
319 +0.125718E-01 * power(phi,-6);
320 c_p *= IdealGas::R / molarMass(); // in J/(mol*K) / (kg/mol)
321
322 return c_p;
323 }
324
338 {
339 return 0.0255535;
340 }
341};
342
343} // end namespace Dumux::Components
344
345#endif
A class for the air fluid properties.
Definition: air.hh:33
static Scalar exactGasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:222
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 criticalPressure()
Returns the critical pressure of Air.
Definition: air.hh:60
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:179
static constexpr bool gasIsCompressible()
Returns true, the gas phase is assumed to be compressible.
Definition: air.hh:89
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of air.
Definition: air.hh:337
static constexpr bool gasViscosityIsConstant()
Returns true if the gas phase viscosity is constant.
Definition: air.hh:101
static constexpr bool gasIsIdeal()
Returns true, the gas phase is assumed to be ideal.
Definition: air.hh:95
static Scalar simpleGasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:203
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of Air with 273.15 as basis.
Definition: air.hh:262
static Scalar criticalTemperature()
Returns the critical temperature of Air.
Definition: air.hh:54
static Scalar oldGasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition: air.hh:141
static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of Air .
Definition: air.hh:278
static std::string name()
A human readable name for Air.
Definition: air.hh:40
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of gaseous Air at a given density and temperature.
Definition: air.hh:112
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of air in , depending on pressure and temperature.
Definition: air.hh:83
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition: components/base.hh:46
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:50
Interface for components that have a gas state.
Definition: gas.hh:28
Relations valid for an ideal gas.
Definition: idealgas.hh:25
static constexpr Scalar pressure(Scalar temperature, Scalar rhoMolar)
The pressure of the gas in , depending on the molar density and temperature.
Definition: idealgas.hh:48
static constexpr Scalar R
The ideal gas constant .
Definition: idealgas.hh:28
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
Base class for all components Components provide the thermodynamic relations for the liquid,...
Some exceptions thrown in DuMux
Interface for components that have a gas state.
Relations valid for an ideal gas.
Definition: air.hh:22
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:22
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:53