3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
fullermethod.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_FULLERMETHOD_HH
25#define DUMUX_FULLERMETHOD_HH
26
27#include <dumux/common/math.hh>
28
29namespace Dumux {
30namespace BinaryCoeff {
47template <class Scalar>
48inline Scalar fullerMethod(const Scalar *M, // molar masses [g/mol]
49 const Scalar *SigmaNu, // atomic diffusion volume
50 const Scalar temperature, // [K]
51 const Scalar pressure) // [Pa]
52{
53 // "effective" molar mass in [g/m^3]
54 Scalar Mab = harmonicMean(M[0], M[1]);
55
56 // Fuller's method
57 using std::pow;
58 using std::sqrt;
59 Scalar tmp = pow(SigmaNu[0], 1./3) + pow(SigmaNu[1], 1./3);
60 return 1e-4 * (143.0*pow(temperature, 1.75))/(pressure*sqrt(Mab)*tmp*tmp);
61}
62
63} // end namespace BinaryCoeff
64} // end namespace Dumux
65
66#endif
Define some often used mathematical functions.
Scalar fullerMethod(const Scalar *M, const Scalar *SigmaNu, const Scalar temperature, const Scalar pressure)
Estimate binary diffusion coefficients in gases according to the method by Fuller.
Definition: fullermethod.hh:48
constexpr Scalar harmonicMean(Scalar x, Scalar y, Scalar wx=1.0, Scalar wy=1.0) noexcept
Calculate the (weighted) harmonic mean of two scalar values.
Definition: math.hh:69
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