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