This class provides baseline functionallity for creep models based on the stress update material in a radial return isotropic creep calculations. More...

#include <ADRadialReturnCreepStressUpdateBase.h>

[legend]

## Public Member Functions

A radial return (J2) mapping method is performed with return mapping iterations. More...

Compute a reference quantity to be used for checking relative convergence. More...

Compute the minimum permissible value of the scalar. More...

Compute the maximum permissible value of the scalar. More...

virtual Real computeTimeStepLimit () override
Compute the limiting value of the time step for this material. More...

bool requiresIsotropicTensor () override
Does the model require the elasticity tensor to be isotropic? More...

void setQp (unsigned int qp)
Sets the value of the global variable _qp for inheriting classes. More...

void resetQpProperties () final
Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused in all inheriting classes and should not be overwritten. More...

void resetProperties () final

## Protected Member Functions

virtual void initQpStatefulProperties () override

virtual void propagateQpStatefulProperties () override
If updateState is not called during a timestep, this will be. More...

virtual void computeStressFinalize (const ADRankTwoTensor &plastic_strain_increment) override
Perform any necessary steps to finalize state after return mapping iterations. More...

Creep strain material property. More...

Propagate the properties pertaining to this intermediate class. More...

Perform any necessary initialization before return mapping iterations. More...

void outputIterationSummary (std::stringstream *iter_output, const unsigned int total_it) override
Output summary information for the convergence history of the model. More...

Perform the return mapping iterations. More...

Compute an initial guess for the value of the scalar. More...

Compute the residual for a predicted value of the scalar. More...

Compute the derivative of the residual as a function of the scalar variable. More...

Finalize internal state variables for a model for a given iteration. More...

## Protected Attributes

const MaterialProperty< RankTwoTensor > & _creep_strain_old

3 * shear modulus More...

const MaterialProperty< Real > & _effective_inelastic_strain_old

Real _max_inelastic_increment

usingStressUpdateBaseMembers

usingSingleVariableReturnMappingSolutionMembers

const std::string _base_name
Name used as a prefix for all material properties related to the stress update model. More...

usingMaterialMembers

bool _check_range
Whether to check to see whether iterative solution is within admissible range, and set within that range if outside. More...

bool _line_search
Whether to use line searches to improve convergence. More...

bool _bracket_solution
Whether to save upper and lower bounds of root for scalar, and set solution to the midpoint between those bounds if outside them. More...

## Detailed Description

This class provides baseline functionallity for creep models based on the stress update material in a radial return isotropic creep calculations.

## Constructor & Destructor Documentation

template<ComputeStage compute_stage>

24 {
25 }
const std::string _base_name
Name used as a prefix for all material properties related to the stress update model.
const MaterialProperty< RankTwoTensor > & _creep_strain_old

## Member Function Documentation

template<ComputeStage compute_stage>
protected

Creep strain material property.

template<ComputeStage compute_stage>
protectedinherited

## ◆ computeDerivative()

template<ComputeStage compute_stage>
protectedpure virtualinherited

Compute the derivative of the residual as a function of the scalar variable.

The residual should be in strain increment units for all models for consistency.

Parameters
 effective_trial_stress Effective trial stress scalar Inelastic strain increment magnitude being solved for

## ◆ computeReferenceResidual()

template<ComputeStage compute_stage>
overridevirtualinherited

Compute a reference quantity to be used for checking relative convergence.

This should be in strain increment units for all models for consistency.

Parameters
 effective_trial_stress Effective trial stress scalar Inelastic strain increment magnitude being solved for

117 {
118  return MetaPhysicL::raw_value(effective_trial_stress / _three_shear_modulus) -
119  MetaPhysicL::raw_value(scalar_effective_inelastic_strain);
120 }
3 * shear modulus

## ◆ computeResidual()

template<ComputeStage compute_stage>
protectedpure virtualinherited

Compute the residual for a predicted value of the scalar.

This residual should be in strain increment units for all models for consistency.

Parameters
 effective_trial_stress Effective trial stress scalar Inelastic strain increment magnitude being solved for

## ◆ computeStressFinalize()

template<ComputeStage compute_stage>
overrideprotectedvirtual

Perform any necessary steps to finalize state after return mapping iterations.

Parameters
 inelasticStrainIncrement Inelastic strain increment

49 {
50  _creep_strain[_qp] = _creep_strain_old[_qp] + plastic_strain_increment;
51 }
const MaterialProperty< RankTwoTensor > & _creep_strain_old

## ◆ computeStressInitialize()

template<ComputeStage compute_stage>
inlineprotectedvirtualinherited

Perform any necessary initialization before return mapping iterations.

Parameters
 effective_trial_stress Effective trial stress elasticityTensor Elasticity tensor

106  {
107  }

## ◆ computeTimeStepLimit()

template<ComputeStage compute_stage>
overridevirtualinherited

Compute the limiting value of the time step for this material.

Returns
Limiting time step

133 {
134  Real scalar_inelastic_strain_incr = MetaPhysicL::raw_value(_effective_inelastic_strain[_qp]) -
136  if (MooseUtils::absoluteFuzzyEqual(scalar_inelastic_strain_incr, 0.0))
137  return std::numeric_limits<Real>::max();
138
139  return _dt * _max_inelastic_increment / scalar_inelastic_strain_incr;
140 }
const MaterialProperty< Real > & _effective_inelastic_strain_old

## ◆ initialGuess()

template<ComputeStage compute_stage>
inlineprotectedvirtualinherited

Compute an initial guess for the value of the scalar.

For some cases, an intellegent starting point can provide enhanced robustness in the Newton iterations. This is also an opportunity for classes that derive from this to perform initialization tasks.

Parameters
 effective_trial_stress Effective trial stress

Definition at line 79 of file ADSingleVariableReturnMappingSolution.h.

79 { return 0.0; }

## ◆ initQpStatefulProperties()

template<ComputeStage compute_stage>
overrideprotectedvirtual

30 {
31  _creep_strain[_qp].zero();
32
34 }
virtual void initQpStatefulProperties() override

## ◆ iterationFinalize()

template<ComputeStage compute_stage>
inlineprotectedvirtualinherited

Finalize internal state variables for a model for a given iteration.

Parameters
 scalar Inelastic strain increment magnitude being solved for

Definition at line 111 of file ADSingleVariableReturnMappingSolution.h.

111 {}

## ◆ maximumPermissibleValue()

template<ComputeStage compute_stage>
overridevirtualinherited

Compute the maximum permissible value of the scalar.

For some models, the magnitude of this may be known.

Parameters
 effective_trial_stress Effective trial stress

126 {
127  return effective_trial_stress / _three_shear_modulus;
128 }
3 * shear modulus

## ◆ minimumPermissibleValue()

template<ComputeStage compute_stage>
inlineoverridevirtualinherited

Compute the minimum permissible value of the scalar.

For some models, the magnitude of this may be known.

Parameters
 effective_trial_stress Effective trial stress

69  {
70  return 0.0;
71  }

## ◆ outputIterationSummary()

template<ComputeStage compute_stage>
 void ADRadialReturnStressUpdate< compute_stage >::outputIterationSummary ( std::stringstream * iter_output, const unsigned int total_it )
overrideprotectedvirtualinherited

Output summary information for the convergence history of the model.

Parameters
 iter_output Output stream total_it Total iteration count

146 {
147  if (iter_output)
148  {
149  *iter_output << "At element " << _current_elem->id() << " _qp=" << _qp << " Coordinates "
150  << _q_point[_qp] << " block=" << _current_elem->subdomain_id() << '\n';
151  }
153  total_it);
154 }
virtual void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it)
Output summary information for the convergence history of the model.

## ◆ propagateQpStatefulProperties()

template<ComputeStage compute_stage>
overrideprotectedvirtual

If updateState is not called during a timestep, this will be.

This method allows derived classes to set internal parameters from their Old values, for instance

39 {
40  _creep_strain[_qp] = _creep_strain_old[_qp];
41
43 }
const MaterialProperty< RankTwoTensor > & _creep_strain_old
Propagate the properties pertaining to this intermediate class.

template<ComputeStage compute_stage>
protectedinherited

Propagate the properties pertaining to this intermediate class.

This is intended to be called from propagateQpStatefulProperties() in classes that inherit from this one. This is intentionally named uniquely because almost all models that derive from this class have their own stateful properties, and this forces them to define their own implementations of propagateQpStatefulProperties().

55 {
56  _effective_inelastic_strain[_qp] = _effective_inelastic_strain_old[_qp];
57 }
const MaterialProperty< Real > & _effective_inelastic_strain_old

## ◆ requiresIsotropicTensor()

template<ComputeStage compute_stage>
inlineoverridevirtualinherited

Does the model require the elasticity tensor to be isotropic?

84 { return true; }

## ◆ resetProperties()

template<ComputeStage compute_stage>
 void ADStressUpdateBase< compute_stage >::resetProperties ( )
inlinefinalinherited

Definition at line 102 of file ADStressUpdateBase.h.

102 {}

## ◆ resetQpProperties()

template<ComputeStage compute_stage>
 void ADStressUpdateBase< compute_stage >::resetQpProperties ( )
inlinefinalinherited

Retained as empty methods to avoid a warning from Material.C in framework. These methods are unused in all inheriting classes and should not be overwritten.

Definition at line 101 of file ADStressUpdateBase.h.

101 {}

## ◆ returnMappingSolve()

template<ComputeStage compute_stage>
 void ADSingleVariableReturnMappingSolution< compute_stage >::returnMappingSolve ( const ADReal & effective_trial_stress, ADReal & scalar, const ConsoleStream & console )
protectedinherited

Perform the return mapping iterations.

Parameters
 effective_trial_stress Effective trial stress scalar Inelastic strain increment magnitude being solved for console Console output

Definition at line 94 of file ADSingleVariableReturnMappingSolution.C.

96 {
97  // construct the stringstream here only if the debug level is set to ALL
98  std::stringstream * iter_output =
99  (_internal_solve_output_on == InternalSolveOutput::ALWAYS) ? new std::stringstream : nullptr;
100
101  // do the internal solve and capture iteration info during the first round
102  // iff full history output is requested regardless of whether the solve failed or succeeded
103  auto solve_state = internalSolve(effective_trial_stress,
104  scalar,
105  _internal_solve_full_iteration_history ? iter_output : nullptr);
106  if (solve_state != SolveState::SUCCESS &&
108  {
109  // output suppressed by user, throw immediately
111  throw MooseException("");
112
113  // user expects some kind of output, if necessary setup output stream now
114  if (!iter_output)
115  iter_output = new std::stringstream;
116
117  // add the appropriate error message to the output
118  switch (solve_state)
119  {
120  case SolveState::NAN_INF:
121  *iter_output << "Encountered inf or nan in material return mapping iterations.\n";
122  break;
123
125  *iter_output << "Exceeded maximum iterations in material return mapping iterations.\n";
126  break;
127
128  default:
129  mooseError("Unhandled solver state");
130  }
131
132  // if full history output is only requested for failed solves we have to repeat
133  // the solve a second time
135  internalSolve(effective_trial_stress, scalar, iter_output);
136
137  // Append summary and throw exception
138  outputIterationSummary(iter_output, _iteration);
139  throw MooseException(iter_output->str());
140  }
141
143  {
144  // the solve did not fail but the user requested debug output anyways
145  outputIterationSummary(iter_output, _iteration);
146  console << iter_output->str();
147  }
148 }
virtual void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it)
Output summary information for the convergence history of the model.
const bool _internal_solve_full_iteration_history
Whether to output iteration information all the time (regardless of whether iterations converge) ...
Method called from within this class to perform the actual return mappping iterations.

## ◆ setQp()

template<ComputeStage compute_stage>
 void ADStressUpdateBase< compute_stage >::setQp ( unsigned int qp )
inherited

Sets the value of the global variable _qp for inheriting classes.

Definition at line 42 of file ADStressUpdateBase.C.

43 {
44  _qp = qp;
45 }

template<ComputeStage compute_stage>
overridevirtualinherited

A radial return (J2) mapping method is performed with return mapping iterations.

Parameters
 strain_increment Sum of elastic and inelastic strain increments inelastic_strain_increment Inelastic strain increment calculated by this class rotation increment Not used by this class stress_new New trial stress from pure elastic calculation stress_old Old state of stress elasticity_tensor Rank 4 C_{ijkl}, must be isotropic elastic_strain_old Old state of total elastic strain

69 {
70  // compute the deviatoric trial stress and trial strain from the current intermediate
71  // configuration
73
74  // compute the effective trial stress
76  deviatoric_trial_stress.doubleContraction(deviatoric_trial_stress);
77  ADReal effective_trial_stress = MooseUtils::absoluteFuzzyEqual(dev_trial_stress_squared, 0.0)
78  ? 0.0
79  : std::sqrt(3.0 / 2.0 * dev_trial_stress_squared);
80
81  // Set the value of 3 * shear modulus for use as a reference residual value
83
84  computeStressInitialize(effective_trial_stress, elasticity_tensor);
85
86  // Use Newton iteration to determine the scalar effective inelastic strain increment
88  if (!MooseUtils::absoluteFuzzyEqual(effective_trial_stress, 0.0))
89  {
90  returnMappingSolve(effective_trial_stress, scalar_effective_inelastic_strain, _console);
91  if (scalar_effective_inelastic_strain != 0.0)
92  inelastic_strain_increment =
93  deviatoric_trial_stress *
94  (1.5 * scalar_effective_inelastic_strain / effective_trial_stress);
95  else
96  inelastic_strain_increment.zero();
97  }
98  else
99  inelastic_strain_increment.zero();
100
101  strain_increment -= inelastic_strain_increment;
102  _effective_inelastic_strain[_qp] =
103  _effective_inelastic_strain_old[_qp] + scalar_effective_inelastic_strain;
104
105  // Use the old elastic strain here because we require tensors used by this class
106  // to be isotropic and this method natively allows for changing in time
107  // elasticity tensors
108  stress_new = elasticity_tensor * (elastic_strain_old + strain_increment);
109
110  computeStressFinalize(inelastic_strain_increment);
111 }
auto getIsotropicShearModulus(const T &elasticity_tensor) -> decltype(elasticity_tensor(0, 1, 0, 1))
Get the shear modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must be ...
Perform any necessary steps to finalize state after return mapping iterations.
Perform the return mapping iterations.
const MaterialProperty< Real > & _effective_inelastic_strain_old
Perform any necessary initialization before return mapping iterations.
3 * shear modulus

## ◆ _base_name

template<ComputeStage compute_stage>
protectedinherited

Name used as a prefix for all material properties related to the stress update model.

Definition at line 107 of file ADStressUpdateBase.h.

## ◆ _bracket_solution

template<ComputeStage compute_stage>
protectedinherited

Whether to save upper and lower bounds of root for scalar, and set solution to the midpoint between those bounds if outside them.

Definition at line 128 of file ADSingleVariableReturnMappingSolution.h.

## ◆ _check_range

template<ComputeStage compute_stage>
protectedinherited

Whether to check to see whether iterative solution is within admissible range, and set within that range if outside.

Definition at line 121 of file ADSingleVariableReturnMappingSolution.h.

## ◆ _creep_strain_old

template<ComputeStage compute_stage>
protected

## ◆ _effective_inelastic_strain_old

template<ComputeStage compute_stage>
protectedinherited

## ◆ _line_search

template<ComputeStage compute_stage>
protectedinherited

Whether to use line searches to improve convergence.

Definition at line 124 of file ADSingleVariableReturnMappingSolution.h.

## ◆ _max_inelastic_increment

template<ComputeStage compute_stage>
protectedinherited

## ◆ _three_shear_modulus

template<ComputeStage compute_stage>
protectedinherited

3 * shear modulus

## ◆ usingMaterialMembers

template<ComputeStage compute_stage>
protectedinherited

Definition at line 109 of file ADStressUpdateBase.h.

template<ComputeStage compute_stage>
protected

## ◆ usingSingleVariableReturnMappingSolutionMembers

template<ComputeStage compute_stage>
protectedinherited