Line | Branch | Exec | Source |
---|---|---|---|
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 | // | ||
7 | /*! | ||
8 | * \file | ||
9 | * \ingroup Binarycoefficients | ||
10 | * \brief Binary coefficients for air and mesitylene. | ||
11 | */ | ||
12 | #ifndef DUMUX_BINARY_COEFF_AIR_MESITYLENE_HH | ||
13 | #define DUMUX_BINARY_COEFF_AIR_MESITYLENE_HH | ||
14 | |||
15 | #include <dumux/material/components/air.hh> | ||
16 | #include <dumux/material/components/mesitylene.hh> | ||
17 | |||
18 | namespace Dumux { | ||
19 | namespace BinaryCoeff { | ||
20 | |||
21 | /*! | ||
22 | * \ingroup Binarycoefficients | ||
23 | * \brief Binary coefficients for water and mesitylene. | ||
24 | */ | ||
25 | class Air_Mesitylene | ||
26 | { | ||
27 | public: | ||
28 | /*! | ||
29 | * \brief Henry coefficient \f$\mathrm{[Pa]}\f$ for mesitylene in air. | ||
30 | * \param temperature the temperature \f$\mathrm{[K]}\f$ | ||
31 | */ | ||
32 | template <class Scalar> | ||
33 | static Scalar henry(Scalar temperature) | ||
34 | { DUNE_THROW(Dune::NotImplemented, | ||
35 | "Henry coefficient of air in mesitylene"); | ||
36 | } | ||
37 | |||
38 | /*! | ||
39 | * \brief Binary diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for air and mesitylene. | ||
40 | * I used the method according to Wilke and Lee | ||
41 | * see W.J. Lyman, W.F. Reehl, D.H. Rosenblatt (1990) \cite lyman1990 <BR> | ||
42 | * \param temperature temperature in \f$\mathrm{[K]}\f$ | ||
43 | * \param pressure pressure in \f$\mathrm{[Pa]}\f$ | ||
44 | * | ||
45 | */ | ||
46 | template <class Scalar> | ||
47 | 1382070 | static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure) | |
48 | { | ||
49 | using Air = Dumux::Components::Air<Scalar>; | ||
50 | using Mesitylene = Dumux::Components::Mesitylene<Scalar>; | ||
51 | |||
52 | using std::min; | ||
53 | using std::max; | ||
54 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1382070 times.
|
1382070 | temperature = max(temperature, 1e-9); // regularization |
55 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1382070 times.
|
1382070 | temperature = min(temperature, 500.0); // regularization |
56 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1382070 times.
|
1382070 | pressure = max(pressure, 0.0); // regularization |
57 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1382070 times.
|
1382070 | pressure = min(pressure, 1e8); // regularization |
58 | |||
59 | using std::pow; | ||
60 | using std::sqrt; | ||
61 | using std::exp; | ||
62 | using Dune::power; | ||
63 | 1382070 | const Scalar M_m = 1e3*Mesitylene::molarMass(); // [g/mol] molecular weight of mesitylene | |
64 | 1382070 | const Scalar M_a = 1e3*Air::molarMass(); // [g/mol] molecular weight of air | |
65 | 1382070 | const Scalar Tb_m = 437.9; // [K] boiling temperature of mesitylene | |
66 | 1382070 | const Scalar sigma_a = 3.711; // charact. length of air | |
67 | 1382070 | const Scalar T_scal_a = 78.6; // [K] (molec. energy of attraction/Boltzmann constant) | |
68 | 1382070 | const Scalar V_B_m = 162.6; // [cm^3/mol] LeBas molal volume of mesitylene | |
69 | |||
70 | using std::cbrt; | ||
71 | 1382070 | const Scalar sigma_m = 1.18*cbrt(V_B_m); // charact. length of mesitylene | |
72 | 1382070 | const Scalar sigma_am = 0.5*(sigma_a + sigma_m); | |
73 | 1382070 | const Scalar T_scal_m = 1.15*Tb_m; | |
74 | 1382070 | const Scalar T_scal_am = sqrt(T_scal_a*T_scal_m); | |
75 | |||
76 | 1382070 | Scalar T_star = temperature/T_scal_am; | |
77 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1382070 times.
|
1382070 | T_star = max(T_star, 1e-5); // regularization |
78 | |||
79 | 2764140 | const Scalar Omega = 1.06036/pow(T_star, 0.1561) + 0.193/exp(T_star*0.47635) | |
80 | 1382070 | + 1.03587/exp(T_star*1.52996) + 1.76474/exp(T_star*3.89411); | |
81 | 1382070 | const Scalar B_ = 0.00217 - 0.0005*sqrt(1.0/M_a + 1.0/M_m); | |
82 | 1382070 | const Scalar Mr = (M_a + M_m)/(M_a*M_m); | |
83 | 2764140 | const Scalar D_am = (B_*sqrt(temperature*temperature*temperature*Mr)) | |
84 | 1382070 | /(1e-5*pressure*power(sigma_am, 2) * Omega); // [cm^2/s] | |
85 | |||
86 | 1382070 | return 1e-4*D_am; // [m^2/s] | |
87 | } | ||
88 | |||
89 | /*! | ||
90 | * \brief Diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for air and mesitylene in liquid water. | ||
91 | * \param temperature temperature in \f$\mathrm{[K]}\f$ | ||
92 | * \param pressure pressure in \f$\mathrm{[Pa]}\f$ | ||
93 | * | ||
94 | * \note Returns just an order of magnitude. | ||
95 | */ | ||
96 | template <class Scalar> | ||
97 | ✗ | static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure) | |
98 | { | ||
99 | ✗ | return 1e-9; | |
100 | } | ||
101 | }; | ||
102 | |||
103 | } // end namespace BinaryCoeff | ||
104 | } // end namespace Dumux | ||
105 | |||
106 | #endif | ||
107 |