15#include "libmesh/int_range.h"
25 "The material objects to use to calculate stress and inelastic strains. "
26 "Note: specify creep models first and plasticity models second.");
35std::vector<MaterialName>
38 return getParam<std::vector<MaterialName>>(
"inelastic_models");
48 <<
"iteration output for ComputeMultipleInelasticStress solve:"
49 <<
" time=" << _t <<
" int_pt=" << _qp << std::endl;
51 Real l2norm_delta_stress;
52 Real first_l2norm_delta_stress = 1.0;
53 unsigned int counter = 0;
55 std::vector<RankTwoTensor> inelastic_strain_increment;
58 for (
const auto i_rmm : index_range(
_models))
59 inelastic_strain_increment[i_rmm].zero();
65 for (
const auto i_rmm : index_range(
_models))
75 elastic_strain_increment -= inelastic_strain_increment[j_rmm];
94 elastic_strain_increment,
95 inelastic_strain_increment[i_rmm],
107 if (
_stress[_qp](i, j) > stress_max(i, j))
108 stress_max(i, j) =
_stress[_qp](i, j);
109 else if (stress_min(i, j) >
_stress[_qp](i, j))
110 stress_min(i, j) =
_stress[_qp](i, j);
117 l2norm_delta_stress = (stress_max - stress_min).L2norm();
118 if (counter == 0 && l2norm_delta_stress > 0.0)
119 first_l2norm_delta_stress = l2norm_delta_stress;
123 _console <<
"stress iteration number = " << counter <<
"\n"
124 <<
" relative l2 norm delta stress = "
125 << (0 == first_l2norm_delta_stress ? 0
126 : l2norm_delta_stress / first_l2norm_delta_stress)
129 <<
" absolute l2 norm delta stress = " << l2norm_delta_stress <<
"\n"
139 throw MooseException(
"Max stress iteration hit during ComputeMultipleInelasticStress solve!");
141 combined_inelastic_strain_increment.zero();
143 combined_inelastic_strain_increment +=
146 if (_fe_problem.currentlyComputingJacobian())
registerMooseObject("SolidMechanicsApp", ComputeMultipleInelasticStress)
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.
const MaterialProperty< RankTwoTensor > & _stress_old
Old state of the stress tensor material property.
MaterialProperty< RankTwoTensor > & _stress
Stress material property.
ComputeMultipleInelasticStressBase computes the stress, the consistent tangent operator (or an approx...
static InputParameters validParams()
unsigned _num_models
number of plastic models
const bool _internal_solve_full_iteration_history
const Real _absolute_tolerance
const MaterialProperty< RankTwoTensor > & _strain_increment
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...
std::vector< Real > _inelastic_weights
_inelastic_strain = sum_i (_inelastic_weights_i * inelastic_strain_from_model_i)
std::vector< StressUpdateBase * > _models
The user supplied list of inelastic models to use in the simulation.
RankTwoTensor _undamaged_stress_old
MaterialProperty< Real > & _material_timestep_limit
virtual void computeAdmissibleState(unsigned model_number, RankTwoTensor &elastic_strain_increment, RankTwoTensor &inelastic_strain_increment, RankFourTensor &consistent_tangent_operator)
Given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment) let the model_n...
DamageBaseTempl< false > * _damage_model
Pointer to the damage model.
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
Strain tensors.
const unsigned int _max_iterations
Input parameters associated with the recompute iteration to return the stress state to the yield surf...
const Real _relative_tolerance
std::vector< RankFourTensor > _consistent_tangent_operator
the consistent tangent operators computed by each plastic model
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
virtual void computeQpJacobianMult()
Using _elasticity_tensor[_qp] and the consistent tangent operators, _consistent_tangent_operator[....
ComputeMultipleInelasticStress computes the stress, the consistent tangent operator (or an approximat...
virtual std::vector< MaterialName > getInelasticModelNames() override
ComputeMultipleInelasticStress(const InputParameters ¶meters)
virtual void updateQpState(RankTwoTensor &elastic_strain_increment, RankTwoTensor &combined_inelastic_strain_increment) override
Given the _strain_increment[_qp], iterate over all of the user-specified recompute materials in order...
static InputParameters validParams()
static constexpr std::size_t dim