12 #include "RankTwoTensor.h"
16 template <ComputeStage compute_stage>
21 params.addParam<std::string>(
"base_name",
22 "Optional parameter that allows the user to define "
23 "multiple mechanics material systems on the same "
24 "block, i.e. for multiple phases");
25 params.addRequiredParam<std::string>(
"eigenstrain_name",
26 "Material property name for the eigenstrain tensor computed "
27 "by this model. IMPORTANT: The name of this property must "
28 "also be provided to the strain calculator.");
29 params.addDeprecatedParam<
bool>(
32 "Should the eigenstrain be in incremental form (for incremental models)?",
33 "This parameter no longer has any effect. Simply remove it.");
37 template <ComputeStage compute_stage>
39 const InputParameters & parameters)
40 : ADMaterial<compute_stage>(parameters),
41 _base_name(isParamValid(
"base_name") ? getParam<std::string>(
"base_name") +
"_" :
""),
42 _eigenstrain_name(_base_name + getParam<std::string>(
"eigenstrain_name")),
43 _eigenstrain(declareADProperty<
RankTwoTensor>(_eigenstrain_name)),
44 _step_zero(declareRestartableData<bool>(
"step_zero", true))
48 template <ComputeStage compute_stage>
54 _eigenstrain[_qp].zero();
57 template <ComputeStage compute_stage>
68 computeQpEigenstrain();
71 template <ComputeStage compute_stage>
74 const ADReal volumetric_strain)
const
88 return std::log(volumetric_strain + 1.0) / 3.0;