OGS
WettingPhaseVanGenuchten.cpp
Go to the documentation of this file.
1
14
15#include <algorithm>
16#include <cmath>
17
18namespace MaterialLib
19{
20namespace PorousMedium
21{
22double WettingPhaseVanGenuchten::getValue(const double saturation) const
23{
24 const double S = std::clamp(saturation,
27 const double Se = (S - _saturation_r) / (_saturation_max - _saturation_r);
28 const double val = 1.0 - std::pow(1.0 - std::pow(Se, 1.0 / _m), _m);
29 const double krel = std::sqrt(Se) * val * val;
30 return std::max(_krel_min, krel);
31}
32
33double WettingPhaseVanGenuchten::getdValue(const double saturation) const
34{
35 const double S = std::clamp(saturation,
38 const double Se = (S - _saturation_r) / (_saturation_max - _saturation_r);
39 const double sqrtSe = std::sqrt(Se);
40 const double temp_val = 1.0 - std::pow(1.0 - std::pow(Se, 1.0 / _m), _m);
41 return (0.5 * temp_val * temp_val / sqrtSe +
42 2. * sqrtSe * temp_val *
43 std::pow(1.0 - std::pow(Se, 1.0 / _m), _m - 1.) *
44 std::pow(Se, (1.0 - _m) / _m)) /
46}
47
48} // namespace PorousMedium
49} // namespace MaterialLib
double getdValue(const double saturation) const override
const double _krel_min
Minimum relative permeability.
double getValue(const double saturation) const override
Get relative permeability value.
const double _m
Exponent m, m in [0, 1], n=1/(1-m).