https://mooseframework.inl.gov
Loading...
Searching...
No Matches
RadialReturnBackstressStressUpdateBase.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
12
13template <bool is_ad>
20
21template <bool is_ad>
23 const InputParameters & parameters)
24 : RadialReturnStressUpdateTempl<is_ad>(parameters),
25 _backstress(this->template declareGenericProperty<RankTwoTensor, is_ad>(this->_base_name +
26 "backstress")),
27 _backstress_old(
28 this->template getMaterialPropertyOld<RankTwoTensor>(this->_base_name + "backstress"))
29{
30}
31
32template <bool is_ad>
33void
39
40template <bool is_ad>
41void
43{
44 _backstress[_qp] = _backstress_old[_qp];
45 propagateQpStatefulPropertiesRadialReturn();
46}
47
48template <bool is_ad>
49void
51 const GenericReal<is_ad> & effective_trial_stress,
52 const GenericRankFourTensor<is_ad> & elasticity_tensor)
53{
56
57 // Start each update from the old backstress, as for other stateful properties, so the result
58 // does not depend on how many times this model is evaluated
59 _backstress[_qp] = _backstress_old[_qp];
60}
61
62template <bool is_ad>
63void
65 GenericRankTwoTensor<is_ad> & strain_increment,
66 GenericRankTwoTensor<is_ad> & inelastic_strain_increment,
67 const GenericRankTwoTensor<is_ad> & rotation_increment,
68 GenericRankTwoTensor<is_ad> & stress_new,
69 const RankTwoTensor & stress_old,
70 const GenericRankFourTensor<is_ad> & elasticity_tensor,
71 const RankTwoTensor & elastic_strain_old,
72 bool compute_full_tangent_operator,
73 RankFourTensor & tangent_operator)
74{
75 GenericRankTwoTensor<is_ad> stress_corrected = stress_new - _backstress_old[_qp];
76
78 inelastic_strain_increment,
79 rotation_increment,
80 stress_corrected,
81 stress_old,
83 elastic_strain_old,
84 compute_full_tangent_operator,
85 tangent_operator);
86 stress_new = stress_corrected;
87}
88
Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
Moose::GenericType< Real, is_ad > GenericReal
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
virtual void computeStressInitialize(const GenericReal< is_ad > &effective_trial_stress, const GenericRankFourTensor< is_ad > &elasticity_tensor) override
Perform any necessary initialization before return mapping iterations.
RadialReturnBackstressStressUpdateBaseTempl(const InputParameters &parameters)
virtual void propagateQpStatefulProperties() override
If updateState is not called during a timestep, this will be.
virtual void updateState(GenericRankTwoTensor< is_ad > &strain_increment, GenericRankTwoTensor< is_ad > &inelastic_strain_increment, const GenericRankTwoTensor< is_ad > &, GenericRankTwoTensor< is_ad > &stress_new, const RankTwoTensor &, const GenericRankFourTensor< is_ad > &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.
RadialReturnStressUpdate computes the radial return stress increment for an isotropic elastic-viscopl...
virtual void computeStressInitialize(const GenericReal< is_ad > &effective_trial_stress, const GenericRankFourTensor< is_ad > &elasticity_tensor)
Perform any necessary initialization before return mapping iterations.
virtual void initQpStatefulProperties() override
virtual void updateState(GenericRankTwoTensor< is_ad > &strain_increment, GenericRankTwoTensor< is_ad > &inelastic_strain_increment, const GenericRankTwoTensor< is_ad > &rotation_increment, GenericRankTwoTensor< is_ad > &stress_new, const RankTwoTensor &stress_old, const GenericRankFourTensor< is_ad > &elasticity_tensor, const RankTwoTensor &elastic_strain_old, bool compute_full_tangent_operator=false, RankFourTensor &tangent_operator=StressUpdateBaseTempl< is_ad >::_identityTensor) override
A radial return (J2) mapping method is performed with return mapping iterations.
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)