11 #include "RankTwoTensor.h"
12 #include "MooseMesh.h"
22 params.addClassDescription(
"Computes the strain energy density using a combination of the "
23 "elastic and inelastic components of the strain increment, which is a "
24 "valid assumption for monotonic behavior.");
25 params.addParam<std::string>(
"base_name",
26 "Optional parameter that allows the user to define "
27 "multiple mechanics material systems on the same "
28 "block, i.e. for multiple phases");
29 params.addRequiredParam<
bool>(
30 "incremental",
"Flag to indicate whether an incremental or total model is being used.");
35 : DerivativeMaterialInterface<Material>(parameters),
36 _base_name(isParamValid(
"base_name") ? getParam<std::string>(
"base_name") +
"_" :
""),
37 _incremental(getParam<bool>(
"incremental")),
38 _strain_energy_density(declareProperty<Real>(_base_name +
"strain_energy_density")),
39 _strain_energy_density_old(getMaterialPropertyOld<Real>(_base_name +
"strain_energy_density")),
40 _stress(getMaterialProperty<
RankTwoTensor>(_base_name +
"stress")),
41 _stress_old(getMaterialPropertyOld<
RankTwoTensor>(_base_name +
"stress")),
42 _mechanical_strain(getMaterialProperty<
RankTwoTensor>(_base_name +
"mechanical_strain")),
43 _strain_increment(_incremental
44 ? &getMaterialProperty<
RankTwoTensor>(_base_name +
"strain_increment")
53 mooseError(
"StrainEnergyDensity: Specified incremental = false, but material model is "