OGS
KozenyCarmanModel.cpp
Go to the documentation of this file.
1
11#include "KozenyCarmanModel.h"
12
13#include <algorithm>
14#include <cmath>
15
16namespace MaterialPropertyLib
17{
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
ParameterLib::Parameter< double > const & _k0
Initial medium permeability.
virtual PropertyDataType value() const
Definition Property.cpp:76
PropertyDataType fromVector(std::vector< double > const &values)
Definition Property.cpp:23
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