ADComputeMultipleInelasticStress computes the stress and a decomposition of the strain into elastic and inelastic parts.
More...
#include <ADComputeMultipleInelasticStress.h>
|
virtual void | initQpStatefulProperties () override |
|
virtual void | computeQpStress () override |
|
virtual void | computeQpStressIntermediateConfiguration () |
| Compute the stress for the current QP, but do not rotate tensors from the intermediate configuration to the new configuration. More...
|
|
virtual void | finiteStrainRotation () |
| Rotate _elastic_strain, _stress, and _inelastic_strain to the new configuration. More...
|
|
virtual void | updateQpState (ADRankTwoTensor &elastic_strain_increment, ADRankTwoTensor &combined_inelastic_strain_increment) |
| Given the _strain_increment[_qp], iterate over all of the user-specified recompute materials in order to find an admissible stress (which is placed into _stress[_qp]) and set of inelastic strains. More...
|
|
virtual void | updateQpStateSingleModel (unsigned model_number, ADRankTwoTensor &elastic_strain_increment, ADRankTwoTensor &combined_inelastic_strain_increment) |
| An optimised version of updateQpState that gets used when the number of plastic models is unity, or when we're cycling through models Given the _strain_increment[_qp], find an admissible stress (which is put into _stress[_qp]) and inelastic strain. More...
|
|
virtual void | computeAdmissibleState (unsigned model_number, ADRankTwoTensor &elastic_strain_increment, ADRankTwoTensor &inelastic_strain_increment) |
| Given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment) let the model_number model produce an admissible stress (gets placed back in _stress[_qp]), and decompose the strain increment into an elastic part (gets placed back into elastic_strain_increment) and an inelastic part (inelastic_strain_increment). More...
|
|
| ADMaterialProperty (RankTwoTensor) &_inelastic_strain |
| The sum of the inelastic strains that come from the plastic models. More...
|
|
const | ADMaterialProperty (RankFourTensor) &_elasticity_tensor |
| Elasticity tensor material property. More...
|
|
virtual void | computeQpProperties () override |
|
bool | hasGuaranteedMaterialProperty (const MaterialPropertyName &prop, Guarantee guarantee) |
|
template<ComputeStage compute_stage>
class ADComputeMultipleInelasticStress< compute_stage >
ADComputeMultipleInelasticStress computes the stress and a decomposition of the strain into elastic and inelastic parts.
By default finite strains are assumed.
The elastic strain is calculated by subtracting the computed inelastic strain increment tensor from the mechanical strain tensor. Mechanical strain is considered as the sum of the elastic and inelastic (plastic, creep, ect) strains.
This material is used to call the recompute iterative materials of a number of specified inelastic models that inherit from ADStressUpdateBase. It iterates over the specified inelastic models until the change in stress is within a user-specified tolerance, in order to produce the stress and the elastic and inelastic strains for the time increment.
Definition at line 26 of file ADComputeMultipleInelasticStress.h.
◆ ADComputeMultipleInelasticStress()
template<ComputeStage compute_stage>
Definition at line 68 of file ADComputeMultipleInelasticStress.C.
76 _inelastic_strain(declareADProperty<RankTwoTensor>(
_base_name +
"combined_inelastic_strain")),
78 getMaterialPropertyOld<RankTwoTensor>(
_base_name +
"combined_inelastic_strain")),
79 _num_models(getParam<std::vector<MaterialName>>(
"inelastic_models").size()),
81 ? getParam<std::vector<Real>>(
"combined_inelastic_strain_weights")
87 paramError(
"combined_inelastic_strain_weights",
88 "must contain the same number of entries as inelastic_models ",
◆ ADMaterialProperty() [1/2]
template<ComputeStage compute_stage>
Elasticity tensor material property.
◆ ADMaterialProperty() [2/2]
template<ComputeStage compute_stage>
The sum of the inelastic strains that come from the plastic models.
◆ computeAdmissibleState()
template<ComputeStage compute_stage>
void ADComputeMultipleInelasticStress< compute_stage >::computeAdmissibleState |
( |
unsigned |
model_number, |
|
|
ADRankTwoTensor & |
elastic_strain_increment, |
|
|
ADRankTwoTensor & |
inelastic_strain_increment |
|
) |
| |
|
protectedvirtual |
Given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment) let the model_number model produce an admissible stress (gets placed back in _stress[_qp]), and decompose the strain increment into an elastic part (gets placed back into elastic_strain_increment) and an inelastic part (inelastic_strain_increment).
- Parameters
-
model_number | The inelastic model to use |
elastic_strain_increment | Upon input, this is the strain increment. Upon output, it is the elastic part of the strain increment |
inelastic_strain_increment | The inelastic strain increment corresponding to the supplied strain increment |
Definition at line 328 of file ADComputeMultipleInelasticStress.C.
333 _models[model_number]->updateState(elastic_strain_increment,
334 inelastic_strain_increment,
335 _rotation_increment[_qp],
338 _elasticity_tensor[_qp],
◆ computeQpProperties()
template<ComputeStage compute_stage>
|
overrideprotectedvirtualinherited |
◆ computeQpStress()
template<ComputeStage compute_stage>
◆ computeQpStressIntermediateConfiguration()
template<ComputeStage compute_stage>
Compute the stress for the current QP, but do not rotate tensors from the intermediate configuration to the new configuration.
Definition at line 140 of file ADComputeMultipleInelasticStress.C.
142 ADRankTwoTensor elastic_strain_increment;
143 ADRankTwoTensor combined_inelastic_strain_increment;
152 _stress[_qp] = _elasticity_tensor[_qp] * (
_elastic_strain_old[_qp] + _strain_increment[_qp]);
154 _stress[_qp] =
_stress_old[_qp] + _elasticity_tensor[_qp] * _strain_increment[_qp];
160 elastic_strain_increment,
161 combined_inelastic_strain_increment);
163 updateQpState(elastic_strain_increment, combined_inelastic_strain_increment);
◆ finiteStrainRotation()
template<ComputeStage compute_stage>
Rotate _elastic_strain, _stress, and _inelastic_strain to the new configuration.
Definition at line 172 of file ADComputeMultipleInelasticStress.C.
174 _elastic_strain[_qp] =
175 _rotation_increment[_qp] * _elastic_strain[_qp] * _rotation_increment[_qp].transpose();
176 _stress[_qp] = _rotation_increment[_qp] * _stress[_qp] * _rotation_increment[_qp].transpose();
177 _inelastic_strain[_qp] =
178 _rotation_increment[_qp] * _inelastic_strain[_qp] * _rotation_increment[_qp].transpose();
◆ hasGuaranteedMaterialProperty()
bool GuaranteeConsumer::hasGuaranteedMaterialProperty |
( |
const MaterialPropertyName & |
prop, |
|
|
Guarantee |
guarantee |
|
) |
| |
|
protectedinherited |
◆ initialSetup()
template<ComputeStage compute_stage>
Definition at line 104 of file ADComputeMultipleInelasticStress.C.
109 std::vector<MaterialName> models = getParam<std::vector<MaterialName>>(
"inelastic_models");
114 &this->
template getMaterialByName<compute_stage>(models[i]));
120 mooseError(
"Model " + models[i] +
121 " requires an isotropic elasticity tensor, but the one supplied is not "
122 "guaranteed isotropic");
125 mooseError(
"Model " + models[i] +
" is not compatible with ADComputeMultipleInelasticStress");
◆ initQpStatefulProperties()
template<ComputeStage compute_stage>
◆ updateQpState()
template<ComputeStage compute_stage>
void ADComputeMultipleInelasticStress< compute_stage >::updateQpState |
( |
ADRankTwoTensor & |
elastic_strain_increment, |
|
|
ADRankTwoTensor & |
combined_inelastic_strain_increment |
|
) |
| |
|
protectedvirtual |
Given the _strain_increment[_qp], iterate over all of the user-specified recompute materials in order to find an admissible stress (which is placed into _stress[_qp]) and set of inelastic strains.
- Parameters
-
elastic_strain_increment | The elastic part of _strain_increment[_qp] after the iterative process has converged |
combined_inelastic_strain_increment | The inelastic part of _strain_increment[_qp] after the iterative process has converged. This is a weighted sum of all the inelastic strains computed by all the plastic models during the Picard iterative scheme. The weights are dictated by the user using _inelastic_weights |
Definition at line 183 of file ADComputeMultipleInelasticStress.C.
189 _console << std::endl
190 <<
"iteration output for ADComputeMultipleInelasticStress solve:"
191 <<
" time=" << _t <<
" int_pt=" << _qp << std::endl;
193 Real l2norm_delta_stress;
194 Real first_l2norm_delta_stress = 1.0;
197 std::vector<ADRankTwoTensor> inelastic_strain_increment;
200 for (
unsigned i_rmm = 0; i_rmm <
_models.size(); ++i_rmm)
201 inelastic_strain_increment[i_rmm].zero();
203 ADRankTwoTensor stress_max, stress_min;
207 for (
unsigned i_rmm = 0; i_rmm <
_num_models; ++i_rmm)
212 elastic_strain_increment = _strain_increment[_qp];
215 for (
unsigned j_rmm = 0; j_rmm <
_num_models; ++j_rmm)
217 elastic_strain_increment -= inelastic_strain_increment[j_rmm];
224 _stress[_qp] =
_stress_old[_qp] + _elasticity_tensor[_qp] * elastic_strain_increment;
234 stress_max = _stress[_qp];
235 stress_min = _stress[_qp];
239 for (
unsigned int i = 0; i < LIBMESH_DIM; ++i)
241 for (
unsigned int j = 0; j < LIBMESH_DIM; ++j)
243 if (_stress[_qp](i, j) > stress_max(i, j))
244 stress_max(i, j) = _stress[_qp](i, j);
245 else if (stress_min(i, j) > _stress[_qp](i, j))
246 stress_min(i, j) = _stress[_qp](i, j);
255 l2norm_delta_stress = MetaPhysicL::raw_value((stress_max - stress_min).
L2norm());
256 if (
counter == 0 && l2norm_delta_stress > 0.0)
257 first_l2norm_delta_stress = l2norm_delta_stress;
261 _console <<
"stress iteration number = " <<
counter <<
"\n"
262 <<
" relative l2 norm delta stress = "
263 << (0 == first_l2norm_delta_stress ? 0
264 : l2norm_delta_stress / first_l2norm_delta_stress)
267 <<
" absolute l2 norm delta stress = " << l2norm_delta_stress <<
"\n"
278 "In ", _name,
": Max stress iteration hit during ADComputeMultipleInelasticStress solve!");
280 combined_inelastic_strain_increment.zero();
281 for (
unsigned i_rmm = 0; i_rmm <
_num_models; ++i_rmm)
282 combined_inelastic_strain_increment +=
286 for (
unsigned i_rmm = 0; i_rmm <
_num_models; ++i_rmm)
◆ updateQpStateSingleModel()
template<ComputeStage compute_stage>
void ADComputeMultipleInelasticStress< compute_stage >::updateQpStateSingleModel |
( |
unsigned |
model_number, |
|
|
ADRankTwoTensor & |
elastic_strain_increment, |
|
|
ADRankTwoTensor & |
combined_inelastic_strain_increment |
|
) |
| |
|
protectedvirtual |
An optimised version of updateQpState that gets used when the number of plastic models is unity, or when we're cycling through models Given the _strain_increment[_qp], find an admissible stress (which is put into _stress[_qp]) and inelastic strain.
- Parameters
-
model_number | Use this model number |
elastic_strain_increment | The elastic part of _strain_increment[_qp] |
combined_inelastic_strain_increment | The inelastic part of _strain_increment[_qp] |
Definition at line 297 of file ADComputeMultipleInelasticStress.C.
305 elastic_strain_increment = _strain_increment[_qp];
310 _stress[_qp] = _elasticity_tensor[_qp] * (
_elastic_strain_old[_qp] + elastic_strain_increment);
312 _stress[_qp] =
_stress_old[_qp] + _elasticity_tensor[_qp] * elastic_strain_increment;
315 model_number, elastic_strain_increment, combined_inelastic_strain_increment);
321 for (
unsigned i_rmm = 0; i_rmm <
_num_models; ++i_rmm)
322 if (i_rmm != model_number)
323 _models[i_rmm]->propagateQpStatefulProperties();
◆ validParams()
template<ComputeStage compute_stage>
Definition at line 20 of file ADComputeMultipleInelasticStress.C.
23 params.addClassDescription(
"Compute state (stress and internal parameters such as plastic "
24 "strains and internal parameters) using an iterative process. "
25 "Combinations of creep models and plastic models may be used.");
26 params.addParam<
unsigned int>(
"max_iterations",
28 "Maximum number of the stress update "
29 "iterations over the stress change after all "
30 "update materials are called");
31 params.addParam<Real>(
"relative_tolerance",
33 "Relative convergence tolerance for the stress "
34 "update iterations over the stress change "
35 "after all update materials are called");
36 params.addParam<Real>(
"absolute_tolerance",
38 "Absolute convergence tolerance for the stress "
39 "update iterations over the stress change "
40 "after all update materials are called");
41 params.addParam<
bool>(
42 "internal_solve_full_iteration_history",
44 "Set to true to output stress update iteration information over the stress change");
45 params.addParam<
bool>(
"perform_finite_strain_rotations",
47 "Tensors are correctly rotated in "
48 "finite-strain simulations. For "
49 "optimal performance you can set "
50 "this to 'false' if you are only "
51 "ever using small strains");
52 params.addRequiredParam<std::vector<MaterialName>>(
54 "The material objects to use to calculate stress and inelastic strains. "
55 "Note: specify creep models first and plasticity models second.");
56 params.addParam<std::vector<Real>>(
"combined_inelastic_strain_weights",
57 "The combined_inelastic_strain Material Property is a "
58 "weighted sum of the model inelastic strains. This parameter "
59 "is a vector of weights, of the same length as "
60 "inelastic_models. Default = '1 1 ... 1'. This "
61 "parameter is set to 1 if the number of models = 1");
62 params.addParam<
bool>(
63 "cycle_models",
false,
"At time step N use only inelastic model N % num_models.");
Referenced by ADComputeMultiplePorousInelasticStress< compute_stage >::validParams().
◆ _absolute_tolerance
template<ComputeStage compute_stage>
◆ _base_name
template<ComputeStage compute_stage>
◆ _cycle_models
template<ComputeStage compute_stage>
◆ _elastic_strain_old
template<ComputeStage compute_stage>
◆ _elasticity_tensor_name
template<ComputeStage compute_stage>
◆ _extra_stresses
template<ComputeStage compute_stage>
◆ _gc_block_restrict
BlockRestrictable* const GuaranteeConsumer::_gc_block_restrict |
|
privateinherited |
◆ _gc_feproblem
FEProblemBase* const GuaranteeConsumer::_gc_feproblem |
|
privateinherited |
◆ _gc_params
const InputParameters& GuaranteeConsumer::_gc_params |
|
privateinherited |
◆ _inelastic_strain_old
template<ComputeStage compute_stage>
◆ _inelastic_weights
template<ComputeStage compute_stage>
◆ _initial_stress_fcn
template<ComputeStage compute_stage>
◆ _internal_solve_full_iteration_history
template<ComputeStage compute_stage>
◆ _is_elasticity_tensor_guaranteed_isotropic
template<ComputeStage compute_stage>
◆ _matl_timestep_limit
template<ComputeStage compute_stage>
◆ _max_iterations
template<ComputeStage compute_stage>
◆ _models
template<ComputeStage compute_stage>
The user supplied list of inelastic models to use in the simulation.
Users should take care to list creep models first and plasticity models last to allow for the case when a creep model relaxes the stress state inside of the yield surface in an iteration.
Definition at line 159 of file ADComputeMultipleInelasticStress.h.
◆ _num_models
template<ComputeStage compute_stage>
◆ _perform_finite_strain_rotations
template<ComputeStage compute_stage>
◆ _relative_tolerance
template<ComputeStage compute_stage>
◆ _stress_old
template<ComputeStage compute_stage>
◆ usingComputeFiniteStrainElasticStressMembers
template<ComputeStage compute_stage>
◆ usingComputeStressBaseMembers
template<ComputeStage compute_stage>
◆ usingMaterialMembers
template<ComputeStage compute_stage>
The documentation for this class was generated from the following files:
const Real _absolute_tolerance
const Real _relative_tolerance
std::vector< ADStressUpdateBase< compute_stage > * > _models
The user supplied list of inelastic models to use in the simulation.
virtual void computeAdmissibleState(unsigned model_number, ADRankTwoTensor &elastic_strain_increment, ADRankTwoTensor &inelastic_strain_increment)
Given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment) let the model_n...
const MaterialProperty< RankTwoTensor > & _stress_old
const std::string _base_name
virtual void finiteStrainRotation()
Rotate _elastic_strain, _stress, and _inelastic_strain to the new configuration.
virtual void initQpStatefulProperties() override
BlockRestrictable *const _gc_block_restrict
Access block restrictions of the object with this interface.
const unsigned _num_models
number of plastic models
FEProblemBase *const _gc_feproblem
Reference to the FEProblemBase class.
virtual void updateQpState(ADRankTwoTensor &elastic_strain_increment, ADRankTwoTensor &combined_inelastic_strain_increment)
Given the _strain_increment[_qp], iterate over all of the user-specified recompute materials in order...
ADComputeFiniteStrainElasticStress computes the stress following elasticity theory for finite strains...
const std::string _elasticity_tensor_name
Name of the elasticity tensor material property.
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
The old elastic strain is used to calculate the old stress in the case of variable elasticity tensors...
ADStressUpdateBase is a material that is not called by MOOSE because of the compute=false flag set in...
const MaterialProperty< RankTwoTensor > & _inelastic_strain_old
old value of inelastic strain
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, and inelastic_strain using _rotation_incremen...
const bool _internal_solve_full_iteration_history
bool hasGuaranteedMaterialProperty(const MaterialPropertyName &prop, Guarantee guarantee)
virtual bool requiresIsotropicTensor()=0
Does the model require the elasticity tensor to be isotropic?
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
std::vector< const MaterialProperty< RankTwoTensor > * > _extra_stresses
Extra stress tensors.
MaterialProperty< Real > & _matl_timestep_limit
const std::vector< Real > _inelastic_weights
_inelastic_strain = sum_i (_inelastic_weights_i * inelastic_strain_from_model_i)
virtual void computeQpStress()=0
virtual void updateQpStateSingleModel(unsigned model_number, ADRankTwoTensor &elastic_strain_increment, ADRankTwoTensor &combined_inelastic_strain_increment)
An optimised version of updateQpState that gets used when the number of plastic models is unity,...
virtual void computeQpStressIntermediateConfiguration()
Compute the stress for the current QP, but do not rotate tensors from the intermediate configuration ...
const bool _cycle_models
whether to cycle through the models, using only one model per timestep
static InputParameters validParams()
const unsigned int _max_iterations
Input parameters associated with the recompute iteration to return the stress state to the yield surf...