https://mooseframework.inl.gov
Loading...
Searching...
No Matches
IsotropicPowerLawHardeningStressUpdate.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
15
16template <bool is_ad>
19{
21 params.addClassDescription("This class uses the discrete material in a radial return isotropic "
22 "plasticity power law hardening model, solving for the yield stress "
23 "as the intersection of the power law relation curve and Hooke's law. "
24 " This class can be used in conjunction with other creep and "
25 "plasticity materials for more complex simulations.");
26
27 // Set and Suppress parameters to enable calculation of the yield stress
28 params.set<Real>("yield_stress") = 1.0;
29 params.set<Real>("hardening_constant") = 1.0;
30 params.suppressParameter<Real>("yield_stress");
31 params.suppressParameter<Real>("hardening_constant");
32
33 // Power law hardening specific parameters
34 params.addRequiredParam<Real>("strength_coefficient",
35 "The strength coefficient (K) for power law hardening");
37 "strain_hardening_exponent",
38 "strain_hardening_exponent>=0.0 & strain_hardening_exponent <=1.0",
39 "The strain hardening exponent (n) for power law hardening");
40
41 return params;
42}
43
44template <bool is_ad>
46 const InputParameters & parameters)
47 : IsotropicPlasticityStressUpdateTempl<is_ad>(parameters),
48 _K(parameters.get<Real>("strength_coefficient")),
49 _strain_hardening_exponent(parameters.get<Real>("strain_hardening_exponent"))
50{
51}
52
53template <bool is_ad>
54void
56 const GenericReal<is_ad> & effective_trial_stress,
57 const GenericRankFourTensor<is_ad> & elasticity_tensor)
58{
61
62 computeYieldStress(elasticity_tensor);
63
64 _effective_trial_stress = effective_trial_stress;
65 this->_yield_condition =
66 effective_trial_stress - this->_hardening_variable_old[_qp] - this->_yield_stress;
67
68 this->_hardening_variable[_qp] = this->_hardening_variable_old[_qp];
69 this->_plastic_strain[_qp] = this->_plastic_strain_old[_qp];
70}
71
72template <bool is_ad>
75 const GenericReal<is_ad> & scalar)
76{
77 using std::pow;
78
79 const GenericReal<is_ad> stress_delta = _effective_trial_stress - _three_shear_modulus * scalar;
80 GenericReal<is_ad> slope = pow(stress_delta, (1.0 / _strain_hardening_exponent - 1.0)) /
81 _strain_hardening_exponent * 1.0 /
82 pow(_K, 1.0 / _strain_hardening_exponent);
83 slope -= 1.0 / _youngs_modulus;
84
85 return 1.0 / slope;
86}
87
88template <bool is_ad>
89void
91 const GenericRankFourTensor<is_ad> & elasticity_tensor)
92{
93 using std::pow;
94
95 // Pull in the Lam\`{e} lambda, and caculate E
96 const GenericReal<is_ad> lambda = getIsotropicLameLambda(elasticity_tensor);
97 const GenericReal<is_ad> shear_modulus = _three_shear_modulus / 3.0;
98
99 _youngs_modulus = shear_modulus * (3.0 * lambda + 2 * shear_modulus) / (lambda + shear_modulus);
100
101 // Then solve for yield stress using equation from the header file
102 this->_yield_stress = pow(_K / pow(_youngs_modulus, _strain_hardening_exponent),
103 1.0 / (1.0 - _strain_hardening_exponent));
104 if (this->_yield_stress <= 0.0)
105 mooseError("The yield stress must be greater than zero, but during the simulation your yield "
106 "stress became less than zero.");
107}
108
109template <bool is_ad>
112 const GenericRankFourTensor<is_ad> & elasticity_tensor)
113{
114 const GenericReal<is_ad> lame_lambda = elasticity_tensor(0, 0, 1, 1);
115
116 if (this->_mesh.dimension() == 3 &&
119 "Check to ensure that your Elasticity Tensor is truly Isotropic: different lambda values");
120 return lame_lambda;
121}
122
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
registerMooseObject("SolidMechanicsApp", IsotropicPowerLawHardeningStressUpdate)
void mooseError(Args &&... args)
Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
Moose::GenericType< Real, is_ad > GenericReal
void suppressParameter(const std::string &name)
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
This class uses the Discrete material in a radial return isotropic plasticity model.
This class uses the Discrete material in a radial return isotropic plasticity model.
IsotropicPowerLawHardeningStressUpdateTempl(const InputParameters &parameters)
GenericReal< is_ad > getIsotropicLameLambda(const GenericRankFourTensor< is_ad > &elasticity_tensor)
virtual GenericReal< is_ad > computeHardeningDerivative(const GenericReal< is_ad > &scalar) override
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.
virtual void computeYieldStress(const GenericRankFourTensor< is_ad > &elasticity_tensor) override
virtual void computeStressInitialize(const GenericReal< is_ad > &effective_trial_stress, const GenericRankFourTensor< is_ad > &elasticity_tensor)
Perform any necessary initialization before return mapping iterations.
auto raw_value(const Eigen::Map< T > &in)
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)