3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_MESITYLENE_HH
25#define DUMUX_MESITYLENE_HH
26
29
33
34namespace Dumux {
35namespace Components {
36
43template <class Scalar>
45: public Components::Base<Scalar, Mesitylene<Scalar> >
46, public Components::Liquid<Scalar, Mesitylene<Scalar> >
47, public Components::Gas<Scalar, Mesitylene<Scalar> >
48{
51public:
55 static std::string name()
56 { return "mesitylene"; }
57
61 constexpr static Scalar molarMass()
62 { return 0.120; }
63
67 constexpr static Scalar criticalTemperature()
68 { return 637.3; }
69
73 constexpr static Scalar criticalPressure()
74 { return 31.3e5; }
75
79 constexpr static Scalar boilingTemperature()
80 { return 437.9; }
81
86 {
87 DUNE_THROW(Dune::NotImplemented, "tripleTemperature for mesitylene");
88 }
89
94 {
95 DUNE_THROW(Dune::NotImplemented, "triplePressure for mesitylene");
96 }
97
106 {
107 const Scalar A = 7.07638;
108 const Scalar B = 1571.005;
109 const Scalar C = 209.728;
110
111 const Scalar T = temperature - 273.15;
112
113 using std::pow;
114 return 100 * 1.334 * pow(Scalar(10.0), Scalar(A - (B / (T + C))));
115 }
116
117
125 const Scalar pressure)
126 {
127 // Gauss quadrature rule:
128 // Interval: [0K; temperature (K)]
129 // Gauss-Legendre-Integration with variable transformation:
130 // \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 )
131 // with: n=2, legendre -> x_i = +/- \sqrt(1/3), \apha_i=1
132 // here: a=273.15K, b=actual temperature in Kelvin
133 // \leadsto h(T) = \int_273.15^T c_p(T) dT
134 // \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))
135
136 // Enthalpy may have arbitrary reference state, but the empirical/fitted heatCapacity function needs Kelvin as input and is
137 // fit over a certain temperature range. This suggests choosing an interval of integration being in the actual fit range.
138 // I.e. choosing T=273.15K as reference point for liquid enthalpy.
139 using std::sqrt;
140 const Scalar sqrt1over3 = sqrt(1./3.);
141 // evaluation points according to Gauss-Legendre integration
142 const Scalar TEval1 = 0.5*(temperature-273.15)* sqrt1over3 + 0.5*(273.15+temperature);
143 // evaluation points according to Gauss-Legendre integration
144 const Scalar TEval2 = 0.5*(temperature-273.15)* (-1)* sqrt1over3 + 0.5*(273.15+temperature);
145
146 const Scalar h_n = 0.5 * (temperature-273.15) * ( liquidHeatCapacity(TEval1, pressure) + liquidHeatCapacity(TEval2, pressure) );
147
148 return h_n;
149 }
150
160 const Scalar pressure)
161 {
162 using std::min;
163 using std::max;
164 temperature = min(temperature, criticalTemperature()); // regularization
165 temperature = max(temperature, 0.0); // regularization
166
167 constexpr Scalar T_crit = criticalTemperature();
169 constexpr Scalar p_crit = criticalPressure();
170
171 // Chen method, eq. 7-11.4 (at boiling)
172 using std::log;
173 const Scalar DH_v_boil = Consts::R * T_crit * Tr1 * (3.978 * Tr1 - 3.958 + 1.555*log(p_crit * 1e-5 /*Pa->bar*/ ) )
174 / (1.07 - Tr1); /* [J/mol] */
175
176 /* Variation with temp according to Watson relation eq 7-12.1*/
177 using std::pow;
179 const Scalar n = 0.375;
180 const Scalar DH_vap = DH_v_boil * pow(((1.0 - Tr2)/(1.0 - Tr1)), n);
181
182 return (DH_vap/molarMass()); // we need [J/kg]
183 }
184
185
196 {
198 }
199
207 {
210 pressure);
211 }
212
221
229 {
231 }
232
243 {
244 using std::min;
245 using std::max;
246 temperature = min(temperature, 500.0); // regularization
247 temperature = max(temperature, 250.0);
248
249 const Scalar Z_RA = 0.2556; // from equation
250
251 using std::pow;
252 const Scalar expo = 1.0 + pow(1.0 - temperature/criticalTemperature(), 2.0/7.0);
253 Scalar V = Consts::R*criticalTemperature()/criticalPressure()*pow(Z_RA, expo); // liquid molar volume [cm^3/mol]
254
255 return 1.0/V; // molar density [mol/m^3]
256 }
257
261 static constexpr bool gasIsCompressible()
262 { return true; }
263
267 static constexpr bool gasIsIdeal()
268 { return true; }
269
273 static constexpr bool liquidIsCompressible()
274 { return false; }
275
283 {
284 using std::min;
285 using std::max;
286 temperature = min(temperature, 500.0); // regularization
287 temperature = max(temperature, 250.0);
288
289 // reduced temperature
291
292 Scalar Fp0 = 1.0;
293 Scalar xi = 0.00474;
294
295 using std::pow;
296 using std::exp;
297 Scalar eta_xi =
298 Fp0*(0.807*pow(Tr,0.618)
299 - 0.357*exp(-0.449*Tr)
300 + 0.34*exp(-4.058*Tr)
301 + 0.018);
302
303 return eta_xi/xi/1e7; // [Pa s]
304 }
305
313 {
314 using std::min;
315 using std::max;
316 temperature = min(temperature, 500.0); // regularization
317 temperature = max(temperature, 250.0);
318
319 const Scalar A = -6.749;
320 const Scalar B = 2010.0;
321
322 using std::exp;
323 return exp(A + B/temperature)*1e-3; // [Pa s]
324 }
325
336 const Scalar pressure)
337 {
338 /* according Reid et al. : Missenard group contrib. method (s. example 5-8) */
339 /* Mesitylen: C9H12 : 3* CH3 ; 1* C6H5 (phenyl-ring) ; -2* H (this was to much!) */
340 /* linear interpolation between table values [J/(mol K)]*/
341 Scalar H, CH3, C6H5;
342 if(temperature<298.) {
343 // extrapolation for Temperature<273 */
344 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
345 CH3 = 40.0+1.6*(temperature-273.0)/25.; // 40 + 1.6 = 41.6 = CH3(T=298K)
346 C6H5 = 113.0+4.2*(temperature-273.0)/25.; // 113 + 4.2 =117.2 = C6H5(T=298K)
347 }
348 else if((temperature>=298.0)&&(temperature<323.)){ // i.e. interpolation of table values 298<T<323
349 H = 14.6+0.9*(temperature-298.0)/25.;
350 CH3 = 41.6+1.9*(temperature-298.0)/25.;
351 C6H5 = 117.2+6.2*(temperature-298.0)/25.;
352 }
353 else if((temperature>=323.0)&&(temperature<348.)){// i.e. interpolation of table values 323<T<348
354 H = 15.5+1.2*(temperature-323.0)/25.;
355 CH3 = 43.5+2.3*(temperature-323.0)/25.;
356 C6H5 = 123.4+6.3*(temperature-323.0)/25.;
357 }
358 else {
359 assert(temperature>=348.0);
360
361 /* take care: extrapolation for Temperature>373 */
362 H = 16.7+2.1*(temperature-348.0)/25.; /* leads probably to underestimates */
363 CH3 = 45.8+2.5*(temperature-348.0)/25.;
364 C6H5 = 129.7+6.3*(temperature-348.0)/25.;
365 }
366
367 return (C6H5 + 3*CH3 - 2*H)/molarMass(); // J/(mol K) -> J/(kg K)
368 }
369
379 {
380 return 0.1351;
381 }
382};
383
384} // end namespace Components
385
386} // end namespace Dumux
387
388#endif
Interface for components that have a gas state.
Interface for components that have a liquid state.
A central place for various physical constants occuring in some equations.
Relations valid for an ideal gas.
Definition: adapt.hh:29
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:34
Base class for all components Components provide the thermodynamic relations for the liquid,...
Definition: components/base.hh:59
Scalar Scalar
export the scalar type used by the component
Definition: components/base.hh:63
Interface for components that have a gas state.
Definition: gas.hh:41
Interface for components that have a liquid state.
Definition: liquid.hh:41
mesitylene
Definition: mesitylene.hh:48
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of mesitylene in , depending on pressure and temperature.
Definition: mesitylene.hh:219
static constexpr Scalar boilingTemperature()
Returns the temperature at mesitylene's boiling point (1 atm).
Definition: mesitylene.hh:79
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of mesitylene vapor .
Definition: mesitylene.hh:195
static constexpr Scalar criticalTemperature()
Returns the critical temperature of mesitylene.
Definition: mesitylene.hh:67
static constexpr Scalar criticalPressure()
Returns the critical pressure of mesitylene.
Definition: mesitylene.hh:73
static constexpr bool gasIsCompressible()
Returns true if the gas phase is assumed to be compressible.
Definition: mesitylene.hh:261
static Scalar liquidHeatCapacity(const Scalar temperature, const Scalar pressure)
Specific heat capacity of liquid mesitylene .
Definition: mesitylene.hh:335
static std::string name()
A human readable name for the mesitylene.
Definition: mesitylene.hh:55
static Scalar liquidMolarDensity(Scalar temperature, Scalar pressure)
The molar density of pure mesitylene at a given pressure and temperature .
Definition: mesitylene.hh:242
static constexpr Scalar molarMass()
The molar mass in of mesitylene.
Definition: mesitylene.hh:61
static Scalar liquidThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of mesitylene.
Definition: mesitylene.hh:378
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of mesitylene vapor.
Definition: mesitylene.hh:282
static Scalar vaporPressure(Scalar temperature)
The saturation vapor pressure in of pure mesitylene at a given temperature according to Antoine afte...
Definition: mesitylene.hh:105
static constexpr bool liquidIsCompressible()
Returns true if the liquid phase is assumed to be compressible.
Definition: mesitylene.hh:273
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of mesitylene at a given pressure and temperature .
Definition: mesitylene.hh:206
static Scalar liquidEnthalpy(const Scalar temperature, const Scalar pressure)
Specific enthalpy of liquid mesitylene .
Definition: mesitylene.hh:124
static Scalar liquidDensity(Scalar temperature, Scalar pressure)
The density of pure mesitylene at a given pressure and temperature .
Definition: mesitylene.hh:228
static Scalar heatVap(Scalar temperature, const Scalar pressure)
Latent heat of vaporization for mesitylene .
Definition: mesitylene.hh:159
static Scalar tripleTemperature()
Returns the temperature at mesitylene's triple point.
Definition: mesitylene.hh:85
static Scalar triplePressure()
Returns the pressure at mesitylene's triple point.
Definition: mesitylene.hh:93
static constexpr bool gasIsIdeal()
Returns true if the gas phase is assumed to be ideal.
Definition: mesitylene.hh:267
static Scalar liquidViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of pure mesitylene.
Definition: mesitylene.hh:312
A central place for various physical constants occuring in some equations.
Definition: constants.hh:39
static constexpr Scalar R
The ideal gas constant .
Definition: constants.hh:44
Relations valid for an ideal gas.
Definition: idealgas.hh:37
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:49
static constexpr Scalar molarDensity(Scalar temperature, Scalar pressure)
The molar density of the gas , depending on pressure and temperature.
Definition: idealgas.hh:70
Base class for all components Components provide the thermodynamic relations for the liquid,...