OGS
BishopsSaturationCutoff.cpp
Go to the documentation of this file.
1
10
#include "
BishopsSaturationCutoff.h
"
11
12
namespace
MaterialPropertyLib
13
{
14
BishopsSaturationCutoff::BishopsSaturationCutoff
(std::string
name
,
15
double
const
cutoff_value)
16
: S_L_max_(cutoff_value)
17
{
18
name_
= std::move(
name
);
19
}
20
21
void
BishopsSaturationCutoff::checkScale
()
const
22
{
23
if
(!std::holds_alternative<Medium*>(
scale_
))
24
{
25
OGS_FATAL
(
26
"The property 'BishopsSaturationCutoff' is implemented on the "
27
"'media' scale only."
);
28
}
29
}
30
31
PropertyDataType
BishopsSaturationCutoff::value
(
32
VariableArray
const
& variable_array,
33
ParameterLib::SpatialPosition
const
&
/*pos*/
,
double
const
/*t*/
,
34
double
const
/*dt*/
)
const
35
{
36
auto
const
S_L = variable_array.
liquid_saturation
;
37
38
return
S_L <
S_L_max_
? 0. : 1.;
39
}
40
41
PropertyDataType
BishopsSaturationCutoff::dValue
(
42
VariableArray
const
&
/*variable_array*/
,
Variable
const
variable,
43
ParameterLib::SpatialPosition
const
&
/*pos*/
,
double
const
/*t*/
,
44
double
const
/*dt*/
)
const
45
{
46
if
(variable !=
Variable::liquid_saturation
)
47
{
48
OGS_FATAL
(
49
"BishopsSaturationCutoff::dValue is implemented for derivatives "
50
"with respect to liquid saturation only."
);
51
}
52
53
return
0.;
54
}
55
}
// namespace MaterialPropertyLib
BishopsSaturationCutoff.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
MaterialPropertyLib::BishopsSaturationCutoff::BishopsSaturationCutoff
BishopsSaturationCutoff(std::string name, double const cutoff_value)
Definition
BishopsSaturationCutoff.cpp:14
MaterialPropertyLib::BishopsSaturationCutoff::dValue
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &, double const, double const) const override
Definition
BishopsSaturationCutoff.cpp:41
MaterialPropertyLib::BishopsSaturationCutoff::S_L_max_
double const S_L_max_
Definition
BishopsSaturationCutoff.h:36
MaterialPropertyLib::BishopsSaturationCutoff::checkScale
void checkScale() const override
Definition
BishopsSaturationCutoff.cpp:21
MaterialPropertyLib::Property::value
virtual PropertyDataType value() const
Definition
Property.cpp:76
MaterialPropertyLib::Property::name_
std::string name_
Definition
Property.h:290
MaterialPropertyLib::Property::scale_
std::variant< Medium *, Phase *, Component * > scale_
Definition
Property.h:297
MaterialPropertyLib::VariableArray
Definition
VariableType.h:97
MaterialPropertyLib::VariableArray::liquid_saturation
double liquid_saturation
Definition
VariableType.h:179
ParameterLib::SpatialPosition
Definition
SpatialPosition.h:27
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::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
BishopsSaturationCutoff.cpp
Generated by
1.10.0