OGS
NonWettingPhaseVanGenuchten.cpp
Go to the documentation of this file.
1
13
#include "
NonWettingPhaseVanGenuchten.h
"
14
15
#include <algorithm>
16
#include <cmath>
17
18
namespace
MaterialLib
19
{
20
namespace
PorousMedium
21
{
22
double
NonWettingPhaseVanGenuchten::getValue
(
const
double
saturation_w)
const
23
{
24
const
double
S = std::clamp(saturation_w,
25
_saturation_r
+
_minor_offset
,
26
_saturation_max
-
_minor_offset
);
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
33
double
NonWettingPhaseVanGenuchten::getdValue
(
const
double
saturation_w)
const
34
{
35
const
double
S = std::clamp(saturation_w,
36
_saturation_r
+
_minor_offset
,
37
_saturation_max
-
_minor_offset
);
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
)) /
44
(
_saturation_max
-
_saturation_r
);
45
}
46
}
// namespace PorousMedium
47
}
// namespace MaterialLib
NonWettingPhaseVanGenuchten.h
MaterialLib::PorousMedium::NonWettingPhaseVanGenuchten::getdValue
double getdValue(const double saturation_w) const override
Definition
NonWettingPhaseVanGenuchten.cpp:33
MaterialLib::PorousMedium::NonWettingPhaseVanGenuchten::_krel_min
const double _krel_min
Minimum relative permeability.
Definition
NonWettingPhaseVanGenuchten.h:72
MaterialLib::PorousMedium::NonWettingPhaseVanGenuchten::getValue
double getValue(const double saturation_w) const override
Definition
NonWettingPhaseVanGenuchten.cpp:22
MaterialLib::PorousMedium::NonWettingPhaseVanGenuchten::_m
const double _m
Exponent m, m in [0, 1], n=1/(1-m).
Definition
NonWettingPhaseVanGenuchten.h:71
MaterialLib::PorousMedium::RelativePermeability::_saturation_max
const double _saturation_max
Maximum saturation.
Definition
RelativePermeability.h:50
MaterialLib::PorousMedium::RelativePermeability::_minor_offset
const double _minor_offset
Definition
RelativePermeability.h:47
MaterialLib::PorousMedium::RelativePermeability::_saturation_r
const double _saturation_r
Residual saturation.
Definition
RelativePermeability.h:49
MaterialLib
Definition
ConstantFluidProperty.h:18
MaterialLib
PorousMedium
UnsaturatedProperty
RelativePermeability
NonWettingPhaseVanGenuchten.cpp
Generated by
1.11.0