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 water and air. | ||
11 | */ | ||
12 | #ifndef DUMUX_BINARY_COEFF_H2O_AIR_HH | ||
13 | #define DUMUX_BINARY_COEFF_H2O_AIR_HH | ||
14 | |||
15 | #include <cmath> | ||
16 | |||
17 | namespace Dumux { | ||
18 | namespace BinaryCoeff { | ||
19 | |||
20 | /*! | ||
21 | * \ingroup Binarycoefficients | ||
22 | * \brief Binary coefficients for water and air. | ||
23 | */ | ||
24 | class H2O_Air | ||
25 | { | ||
26 | public: | ||
27 | /*! | ||
28 | * \brief Henry coefficient \f$\mathrm{[Pa]}\f$ for air in liquid water. | ||
29 | * \param temperature the temperature \f$\mathrm{[K]}\f$ | ||
30 | * | ||
31 | * Henry coefficient See: | ||
32 | * Stefan Finsterle (1993, page 33 Formula (2.9)) \cite finsterle1993 <BR> | ||
33 | * (fitted to data from Tchobanoglous & Schroeder, 1985 \cite tchobanoglous1985 ) | ||
34 | */ | ||
35 | template <class Scalar> | ||
36 | static Scalar henry(Scalar temperature) | ||
37 | { | ||
38 | using std::exp; | ||
39 | 12725330 | Scalar r = (0.8942+1.47*exp(-0.04394*(temperature-273.15)))*1.E-10; | |
40 | |||
41 | 12725330 | return 1./r; | |
42 | } | ||
43 | |||
44 | /*! | ||
45 | * \brief Binary diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for molecular water and air | ||
46 | * | ||
47 | * \param temperature the temperature \f$\mathrm{[K]}\f$ | ||
48 | * \param pressure the phase pressure \f$\mathrm{[Pa]}\f$ | ||
49 | * Vargaftik: Tables on the thermophysical properties of liquids and gases. | ||
50 | * John Wiley & Sons, New York, 1975. \cite vargaftik1975 <BR> | ||
51 | * Walker, Sabey, Hampton: Studies of heat transfer and water migration in soils. | ||
52 | * Dep. of Agricultural and Chemical Engineering, Colorado State University, | ||
53 | * Fort Collins, 1981. \cite walker1981 | ||
54 | */ | ||
55 | template <class Scalar> | ||
56 | static Scalar gasDiffCoeff(Scalar temperature, Scalar pressure) | ||
57 | { | ||
58 | 48161700 | const Scalar Theta=1.8; | |
59 | 48161700 | const Scalar Daw=2.13e-5; /* reference value */ | |
60 | 48161700 | const Scalar pg0=1.e5; /* reference pressure */ | |
61 | 48161700 | const Scalar T0=273.15; /* reference temperature */ | |
62 | Scalar Dgaw; | ||
63 | |||
64 | using std::pow; | ||
65 |
2/3✓ Branch 0 taken 3296657 times.
✓ Branch 1 taken 3296658 times.
✗ Branch 2 not taken.
|
48161700 | Dgaw=Daw*(pg0/pressure)*pow((temperature/T0),Theta); |
66 | |||
67 | return Dgaw; | ||
68 | } | ||
69 | |||
70 | /*! | ||
71 | * Lacking better data on water-air diffusion in liquids, we use at the | ||
72 | * moment the diffusion coefficient of the air's main component nitrogen!! | ||
73 | * \brief Diffusion coefficient \f$\mathrm{[m^2/s]}\f$ for molecular nitrogen in liquid water. | ||
74 | * | ||
75 | * \param temperature the temperature \f$\mathrm{[K]}\f$ | ||
76 | * \param pressure the phase pressure \f$\mathrm{[Pa]}\f$ | ||
77 | * | ||
78 | * The empirical equations for estimating the diffusion coefficient in | ||
79 | * infinite solution which are presented in Reid, 1987 all show a | ||
80 | * linear dependency on temperature. We thus simply scale the | ||
81 | * experimentally obtained diffusion coefficient of Ferrell and | ||
82 | * Himmelblau by the temperature. | ||
83 | * | ||
84 | * See: | ||
85 | * R. Reid et al. (1987, pp. 599) \cite reid1987 <BR> | ||
86 | * R. Ferrell, D. Himmelblau (1967, pp. 111-115) \cite ferrell1967 | ||
87 | */ | ||
88 | template <class Scalar> | ||
89 | ✗ | static Scalar liquidDiffCoeff(Scalar temperature, Scalar pressure) | |
90 | { | ||
91 | 31981952 | const Scalar Texp = 273.15 + 25; // [K] | |
92 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
31981952 | const Scalar Dexp = 2.01e-9; // [m^2/s] |
93 |
2/4✓ Branch 0 taken 4678725 times.
✓ Branch 1 taken 4678725 times.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
|
31981951 | return Dexp * temperature/Texp; |
94 | } | ||
95 | }; | ||
96 | |||
97 | } // end namespace BinaryCoeff | ||
98 | } // end namespace Dumux | ||
99 | |||
100 | #endif | ||
101 |