OGS
DupuitPermeability.cpp
Go to the documentation of this file.
1
11
#include "
MaterialLib/MPL/Properties/DupuitPermeability.h
"
12
13
namespace
MaterialPropertyLib
14
{
15
DupuitPermeability::DupuitPermeability
(
16
std::string
name
,
ParameterLib::Parameter<double>
const
& parameter)
17
: parameter_(parameter)
18
{
19
name_
= std::move(
name
);
20
}
21
22
PropertyDataType
DupuitPermeability::value
(
23
MaterialPropertyLib::VariableArray
const
& variable_array,
24
ParameterLib::SpatialPosition
const
& pos,
double
const
t,
25
double
const
/*dt*/
)
const
26
{
27
double
const
pressure = variable_array.
liquid_phase_pressure
;
28
auto
const
& permeability_values =
parameter_
(t, pos);
29
30
auto
const
& permeability_variant =
fromVector
(permeability_values);
31
PropertyDataType
dupuit_permeability = std::visit(
32
[&pressure](
auto
const
& permeability_variant) ->
PropertyDataType
33
{
34
using
T = std::decay_t<
decltype
(permeability_variant)>;
35
if
constexpr
(std::is_same_v<T, double>)
36
{
37
return
pressure * permeability_variant;
38
}
39
else
40
{
41
return
(pressure * permeability_variant).eval();
42
}
43
},
44
permeability_variant);
45
46
return
dupuit_permeability;
47
}
48
49
}
// namespace MaterialPropertyLib
DupuitPermeability.h
MaterialPropertyLib::DupuitPermeability::parameter_
ParameterLib::Parameter< double > const & parameter_
Definition
DupuitPermeability.h:33
MaterialPropertyLib::DupuitPermeability::DupuitPermeability
DupuitPermeability(std::string name, ParameterLib::Parameter< double > const ¶meter)
This constructor accepts two parameters.
Definition
DupuitPermeability.cpp:15
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:99
MaterialPropertyLib::VariableArray::liquid_phase_pressure
double liquid_phase_pressure
Definition
VariableType.h:181
ParameterLib::SpatialPosition
Definition
SpatialPosition.h:27
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:21
MaterialPropertyLib::fromVector
PropertyDataType fromVector(std::vector< double > const &values)
Definition
Property.cpp:23
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
ParameterLib::Parameter
Definition
WellboreGeometry.h:23
MaterialLib
MPL
Properties
DupuitPermeability.cpp
Generated by
1.11.0