12 #include "MooseMesh.h"
21 params.addClassDescription(
"Calculates the effective inelastic strain increment required to "
22 "return the isotropic stress state to a J2 yield surface. This class "
23 "is intended to be a parent class for classes with specific "
24 "constitutive models.");
26 params.addParam<Real>(
"max_inelastic_increment",
28 "The maximum inelastic strain increment allowed in a time step");
29 params.addRequiredParam<std::string>(
30 "effective_inelastic_strain_name",
31 "Name of the material property that stores the effective inelastic strain");
32 params.addParamNamesToGroup(
"effective_inelastic_strain_name",
"Advanced");
40 _effective_inelastic_strain(declareProperty<Real>(
41 _base_name + getParam<std::string>(
"effective_inelastic_strain_name"))),
42 _effective_inelastic_strain_old(getMaterialPropertyOld<Real>(
43 _base_name + getParam<std::string>(
"effective_inelastic_strain_name"))),
44 _max_inelastic_increment(parameters.get<Real>(
"max_inelastic_increment")),
46 _identity_symmetric_four(
RankFourTensor::initIdentitySymmetricFour),
47 _deviatoric_projection_four(_identity_symmetric_four -
48 _identity_two.outerProduct(_identity_two) / 3.0)
72 bool compute_full_tangent_operator,
77 RankTwoTensor deviatoric_trial_stress = stress_new.deviatoric();
80 Real dev_trial_stress_squared =
81 deviatoric_trial_stress.doubleContraction(deviatoric_trial_stress);
82 Real effective_trial_stress = std::sqrt(3.0 / 2.0 * dev_trial_stress_squared);
90 Real scalar_effective_inelastic_strain = 0.0;
91 if (!MooseUtils::absoluteFuzzyEqual(effective_trial_stress, 0.0))
93 returnMappingSolve(effective_trial_stress, scalar_effective_inelastic_strain, _console);
94 if (scalar_effective_inelastic_strain != 0.0)
95 inelastic_strain_increment =
96 deviatoric_trial_stress *
97 (1.5 * scalar_effective_inelastic_strain / effective_trial_stress);
99 inelastic_strain_increment.zero();
102 inelastic_strain_increment.zero();
104 strain_increment -= inelastic_strain_increment;
111 stress_new = elasticity_tensor * (strain_increment + elastic_strain_old);
115 if (compute_full_tangent_operator &&
118 if (MooseUtils::absoluteFuzzyEqual(scalar_effective_inelastic_strain, 0.0))
119 tangent_operator.zero();
131 const RankTwoTensor deviatoric_stress = stress_new.deviatoric();
132 const Real norm_dev_stress =
133 std::sqrt(deviatoric_stress.doubleContraction(deviatoric_stress));
134 mooseAssert(norm_dev_stress != 0.0,
"Norm of the deviatoric is zero");
136 const RankTwoTensor flow_direction = deviatoric_stress / norm_dev_stress;
137 const RankFourTensor flow_direction_dyad = flow_direction.outerProduct(flow_direction);
141 std::sqrt(1.5) / norm_dev_stress;
151 const Real scalar_effective_inelastic_strain)
165 Real scalar_inelastic_strain_incr;
167 scalar_inelastic_strain_incr =
169 if (MooseUtils::absoluteFuzzyEqual(scalar_inelastic_strain_incr, 0.0))
170 return std::numeric_limits<Real>::max();
177 const unsigned int total_it)
181 *iter_output <<
"At element " << _current_elem->id() <<
" _qp=" << _qp <<
" Coordinates "
182 << _q_point[_qp] <<
" block=" << _current_elem->subdomain_id() <<
'\n';