21 "Coupled time derivative Kernel that multiplies the time derivative by " 22 "$\\frac{dh_\\alpha}{d\\eta_i} F_\\alpha + \\frac{dh_\\beta}{d\\eta_i} F_\\beta + \\dots$");
24 "Fj_names",
"List of functions for each phase. Place in same order as hj_names!");
26 "hj_names",
"Switching Function Materials that provide h. Place in same order as Fj_names!");
27 params.
addCoupledVar(
"args",
"Vector of variable arguments of Fj and hj");
36 _v_name(this->coupledName(
"v", 0)),
37 _Fj_names(this->template getParam<
std::vector<MaterialPropertyName>>(
"Fj_names")),
38 _num_j(_Fj_names.size()),
40 _hj_names(this->template getParam<
std::vector<MaterialPropertyName>>(
"hj_names")),
41 _prop_dhjdetai(_num_j)
45 this->paramError(
"hj_names",
"Need to pass in as many hj_names as Fj_names");
48 for (
unsigned int n = 0; n <
_num_j; ++n)
51 _prop_Fj[n] = &this->
template getGenericMaterialProperty<Real, is_ad>(
_Fj_names[n]);
55 &this->
template getMaterialPropertyDerivative<Real, is_ad>(
_hj_names[n],
_v_name);
62 _prop_dFjdarg(_num_j),
63 _prop_d2hjdetai2(_num_j),
64 _prop_d2hjdetaidarg(_num_j)
67 for (
unsigned int n = 0; n <
_num_j; ++n)
77 for (
unsigned int i = 0; i < _n_args; ++i)
92 for (
unsigned int n = 0; n < _num_j; ++n)
100 for (
unsigned int n = 0; n <
_num_j; ++n)
101 validateNonlinearCoupling<Real>(
_Fj_names[n]);
108 for (
unsigned int n = 0; n <
_num_j; ++n)
118 for (
unsigned int n = 0; n <
_num_j; ++n)
121 return _v_dot[_qp] * sum;
128 for (
unsigned int n = 0; n <
_num_j; ++n)
138 const unsigned int cvar = mapJvarToCvar(jvar);
144 for (
unsigned int n = 0; n <
_num_j; ++n)
149 return _phi[_j][_qp] * sum * _test[_i][_qp];
153 for (
unsigned int n = 0; n <
_num_j; ++n)
virtual ADReal precomputeQpResidual() override
std::vector< MaterialPropertyName > _hj_names
switching function names
CoupledSwitchingTimeDerivativeTempl(const InputParameters ¶meters)
std::vector< MaterialPropertyName > _Fj_names
Names of functions for each phase .
std::vector< const GenericMaterialProperty< Real, is_ad > * > _prop_dhjdetai
Derivatives of the switching functions wrt the order parameter for this kernel.
virtual Real computeQpJacobian() override
registerMooseObject("PhaseFieldApp", CoupledSwitchingTimeDerivative)
static InputParameters validParams()
std::vector< const MaterialProperty< Real > * > _prop_dFjdv
Derivatives of the functions wrt the nonlinear variable for this kernel.
virtual void initialSetup() override
CoupledSwitchingTimeDerivative(const InputParameters ¶meters)
virtual void initialSetup() override
InputParameters validParams()
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidarg
Second derivatives of the switching functions (needed for off-diagonal Jacobians) ...
virtual Real computeQpResidual() override
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_dFjdarg
Derivatives of the functions (needed for off-diagonal Jacobians)
typename std::conditional< is_ad, ADCoupledTimeDerivative, CoupledTimeDerivative >::type CoupledSwitchingTimeDerivativeBase
This kernel adds a contribution where are the phases, are the switching functions, is the order parameter that is the nonlinear variable, is time, and are functions for each phase.
std::vector< const GenericMaterialProperty< Real, is_ad > * > _prop_Fj
Values of the functions for each phase .
const unsigned int _num_j
Number of phases.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableName _v_name
name of order parameter that derivatives are taken wrt (needed to retrieve the derivative material pr...
typename Moose::GenericType< Real, is_ad > GenericReal
std::vector< const MaterialProperty< Real > * > _prop_d2hjdetai2
Second derivatives of the switching functions wrt the order parameter for this kernel.
virtual Real computeQpResidual() override