version 3.10-dev
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// 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_FULLERMETHOD_HH
13#define DUMUX_FULLERMETHOD_HH
14
15#include <dumux/common/math.hh>
16
17namespace Dumux {
18namespace BinaryCoeff {
35template <class Scalar>
36inline Scalar fullerMethod(const Scalar *M, // molar masses [g/mol]
37 const Scalar *SigmaNu, // atomic diffusion volume
38 const Scalar temperature, // [K]
39 const Scalar pressure) // [Pa]
40{
41 // "effective" molar mass in [g/m^3]
42 Scalar Mab = harmonicMean(M[0], M[1]);
43
44 // Fuller's method
45 using std::pow;
46 using std::sqrt;
47 Scalar tmp = pow(SigmaNu[0], 1./3) + pow(SigmaNu[1], 1./3);
48 return 1e-4 * (143.0*pow(temperature, 1.75))/(pressure*sqrt(Mab)*tmp*tmp);
49}
50
51} // end namespace BinaryCoeff
52} // end namespace Dumux
53
54#endif
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:36
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:57
Define some often used mathematical functions.
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
Definition: adapt.hh:17