www.mooseframework.org
TensorMechanicsPlasticSimpleTester.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 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<TensorMechanicsPlasticModel>();
14  params.addRequiredParam<Real>("a",
15  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
16  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
17  "f*(stress_yz + stress_zy)/2 - strength");
18  params.addRequiredParam<Real>("b",
19  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
20  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
21  "f*(stress_yz + stress_zy)/2 - strength");
22  params.addParam<Real>("c",
23  0,
24  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
25  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
26  "f*(stress_yz + stress_zy)/2 - strength");
27  params.addParam<Real>("d",
28  0,
29  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
30  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
31  "f*(stress_yz + stress_zy)/2 - strength");
32  params.addParam<Real>("e",
33  0,
34  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
35  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
36  "f*(stress_yz + stress_zy)/2 - strength");
37  params.addParam<Real>("f",
38  0,
39  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
40  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
41  "f*(stress_yz + stress_zy)/2 - strength");
42  params.addRequiredParam<Real>("strength",
43  "Yield function = a*stress_yy + b*stress_zz + "
44  "c*stress_xx + d*(stress_xy + stress_yx)/2 + "
45  "e*(stress_xz + stress_zx)/2 + f*(stress_yz + "
46  "stress_zy)/2 - strength");
47  params.addClassDescription("Class that can be used for testing multi-surface plasticity models. "
48  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
49  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
50  "f*(stress_yz + stress_zy)/2 - strength");
51 
52  return params;
53 }
54 
56  const InputParameters & parameters)
57  : TensorMechanicsPlasticModel(parameters),
58  _a(getParam<Real>("a")),
59  _b(getParam<Real>("b")),
60  _c(getParam<Real>("c")),
61  _d(getParam<Real>("d")),
62  _e(getParam<Real>("e")),
63  _f(getParam<Real>("f")),
64  _strength(getParam<Real>("strength"))
65 {
66 }
67 
68 Real
70  Real /*intnl*/) const
71 {
72  return _a * stress(1, 1) + _b * stress(2, 2) + _c * stress(0, 0) +
73  _d * (stress(0, 1) + stress(1, 0)) / 2.0 + _e * (stress(0, 2) + stress(2, 0)) / 2.0 +
74  _f * (stress(1, 2) + stress(2, 1)) / 2.0 - _strength;
75 }
76 
77 RankTwoTensor
79  Real /*intnl*/) const
80 {
81  RankTwoTensor df_dsig;
82  df_dsig(1, 1) = _a;
83  df_dsig(2, 2) = _b;
84  df_dsig(0, 0) = _c;
85  df_dsig(0, 1) = _d / 2.0;
86  df_dsig(1, 0) = _d / 2.0;
87  df_dsig(0, 2) = _e / 2.0;
88  df_dsig(2, 0) = _e / 2.0;
89  df_dsig(1, 2) = _f / 2.0;
90  df_dsig(2, 1) = _f / 2.0;
91  return df_dsig;
92 }
93 
94 Real
96  Real /*intnl*/) const
97 {
98  return 0.0;
99 }
100 
101 RankTwoTensor
102 TensorMechanicsPlasticSimpleTester::flowPotential(const RankTwoTensor & stress, Real intnl) const
103 {
104  return dyieldFunction_dstress(stress, intnl);
105 }
106 
107 RankFourTensor
109  Real /*intnl*/) const
110 {
111  return RankFourTensor();
112 }
113 
114 RankTwoTensor
116  Real /*intnl*/) const
117 {
118  return RankTwoTensor();
119 }
120 
121 std::string
123 {
124  return "SimpleTester";
125 }
RankTwoTensor dflowPotential_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to the internal parameter.
RankTwoTensor flowPotential(const RankTwoTensor &stress, Real intnl) const override
The flow potential.
RankTwoTensor dyieldFunction_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to stress.
InputParameters validParams< TensorMechanicsPlasticModel >()
virtual std::string modelName() const override
TensorMechanicsPlasticSimpleTester(const InputParameters &parameters)
RankFourTensor dflowPotential_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to stress.
InputParameters validParams< TensorMechanicsPlasticSimpleTester >()
Real dyieldFunction_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to the internal parameter.
Plastic Model base class The virtual functions written below must be over-ridden in derived classes t...
Real yieldFunction(const RankTwoTensor &stress, Real intnl) const override
The following functions are what you should override when building single-plasticity models...