20 MooseEnum poroperm_function(
"kozeny_carman_fd2=0 kozeny_carman_phi0=1",
"kozeny_carman_fd2");
24 "Function relating porosity and permeability. The options are: kozeny_carman_fd2 = f d^2 " 25 "phi^n/(1-phi)^m (where phi is porosity, f is a scalar constant with typical values " 26 "0.01-0.001, and d is grain size). kozeny_carman_phi0 = k0 (1-phi0)^m/phi0^n * " 27 "phi^n/(1-phi)^m (where phi is porosity, and k0 is the permeability at porosity phi0)");
30 "The permeability scalar value (usually in " 31 "m^2) at the reference porosity, required for " 32 "kozeny_carman_phi0");
34 "A tensor to multiply the calculated scalar " 35 "permeability, in order to obtain anisotropy if " 36 "required. Defaults to isotropic permeability " 39 "phi0",
"phi0 > 0 & phi0 < 1",
"The reference porosity, required for kozeny_carman_phi0");
41 "f",
"f > 0",
"The multiplying factor, required for kozeny_carman_fd2");
43 "d",
"d > 0",
"The grain diameter, required for kozeny_carman_fd2");
47 "This Material calculates the permeability tensor from a form of the Kozeny-Carman equation, " 48 "k = k_ijk * A * phi^n / (1 - phi)^m, where k_ijk is a tensor providing the anisotropy, phi " 49 "is porosity, n and m are positive scalar constants and A is given in one of the following " 50 "forms: A = k0 * (1 - phi0)^m / phi0^n (where k0 and phi0 are a reference permeability and " 51 "porosity) or A = f * d^2 (where f is a scalar constant and d is grain diameter.");
59 _k0(parameters.isParamValid(
"k0") ? this->template getParam<
Real>(
"k0") : -1),
60 _phi0(parameters.isParamValid(
"phi0") ? this->template getParam<
Real>(
"phi0") : -1),
61 _f(parameters.isParamValid(
"f") ? this->template getParam<
Real>(
"f") : -1),
62 _d(parameters.isParamValid(
"d") ? this->template getParam<
Real>(
"d") : -1),
63 _m(this->template getParam<
Real>(
"m")),
64 _n(this->template getParam<
Real>(
"n")),
65 _k_anisotropy(parameters.isParamValid(
"k_anisotropy")
68 _porosity_qp(this->template getGenericMaterialProperty<
Real, is_ad>(
"PorousFlow_porosity_qp")),
69 _dporosity_qp_dvar(is_ad ? nullptr
70 : &this->template getMaterialProperty<
std::vector<
Real>>(
71 "dPorousFlow_porosity_qp_dvar")),
72 _dporosity_qp_dgradvar(is_ad ? nullptr
74 "dPorousFlow_porosity_qp_dgradvar")),
75 _poroperm_function(this->template getParam<
MooseEnum>(
"poroperm_function")
82 mooseError(
"You must specify f and d in order to use kozeny_carman_fd2 in " 83 "PorousFlowPermeabilityKozenyCarman");
89 mooseError(
"You must specify k0 and phi0 in order to use kozeny_carman_phi0 in " 90 "PorousFlowPermeabilityKozenyCarman");
96 _dictator.usePermDerivs(
true);
103 _permeability_qp[_qp] =
104 _k_anisotropy * _A *
std::pow(_porosity_qp[_qp], _n) /
std::pow(1.0 - _porosity_qp[_qp], _m);
106 if constexpr (!is_ad)
109 for (
unsigned int v = 0;
v < _num_var; ++
v)
110 (*_dpermeability_qp_dvar)[_qp][
v] = (*_dporosity_qp_dvar)[_qp][
v] * _permeability_qp[_qp] *
111 (_n / _porosity_qp[_qp] + _m / (1.0 - _porosity_qp[_qp]));
113 (*_dpermeability_qp_dgradvar)[_qp].resize(LIBMESH_DIM);
116 (*_dpermeability_qp_dgradvar)[_qp][i].resize(_num_var,
RealTensorValue());
117 for (
unsigned int v = 0;
v < _num_var; ++
v)
118 (*_dpermeability_qp_dgradvar)[_qp][i][
v] =
119 (*_dporosity_qp_dgradvar)[_qp][
v](i) * _permeability_qp[_qp] *
120 (_n / _porosity_qp[_qp] + _m / (1.0 - _porosity_qp[_qp]));
PorousFlowPermeabilityKozenyCarmanTempl(const InputParameters ¶meters)
Material designed to provide the permeability tensor which is calculated from porosity using a form o...
void mooseError(Args &&... args)
void computeQpProperties() override
static InputParameters validParams()
enum PorousFlowPermeabilityKozenyCarmanTempl::PoropermFunction _poroperm_function
static constexpr std::size_t dim
Base class Material designed to provide the permeability tensor.
TensorValue< Real > RealTensorValue
const Real _f
Multiplying factor in A = f * d^2.
PoropermFunction
Name of porosity-permeability relationship.
static InputParameters validParams()
const Real _phi0
Reference porosity in A = k0 * (1 - phi0)^m / phi0^n.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
const Real _m
Exponent in k = k_ijk * A * phi^n / (1 - phi)^m.
IntRange< T > make_range(T beg, T end)
Real _A
Multiplying factor in k = k_ijk * A * phi^n / (1 - phi)^m.
const Real _k0
Reference scalar permeability in A = k0 * (1 - phi0)^m / phi0^n.
MooseUnits pow(const MooseUnits &, int)
const Real _d
Grain diameter in A = f * d^2.
registerMooseObject("PorousFlowApp", PorousFlowPermeabilityKozenyCarman)
const Real _n
Exponent in k = k_ijk * A * phi^n / (1 - phi)^m.