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

This class uses the Discrete material in a radial return isotropic plasticity model. More...

#include <IsotropicPowerLawHardeningStressUpdate.h>

Inheritance diagram for IsotropicPowerLawHardeningStressUpdate:
[legend]

Public Member Functions

 IsotropicPowerLawHardeningStressUpdate (const InputParameters &parameters)
 
virtual void updateState (RankTwoTensor &strain_increment, RankTwoTensor &inelastic_strain_increment, const RankTwoTensor &rotation_increment, RankTwoTensor &stress_new, const RankTwoTensor &stress_old, const RankFourTensor &elasticity_tensor, const RankTwoTensor &elastic_strain_old, bool compute_full_tangent_operator, RankFourTensor &tangent_operator) override
 A radial return (J2) mapping method is performed with return mapping iterations. More...
 
virtual Real computeReferenceResidual (const Real effective_trial_stress, const Real scalar_effective_inelastic_strain) override
 Compute a reference quantity to be used for checking relative convergence. More...
 
virtual Real minimumPermissibleValue (const Real) const override
 Compute the minimum permissible value of the scalar. More...
 
virtual Real maximumPermissibleValue (const Real effective_trial_stress) const override
 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...
 
virtual TangentCalculationMethod getTangentCalculationMethod ()
 
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 computeStressInitialize (const Real effective_trial_stress, const RankFourTensor &elasticity_tensor) override
 Perform any necessary initialization before return mapping iterations. More...
 
virtual void computeYieldStress (const RankFourTensor &elasticity_tensor) override
 
virtual Real computeHardeningDerivative (Real scalar) override
 
Real getIsotropicLameLambda (const RankFourTensor &elasticity_tensor)
 
virtual void initQpStatefulProperties () override
 
virtual void propagateQpStatefulProperties () override
 If updateState is not called during a timestep, this will be. More...
 
virtual Real computeResidual (const Real effective_trial_stress, const Real scalar) override
 Compute the residual for a predicted value of the scalar. More...
 
virtual Real computeDerivative (const Real effective_trial_stress, const Real scalar) override
 Compute the derivative of the residual as a function of the scalar variable. More...
 
virtual void iterationFinalize (Real scalar) override
 Finalize internal state variables for a model for a given iteration. More...
 
virtual void computeStressFinalize (const RankTwoTensor &plasticStrainIncrement) override
 Perform any necessary steps to finalize state after return mapping iterations. More...
 
virtual Real computeHardeningValue (Real scalar)
 
void propagateQpStatefulPropertiesRadialReturn ()
 Propagate the properties pertaining to this intermediate class. More...
 
virtual Real computeStressDerivative (const Real, const Real)
 Calculate the derivative of the strain increment with respect to the updated stress. More...
 
void outputIterationSummary (std::stringstream *iter_output, const unsigned int total_it) override
 Output summary information for the convergence history of the model. More...
 
void returnMappingSolve (const Real effective_trial_stress, Real &scalar, const ConsoleStream &console)
 Perform the return mapping iterations. More...
 
virtual Real initialGuess (const Real)
 Compute an initial guess for the value of the scalar. More...
 
virtual void outputIterationStep (std::stringstream *iter_output, const unsigned int it, const Real effective_trial_stress, const Real scalar, const Real residual, const Real reference_residual)
 Output information for a single iteration step to build the convergence history of the model. More...
 

Protected Attributes

Real _youngs_modulus
 Elastic constants. More...
 
Real _effective_trial_stress
 
const std::string _plastic_prepend
 a string to prepend to the plastic strain Material Property name More...
 
Function * _yield_stress_function
 
Real _yield_stress
 
const Real _hardening_constant
 
Function * _hardening_function
 
Real _yield_condition
 
Real _hardening_slope
 
MaterialProperty< RankTwoTensor > & _plastic_strain
 plastic strain in this model More...
 
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
 old value of plastic strain More...
 
MaterialProperty< Real > & _hardening_variable
 
const MaterialProperty< Real > & _hardening_variable_old
 
const VariableValue & _temperature
 
Real _three_shear_modulus
 3 * shear modulus More...
 
MaterialProperty< Real > & _effective_inelastic_strain
 
const MaterialProperty< Real > & _effective_inelastic_strain_old
 
Real _max_inelastic_increment
 
const RankTwoTensor _identity_two
 Rank two identity tensor. More...
 
const RankFourTensor _identity_symmetric_four
 Rank four symmetric identity tensor. More...
 
const RankFourTensor _deviatoric_projection_four
 Rank four deviatoric projection tensor. More...
 
const std::string _base_name
 Name used as a prefix for all material properties related to the stress update model. More...
 
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...
 
Real _K
 Power law hardening coefficients. More...
 
Real _strain_hardening_exponent
 

Detailed Description

This class uses the Discrete material in a radial return isotropic plasticity model.

This class is one of the basic radial return constitutive models; more complex constitutive models combine creep and plasticity.

This class models power law hardening by using the relation \( \sigma = \sigma_y + K \epsilon^n \) where \( \sigma_y \) is the yield stress. This class solves for the yield stress as the intersection of the power law relation curve and Hooke's law: \( \epsilon_y = \frac{\sigma_y}{E} = \left( \frac{\sigma_y}{K} \right)^n \) where \(epsilon_y \) is the total strain at the yield point and the stress \( \sigma_y \) is the von Mises stress. Parameters from the parent class, IsotropicPlasticityStressUpdate, are suppressed to enable this class to solve for yield stress: \( \sigma_y = \left( \frac{E^n}{K} \right)^{1/(n-1)} \)

Definition at line 37 of file IsotropicPowerLawHardeningStressUpdate.h.

Constructor & Destructor Documentation

◆ IsotropicPowerLawHardeningStressUpdate()

IsotropicPowerLawHardeningStressUpdate::IsotropicPowerLawHardeningStressUpdate ( const InputParameters &  parameters)

Definition at line 43 of file IsotropicPowerLawHardeningStressUpdate.C.

45  : IsotropicPlasticityStressUpdate(parameters),
46  _K(parameters.get<Real>("strength_coefficient")),
47  _strain_hardening_exponent(parameters.get<Real>("strain_hardening_exponent"))
48 {
49 }
IsotropicPlasticityStressUpdate(const InputParameters &parameters)

Member Function Documentation

◆ computeDerivative()

Real IsotropicPlasticityStressUpdate::computeDerivative ( const Real  effective_trial_stress,
const Real  scalar 
)
overrideprotectedvirtualinherited

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 SingleVariableReturnMappingSolution.

Definition at line 127 of file IsotropicPlasticityStressUpdate.C.

129 {
130  Real derivative = 1.0;
131  if (_yield_condition > 0.0)
132  derivative = -1.0 - _hardening_slope / _three_shear_modulus;
133 
134  return derivative;
135 }
Real _three_shear_modulus
3 * shear modulus

◆ computeHardeningDerivative()

Real IsotropicPowerLawHardeningStressUpdate::computeHardeningDerivative ( Real  scalar)
overrideprotectedvirtual

Reimplemented from IsotropicPlasticityStressUpdate.

Definition at line 65 of file IsotropicPowerLawHardeningStressUpdate.C.

66 {
67  const Real stress_delta = _effective_trial_stress - _three_shear_modulus * scalar;
68  Real slope = std::pow(stress_delta, (1.0 / _strain_hardening_exponent - 1.0)) /
70  slope -= 1.0 / _youngs_modulus;
71 
72  return 1.0 / slope;
73 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real _three_shear_modulus
3 * shear modulus

◆ computeHardeningValue()

Real IsotropicPlasticityStressUpdate::computeHardeningValue ( Real  scalar)
protectedvirtualinherited

Reimplemented in TemperatureDependentHardeningStressUpdate.

Definition at line 151 of file IsotropicPlasticityStressUpdate.C.

Referenced by IsotropicPlasticityStressUpdate::computeResidual(), and IsotropicPlasticityStressUpdate::iterationFinalize().

152 {
153  Real value = _hardening_variable_old[_qp] + (_hardening_slope * scalar);
155  {
156  const Real strain_old = _effective_inelastic_strain_old[_qp];
157  Point p;
158 
159  value = _hardening_function->value(strain_old + scalar, p) - _yield_stress;
160  }
161  return value;
162 }
const MaterialProperty< Real > & _effective_inelastic_strain_old
const MaterialProperty< Real > & _hardening_variable_old

◆ computeReferenceResidual()

Real RadialReturnStressUpdate::computeReferenceResidual ( const Real  effective_trial_stress,
const Real  scalar 
)
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_stressEffective trial stress
scalarInelastic strain increment magnitude being solved for

Implements SingleVariableReturnMappingSolution.

Definition at line 149 of file RadialReturnStressUpdate.C.

151 {
152  return effective_trial_stress / _three_shear_modulus - scalar_effective_inelastic_strain;
153 }
Real _three_shear_modulus
3 * shear modulus

◆ computeResidual()

Real IsotropicPlasticityStressUpdate::computeResidual ( const Real  effective_trial_stress,
const Real  scalar 
)
overrideprotectedvirtualinherited

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

Implements SingleVariableReturnMappingSolution.

Definition at line 106 of file IsotropicPlasticityStressUpdate.C.

108 {
109  Real residual = 0.0;
110 
111  mooseAssert(_yield_condition != -1.0,
112  "the yield stress was not updated by computeStressInitialize");
113 
114  if (_yield_condition > 0.0)
115  {
118 
119  residual =
120  (effective_trial_stress - _hardening_variable[_qp] - _yield_stress) / _three_shear_modulus -
121  scalar;
122  }
123  return residual;
124 }
virtual Real computeHardeningDerivative(Real scalar)
Real _three_shear_modulus
3 * shear modulus

◆ computeStressDerivative()

virtual Real RadialReturnStressUpdate::computeStressDerivative ( const Real  ,
const Real   
)
inlineprotectedvirtualinherited

Calculate the derivative of the strain increment with respect to the updated stress.

Parameters
effective_trial_stressEffective trial stress
scalarInelastic strain increment magnitude being solved for

Reimplemented in RadialReturnCreepStressUpdateBase.

Definition at line 112 of file RadialReturnStressUpdate.h.

Referenced by RadialReturnStressUpdate::updateState().

113  {
114  return 0.0;
115  }

◆ computeStressFinalize()

void IsotropicPlasticityStressUpdate::computeStressFinalize ( const RankTwoTensor &  )
overrideprotectedvirtualinherited

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

Parameters
inelasticStrainIncrementInelastic strain increment

Reimplemented from RadialReturnStressUpdate.

Definition at line 145 of file IsotropicPlasticityStressUpdate.C.

146 {
147  _plastic_strain[_qp] += plasticStrainIncrement;
148 }
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain in this model

◆ computeStressInitialize()

void IsotropicPowerLawHardeningStressUpdate::computeStressInitialize ( const Real  ,
const RankFourTensor &   
)
overrideprotectedvirtual

Perform any necessary initialization before return mapping iterations.

Parameters
effective_trial_stressEffective trial stress
elasticityTensorElasticity tensor

Reimplemented from IsotropicPlasticityStressUpdate.

Definition at line 52 of file IsotropicPowerLawHardeningStressUpdate.C.

54 {
55  computeYieldStress(elasticity_tensor);
56 
57  _effective_trial_stress = effective_trial_stress;
58  _yield_condition = effective_trial_stress - _hardening_variable_old[_qp] - _yield_stress;
59 
62 }
const MaterialProperty< Real > & _hardening_variable_old
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
old value of plastic strain
virtual void computeYieldStress(const RankFourTensor &elasticity_tensor) override
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain in this model

◆ computeTimeStepLimit()

Real RadialReturnStressUpdate::computeTimeStepLimit ( )
overridevirtualinherited

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

Returns
Limiting time step

Reimplemented from StressUpdateBase.

Definition at line 162 of file RadialReturnStressUpdate.C.

163 {
164  Real scalar_inelastic_strain_incr;
165 
166  scalar_inelastic_strain_incr =
168  if (MooseUtils::absoluteFuzzyEqual(scalar_inelastic_strain_incr, 0.0))
169  return std::numeric_limits<Real>::max();
170 
171  return _dt * _max_inelastic_increment / scalar_inelastic_strain_incr;
172 }
const MaterialProperty< Real > & _effective_inelastic_strain_old
MaterialProperty< Real > & _effective_inelastic_strain

◆ computeYieldStress()

void IsotropicPowerLawHardeningStressUpdate::computeYieldStress ( const RankFourTensor &  elasticity_tensor)
overrideprotectedvirtual

Reimplemented from IsotropicPlasticityStressUpdate.

Definition at line 76 of file IsotropicPowerLawHardeningStressUpdate.C.

Referenced by computeStressInitialize().

77 {
78  // Pull in the Lam\`{e} lambda, and caculate E
79  const Real lambda = getIsotropicLameLambda(elasticity_tensor);
80  const Real shear_modulus = _three_shear_modulus / 3.0;
81 
82  _youngs_modulus = shear_modulus * (3.0 * lambda + 2 * shear_modulus) / (lambda + shear_modulus);
83 
84  // Then solve for yield stress using equation from the header file
86  1.0 / (1.0 - _strain_hardening_exponent));
87  if (_yield_stress <= 0.0)
88  mooseError("The yield stress must be greater than zero, but during the simulation your yield "
89  "stress became less than zero.");
90 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real getIsotropicLameLambda(const RankFourTensor &elasticity_tensor)
Real _three_shear_modulus
3 * shear modulus

◆ getIsotropicLameLambda()

Real IsotropicPowerLawHardeningStressUpdate::getIsotropicLameLambda ( const RankFourTensor &  elasticity_tensor)
protected

Definition at line 93 of file IsotropicPowerLawHardeningStressUpdate.C.

Referenced by computeYieldStress().

95 {
96  const Real lame_lambda = elasticity_tensor(0, 0, 1, 1);
97 
98  if (_mesh.dimension() == 3 && lame_lambda != elasticity_tensor(1, 1, 2, 2))
99  mooseError(
100  "Check to ensure that your Elasticity Tensor is truly Isotropic: different lambda values");
101  return lame_lambda;
102 }

◆ getTangentCalculationMethod()

virtual TangentCalculationMethod StressUpdateBase::getTangentCalculationMethod ( )
inlinevirtualinherited

◆ initialGuess()

virtual Real SingleVariableReturnMappingSolution::initialGuess ( const Real  )
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

Definition at line 63 of file SingleVariableReturnMappingSolution.h.

Referenced by SingleVariableReturnMappingSolution::internalSolve().

63 { return 0.0; }

◆ initQpStatefulProperties()

void IsotropicPlasticityStressUpdate::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented from RadialReturnStressUpdate.

Definition at line 79 of file IsotropicPlasticityStressUpdate.C.

80 {
81  _hardening_variable[_qp] = 0.0;
82  _plastic_strain[_qp].zero();
83 }
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain in this model

◆ iterationFinalize()

void IsotropicPlasticityStressUpdate::iterationFinalize ( Real  )
overrideprotectedvirtualinherited

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

Parameters
scalarInelastic strain increment magnitude being solved for

Reimplemented from SingleVariableReturnMappingSolution.

Definition at line 138 of file IsotropicPlasticityStressUpdate.C.

◆ maximumPermissibleValue()

Real RadialReturnStressUpdate::maximumPermissibleValue ( const Real  effective_trial_stress) const
overridevirtualinherited

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 from SingleVariableReturnMappingSolution.

Definition at line 156 of file RadialReturnStressUpdate.C.

157 {
158  return effective_trial_stress / _three_shear_modulus;
159 }
Real _three_shear_modulus
3 * shear modulus

◆ minimumPermissibleValue()

virtual Real RadialReturnStressUpdate::minimumPermissibleValue ( const Real  effective_trial_stress) const
inlineoverridevirtualinherited

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 from SingleVariableReturnMappingSolution.

Definition at line 66 of file RadialReturnStressUpdate.h.

67  {
68  return 0.0;
69  }

◆ outputIterationStep()

void SingleVariableReturnMappingSolution::outputIterationStep ( std::stringstream *  iter_output,
const unsigned int  it,
const Real  effective_trial_stress,
const Real  scalar,
const Real  residual,
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 327 of file SingleVariableReturnMappingSolution.C.

Referenced by SingleVariableReturnMappingSolution::internalSolve().

333 {
334  if (iter_output)
335  {
336  *iter_output << " iteration=" << it << " trial_stress=" << effective_trial_stress
337  << " scalar=" << scalar << " residual=" << residual
338  << " ref_res=" << reference_residual
339  << " rel_res=" << std::abs(residual) / reference_residual
340  << " rel_tol=" << _relative_tolerance << " abs_res=" << std::abs(residual)
341  << " abs_tol=" << _absolute_tolerance << '\n';
342  }
343 }
Real _relative_tolerance
Relative convergence tolerance.
Real _absolute_tolerance
Absolute convergence tolerance.

◆ outputIterationSummary()

void RadialReturnStressUpdate::outputIterationSummary ( std::stringstream *  iter_output,
const unsigned int  total_it 
)
overrideprotectedvirtualinherited

Output summary information for the convergence history of the model.

Parameters
iter_outputOutput stream
total_itTotal iteration count

Reimplemented from SingleVariableReturnMappingSolution.

Definition at line 175 of file RadialReturnStressUpdate.C.

177 {
178  if (iter_output)
179  {
180  *iter_output << "At element " << _current_elem->id() << " _qp=" << _qp << " Coordinates "
181  << _q_point[_qp] << " block=" << _current_elem->subdomain_id() << '\n';
182  }
184 }
virtual void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it)
Output summary information for the convergence history of the model.

◆ propagateQpStatefulProperties()

void IsotropicPlasticityStressUpdate::propagateQpStatefulProperties ( )
overrideprotectedvirtualinherited

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 StressUpdateBase.

Definition at line 86 of file IsotropicPlasticityStressUpdate.C.

87 {
90 
92 }
const MaterialProperty< Real > & _hardening_variable_old
const MaterialProperty< RankTwoTensor > & _plastic_strain_old
old value of plastic strain
void propagateQpStatefulPropertiesRadialReturn()
Propagate the properties pertaining to this intermediate class.
MaterialProperty< RankTwoTensor > & _plastic_strain
plastic strain in this model

◆ propagateQpStatefulPropertiesRadialReturn()

void RadialReturnStressUpdate::propagateQpStatefulPropertiesRadialReturn ( )
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().

Definition at line 58 of file RadialReturnStressUpdate.C.

Referenced by RadialReturnCreepStressUpdateBase::propagateQpStatefulProperties(), and IsotropicPlasticityStressUpdate::propagateQpStatefulProperties().

59 {
61 }
const MaterialProperty< Real > & _effective_inelastic_strain_old
MaterialProperty< Real > & _effective_inelastic_strain

◆ requiresIsotropicTensor()

bool RadialReturnStressUpdate::requiresIsotropicTensor ( )
inlineoverridevirtualinherited

Does the model require the elasticity tensor to be isotropic?

Implements StressUpdateBase.

Definition at line 82 of file RadialReturnStressUpdate.h.

82 { return true; }

◆ resetProperties()

void StressUpdateBase::resetProperties ( )
inlinefinalinherited

Definition at line 117 of file StressUpdateBase.h.

117 {}

◆ resetQpProperties()

void StressUpdateBase::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 116 of file StressUpdateBase.h.

116 {}

◆ returnMappingSolve()

void SingleVariableReturnMappingSolution::returnMappingSolve ( const Real  effective_trial_stress,
Real &  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 91 of file SingleVariableReturnMappingSolution.C.

Referenced by ReturnMappingModel::computeStress(), and RadialReturnStressUpdate::updateState().

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

◆ setQp()

void StressUpdateBase::setQp ( unsigned int  qp)
inherited

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

Definition at line 42 of file StressUpdateBase.C.

43 {
44  _qp = qp;
45 }

◆ updateState()

void RadialReturnStressUpdate::updateState ( RankTwoTensor &  strain_increment,
RankTwoTensor &  inelastic_strain_increment,
const RankTwoTensor &  rotation_increment,
RankTwoTensor &  stress_new,
const RankTwoTensor &  stress_old,
const RankFourTensor &  elasticity_tensor,
const RankTwoTensor &  elastic_strain_old,
bool  compute_full_tangent_operator,
RankFourTensor &  tangent_operator 
)
overridevirtualinherited

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

Parameters
strain_incrementSum of elastic and inelastic strain increments
inelastic_strain_incrementInelastic strain increment calculated by this class
rotationincrement Not used by this class
stress_newNew trial stress from pure elastic calculation
stress_oldOld state of stress
elasticity_tensorRank 4 C_{ijkl}, must be isotropic
elastic_strain_oldOld state of total elastic strain
compute_full_tangent_operatorFlag currently unused by this class
tangent_operatorCurrently a copy of the elasticity tensor in this class

Implements StressUpdateBase.

Definition at line 64 of file RadialReturnStressUpdate.C.

73 {
74  // compute the deviatoric trial stress and trial strain from the current intermediate
75  // configuration
76  RankTwoTensor deviatoric_trial_stress = stress_new.deviatoric();
77 
78  // compute the effective trial stress
79  Real dev_trial_stress_squared =
80  deviatoric_trial_stress.doubleContraction(deviatoric_trial_stress);
81  Real effective_trial_stress = std::sqrt(3.0 / 2.0 * dev_trial_stress_squared);
82 
83  // Set the value of 3 * shear modulus for use as a reference residual value
85 
86  computeStressInitialize(effective_trial_stress, elasticity_tensor);
87 
88  // Use Newton iteration to determine the scalar effective inelastic strain increment
89  Real scalar_effective_inelastic_strain = 0.0;
90  if (!MooseUtils::absoluteFuzzyEqual(effective_trial_stress, 0.0))
91  {
92  returnMappingSolve(effective_trial_stress, scalar_effective_inelastic_strain, _console);
93  if (scalar_effective_inelastic_strain != 0.0)
94  inelastic_strain_increment =
95  deviatoric_trial_stress *
96  (1.5 * scalar_effective_inelastic_strain / effective_trial_stress);
97  else
98  inelastic_strain_increment.zero();
99  }
100  else
101  inelastic_strain_increment.zero();
102 
103  strain_increment -= inelastic_strain_increment;
105  _effective_inelastic_strain_old[_qp] + scalar_effective_inelastic_strain;
106 
107  // Use the old elastic strain here because we require tensors used by this class
108  // to be isotropic and this method natively allows for changing in time
109  // elasticity tensors
110  stress_new = elasticity_tensor * (strain_increment + elastic_strain_old);
111 
112  computeStressFinalize(inelastic_strain_increment);
113 
114  if (compute_full_tangent_operator &&
116  {
117  if (MooseUtils::absoluteFuzzyEqual(scalar_effective_inelastic_strain, 0.0))
118  tangent_operator.zero();
119  else
120  {
121  // mu = _three_shear_modulus / 3.0;
122  // norm_dev_stress = ||s_n+1||
123  // effective_trial_stress = von mises trial stress = std::sqrt(3.0 / 2.0) * ||s_n+1^trial||
124  // scalar_effective_inelastic_strain = Delta epsilon^cr_n+1
125  // deriv = derivative of scalar_effective_inelastic_strain w.r.t. von mises stress
126  // deriv = std::sqrt(3.0 / 2.0) partial Delta epsilon^cr_n+1n over partial ||s_n+1^trial||
127 
128  mooseAssert(_three_shear_modulus != 0.0, "Shear modulus is zero");
129 
130  const RankTwoTensor deviatoric_stress = stress_new.deviatoric();
131  const Real norm_dev_stress =
132  std::sqrt(deviatoric_stress.doubleContraction(deviatoric_stress));
133  mooseAssert(norm_dev_stress != 0.0, "Norm of the deviatoric is zero");
134 
135  const RankTwoTensor flow_direction = deviatoric_stress / norm_dev_stress;
136  const RankFourTensor flow_direction_dyad = flow_direction.outerProduct(flow_direction);
137  const Real deriv =
138  computeStressDerivative(effective_trial_stress, scalar_effective_inelastic_strain);
139  const Real scalar_one = _three_shear_modulus * scalar_effective_inelastic_strain /
140  std::sqrt(1.5) / norm_dev_stress;
141 
142  tangent_operator = scalar_one * _deviatoric_projection_four +
143  (_three_shear_modulus * deriv - scalar_one) * flow_direction_dyad;
144  }
145  }
146 }
const RankFourTensor _deviatoric_projection_four
Rank four deviatoric projection tensor.
virtual void computeStressInitialize(const Real, const RankFourTensor &)
Perform any necessary initialization before return mapping iterations.
const MaterialProperty< Real > & _effective_inelastic_strain_old
virtual TangentCalculationMethod getTangentCalculationMethod()
virtual void computeStressFinalize(const RankTwoTensor &)
Perform any necessary steps to finalize state after return mapping iterations.
void returnMappingSolve(const Real effective_trial_stress, Real &scalar, const ConsoleStream &console)
Perform the return mapping iterations.
virtual Real computeStressDerivative(const Real, const Real)
Calculate the derivative of the strain increment with respect to the updated stress.
MaterialProperty< Real > & _effective_inelastic_strain
Real getIsotropicShearModulus(const RankFourTensor &elasticity_tensor)
Get the shear modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must be ...
Real _three_shear_modulus
3 * shear modulus

Member Data Documentation

◆ _base_name

const std::string StressUpdateBase::_base_name
protectedinherited

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

Definition at line 122 of file StressUpdateBase.h.

◆ _bracket_solution

bool SingleVariableReturnMappingSolution::_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 126 of file SingleVariableReturnMappingSolution.h.

Referenced by SingleVariableReturnMappingSolution::internalSolve().

◆ _check_range

bool SingleVariableReturnMappingSolution::_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 119 of file SingleVariableReturnMappingSolution.h.

Referenced by SingleVariableReturnMappingSolution::internalSolve().

◆ _deviatoric_projection_four

const RankFourTensor RadialReturnStressUpdate::_deviatoric_projection_four
protectedinherited

Rank four deviatoric projection tensor.

Definition at line 146 of file RadialReturnStressUpdate.h.

Referenced by RadialReturnStressUpdate::updateState().

◆ _effective_inelastic_strain

MaterialProperty<Real>& RadialReturnStressUpdate::_effective_inelastic_strain
protectedinherited

◆ _effective_inelastic_strain_old

const MaterialProperty<Real>& RadialReturnStressUpdate::_effective_inelastic_strain_old
protectedinherited

◆ _effective_trial_stress

Real IsotropicPowerLawHardeningStressUpdate::_effective_trial_stress
protected

◆ _hardening_constant

const Real IsotropicPlasticityStressUpdate::_hardening_constant
protectedinherited

◆ _hardening_function

Function* IsotropicPlasticityStressUpdate::_hardening_function
protectedinherited

◆ _hardening_slope

Real IsotropicPlasticityStressUpdate::_hardening_slope
protectedinherited

◆ _hardening_variable

MaterialProperty<Real>& IsotropicPlasticityStressUpdate::_hardening_variable
protectedinherited

◆ _hardening_variable_old

const MaterialProperty<Real>& IsotropicPlasticityStressUpdate::_hardening_variable_old
protectedinherited

◆ _identity_symmetric_four

const RankFourTensor RadialReturnStressUpdate::_identity_symmetric_four
protectedinherited

Rank four symmetric identity tensor.

Definition at line 141 of file RadialReturnStressUpdate.h.

◆ _identity_two

const RankTwoTensor RadialReturnStressUpdate::_identity_two
protectedinherited

Rank two identity tensor.

Definition at line 136 of file RadialReturnStressUpdate.h.

◆ _K

Real IsotropicPowerLawHardeningStressUpdate::_K
protected

Power law hardening coefficients.

Definition at line 49 of file IsotropicPowerLawHardeningStressUpdate.h.

Referenced by computeHardeningDerivative(), and computeYieldStress().

◆ _line_search

bool SingleVariableReturnMappingSolution::_line_search
protectedinherited

Whether to use line searches to improve convergence.

Definition at line 122 of file SingleVariableReturnMappingSolution.h.

Referenced by SingleVariableReturnMappingSolution::internalSolve().

◆ _max_inelastic_increment

Real RadialReturnStressUpdate::_max_inelastic_increment
protectedinherited

◆ _plastic_prepend

const std::string IsotropicPlasticityStressUpdate::_plastic_prepend
protectedinherited

a string to prepend to the plastic strain Material Property name

Definition at line 59 of file IsotropicPlasticityStressUpdate.h.

◆ _plastic_strain

MaterialProperty<RankTwoTensor>& IsotropicPlasticityStressUpdate::_plastic_strain
protectedinherited

◆ _plastic_strain_old

const MaterialProperty<RankTwoTensor>& IsotropicPlasticityStressUpdate::_plastic_strain_old
protectedinherited

◆ _strain_hardening_exponent

Real IsotropicPowerLawHardeningStressUpdate::_strain_hardening_exponent
protected

◆ _temperature

const VariableValue& IsotropicPlasticityStressUpdate::_temperature
protectedinherited

◆ _three_shear_modulus

Real RadialReturnStressUpdate::_three_shear_modulus
protectedinherited

◆ _yield_condition

Real IsotropicPlasticityStressUpdate::_yield_condition
protectedinherited

◆ _yield_stress

Real IsotropicPlasticityStressUpdate::_yield_stress
protectedinherited

◆ _yield_stress_function

Function* IsotropicPlasticityStressUpdate::_yield_stress_function
protectedinherited

◆ _youngs_modulus

Real IsotropicPowerLawHardeningStressUpdate::_youngs_modulus
protected

Elastic constants.

Definition at line 54 of file IsotropicPowerLawHardeningStressUpdate.h.

Referenced by computeHardeningDerivative(), and computeYieldStress().


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