13 #include "MooseVariable.h"
24 InputParameters params = validParams<TimeKernel>();
25 params.addRequiredParam<UserObjectName>(
27 "A RichardsDensity UserObject that defines the fluid density as a function of pressure.");
28 params.addRequiredCoupledVar(
"other_var",
29 "The other variable in the 2-phase system. If "
30 "Variable=porepressure, then other_var should be the "
31 "saturation Variable, and vice-versa.");
32 params.addRequiredParam<
bool>(
33 "var_is_porepressure",
34 "This flag is needed to correctly calculate the Jacobian entries. If "
35 "set to true, this Kernel will assume it is describing the mass of "
36 "the phase with porepressure as its Variable (eg, the liquid phase). "
37 "If set to false, this Kernel will assumed it is describing the mass "
38 "of the phase with saturation as its variable (eg, the gas phase)");
39 params.addClassDescription(
"- fluid_mass");
44 : TimeKernel(parameters),
46 _other_var_nodal_old(coupledDofValuesOld(
"other_var")),
47 _var_is_pp(getParam<bool>(
"var_is_porepressure")),
48 _porosity_old(getMaterialProperty<Real>(
"porosity_old"))
66 mass_old =
_porosity_old[_qp] * density_old * _var.dofValuesOld()[_i];
69 return _test[_i][_qp] * (-mass_old) / _dt;