www.mooseframework.org
PowerLawCreepModel.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 /****************************************************************/
7 #include "PowerLawCreepModel.h"
8 
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<ReturnMappingModel>();
16 
17  // Power-law creep material parameters
18  params.addRequiredParam<Real>("coefficient", "Leading coefficent in power-law equation");
19  params.addRequiredParam<Real>("n_exponent", "Exponent on effective stress in power-law equation");
20  params.addParam<Real>("m_exponent", 0.0, "Exponent on time in power-law equation");
21  params.addRequiredParam<Real>("activation_energy", "Activation energy");
22  params.addParam<Real>("gas_constant", 8.3143, "Universal gas constant");
23  params.addParam<Real>("start_time", 0, "Start time (if not zero)");
24  params.addCoupledVar("temp", "Coupled Temperature");
25 
26  return params;
27 }
28 
29 PowerLawCreepModel::PowerLawCreepModel(const InputParameters & parameters)
30  : ReturnMappingModel(parameters, "creep"),
31  _coefficient(parameters.get<Real>("coefficient")),
32  _n_exponent(parameters.get<Real>("n_exponent")),
33  _m_exponent(parameters.get<Real>("m_exponent")),
34  _activation_energy(parameters.get<Real>("activation_energy")),
35  _gas_constant(parameters.get<Real>("gas_constant")),
36  _start_time(getParam<Real>("start_time")),
37  _creep_strain(declareProperty<SymmTensor>("creep_strain")),
38  _creep_strain_old(getMaterialPropertyOld<SymmTensor>("creep_strain"))
39 {
40 }
41 
42 void
43 PowerLawCreepModel::computeStressInitialize(Real /*effectiveTrialStress*/,
44  const SymmElasticityTensor & elasticityTensor)
45 {
47  dynamic_cast<const SymmIsotropicElasticityTensor *>(&elasticityTensor);
48  if (!eT)
49  {
50  mooseError("PowerLawCreepModel requires a SymmIsotropicElasticityTensor");
51  }
53 
54  _exponential = 1;
55  if (_has_temp)
56  {
58  }
59 
61 
62  _creep_strain[_qp] = _creep_strain_old[_qp];
63 }
64 
65 void
67 {
68  _creep_strain[_qp] += plasticStrainIncrement;
69 }
70 
71 Real
72 PowerLawCreepModel::computeResidual(const Real effectiveTrialStress, const Real scalar)
73 {
75  return _coefficient *
76  std::pow(effectiveTrialStress - 3.0 * _shear_modulus * scalar, _n_exponent) *
78  scalar / _dt;
79  else
80  {
81  const Real stress_delta = effectiveTrialStress - 3.0 * _shear_modulus * scalar;
82  Real creep_rate = _coefficient * std::pow(stress_delta, _n_exponent) * _exponential * _expTime;
83  return creep_rate * _dt - scalar;
84  }
85 }
86 
87 Real
88 PowerLawCreepModel::computeDerivative(const Real effectiveTrialStress, const Real scalar)
89 {
91  return -3 * _coefficient * _shear_modulus * _n_exponent *
92  std::pow(effectiveTrialStress - 3 * _shear_modulus * scalar, _n_exponent - 1) *
94  1 / _dt;
95  else
96  return -3.0 * _coefficient * _shear_modulus * _n_exponent *
97  std::pow(effectiveTrialStress - 3.0 * _shear_modulus * scalar, _n_exponent - 1.0) *
98  _exponential * _expTime * _dt -
99  1.0;
100 }
This class defines a basic set of capabilities any elasticity tensor should have. ...
const VariableValue & _temperature
const Real _activation_energy
PowerLawCreepModel(const InputParameters &parameters)
Base class for models that perform return mapping iterations to compute stress.
bool _legacy_return_mapping
Whether to use the legacy return mapping algorithm and compute residuals in the legacy manner...
InputParameters validParams< ReturnMappingModel >()
virtual void computeStressInitialize(Real effectiveTrialStress, const SymmElasticityTensor &elasticityTensor) override
Perform any necessary initialization before return mapping iterations.
virtual Real computeDerivative(const Real effectiveTrialStress, const Real scalar) override
Compute the derivative of the residual as a function of the scalar variable.
MaterialProperty< SymmTensor > & _creep_strain
virtual Real computeResidual(const Real effectiveTrialStress, const Real scalar) override
Compute the residual for a predicted value of the scalar.
InputParameters validParams< PowerLawCreepModel >()
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Real shearModulus() const
Return the shear modulus...
virtual void computeStressFinalize(const SymmTensor &plasticStrainIncrement) override
Perform any necessary steps to finalize state after return mapping iterations.
Defines an Isotropic Elasticity Tensor.
const MaterialProperty< SymmTensor > & _creep_strain_old