version 3.11-dev
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
mesitylene.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_MESITYLENE_HH
13#define DUMUX_MESITYLENE_HH
14
17
21
22namespace Dumux::Components {
23
30template <class Scalar>
32: public Components::Base<Scalar, Mesitylene<Scalar> >
33, public Components::Liquid<Scalar, Mesitylene<Scalar> >
34, public Components::Gas<Scalar, Mesitylene<Scalar> >
35{
38public:
42 static std::string name()
43 { return "mesitylene"; }
44
48 constexpr static Scalar molarMass()
49 { return 0.120; }
50
54 constexpr static Scalar criticalTemperature()
55 { return 637.3; }
56
60 constexpr static Scalar criticalPressure()
61 { return 31.3e5; }
62
66 constexpr static Scalar boilingTemperature()
67 { return 437.9; }
68
73 {
74 DUNE_THROW(Dune::NotImplemented, "tripleTemperature for mesitylene");
75 }
76
81 {
82 DUNE_THROW(Dune::NotImplemented, "triplePressure for mesitylene");
83 }
84
93 {
94 const Scalar A = 7.07638;
95 const Scalar B = 1571.005;
96 const Scalar C = 209.728;
97
98 const Scalar T = temperature - 273.15;
99
100 using std::pow;
101 return 100 * 1.334 * pow(Scalar(10.0), Scalar(A - (B / (T + C))));
102 }
103
104
112 const Scalar pressure)
113 {
114 // Gauss quadrature rule:
115 // Interval: [0K; temperature (K)]
116 // Gauss-Legendre-Integration with variable transformation:
117 // \int_a^b f(T) dT \approx (b-a)/2 \sum_i=1^n \alpha_i f( (b-a)/2 x_i + (a+b)/2 )
118 // with: n=2, legendre -> x_i = +/- \sqrt(1/3), \apha_i=1
119 // here: a=273.15K, b=actual temperature in Kelvin
120 // \leadsto h(T) = \int_273.15^T c_p(T) dT
121 // \approx 0.5 (T-273.15) * (cp( 0.5(temperature-273.15)sqrt(1/3) ) + cp(0.5(temperature-273.15)(-1)sqrt(1/3))
122
123 // Enthalpy may have arbitrary reference state, but the empirical/fitted heatCapacity function needs Kelvin as input and is
124 // fit over a certain temperature range. This suggests choosing an interval of integration being in the actual fit range.
125 // I.e. choosing T=273.15K as reference point for liquid enthalpy.
126 using std::sqrt;
127 const Scalar sqrt1over3 = sqrt(1./3.);
128 // evaluation points according to Gauss-Legendre integration
129 const Scalar TEval1 = 0.5*(temperature-273.15)* sqrt1over3 + 0.5*(273.15+temperature);
130 // evaluation points according to Gauss-Legendre integration
131 const Scalar TEval2 = 0.5*(temperature-273.15)* (-1)* sqrt1over3 + 0.5*(273.15+temperature);
132
133 const Scalar h_n = 0.5 * (temperature-273.15) * ( liquidHeatCapacity(TEval1, pressure) + liquidHeatCapacity(TEval2, pressure) );
134
135 return h_n;
136 }
137
147 const Scalar pressure)
148 {
149 using std::min;
150 using std::max;
151 temperature = min(temperature, criticalTemperature()); // regularization
152 temperature = max(temperature, 0.0); // regularization
153
154 constexpr Scalar T_crit = criticalTemperature();
156 constexpr Scalar p_crit = criticalPressure();
157
158 // Chen method, eq. 7-11.4 (at boiling)
159 using std::log;
160 const Scalar DH_v_boil = Consts::R * T_crit * Tr1 * (3.978 * Tr1 - 3.958 + 1.555*log(p_crit * 1e-5 /*Pa->bar*/ ) )
161 / (1.07 - Tr1); /* [J/mol] */
162
163 /* Variation with temp according to Watson relation eq 7-12.1*/
164 using std::pow;
166 const Scalar n = 0.375;
167 const Scalar DH_vap = DH_v_boil * pow(((1.0 - Tr2)/(1.0 - Tr1)), n);
168
169 return (DH_vap/molarMass()); // we need [J/kg]
170 }
171
172
183 {
185 }
186
194 {
197 pressure);
198 }
199
208
216 {
218 }
219
230 {
231 using std::min;
232 using std::max;
233 temperature = min(temperature, 500.0); // regularization
234 temperature = max(temperature, 250.0);
235
236 const Scalar Z_RA = 0.2556; // from equation
237
238 using std::pow;
239 const Scalar expo = 1.0 + pow(1.0 - temperature/criticalTemperature(), 2.0/7.0);
240 Scalar V = Consts::R*criticalTemperature()/criticalPressure()*pow(Z_RA, expo); // liquid molar volume [cm^3/mol]
241
242 return 1.0/V; // molar density [mol/m^3]
243 }
244
248 static constexpr bool gasIsCompressible()
249 { return true; }
250
254 static constexpr bool gasIsIdeal()
255 { return true; }
256
260 static constexpr bool liquidIsCompressible()
261 { return false; }
262
270 {
271 using std::min;
272 using std::max;
273 temperature = min(temperature, 500.0); // regularization
274 temperature = max(temperature, 250.0);
275
276 // reduced temperature
278
279 Scalar Fp0 = 1.0;
280 Scalar xi = 0.00474;
281
282 using std::pow;
283 using std::exp;
284 Scalar eta_xi =
285 Fp0*(0.807*pow(Tr,0.618)
286 - 0.357*exp(-0.449*Tr)
287 + 0.34*exp(-4.058*Tr)
288 + 0.018);
289
290 return eta_xi/xi/1e7; // [Pa s]
291 }
292
300 {
301 using std::min;
302 using std::max;
303 temperature = min(temperature, 500.0); // regularization
304 temperature = max(temperature, 250.0);
305
306 const Scalar A = -6.749;
307 const Scalar B = 2010.0;
308
309 using std::exp;
310 return exp(A + B/temperature)*1e-3; // [Pa s]
311 }
312
323 const Scalar pressure)
324 {
325 /* according Reid et al. : Missenard group contrib. method (s. example 5-8) */
326 /* Mesitylen: C9H12 : 3* CH3 ; 1* C6H5 (phenyl-ring) ; -2* H (this was to much!) */
327 /* linear interpolation between table values [J/(mol K)]*/
328 Scalar H, CH3, C6H5;
329 if(temperature<298.) {
330 // extrapolation for Temperature<273 */
331 H = 13.4+1.2*(temperature-273.0)/25.; // 13.4 + 1.2 = 14.6 = H(T=298K) i.e. interpolation of table values 273<T<298
332 CH3 = 40.0+1.6*(temperature-273.0)/25.; // 40 + 1.6 = 41.6 = CH3(T=298K)
333 C6H5 = 113.0+4.2*(temperature-273.0)/25.; // 113 + 4.2 =117.2 = C6H5(T=298K)
334 }
335 else if((temperature>=298.0)&&(temperature<323.)){ // i.e. interpolation of table values 298<T<323
336 H = 14.6+0.9*(temperature-298.0)/25.;
337 CH3 = 41.6+1.9*(temperature-298.0)/25.;
338 C6H5 = 117.2+6.2*(temperature-298.0)/25.;
339 }
340 else if((temperature>=323.0)&&(temperature<348.)){// i.e. interpolation of table values 323<T<348
341 H = 15.5+1.2*(temperature-323.0)/25.;
342 CH3 = 43.5+2.3*(temperature-323.0)/25.;
343 C6H5 = 123.4+6.3*(temperature-323.0)/25.;
344 }
345 else {
346 assert(temperature>=348.0);
347
348 /* take care: extrapolation for Temperature>373 */
349 H = 16.7+2.1*(temperature-348.0)/25.; /* leads probably to underestimates */
350 CH3 = 45.8+2.5*(temperature-348.0)/25.;
351 C6H5 = 129.7+6.3*(temperature-348.0)/25.;
352 }
353
354 return (C6H5 + 3*CH3 - 2*H)/molarMass(); // J/(mol K) -> J/(kg K)
355 }
356
366 {
367 return 0.1351;
368 }
369};
370
371} // end namespace Dumux::Components
372
373#endif
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
Interface for components that have a liquid state.
Definition: liquid.hh:28
mesitylene
Definition: mesitylene.hh:35
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of mesitylene in , depending on pressure and temperature.
Definition: mesitylene.hh:206
static constexpr Scalar boilingTemperature()
Returns the temperature at mesitylene's boiling point (1 atm).
Definition: mesitylene.hh:66
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of mesitylene vapor .
Definition: mesitylene.hh:182
static constexpr Scalar criticalTemperature()
Returns the critical temperature of mesitylene.
Definition: mesitylene.hh:54
static constexpr Scalar criticalPressure()
Returns the critical pressure of mesitylene.
Definition: mesitylene.hh:60
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: mesitylene.hh:248
static Scalar liquidHeatCapacity(const Scalar temperature, const Scalar pressure)
Specific heat capacity of liquid mesitylene .
Definition: mesitylene.hh:322
static std::string name()
A human readable name for the mesitylene.
Definition: mesitylene.hh:42
static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
The molar density of pure mesitylene at a given pressure and temperature .
Definition: mesitylene.hh:229
static constexpr Scalar molarMass()
The molar mass in of mesitylene.
Definition: mesitylene.hh:48
static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of mesitylene.
Definition: mesitylene.hh:365
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of mesitylene vapor.
Definition: mesitylene.hh:269
static Scalar vaporPressure(Scalar temperature)
The saturation vapor pressure in of pure mesitylene at a given temperature according to Antoine afte...
Definition: mesitylene.hh:92
static constexpr bool liquidIsCompressible()
Returns true if the liquid phase is assumed to be compressible.
Definition: mesitylene.hh:260
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of mesitylene at a given pressure and temperature .
Definition: mesitylene.hh:193
static Scalar liquidEnthalpy(const Scalar temperature, const Scalar pressure)
Specific enthalpy of liquid mesitylene .
Definition: mesitylene.hh:111
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of pure mesitylene at a given pressure and temperature .
Definition: mesitylene.hh:215
static Scalar heatVap(Scalar temperature, const Scalar pressure)
Latent heat of vaporization for mesitylene .
Definition: mesitylene.hh:146
static Scalar tripleTemperature()
Returns the temperature at mesitylene's triple point.
Definition: mesitylene.hh:72
static Scalar triplePressure()
Returns the pressure at mesitylene's triple point.
Definition: mesitylene.hh:80
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: mesitylene.hh:254
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of pure mesitylene.
Definition: mesitylene.hh:299
A central place for various physical constants occurring in some equations.
Definition: constants.hh:27
static constexpr Scalar R
The ideal gas constant .
Definition: constants.hh:32
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
Base class for all components Components provide the thermodynamic relations for the liquid,...
A central place for various physical constants occurring in some equations.
Interface for components that have a gas state.
Relations valid for an ideal gas.
Interface for components that have a liquid state.
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