Go to the documentation of this file.
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 lumped to the nodes divided by dt");
44 : TimeKernel(parameters),
46 _other_var_nodal(coupledDofValues(
"other_var")),
47 _other_var_num(coupled(
"other_var")),
48 _var_is_pp(getParam<bool>(
"var_is_porepressure")),
49 _porosity(getMaterialProperty<Real>(
"porosity"))
70 return _test[_i][_qp] * mass / _dt;
94 return _test[_i][_qp] * mass_prime / _dt;
117 mass_prime =
_porosity[_qp] * ddensity * _var.dofValues()[_i];
120 return _test[_i][_qp] * mass_prime / _dt;
virtual Real computeQpJacobian()
InputParameters validParams< Q2PNodalMass >()
const RichardsDensity & _density
virtual Real computeQpResidual()
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
const VariableValue & _other_var_nodal
the other variable (this is porepressure if the Variable is saturation)
virtual Real density(Real p) const =0
fluid density as a function of porepressure This must be over-ridden in derived classes to provide an...
registerMooseObject("RichardsApp", Q2PNodalMass)
unsigned int _other_var_num
variable number of the other variable
const std::string density
const MaterialProperty< Real > & _porosity
current value of the porosity
Base class for fluid density as a function of porepressure The functions density, ddensity and d2dens...
virtual Real ddensity(Real p) const =0
derivative of fluid density wrt porepressure This must be over-ridden in derived classes to provide a...
fluid_mass/dt lumped to the nodes
bool _var_is_pp
whether the "other variable" is actually porepressure
Q2PNodalMass(const InputParameters ¶meters)