21 "Minimum allowed value of the porosity: if the computed porosity is less than this value, "
22 "porosity is set to this value instead. The default of zero means porosity is never "
23 "negative. A negative value may be used, for instance, when comparing with analytical "
24 "solutions of linear poroelasticity in which porosity can become negative");
29 "If the porosity_min floor is active, the porosity derivatives are set to zero_modifier "
30 "times their unfloored values (rather than exactly zero) to hint to the nonlinear solver "
31 "that porosity is not strictly constant, which aids convergence");
40 _porosity(_nodal_material ? declareGenericProperty<Real, is_ad>(
"PorousFlow_porosity_nodal")
41 : declareGenericProperty<Real, is_ad>(
"PorousFlow_porosity_qp")),
42 _dporosity_dvar(is_ad ? nullptr
44 ? &declareProperty<
std::vector<Real>>(
"dPorousFlow_porosity_nodal_dvar")
45 : &declareProperty<
std::vector<Real>>(
"dPorousFlow_porosity_qp_dvar")),
49 ? &declareProperty<
std::vector<RealGradient>>(
"dPorousFlow_porosity_nodal_dgradvar")
50 : &declareProperty<
std::vector<RealGradient>>(
"dPorousFlow_porosity_qp_dgradvar")),
51 _porosity_min(getParam<Real>(
"porosity_min")),
52 _zero_modifier(getParam<Real>(
"zero_modifier"))
65 _porosity[_qp] = _porosity_min;
66 for (
unsigned int v = 0;
v < _num_var; ++
v)
68 (*_dporosity_dvar)[_qp][
v] *= _zero_modifier;
69 (*_dporosity_dgradvar)[_qp][
v] *= _zero_modifier;
77 _porosity[_qp].value() = _porosity_min;
78 _porosity[_qp].derivatives() *= _zero_modifier;
Base class for all PorousFlow vector materials.
static InputParameters validParams()
Base class Material designed to provide the porosity.
PorousFlowPorosityBaseTempl(const InputParameters ¶meters)
void applyPorosityMin()
If _porosity[_qp] < porosity_min, set _porosity[_qp] = porosity_min and multiply the derivatives of p...
static InputParameters validParams()