www.mooseframework.org
TensorMechanicsPlasticWeakPlaneShear.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 #include "libmesh/utility.h"
13 
15 
17 
18 InputParameters
20 {
21  InputParameters params = TensorMechanicsPlasticModel::validParams();
22  params.addRequiredParam<UserObjectName>(
23  "cohesion",
24  "A TensorMechanicsHardening UserObject that defines hardening of the cohesion. "
25  "Physically the cohesion should not be negative.");
26  params.addRequiredParam<UserObjectName>("tan_friction_angle",
27  "A TensorMechanicsHardening UserObject that defines "
28  "hardening of tan(friction angle). Physically the "
29  "friction angle should be between 0 and 90deg.");
30  params.addRequiredParam<UserObjectName>(
31  "tan_dilation_angle",
32  "A TensorMechanicsHardening UserObject that defines hardening of the "
33  "tan(dilation angle). Usually the dilation angle is not greater than "
34  "the friction angle, and it is between 0 and 90deg.");
35  MooseEnum tip_scheme("hyperbolic cap", "hyperbolic");
36  params.addParam<MooseEnum>(
37  "tip_scheme", tip_scheme, "Scheme by which the cone's tip will be smoothed.");
38  params.addRequiredRangeCheckedParam<Real>(
39  "smoother",
40  "smoother>=0",
41  "For the 'hyperbolic' tip_scheme, the cone vertex at shear-stress "
42  "= 0 will be smoothed by the given amount. For the 'cap' "
43  "tip_scheme, additional smoothing will occur. Typical value is "
44  "0.1*cohesion");
45  params.addParam<Real>(
46  "cap_start",
47  0.0,
48  "For the 'cap' tip_scheme, smoothing is performed in the stress_zz > cap_start region");
49  params.addRangeCheckedParam<Real>("cap_rate",
50  0.0,
51  "cap_rate>=0",
52  "For the 'cap' tip_scheme, this controls how quickly the cap "
53  "degenerates to a hemisphere: small values mean a slow "
54  "degeneration to a hemisphere (and zero means the 'cap' will "
55  "be totally inactive). Typical value is 1/cohesion");
56  params.addClassDescription("Non-associative finite-strain weak-plane shear perfect plasticity. "
57  "Here cohesion = 1, tan(phi) = 1 = tan(psi)");
58 
59  return params;
60 }
61 
63  const InputParameters & parameters)
64  : TensorMechanicsPlasticModel(parameters),
65  _cohesion(getUserObject<TensorMechanicsHardeningModel>("cohesion")),
66  _tan_phi(getUserObject<TensorMechanicsHardeningModel>("tan_friction_angle")),
67  _tan_psi(getUserObject<TensorMechanicsHardeningModel>("tan_dilation_angle")),
68  _tip_scheme(getParam<MooseEnum>("tip_scheme")),
69  _small_smoother2(Utility::pow<2>(getParam<Real>("smoother"))),
70  _cap_start(getParam<Real>("cap_start")),
71  _cap_rate(getParam<Real>("cap_rate"))
72 {
73  // With arbitary UserObjects, it is impossible to check everything, and
74  // I think this is the best I can do
75  if (tan_phi(0) < 0 || tan_psi(0) < 0)
76  mooseError("Weak-Plane-Shear friction and dilation angles must lie in [0, Pi/2]");
77  if (tan_phi(0) < tan_psi(0))
78  mooseError(
79  "Weak-Plane-Shear friction angle must not be less than Weak-Plane-Shear dilation angle");
80  if (cohesion(0) < 0)
81  mooseError("Weak-Plane-Shear cohesion must not be negative");
82 }
83 
84 Real
86 {
87  // note that i explicitly symmeterise in preparation for Cosserat
88  return std::sqrt(Utility::pow<2>((stress(0, 2) + stress(2, 0)) / 2.0) +
89  Utility::pow<2>((stress(1, 2) + stress(2, 1)) / 2.0) + smooth(stress)) +
90  stress(2, 2) * tan_phi(intnl) - cohesion(intnl);
91 }
92 
95  Real _tan_phi_or_psi) const
96 {
97  RankTwoTensor deriv; // the constructor zeroes this
98 
99  Real tau = std::sqrt(Utility::pow<2>((stress(0, 2) + stress(2, 0)) / 2.0) +
100  Utility::pow<2>((stress(1, 2) + stress(2, 1)) / 2.0) + smooth(stress));
101  // note that i explicitly symmeterise in preparation for Cosserat
102  if (tau == 0.0)
103  {
104  // the derivative is not defined here, but i want to set it nonzero
105  // because otherwise the return direction might be too crazy
106  deriv(0, 2) = deriv(2, 0) = 0.5;
107  deriv(1, 2) = deriv(2, 1) = 0.5;
108  }
109  else
110  {
111  deriv(0, 2) = deriv(2, 0) = 0.25 * (stress(0, 2) + stress(2, 0)) / tau;
112  deriv(1, 2) = deriv(2, 1) = 0.25 * (stress(1, 2) + stress(2, 1)) / tau;
113  deriv(2, 2) = 0.5 * dsmooth(stress) / tau;
114  }
115  deriv(2, 2) += _tan_phi_or_psi;
116  return deriv;
117 }
118 
121  Real intnl) const
122 {
123  return df_dsig(stress, tan_phi(intnl));
124 }
125 
126 Real
128  Real intnl) const
129 {
130  return stress(2, 2) * dtan_phi(intnl) - dcohesion(intnl);
131 }
132 
135 {
136  return df_dsig(stress, tan_psi(intnl));
137 }
138 
141  Real /*intnl*/) const
142 {
143  RankFourTensor dr_dstress;
144  Real tau = std::sqrt(Utility::pow<2>((stress(0, 2) + stress(2, 0)) / 2.0) +
145  Utility::pow<2>((stress(1, 2) + stress(2, 1)) / 2.0) + smooth(stress));
146  if (tau == 0.0)
147  return dr_dstress;
148 
149  // note that i explicitly symmeterise
150  RankTwoTensor dtau;
151  dtau(0, 2) = dtau(2, 0) = 0.25 * (stress(0, 2) + stress(2, 0)) / tau;
152  dtau(1, 2) = dtau(2, 1) = 0.25 * (stress(1, 2) + stress(2, 1)) / tau;
153  dtau(2, 2) = 0.5 * dsmooth(stress) / tau;
154 
155  for (unsigned i = 0; i < 3; ++i)
156  for (unsigned j = 0; j < 3; ++j)
157  for (unsigned k = 0; k < 3; ++k)
158  for (unsigned l = 0; l < 3; ++l)
159  dr_dstress(i, j, k, l) = -dtau(i, j) * dtau(k, l) / tau;
160 
161  // note that i explicitly symmeterise
162  dr_dstress(0, 2, 0, 2) += 0.25 / tau;
163  dr_dstress(0, 2, 2, 0) += 0.25 / tau;
164  dr_dstress(2, 0, 0, 2) += 0.25 / tau;
165  dr_dstress(2, 0, 2, 0) += 0.25 / tau;
166  dr_dstress(1, 2, 1, 2) += 0.25 / tau;
167  dr_dstress(1, 2, 2, 1) += 0.25 / tau;
168  dr_dstress(2, 1, 1, 2) += 0.25 / tau;
169  dr_dstress(2, 1, 2, 1) += 0.25 / tau;
170  dr_dstress(2, 2, 2, 2) += 0.5 * d2smooth(stress) / tau;
171 
172  return dr_dstress;
173 }
174 
177  Real intnl) const
178 {
179  RankTwoTensor dr_dintnl;
180  dr_dintnl(2, 2) = dtan_psi(intnl);
181  return dr_dintnl;
182 }
183 
184 Real
185 TensorMechanicsPlasticWeakPlaneShear::cohesion(const Real internal_param) const
186 {
187  return _cohesion.value(internal_param);
188 }
189 
190 Real
191 TensorMechanicsPlasticWeakPlaneShear::dcohesion(const Real internal_param) const
192 {
193  return _cohesion.derivative(internal_param);
194 }
195 
196 Real
197 TensorMechanicsPlasticWeakPlaneShear::tan_phi(const Real internal_param) const
198 {
199  return _tan_phi.value(internal_param);
200 }
201 
202 Real
203 TensorMechanicsPlasticWeakPlaneShear::dtan_phi(const Real internal_param) const
204 {
205  return _tan_phi.derivative(internal_param);
206 }
207 
208 Real
209 TensorMechanicsPlasticWeakPlaneShear::tan_psi(const Real internal_param) const
210 {
211  return _tan_psi.value(internal_param);
212 }
213 
214 Real
215 TensorMechanicsPlasticWeakPlaneShear::dtan_psi(const Real internal_param) const
216 {
217  return _tan_psi.derivative(internal_param);
218 }
219 
220 Real
222 {
223  Real smoother2 = _small_smoother2;
224  if (_tip_scheme == "cap")
225  {
226  Real x = stress(2, 2) - _cap_start;
227  Real p = 0;
228  if (x > 0)
229  p = x * (1 - std::exp(-_cap_rate * x));
230  smoother2 += Utility::pow<2>(p);
231  }
232  return smoother2;
233 }
234 
235 Real
237 {
238  Real dsmoother2 = 0;
239  if (_tip_scheme == "cap")
240  {
241  Real x = stress(2, 2) - _cap_start;
242  Real p = 0;
243  Real dp_dx = 0;
244  if (x > 0)
245  {
246  const Real exp_cap_rate_x = std::exp(-_cap_rate * x);
247  p = x * (1 - exp_cap_rate_x);
248  dp_dx = (1 - exp_cap_rate_x) + x * _cap_rate * exp_cap_rate_x;
249  }
250  dsmoother2 += 2 * p * dp_dx;
251  }
252  return dsmoother2;
253 }
254 
255 Real
257 {
258  Real d2smoother2 = 0;
259  if (_tip_scheme == "cap")
260  {
261  Real x = stress(2, 2) - _cap_start;
262  Real p = 0;
263  Real dp_dx = 0;
264  Real d2p_dx2 = 0;
265  if (x > 0)
266  {
267  const Real exp_cap_rate_x = std::exp(-_cap_rate * x);
268  p = x * (1.0 - exp_cap_rate_x);
269  dp_dx = (1.0 - exp_cap_rate_x) + x * _cap_rate * exp_cap_rate_x;
270  d2p_dx2 = 2.0 * _cap_rate * exp_cap_rate_x - x * Utility::pow<2>(_cap_rate) * exp_cap_rate_x;
271  }
272  d2smoother2 += 2.0 * Utility::pow<2>(dp_dx) + 2.0 * p * d2p_dx2;
273  }
274  return d2smoother2;
275 }
276 
277 void
279  const RankTwoTensor & stress,
280  Real intnl,
281  const RankFourTensor & Eijkl,
282  std::vector<bool> & act,
283  RankTwoTensor & returned_stress) const
284 {
285  act.assign(1, false);
286  returned_stress = stress;
287 
288  if (f[0] <= _f_tol)
289  return;
290 
291  // in the following i will derive returned_stress for the case smoother=0
292 
293  Real tanpsi = tan_psi(intnl);
294  Real tanphi = tan_phi(intnl);
295 
296  // norm is the normal to the yield surface
297  // with f having psi (dilation angle) instead of phi:
298  // norm(0) = df/dsig(2,0) = df/dsig(0,2)
299  // norm(1) = df/dsig(2,1) = df/dsig(1,2)
300  // norm(2) = df/dsig(2,2)
301  std::vector<Real> norm(3, 0.0);
302  const Real tau = std::sqrt(Utility::pow<2>((stress(0, 2) + stress(2, 0)) / 2.0) +
303  Utility::pow<2>((stress(1, 2) + stress(2, 1)) / 2.0));
304  if (tau > 0.0)
305  {
306  norm[0] = 0.25 * (stress(0, 2) + stress(2, 0)) / tau;
307  norm[1] = 0.25 * (stress(1, 2) + stress(2, 1)) / tau;
308  }
309  else
310  {
311  returned_stress(2, 2) = cohesion(intnl) / tanphi;
312  act[0] = true;
313  return;
314  }
315  norm[2] = tanpsi;
316 
317  // to get the flow directions, we have to multiply norm by Eijkl.
318  // I assume that E(0,2,0,2) = E(1,2,1,2), and E(2,2,0,2) = 0 = E(0,2,1,2), etc
319  // with the usual symmetry. This makes finding the returned_stress
320  // much easier.
321  // returned_stress = stress - alpha*n
322  // where alpha is chosen so that f = 0
323  Real alpha = f[0] / (Eijkl(0, 2, 0, 2) + Eijkl(2, 2, 2, 2) * tanpsi * tanphi);
324 
325  if (1 - alpha * Eijkl(0, 2, 0, 2) / tau >= 0)
326  {
327  // returning to the "surface" of the cone
328  returned_stress(2, 2) = stress(2, 2) - alpha * Eijkl(2, 2, 2, 2) * norm[2];
329  returned_stress(0, 2) = returned_stress(2, 0) =
330  stress(0, 2) - alpha * 2.0 * Eijkl(0, 2, 0, 2) * norm[0];
331  returned_stress(1, 2) = returned_stress(2, 1) =
332  stress(1, 2) - alpha * 2.0 * Eijkl(1, 2, 1, 2) * norm[1];
333  }
334  else
335  {
336  // returning to the "tip" of the cone
337  returned_stress(2, 2) = cohesion(intnl) / tanphi;
338  returned_stress(0, 2) = returned_stress(2, 0) = returned_stress(1, 2) = returned_stress(2, 1) =
339  0.0;
340  }
341  returned_stress(0, 0) =
342  stress(0, 0) - Eijkl(0, 0, 2, 2) * (stress(2, 2) - returned_stress(2, 2)) / Eijkl(2, 2, 2, 2);
343  returned_stress(1, 1) =
344  stress(1, 1) - Eijkl(1, 1, 2, 2) * (stress(2, 2) - returned_stress(2, 2)) / Eijkl(2, 2, 2, 2);
345 
346  act[0] = true;
347 }
348 
349 std::string
351 {
352  return "WeakPlaneShear";
353 }
TensorMechanicsPlasticWeakPlaneShear::tan_psi
virtual Real tan_psi(const Real internal_param) const
tan_psi as a function of internal parameter
Definition: TensorMechanicsPlasticWeakPlaneShear.C:209
TensorMechanicsPlasticWeakPlaneShear::dflowPotential_dstress
RankFourTensor dflowPotential_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to stress.
Definition: TensorMechanicsPlasticWeakPlaneShear.C:140
TensorMechanicsPlasticWeakPlaneShear::flowPotential
RankTwoTensor flowPotential(const RankTwoTensor &stress, Real intnl) const override
The flow potential.
Definition: TensorMechanicsPlasticWeakPlaneShear.C:134
TensorMechanicsPlasticWeakPlaneShear::dyieldFunction_dintnl
Real dyieldFunction_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to the internal parameter.
Definition: TensorMechanicsPlasticWeakPlaneShear.C:127
TensorMechanicsPlasticWeakPlaneShear::_small_smoother2
Real _small_smoother2
smoothing parameter for the cone's tip - see doco for _tip_scheme
Definition: TensorMechanicsPlasticWeakPlaneShear.h:73
defineLegacyParams
defineLegacyParams(TensorMechanicsPlasticWeakPlaneShear)
TensorMechanicsPlasticModel::validParams
static InputParameters validParams()
Definition: TensorMechanicsPlasticModel.C:18
pow
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Definition: ExpressionBuilder.h:673
TensorMechanicsPlasticWeakPlaneShear::_cap_start
Real _cap_start
smoothing parameter dictating when the 'cap' will start - see doco for _tip_scheme
Definition: TensorMechanicsPlasticWeakPlaneShear.h:76
TensorMechanicsPlasticWeakPlaneShear::cohesion
virtual Real cohesion(const Real internal_param) const
cohesion as a function of internal parameter
Definition: TensorMechanicsPlasticWeakPlaneShear.C:185
TensorMechanicsPlasticWeakPlaneShear
Rate-independent associative weak-plane tensile failure with hardening/softening.
Definition: TensorMechanicsPlasticWeakPlaneShear.h:24
TensorMechanicsPlasticWeakPlaneShear::_tip_scheme
MooseEnum _tip_scheme
The yield function is modified to f = sqrt(s_xz^2 + s_yz^2 + a) + s_zz*_tan_phi - _cohesion where "a"...
Definition: TensorMechanicsPlasticWeakPlaneShear.h:70
TensorMechanicsPlasticWeakPlaneShear::dtan_phi
virtual Real dtan_phi(const Real internal_param) const
d(tan_phi)/d(internal_param);
Definition: TensorMechanicsPlasticWeakPlaneShear.C:203
TensorMechanicsPlasticWeakPlaneShear::dtan_psi
virtual Real dtan_psi(const Real internal_param) const
d(tan_psi)/d(internal_param);
Definition: TensorMechanicsPlasticWeakPlaneShear.C:215
TensorMechanicsPlasticWeakPlaneShear::validParams
static InputParameters validParams()
Definition: TensorMechanicsPlasticWeakPlaneShear.C:19
TensorMechanicsPlasticWeakPlaneShear::d2smooth
virtual Real d2smooth(const RankTwoTensor &stress) const
returns the d^2a/dstress(2,2)^2 - see doco for _tip_scheme
Definition: TensorMechanicsPlasticWeakPlaneShear.C:256
TensorMechanicsPlasticWeakPlaneShear::modelName
virtual std::string modelName() const override
Definition: TensorMechanicsPlasticWeakPlaneShear.C:350
registerMooseObject
registerMooseObject("TensorMechanicsApp", TensorMechanicsPlasticWeakPlaneShear)
TensorMechanicsPlasticWeakPlaneShear::_tan_phi
const TensorMechanicsHardeningModel & _tan_phi
Hardening model for tan(phi)
Definition: TensorMechanicsPlasticWeakPlaneShear.h:45
TensorMechanicsPlasticWeakPlaneShear::_cap_rate
Real _cap_rate
dictates how quickly the 'cap' degenerates to a hemisphere - see doco for _tip_scheme
Definition: TensorMechanicsPlasticWeakPlaneShear.h:79
TensorMechanicsPlasticModel::_f_tol
const Real _f_tol
Tolerance on yield function.
Definition: TensorMechanicsPlasticModel.h:175
TensorMechanicsHardeningModel::derivative
virtual Real derivative(Real intnl) const
Definition: TensorMechanicsHardeningModel.C:47
TensorMechanicsPlasticWeakPlaneShear::_cohesion
const TensorMechanicsHardeningModel & _cohesion
Hardening model for cohesion.
Definition: TensorMechanicsPlasticWeakPlaneShear.h:42
TensorMechanicsPlasticWeakPlaneShear.h
TensorMechanicsHardeningModel::value
virtual Real value(Real intnl) const
Definition: TensorMechanicsHardeningModel.C:45
TensorMechanicsPlasticWeakPlaneShear::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: TensorMechanicsPlasticWeakPlaneShear.C:176
RankFourTensorTempl
Definition: ACGrGrElasticDrivingForce.h:20
TensorMechanicsPlasticWeakPlaneShear::dyieldFunction_dstress
RankTwoTensor dyieldFunction_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to stress.
Definition: TensorMechanicsPlasticWeakPlaneShear.C:120
TensorMechanicsPlasticModel
Plastic Model base class The virtual functions written below must be over-ridden in derived classes t...
Definition: TensorMechanicsPlasticModel.h:42
TensorMechanicsPlasticWeakPlaneShear::smooth
virtual Real smooth(const RankTwoTensor &stress) const
returns the 'a' parameter - see doco for _tip_scheme
Definition: TensorMechanicsPlasticWeakPlaneShear.C:221
TensorMechanicsPlasticWeakPlaneShear::yieldFunction
Real yieldFunction(const RankTwoTensor &stress, Real intnl) const override
The following functions are what you should override when building single-plasticity models.
Definition: TensorMechanicsPlasticWeakPlaneShear.C:85
TensorMechanicsPlasticWeakPlaneShear::TensorMechanicsPlasticWeakPlaneShear
TensorMechanicsPlasticWeakPlaneShear(const InputParameters &parameters)
Definition: TensorMechanicsPlasticWeakPlaneShear.C:62
TensorMechanicsPlasticWeakPlaneShear::dcohesion
virtual Real dcohesion(const Real internal_param) const
d(cohesion)/d(internal_param)
Definition: TensorMechanicsPlasticWeakPlaneShear.C:191
TensorMechanicsPlasticWeakPlaneShear::tan_phi
virtual Real tan_phi(const Real internal_param) const
tan_phi as a function of internal parameter
Definition: TensorMechanicsPlasticWeakPlaneShear.C:197
RankTwoTensorTempl< Real >
TensorMechanicsPlasticWeakPlaneShear::_tan_psi
const TensorMechanicsHardeningModel & _tan_psi
Hardening model for tan(psi)
Definition: TensorMechanicsPlasticWeakPlaneShear.h:48
TensorMechanicsPlasticWeakPlaneShear::df_dsig
RankTwoTensor df_dsig(const RankTwoTensor &stress, Real _tan_phi_or_psi) const
Function that's used in dyieldFunction_dstress and flowPotential.
Definition: TensorMechanicsPlasticWeakPlaneShear.C:94
TensorMechanicsPlasticWeakPlaneShear::dsmooth
virtual Real dsmooth(const RankTwoTensor &stress) const
returns the da/dstress(2,2) - see doco for _tip_scheme
Definition: TensorMechanicsPlasticWeakPlaneShear.C:236
TensorMechanicsHardeningModel
Hardening Model base class.
Definition: TensorMechanicsHardeningModel.h:27
TensorMechanicsPlasticWeakPlaneShear::activeConstraints
virtual void activeConstraints(const std::vector< Real > &f, const RankTwoTensor &stress, Real intnl, const RankFourTensor &Eijkl, std::vector< bool > &act, RankTwoTensor &returned_stress) const override
The active yield surfaces, given a vector of yield functions.
Definition: TensorMechanicsPlasticWeakPlaneShear.C:278