23 "List of gamma material property names for each other order parameter. Place "
24 "in same order as order parameters (v)!");
31 _gamma_names(this->template getParam<
std::vector<MaterialPropertyName>>(
"gamma_names")),
32 _num_j(_gamma_names.size()),
36 if (_num_j != this->coupledComponents(
"v"))
39 "Need to pass in as many gamma_names as coupled variables in v in ACGrGrMulti");
41 for (
unsigned int n = 0; n < _num_j; ++n)
42 _prop_gammas[n] = &this->
template getGenericMaterialProperty<Real, is_ad>(_gamma_names[n]);
47 _uname(this->template getParam<NonlinearVariableName>(
"variable")),
48 _dmudu(this->template getMaterialPropertyDerivative<Real>(
"mu", _uname)),
49 _vname(this->template getParam<
std::vector<VariableName>>(
"v")),
52 for (
unsigned int n = 0; n < _num_j; ++n)
53 _dmudEtaj[n] = &this->
template getMaterialPropertyDerivative<Real>(
"mu", _vname[n]);
60 Real SumGammaEtaj = 0.0;
61 for (
const auto i : make_range(_op_num))
62 SumGammaEtaj += (*
_prop_gammas[i])[_qp] * (*_vals[i])[_qp] * (*_vals[i])[_qp];
74 Real d2f0du2 = 3.0 * _u[_qp] * _u[_qp] - 1.0 + 2.0 * SumGammaEtaj;
88 for (
const auto i : make_range(_op_num))
89 SumGammaEtaj += (*
_prop_gammas[i])[_qp] * (*_vals[i])[_qp] * (*_vals[i])[_qp];
97 for (
unsigned int i = 0; i < _op_num; ++i)
98 if (jvar == _vals_var[i])
101 const Real dSumGammaEtaj = 2.0 * (*
_prop_gammas[i])[_qp] * (*_vals[i])[_qp];
102 const Real dDFDOP = _mu[_qp] * 2.0 * _u[_qp] * dSumGammaEtaj;
104 return _L[_qp] * _test[_i][_qp] * _phi[_j][_qp] *
116 for (
const auto i : make_range(_op_num))
117 SumGammaEtaj += (*_prop_gammas[i])[_qp] * (*_vals[i])[_qp] * (*_vals[i])[_qp];
119 return _u[_qp] * _u[_qp] * _u[_qp] - _u[_qp] + 2.0 * _u[_qp] * SumGammaEtaj;
registerMooseObject("PhaseFieldApp", ACGrGrMulti)
typename std::conditional< is_ad, ADGrainGrowthBase, ACGrGrBase >::type ACGrGrMultiBase
This kernel calculates the residual for grain growth for a multi-phase, poly-crystal system.
DualNumber< Real, DNDerivativeType, true > ADReal
void mooseError(Args &&... args)
Moose::GenericType< Real, is_ad > GenericReal
ACGrGrMultiTempl(const InputParameters ¶meters)
static InputParameters validParams()
std::vector< const GenericMaterialProperty< Real, is_ad > * > _prop_gammas
Values of gammas for each order parameter.
GenericReal< is_ad > computedF0du()
virtual Real computeDFDOP(PFFunctionType type) override
const MaterialProperty< Real > & _dmudu
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
std::vector< const MaterialProperty< Real > * > _dmudEtaj
ACGrGrMulti(const InputParameters ¶meters)
virtual ADReal computeDFDOP() override