version 3.8
h2o_xylene.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_BINARY_COEFF_H2O_XYLENE_HH
13#define DUMUX_BINARY_COEFF_H2O_XYLENE_HH
14
15#include <algorithm>
16
17#include <dune/common/math.hh>
18
21
22namespace Dumux::BinaryCoeff {
23
29{
30public:
39 template <class Scalar>
40 static Scalar henry(Scalar temperature)
41 {
42 // after Sander
43 constexpr Scalar sanderH = 1.5e-1; //[M/atm]
44 //conversion to our Henry definition
45 Scalar dumuxH = sanderH / 101.325; // has now [(mol/m^3)/Pa]
46 dumuxH *= 18.02e-6; //multiplied by molar volume of reference phase = water
47 return 1.0/dumuxH; // [Pa]
48 }
49
56 template <class Scalar>
57 static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
58 {
61
62 using std::clamp;
63 temperature = clamp(temperature, 1e-9, 500.0); // regularization
64 pressure = clamp(pressure, 0.0, 1e8); // regularization
65
66 using std::sqrt;
67 using std::exp;
68 using std::pow;
69 using Dune::power;
70 constexpr Scalar M_x = 1e3*Xylene::molarMass(); // [g/mol] molecular weight of xylene
71 constexpr Scalar M_w = 1e3*H2O::molarMass(); // [g/mol] molecular weight of water
72 constexpr Scalar Tb_x = 412.9; // [K] boiling temperature of xylene
73 constexpr Scalar Tb_w = 373.15; // [K] boiling temperature of water (at p_atm)
74 constexpr Scalar V_B_w = 18.0; // [cm^3/mol] LeBas molal volume of water
75 const Scalar sigma_w = 1.18*pow(V_B_w, 0.333); // charact. length of air
76 constexpr Scalar T_scal_w = 1.15*Tb_w; // [K] (molec. energy of attraction/Boltzmann constant)
77 constexpr Scalar V_B_x = 140.4; // [cm^3/mol] LeBas molal volume of xylene
78 const Scalar sigma_x = 1.18*pow(V_B_x, 0.333); // charact. length of xylene
79 const Scalar sigma_wx = 0.5*(sigma_w + sigma_x);
80 constexpr Scalar T_scal_x = 1.15*Tb_x;
81 const Scalar T_scal_wx = sqrt(T_scal_w*T_scal_x);
82
83 using std::max;
84 Scalar T_star = temperature/T_scal_wx;
85 T_star = max(T_star, 1e-5); // regularization
86
87 const Scalar Omega = 1.06036/pow(T_star, 0.1561) + 0.193/exp(T_star*0.47635)
88 + 1.03587/exp(T_star*1.52996) + 1.76474/exp(T_star*3.89411);
89 const Scalar B_ = 0.00217 - 0.0005*sqrt(1.0/M_w + 1.0/M_x);
90 const Scalar Mr = (M_w + M_x)/(M_w*M_x);
91 const Scalar D_wx = (B_*pow(temperature,1.6)*sqrt(Mr))
92 /(1e-5*pressure*power(sigma_wx, 2)*Omega); // [cm^2/s]
93
94 return D_wx*1e-4; // [m^2/s]
95 }
96
104 template <class Scalar>
105 static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
106 {
107 return 1.e-9;
108 }
109};
110
111} // end namespace Dumux::BinaryCoeff
112
113#endif
Binary coefficients for water and xylene.
Definition: h2o_xylene.hh:29
static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure)
Diffusion coefficient for xylene in liquid water.
Definition: h2o_xylene.hh:105
static Scalar henry(Scalar temperature)
Henry coefficient for xylene in liquid water.
Definition: h2o_xylene.hh:40
static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure)
Binary diffusion coefficient for molecular water and xylene.
Definition: h2o_xylene.hh:57
Material properties of pure water .
Definition: h2o.hh:49
Properties of xylene.
Definition: xylene.hh:37
Material properties of pure water .
Definition: air_mesitylene.hh:19
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
Properties of xylene.