https://mooseframework.inl.gov
SolidMechanicsPlasticSimpleTester.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 #include "RankFourTensor.h"
12 
14 registerMooseObjectRenamed("SolidMechanicsApp",
15  TensorMechanicsPlasticSimpleTester,
16  "01/01/2025 00:00",
18 
21 {
23  params.addRequiredParam<Real>("a",
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.addRequiredParam<Real>("b",
28  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
29  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
30  "f*(stress_yz + stress_zy)/2 - strength");
31  params.addParam<Real>("c",
32  0,
33  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
34  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
35  "f*(stress_yz + stress_zy)/2 - strength");
36  params.addParam<Real>("d",
37  0,
38  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
39  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
40  "f*(stress_yz + stress_zy)/2 - strength");
41  params.addParam<Real>("e",
42  0,
43  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
44  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
45  "f*(stress_yz + stress_zy)/2 - strength");
46  params.addParam<Real>("f",
47  0,
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  params.addRequiredParam<Real>("strength",
52  "Yield function = a*stress_yy + b*stress_zz + "
53  "c*stress_xx + d*(stress_xy + stress_yx)/2 + "
54  "e*(stress_xz + stress_zx)/2 + f*(stress_yz + "
55  "stress_zy)/2 - strength");
56  params.addClassDescription("Class that can be used for testing multi-surface plasticity models. "
57  "Yield function = a*stress_yy + b*stress_zz + c*stress_xx + "
58  "d*(stress_xy + stress_yx)/2 + e*(stress_xz + stress_zx)/2 + "
59  "f*(stress_yz + stress_zy)/2 - strength");
60 
61  return params;
62 }
63 
65  const InputParameters & parameters)
66  : SolidMechanicsPlasticModel(parameters),
67  _a(getParam<Real>("a")),
68  _b(getParam<Real>("b")),
69  _c(getParam<Real>("c")),
70  _d(getParam<Real>("d")),
71  _e(getParam<Real>("e")),
72  _f(getParam<Real>("f")),
73  _strength(getParam<Real>("strength"))
74 {
75 }
76 
77 Real
79 {
80  return _a * stress(1, 1) + _b * stress(2, 2) + _c * stress(0, 0) +
81  _d * (stress(0, 1) + stress(1, 0)) / 2.0 + _e * (stress(0, 2) + stress(2, 0)) / 2.0 +
82  _f * (stress(1, 2) + stress(2, 1)) / 2.0 - _strength;
83 }
84 
87  Real /*intnl*/) const
88 {
89  RankTwoTensor df_dsig;
90  df_dsig(1, 1) = _a;
91  df_dsig(2, 2) = _b;
92  df_dsig(0, 0) = _c;
93  df_dsig(0, 1) = _d / 2.0;
94  df_dsig(1, 0) = _d / 2.0;
95  df_dsig(0, 2) = _e / 2.0;
96  df_dsig(2, 0) = _e / 2.0;
97  df_dsig(1, 2) = _f / 2.0;
98  df_dsig(2, 1) = _f / 2.0;
99  return df_dsig;
100 }
101 
102 Real
104  Real /*intnl*/) const
105 {
106  return 0.0;
107 }
108 
111 {
112  return dyieldFunction_dstress(stress, intnl);
113 }
114 
117  Real /*intnl*/) const
118 {
119  return RankFourTensor();
120 }
121 
124  Real /*intnl*/) const
125 {
126  return RankTwoTensor();
127 }
128 
129 std::string
131 {
132  return "SimpleTester";
133 }
SolidMechanicsPlasticSimpleTester(const InputParameters &parameters)
Class that can be used for testing multi-surface plasticity models.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
registerMooseObjectRenamed("SolidMechanicsApp", TensorMechanicsPlasticSimpleTester, "01/01/2025 00:00", SolidMechanicsPlasticSimpleTester)
static InputParameters validParams()
RankTwoTensor dflowPotential_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to the internal parameter.
RankFourTensor dflowPotential_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to stress.
registerMooseObject("SolidMechanicsApp", SolidMechanicsPlasticSimpleTester)
RankTwoTensor flowPotential(const RankTwoTensor &stress, Real intnl) const override
The flow potential.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
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...
Real dyieldFunction_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to the internal parameter.
RankTwoTensor dyieldFunction_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to stress.
virtual std::string modelName() const override