3.1-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 static Scalar gasViscosity(Scalar temperature, Scalar pressure, bool regularize=true)
284 {
285 using std::min;
286 using std::max;
287 temperature = min(temperature, 500.0); // regularization
288 temperature = max(temperature, 250.0);
289
290 // reduced temperature
292
293 Scalar Fp0 = 1.0;
294 Scalar xi = 0.00474;
295
296 using std::pow;
297 using std::exp;
298 Scalar eta_xi =
299 Fp0*(0.807*pow(Tr,0.618)
300 - 0.357*exp(-0.449*Tr)
301 + 0.34*exp(-4.058*Tr)
302 + 0.018);
303
304 return eta_xi/xi/1e7; // [Pa s]
305 }
306
314 {
315 using std::min;
316 using std::max;
317 temperature = min(temperature, 500.0); // regularization
318 temperature = max(temperature, 250.0);
319
320 const Scalar A = -6.749;
321 const Scalar B = 2010.0;
322
323 using std::exp;
324 return exp(A + B/temperature)*1e-3; // [Pa s]
325 }
326
337 const Scalar pressure)
338 {
339 /* according Reid et al. : Missenard group contrib. method (s. example 5-8) */
340 /* Mesitylen: C9H12 : 3* CH3 ; 1* C6H5 (phenyl-ring) ; -2* H (this was to much!) */
341 /* linear interpolation between table values [J/(mol K)]*/
342 Scalar H, CH3, C6H5;
343 if(temperature<298.) {
344 // extrapolation for Temperature<273 */
345 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
346 CH3 = 40.0+1.6*(temperature-273.0)/25.; // 40 + 1.6 = 41.6 = CH3(T=298K)
347 C6H5 = 113.0+4.2*(temperature-273.0)/25.; // 113 + 4.2 =117.2 = C6H5(T=298K)
348 }
349 else if((temperature>=298.0)&&(temperature<323.)){ // i.e. interpolation of table values 298<T<323
350 H = 14.6+0.9*(temperature-298.0)/25.;
351 CH3 = 41.6+1.9*(temperature-298.0)/25.;
352 C6H5 = 117.2+6.2*(temperature-298.0)/25.;
353 }
354 else if((temperature>=323.0)&&(temperature<348.)){// i.e. interpolation of table values 323<T<348
355 H = 15.5+1.2*(temperature-323.0)/25.;
356 CH3 = 43.5+2.3*(temperature-323.0)/25.;
357 C6H5 = 123.4+6.3*(temperature-323.0)/25.;
358 }
359 else {
360 assert(temperature>=348.0);
361
362 /* take care: extrapolation for Temperature>373 */
363 H = 16.7+2.1*(temperature-348.0)/25.; /* leads probably to underestimates */
364 CH3 = 45.8+2.5*(temperature-348.0)/25.;
365 C6H5 = 129.7+6.3*(temperature-348.0)/25.;
366 }
367
368 return (C6H5 + 3*CH3 - 2*H)/molarMass(); // J/(mol K) -> J/(kg K)
369 }
370
380 {
381 return 0.1351;
382 }
383};
384
385} // end namespace Components
386
387} // end namespace Dumux
388
389#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.
make the local view function available whenever we use the grid geometry
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
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: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:336
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:379
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 Scalar gasViscosity(Scalar temperature, Scalar pressure, bool regularize=true)
The dynamic viscosity of mesitylene vapor.
Definition: mesitylene.hh:283
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:313
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,...