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.
addParam<std::string>(
"stress_name",
31 "Optional parameter that allows the user to use " 32 "different stresses on the same material system. " 33 "For example, when we have a degraded_stress and an intact_stress, " 34 "we want to compute the degraded strain energy density and " 35 "the intact strain energy density.");
38 "Optional flag for error checking if an incremental or total model should be used.");
45 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
46 _stress_name(getParam<
std::string>(
"stress_name")),
47 _strain_energy_density(declareProperty<
Real>(_base_name +
"strain_energy_density")),
48 _strain_energy_density_old(getMaterialPropertyOld<
Real>(_base_name +
"strain_energy_density")),
49 _stress(getGenericMaterialProperty<
RankTwoTensor, is_ad>(_base_name + _stress_name)),
50 _stress_old(getMaterialPropertyOld<
RankTwoTensor>(_base_name + _stress_name)),
52 getGenericMaterialProperty<
RankTwoTensor, is_ad>(_base_name +
"mechanical_strain")),
54 getGenericOptionalMaterialProperty<
RankTwoTensor, is_ad>(_base_name +
"strain_increment"))
63 if (isParamValid(
"incremental"))
65 auto incremental = getParam<bool>(
"incremental");
66 if (incremental && !_strain_increment)
67 mooseError(
"StrainEnergyDensity: Specified incremental = true, but material model is " 69 if (!incremental && _strain_increment)
70 mooseError(
"StrainEnergyDensity: Specified incremental = false, but material model is " 78 _strain_energy_density[_qp] = 0.0;
86 if (_strain_increment)
87 _strain_energy_density[_qp] =
88 _strain_energy_density_old[_qp] +
94 _strain_energy_density[_qp] =
virtual void computeQpProperties() override
void mooseError(Args &&... args)
virtual void initialSetup() override
StrainEnergyDensity calculates the strain energy density.
static InputParameters validParams()
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void initQpStatefulProperties() override
StrainEnergyDensityTempl(const InputParameters ¶meters)
registerMooseObject("SolidMechanicsApp", StrainEnergyDensity)