www.mooseframework.org
RadialReturnStressUpdate.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 
9 #include "MooseMesh.h"
10 #include "ElasticityTensorTools.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<StressUpdateBase>();
17  params.addClassDescription("Calculates the effective inelastic strain increment required to "
18  "return the isotropic stress state to a J2 yield surface. This class "
19  "is intended to be a parent class for classes with specific "
20  "constitutive models.");
22  params.addParam<Real>("max_inelastic_increment",
23  1e-4,
24  "The maximum inelastic strain increment allowed in a time step");
25  return params;
26 }
27 
28 RadialReturnStressUpdate::RadialReturnStressUpdate(const InputParameters & parameters,
29  const std::string inelastic_strain_name)
30  : StressUpdateBase(parameters),
32  _effective_inelastic_strain(
33  declareProperty<Real>("effective_" + inelastic_strain_name + "_strain")),
34  _effective_inelastic_strain_old(
35  getMaterialPropertyOld<Real>("effective_" + inelastic_strain_name + "_strain")),
36  _max_inelastic_increment(parameters.get<Real>("max_inelastic_increment"))
37 {
38 }
39 
40 void
42 {
44 }
45 
46 void
48 {
50 }
51 
52 void
53 RadialReturnStressUpdate::updateState(RankTwoTensor & strain_increment,
54  RankTwoTensor & inelastic_strain_increment,
55  const RankTwoTensor & /*rotation_increment*/,
56  RankTwoTensor & stress_new,
57  const RankTwoTensor & /*stress_old*/,
58  const RankFourTensor & elasticity_tensor,
59  const RankTwoTensor & elastic_strain_old,
60  bool /*compute_full_tangent_operator*/,
61  RankFourTensor & tangent_operator)
62 {
63  // compute the deviatoric trial stress and trial strain from the current intermediate
64  // configuration
65  RankTwoTensor deviatoric_trial_stress = stress_new.deviatoric();
66 
67  // compute the effective trial stress
68  Real dev_trial_stress_squared =
69  deviatoric_trial_stress.doubleContraction(deviatoric_trial_stress);
70  Real effective_trial_stress = std::sqrt(3.0 / 2.0 * dev_trial_stress_squared);
71 
72  // Set the value of 3 * shear modulus for use as a reference residual value
74 
75  computeStressInitialize(effective_trial_stress, elasticity_tensor);
76 
77  // Use Newton iteration to determine the scalar effective inelastic strain increment
78  Real scalar_effective_inelastic_strain = 0;
79  returnMappingSolve(effective_trial_stress, scalar_effective_inelastic_strain, _console);
80 
81  if (scalar_effective_inelastic_strain != 0.0)
82  inelastic_strain_increment = deviatoric_trial_stress *
83  (1.5 * scalar_effective_inelastic_strain / effective_trial_stress);
84  else
85  inelastic_strain_increment.zero();
86 
87  strain_increment -= inelastic_strain_increment;
89  _effective_inelastic_strain_old[_qp] + scalar_effective_inelastic_strain;
90 
91  // Use the old elastic strain here because we require tensors used by this class
92  // to be isotropic and this method natively allows for changing in time
93  // elasticity tensors
94  stress_new = elasticity_tensor * (strain_increment + elastic_strain_old);
95 
96  computeStressFinalize(inelastic_strain_increment);
97 
102  tangent_operator = elasticity_tensor;
103 }
104 
105 Real
106 RadialReturnStressUpdate::computeReferenceResidual(const Real effective_trial_stress,
107  const Real scalar_effective_inelastic_strain)
108 {
109  return effective_trial_stress / _three_shear_modulus - scalar_effective_inelastic_strain;
110 }
111 
112 Real
113 RadialReturnStressUpdate::maximumPermissibleValue(const Real effective_trial_stress) const
114 {
115  return effective_trial_stress / _three_shear_modulus;
116 }
117 
118 Real
120 {
121  Real scalar_inelastic_strain_incr;
122 
123  scalar_inelastic_strain_incr =
125  if (MooseUtils::absoluteFuzzyEqual(scalar_inelastic_strain_incr, 0.0))
126  return std::numeric_limits<Real>::max();
127 
128  return _dt * _max_inelastic_increment / scalar_inelastic_strain_incr;
129 }
virtual void computeStressInitialize(const Real, const RankFourTensor &)
Perform any necessary initialization before return mapping iterations.
const MaterialProperty< Real > & _effective_inelastic_strain_old
virtual void computeStressFinalize(const RankTwoTensor &)
Perform any necessary steps to finalize state after return mapping iterations.
StressUpdateBase is a material that is not called by MOOSE because of the compute=false flag set in t...
virtual Real maximumPermissibleValue(const Real effective_trial_stress) const override
Compute the maximum permissible value of the scalar.
RadialReturnStressUpdate(const InputParameters &parameters, const std::string inelastic_strain_name="")
Base class that provides capability for Newton return mapping iterations on a single variable...
void returnMappingSolve(const Real effective_trial_stress, Real &scalar, const ConsoleStream &console)
Perform the return mapping iterations.
InputParameters validParams< StressUpdateBase >()
InputParameters validParams< RadialReturnStressUpdate >()
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.
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.
void propagateQpStatefulPropertiesRadialReturn()
Propagate the properties pertaining to this intermediate class.
virtual Real computeTimeStepLimit() override
Compute the limiting value of the time step for this material.
MaterialProperty< Real > & _effective_inelastic_strain
InputParameters validParams< SingleVariableReturnMappingSolution >()
virtual void initQpStatefulProperties() override
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