www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
ADViscoplasticityStressUpdateBase< compute_stage > Class Template Referenceabstract

#include <ADViscoplasticityStressUpdateBase.h>

Inheritance diagram for ADViscoplasticityStressUpdateBase< compute_stage >:
[legend]

Public Member Functions

 ADViscoplasticityStressUpdateBase (const InputParameters &parameters)
 
virtual Real computeReferenceResidual (const ADReal &effective_trial_stress, const ADReal &scalar_effective_inelastic_strain) override
 Compute a reference quantity to be used for checking relative convergence. 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...
 
virtual void updateState (ADRankTwoTensor &strain_increment, ADRankTwoTensor &inelastic_strain_increment, const ADRankTwoTensor &rotation_increment, ADRankTwoTensor &stress_new, const RankTwoTensor &stress_old, const ADRankFourTensor &elasticity_tensor, const RankTwoTensor &elastic_strain_old)=0
 Given a strain increment that results in a trial stress, perform some procedure (such as an iterative return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment. 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
 

Static Public Member Functions

static InputParameters validParams ()
 

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 computeStressInitialize (const ADReal &, const ADRankFourTensor &)
 Perform any necessary initialization before return mapping iterations. More...
 
virtual void computeStressFinalize (const ADRankTwoTensor &)
 Perform any necessary steps to finalize state after return mapping iterations. More...
 
virtual ADReal computeDerivative (const ADReal &, const ADReal &) override
 Compute the derivative of the residual as a function of the scalar variable. More...
 
void updateIntermediatePorosity (const ADRankTwoTensor &elastic_strain_increment)
 
void outputIterationSummary (std::stringstream *iter_output, const unsigned int total_it) override
 Output summary information for the convergence history of the model. More...
 
const ADMaterialProperty (RankTwoTensor) &_strain_increment
 Material property for the total strain increment. More...
 
void returnMappingSolve (const ADReal &effective_trial_stress, ADReal &scalar, const ConsoleStream &console)
 Perform the return mapping iterations. More...
 
virtual ADReal minimumPermissibleValue (const ADReal &effective_trial_stress) const
 Compute the minimum permissible value of the scalar. More...
 
virtual ADReal maximumPermissibleValue (const ADReal &effective_trial_stress) const
 Compute the maximum permissible value of the scalar. More...
 
virtual ADReal initialGuess (const ADReal &)
 Compute an initial guess for the value of the scalar. More...
 
virtual ADReal computeResidual (const ADReal &effective_trial_stress, const ADReal &scalar)=0
 Compute the residual for a predicted value of the scalar. More...
 
virtual void iterationFinalize (ADReal)
 Finalize internal state variables for a model for a given iteration. More...
 
virtual void outputIterationStep (std::stringstream *iter_output, const ADReal &effective_trial_stress, const ADReal &scalar, const Real reference_residual)
 Output information for a single iteration step to build the convergence history of the model. More...
 
bool converged (const ADReal &residual, const Real reference)
 Check to see whether the residual is within the convergence limits. More...
 

Protected Attributes

const std::string _total_strain_base_name
 String designating the base name of the total strain. More...
 
Real _max_inelastic_increment
 Max increment for inelastic strain. More...
 
ADReal _intermediate_porosity
 Container for the porosity calculated from all other intelastic models except the current model. More...
 
const MaterialProperty< Real > & _porosity_old
 Material property for the old porosity. More...
 
const bool _verbose
 Flag to enable verbose output. More...
 
ADReal _derivative
 Container for _derivative. More...
 
 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...
 

Private Types

enum  InternalSolveOutput { InternalSolveOutput::NEVER, InternalSolveOutput::ON_ERROR, InternalSolveOutput::ALWAYS }
 
enum  SolveState { SolveState::SUCCESS, SolveState::NAN_INF, SolveState::EXCEEDED_ITERATIONS }
 

Private Member Functions

SolveState internalSolve (const ADReal effective_trial_stress, ADReal &scalar, std::stringstream *iter_output=nullptr)
 Method called from within this class to perform the actual return mappping iterations. More...
 
bool convergedAcceptable (const unsigned int it, const Real reference)
 Check to see whether the residual is within acceptable convergence limits. More...
 
void checkPermissibleRange (ADReal &scalar, ADReal &scalar_increment, const ADReal &scalar_old, const ADReal min_permissible_scalar, const ADReal max_permissible_scalar, std::stringstream *iter_output)
 Check to see whether solution is within admissible range, and set it within that range if it is not. More...
 
void updateBounds (const ADReal &scalar, const ADReal &residual, const Real init_resid_sign, ADReal &scalar_upper_bound, ADReal &scalar_lower_bound, std::stringstream *iter_output)
 Update the upper and lower bounds of the root for the effective inelastic strain. More...
 

Private Attributes

enum ADSingleVariableReturnMappingSolution::InternalSolveOutput _internal_solve_output_on
 
const unsigned int _max_its
 Maximum number of return mapping iterations. More...
 
const bool _internal_solve_full_iteration_history
 Whether to output iteration information all the time (regardless of whether iterations converge) More...
 
Real _relative_tolerance
 Relative convergence tolerance. More...
 
Real _absolute_tolerance
 Absolute convergence tolerance. More...
 
Real _acceptable_multiplier
 Multiplier applied to relative and absolute tolerances for acceptable convergence. More...
 
const std::size_t _num_resids
 Number of residuals to be stored in history. More...
 
std::vector< Real > _residual_history
 History of residuals used to check whether progress is still being made on decreasing the residual. More...
 
unsigned int _iteration
 iteration number More...
 
const std::string _svrms_name
 MOOSE input name of the object performing the solve. More...
 
ADReal _initial_residual
 Residual values, kept as members to retain solver state for summary outputting. More...
 
ADReal _residual
 
const MaterialProperty< Real > & _effective_inelastic_strain_old
 
 ADMaterialProperty (Real) &_effective_inelastic_strain
 Effective inelastic strain material property. More...
 
const MaterialProperty< RankTwoTensor > & _inelastic_strain_old
 
 ADMaterialProperty (RankTwoTensor) &_inelastic_strain
 Creep strain material property. More...
 

Detailed Description

template<ComputeStage compute_stage>
class ADViscoplasticityStressUpdateBase< compute_stage >

Definition at line 32 of file ADViscoplasticityStressUpdateBase.h.

Member Enumeration Documentation

◆ InternalSolveOutput

template<ComputeStage compute_stage>
enum ADSingleVariableReturnMappingSolution::InternalSolveOutput
strongprivateinherited
Enumerator
NEVER 
ON_ERROR 
ALWAYS 

Definition at line 156 of file ADSingleVariableReturnMappingSolution.h.

157  {
158  NEVER,
159  ON_ERROR,
160  ALWAYS

◆ SolveState

template<ComputeStage compute_stage>
enum ADSingleVariableReturnMappingSolution::SolveState
strongprivateinherited
Enumerator
SUCCESS 
NAN_INF 
EXCEEDED_ITERATIONS 

Definition at line 163 of file ADSingleVariableReturnMappingSolution.h.

164  {
165  SUCCESS,
166  NAN_INF,
167  EXCEEDED_ITERATIONS
168  };

Constructor & Destructor Documentation

◆ ADViscoplasticityStressUpdateBase()

template<ComputeStage compute_stage>
ADViscoplasticityStressUpdateBase< compute_stage >::ADViscoplasticityStressUpdateBase ( const InputParameters &  parameters)

Definition at line 39 of file ADViscoplasticityStressUpdateBase.C.

43  _total_strain_base_name(isParamValid("total_strain_base_name")
44  ? getParam<std::string>("total_strain_base_name") + "_"
45  : ""),
46  _strain_increment(
47  getADMaterialProperty<RankTwoTensor>(_total_strain_base_name + "strain_increment")),
48  _effective_inelastic_strain(declareADProperty<Real>(
49  _base_name + "effective_" + getParam<std::string>("inelastic_strain_name"))),
50  _effective_inelastic_strain_old(getMaterialPropertyOld<Real>(
51  _base_name + "effective_" + getParam<std::string>("inelastic_strain_name"))),
52  _inelastic_strain(declareADProperty<RankTwoTensor>(
53  _base_name + getParam<std::string>("inelastic_strain_name"))),
54  _inelastic_strain_old(getMaterialPropertyOld<RankTwoTensor>(
55  _base_name + getParam<std::string>("inelastic_strain_name"))),
56  _max_inelastic_increment(getParam<Real>("max_inelastic_increment")),
58  _porosity_old(getMaterialPropertyOld<Real>(getParam<MaterialPropertyName>("porosity_name"))),
59  _verbose(getParam<bool>("verbose")),
60  _derivative(0.0)
61 {
62 }

Member Function Documentation

◆ ADMaterialProperty() [1/3]

template<ComputeStage compute_stage>
ADViscoplasticityStressUpdateBase< compute_stage >::ADMaterialProperty ( RankTwoTensor  ) &
protected

Creep strain material property.

◆ ADMaterialProperty() [2/3]

template<ComputeStage compute_stage>
const ADViscoplasticityStressUpdateBase< compute_stage >::ADMaterialProperty ( RankTwoTensor  ) &
protected

Material property for the total strain increment.

◆ ADMaterialProperty() [3/3]

template<ComputeStage compute_stage>
ADViscoplasticityStressUpdateBase< compute_stage >::ADMaterialProperty ( Real  ) &
protected

Effective inelastic strain material property.

◆ checkPermissibleRange()

template<ComputeStage compute_stage>
void ADSingleVariableReturnMappingSolution< compute_stage >::checkPermissibleRange ( ADReal &  scalar,
ADReal &  scalar_increment,
const ADReal &  scalar_old,
const ADReal  min_permissible_scalar,
const ADReal  max_permissible_scalar,
std::stringstream *  iter_output 
)
privateinherited

Check to see whether solution is within admissible range, and set it within that range if it is not.

Parameters
scalarCurrent value of the inelastic strain increment
scalar_incrementIncremental change in scalar from the previous iteration
scalar_oldPrevious value of scalar
min_permissible_scalarMinimum permissible value of scalar
max_permissible_scalarMaximum permissible value of scalar
iter_outputOutput stream

Definition at line 334 of file ADSingleVariableReturnMappingSolution.C.

341 {
342  if (scalar > max_permissible_scalar)
343  {
344  scalar_increment = (max_permissible_scalar - scalar_old) / 2.0;
345  scalar = scalar_old + scalar_increment;
346  if (iter_output)
347  *iter_output << "Scalar greater than maximum ("
348  << MetaPhysicL::raw_value(max_permissible_scalar)
349  << ") adjusted scalar=" << MetaPhysicL::raw_value(scalar)
350  << " scalar_increment=" << MetaPhysicL::raw_value(scalar_increment) << std::endl;
351  }
352  else if (scalar < min_permissible_scalar)
353  {
354  scalar_increment = (min_permissible_scalar - scalar_old) / 2.0;
355  scalar = scalar_old + scalar_increment;
356  if (iter_output)
357  *iter_output << "Scalar less than minimum (" << MetaPhysicL::raw_value(min_permissible_scalar)
358  << ") adjusted scalar=" << MetaPhysicL::raw_value(scalar)
359  << " scalar_increment=" << MetaPhysicL::raw_value(scalar_increment) << std::endl;
360  }
361 }

◆ computeDerivative()

template<ComputeStage compute_stage>
virtual ADReal ADViscoplasticityStressUpdateBase< compute_stage >::computeDerivative ( const ADReal &  effective_trial_stress,
const ADReal &  scalar 
)
inlineoverrideprotectedvirtual

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_stressEffective trial stress
scalarInelastic strain increment magnitude being solved for

Implements ADSingleVariableReturnMappingSolution< compute_stage >.

Definition at line 81 of file ADViscoplasticityStressUpdateBase.h.

83  {
84  return _derivative;
85  }

◆ computeReferenceResidual()

template<ComputeStage compute_stage>
Real ADViscoplasticityStressUpdateBase< compute_stage >::computeReferenceResidual ( const ADReal &  effective_trial_stress,
const ADReal &  scalar 
)
overridevirtual

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_stressEffective trial stress
scalarInelastic strain increment magnitude being solved for

Implements ADSingleVariableReturnMappingSolution< compute_stage >.

Definition at line 82 of file ADViscoplasticityStressUpdateBase.C.

84 {
85  // Use gauge stress for relative tolerance criteria, defined as:
86  // std::abs(residual / gauge_stress) <= _relative_tolerance
87  return MetaPhysicL::raw_value(gauge_stress);
88 }

◆ computeResidual()

template<ComputeStage compute_stage>
virtual ADReal ADSingleVariableReturnMappingSolution< compute_stage >::computeResidual ( const ADReal &  effective_trial_stress,
const ADReal &  scalar 
)
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_stressEffective trial stress
scalarInelastic strain increment magnitude being solved for

Implemented in ADIsotropicPlasticityStressUpdate< compute_stage >, ADViscoplasticityStressUpdate< compute_stage >, ADLAROMANCEStressUpdateBase< compute_stage >, ADPowerLawCreepStressUpdate< compute_stage >, and ADPowerLawCreepExceptionTest< compute_stage >.

◆ computeStressFinalize()

template<ComputeStage compute_stage>
virtual void ADViscoplasticityStressUpdateBase< compute_stage >::computeStressFinalize ( const ADRankTwoTensor &  )
inlineprotectedvirtual

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

Parameters
inelasticStrainIncrementInelastic strain increment

Definition at line 79 of file ADViscoplasticityStressUpdateBase.h.

79 {}

◆ computeStressInitialize()

template<ComputeStage compute_stage>
virtual void ADViscoplasticityStressUpdateBase< compute_stage >::computeStressInitialize ( const ADReal &  ,
const ADRankFourTensor &   
)
inlineprotectedvirtual

Perform any necessary initialization before return mapping iterations.

Parameters
effective_trial_stressEffective trial stress
elasticityTensorElasticity tensor

Definition at line 70 of file ADViscoplasticityStressUpdateBase.h.

72  {
73  }

◆ computeTimeStepLimit()

template<ComputeStage compute_stage>
Real ADViscoplasticityStressUpdateBase< compute_stage >::computeTimeStepLimit ( )
overridevirtual

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

Returns
Limiting time step

Reimplemented from ADStressUpdateBase< compute_stage >.

Definition at line 92 of file ADViscoplasticityStressUpdateBase.C.

93 {
94  const Real scalar_inelastic_strain_incr =
95  MetaPhysicL::raw_value(_effective_inelastic_strain[_qp]) -
97 
98  if (!scalar_inelastic_strain_incr)
99  return std::numeric_limits<Real>::max();
100 
101  return _dt * _max_inelastic_increment / scalar_inelastic_strain_incr;
102 }

◆ converged()

template<ComputeStage compute_stage>
bool ADSingleVariableReturnMappingSolution< compute_stage >::converged ( const ADReal &  residual,
const Real  reference 
)
protectedinherited

Check to see whether the residual is within the convergence limits.

Parameters
residualCurrent value of the residual
referenceCurrent value of the reference quantity
Returns
Whether the model converged

Definition at line 301 of file ADSingleVariableReturnMappingSolution.C.

303 {
304  const Real residual = MetaPhysicL::raw_value(ad_residual);
305  return (std::abs(residual) <= _absolute_tolerance ||
306  std::abs(residual / reference) <= _relative_tolerance);
307 }

◆ convergedAcceptable()

template<ComputeStage compute_stage>
bool ADSingleVariableReturnMappingSolution< compute_stage >::convergedAcceptable ( const unsigned int  it,
const Real  reference 
)
privateinherited

Check to see whether the residual is within acceptable convergence limits.

This will only return true if it has been determined that progress is no longer being made and that the residual is within the acceptable limits.

Parameters
residualCurrent iteration count
residualCurrent value of the residual
referenceCurrent value of the reference quantity
Returns
Whether the model converged

Definition at line 311 of file ADSingleVariableReturnMappingSolution.C.

313 {
314  // Require that we have at least done _num_resids evaluations before we allow for
315  // acceptable convergence
316  if (it < _num_resids)
317  return false;
318 
319  // Check to see whether the residual has dropped by convergence_history_factor over
320  // the last _num_resids iterations. If it has (which means it's still making progress),
321  // don't consider it to be converged within the acceptable limits.
322  const Real convergence_history_factor = 10.0;
323  if (std::abs(_residual * convergence_history_factor) <
324  std::abs(_residual_history[(it + 1) % _num_resids]))
325  return false;
326 
327  // Now that it's determined that progress is not being made, treat it as converged if
328  // we're within the acceptable convergence limits
329  return converged(_residual / _acceptable_multiplier, reference);
330 }

◆ initialGuess()

template<ComputeStage compute_stage>
virtual ADReal ADSingleVariableReturnMappingSolution< compute_stage >::initialGuess ( const ADReal &  )
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_stressEffective trial stress

Reimplemented in ADViscoplasticityStressUpdate< compute_stage >.

Definition at line 82 of file ADSingleVariableReturnMappingSolution.h.

82 { return 0.0; }

◆ initQpStatefulProperties()

template<ComputeStage compute_stage>
void ADViscoplasticityStressUpdateBase< compute_stage >::initQpStatefulProperties ( )
overrideprotectedvirtual

Definition at line 66 of file ADViscoplasticityStressUpdateBase.C.

67 {
68  _effective_inelastic_strain[_qp] = 0.0;
69  _inelastic_strain[_qp].zero();
70 }

◆ internalSolve()

template<ComputeStage compute_stage>
ADSingleVariableReturnMappingSolution< compute_stage >::SolveState ADSingleVariableReturnMappingSolution< compute_stage >::internalSolve ( const ADReal  effective_trial_stress,
ADReal &  scalar,
std::stringstream *  iter_output = nullptr 
)
privateinherited

Method called from within this class to perform the actual return mappping iterations.

Parameters
effective_trial_stressEffective trial stress
scalarInelastic strain increment magnitude being solved for
iter_outputOutput stream – if null, no output is produced
Returns
Whether the solution was successful

Definition at line 162 of file ADSingleVariableReturnMappingSolution.C.

164 {
165  scalar = initialGuess(effective_trial_stress);
166  ADReal scalar_old = scalar;
167  ADReal scalar_increment = 0.0;
168  const ADReal min_permissible_scalar = minimumPermissibleValue(effective_trial_stress);
169  const ADReal max_permissible_scalar = maximumPermissibleValue(effective_trial_stress);
170  ADReal scalar_upper_bound = max_permissible_scalar;
171  ADReal scalar_lower_bound = min_permissible_scalar;
172  _iteration = 0;
173 
174  _initial_residual = _residual = computeResidual(effective_trial_stress, scalar);
175 
176  ADReal residual_old = _residual;
177  Real init_resid_sign = MathUtils::sign(MetaPhysicL::raw_value(_residual));
178  Real reference_residual = computeReferenceResidual(effective_trial_stress, scalar);
179 
180  if (converged(_residual, reference_residual))
181  {
182  iterationFinalize(scalar);
183  outputIterationStep(iter_output, effective_trial_stress, scalar, reference_residual);
184  return SolveState::SUCCESS;
185  }
186 
187  _residual_history.assign(_num_resids, std::numeric_limits<Real>::max());
188  _residual_history[0] = MetaPhysicL::raw_value(_residual);
189 
190  while (_iteration < _max_its && !converged(_residual, reference_residual) &&
191  !convergedAcceptable(_iteration, reference_residual))
192  {
193  scalar_increment = -_residual / computeDerivative(effective_trial_stress, scalar);
194  scalar = scalar_old + scalar_increment;
195 
196  if (_check_range)
197  checkPermissibleRange(scalar,
198  scalar_increment,
199  scalar_old,
200  min_permissible_scalar,
201  max_permissible_scalar,
202  iter_output);
203 
204  _residual = computeResidual(effective_trial_stress, scalar);
205  reference_residual = computeReferenceResidual(effective_trial_stress, scalar);
206  iterationFinalize(scalar);
207 
208  if (_bracket_solution)
209  updateBounds(
210  scalar, _residual, init_resid_sign, scalar_upper_bound, scalar_lower_bound, iter_output);
211 
212  if (converged(_residual, reference_residual))
213  {
214  outputIterationStep(iter_output, effective_trial_stress, scalar, reference_residual);
215  break;
216  }
217  else
218  {
219  bool modified_increment = false;
220 
221  // Line Search
222  if (_line_search)
223  {
224  if (residual_old - _residual != 0.0)
225  {
226  ADReal alpha = residual_old / (residual_old - _residual);
227  alpha = MathUtils::clamp(alpha, 1.0e-2, 1.0);
228 
229  if (alpha != 1.0)
230  {
231  modified_increment = true;
232  scalar_increment *= alpha;
233  if (iter_output)
234  *iter_output << " Line search alpha = " << MetaPhysicL::raw_value(alpha)
235  << " increment = " << MetaPhysicL::raw_value(scalar_increment)
236  << std::endl;
237  }
238  }
239  }
240 
241  if (_bracket_solution)
242  {
243  // Check to see whether trial scalar_increment is outside the bounds, and set it to a point
244  // within the bounds if it is
245  if (scalar_old + scalar_increment >= scalar_upper_bound ||
246  scalar_old + scalar_increment <= scalar_lower_bound)
247  {
248  if (scalar_upper_bound != max_permissible_scalar &&
249  scalar_lower_bound != min_permissible_scalar)
250  {
251  const Real frac = 0.5;
252  scalar_increment =
253  (1.0 - frac) * scalar_lower_bound + frac * scalar_upper_bound - scalar_old;
254  modified_increment = true;
255  if (iter_output)
256  *iter_output << " Trial scalar_increment exceeded bounds. Setting between "
257  "lower/upper bounds. frac: "
258  << frac << std::endl;
259  }
260  }
261  }
262 
263  // Update the trial scalar and recompute residual if the line search or bounds checking
264  // modified the increment
265  if (modified_increment)
266  {
267  scalar = scalar_old + scalar_increment;
268  _residual = computeResidual(effective_trial_stress, scalar);
269  reference_residual = computeReferenceResidual(effective_trial_stress, scalar);
270  iterationFinalize(scalar);
271 
272  if (_bracket_solution)
273  updateBounds(scalar,
274  _residual,
275  init_resid_sign,
276  scalar_upper_bound,
277  scalar_lower_bound,
278  iter_output);
279  }
280  }
281 
282  outputIterationStep(iter_output, effective_trial_stress, scalar, reference_residual);
283 
284  ++_iteration;
285  residual_old = _residual;
286  scalar_old = scalar;
287  _residual_history[_iteration % _num_resids] = MetaPhysicL::raw_value(_residual);
288  }
289 
290  if (std::isnan(_residual) || std::isinf(MetaPhysicL::raw_value(_residual)))
291  return SolveState::NAN_INF;
292 
293  if (_iteration == _max_its)
295 
296  return SolveState::SUCCESS;
297 }

◆ iterationFinalize()

template<ComputeStage compute_stage>
virtual void ADSingleVariableReturnMappingSolution< compute_stage >::iterationFinalize ( ADReal  )
inlineprotectedvirtualinherited

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

Parameters
scalarInelastic strain increment magnitude being solved for

Reimplemented in ADIsotropicPlasticityStressUpdate< compute_stage >.

Definition at line 114 of file ADSingleVariableReturnMappingSolution.h.

114 {}

◆ maximumPermissibleValue()

template<ComputeStage compute_stage>
ADReal ADSingleVariableReturnMappingSolution< compute_stage >::maximumPermissibleValue ( const ADReal &  effective_trial_stress) const
protectedvirtualinherited

Compute the maximum permissible value of the scalar.

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

Parameters
effective_trial_stressEffective trial stress

Reimplemented in ADRadialReturnStressUpdate< compute_stage >, and ADViscoplasticityStressUpdate< compute_stage >.

Definition at line 93 of file ADSingleVariableReturnMappingSolution.C.

95 {
96  return std::numeric_limits<Real>::max();
97 }

◆ minimumPermissibleValue()

template<ComputeStage compute_stage>
ADReal ADSingleVariableReturnMappingSolution< compute_stage >::minimumPermissibleValue ( const ADReal &  effective_trial_stress) const
protectedvirtualinherited

Compute the minimum permissible value of the scalar.

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

Parameters
effective_trial_stressEffective trial stress

Reimplemented in ADViscoplasticityStressUpdate< compute_stage >, and ADRadialReturnStressUpdate< compute_stage >.

Definition at line 85 of file ADSingleVariableReturnMappingSolution.C.

87 {
88  return std::numeric_limits<Real>::lowest();
89 }

◆ outputIterationStep()

template<ComputeStage compute_stage>
void ADSingleVariableReturnMappingSolution< compute_stage >::outputIterationStep ( std::stringstream *  iter_output,
const ADReal &  effective_trial_stress,
const ADReal &  scalar,
const Real  reference_residual 
)
protectedvirtualinherited

Output information for a single iteration step to build the convergence history of the model.

Parameters
iter_outputOutput stream
itCurrent iteration count
effective_trial_stressEffective trial stress
scalarInelastic strain increment magnitude being solved for
residualCurrent value of the residual
referenceCurrent value of the reference quantity

Definition at line 393 of file ADSingleVariableReturnMappingSolution.C.

398 {
399  if (iter_output)
400  {
401  const unsigned int it = _iteration;
402  const Real residual = MetaPhysicL::raw_value(_residual);
403 
404  *iter_output << " iteration=" << it
405  << " trial_stress=" << MetaPhysicL::raw_value(effective_trial_stress)
406  << " scalar=" << MetaPhysicL::raw_value(scalar) << " residual=" << residual
407  << " ref_res=" << reference_residual
408  << " rel_res=" << std::abs(residual) / reference_residual
409  << " rel_tol=" << _relative_tolerance << " abs_res=" << std::abs(residual)
410  << " abs_tol=" << _absolute_tolerance << '\n';
411  }
412 }

◆ outputIterationSummary()

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

Output summary information for the convergence history of the model.

Parameters
iter_outputOutput stream
total_itTotal iteration count

Reimplemented from ADSingleVariableReturnMappingSolution< compute_stage >.

Definition at line 106 of file ADViscoplasticityStressUpdateBase.C.

108 {
109  if (iter_output)
110  {
111  *iter_output << "At element " << _current_elem->id() << " _qp=" << _qp << " Coordinates "
112  << _q_point[_qp] << " block=" << _current_elem->subdomain_id() << '\n';
113  }
115  total_it);
116 }

◆ propagateQpStatefulProperties()

template<ComputeStage compute_stage>
void ADViscoplasticityStressUpdateBase< compute_stage >::propagateQpStatefulProperties ( )
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

Reimplemented from ADStressUpdateBase< compute_stage >.

Definition at line 74 of file ADViscoplasticityStressUpdateBase.C.

75 {
76  _effective_inelastic_strain[_qp] = _effective_inelastic_strain_old[_qp];
77  _inelastic_strain[_qp] = _inelastic_strain_old[_qp];
78 }

◆ requiresIsotropicTensor()

template<ComputeStage compute_stage>
bool ADViscoplasticityStressUpdateBase< compute_stage >::requiresIsotropicTensor ( )
inlineoverridevirtual

Does the model require the elasticity tensor to be isotropic?

Implements ADStressUpdateBase< compute_stage >.

Definition at line 58 of file ADViscoplasticityStressUpdateBase.h.

58 { return true; }

◆ resetProperties()

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

Definition at line 104 of file ADStressUpdateBase.h.

104 {}

◆ 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 103 of file ADStressUpdateBase.h.

103 {}

◆ 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_stressEffective trial stress
scalarInelastic strain increment magnitude being solved for
consoleConsole output

Definition at line 101 of file ADSingleVariableReturnMappingSolution.C.

103 {
104  // construct the stringstream here only if the debug level is set to ALL
105  std::unique_ptr<std::stringstream> iter_output =
107  ? libmesh_make_unique<std::stringstream>()
108  : nullptr;
109 
110  // do the internal solve and capture iteration info during the first round
111  // iff full history output is requested regardless of whether the solve failed or succeeded
112  auto solve_state =
113  internalSolve(effective_trial_stress,
114  scalar,
115  _internal_solve_full_iteration_history ? iter_output.get() : nullptr);
116  if (solve_state != SolveState::SUCCESS &&
118  {
119  // output suppressed by user, throw immediately
121  throw MooseException("");
122 
123  // user expects some kind of output, if necessary setup output stream now
124  if (!iter_output)
125  iter_output = libmesh_make_unique<std::stringstream>();
126 
127  // add the appropriate error message to the output
128  switch (solve_state)
129  {
130  case SolveState::NAN_INF:
131  *iter_output << "Encountered inf or nan in material return mapping iterations.\n";
132  break;
133 
135  *iter_output << "Exceeded maximum iterations in material return mapping iterations.\n";
136  break;
137 
138  default:
139  mooseError("Unhandled solver state");
140  }
141 
142  // if full history output is only requested for failed solves we have to repeat
143  // the solve a second time
145  internalSolve(effective_trial_stress, scalar, iter_output.get());
146 
147  // Append summary and throw exception
148  outputIterationSummary(iter_output.get(), _iteration);
149  throw MooseException(iter_output->str());
150  }
151 
153  {
154  // the solve did not fail but the user requested debug output anyways
155  outputIterationSummary(iter_output.get(), _iteration);
156  console << iter_output->str();
157  }
158 }

◆ 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 47 of file ADStressUpdateBase.C.

48 {
49  _qp = qp;
50 }

◆ updateBounds()

template<ComputeStage compute_stage>
void ADSingleVariableReturnMappingSolution< compute_stage >::updateBounds ( const ADReal &  scalar,
const ADReal &  residual,
const Real  init_resid_sign,
ADReal &  scalar_upper_bound,
ADReal &  scalar_lower_bound,
std::stringstream *  iter_output 
)
privateinherited

Update the upper and lower bounds of the root for the effective inelastic strain.

Parameters
scalarCurrent value of the inelastic strain increment
residualCurrent value of the residual
init_resid_signSign of the initial value of the residual
scalar_upper_boundUpper bound value of scalar
scalar_lower_boundLower bound value of scalar
iter_outputOutput stream

Definition at line 365 of file ADSingleVariableReturnMappingSolution.C.

371 {
372  // Update upper/lower bounds as applicable
373  if (residual * init_resid_sign < 0.0 && scalar < scalar_upper_bound)
374  {
375  scalar_upper_bound = scalar;
376  if (scalar_upper_bound < scalar_lower_bound)
377  {
378  scalar_upper_bound = scalar_lower_bound;
379  scalar_lower_bound = 0.0;
380  if (iter_output)
381  *iter_output << " Corrected for scalar_upper_bound < scalar_lower_bound" << std::endl;
382  }
383  }
384  // Don't permit setting scalar_lower_bound > scalar_upper_bound (but do permit the reverse).
385  // This ensures that if we encounter multiple roots, we pick the lowest one.
386  else if (residual * init_resid_sign > 0.0 && scalar > scalar_lower_bound &&
387  scalar < scalar_upper_bound)
388  scalar_lower_bound = scalar;
389 }

◆ updateIntermediatePorosity()

template<ComputeStage compute_stage>
void ADViscoplasticityStressUpdateBase< compute_stage >::updateIntermediatePorosity ( const ADRankTwoTensor &  elastic_strain_increment)
protected

Definition at line 120 of file ADViscoplasticityStressUpdateBase.C.

122 {
123  // Subtract elastic strain from strain increment to find all inelastic strain increments
124  // calculated so far except the one that we're about to calculate
125  const ADRankTwoTensor inelastic_volumetric_increment =
126  _strain_increment[_qp] - elastic_strain_increment;
127 
128  // Calculate intermdiate porosity from all inelastic strain increments calculated so far except
129  // the one that we're about to calculate
131  (1.0 - _porosity_old[_qp]) * inelastic_volumetric_increment.trace() + _porosity_old[_qp];
132 }

◆ updateState()

template<ComputeStage compute_stage>
virtual void ADStressUpdateBase< compute_stage >::updateState ( ADRankTwoTensor &  strain_increment,
ADRankTwoTensor &  inelastic_strain_increment,
const ADRankTwoTensor &  rotation_increment,
ADRankTwoTensor &  stress_new,
const RankTwoTensor stress_old,
const ADRankFourTensor &  elasticity_tensor,
const RankTwoTensor elastic_strain_old 
)
pure virtualinherited

Given a strain increment that results in a trial stress, perform some procedure (such as an iterative return-mapping process) to produce an admissible stress, an elastic strain increment and an inelastic strain increment.

If _fe_problem.currentlyComputingJacobian() = true, then updateState also computes d(stress)/d(strain) (or some approximation to it).

This method is called by ComputeMultipleInelasticStress. This method is pure virtual: all inheriting classes must overwrite this method.

Parameters
strain_incrementUpon input: the strain increment. Upon output: the elastic strain increment
inelastic_strain_incrementThe inelastic_strain resulting from the iterative procedure
rotation_incrementThe finite-strain rotation increment
stress_newUpon input: the trial stress that results from applying strain_increment as an elastic strain. Upon output: the admissible stress
stress_oldThe old value of stress
elasticity_tensorThe elasticity tensor

Implemented in ADRadialReturnStressUpdate< compute_stage >, and ADViscoplasticityStressUpdate< compute_stage >.

◆ validParams()

template<ComputeStage compute_stage>
InputParameters ADViscoplasticityStressUpdateBase< compute_stage >::validParams ( )
static

Definition at line 16 of file ADViscoplasticityStressUpdateBase.C.

17 {
18  InputParameters params = ADStressUpdateBase<compute_stage>::validParams();
20  params.addClassDescription("Base class used to calculate viscoplastic responses to be used in "
21  "ADComputeMultiplePorousInelasticStress");
22  params.addParam<Real>("max_inelastic_increment",
23  1.0e-4,
24  "The maximum inelastic strain increment allowed in a time step");
25  params.addParam<std::string>(
26  "inelastic_strain_name",
27  "viscoplasticity",
28  "Name of the material property that stores the effective inelastic strain");
29  params.addParam<bool>("verbose", false, "Flag to output verbose information");
30  params.addParam<MaterialPropertyName>(
31  "porosity_name", "porosity", "Name of porosity material property");
32  params.addParam<std::string>("total_strain_base_name", "Base name for the total strain");
33 
34  params.addParamNamesToGroup("inelastic_strain_name", "Advanced");
35  return params;
36 }

Referenced by ADViscoplasticityStressUpdate< compute_stage >::validParams().

Member Data Documentation

◆ _absolute_tolerance

template<ComputeStage compute_stage>
Real ADSingleVariableReturnMappingSolution< compute_stage >::_absolute_tolerance
privateinherited

Absolute convergence tolerance.

Definition at line 181 of file ADSingleVariableReturnMappingSolution.h.

◆ _acceptable_multiplier

template<ComputeStage compute_stage>
Real ADSingleVariableReturnMappingSolution< compute_stage >::_acceptable_multiplier
privateinherited

Multiplier applied to relative and absolute tolerances for acceptable convergence.

Definition at line 184 of file ADSingleVariableReturnMappingSolution.h.

◆ _base_name

template<ComputeStage compute_stage>
const std::string ADStressUpdateBase< compute_stage >::_base_name
protectedinherited

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

Definition at line 109 of file ADStressUpdateBase.h.

◆ _bracket_solution

template<ComputeStage compute_stage>
bool ADSingleVariableReturnMappingSolution< compute_stage >::_bracket_solution
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 131 of file ADSingleVariableReturnMappingSolution.h.

◆ _check_range

template<ComputeStage compute_stage>
bool ADSingleVariableReturnMappingSolution< compute_stage >::_check_range
protectedinherited

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

Definition at line 124 of file ADSingleVariableReturnMappingSolution.h.

Referenced by ADViscoplasticityStressUpdate< compute_stage >::ADViscoplasticityStressUpdate().

◆ _derivative

template<ComputeStage compute_stage>
ADReal ADViscoplasticityStressUpdateBase< compute_stage >::_derivative
protected

Container for _derivative.

Definition at line 121 of file ADViscoplasticityStressUpdateBase.h.

Referenced by ADViscoplasticityStressUpdateBase< compute_stage >::computeDerivative().

◆ _effective_inelastic_strain_old

template<ComputeStage compute_stage>
const MaterialProperty<Real>& ADViscoplasticityStressUpdateBase< compute_stage >::_effective_inelastic_strain_old
protected

Definition at line 100 of file ADViscoplasticityStressUpdateBase.h.

◆ _inelastic_strain_old

template<ComputeStage compute_stage>
const MaterialProperty<RankTwoTensor>& ADViscoplasticityStressUpdateBase< compute_stage >::_inelastic_strain_old
protected

Definition at line 105 of file ADViscoplasticityStressUpdateBase.h.

◆ _initial_residual

template<ComputeStage compute_stage>
ADReal ADSingleVariableReturnMappingSolution< compute_stage >::_initial_residual
privateinherited

Residual values, kept as members to retain solver state for summary outputting.

Definition at line 196 of file ADSingleVariableReturnMappingSolution.h.

◆ _intermediate_porosity

template<ComputeStage compute_stage>
ADReal ADViscoplasticityStressUpdateBase< compute_stage >::_intermediate_porosity
protected

Container for the porosity calculated from all other intelastic models except the current model.

Definition at line 112 of file ADViscoplasticityStressUpdateBase.h.

◆ _internal_solve_full_iteration_history

template<ComputeStage compute_stage>
const bool ADSingleVariableReturnMappingSolution< compute_stage >::_internal_solve_full_iteration_history
privateinherited

Whether to output iteration information all the time (regardless of whether iterations converge)

Definition at line 175 of file ADSingleVariableReturnMappingSolution.h.

◆ _internal_solve_output_on

template<ComputeStage compute_stage>
enum ADSingleVariableReturnMappingSolution::InternalSolveOutput ADSingleVariableReturnMappingSolution< compute_stage >::_internal_solve_output_on
privateinherited

◆ _iteration

template<ComputeStage compute_stage>
unsigned int ADSingleVariableReturnMappingSolution< compute_stage >::_iteration
privateinherited

iteration number

Definition at line 193 of file ADSingleVariableReturnMappingSolution.h.

◆ _line_search

template<ComputeStage compute_stage>
bool ADSingleVariableReturnMappingSolution< compute_stage >::_line_search
protectedinherited

Whether to use line searches to improve convergence.

Definition at line 127 of file ADSingleVariableReturnMappingSolution.h.

◆ _max_inelastic_increment

template<ComputeStage compute_stage>
Real ADViscoplasticityStressUpdateBase< compute_stage >::_max_inelastic_increment
protected

Max increment for inelastic strain.

Definition at line 109 of file ADViscoplasticityStressUpdateBase.h.

◆ _max_its

template<ComputeStage compute_stage>
const unsigned int ADSingleVariableReturnMappingSolution< compute_stage >::_max_its
privateinherited

Maximum number of return mapping iterations.

This exists only to avoid an infinite loop, and is is intended to be a large number that is not settable by the user.

Definition at line 172 of file ADSingleVariableReturnMappingSolution.h.

◆ _num_resids

template<ComputeStage compute_stage>
const std::size_t ADSingleVariableReturnMappingSolution< compute_stage >::_num_resids
privateinherited

Number of residuals to be stored in history.

Definition at line 187 of file ADSingleVariableReturnMappingSolution.h.

◆ _porosity_old

template<ComputeStage compute_stage>
const MaterialProperty<Real>& ADViscoplasticityStressUpdateBase< compute_stage >::_porosity_old
protected

Material property for the old porosity.

Definition at line 115 of file ADViscoplasticityStressUpdateBase.h.

◆ _relative_tolerance

template<ComputeStage compute_stage>
Real ADSingleVariableReturnMappingSolution< compute_stage >::_relative_tolerance
privateinherited

Relative convergence tolerance.

Definition at line 178 of file ADSingleVariableReturnMappingSolution.h.

◆ _residual

template<ComputeStage compute_stage>
ADReal ADSingleVariableReturnMappingSolution< compute_stage >::_residual
privateinherited

Definition at line 197 of file ADSingleVariableReturnMappingSolution.h.

◆ _residual_history

template<ComputeStage compute_stage>
std::vector<Real> ADSingleVariableReturnMappingSolution< compute_stage >::_residual_history
privateinherited

History of residuals used to check whether progress is still being made on decreasing the residual.

Definition at line 190 of file ADSingleVariableReturnMappingSolution.h.

◆ _svrms_name

template<ComputeStage compute_stage>
const std::string ADSingleVariableReturnMappingSolution< compute_stage >::_svrms_name
privateinherited

MOOSE input name of the object performing the solve.

Definition at line 201 of file ADSingleVariableReturnMappingSolution.h.

◆ _total_strain_base_name

template<ComputeStage compute_stage>
const std::string ADViscoplasticityStressUpdateBase< compute_stage >::_total_strain_base_name
protected

String designating the base name of the total strain.

Definition at line 93 of file ADViscoplasticityStressUpdateBase.h.

◆ _verbose

template<ComputeStage compute_stage>
const bool ADViscoplasticityStressUpdateBase< compute_stage >::_verbose
protected

Flag to enable verbose output.

Definition at line 118 of file ADViscoplasticityStressUpdateBase.h.

◆ usingMaterialMembers

template<ComputeStage compute_stage>
ADStressUpdateBase< compute_stage >::usingMaterialMembers
protectedinherited

Definition at line 111 of file ADStressUpdateBase.h.

◆ usingSingleVariableReturnMappingSolutionMembers

template<ComputeStage compute_stage>
ADViscoplasticityStressUpdateBase< compute_stage >::usingSingleVariableReturnMappingSolutionMembers
protected

Definition at line 124 of file ADViscoplasticityStressUpdateBase.h.

◆ usingStressUpdateBaseMembers

template<ComputeStage compute_stage>
ADViscoplasticityStressUpdateBase< compute_stage >::usingStressUpdateBaseMembers
protected

Definition at line 123 of file ADViscoplasticityStressUpdateBase.h.


The documentation for this class was generated from the following files:
ADSingleVariableReturnMappingSolution::initialGuess
virtual ADReal initialGuess(const ADReal &)
Compute an initial guess for the value of the scalar.
Definition: ADSingleVariableReturnMappingSolution.h:82
ADSingleVariableReturnMappingSolution::InternalSolveOutput::NEVER
ADSingleVariableReturnMappingSolution::_internal_solve_full_iteration_history
const bool _internal_solve_full_iteration_history
Whether to output iteration information all the time (regardless of whether iterations converge)
Definition: ADSingleVariableReturnMappingSolution.h:175
ADSingleVariableReturnMappingSolution::SolveState::EXCEEDED_ITERATIONS
ADSingleVariableReturnMappingSolution::SolveState::NAN_INF
ADSingleVariableReturnMappingSolution::_bracket_solution
bool _bracket_solution
Whether to save upper and lower bounds of root for scalar, and set solution to the midpoint between t...
Definition: ADSingleVariableReturnMappingSolution.h:131
ADSingleVariableReturnMappingSolution::outputIterationStep
virtual void outputIterationStep(std::stringstream *iter_output, const ADReal &effective_trial_stress, const ADReal &scalar, const Real reference_residual)
Output information for a single iteration step to build the convergence history of the model.
Definition: ADSingleVariableReturnMappingSolution.C:393
ADSingleVariableReturnMappingSolution::_iteration
unsigned int _iteration
iteration number
Definition: ADSingleVariableReturnMappingSolution.h:193
ADViscoplasticityStressUpdateBase::_porosity_old
const MaterialProperty< Real > & _porosity_old
Material property for the old porosity.
Definition: ADViscoplasticityStressUpdateBase.h:115
ADSingleVariableReturnMappingSolution::_initial_residual
ADReal _initial_residual
Residual values, kept as members to retain solver state for summary outputting.
Definition: ADSingleVariableReturnMappingSolution.h:196
ADViscoplasticityStressUpdateBase::_intermediate_porosity
ADReal _intermediate_porosity
Container for the porosity calculated from all other intelastic models except the current model.
Definition: ADViscoplasticityStressUpdateBase.h:112
ADSingleVariableReturnMappingSolution::convergedAcceptable
bool convergedAcceptable(const unsigned int it, const Real reference)
Check to see whether the residual is within acceptable convergence limits.
Definition: ADSingleVariableReturnMappingSolution.C:311
ADSingleVariableReturnMappingSolution::_residual_history
std::vector< Real > _residual_history
History of residuals used to check whether progress is still being made on decreasing the residual.
Definition: ADSingleVariableReturnMappingSolution.h:190
ADSingleVariableReturnMappingSolution::maximumPermissibleValue
virtual ADReal maximumPermissibleValue(const ADReal &effective_trial_stress) const
Compute the maximum permissible value of the scalar.
Definition: ADSingleVariableReturnMappingSolution.C:93
ADSingleVariableReturnMappingSolution::validParams
static InputParameters validParams()
Definition: ADSingleVariableReturnMappingSolution.C:32
ADViscoplasticityStressUpdateBase::_max_inelastic_increment
Real _max_inelastic_increment
Max increment for inelastic strain.
Definition: ADViscoplasticityStressUpdateBase.h:109
ADSingleVariableReturnMappingSolution::_relative_tolerance
Real _relative_tolerance
Relative convergence tolerance.
Definition: ADSingleVariableReturnMappingSolution.h:178
ADViscoplasticityStressUpdateBase::_inelastic_strain_old
const MaterialProperty< RankTwoTensor > & _inelastic_strain_old
Definition: ADViscoplasticityStressUpdateBase.h:105
ADSingleVariableReturnMappingSolution::_internal_solve_output_on
enum ADSingleVariableReturnMappingSolution::InternalSolveOutput _internal_solve_output_on
ADSingleVariableReturnMappingSolution::_residual
ADReal _residual
Definition: ADSingleVariableReturnMappingSolution.h:197
ADStressUpdateBase
ADStressUpdateBase is a material that is not called by MOOSE because of the compute=false flag set in...
Definition: ADComputeMultipleInelasticStress.h:28
ADSingleVariableReturnMappingSolution::_acceptable_multiplier
Real _acceptable_multiplier
Multiplier applied to relative and absolute tolerances for acceptable convergence.
Definition: ADSingleVariableReturnMappingSolution.h:184
ADSingleVariableReturnMappingSolution::converged
bool converged(const ADReal &residual, const Real reference)
Check to see whether the residual is within the convergence limits.
Definition: ADSingleVariableReturnMappingSolution.C:301
ADSingleVariableReturnMappingSolution::updateBounds
void updateBounds(const ADReal &scalar, const ADReal &residual, const Real init_resid_sign, ADReal &scalar_upper_bound, ADReal &scalar_lower_bound, std::stringstream *iter_output)
Update the upper and lower bounds of the root for the effective inelastic strain.
Definition: ADSingleVariableReturnMappingSolution.C:365
ADSingleVariableReturnMappingSolution::InternalSolveOutput::ALWAYS
ADSingleVariableReturnMappingSolution::_max_its
const unsigned int _max_its
Maximum number of return mapping iterations.
Definition: ADSingleVariableReturnMappingSolution.h:172
ADViscoplasticityStressUpdateBase::_effective_inelastic_strain_old
const MaterialProperty< Real > & _effective_inelastic_strain_old
Definition: ADViscoplasticityStressUpdateBase.h:100
ADSingleVariableReturnMappingSolution::checkPermissibleRange
void checkPermissibleRange(ADReal &scalar, ADReal &scalar_increment, const ADReal &scalar_old, const ADReal min_permissible_scalar, const ADReal max_permissible_scalar, std::stringstream *iter_output)
Check to see whether solution is within admissible range, and set it within that range if it is not.
Definition: ADSingleVariableReturnMappingSolution.C:334
ADSingleVariableReturnMappingSolution::iterationFinalize
virtual void iterationFinalize(ADReal)
Finalize internal state variables for a model for a given iteration.
Definition: ADSingleVariableReturnMappingSolution.h:114
ADSingleVariableReturnMappingSolution::minimumPermissibleValue
virtual ADReal minimumPermissibleValue(const ADReal &effective_trial_stress) const
Compute the minimum permissible value of the scalar.
Definition: ADSingleVariableReturnMappingSolution.C:85
ADSingleVariableReturnMappingSolution::_check_range
bool _check_range
Whether to check to see whether iterative solution is within admissible range, and set within that ra...
Definition: ADSingleVariableReturnMappingSolution.h:124
ADViscoplasticityStressUpdateBase::_total_strain_base_name
const std::string _total_strain_base_name
String designating the base name of the total strain.
Definition: ADViscoplasticityStressUpdateBase.h:93
ADSingleVariableReturnMappingSolution::_num_resids
const std::size_t _num_resids
Number of residuals to be stored in history.
Definition: ADSingleVariableReturnMappingSolution.h:187
ADSingleVariableReturnMappingSolution::SolveState::SUCCESS
ADStressUpdateBase::_base_name
const std::string _base_name
Name used as a prefix for all material properties related to the stress update model.
Definition: ADStressUpdateBase.h:109
ADViscoplasticityStressUpdateBase::_derivative
ADReal _derivative
Container for _derivative.
Definition: ADViscoplasticityStressUpdateBase.h:121
ADViscoplasticityStressUpdateBase::_verbose
const bool _verbose
Flag to enable verbose output.
Definition: ADViscoplasticityStressUpdateBase.h:118
ADSingleVariableReturnMappingSolution::_absolute_tolerance
Real _absolute_tolerance
Absolute convergence tolerance.
Definition: ADSingleVariableReturnMappingSolution.h:181
ADSingleVariableReturnMappingSolution::_line_search
bool _line_search
Whether to use line searches to improve convergence.
Definition: ADSingleVariableReturnMappingSolution.h:127
ADSingleVariableReturnMappingSolution::computeResidual
virtual ADReal computeResidual(const ADReal &effective_trial_stress, const ADReal &scalar)=0
Compute the residual for a predicted value of the scalar.
ADSingleVariableReturnMappingSolution::outputIterationSummary
virtual void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it)
Output summary information for the convergence history of the model.
Definition: ADSingleVariableReturnMappingSolution.C:416
ADSingleVariableReturnMappingSolution::internalSolve
SolveState internalSolve(const ADReal effective_trial_stress, ADReal &scalar, std::stringstream *iter_output=nullptr)
Method called from within this class to perform the actual return mappping iterations.
Definition: ADSingleVariableReturnMappingSolution.C:162
ADSingleVariableReturnMappingSolution
Base class that provides capability for Newton return mapping iterations on a single variable.
Definition: ADSingleVariableReturnMappingSolution.h:32
ADStressUpdateBase::validParams
static InputParameters validParams()
Definition: ADStressUpdateBase.C:19
ADSingleVariableReturnMappingSolution::computeDerivative
virtual ADReal computeDerivative(const ADReal &effective_trial_stress, const ADReal &scalar)=0
Compute the derivative of the residual as a function of the scalar variable.
ADSingleVariableReturnMappingSolution::computeReferenceResidual
virtual Real computeReferenceResidual(const ADReal &effective_trial_stress, const ADReal &scalar)=0
Compute a reference quantity to be used for checking relative convergence.