www.mooseframework.org
RadialReturnStressUpdate.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
12 #include "MooseMesh.h"
13 #include "ElasticityTensorTools.h"
14 
16 
17 InputParameters
19 {
20  InputParameters params = StressUpdateBase::validParams();
21  params.addClassDescription("Calculates the effective inelastic strain increment required to "
22  "return the isotropic stress state to a J2 yield surface. This class "
23  "is intended to be a parent class for classes with specific "
24  "constitutive models.");
26  params.addParam<Real>("max_inelastic_increment",
27  1e-4,
28  "The maximum inelastic strain increment allowed in a time step");
29  params.addRequiredParam<std::string>(
30  "effective_inelastic_strain_name",
31  "Name of the material property that stores the effective inelastic strain");
32  params.addParamNamesToGroup("effective_inelastic_strain_name", "Advanced");
33 
34  return params;
35 }
36 
37 RadialReturnStressUpdate::RadialReturnStressUpdate(const InputParameters & parameters)
38  : StressUpdateBase(parameters),
40  _effective_inelastic_strain(declareProperty<Real>(
41  _base_name + getParam<std::string>("effective_inelastic_strain_name"))),
42  _effective_inelastic_strain_old(getMaterialPropertyOld<Real>(
43  _base_name + getParam<std::string>("effective_inelastic_strain_name"))),
44  _max_inelastic_increment(parameters.get<Real>("max_inelastic_increment")),
45  _identity_two(RankTwoTensor::initIdentity),
46  _identity_symmetric_four(RankFourTensor::initIdentitySymmetricFour),
47  _deviatoric_projection_four(_identity_symmetric_four -
48  _identity_two.outerProduct(_identity_two) / 3.0)
49 {
50 }
51 
52 void
54 {
56 }
57 
58 void
60 {
62 }
63 
64 void
66  RankTwoTensor & inelastic_strain_increment,
67  const RankTwoTensor & /*rotation_increment*/,
68  RankTwoTensor & stress_new,
69  const RankTwoTensor & /*stress_old*/,
70  const RankFourTensor & elasticity_tensor,
71  const RankTwoTensor & elastic_strain_old,
72  bool compute_full_tangent_operator,
73  RankFourTensor & tangent_operator)
74 {
75  // compute the deviatoric trial stress and trial strain from the current intermediate
76  // configuration
77  RankTwoTensor deviatoric_trial_stress = stress_new.deviatoric();
78 
79  // compute the effective trial stress
80  Real dev_trial_stress_squared =
81  deviatoric_trial_stress.doubleContraction(deviatoric_trial_stress);
82  Real effective_trial_stress = std::sqrt(3.0 / 2.0 * dev_trial_stress_squared);
83 
84  // Set the value of 3 * shear modulus for use as a reference residual value
86 
87  computeStressInitialize(effective_trial_stress, elasticity_tensor);
88 
89  // Use Newton iteration to determine the scalar effective inelastic strain increment
90  Real scalar_effective_inelastic_strain = 0.0;
91  if (!MooseUtils::absoluteFuzzyEqual(effective_trial_stress, 0.0))
92  {
93  returnMappingSolve(effective_trial_stress, scalar_effective_inelastic_strain, _console);
94  if (scalar_effective_inelastic_strain != 0.0)
95  inelastic_strain_increment =
96  deviatoric_trial_stress *
97  (1.5 * scalar_effective_inelastic_strain / effective_trial_stress);
98  else
99  inelastic_strain_increment.zero();
100  }
101  else
102  inelastic_strain_increment.zero();
103 
104  strain_increment -= inelastic_strain_increment;
106  _effective_inelastic_strain_old[_qp] + scalar_effective_inelastic_strain;
107 
108  // Use the old elastic strain here because we require tensors used by this class
109  // to be isotropic and this method natively allows for changing in time
110  // elasticity tensors
111  stress_new = elasticity_tensor * (strain_increment + elastic_strain_old);
112 
113  computeStressFinalize(inelastic_strain_increment);
114 
115  if (compute_full_tangent_operator &&
117  {
118  if (MooseUtils::absoluteFuzzyEqual(scalar_effective_inelastic_strain, 0.0))
119  tangent_operator.zero();
120  else
121  {
122  // mu = _three_shear_modulus / 3.0;
123  // norm_dev_stress = ||s_n+1||
124  // effective_trial_stress = von mises trial stress = std::sqrt(3.0 / 2.0) * ||s_n+1^trial||
125  // scalar_effective_inelastic_strain = Delta epsilon^cr_n+1
126  // deriv = derivative of scalar_effective_inelastic_strain w.r.t. von mises stress
127  // deriv = std::sqrt(3.0 / 2.0) partial Delta epsilon^cr_n+1n over partial ||s_n+1^trial||
128 
129  mooseAssert(_three_shear_modulus != 0.0, "Shear modulus is zero");
130 
131  const RankTwoTensor deviatoric_stress = stress_new.deviatoric();
132  const Real norm_dev_stress =
133  std::sqrt(deviatoric_stress.doubleContraction(deviatoric_stress));
134  mooseAssert(norm_dev_stress != 0.0, "Norm of the deviatoric is zero");
135 
136  const RankTwoTensor flow_direction = deviatoric_stress / norm_dev_stress;
137  const RankFourTensor flow_direction_dyad = flow_direction.outerProduct(flow_direction);
138  const Real deriv =
139  computeStressDerivative(effective_trial_stress, scalar_effective_inelastic_strain);
140  const Real scalar_one = _three_shear_modulus * scalar_effective_inelastic_strain /
141  std::sqrt(1.5) / norm_dev_stress;
142 
143  tangent_operator = scalar_one * _deviatoric_projection_four +
144  (_three_shear_modulus * deriv - scalar_one) * flow_direction_dyad;
145  }
146  }
147 }
148 
149 Real
150 RadialReturnStressUpdate::computeReferenceResidual(const Real effective_trial_stress,
151  const Real scalar_effective_inelastic_strain)
152 {
153  return effective_trial_stress / _three_shear_modulus - scalar_effective_inelastic_strain;
154 }
155 
156 Real
157 RadialReturnStressUpdate::maximumPermissibleValue(const Real effective_trial_stress) const
158 {
159  return effective_trial_stress / _three_shear_modulus;
160 }
161 
162 Real
164 {
165  Real scalar_inelastic_strain_incr;
166 
167  scalar_inelastic_strain_incr =
169  if (MooseUtils::absoluteFuzzyEqual(scalar_inelastic_strain_incr, 0.0))
170  return std::numeric_limits<Real>::max();
171 
172  return _dt * _max_inelastic_increment / scalar_inelastic_strain_incr;
173 }
174 
175 void
176 RadialReturnStressUpdate::outputIterationSummary(std::stringstream * iter_output,
177  const unsigned int total_it)
178 {
179  if (iter_output)
180  {
181  *iter_output << "At element " << _current_elem->id() << " _qp=" << _qp << " Coordinates "
182  << _q_point[_qp] << " block=" << _current_elem->subdomain_id() << '\n';
183  }
185 }
SingleVariableReturnMappingSolution::validParams
static InputParameters validParams()
Definition: SingleVariableReturnMappingSolution.C:28
RadialReturnStressUpdate::computeReferenceResidual
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.
Definition: RadialReturnStressUpdate.C:150
SingleVariableReturnMappingSolution::outputIterationSummary
virtual void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it)
Output summary information for the convergence history of the model.
Definition: SingleVariableReturnMappingSolution.C:347
RadialReturnStressUpdate::_deviatoric_projection_four
const RankFourTensor _deviatoric_projection_four
Rank four deviatoric projection tensor.
Definition: RadialReturnStressUpdate.h:152
RadialReturnStressUpdate::_max_inelastic_increment
Real _max_inelastic_increment
Definition: RadialReturnStressUpdate.h:137
RadialReturnStressUpdate::computeStressDerivative
virtual Real computeStressDerivative(const Real, const Real)
Calculate the derivative of the strain increment with respect to the updated stress.
Definition: RadialReturnStressUpdate.h:118
RadialReturnStressUpdate.h
RadialReturnStressUpdate
RadialReturnStressUpdate computes the radial return stress increment for an isotropic elastic-viscopl...
Definition: RadialReturnStressUpdate.h:34
defineLegacyParams
defineLegacyParams(RadialReturnStressUpdate)
RadialReturnStressUpdate::updateState
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.
Definition: RadialReturnStressUpdate.C:65
RadialReturnStressUpdate::_effective_inelastic_strain
MaterialProperty< Real > & _effective_inelastic_strain
Definition: RadialReturnStressUpdate.h:135
RadialReturnStressUpdate::computeStressInitialize
virtual void computeStressInitialize(const Real, const RankFourTensor &)
Perform any necessary initialization before return mapping iterations.
Definition: RadialReturnStressUpdate.h:108
RadialReturnStressUpdate::_effective_inelastic_strain_old
const MaterialProperty< Real > & _effective_inelastic_strain_old
Definition: RadialReturnStressUpdate.h:136
StressUpdateBase::getTangentCalculationMethod
virtual TangentCalculationMethod getTangentCalculationMethod()
Definition: StressUpdateBase.h:116
RadialReturnStressUpdate::_three_shear_modulus
Real _three_shear_modulus
3 * shear modulus
Definition: RadialReturnStressUpdate.h:133
SingleVariableReturnMappingSolution::returnMappingSolve
void returnMappingSolve(const Real effective_trial_stress, Real &scalar, const ConsoleStream &console)
Perform the return mapping iterations.
Definition: SingleVariableReturnMappingSolution.C:96
ElasticityTensorTools.h
RadialReturnStressUpdate::maximumPermissibleValue
virtual Real maximumPermissibleValue(const Real effective_trial_stress) const override
Compute the maximum permissible value of the scalar.
Definition: RadialReturnStressUpdate.C:157
RadialReturnStressUpdate::computeTimeStepLimit
virtual Real computeTimeStepLimit() override
Compute the limiting value of the time step for this material.
Definition: RadialReturnStressUpdate.C:163
RadialReturnStressUpdate::validParams
static InputParameters validParams()
Definition: RadialReturnStressUpdate.C:18
RadialReturnStressUpdate::computeStressFinalize
virtual void computeStressFinalize(const RankTwoTensor &)
Perform any necessary steps to finalize state after return mapping iterations.
Definition: RadialReturnStressUpdate.h:127
ElasticityTensorTools::getIsotropicShearModulus
T getIsotropicShearModulus(const RankFourTensorTempl< T > &elasticity_tensor)
Get the shear modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must be ...
Definition: ElasticityTensorTools.h:71
RadialReturnStressUpdate::RadialReturnStressUpdate
RadialReturnStressUpdate(const InputParameters &parameters)
Definition: RadialReturnStressUpdate.C:37
RankFourTensorTempl
Definition: ACGrGrElasticDrivingForce.h:20
SingleVariableReturnMappingSolution
Base class that provides capability for Newton return mapping iterations on a single variable.
Definition: SingleVariableReturnMappingSolution.h:24
StressUpdateBase
StressUpdateBase is a material that is not called by MOOSE because of the compute=false flag set in t...
Definition: StressUpdateBase.h:52
RadialReturnStressUpdate::propagateQpStatefulPropertiesRadialReturn
void propagateQpStatefulPropertiesRadialReturn()
Propagate the properties pertaining to this intermediate class.
Definition: RadialReturnStressUpdate.C:59
RadialReturnStressUpdate::outputIterationSummary
void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it) override
Output summary information for the convergence history of the model.
Definition: RadialReturnStressUpdate.C:176
RadialReturnStressUpdate::initQpStatefulProperties
virtual void initQpStatefulProperties() override
Definition: RadialReturnStressUpdate.C:53
TangentCalculationMethod::PARTIAL
RankTwoTensorTempl
Definition: ACGrGrElasticDrivingForce.h:17
StressUpdateBase::validParams
static InputParameters validParams()
Definition: StressUpdateBase.C:17