20 params.addClassDescription(
"Chemical potential from stress");
21 params.addRequiredParam<MaterialPropertyName>(
"property_name",
22 "Name of stress based chemical potential");
23 params.addRequiredParam<MaterialPropertyName>(
"stress_name",
"Name of stress property variable");
24 params.addRequiredParam<MaterialPropertyName>(
"direction_tensor_name",
25 "Name of direction tensor variable");
26 params.addRequiredParam<MaterialPropertyName>(
"prefactor_name",
"Name of prefactor variable");
27 params.addCoupledVar(
"c",
"Concentration variable");
32 : DerivativeMaterialInterface<Material>(parameters),
33 _chemical_potential(declareProperty<Real>(getParam<MaterialPropertyName>(
"property_name"))),
34 _stress_old(getMaterialPropertyOld<
RankTwoTensor>(
"stress_name")),
35 _direction_tensor(getMaterialProperty<RealTensorValue>(
"direction_tensor_name")),
36 _prefactor(getMaterialProperty<Real>(
"prefactor_name")),
37 _has_coupled_c(isCoupled(
"c"))
42 getParam<MaterialPropertyName>(
"property_name"), getVar(
"c", 0)->
name());
43 _dprefactor_dc = &getMaterialPropertyDerivative<Real>(
"prefactor_name", getVar(
"c", 0)->
name());
53 (*_dchemical_potential)[_qp] = 0.0;
64 (*_dchemical_potential)[_qp] =
65 -
_stress_old[_qp].doubleContraction(direction_tensor_rank_two) * (*_dprefactor_dc)[_qp];