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