Loading [MathJax]/extensions/MathMenu.js
OGS
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
z
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
l
m
n
p
r
s
t
v
y
Classes
Class List
Class Index
Class Hierarchy
Files
File List
File Members
All
a
b
c
d
e
f
g
i
k
m
n
o
p
r
s
t
v
w
x
Functions
a
c
d
e
f
g
i
m
o
p
r
s
t
v
w
Variables
Typedefs
Enumerations
Macros
b
c
g
m
n
o
p
r
s
t
▼
OGS
►
OpenGeoSys 6.5.4-293-gce72897f source code documentation
►
OGS CTests—Project Files
►
OGS Input File Parameters—Quality Assurance
►
OGS Input File Parameters
BulkMappingDocuPage
Todo List
OGS Input File Parameters—List of incomplete documentation pages
Bibliography
►
Namespaces
►
Classes
▼
Files
▼
File List
►
Applications
►
BaseLib
►
build
►
ChemistryLib
Documentation
►
GeoLib
►
InfoLib
▼
MaterialLib
►
Adsorption
►
Fluid
►
FractureModels
▼
MPL
►
Components
▼
Properties
▼
CapillaryPressureSaturation
►
CapillaryPressureRegularizedVanGenuchten.cpp
►
CapillaryPressureRegularizedVanGenuchten.h
CapillaryPressureVanGenuchten.cpp
►
CapillaryPressureVanGenuchten.h
►
CreateCapillaryPressureRegularizedVanGenuchten.cpp
►
CreateCapillaryPressureRegularizedVanGenuchten.h
►
CreateCapillaryPressureVanGenuchten.cpp
►
CreateCapillaryPressureVanGenuchten.h
►
CreateSaturationBrooksCorey.cpp
►
CreateSaturationBrooksCorey.h
►
CreateSaturationExponential.cpp
►
CreateSaturationExponential.h
►
CreateSaturationLiakopoulos.cpp
►
CreateSaturationLiakopoulos.h
►
CreateSaturationVanGenuchten.cpp
►
CreateSaturationVanGenuchten.h
►
CreateSaturationVanGenuchtenWithVolumetricStrain.cpp
►
CreateSaturationVanGenuchtenWithVolumetricStrain.h
SaturationBrooksCorey.cpp
►
SaturationBrooksCorey.h
SaturationExponential.cpp
►
SaturationExponential.h
SaturationLiakopoulos.cpp
►
SaturationLiakopoulos.h
SaturationVanGenuchten.cpp
►
SaturationVanGenuchten.h
SaturationVanGenuchtenWithVolumetricStrain.cpp
►
SaturationVanGenuchtenWithVolumetricStrain.h
►
Density
►
Enthalpy
►
RelativePermeability
►
SwellingStress
►
ThermalConductivity
►
VapourDiffusion
►
Viscosity
AverageMolarMass.cpp
►
AverageMolarMass.h
BishopsPowerLaw.cpp
►
BishopsPowerLaw.h
BishopsSaturationCutoff.cpp
►
BishopsSaturationCutoff.h
ClausiusClapeyron.cpp
►
ClausiusClapeyron.h
►
Constant.cpp
►
Constant.h
►
CreateAverageMolarMass.cpp
►
CreateAverageMolarMass.h
►
CreateBishopsPowerLaw.cpp
►
CreateBishopsPowerLaw.h
►
CreateBishopsSaturationCutoff.cpp
►
CreateBishopsSaturationCutoff.h
►
CreateClausiusClapeyron.cpp
►
CreateClausiusClapeyron.h
►
CreateConstant.cpp
►
CreateConstant.h
►
CreateCubicLawPermeability.cpp
►
CreateCubicLawPermeability.h
►
CreateCurve.cpp
►
CreateCurve.h
►
CreateDupuitPermeability.cpp
►
CreateDupuitPermeability.h
►
CreateEffectiveThermalConductivityPorosityMixing.cpp
►
CreateEffectiveThermalConductivityPorosityMixing.h
►
CreateEmbeddedFracturePermeability.cpp
►
CreateEmbeddedFracturePermeability.h
►
CreateExponential.cpp
►
CreateExponential.h
►
CreateFunction.cpp
►
CreateFunction.h
►
CreateGasPressureDependentPermeability.cpp
►
CreateGasPressureDependentPermeability.h
►
CreateIdealGasLaw.cpp
►
CreateIdealGasLaw.h
►
CreateIdealGasLawBinaryMixture.cpp
►
CreateIdealGasLawBinaryMixture.h
►
CreateKozenyCarmanModel.cpp
►
CreateKozenyCarmanModel.h
►
CreateLinear.cpp
►
CreateLinear.h
►
CreateOrthotropicEmbeddedFracturePermeability.cpp
►
CreateOrthotropicEmbeddedFracturePermeability.h
►
CreateParameter.cpp
►
CreateParameter.h
►
CreatePengRobinson.cpp
►
CreatePengRobinson.h
►
CreatePermeabilityMohrCoulombFailureIndexModel.cpp
►
CreatePermeabilityMohrCoulombFailureIndexModel.h
►
CreatePermeabilityOrthotropicPowerLaw.cpp
►
CreatePermeabilityOrthotropicPowerLaw.h
►
CreatePorosityFromMassBalance.cpp
►
CreatePorosityFromMassBalance.h
CreateProperties.h
►
CreateSaturationDependentSwelling.cpp
►
CreateSaturationDependentSwelling.h
►
CreateSaturationDependentThermalConductivity.cpp
►
CreateSaturationDependentThermalConductivity.h
►
CreateSpecificHeatCapacityWithLatentHeat.cpp
►
CreateSpecificHeatCapacityWithLatentHeat.h
►
CreateStrainDependentPermeability.cpp
►
CreateStrainDependentPermeability.h
►
CreateTemperatureDependentDiffusion.cpp
►
CreateTemperatureDependentDiffusion.h
►
CreateTemperatureDependentFraction.cpp
►
CreateTemperatureDependentFraction.h
►
CreateTransportPorosityFromMassBalance.cpp
►
CreateTransportPorosityFromMassBalance.h
►
CreateVermaPruessModel.cpp
►
CreateVermaPruessModel.h
►
CreateVolumeFractionAverage.cpp
►
CreateVolumeFractionAverage.h
►
CreateWaterSaturationTemperatureIAPWSIF97Region4.cpp
►
CreateWaterSaturationTemperatureIAPWSIF97Region4.h
►
CreateWaterTemperatureIAPWSIF97Region1.cpp
►
CreateWaterTemperatureIAPWSIF97Region1.h
CubicLawPermeability.cpp
►
CubicLawPermeability.h
Curve.cpp
►
Curve.h
DupuitPermeability.cpp
►
DupuitPermeability.h
EffectiveThermalConductivityPorosityMixing.cpp
►
EffectiveThermalConductivityPorosityMixing.h
EmbeddedFracturePermeability.cpp
►
EmbeddedFracturePermeability.h
Exponential.cpp
►
Exponential.h
►
Function.cpp
►
Function.h
GasPressureDependentPermeability.cpp
►
GasPressureDependentPermeability.h
IdealGasLaw.cpp
►
IdealGasLaw.h
IdealGasLawBinaryMixture.cpp
►
IdealGasLawBinaryMixture.h
KozenyCarmanModel.cpp
►
KozenyCarmanModel.h
Linear.cpp
►
Linear.h
OrthotropicEmbeddedFracturePermeability.cpp
►
OrthotropicEmbeddedFracturePermeability.h
Parameter.cpp
►
Parameter.h
PengRobinson.cpp
►
PengRobinson.h
PermeabilityMohrCoulombFailureIndexModel.cpp
►
PermeabilityMohrCoulombFailureIndexModel.h
PermeabilityOrthotropicPowerLaw.cpp
►
PermeabilityOrthotropicPowerLaw.h
PorosityFromMassBalance.cpp
►
PorosityFromMassBalance.h
Properties.h
SaturationDependentSwelling.cpp
►
SaturationDependentSwelling.h
SpecificHeatCapacityWithLatentHeat.cpp
►
SpecificHeatCapacityWithLatentHeat.h
StrainDependentPermeability.cpp
►
StrainDependentPermeability.h
TemperatureDependentDiffusion.cpp
►
TemperatureDependentDiffusion.h
TemperatureDependentFraction.cpp
►
TemperatureDependentFraction.h
TransportPorosityFromMassBalance.cpp
►
TransportPorosityFromMassBalance.h
VermaPruessModel.cpp
►
VermaPruessModel.h
VolumeFractionAverage.cpp
►
VolumeFractionAverage.h
►
WaterSaturationCurveIAPWSIF97Region4.h
WaterSaturationTemperatureIAPWSIF97Region4.cpp
►
WaterSaturationTemperatureIAPWSIF97Region4.h
►
WaterTemperatureIAPWSIF97Region1.cpp
►
WaterTemperatureIAPWSIF97Region1.h
►
Utils
►
CheckMaterialSpatialDistributionMap.h
►
Component.cpp
►
Component.h
►
CreateComponent.cpp
►
CreateComponent.h
►
CreateMaterialSpatialDistributionMap.cpp
►
CreateMaterialSpatialDistributionMap.h
►
CreateMedium.cpp
►
CreateMedium.h
►
CreatePhase.cpp
►
CreatePhase.h
►
CreateProperty.cpp
►
CreateProperty.h
MaterialSpatialDistributionMap.cpp
►
MaterialSpatialDistributionMap.h
►
Medium.cpp
►
Medium.h
►
Phase.cpp
►
Phase.h
►
Property.cpp
►
Property.h
►
PropertyType.cpp
►
PropertyType.h
►
VariableType.cpp
►
VariableType.h
►
PorousMedium
►
SolidModels
►
Utils
►
PhysicalConstant.h
►
MathLib
►
MeshGeoToolsLib
►
MeshLib
►
MeshToolsLib
►
NumLib
►
ParameterLib
►
ProcessLib
►
File Members
CapillaryPressureRegularizedVanGenuchten.cpp
Go to the documentation of this file.
1
12
#include "
CapillaryPressureRegularizedVanGenuchten.h
"
13
14
#include <algorithm>
15
#include <cmath>
16
17
#include "
BaseLib/Error.h
"
18
#include "
MaterialLib/MPL/Medium.h
"
19
#include "
MaterialLib/MPL/Utils/CheckVanGenuchtenExponentRange.h
"
20
#include "
MaterialLib/MPL/VariableType.h
"
21
22
namespace
MaterialPropertyLib
23
{
24
void
checkSaturationRange
(
const
double
Sl)
25
{
26
if
(Sl < 0 || Sl > 1)
27
{
28
OGS_FATAL
(
"The saturation of {:e} is out of its range of [0, 1]"
, Sl);
29
}
30
}
24
void
checkSaturationRange
(
const
double
Sl) {
…
}
31
32
CapillaryPressureRegularizedVanGenuchten::
33
CapillaryPressureRegularizedVanGenuchten
(
34
double
const
residual_liquid_saturation
,
35
double
const
maximum_liquid_saturation,
36
double
const
exponent,
37
double
const
p_b)
38
: Sg_r_(1.0 - maximum_liquid_saturation),
39
Sg_max_(1.0 -
residual_liquid_saturation
),
40
m_(exponent),
41
p_b_(p_b),
42
PcBarvGSg_Sg_max_(getPcBarvGSg(Sg_max_)),
43
dPcdSvGBarSg_max_(getdPcdSvGBar(Sg_max_))
44
{
45
checkVanGenuchtenExponentRange
(
m_
);
46
}
32
CapillaryPressureRegularizedVanGenuchten::
{
…
}
47
48
PropertyDataType
CapillaryPressureRegularizedVanGenuchten::value
(
49
VariableArray
const
& variable_array,
50
ParameterLib::SpatialPosition
const
&
/*pos*/
,
double
const
/*t*/
,
51
double
const
/*dt*/
)
const
52
{
53
const
double
Sl = variable_array.
liquid_saturation
;
54
55
checkSaturationRange
(Sl);
56
57
double
const
Sg = 1 - Sl;
58
if
(!(Sg < Sg_r_ || Sg >
Sg_max_
))
59
{
60
return
getPcBarvGSg
(Sg);
61
}
62
if
(Sg <
Sg_r_
)
63
{
64
return
0.0;
65
}
66
67
return
PcBarvGSg_Sg_max_
+
dPcdSvGBarSg_max_
* (Sg -
Sg_max_
);
68
}
48
PropertyDataType
CapillaryPressureRegularizedVanGenuchten::value
( {
…
}
69
70
PropertyDataType
CapillaryPressureRegularizedVanGenuchten::dValue
(
71
VariableArray
const
& variable_array,
Variable
const
variable,
72
ParameterLib::SpatialPosition
const
&
/*pos*/
,
double
const
/*t*/
,
73
double
const
/*dt*/
)
const
74
{
75
if
(variable !=
Variable::liquid_saturation
)
76
{
77
OGS_FATAL
(
78
"CapillaryPressureRegularizedVanGenuchten::dValue is implemented "
79
"for derivatives with respect to liquid saturation only."
);
80
}
81
82
const
double
Sl = variable_array.
liquid_saturation
;
83
84
checkSaturationRange
(Sl);
85
86
double
const
Sg = 1 - Sl;
87
if
(!(Sg < Sg_r_ || Sg >
Sg_max_
))
88
{
89
return
-
getdPcdSvGBar
(Sg);
90
}
91
if
(Sg <
Sg_r_
)
92
{
93
return
0.0;
94
}
95
96
return
-
dPcdSvGBarSg_max_
;
97
}
70
PropertyDataType
CapillaryPressureRegularizedVanGenuchten::dValue
( {
…
}
98
99
double
CapillaryPressureRegularizedVanGenuchten::getPcBarvGSg
(
100
double
const
Sg)
const
101
{
102
double
const
S_bar =
getSBar
(Sg);
103
return
getPcvGSg
(S_bar) -
getPcvGSg
(
Sg_r_
+ (
Sg_max_
-
Sg_r_
) *
xi_
/ 2);
104
}
99
double
CapillaryPressureRegularizedVanGenuchten::getPcBarvGSg
( {
…
}
105
106
double
CapillaryPressureRegularizedVanGenuchten::getSBar
(
double
const
Sg)
const
107
{
108
return
Sg_r_
+ (1 -
xi_
) * (Sg -
Sg_r_
) + 0.5 *
xi_
* (
Sg_max_
-
Sg_r_
);
109
}
106
double
CapillaryPressureRegularizedVanGenuchten::getSBar
(
double
const
Sg)
const
{
…
}
110
111
double
CapillaryPressureRegularizedVanGenuchten::getPcvGSg
(
112
double
const
Sg)
const
113
{
114
double
const
Se = (
Sg_max_
- Sg) / (
Sg_max_
-
Sg_r_
);
115
return
p_b_
* std::pow(std::pow(Se, (-1.0 /
m_
)) - 1.0, 1.0 -
m_
);
116
}
111
double
CapillaryPressureRegularizedVanGenuchten::getPcvGSg
( {
…
}
117
118
double
CapillaryPressureRegularizedVanGenuchten::getdPcdSvGBar
(
119
double
const
Sg)
const
120
{
121
double
S_bar =
getSBar
(Sg);
122
return
getdPcdSvG
(S_bar) * (1 -
xi_
);
123
}
118
double
CapillaryPressureRegularizedVanGenuchten::getdPcdSvGBar
( {
…
}
124
125
double
CapillaryPressureRegularizedVanGenuchten::getdPcdSvG
(
126
const
double
Sg)
const
127
{
128
double
const
n = 1 / (1 -
m_
);
129
double
const
Se = (
Sg_max_
- Sg) / (
Sg_max_
-
Sg_r_
);
130
auto
const
temp = std::pow(Se, (-1 /
m_
));
131
return
p_b_
* (1 / (
m_
* n)) * (1 / (
Sg_max_
-
Sg_r_
)) *
132
std::pow(temp - 1, (1 / n) - 1) * temp / Se;
133
}
125
double
CapillaryPressureRegularizedVanGenuchten::getdPcdSvG
( {
…
}
134
135
}
// namespace MaterialPropertyLib
CapillaryPressureRegularizedVanGenuchten.h
CheckVanGenuchtenExponentRange.h
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
Medium.h
VariableType.h
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::xi_
static constexpr double xi_
parameter in regularized van Genuchten model
Definition
CapillaryPressureRegularizedVanGenuchten.h:71
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::m_
double const m_
Definition
CapillaryPressureRegularizedVanGenuchten.h:66
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::getdPcdSvG
double getdPcdSvG(double const Sg) const
Gets .
Definition
CapillaryPressureRegularizedVanGenuchten.cpp:125
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::PcBarvGSg_Sg_max_
double const PcBarvGSg_Sg_max_
Definition
CapillaryPressureRegularizedVanGenuchten.h:73
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::dValue
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
Definition
CapillaryPressureRegularizedVanGenuchten.cpp:70
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::Sg_r_
double const Sg_r_
Residual saturation of gas phase.
Definition
CapillaryPressureRegularizedVanGenuchten.h:64
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::Sg_max_
double const Sg_max_
Maximum saturation of gas phase.
Definition
CapillaryPressureRegularizedVanGenuchten.h:65
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::p_b_
double const p_b_
Definition
CapillaryPressureRegularizedVanGenuchten.h:69
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::getPcBarvGSg
double getPcBarvGSg(double const Sg) const
Definition
CapillaryPressureRegularizedVanGenuchten.cpp:99
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::getPcvGSg
double getPcvGSg(double const Sg) const
Definition
CapillaryPressureRegularizedVanGenuchten.cpp:111
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::getdPcdSvGBar
double getdPcdSvGBar(double const Sg) const
Gets .
Definition
CapillaryPressureRegularizedVanGenuchten.cpp:118
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::getSBar
double getSBar(double const Sg) const
Definition
CapillaryPressureRegularizedVanGenuchten.cpp:106
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::CapillaryPressureRegularizedVanGenuchten
CapillaryPressureRegularizedVanGenuchten(double const residual_liquid_saturation, double const maximum_liquid_saturation, double const exponent, double const p_b)
Definition
CapillaryPressureRegularizedVanGenuchten.cpp:33
MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::dPcdSvGBarSg_max_
double const dPcdSvGBarSg_max_
Definition
CapillaryPressureRegularizedVanGenuchten.h:74
MaterialPropertyLib::Property::value
virtual PropertyDataType value() const
Definition
Property.cpp:76
MaterialPropertyLib::VariableArray
Definition
VariableType.h:99
MaterialPropertyLib::VariableArray::liquid_saturation
double liquid_saturation
Definition
VariableType.h:182
ParameterLib::SpatialPosition
Definition
SpatialPosition.h:28
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:21
MaterialPropertyLib::Variable
Variable
Definition
VariableType.h:30
MaterialPropertyLib::Variable::liquid_saturation
@ liquid_saturation
MaterialPropertyLib::checkSaturationRange
void checkSaturationRange(const double Sl)
Definition
CapillaryPressureRegularizedVanGenuchten.cpp:24
MaterialPropertyLib::residual_liquid_saturation
@ residual_liquid_saturation
Definition
PropertyType.h:81
MaterialPropertyLib::checkVanGenuchtenExponentRange
void checkVanGenuchtenExponentRange(const double m)
Definition
CheckVanGenuchtenExponentRange.cpp:18
MaterialPropertyLib::PropertyDataType
std::variant< double, Eigen::Matrix< double, 2, 1 >, Eigen::Matrix< double, 3, 1 >, Eigen::Matrix< double, 2, 2 >, Eigen::Matrix< double, 3, 3 >, Eigen::Matrix< double, 4, 1 >, Eigen::Matrix< double, 6, 1 >, Eigen::MatrixXd > PropertyDataType
Definition
Property.h:31
MaterialLib
MPL
Properties
CapillaryPressureSaturation
CapillaryPressureRegularizedVanGenuchten.cpp
Generated by
1.12.0