version 3.8
n2.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//
12#ifndef DUMUX_N2_HH
13#define DUMUX_N2_HH
14
16
17#include <cmath>
18
21
22namespace Dumux {
23namespace Components {
24
31template <class Scalar>
32class N2
33: public Components::Base<Scalar, N2<Scalar> >
34, public Components::Gas<Scalar, N2<Scalar> >
35{
37
38public:
42 static std::string name()
43 { return "N2"; }
44
48 static constexpr Scalar molarMass()
49 { return 28.0134e-3;}
50
55 { return 126.192; /* [K] */ }
56
61 { return 3.39858e6; /* [N/m^2] */ }
62
67 { return 63.151; /* [K] */ }
68
73 { return 12.523e3; /* [N/m^2] */ }
74
86 {
87 if (T > criticalTemperature())
88 return criticalPressure();
89 if (T < tripleTemperature())
90 return 0; // N2 is solid: We don't take sublimation into
91 // account
92
93 // note: this is the ancillary equation given on page 1368
94 using std::sqrt;
95 Scalar sigma = Scalar(1.0) - T/criticalTemperature();
96 Scalar sqrtSigma = sqrt(sigma);
97 const Scalar N1 = -6.12445284;
98 const Scalar N2 = 1.26327220;
99 const Scalar N3 = -0.765910082;
100 const Scalar N4 = -1.77570564;
101
102 using std::exp;
103 return
105 exp(criticalTemperature()/T*
106 (sigma*(N1 +
107 sqrtSigma*N2 +
108 sigma*(sqrtSigma*N3 +
109 sigma*sigma*sigma*N4))));
110 }
111
119 {
120 // Assume an ideal gas
122 }
123
133
137 static constexpr bool gasIsCompressible()
138 { return true; }
139
143 static constexpr bool gasIsIdeal()
144 { return true; }
145
153 {
154 // Assume an ideal gas
156 }
157
166 {
168 }
169
185 {
186 return
188 1/molarMass()* // conversion from [J/(mol K)] to [J/(kg K)]
189 IdealGas::R*temperature; // = pressure * spec. volume for an ideal gas
190 }
191
203 {
204 // method of Joback
205 const Scalar cpVapA = 31.15;
206 const Scalar cpVapB = -0.01357;
207 const Scalar cpVapC = 2.680e-5;
208 const Scalar cpVapD = -1.168e-8;
209
210 return
211 1/molarMass()* // conversion from [J/(mol K)] to [J/(kg K)]
212 (cpVapA + T*
213 (cpVapB/2 + T*
214 (cpVapC/3 + T*
215 (cpVapD/4))));
216 }
217
232 {
233 const Scalar Tc = criticalTemperature();
234 const Scalar Vc = 90.1; // critical specific volume [cm^3/mol]
235 const Scalar omega = 0.037; // accentric factor
236 const Scalar M = molarMass() * 1e3; // molar mas [g/mol]
237 const Scalar dipole = 0.0; // dipole moment [debye]
238
239 using std::sqrt;
240 Scalar mu_r4 = 131.3 * dipole / sqrt(Vc * Tc);
241 mu_r4 *= mu_r4;
242 mu_r4 *= mu_r4;
243
244 using std::pow;
245 using std::exp;
246 Scalar Fc = 1 - 0.2756*omega + 0.059035*mu_r4;
247 Scalar Tstar = 1.2593 * temperature/Tc;
248 Scalar Omega_v =
249 1.16145*pow(Tstar, -0.14874) +
250 0.52487*exp(- 0.77320*Tstar) +
251 2.16178*exp(- 2.43787*Tstar);
252 Scalar mu = 40.785*Fc*sqrt(M*temperature)/(pow(Vc, 2./3)*Omega_v);
253
254 // conversion from micro poise to Pa s
255 return mu/1e6 / 10;
256 }
257
270 {
271 return 6.525e-5 * (temperature - 273.15) + 0.024031;
272 }
273};
274
275} // end namespace Components
276
277} // end namespace Dumux
278
279#endif
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition: components/base.hh:47
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:51
Interface for components that have a gas state.
Definition: gas.hh:29
Properties of pure molecular nitrogen .
Definition: n2.hh:35
static Scalar criticalTemperature()
Returns the critical temperature of molecular nitrogen.
Definition: n2.hh:54
static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific enthalpy of pure nitrogen gas.
Definition: n2.hh:183
static Scalar criticalPressure()
Returns the critical pressure of molecular nitrogen.
Definition: n2.hh:60
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of at a given pressure and temperature.
Definition: n2.hh:231
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of gas in at a given pressure and temperature.
Definition: n2.hh:131
static std::string name()
A human readable name for nitrogen.
Definition: n2.hh:42
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of gas at a given pressure and temperature.
Definition: n2.hh:118
static constexpr Scalar molarMass()
The molar mass in of molecular nitrogen.
Definition: n2.hh:48
static Scalar vaporPressure(Scalar T)
The vapor pressure in of pure molecular nitrogen at a given temperature.
Definition: n2.hh:85
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of nitrogen.
Definition: n2.hh:269
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: n2.hh:143
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: n2.hh:137
static const Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of pure nitrogen gas.
Definition: n2.hh:164
static const Scalar gasHeatCapacity(Scalar T, Scalar pressure)
Specific isobaric heat capacity of pure nitrogen gas.
Definition: n2.hh:201
static Scalar tripleTemperature()
Returns the temperature at molecular nitrogen's triple point.
Definition: n2.hh:66
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of gaseous in at a given density and temperature.
Definition: n2.hh:152
static Scalar triplePressure()
Returns the pressure at molecular nitrogen's triple point.
Definition: n2.hh:72
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,...
Interface for components that have a gas state.
Relations valid for an ideal gas.
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
Definition: adapt.hh:17