Go to the documentation of this file.
12 #include "MooseVariable.h"
14 #include "libmesh/quadrature.h"
22 InputParameters params = validParams<TimeKernel>();
23 params.addRequiredParam<UserObjectName>(
24 "PorousFlowDictator",
"The UserObject that holds the list of PorousFlow variable names.");
25 params.addRequiredCoupledVar(
26 "conc_var",
"The variable that represents the concentration of desorped species");
27 params.addClassDescription(
"Desorped component mass derivative wrt time.");
32 const InputParameters & parameters)
33 : TimeKernel(parameters),
35 _conc_var_number(coupled(
"conc_var")),
36 _conc(coupledValue(
"conc_var")),
37 _conc_old(coupledValueOld(
"conc_var")),
38 _porosity(getMaterialProperty<Real>(
"PorousFlow_porosity_qp")),
39 _porosity_old(getMaterialPropertyOld<Real>(
"PorousFlow_porosity_qp")),
40 _dporosity_dvar(getMaterialProperty<std::vector<Real>>(
"dPorousFlow_porosity_qp_dvar")),
42 getMaterialProperty<std::vector<
RealGradient>>(
"dPorousFlow_porosity_qp_dgradvar"))
51 return _test[_i][_qp] * (c - c_old) / _dt;
72 deriv = (1.0 -
_porosity[_qp]) * _phi[_j][_qp];
75 return _test[_i][_qp] * deriv / _dt;
81 return _test[_i][_qp] * deriv / _dt;
virtual Real computeQpResidual() override
InputParameters validParams< PorousFlowDesorpedMassTimeDerivative >()
const VariableValue & _conc_old
Old value of the concentration variable.
VectorValue< Real > RealGradient
registerMooseObject("PorousFlowApp", PorousFlowDesorpedMassTimeDerivative)
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
Real computeQpJac(unsigned int jvar) const
Derivative of residual with respect to variable number jvar This is used by both computeQpJacobian an...
virtual Real computeQpJacobian() override
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.
const MaterialProperty< Real > & _porosity
Porosity at the qps.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
Kernel = (desorped_mass - desorped_mass_old)/dt It is NOT lumped to the nodes.
PorousFlowDesorpedMassTimeDerivative(const InputParameters ¶meters)
const unsigned int _conc_var_number
The MOOSE variable number of the concentration variable.
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(PorousFlow variable) - these derivatives will be wrt variables at the qps
const MaterialProperty< Real > & _porosity_old
Old value of porosity.
const VariableValue & _conc
The concentration variable.
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable) - these derivatives will be wrt grad(vars) at qps
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override