OGS
NonWettingPhaseVanGenuchten.cpp
Go to the documentation of this file.
1
14
15#include <algorithm>
16#include <cmath>
17
18namespace MaterialLib
19{
20namespace PorousMedium
21{
22double NonWettingPhaseVanGenuchten::getValue(const double saturation_w) const
23{
24 const double S = std::clamp(saturation_w,
27 const double Se = (S - _saturation_r) / (_saturation_max - _saturation_r);
28 const double krel =
29 std::cbrt(1.0 - Se) * std::pow(1.0 - std::pow(Se, 1.0 / _m), 2.0 * _m);
30 return std::max(_krel_min, krel);
31}
32
33double NonWettingPhaseVanGenuchten::getdValue(const double saturation_w) const
34{
35 const double S = std::clamp(saturation_w,
38 const double Se = (S - _saturation_r) / (_saturation_max - _saturation_r);
39 const double cbrt1_Se = std::cbrt(1.0 - Se);
40 const double temp_val = 1.0 - std::pow(Se, 1.0 / _m);
41 return (-std::pow(temp_val, 2. * _m) / (3. * cbrt1_Se * cbrt1_Se) -
42 2. * cbrt1_Se * std::pow(temp_val, 2. * _m - 1.) *
43 std::pow(Se, (1. - _m) / _m)) /
45}
46} // namespace PorousMedium
47} // namespace MaterialLib
double getdValue(const double saturation_w) const override
double getValue(const double saturation_w) const override
const double _m
Exponent m, m in [0, 1], n=1/(1-m).