19 params.addRequiredCoupledVar(
"mass_density",
20 "Variable that represents log(mass-density) of the single phase");
21 params.addRequiredRangeCheckedParam<Real>(
24 "For this class, the capillary function is assumed to be saturation = "
25 "exp(-(al*porepressure)^2) for porepressure<0.");
26 params.addRequiredRangeCheckedParam<Real>(
27 "density_P0",
"density_P0>0",
"The density of the fluid phase at zero porepressure");
28 params.addRequiredRangeCheckedParam<Real>(
29 "bulk_modulus",
"bulk_modulus>0",
"The constant bulk modulus of the fluid phase");
30 params.addClassDescription(
"This Material is used for the single-phase situation where "
31 "log(mass-density) is the primary variable. calculates the 1 "
32 "porepressure and the 1 saturation in a 1-phase situation, "
33 "and derivatives of these with respect to the PorousFlowVariables. A "
34 "gaussian capillary function is assumed");
41 _al(getParam<Real>(
"al")),
42 _al2(std::
pow(_al, 2)),
43 _logdens0(std::log(getParam<Real>(
"density_P0"))),
44 _bulk(getParam<Real>(
"bulk_modulus")),
45 _recip_bulk(1.0 / _al / _bulk),
46 _recip_bulk2(std::
pow(_recip_bulk, 2)),
48 _md_var(_nodal_material ? coupledDofValues(
"mass_density") : coupledValue(
"mass_density")),
49 _gradmd_qp_var(coupledGradient(
"mass_density")),
50 _md_varnum(coupled(
"mass_density")),
51 _pvar(_dictator.isPorousFlowVariable(_md_varnum) ? _dictator.porousFlowVariableNum(_md_varnum)
55 mooseError(
"The Dictator proclaims that the number of phases is ",
56 _dictator.numPhases(),
57 " whereas PorousFlow1PhaseMD_Gaussian can only be used for 1-phase simulations. Be "
58 "aware that the Dictator has noted your mistake.");
81 (*_grads_qp)[_qp][0] = 0.0;
85 (*_gradp_qp)[_qp][0] =
87 (*_grads_qp)[_qp][0] =
92 if (_dictator.notPorousFlowVariable(
_md_varnum))
109 if (!_nodal_material)
115 (*_dgradp_qp_dv)[_qp][0][
_pvar] = 0.0;
116 (*_dgrads_qp_dgradv)[_qp][0][
_pvar] = 0.0;
117 (*_dgrads_qp_dv)[_qp][0][
_pvar] = 0.0;
127 (*_dgrads_qp_dgradv)[_qp][0][
_pvar] =
128 -2.0 *
_al2 * pp * sat * (*_dgradp_qp_dgradv)[_qp][0][
_pvar];
129 (*_dgrads_qp_dv)[_qp][0][
_pvar] =
131 (*_dgrads_qp_dv)[_qp][0][
_pvar] +=
133 (*_dgrads_qp_dv)[_qp][0][
_pvar] += -2.0 *
_al2 * pp * sat * (*_dgradp_qp_dv)[_qp][0][
_pvar];