www.mooseframework.org
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ComputeMultipleInelasticCosseratStress Class Reference

ComputeMultipleInelasticStress computes the stress, the consistent tangent operator (or an approximation to it), and a decomposition of the strain into elastic and inelastic parts. More...

#include <ComputeMultipleInelasticCosseratStress.h>

Inheritance diagram for ComputeMultipleInelasticCosseratStress:
[legend]

Public Member Functions

 ComputeMultipleInelasticCosseratStress (const InputParameters &parameters)
 

Protected Types

enum  TangentOperatorEnum { TangentOperatorEnum::elastic, TangentOperatorEnum::nonlinear }
 what sort of Tangent operator to calculate More...
 

Protected Member Functions

virtual void initQpStatefulProperties () override
 
virtual void computeQpStress () override
 
virtual void computeQpJacobianMult () override
 Using _elasticity_tensor[_qp] and the consistent tangent operators, _consistent_tangent_operator[...] computed by the inelastic models, compute _Jacobian_mult[_qp]. More...
 
virtual void computeAdmissibleState (unsigned model_number, RankTwoTensor &elastic_strain_increment, RankTwoTensor &inelastic_strain_increment, RankFourTensor &consistent_tangent_operator) override
 The current Cosserat models do not know they might be using the "host" version of the elasticity tensor during the return-map process. More...
 
virtual void initialSetup () 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 (const bool force_elasticity_rotation=false)
 Rotate _elastic_strain, _stress, _inelastic_strain, and _Jacobian_mult to the new configuration. More...
 
virtual void updateQpState (RankTwoTensor &elastic_strain_increment, RankTwoTensor &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, as well as the tangent operator (which is placed into _Jacobian_mult[_qp]). More...
 
virtual void updateQpStateSingleModel (unsigned model_number, RankTwoTensor &elastic_strain_increment, RankTwoTensor &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, as well as the tangent operator (which is placed into _Jacobian_mult[_qp]) More...
 
virtual void computeQpProperties () override
 
bool hasGuaranteedMaterialProperty (const MaterialPropertyName &prop, Guarantee guarantee)
 

Protected Attributes

const MaterialProperty< RankTwoTensor > & _curvature
 The Cosserat curvature strain. More...
 
const MaterialProperty< RankFourTensor > & _elastic_flexural_rigidity_tensor
 The Cosserat elastic flexural rigidity tensor. More...
 
MaterialProperty< RankTwoTensor > & _couple_stress
 the Cosserat couple-stress More...
 
const MaterialProperty< RankTwoTensor > & _couple_stress_old
 the old value of Cosserat couple-stress More...
 
MaterialProperty< RankFourTensor > & _Jacobian_mult_couple
 derivative of couple-stress w.r.t. curvature More...
 
const MaterialProperty< RankFourTensor > & _compliance
 Inverse of the elasticity tensor. More...
 
const bool _perform_finite_strain_rotations
 after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rotation_increment More...
 
MaterialProperty< RankTwoTensor > & _inelastic_strain
 The sum of the inelastic strains that come from the plastic models. More...
 
const MaterialProperty< RankTwoTensor > & _inelastic_strain_old
 old value of inelastic strain More...
 
enum ComputeMultipleInelasticStress::TangentOperatorEnum _tangent_operator_type
 
const unsigned _num_models
 number of plastic models More...
 
std::vector< bool > _tangent_computation_flag
 Flags to compute tangent during updateState call. More...
 
TangentCalculationMethod _tangent_calculation_method
 Calculation method for the tangent modulus. More...
 
const std::vector< Real > _inelastic_weights
 _inelastic_strain = sum_i (_inelastic_weights_i * inelastic_strain_from_model_i) More...
 
std::vector< RankFourTensor > _consistent_tangent_operator
 the consistent tangent operators computed by each plastic model More...
 
const bool _cycle_models
 whether to cycle through the models, using only one model per timestep More...
 
MaterialProperty< Real > & _matl_timestep_limit
 
const RankFourTensor _identity_symmetric_four
 Rank four symmetric identity tensor. More...
 
std::vector< StressUpdateBase * > _models
 The user supplied list of inelastic models to use in the simulation. More...
 
bool _is_elasticity_tensor_guaranteed_isotropic
 is the elasticity tensor guaranteed to be isotropic? More...
 
const MaterialProperty< RankTwoTensor > & _rotation_increment
 
const MaterialProperty< RankTwoTensor > & _stress_old
 
const std::string _base_name
 
const std::string _elasticity_tensor_name
 
const MaterialProperty< RankTwoTensor > & _mechanical_strain
 
MaterialProperty< RankTwoTensor > & _stress
 
MaterialProperty< RankTwoTensor > & _elastic_strain
 
const MaterialProperty< RankTwoTensor > & _extra_stress
 Extra stress tensor. More...
 
std::vector< Function * > _initial_stress_fcn
 initial stress components More...
 
MaterialProperty< RankFourTensor > & _Jacobian_mult
 derivative of stress w.r.t. strain (_dstress_dstrain) More...
 
const unsigned int _max_iterations
 Input parameters associated with the recompute iteration to return the stress state to the yield surface. More...
 
const Real _relative_tolerance
 
const Real _absolute_tolerance
 
const bool _internal_solve_full_iteration_history
 
const MaterialProperty< RankFourTensor > & _elasticity_tensor
 Rank-4 and Rank-2 elasticity and elastic strain tensors. More...
 
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
 
const MaterialProperty< RankTwoTensor > & _strain_increment
 

Detailed Description

ComputeMultipleInelasticStress computes the stress, the consistent tangent operator (or an approximation to it), and a decomposition of the strain into elastic and inelastic parts.

By default finite strains are assumed.

Cosserat couple-stress, and the cosserat version of the consistent tangent operator are also computed, but only using Cosserat elasticity.

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 StressUpdateBase. It iterates over the specified inelastic models until the change in stress is within a user-specified tolerance, in order to produce the stress, the consistent tangent operator and the elastic and inelastic strains for the time increment.

Definition at line 39 of file ComputeMultipleInelasticCosseratStress.h.

Member Enumeration Documentation

◆ TangentOperatorEnum

what sort of Tangent operator to calculate

Enumerator
elastic 
nonlinear 

Definition at line 141 of file ComputeMultipleInelasticStress.h.

141 { elastic, nonlinear } _tangent_operator_type;
enum ComputeMultipleInelasticStress::TangentOperatorEnum _tangent_operator_type

Constructor & Destructor Documentation

◆ ComputeMultipleInelasticCosseratStress()

ComputeMultipleInelasticCosseratStress::ComputeMultipleInelasticCosseratStress ( const InputParameters &  parameters)

Definition at line 27 of file ComputeMultipleInelasticCosseratStress.C.

29  : ComputeMultipleInelasticStress(parameters),
30  _curvature(getMaterialProperty<RankTwoTensor>("curvature")),
32  getMaterialProperty<RankFourTensor>("elastic_flexural_rigidity_tensor")),
33  _couple_stress(declareProperty<RankTwoTensor>("couple_stress")),
34  _couple_stress_old(getMaterialPropertyOld<RankTwoTensor>("couple_stress")),
35  _Jacobian_mult_couple(declareProperty<RankFourTensor>("couple_Jacobian_mult")),
36  _compliance(getMaterialProperty<RankFourTensor>(_base_name + "compliance_tensor"))
37 {
38 }
const MaterialProperty< RankFourTensor > & _compliance
Inverse of the elasticity tensor.
const MaterialProperty< RankTwoTensor > & _curvature
The Cosserat curvature strain.
const MaterialProperty< RankFourTensor > & _elastic_flexural_rigidity_tensor
The Cosserat elastic flexural rigidity tensor.
MaterialProperty< RankFourTensor > & _Jacobian_mult_couple
derivative of couple-stress w.r.t. curvature
MaterialProperty< RankTwoTensor > & _couple_stress
the Cosserat couple-stress
const MaterialProperty< RankTwoTensor > & _couple_stress_old
the old value of Cosserat couple-stress
const std::string _base_name
ComputeMultipleInelasticStress(const InputParameters &parameters)

Member Function Documentation

◆ computeAdmissibleState()

void ComputeMultipleInelasticCosseratStress::computeAdmissibleState ( unsigned  model_number,
RankTwoTensor &  elastic_strain_increment,
RankTwoTensor &  inelastic_strain_increment,
RankFourTensor &  consistent_tangent_operator 
)
overrideprotectedvirtual

The current Cosserat models do not know they might be using the "host" version of the elasticity tensor during the return-map process.

Therefore, they compute the incorrect elastic/inelastic strain decomposition. Overriding this method allows the correction to be made.

Reimplemented from ComputeMultipleInelasticStress.

Definition at line 79 of file ComputeMultipleInelasticCosseratStress.C.

84 {
85  const RankTwoTensor trial_stress = _stress[_qp];
86  const RankTwoTensor applied_strain_increment = elastic_strain_increment;
87 
89  elastic_strain_increment,
90  inelastic_strain_increment,
91  consistent_tangent_operator);
92 
93  inelastic_strain_increment = _compliance[_qp] * (trial_stress - _stress[_qp]);
94  elastic_strain_increment = applied_strain_increment - inelastic_strain_increment;
95 }
const MaterialProperty< RankFourTensor > & _compliance
Inverse of the elasticity tensor.
MaterialProperty< RankTwoTensor > & _stress
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...

◆ computeQpJacobianMult()

void ComputeMultipleInelasticCosseratStress::computeQpJacobianMult ( )
overrideprotectedvirtual

Using _elasticity_tensor[_qp] and the consistent tangent operators, _consistent_tangent_operator[...] computed by the inelastic models, compute _Jacobian_mult[_qp].

Reimplemented from ComputeMultipleInelasticStress.

Definition at line 65 of file ComputeMultipleInelasticCosseratStress.C.

66 {
69  else
70  {
72  for (unsigned i_rmm = 1; i_rmm < _num_models; ++i_rmm)
73  _Jacobian_mult[_qp] =
75  }
76 }
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
std::vector< RankFourTensor > _consistent_tangent_operator
the consistent tangent operators computed by each plastic model
const MaterialProperty< RankFourTensor > & _compliance
Inverse of the elasticity tensor.
const unsigned _num_models
number of plastic models
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
enum ComputeMultipleInelasticStress::TangentOperatorEnum _tangent_operator_type

◆ computeQpProperties()

void ComputeStressBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Definition at line 51 of file ComputeStressBase.C.

52 {
54 
55  // Add in extra stress
56  _stress[_qp] += _extra_stress[_qp];
57 }
virtual void computeQpStress()=0
MaterialProperty< RankTwoTensor > & _stress
const MaterialProperty< RankTwoTensor > & _extra_stress
Extra stress tensor.

◆ computeQpStress()

void ComputeMultipleInelasticCosseratStress::computeQpStress ( )
overrideprotectedvirtual

Reimplemented from ComputeMultipleInelasticStress.

Definition at line 48 of file ComputeMultipleInelasticCosseratStress.C.

49 {
51 
53  if (_fe_problem.currentlyComputingJacobian())
55 
57  {
58  _couple_stress[_qp] =
59  _rotation_increment[_qp] * _couple_stress[_qp] * _rotation_increment[_qp].transpose();
61  }
62 }
const MaterialProperty< RankTwoTensor > & _rotation_increment
const MaterialProperty< RankTwoTensor > & _curvature
The Cosserat curvature strain.
const MaterialProperty< RankFourTensor > & _elastic_flexural_rigidity_tensor
The Cosserat elastic flexural rigidity tensor.
MaterialProperty< RankFourTensor > & _Jacobian_mult_couple
derivative of couple-stress w.r.t. curvature
MaterialProperty< RankTwoTensor > & _couple_stress
the Cosserat couple-stress
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...

◆ computeQpStressIntermediateConfiguration()

void ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration ( )
protectedvirtualinherited

Compute the stress for the current QP, but do not rotate tensors from the intermediate configuration to the new configuration.

Definition at line 182 of file ComputeMultipleInelasticStress.C.

Referenced by ComputeSmearedCrackingStress::computeQpStress(), and ComputeMultipleInelasticStress::computeQpStress().

183 {
184  RankTwoTensor elastic_strain_increment;
185  RankTwoTensor combined_inelastic_strain_increment;
186 
187  if (_num_models == 0)
188  {
190 
191  // If the elasticity tensor values have changed and the tensor is isotropic,
192  // use the old strain to calculate the old stress
195  else
196  _stress[_qp] = _stress_old[_qp] + _elasticity_tensor[_qp] * _strain_increment[_qp];
197 
198  if (_fe_problem.currentlyComputingJacobian())
200  }
201  else
202  {
203  if (_num_models == 1 || _cycle_models)
204  updateQpStateSingleModel((_t_step - 1) % _num_models,
205  elastic_strain_increment,
206  combined_inelastic_strain_increment);
207  else
208  updateQpState(elastic_strain_increment, combined_inelastic_strain_increment);
209 
210  _elastic_strain[_qp] = _elastic_strain_old[_qp] + elastic_strain_increment;
211  _inelastic_strain[_qp] = _inelastic_strain_old[_qp] + combined_inelastic_strain_increment;
212  }
213 }
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
const MaterialProperty< RankTwoTensor > & _strain_increment
virtual void updateQpState(RankTwoTensor &elastic_strain_increment, RankTwoTensor &combined_inelastic_strain_increment)
Given the _strain_increment[_qp], iterate over all of the user-specified recompute materials in order...
MaterialProperty< RankTwoTensor > & _stress
const MaterialProperty< RankTwoTensor > & _inelastic_strain_old
old value of inelastic strain
virtual void updateQpStateSingleModel(unsigned model_number, RankTwoTensor &elastic_strain_increment, RankTwoTensor &combined_inelastic_strain_increment)
An optimised version of updateQpState that gets used when the number of plastic models is unity...
const bool _cycle_models
whether to cycle through the models, using only one model per timestep
const unsigned _num_models
number of plastic models
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
const MaterialProperty< RankTwoTensor > & _stress_old
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...
MaterialProperty< RankTwoTensor > & _elastic_strain
MaterialProperty< RankTwoTensor > & _inelastic_strain
The sum of the inelastic strains that come from the plastic models.

◆ finiteStrainRotation()

void ComputeMultipleInelasticStress::finiteStrainRotation ( const bool  force_elasticity_rotation = false)
protectedvirtualinherited

Rotate _elastic_strain, _stress, _inelastic_strain, and _Jacobian_mult to the new configuration.

Parameters
force_elasticity_rotationForce the elasticity tensor to be rotated, even if it is not deemed necessary.

Definition at line 216 of file ComputeMultipleInelasticStress.C.

Referenced by ComputeSmearedCrackingStress::computeQpStress(), and ComputeMultipleInelasticStress::computeQpStress().

217 {
218  _elastic_strain[_qp] =
219  _rotation_increment[_qp] * _elastic_strain[_qp] * _rotation_increment[_qp].transpose();
220  _stress[_qp] = _rotation_increment[_qp] * _stress[_qp] * _rotation_increment[_qp].transpose();
221  _inelastic_strain[_qp] =
222  _rotation_increment[_qp] * _inelastic_strain[_qp] * _rotation_increment[_qp].transpose();
223  if (force_elasticity_rotation ||
226  _Jacobian_mult[_qp].rotate(_rotation_increment[_qp]);
227 }
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
const MaterialProperty< RankTwoTensor > & _rotation_increment
MaterialProperty< RankTwoTensor > & _stress
TangentCalculationMethod _tangent_calculation_method
Calculation method for the tangent modulus.
const unsigned _num_models
number of plastic models
MaterialProperty< RankTwoTensor > & _elastic_strain
MaterialProperty< RankTwoTensor > & _inelastic_strain
The sum of the inelastic strains that come from the plastic models.

◆ hasGuaranteedMaterialProperty()

bool GuaranteeConsumer::hasGuaranteedMaterialProperty ( const MaterialPropertyName &  prop,
Guarantee  guarantee 
)
protectedinherited

Definition at line 28 of file GuaranteeConsumer.C.

Referenced by ComputeFiniteStrainElasticStress::initialSetup(), ComputeSmearedCrackingStress::initialSetup(), and ComputeMultipleInelasticStress::initialSetup().

30 {
31  if (!_gc_feproblem->startedInitialSetup())
32  mooseError("hasGuaranteedMaterialProperty() needs to be called in initialSetup()");
33 
34  // Reference to MaterialWarehouse for testing and retrieving block ids
35  const auto & warehouse = _gc_feproblem->getMaterialWarehouse();
36 
37  // Complete set of ids that this object is active
38  const auto & ids = (_gc_block_restrict && _gc_block_restrict->blockRestricted())
39  ? _gc_block_restrict->blockIDs()
40  : _gc_feproblem->mesh().meshSubdomains();
41 
42  // Loop over each id for this object
43  for (const auto & id : ids)
44  {
45  // If block materials exist, look if any issue the required guarantee
46  if (warehouse.hasActiveBlockObjects(id))
47  {
48  const std::vector<std::shared_ptr<Material>> & mats = warehouse.getActiveBlockObjects(id);
49  for (const auto & mat : mats)
50  {
51  const auto & mat_props = mat->getSuppliedItems();
52  if (mat_props.count(prop_name))
53  {
54  auto guarantee_mat = dynamic_cast<GuaranteeProvider *>(mat.get());
55  if (guarantee_mat && !guarantee_mat->hasGuarantee(prop_name, guarantee))
56  {
57  // we found at least one material on the set of block we operate on
58  // that does _not_ provide the requested guarantee
59  return false;
60  }
61  }
62  }
63  }
64  }
65 
66  return true;
67 }
Add-on class that provides the functionality to issue guarantees for declared material properties...
BlockRestrictable *const _gc_block_restrict
Access block restrictions of the object with this interface.
FEProblemBase *const _gc_feproblem
Reference to the FEProblemBase class.

◆ initialSetup()

void ComputeMultipleInelasticStress::initialSetup ( )
overrideprotectedvirtualinherited

Reimplemented in ComputeSmearedCrackingStress.

Definition at line 115 of file ComputeMultipleInelasticStress.C.

Referenced by ComputeSmearedCrackingStress::initialSetup().

116 {
119 
120  std::vector<MaterialName> models = getParam<std::vector<MaterialName>>("inelastic_models");
121 
122  for (unsigned int i = 0; i < _num_models; ++i)
123  {
124  StressUpdateBase * rrr = dynamic_cast<StressUpdateBase *>(&getMaterialByName(models[i]));
125 
126  if (rrr)
127  {
128  _models.push_back(rrr);
130  mooseError("Model " + models[i] +
131  " requires an isotropic elasticity tensor, but the one supplied is not "
132  "guaranteed isotropic");
133  }
134  else
135  mooseError("Model " + models[i] + " is not compatible with ComputeMultipleInelasticStress");
136  }
137 
138  // Check if tangent calculation methods are consistent. If all models have
139  // TangentOperatorEnum::ELASTIC or tangent_operator is set by the user as elasic, then the tangent
140  // is never calculated: J_tot = C. If PARTIAL and NONE models are present, utilize PARTIAL
141  // formulation: J_tot = (I + J_1 + ... J_N)^-1 C. If FULL and NONE models are present, utilize
142  // FULL formulation: J_tot = J_1 * C^-1 * J_2 * C^-1 * ... J_N * C. If PARTIAL and FULL models are
143  // present, error out.
144 
146  {
147  bool full_present = false;
148  bool partial_present = false;
149  for (unsigned int i = 0; i < _num_models; ++i)
150  {
151  if (_models[i]->getTangentCalculationMethod() == TangentCalculationMethod::FULL)
152  {
153  full_present = true;
154  _tangent_computation_flag[i] = true;
156  }
157  else if (_models[i]->getTangentCalculationMethod() == TangentCalculationMethod::PARTIAL)
158  {
159  partial_present = true;
160  _tangent_computation_flag[i] = true;
162  }
163  }
164  if (full_present && partial_present)
165  mooseError("In ",
166  _name,
167  ": Models that calculate the full tangent operator and the partial tangent "
168  "operator are being combined. Either set tangent_operator to elastic, implement "
169  "the corrent tangent formulations, or use different models.");
170  }
171 }
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
const std::string _elasticity_tensor_name
StressUpdateBase is a material that is not called by MOOSE because of the compute=false flag set in t...
std::vector< bool > _tangent_computation_flag
Flags to compute tangent during updateState call.
virtual bool requiresIsotropicTensor()=0
Does the model require the elasticity tensor to be isotropic?
TangentCalculationMethod _tangent_calculation_method
Calculation method for the tangent modulus.
const unsigned _num_models
number of plastic models
enum ComputeMultipleInelasticStress::TangentOperatorEnum _tangent_operator_type
std::vector< StressUpdateBase * > _models
The user supplied list of inelastic models to use in the simulation.
bool hasGuaranteedMaterialProperty(const MaterialPropertyName &prop, Guarantee guarantee)

◆ initQpStatefulProperties()

void ComputeMultipleInelasticCosseratStress::initQpStatefulProperties ( )
overrideprotectedvirtual

Reimplemented from ComputeMultipleInelasticStress.

Definition at line 41 of file ComputeMultipleInelasticCosseratStress.C.

42 {
44  _couple_stress[_qp].zero();
45 }
MaterialProperty< RankTwoTensor > & _couple_stress
the Cosserat couple-stress

◆ updateQpState()

void ComputeMultipleInelasticStress::updateQpState ( RankTwoTensor &  elastic_strain_increment,
RankTwoTensor &  combined_inelastic_strain_increment 
)
protectedvirtualinherited

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, as well as the tangent operator (which is placed into _Jacobian_mult[_qp]).

Parameters
elastic_strain_incrementThe elastic part of _strain_increment[_qp] after the iterative process has converged
combined_inelastic_strain_incrementThe 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 230 of file ComputeMultipleInelasticStress.C.

Referenced by ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration().

232 {
234  {
235  _console << std::endl
236  << "iteration output for ComputeMultipleInelasticStress solve:"
237  << " time=" << _t << " int_pt=" << _qp << std::endl;
238  }
239  Real l2norm_delta_stress;
240  Real first_l2norm_delta_stress = 1.0;
241  unsigned int counter = 0;
242 
243  std::vector<RankTwoTensor> inelastic_strain_increment;
244  inelastic_strain_increment.resize(_num_models);
245 
246  for (unsigned i_rmm = 0; i_rmm < _models.size(); ++i_rmm)
247  inelastic_strain_increment[i_rmm].zero();
248 
249  RankTwoTensor stress_max, stress_min;
250 
251  do
252  {
253  for (unsigned i_rmm = 0; i_rmm < _num_models; ++i_rmm)
254  {
255  _models[i_rmm]->setQp(_qp);
256 
257  // initially assume the strain is completely elastic
258  elastic_strain_increment = _strain_increment[_qp];
259  // and subtract off all inelastic strain increments calculated so far
260  // except the one that we're about to calculate
261  for (unsigned j_rmm = 0; j_rmm < _num_models; ++j_rmm)
262  if (i_rmm != j_rmm)
263  elastic_strain_increment -= inelastic_strain_increment[j_rmm];
264 
265  // form the trial stress, with the check for changed elasticity constants
267  _stress[_qp] =
268  _elasticity_tensor[_qp] * (_elastic_strain_old[_qp] + elastic_strain_increment);
269  else
270  _stress[_qp] = _stress_old[_qp] + _elasticity_tensor[_qp] * elastic_strain_increment;
271 
272  // given a trial stress (_stress[_qp]) and a strain increment (elastic_strain_increment)
273  // let the i^th model produce an admissible stress (as _stress[_qp]), and decompose
274  // the strain increment into an elastic part (elastic_strain_increment) and an
275  // inelastic part (inelastic_strain_increment[i_rmm])
277  elastic_strain_increment,
278  inelastic_strain_increment[i_rmm],
280 
281  if (i_rmm == 0)
282  {
283  stress_max = _stress[_qp];
284  stress_min = _stress[_qp];
285  }
286  else
287  {
288  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
289  {
290  for (unsigned int j = 0; j < LIBMESH_DIM; ++j)
291  {
292  if (_stress[_qp](i, j) > stress_max(i, j))
293  stress_max(i, j) = _stress[_qp](i, j);
294  else if (stress_min(i, j) > _stress[_qp](i, j))
295  stress_min(i, j) = _stress[_qp](i, j);
296  }
297  }
298  }
299  }
300 
301  // now check convergence in the stress:
302  // once the change in stress is within tolerance after each recompute material
303  // consider the stress to be converged
304  l2norm_delta_stress = (stress_max - stress_min).L2norm();
305  if (counter == 0 && l2norm_delta_stress > 0.0)
306  first_l2norm_delta_stress = l2norm_delta_stress;
307 
309  {
310  _console << "stress iteration number = " << counter << "\n"
311  << " relative l2 norm delta stress = "
312  << (0 == first_l2norm_delta_stress ? 0
313  : l2norm_delta_stress / first_l2norm_delta_stress)
314  << "\n"
315  << " stress convergence relative tolerance = " << _relative_tolerance << "\n"
316  << " absolute l2 norm delta stress = " << l2norm_delta_stress << "\n"
317  << " stress convergence absolute tolerance = " << _absolute_tolerance << std::endl;
318  }
319  ++counter;
320  } while (counter < _max_iterations && l2norm_delta_stress > _absolute_tolerance &&
321  (l2norm_delta_stress / first_l2norm_delta_stress) > _relative_tolerance &&
322  _num_models != 1);
323 
324  if (counter == _max_iterations && l2norm_delta_stress > _absolute_tolerance &&
325  (l2norm_delta_stress / first_l2norm_delta_stress) > _relative_tolerance)
326  throw MooseException("Max stress iteration hit during ComputeMultipleInelasticStress solve!");
327 
328  combined_inelastic_strain_increment.zero();
329  for (unsigned i_rmm = 0; i_rmm < _num_models; ++i_rmm)
330  combined_inelastic_strain_increment +=
331  _inelastic_weights[i_rmm] * inelastic_strain_increment[i_rmm];
332 
333  if (_fe_problem.currentlyComputingJacobian())
335 
336  _matl_timestep_limit[_qp] = 0.0;
337  for (unsigned i_rmm = 0; i_rmm < _num_models; ++i_rmm)
338  _matl_timestep_limit[_qp] += 1.0 / _models[i_rmm]->computeTimeStepLimit();
339 
340  if (MooseUtils::absoluteFuzzyEqual(_matl_timestep_limit[_qp], 0.0))
341  {
342  _matl_timestep_limit[_qp] = std::numeric_limits<Real>::max();
343  }
344  else
345  {
346  _matl_timestep_limit[_qp] = 1.0 / _matl_timestep_limit[_qp];
347  }
348 }
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
std::vector< RankFourTensor > _consistent_tangent_operator
the consistent tangent operators computed by each plastic model
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
MaterialProperty< Real > & _matl_timestep_limit
const MaterialProperty< RankTwoTensor > & _strain_increment
const std::vector< Real > _inelastic_weights
_inelastic_strain = sum_i (_inelastic_weights_i * inelastic_strain_from_model_i)
MaterialProperty< RankTwoTensor > & _stress
const unsigned _num_models
number of plastic models
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
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...
const MaterialProperty< RankTwoTensor > & _stress_old
std::vector< StressUpdateBase * > _models
The user supplied list of inelastic models to use in the simulation.
Real L2norm(const RankTwoTensor &r2tensor)
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...
virtual void computeQpJacobianMult()
Using _elasticity_tensor[_qp] and the consistent tangent operators, _consistent_tangent_operator[...] computed by the inelastic models, compute _Jacobian_mult[_qp].
static unsigned int counter
const unsigned int _max_iterations
Input parameters associated with the recompute iteration to return the stress state to the yield surf...

◆ updateQpStateSingleModel()

void ComputeMultipleInelasticStress::updateQpStateSingleModel ( unsigned  model_number,
RankTwoTensor &  elastic_strain_increment,
RankTwoTensor &  combined_inelastic_strain_increment 
)
protectedvirtualinherited

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, as well as the tangent operator (which is placed into _Jacobian_mult[_qp])

Parameters
model_numberUse this model number
elastic_strain_incrementThe elastic part of _strain_increment[_qp]
combined_inelastic_strain_incrementThe inelastic part of _strain_increment[_qp]

Definition at line 373 of file ComputeMultipleInelasticStress.C.

Referenced by ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration().

377 {
378  for (auto model : _models)
379  model->setQp(_qp);
380 
381  elastic_strain_increment = _strain_increment[_qp];
382 
383  // If the elasticity tensor values have changed and the tensor is isotropic,
384  // use the old strain to calculate the old stress
386  _stress[_qp] = _elasticity_tensor[_qp] * (_elastic_strain_old[_qp] + elastic_strain_increment);
387  else
388  _stress[_qp] = _stress_old[_qp] + _elasticity_tensor[_qp] * elastic_strain_increment;
389 
390  computeAdmissibleState(model_number,
391  elastic_strain_increment,
392  combined_inelastic_strain_increment,
394 
395  if (_fe_problem.currentlyComputingJacobian())
396  {
400  {
402  mooseAssert(A.isSymmetric(), "Tangent operator isn't symmetric");
403  _Jacobian_mult[_qp] = A.invSymm() * _elasticity_tensor[_qp];
404  }
405  else
407  }
408 
409  _matl_timestep_limit[_qp] = _models[0]->computeTimeStepLimit();
410 
411  /* propagate internal variables, etc, to this timestep for those inelastic models where
412  * "updateState" is not called */
413  for (unsigned i_rmm = 0; i_rmm < _num_models; ++i_rmm)
414  if (i_rmm != model_number)
415  _models[i_rmm]->propagateQpStatefulProperties();
416 }
bool _is_elasticity_tensor_guaranteed_isotropic
is the elasticity tensor guaranteed to be isotropic?
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
std::vector< RankFourTensor > _consistent_tangent_operator
the consistent tangent operators computed by each plastic model
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
MaterialProperty< Real > & _matl_timestep_limit
const MaterialProperty< RankTwoTensor > & _strain_increment
MaterialProperty< RankTwoTensor > & _stress
const RankFourTensor _identity_symmetric_four
Rank four symmetric identity tensor.
TangentCalculationMethod _tangent_calculation_method
Calculation method for the tangent modulus.
const unsigned _num_models
number of plastic models
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Rank-4 and Rank-2 elasticity and elastic strain tensors.
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...
const MaterialProperty< RankTwoTensor > & _stress_old
std::vector< StressUpdateBase * > _models
The user supplied list of inelastic models to use in the simulation.
const bool _perform_finite_strain_rotations
after updateQpState, rotate the stress, elastic_strain, inelastic_strain and Jacobian_mult using _rot...

Member Data Documentation

◆ _absolute_tolerance

const Real ComputeMultipleInelasticStress::_absolute_tolerance
protectedinherited

◆ _base_name

const std::string ComputeStressBase::_base_name
protectedinherited

◆ _compliance

const MaterialProperty<RankFourTensor>& ComputeMultipleInelasticCosseratStress::_compliance
protected

Inverse of the elasticity tensor.

Definition at line 76 of file ComputeMultipleInelasticCosseratStress.h.

Referenced by computeAdmissibleState(), and computeQpJacobianMult().

◆ _consistent_tangent_operator

std::vector<RankFourTensor> ComputeMultipleInelasticStress::_consistent_tangent_operator
protectedinherited

◆ _couple_stress

MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticCosseratStress::_couple_stress
protected

the Cosserat couple-stress

Definition at line 67 of file ComputeMultipleInelasticCosseratStress.h.

Referenced by computeQpStress(), and initQpStatefulProperties().

◆ _couple_stress_old

const MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticCosseratStress::_couple_stress_old
protected

the old value of Cosserat couple-stress

Definition at line 70 of file ComputeMultipleInelasticCosseratStress.h.

◆ _curvature

const MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticCosseratStress::_curvature
protected

The Cosserat curvature strain.

Definition at line 61 of file ComputeMultipleInelasticCosseratStress.h.

Referenced by computeQpStress().

◆ _cycle_models

const bool ComputeMultipleInelasticStress::_cycle_models
protectedinherited

whether to cycle through the models, using only one model per timestep

Definition at line 159 of file ComputeMultipleInelasticStress.h.

Referenced by ComputeMultipleInelasticStress::computeQpStressIntermediateConfiguration().

◆ _elastic_flexural_rigidity_tensor

const MaterialProperty<RankFourTensor>& ComputeMultipleInelasticCosseratStress::_elastic_flexural_rigidity_tensor
protected

The Cosserat elastic flexural rigidity tensor.

Definition at line 64 of file ComputeMultipleInelasticCosseratStress.h.

Referenced by computeQpStress().

◆ _elastic_strain

MaterialProperty<RankTwoTensor>& ComputeStressBase::_elastic_strain
protectedinherited

◆ _elastic_strain_old

const MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticStress::_elastic_strain_old
protectedinherited

◆ _elasticity_tensor

const MaterialProperty<RankFourTensor>& ComputeMultipleInelasticStress::_elasticity_tensor
protectedinherited

◆ _elasticity_tensor_name

const std::string ComputeStressBase::_elasticity_tensor_name
protectedinherited

◆ _extra_stress

const MaterialProperty<RankTwoTensor>& ComputeStressBase::_extra_stress
protectedinherited

Extra stress tensor.

Definition at line 47 of file ComputeStressBase.h.

Referenced by ComputeStressBase::computeQpProperties().

◆ _identity_symmetric_four

const RankFourTensor ComputeMultipleInelasticStress::_identity_symmetric_four
protectedinherited

◆ _inelastic_strain

MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticStress::_inelastic_strain
protectedinherited

◆ _inelastic_strain_old

const MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticStress::_inelastic_strain_old
protectedinherited

◆ _inelastic_weights

const std::vector<Real> ComputeMultipleInelasticStress::_inelastic_weights
protectedinherited

_inelastic_strain = sum_i (_inelastic_weights_i * inelastic_strain_from_model_i)

Definition at line 153 of file ComputeMultipleInelasticStress.h.

Referenced by ComputeMultipleInelasticStress::ComputeMultipleInelasticStress(), and ComputeMultipleInelasticStress::updateQpState().

◆ _initial_stress_fcn

std::vector<Function *> ComputeStressBase::_initial_stress_fcn
protectedinherited

initial stress components

Definition at line 50 of file ComputeStressBase.h.

◆ _internal_solve_full_iteration_history

const bool ComputeMultipleInelasticStress::_internal_solve_full_iteration_history
protectedinherited

◆ _is_elasticity_tensor_guaranteed_isotropic

bool ComputeMultipleInelasticStress::_is_elasticity_tensor_guaranteed_isotropic
protectedinherited

◆ _Jacobian_mult

MaterialProperty<RankFourTensor>& ComputeStressBase::_Jacobian_mult
protectedinherited

◆ _Jacobian_mult_couple

MaterialProperty<RankFourTensor>& ComputeMultipleInelasticCosseratStress::_Jacobian_mult_couple
protected

derivative of couple-stress w.r.t. curvature

Definition at line 73 of file ComputeMultipleInelasticCosseratStress.h.

Referenced by computeQpStress().

◆ _matl_timestep_limit

MaterialProperty<Real>& ComputeMultipleInelasticStress::_matl_timestep_limit
protectedinherited

◆ _max_iterations

const unsigned int ComputeMultipleInelasticStress::_max_iterations
protectedinherited

Input parameters associated with the recompute iteration to return the stress state to the yield surface.

Definition at line 119 of file ComputeMultipleInelasticStress.h.

Referenced by ComputeMultipleInelasticStress::updateQpState().

◆ _mechanical_strain

const MaterialProperty<RankTwoTensor>& ComputeStressBase::_mechanical_strain
protectedinherited

◆ _models

std::vector<StressUpdateBase *> ComputeMultipleInelasticStress::_models
protectedinherited

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 175 of file ComputeMultipleInelasticStress.h.

Referenced by ComputeMultipleInelasticStress::computeAdmissibleState(), ComputeSmearedCrackingStress::computeQpStress(), ComputeMultipleInelasticStress::initialSetup(), ComputeMultipleInelasticStress::updateQpState(), and ComputeMultipleInelasticStress::updateQpStateSingleModel().

◆ _num_models

const unsigned ComputeMultipleInelasticStress::_num_models
protectedinherited

◆ _perform_finite_strain_rotations

const bool ComputeMultipleInelasticStress::_perform_finite_strain_rotations
protectedinherited

◆ _relative_tolerance

const Real ComputeMultipleInelasticStress::_relative_tolerance
protectedinherited

◆ _rotation_increment

const MaterialProperty<RankTwoTensor>& ComputeFiniteStrainElasticStress::_rotation_increment
protectedinherited

◆ _strain_increment

const MaterialProperty<RankTwoTensor>& ComputeMultipleInelasticStress::_strain_increment
protectedinherited

◆ _stress

MaterialProperty<RankTwoTensor>& ComputeStressBase::_stress
protectedinherited

◆ _stress_old

const MaterialProperty<RankTwoTensor>& ComputeFiniteStrainElasticStress::_stress_old
protectedinherited

◆ _tangent_calculation_method

TangentCalculationMethod ComputeMultipleInelasticStress::_tangent_calculation_method
protectedinherited

◆ _tangent_computation_flag

std::vector<bool> ComputeMultipleInelasticStress::_tangent_computation_flag
protectedinherited

Flags to compute tangent during updateState call.

Definition at line 147 of file ComputeMultipleInelasticStress.h.

Referenced by ComputeMultipleInelasticStress::computeAdmissibleState(), and ComputeMultipleInelasticStress::initialSetup().

◆ _tangent_operator_type

enum ComputeMultipleInelasticStress::TangentOperatorEnum ComputeMultipleInelasticStress::_tangent_operator_type
protectedinherited

The documentation for this class was generated from the following files: