https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PowerLawCreepStressUpdate.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
11
14
15template <bool is_ad>
18{
21 "This class uses the stress update material in a radial return isotropic power law creep "
22 "model. This class can be used in conjunction with other creep and plasticity materials "
23 "for more complex simulations.");
24
25 // Linear strain hardening parameters
26 params.addCoupledVar("temperature", "Coupled temperature");
27 params.addRequiredParam<Real>("coefficient", "Leading coefficient in power-law equation");
28 params.addRequiredParam<Real>("n_exponent", "Exponent on effective stress in power-law equation");
29 params.addParam<Real>("m_exponent", 0.0, "Exponent on time in power-law equation");
30 params.addRequiredParam<Real>("activation_energy", "Activation energy");
31 params.addParam<Real>("gas_constant", 8.3143, "Universal gas constant");
32 params.addParam<Real>("start_time", 0.0, "Start time (if not zero)");
33 return params;
34}
35
36template <bool is_ad>
38 const InputParameters & parameters)
39 : RadialReturnCreepStressUpdateBaseTempl<is_ad>(parameters),
40 _temperature(this->isParamValid("temperature")
41 ? &this->template coupledGenericValue<is_ad>("temperature")
42 : nullptr),
43 _coefficient(this->template getParam<Real>("coefficient")),
44 _n_exponent(this->template getParam<Real>("n_exponent")),
45 _m_exponent(this->template getParam<Real>("m_exponent")),
46 _activation_energy(this->template getParam<Real>("activation_energy")),
47 _gas_constant(this->template getParam<Real>("gas_constant")),
48 _start_time(this->template getParam<Real>("start_time")),
49 _exponential(1.0)
50{
51 if (_start_time < this->_app.getStartTime() && (std::trunc(_m_exponent) != _m_exponent))
52 this->paramError("start_time",
53 "Start time must be equal to or greater than the Executioner start_time if a "
54 "non-integer m_exponent is used");
55}
56
57template <bool is_ad>
58void
60 const GenericReal<is_ad> & effective_trial_stress,
61 const GenericRankFourTensor<is_ad> & elasticity_tensor)
62{
63 using std::exp, std::pow;
64
67
68 if (_temperature)
69 _exponential = exp(-_activation_energy / (_gas_constant * (*_temperature)[_qp]));
70
71 _exp_time = pow(_t - _start_time, _m_exponent);
72}
73
74template <bool is_ad>
75template <typename ScalarType>
76ScalarType
78 const GenericReal<is_ad> & effective_trial_stress, const ScalarType & scalar)
79{
80 using std::pow;
81
82 const ScalarType stress_delta = effective_trial_stress - _three_shear_modulus * scalar;
83 const ScalarType creep_rate =
84 _coefficient * pow(stress_delta, _n_exponent) * _exponential * _exp_time;
85 return creep_rate * _dt - scalar;
86}
87
88template <bool is_ad>
91 const GenericReal<is_ad> & effective_trial_stress, const GenericReal<is_ad> & scalar)
92{
93 using std::pow;
94
95 const GenericReal<is_ad> stress_delta = effective_trial_stress - _three_shear_modulus * scalar;
96 const GenericReal<is_ad> creep_rate_derivative =
97 -_coefficient * _three_shear_modulus * _n_exponent * pow(stress_delta, _n_exponent - 1.0) *
98 _exponential * _exp_time;
99 return creep_rate_derivative * _dt - 1.0;
100}
101
102template <bool is_ad>
103Real
107{
108 if (_n_exponent <= 1)
109 return 0.0;
110
111 Real creep_factor = _n_exponent / (_n_exponent + 1);
112
113 return MetaPhysicL::raw_value(creep_factor * stress[_qp].doubleContraction((strain_rate)[_qp]));
114}
115
116template <bool is_ad>
117void
119 const GenericRankTwoTensor<is_ad> & plastic_strain_increment)
120{
121 _creep_strain[_qp] += plastic_strain_increment;
122}
123
124template <bool is_ad>
125void
127{
128 _creep_strain[_qp] = _creep_strain_old[_qp];
129}
130
131template <bool is_ad>
132bool
137
141 const Real &);
142template ADReal
144 const ADReal &);
145template ChainedReal
147 const ChainedReal &);
148template ChainedADReal
150 const ChainedADReal &);
DualNumber< Real, DNDerivativeType, true > ADReal
DualNumber< ADReal, ADReal > ChainedADReal
DualNumber< Real, Real > ChainedReal
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
Moose::GenericType< Real, is_ad > GenericReal
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
registerMooseObject("SolidMechanicsApp", PowerLawCreepStressUpdate)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
Real getStartTime() const
void paramError(const std::string &param, Args... args) const
MooseApp & _app
This class uses the stress update material in a radial return isotropic creep model.
virtual GenericReal< is_ad > computeDerivative(const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar) override
Compute the derivative of the residual as a function of the scalar variable.
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 computeStressFinalize(const GenericRankTwoTensor< is_ad > &plastic_strain_increment) override
Perform any necessary steps to finalize state after return mapping iterations.
PowerLawCreepStressUpdateTempl(const InputParameters &parameters)
virtual void resetIncrementalMaterialProperties() override
Reset material properties.
ScalarType computeResidualInternal(const GenericReal< is_ad > &effective_trial_stress, const ScalarType &scalar)
virtual bool substeppingCapabilityEnabled() override
Does the model include the infrastructure for substep decomposition of the elastic strain initially u...
const Real _m_exponent
Exponent on time.
virtual Real computeStrainEnergyRateDensity(const GenericMaterialProperty< RankTwoTensor, is_ad > &stress, const GenericMaterialProperty< RankTwoTensor, is_ad > &strain_rate) override
Compute the strain energy rate density for this inelastic model for the current step.
This class provides baseline functionallity for creep models based on the stress update material in a...
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.
auto raw_value(const Eigen::Map< T > &in)
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)