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-430-g8700c451a0f 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
CapillaryPressureVanGenuchten.cpp
Go to the documentation of this file.
1
12
#include "
CapillaryPressureVanGenuchten.h
"
13
14
#include <algorithm>
15
#include <cmath>
16
17
#include "
MaterialLib/MPL/Medium.h
"
18
19
namespace
MaterialPropertyLib
20
{
21
CapillaryPressureVanGenuchten::CapillaryPressureVanGenuchten
(
22
std::string
name
,
23
double
const
residual_liquid_saturation
,
24
double
const
residual_gas_saturation
,
25
double
const
exponent,
26
double
const
p_b,
27
double
const
maximum_capillary_pressure)
28
: S_L_res_(
residual_liquid_saturation
),
29
S_L_max_(1. -
residual_gas_saturation
),
30
m_(exponent),
31
p_b_(p_b),
32
p_cap_max_(maximum_capillary_pressure)
33
{
34
name_
= std::move(
name
);
35
36
if
(
S_L_res_ < 0 || S_L_res_ >
1)
37
{
38
OGS_FATAL
(
39
"Van Genuchten capillary pressure model: The residual liquid "
40
"saturation value S_L_res = {:g} is out of admissible range [0, "
41
"1]."
,
42
S_L_res_
);
43
}
44
if
(
S_L_max_ < 0 || S_L_max_ >
1)
45
{
46
OGS_FATAL
(
47
"Van Genuchten capillary pressure model: The maximum liquid "
48
"saturation value S_L_max = {:g} is out of admissible range [0, "
49
"1]."
,
50
S_L_max_
);
51
}
52
if
(
S_L_res_
>=
S_L_max_
)
53
{
54
OGS_FATAL
(
55
"Van Genuchten capillary pressure model: The maximum liquid "
56
"saturation S_L_max = {:g} must not be less or equal to the "
57
"residual liquid saturion S_L_res = {:g}."
,
58
S_L_max_
,
S_L_res_
);
59
}
60
if
(!(
m_
> 0 &&
m_
< 1))
61
{
62
OGS_FATAL
(
63
"Van Genuchten capillary pressure model: The exponent value m = "
64
"{:g} is out of of admissible range (0, 1)."
,
65
m_
);
66
}
67
if
(
p_b_
<= 0)
68
{
69
OGS_FATAL
(
70
"Van Genuchten capillary pressure model: The pressure scaling "
71
"value p_b = {:g} must be positive."
,
72
p_b_
);
73
}
74
if
(
p_cap_max_
< 0)
75
{
76
OGS_FATAL
(
77
"Van Genuchten capillary pressure model: The maximum capillary "
78
"pressure value p_cap_max = {:g} must be non-negative."
,
79
p_cap_max_
);
80
}
81
}
21
CapillaryPressureVanGenuchten::CapillaryPressureVanGenuchten
( {
…
}
82
83
PropertyDataType
CapillaryPressureVanGenuchten::value
(
84
VariableArray
const
& variable_array,
85
ParameterLib::SpatialPosition
const
&
/*pos*/
,
double
const
/*t*/
,
86
double
const
/*dt*/
)
const
87
{
88
double
const
S_L = variable_array.
liquid_saturation
;
89
90
if
(S_L <=
S_L_res_
)
91
{
92
return
p_cap_max_
;
93
}
94
95
if
(S_L >=
S_L_max_
)
96
{
97
return
0.;
98
}
99
100
double
const
S_eff = (S_L -
S_L_res_
) / (
S_L_max_
-
S_L_res_
);
101
assert(0 <= S_eff && S_eff <= 1);
102
103
double
const
p_cap =
104
p_b_
* std::pow(std::pow(S_eff, -1.0 /
m_
) - 1.0, 1.0 -
m_
);
105
assert(p_cap > 0);
106
return
std::min(p_cap,
p_cap_max_
);
107
}
83
PropertyDataType
CapillaryPressureVanGenuchten::value
( {
…
}
108
109
PropertyDataType
CapillaryPressureVanGenuchten::dValue
(
110
VariableArray
const
& variable_array,
Variable
const
variable,
111
ParameterLib::SpatialPosition
const
&
/*pos*/
,
double
const
/*t*/
,
112
double
const
/*dt*/
)
const
113
{
114
if
(variable !=
Variable::liquid_saturation
)
115
{
116
OGS_FATAL
(
117
"CapillaryPressureVanGenuchten::dValue is implemented for "
118
"derivatives with respect to liquid saturation only."
);
119
}
120
121
double
const
S_L = variable_array.
liquid_saturation
;
122
123
if
(S_L <=
S_L_res_
)
124
{
125
return
0.;
126
}
127
128
if
(S_L >=
S_L_max_
)
129
{
130
return
0.;
131
}
132
133
double
const
S_eff = (S_L -
S_L_res_
) / (
S_L_max_
-
S_L_res_
);
134
135
assert(0 < S_eff && S_eff < 1.0);
136
137
double
const
val1 = std::pow(S_eff, -1.0 /
m_
);
138
double
const
p_cap =
p_b_
* std::pow(val1 - 1.0, 1.0 -
m_
);
139
if
(p_cap >=
p_cap_max_
)
140
{
141
return
0.;
142
}
143
144
double
const
val2 = std::pow(val1 - 1.0, -
m_
);
145
return
p_b_
* (
m_
- 1.0) * val1 * val2 / (
m_
* (S_L -
S_L_res_
));
146
}
109
PropertyDataType
CapillaryPressureVanGenuchten::dValue
( {
…
}
147
}
// namespace MaterialPropertyLib
CapillaryPressureVanGenuchten.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
Medium.h
MaterialPropertyLib::CapillaryPressureVanGenuchten::m_
double const m_
Exponent.
Definition
CapillaryPressureVanGenuchten.h:78
MaterialPropertyLib::CapillaryPressureVanGenuchten::S_L_res_
double const S_L_res_
Residual saturation of liquid phase.
Definition
CapillaryPressureVanGenuchten.h:76
MaterialPropertyLib::CapillaryPressureVanGenuchten::p_b_
double const p_b_
Pressure scaling factor.
Definition
CapillaryPressureVanGenuchten.h:79
MaterialPropertyLib::CapillaryPressureVanGenuchten::dValue
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
Definition
CapillaryPressureVanGenuchten.cpp:109
MaterialPropertyLib::CapillaryPressureVanGenuchten::S_L_max_
double const S_L_max_
Maximum saturation of liquid phase.
Definition
CapillaryPressureVanGenuchten.h:77
MaterialPropertyLib::CapillaryPressureVanGenuchten::p_cap_max_
double const p_cap_max_
Maximum capillary pressure.
Definition
CapillaryPressureVanGenuchten.h:80
MaterialPropertyLib::CapillaryPressureVanGenuchten::CapillaryPressureVanGenuchten
CapillaryPressureVanGenuchten(std::string name, double const residual_liquid_saturation, double const residual_gas_saturation, double const exponent, double const p_b, double const maximum_capillary_pressure)
Definition
CapillaryPressureVanGenuchten.cpp:21
MaterialPropertyLib::Property::value
virtual PropertyDataType value() const
Definition
Property.cpp:76
MaterialPropertyLib::Property::name_
std::string name_
Definition
Property.h:290
MaterialPropertyLib::VariableArray
Definition
VariableType.h:101
MaterialPropertyLib::VariableArray::liquid_saturation
double liquid_saturation
Definition
VariableType.h:184
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::name
@ name
Definition
PropertyType.h:66
MaterialPropertyLib::residual_liquid_saturation
@ residual_liquid_saturation
Definition
PropertyType.h:81
MaterialPropertyLib::residual_gas_saturation
@ residual_gas_saturation
Definition
PropertyType.h:80
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
CapillaryPressureVanGenuchten.cpp
Generated by
1.12.0