OGS
KozenyCarmanModel.cpp
Go to the documentation of this file.
1
11
#include "
KozenyCarmanModel.h
"
12
13
#include <algorithm>
14
#include <cmath>
15
16
namespace
MaterialPropertyLib
17
{
18
PropertyDataType
KozenyCarmanModel::value
(
19
MaterialPropertyLib::VariableArray
const
& variable_array,
20
ParameterLib::SpatialPosition
const
& pos,
double
const
t,
21
double
const
/*dt*/
)
const
22
{
23
double
const
phi = variable_array.
porosity
;
24
auto
const
& k0 =
_k0
(t, pos);
25
26
std::vector<double> k;
27
k.reserve(k0.size());
28
std::transform(k0.cbegin(), k0.cend(), std::back_inserter(k),
29
[&](
auto
const
& k_component)
30
{
31
return k_component *
32
std::pow((1 - _phi0(t, pos)[0]) / (1 - phi), 2) *
33
std::pow(phi / _phi0(t, pos)[0], 3);
34
});
35
36
return
fromVector
(k);
37
}
38
39
}
// namespace MaterialPropertyLib
KozenyCarmanModel.h
MaterialPropertyLib::KozenyCarmanModel::_k0
ParameterLib::Parameter< double > const & _k0
Initial medium permeability.
Definition
KozenyCarmanModel.h:44
MaterialPropertyLib::Property::value
virtual PropertyDataType value() const
Definition
Property.cpp:76
MaterialPropertyLib::VariableArray
Definition
VariableType.h:99
MaterialPropertyLib::VariableArray::porosity
double porosity
Definition
VariableType.h:188
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::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
KozenyCarmanModel.cpp
Generated by
1.11.0