69 std::vector<const MaterialProperty<T> *>
_dDdarg;
94 "The name of the diffusivity",
95 "This parameter has been renamed to 'diffusivity', which is more mnemonic and more conducive " 96 "to passing a number literal");
97 params.
addParam<MaterialPropertyName>(
98 "diffusivity",
"D",
"The diffusivity value or material property");
100 "Optional vector of arguments for the diffusivity. If provided and " 101 "diffusivity is a derivative parsed material, Jacobian contributions from " 102 "the diffusivity will be automatically computed");
105 "Coupled concentration variable for kernel to operate on; if this " 106 "is not specified, the kernel's nonlinear variable will be used as " 110 "Name of the order parameter for solid-pore surface. For use when diffusivity " 111 "depends on these OP gradients, leave this parameter un-set otherwise. ");
115 template <
typename T>
118 _D(isParamValid(
"D_name") ? getMaterialProperty<T>(
"D_name")
119 : getMaterialProperty<T>(
"diffusivity")),
120 _dDdc(getMaterialPropertyDerivative<T>(isParamValid(
"D_name") ?
"D_name" :
"diffusivity",
122 _dDdarg(_coupled_moose_vars.size()),
123 _dDdgradc(getMaterialPropertyDerivative<typename
GradientType<T>::type>(
124 isParamValid(
"D_name") ?
"D_name" :
"diffusivity",
"gradc")),
125 _is_coupled(isCoupled(
"v")),
126 _v_var(_is_coupled ? coupled(
"v") : (isCoupled(
"conc") ? coupled(
"conc") : _var.number())),
127 _grad_v(_is_coupled ? coupledGradient(
"v")
128 : (isCoupled(
"conc") ? coupledGradient(
"conc") : _grad_u)),
129 _surface_op_var(isCoupled(
"surface_op_var") ? coupled(
"surface_op_var") :
libMesh::
invalid_uint)
133 mooseDeprecated(
"In '",
name(),
"' the parameter 'conc' is deprecated, please use 'v' instead");
136 for (
unsigned int i = 0; i <
_dDdarg.size(); ++i)
137 _dDdarg[i] = &getMaterialPropertyDerivative<T>(
141 template <
typename T>
145 validateNonlinearCoupling<Real>(parameters().isParamSetByUser(
"D_name") ?
"D_name" 149 template <
typename T>
153 return _D[_qp] * _grad_v[_qp] * _grad_test[_i][_qp];
156 template <
typename T>
160 Real sum = _phi[_j][_qp] * _dDdc[_qp] * _grad_v[_qp] * _grad_test[_i][_qp];
162 sum += computeQpCJacobian();
167 template <
typename T>
172 const unsigned int cvar = mapJvarToCvar(jvar);
174 Real sum = (*_dDdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_v[_qp] * _grad_test[_i][_qp];
175 if (jvar == _surface_op_var)
176 sum += _dDdgradc[_qp] * _grad_phi[_j][_qp] * _grad_v[_qp] * _grad_test[_i][_qp];
179 sum += computeQpCJacobian();
184 template <
typename T>
188 return _D[_qp] * _grad_phi[_j][_qp] * _grad_test[_i][_qp];
std::string name(const ElemQuality q)
OutputTools< Real >::VariableGradient VariableGradient
virtual bool isCoupled(const std::string &var_name, unsigned int i=0) const
Returns true if a variables has been coupled as name.
const MaterialProperty< T > & _D
diffusion coefficient
const MaterialProperty< T > & _dDdc
diffusion coefficient derivative w.r.t. the kernel variable
const MaterialProperty< typename GradientType< T >::type > & _dDdgradc
diffusion coefficient derivatives w.r.t. variables that have explicit dependence on gradients ...
static InputParameters validParams()
const unsigned int invalid_uint
void mooseDeprecated(Args &&... args) const
virtual Real computeQpJacobian() override
Compute this Kernel's contribution to the Jacobian at the current quadrature point.
virtual Real computeQpCJacobian()
std::vector< const MaterialProperty< T > * > _dDdarg
diffusion coefficient derivatives w.r.t. coupled variables
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Interface class ("Veneer") for Kernel to provide a mapping from 'jvar' in computeQpOffDiagJacobian in...
virtual const std::string & name() const
Get the name of the class.
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
const VariableGradient & _grad_v
Gradient of the concentration.
TensorValue< Real > RealTensorValue
virtual Real computeQpResidual() override
Compute this Kernel's contribution to the residual at the current quadrature point.
MatDiffusionBase(const InputParameters ¶meters)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
For coupling standard variables.
static InputParameters validParams()
This class template implements a diffusion kernel with a mobility that can vary spatially and can dep...
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...
std::vector< MooseVariableFieldBase * > _coupled_moose_vars
Vector of all coupled variables.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Interface class ("Veneer") to provide generator methods for derivative material property names...
const InputParameters & parameters() const
Get the parameters of the object.
unsigned int _surface_op_var
For solid-pore systems, mame of the order parameter identifies the solid-pore surface.
const bool _is_coupled
is the kernel used in a coupled form?
unsigned int _v_var
int label for the Concentration