Go to the documentation of this file.
14 #include "MooseVariable.h"
25 InputParameters params = validParams<TimeDerivative>();
26 params.addParam<
bool>(
"use_supg",
28 "True for using SUPG in this kernel, false otherwise. "
29 "This has no effect if the material does not use SUPG.");
30 params.addRequiredParam<UserObjectName>(
31 "richardsVarNames_UO",
"The UserObject that holds the list of Richards variable names.");
36 : TimeDerivative(parameters),
38 _pvar(_richards_name_UO.richards_var_num(_var.number())),
40 _use_supg(getParam<bool>(
"use_supg")),
42 _mass(getMaterialProperty<std::vector<Real>>(
"mass")),
43 _dmass(getMaterialProperty<std::vector<std::vector<Real>>>(
"dmass")),
44 _mass_old(getMaterialProperty<std::vector<Real>>(
"mass_old")),
46 _tauvel_SUPG(getMaterialProperty<std::vector<RealVectorValue>>(
"tauvel_SUPG")),
48 getMaterialProperty<std::vector<std::vector<RealTensorValue>>>(
"dtauvel_SUPG_dgradv")),
50 getMaterialProperty<std::vector<std::vector<RealVectorValue>>>(
"dtauvel_SUPG_dv"))
57 Real test_fcn = _test[_i][_qp];
68 Real mass_prime = _phi[_j][_qp] *
_dmass[_qp][
_pvar][wrt_num];
70 Real test_fcn = _test[_i][_qp];
71 Real test_fcn_prime = 0;
80 return (test_fcn * mass_prime + test_fcn_prime * (mass - mass_old)) / _dt;
InputParameters validParams< RichardsMassChange >()
const MaterialProperty< std::vector< std::vector< RealVectorValue > > > & _dtauvel_SUPG_dv
deriv of tau_SUPG wrt variable
unsigned int richards_var_num(unsigned int moose_var_num) const
the richards variable number
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dtauvel_SUPG_dgradv
derivative of tau_SUPG wrt grad(variable)
const MaterialProperty< std::vector< std::vector< Real > > > & _dmass
d(fluid mass_i)/d(var_j)
This holds maps between pressure_var or pressure_var, sat_var used in RichardsMaterial and kernels,...
Kernel = (mass - mass_old)/dt where mass = porosity*density*saturation This is used for the time deri...
unsigned int _pvar
the Richards variable number eg, if richards name = 'pwater pgas poil', and this kernel is for pgas,...
const MaterialProperty< std::vector< Real > > & _mass_old
old value of fluid mass (or fluid masses in multiphase) at quadpoints
bool _use_supg
whether to use SUPG for this kernel (not recommended)
virtual Real computeQpJacobian()
Real computeQpJac(unsigned int wrt_num)
Derivative of residual with respect to wrt_num Richards variable This is used by both computeQpJacobi...
const MaterialProperty< std::vector< RealVectorValue > > & _tauvel_SUPG
tau_SUPG
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
RichardsMassChange(const InputParameters ¶meters)
const RichardsVarNames & _richards_name_UO
holds info on the Richards variables
registerMooseObject("RichardsApp", RichardsMassChange)
virtual Real computeQpResidual()
bool not_richards_var(unsigned int moose_var_num) const
returns true if moose_var_num is not a richards var
const MaterialProperty< std::vector< Real > > & _mass
fluid mass (or fluid masses in multiphase) at quadpoints