20 "The displacements appropriate for the simulation geometry and coordinate system");
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");
26 "volumetric_locking_correction",
false,
"Flag to correct volumetric locking");
27 params.
addParam<std::vector<MaterialPropertyName>>(
28 "eigenstrain_names", {},
"List of eigenstrains to be applied in this strain calculation");
29 params.
addParam<MaterialPropertyName>(
"global_strain",
30 "Optional material property holding a global strain "
31 "tensor applied to the mesh as a whole");
38 _ndisp(coupledComponents(
"displacements")),
39 _disp(coupledValues(
"displacements")),
40 _grad_disp(coupledGradients(
"displacements")),
41 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
42 _mechanical_strain(declareProperty<
RankTwoTensor>(_base_name +
"mechanical_strain")),
43 _total_strain(declareProperty<
RankTwoTensor>(_base_name +
"total_strain")),
44 _eigenstrain_names(getParam<
std::vector<MaterialPropertyName>>(
"eigenstrain_names")),
45 _eigenstrains(_eigenstrain_names.size()),
46 _global_strain(isParamValid(
"global_strain")
47 ? &getMaterialProperty<
RankTwoTensor>(_base_name +
"global_strain")
49 _volumetric_locking_correction(getParam<bool>(
"volumetric_locking_correction") &&
50 !isBoundaryMaterial()),
51 _current_elem_volume(_assembly.elemVolume())
60 _disp.resize(3, &_zero);
64 paramError(
"volumetric_locking_correction",
"has to be set to false for 1-D problems.");
66 if (getParam<bool>(
"use_displaced_mesh"))
67 paramError(
"use_displaced_mesh",
"The strain calculator needs to run on the undisplaced mesh.");
71 mooseWarning(
"Volumetric locking correction is not required for second order elements. Using "
72 "volumetric locking with second order elements could cause zigzag patterns in "
73 "stresses and strains.");
86 if (
_ndisp != _mesh.dimension())
89 "The number of variables supplied in 'displacements' must match the mesh dimension.");
void mooseWarning(Args &&... args)
std::vector< const VariableGradient * > _grad_disp
Gradient of displacements.
std::vector< const VariableValue * > _disp
Displacement variables.
MaterialProperty< RankTwoTensor > & _mechanical_strain
ComputeStrainBase(const InputParameters ¶meters)
unsigned int _ndisp
Coupled displacement variables.
virtual void initQpStatefulProperties() override
void initialSetup() override
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
std::vector< MaterialPropertyName > _eigenstrain_names
virtual void displacementIntegrityCheck()
const std::string _base_name
Base name of the material system.
MaterialProperty< RankTwoTensor > & _total_strain
static InputParameters validParams()
const bool _volumetric_locking_correction
static InputParameters validParams()