OGS
NonWettingPhaseBrooksCoreyOilGas.cpp
Go to the documentation of this file.
1
13
#include "
NonWettingPhaseBrooksCoreyOilGas.h
"
14
15
#include <algorithm>
16
#include <cmath>
17
18
namespace
MaterialLib
19
{
20
namespace
PorousMedium
21
{
22
double
NonWettingPhaseBrooksCoreyOilGas::getValue
(
23
const
double
saturation_w)
const
24
{
25
const
double
S = std::clamp(saturation_w,
26
_saturation_r
+
_minor_offset
,
27
_saturation_max
-
_minor_offset
);
28
const
double
Se = (S -
_saturation_r
) / (
_saturation_max
-
_saturation_r
);
29
const
double
krel =
30
(1.0 - Se) * (1.0 - Se) * (1.0 - std::pow(Se, 1.0 + 2.0 /
_m
));
31
return
std::max(
_krel_min
, krel);
32
}
33
34
double
NonWettingPhaseBrooksCoreyOilGas::getdValue
(
35
const
double
saturation_w)
const
36
{
37
const
double
S = std::clamp(saturation_w,
38
_saturation_r
+
_minor_offset
,
39
_saturation_max
-
_minor_offset
);
40
const
double
Se = (S -
_saturation_r
) / (
_saturation_max
-
_saturation_r
);
41
return
(-2. * (1.0 - Se) * (1.0 - std::pow(Se, 1.0 + 2.0 /
_m
)) -
42
(1.0 + 2.0 /
_m
) * (1.0 - Se) * (1.0 - Se) *
43
std::pow(Se, 2.0 /
_m
)) /
44
(
_saturation_max
-
_saturation_r
);
45
}
46
47
}
// namespace PorousMedium
48
}
// namespace MaterialLib
NonWettingPhaseBrooksCoreyOilGas.h
MaterialLib::PorousMedium::NonWettingPhaseBrooksCoreyOilGas::_m
const double _m
Exponent m, m>=1.0.
Definition
NonWettingPhaseBrooksCoreyOilGas.h:67
MaterialLib::PorousMedium::NonWettingPhaseBrooksCoreyOilGas::_krel_min
const double _krel_min
Minimum relative permeability.
Definition
NonWettingPhaseBrooksCoreyOilGas.h:68
MaterialLib::PorousMedium::NonWettingPhaseBrooksCoreyOilGas::getdValue
double getdValue(const double saturation_w) const override
Definition
NonWettingPhaseBrooksCoreyOilGas.cpp:34
MaterialLib::PorousMedium::NonWettingPhaseBrooksCoreyOilGas::getValue
double getValue(const double saturation_w) const override
Definition
NonWettingPhaseBrooksCoreyOilGas.cpp:22
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
NonWettingPhaseBrooksCoreyOilGas.cpp
Generated by
1.12.0