www.mooseframework.org
CLSHPlasticModel.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 "CLSHPlasticModel.h"
8 
10 #include <cmath>
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<ReturnMappingModel>();
17  params.addRequiredParam<Real>("yield_stress",
18  "The point at which plastic strain begins accumulating");
19  params.addRequiredParam<Real>("hardening_constant", "Hardening slope");
20  params.addRequiredParam<Real>("c_alpha", "creep constant");
21  params.addRequiredParam<Real>("c_beta", "creep constant");
22  return params;
23 }
24 
25 CLSHPlasticModel::CLSHPlasticModel(const InputParameters & parameters)
26  : ReturnMappingModel(parameters, "plastic"),
27  _yield_stress(parameters.get<Real>("yield_stress")),
28  _hardening_constant(parameters.get<Real>("hardening_constant")),
29  _c_alpha(parameters.get<Real>("c_alpha")),
30  _c_beta(parameters.get<Real>("c_beta")),
31  _hardening_variable(declareProperty<Real>("hardening_variable")),
32  _hardening_variable_old(getMaterialPropertyOld<Real>("hardening_variable")),
33  _plastic_strain(declareProperty<SymmTensor>("plastic_strain")),
34  _plastic_strain_old(getMaterialPropertyOld<SymmTensor>("plastic_strain"))
35 {
36 }
37 
38 void
40 {
41  _hardening_variable[_qp] = 0;
43 }
44 
45 void
47  const SymmElasticityTensor & elasticityTensor)
48 {
50  dynamic_cast<const SymmIsotropicElasticityTensor *>(&elasticityTensor);
51  if (!eT)
52  {
53  mooseError("CLSHPlasticModel requires a SymmIsotropicElasticityTensor");
54  }
56  _yield_condition = effectiveTrialStress - _hardening_variable_old[_qp] - _yield_stress;
59 }
60 
61 Real
62 CLSHPlasticModel::computeResidual(const Real effectiveTrialStress, const Real scalar)
63 {
64  Real residual = 0.0;
65  if (_yield_condition > 0)
66  {
67  const Real xflow = _c_beta * (effectiveTrialStress - (3. * _shear_modulus * scalar) -
69  Real xphi = _c_alpha * std::sinh(xflow);
70  _xphidp = -3. * _shear_modulus * _c_alpha * _c_beta * std::cosh(xflow);
71  _xphir = -_c_alpha * _c_beta * std::cosh(xflow);
73  residual = xphi - scalar / _dt;
74  else
75  residual = xphi * _dt - scalar;
76  }
77 
78  return residual;
79 }
80 
81 void
83 {
84  if (_yield_condition > 0)
86 }
87 
88 Real
90 {
91  return _hardening_variable_old[_qp] + (_hardening_constant * scalar);
92 }
93 
94 Real
95 CLSHPlasticModel::computeDerivative(const Real /*effectiveTrialStress*/, const Real /*scalar*/)
96 {
97  Real derivative = 1.0;
98  if (_yield_condition > 0)
99  {
101  derivative = _xphidp + _hardening_constant * _xphir - 1.0 / _dt;
102  else
103  derivative = _xphidp * _dt + _hardening_constant * _xphir * _dt - 1.0;
104  }
105 
106  return derivative;
107 }
108 
109 void
111 {
112  _plastic_strain[_qp] += plasticStrainIncrement;
113 }
This class defines a basic set of capabilities any elasticity tensor should have. ...
const MaterialProperty< SymmTensor > & _plastic_strain_old
Real computeHardeningValue(const Real scalar)
MaterialProperty< SymmTensor > & _plastic_strain
Base class for models that perform return mapping iterations to compute stress.
const MaterialProperty< Real > & _hardening_variable_old
bool _legacy_return_mapping
Whether to use the legacy return mapping algorithm and compute residuals in the legacy manner...
InputParameters validParams< ReturnMappingModel >()
virtual Real computeDerivative(const Real effectiveTrialStress, const Real scalar) override
Compute the derivative of the residual as a function of the scalar variable.
CLSHPlasticModel(const InputParameters &parameters)
virtual void initQpStatefulProperties() override
virtual void computeStressFinalize(const SymmTensor &plasticStrainIncrement) override
Perform any necessary steps to finalize state after return mapping iterations.
MaterialProperty< Real > & _hardening_variable
const Real _yield_stress
InputParameters validParams< CLSHPlasticModel >()
virtual void iterationFinalize(Real scalar) override
Finalize internal state variables for a model for a given iteration.
virtual Real computeResidual(const Real effectiveTrialStress, const Real scalar) override
Compute the residual for a predicted value of the scalar.
Real shearModulus() const
Return the shear modulus...
const Real _hardening_constant
virtual void computeStressInitialize(Real effectiveTrialStress, const SymmElasticityTensor &elasticityTensor) override
Perform any necessary initialization before return mapping iterations.
Defines an Isotropic Elasticity Tensor.
virtual void initQpStatefulProperties() override