OGS
VermaPruessModel.cpp
Go to the documentation of this file.
1
11#include "VermaPruessModel.h"
12
13#include <algorithm>
14#include <cmath>
15#include <functional>
16
17namespace MaterialPropertyLib
18{
20 MaterialPropertyLib::VariableArray const& variable_array,
21 ParameterLib::SpatialPosition const& pos, double const t,
22 double const /*dt*/) const
23{
24 double const phi = variable_array.porosity;
25
26 // ratio of permeability to initial permeability
27 auto const var_k = std::pow(std::max(0., phi - _phi_c(t, pos)[0]) /
28 (_phi0(t, pos)[0] - _phi_c(t, pos)[0]),
29 _n(t, pos)[0]);
30
31 auto const& k0 = _k0(t, pos);
32 std::vector<double> k;
33 k.reserve(k0.size());
34 std::transform(
35 k0.cbegin(), k0.cend(), std::back_inserter(k),
36 std::bind(std::multiplies<double>(), std::placeholders::_1, var_k));
37
38 return fromVector(k);
39}
40
41} // namespace MaterialPropertyLib
virtual PropertyDataType value() const
Definition Property.cpp:76
ParameterLib::Parameter< double > const & _n
Exponent.
ParameterLib::Parameter< double > const & _phi0
Initial porosity.
ParameterLib::Parameter< double > const & _phi_c
Critical porosity.
ParameterLib::Parameter< double > const & _k0
Initial medium permeability.
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