www.mooseframework.org
TensorMechanicsPlasticTensile.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  "tensile_strength",
24  "A TensorMechanicsHardening UserObject that defines hardening of the tensile strength");
25  params.addRangeCheckedParam<Real>(
26  "tensile_edge_smoother",
27  25.0,
28  "tensile_edge_smoother>=0 & tensile_edge_smoother<=30",
29  "Smoothing parameter: the edges of the cone are smoothed by the given amount.");
30  MooseEnum tip_scheme("hyperbolic cap", "hyperbolic");
31  params.addParam<MooseEnum>(
32  "tip_scheme", tip_scheme, "Scheme by which the pyramid's tip will be smoothed.");
33  params.addRequiredRangeCheckedParam<Real>("tensile_tip_smoother",
34  "tensile_tip_smoother>=0",
35  "For the 'hyperbolic' tip_scheme, the pyramid vertex "
36  "will be smoothed by the given amount. For the 'cap' "
37  "tip_scheme, additional smoothing will occur. Typical "
38  "value is 0.1*tensile_strength");
39  params.addParam<Real>(
40  "cap_start",
41  0.0,
42  "For the 'cap' tip_scheme, smoothing is performed in the stress_mean > cap_start region");
43  params.addRangeCheckedParam<Real>("cap_rate",
44  0.0,
45  "cap_rate>=0",
46  "For the 'cap' tip_scheme, this controls how quickly the cap "
47  "degenerates to a hemisphere: small values mean a slow "
48  "degeneration to a hemisphere (and zero means the 'cap' will "
49  "be totally inactive). Typical value is 1/tensile_strength");
50  params.addParam<Real>("tensile_lode_cutoff",
51  "If the second invariant of stress is less than "
52  "this amount, the Lode angle is assumed to be zero. "
53  "This is to guard against precision-loss problems, "
54  "and this parameter should be set small. Default = "
55  "0.00001*((yield_Function_tolerance)^2)");
56  params.addClassDescription(
57  "Associative tensile plasticity with hardening/softening, and tensile_strength = 1");
58 
59  return params;
60 }
61 
63  : TensorMechanicsPlasticModel(parameters),
64  _strength(getUserObject<TensorMechanicsHardeningModel>("tensile_strength")),
65  _tip_scheme(getParam<MooseEnum>("tip_scheme")),
66  _small_smoother2(Utility::pow<2>(getParam<Real>("tensile_tip_smoother"))),
67  _cap_start(getParam<Real>("cap_start")),
68  _cap_rate(getParam<Real>("cap_rate")),
69  _tt(getParam<Real>("tensile_edge_smoother") * libMesh::pi / 180.0),
70  _sin3tt(std::sin(3.0 * _tt)),
71  _lode_cutoff(parameters.isParamValid("tensile_lode_cutoff")
72  ? getParam<Real>("tensile_lode_cutoff")
73  : 1.0e-5 * Utility::pow<2>(_f_tol))
74 
75 {
76  if (_lode_cutoff < 0)
77  mooseError("tensile_lode_cutoff must not be negative");
78  _ccc = (-std::cos(3.0 * _tt) * (std::cos(_tt) - std::sin(_tt) / std::sqrt(3.0)) -
79  3.0 * _sin3tt * (std::sin(_tt) + std::cos(_tt) / std::sqrt(3.0))) /
80  (18.0 * Utility::pow<3>(std::cos(3.0 * _tt)));
81  _bbb = (std::sin(6.0 * _tt) * (std::cos(_tt) - std::sin(_tt) / std::sqrt(3.0)) -
82  6.0 * std::cos(6.0 * _tt) * (std::sin(_tt) + std::cos(_tt) / std::sqrt(3.0))) /
83  (18.0 * Utility::pow<3>(std::cos(3.0 * _tt)));
84  _aaa = -std::sin(_tt) / std::sqrt(3.0) - _bbb * _sin3tt - _ccc * Utility::pow<2>(_sin3tt) +
85  std::cos(_tt);
86 }
87 
88 Real
90 {
91  Real mean_stress = stress.trace() / 3.0;
92  Real sin3Lode = stress.sin3Lode(_lode_cutoff, 0);
93  if (sin3Lode <= _sin3tt)
94  {
95  // the non-edge-smoothed version
96  std::vector<Real> eigvals;
97  stress.symmetricEigenvalues(eigvals);
98  return mean_stress + std::sqrt(smooth(stress) + Utility::pow<2>(eigvals[2] - mean_stress)) -
99  tensile_strength(intnl);
100  }
101  else
102  {
103  // the edge-smoothed version
104  Real kk = _aaa + _bbb * sin3Lode + _ccc * Utility::pow<2>(sin3Lode);
105  Real sibar2 = stress.secondInvariant();
106  return mean_stress + std::sqrt(smooth(stress) + sibar2 * Utility::pow<2>(kk)) -
107  tensile_strength(intnl);
108  }
109 }
110 
113  Real /*intnl*/) const
114 {
115  Real mean_stress = stress.trace() / 3.0;
116  RankTwoTensor dmean_stress = stress.dtrace() / 3.0;
117  Real sin3Lode = stress.sin3Lode(_lode_cutoff, 0);
118  if (sin3Lode <= _sin3tt)
119  {
120  // the non-edge-smoothed version
121  std::vector<Real> eigvals;
122  std::vector<RankTwoTensor> deigvals;
123  stress.dsymmetricEigenvalues(eigvals, deigvals);
124  Real denom = std::sqrt(smooth(stress) + Utility::pow<2>(eigvals[2] - mean_stress));
125  return dmean_stress + (0.5 * dsmooth(stress) * dmean_stress +
126  (eigvals[2] - mean_stress) * (deigvals[2] - dmean_stress)) /
127  denom;
128  }
129  else
130  {
131  // the edge-smoothed version
132  Real kk = _aaa + _bbb * sin3Lode + _ccc * Utility::pow<2>(sin3Lode);
133  RankTwoTensor dkk = (_bbb + 2.0 * _ccc * sin3Lode) * stress.dsin3Lode(_lode_cutoff);
134  Real sibar2 = stress.secondInvariant();
135  RankTwoTensor dsibar2 = stress.dsecondInvariant();
136  Real denom = std::sqrt(smooth(stress) + sibar2 * Utility::pow<2>(kk));
137  return dmean_stress + (0.5 * dsmooth(stress) * dmean_stress +
138  0.5 * dsibar2 * Utility::pow<2>(kk) + sibar2 * kk * dkk) /
139  denom;
140  }
141 }
142 
143 Real
145  Real intnl) const
146 {
147  return -dtensile_strength(intnl);
148 }
149 
152 {
153  // This plasticity is associative so
154  return dyieldFunction_dstress(stress, intnl);
155 }
156 
159  Real /*intnl*/) const
160 {
161  Real mean_stress = stress.trace() / 3.0;
162  RankTwoTensor dmean_stress = stress.dtrace() / 3.0;
163  Real sin3Lode = stress.sin3Lode(_lode_cutoff, 0);
164  if (sin3Lode <= _sin3tt)
165  {
166  // the non-edge-smoothed version
167  std::vector<Real> eigvals;
168  std::vector<RankTwoTensor> deigvals;
169  std::vector<RankFourTensor> d2eigvals;
170  stress.dsymmetricEigenvalues(eigvals, deigvals);
171  stress.d2symmetricEigenvalues(d2eigvals);
172 
173  Real denom = std::sqrt(smooth(stress) + Utility::pow<2>(eigvals[2] - mean_stress));
174  Real denom3 = Utility::pow<3>(denom);
175  RankTwoTensor numer_part = deigvals[2] - dmean_stress;
176  RankTwoTensor numer_full =
177  0.5 * dsmooth(stress) * dmean_stress + (eigvals[2] - mean_stress) * numer_part;
178  Real d2smooth_over_denom = d2smooth(stress) / denom;
179 
180  RankFourTensor dr_dstress = (eigvals[2] - mean_stress) * d2eigvals[2] / denom;
181  for (unsigned i = 0; i < 3; ++i)
182  for (unsigned j = 0; j < 3; ++j)
183  for (unsigned k = 0; k < 3; ++k)
184  for (unsigned l = 0; l < 3; ++l)
185  {
186  dr_dstress(i, j, k, l) +=
187  0.5 * d2smooth_over_denom * dmean_stress(i, j) * dmean_stress(k, l);
188  dr_dstress(i, j, k, l) += numer_part(i, j) * numer_part(k, l) / denom;
189  dr_dstress(i, j, k, l) -= numer_full(i, j) * numer_full(k, l) / denom3;
190  }
191  return dr_dstress;
192  }
193  else
194  {
195  // the edge-smoothed version
196  RankTwoTensor dsin3Lode = stress.dsin3Lode(_lode_cutoff);
197  Real kk = _aaa + _bbb * sin3Lode + _ccc * Utility::pow<2>(sin3Lode);
198  RankTwoTensor dkk = (_bbb + 2.0 * _ccc * sin3Lode) * dsin3Lode;
199  RankFourTensor d2kk = (_bbb + 2.0 * _ccc * sin3Lode) * stress.d2sin3Lode(_lode_cutoff);
200  for (unsigned i = 0; i < 3; ++i)
201  for (unsigned j = 0; j < 3; ++j)
202  for (unsigned k = 0; k < 3; ++k)
203  for (unsigned l = 0; l < 3; ++l)
204  d2kk(i, j, k, l) += 2.0 * _ccc * dsin3Lode(i, j) * dsin3Lode(k, l);
205 
206  Real sibar2 = stress.secondInvariant();
207  RankTwoTensor dsibar2 = stress.dsecondInvariant();
208  RankFourTensor d2sibar2 = stress.d2secondInvariant();
209 
210  Real denom = std::sqrt(smooth(stress) + sibar2 * Utility::pow<2>(kk));
211  Real denom3 = Utility::pow<3>(denom);
212  Real d2smooth_over_denom = d2smooth(stress) / denom;
213  RankTwoTensor numer_full =
214  0.5 * dsmooth(stress) * dmean_stress + 0.5 * dsibar2 * kk * kk + sibar2 * kk * dkk;
215 
216  RankFourTensor dr_dstress = (0.5 * d2sibar2 * Utility::pow<2>(kk) + sibar2 * kk * d2kk) / denom;
217  for (unsigned i = 0; i < 3; ++i)
218  for (unsigned j = 0; j < 3; ++j)
219  for (unsigned k = 0; k < 3; ++k)
220  for (unsigned l = 0; l < 3; ++l)
221  {
222  dr_dstress(i, j, k, l) +=
223  0.5 * d2smooth_over_denom * dmean_stress(i, j) * dmean_stress(k, l);
224  dr_dstress(i, j, k, l) +=
225  (dsibar2(i, j) * dkk(k, l) * kk + dkk(i, j) * dsibar2(k, l) * kk +
226  sibar2 * dkk(i, j) * dkk(k, l)) /
227  denom;
228  dr_dstress(i, j, k, l) -= numer_full(i, j) * numer_full(k, l) / denom3;
229  }
230  return dr_dstress;
231  }
232 }
233 
236  Real /*intnl*/) const
237 {
238  return RankTwoTensor();
239 }
240 
241 Real
242 TensorMechanicsPlasticTensile::tensile_strength(const Real internal_param) const
243 {
244  return _strength.value(internal_param);
245 }
246 
247 Real
248 TensorMechanicsPlasticTensile::dtensile_strength(const Real internal_param) const
249 {
250  return _strength.derivative(internal_param);
251 }
252 
253 Real
255 {
256  Real smoother2 = _small_smoother2;
257  if (_tip_scheme == "cap")
258  {
259  Real x = stress.trace() / 3.0 - _cap_start;
260  Real p = 0;
261  if (x > 0)
262  p = x * (1 - std::exp(-_cap_rate * x));
263  smoother2 += Utility::pow<2>(p);
264  }
265  return smoother2;
266 }
267 
268 Real
270 {
271  Real dsmoother2 = 0;
272  if (_tip_scheme == "cap")
273  {
274  Real x = stress.trace() / 3.0 - _cap_start;
275  Real p = 0;
276  Real dp_dx = 0;
277  if (x > 0)
278  {
279  p = x * (1 - std::exp(-_cap_rate * x));
280  dp_dx = (1 - std::exp(-_cap_rate * x)) + x * _cap_rate * std::exp(-_cap_rate * x);
281  }
282  dsmoother2 += 2.0 * p * dp_dx;
283  }
284  return dsmoother2;
285 }
286 
287 Real
289 {
290  Real d2smoother2 = 0;
291  if (_tip_scheme == "cap")
292  {
293  Real x = stress.trace() / 3.0 - _cap_start;
294  Real p = 0;
295  Real dp_dx = 0;
296  Real d2p_dx2 = 0;
297  if (x > 0)
298  {
299  p = x * (1 - std::exp(-_cap_rate * x));
300  dp_dx = (1 - std::exp(-_cap_rate * x)) + x * _cap_rate * std::exp(-_cap_rate * x);
301  d2p_dx2 = 2.0 * _cap_rate * std::exp(-_cap_rate * x) -
302  x * Utility::pow<2>(_cap_rate) * std::exp(-_cap_rate * x);
303  }
304  d2smoother2 += 2.0 * Utility::pow<2>(dp_dx) + 2.0 * p * d2p_dx2;
305  }
306  return d2smoother2;
307 }
308 
309 std::string
311 {
312  return "Tensile";
313 }
TensorMechanicsPlasticTensile::dyieldFunction_dintnl
Real dyieldFunction_dintnl(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to the internal parameter.
Definition: TensorMechanicsPlasticTensile.C:144
TensorMechanicsPlasticTensile::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: TensorMechanicsPlasticTensile.C:235
TensorMechanicsPlasticTensile::TensorMechanicsPlasticTensile
TensorMechanicsPlasticTensile(const InputParameters &parameters)
Definition: TensorMechanicsPlasticTensile.C:62
TensorMechanicsPlasticTensile::_tip_scheme
MooseEnum _tip_scheme
The yield function is modified to f = s_m + sqrt(a + s_bar^2 K^2) - tensile_strength where "a" depend...
Definition: TensorMechanicsPlasticTensile.h:64
TensorMechanicsPlasticTensile::_lode_cutoff
Real _lode_cutoff
if secondInvariant < _lode_cutoff then set Lode angle to zero. This is to guard against precision-los...
Definition: TensorMechanicsPlasticTensile.h:82
TensorMechanicsPlasticTensile::_strength
const TensorMechanicsHardeningModel & _strength
Definition: TensorMechanicsPlasticTensile.h:54
TensorMechanicsPlasticModel::validParams
static InputParameters validParams()
Definition: TensorMechanicsPlasticModel.C:18
TensorMechanicsPlasticTensile::d2smooth
virtual Real d2smooth(const RankTwoTensor &stress) const
returns the d^2a/dstress_mean^2 - see doco for _tip_scheme
Definition: TensorMechanicsPlasticTensile.C:288
pow
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Definition: ExpressionBuilder.h:673
libMesh
Definition: RANFSNormalMechanicalContact.h:24
TensorMechanicsPlasticTensile::dyieldFunction_dstress
RankTwoTensor dyieldFunction_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of yield function with respect to stress.
Definition: TensorMechanicsPlasticTensile.C:112
TensorMechanicsPlasticTensile::_bbb
Real _bbb
Abbo et al's B parameter.
Definition: TensorMechanicsPlasticTensile.h:88
TensorMechanicsPlasticTensile::modelName
virtual std::string modelName() const override
Definition: TensorMechanicsPlasticTensile.C:310
TensorMechanicsPlasticTensile::_ccc
Real _ccc
Abbo et al's C parameter.
Definition: TensorMechanicsPlasticTensile.h:85
TensorMechanicsPlasticTensile::_sin3tt
Real _sin3tt
sin(3*_tt) - useful for making comparisons with Lode angle
Definition: TensorMechanicsPlasticTensile.h:79
TensorMechanicsPlasticTensile::_tt
Real _tt
edge smoothing parameter, in radians
Definition: TensorMechanicsPlasticTensile.h:76
TensorMechanicsPlasticTensile::_small_smoother2
Real _small_smoother2
Square of tip smoothing parameter to smooth the cone at mean_stress = T.
Definition: TensorMechanicsPlasticTensile.h:67
TensorMechanicsPlasticTensile::smooth
virtual Real smooth(const RankTwoTensor &stress) const
returns the 'a' parameter - see doco for _tip_scheme
Definition: TensorMechanicsPlasticTensile.C:254
TensorMechanicsPlasticTensile.h
TensorMechanicsPlasticTensile::dtensile_strength
virtual Real dtensile_strength(const Real internal_param) const
d(tensile strength)/d(internal_param) as a function of residual value, rate, and internal_param
Definition: TensorMechanicsPlasticTensile.C:248
TensorMechanicsPlasticTensile
FiniteStrainTensile implements rate-independent associative tensile failure with hardening/softening ...
Definition: TensorMechanicsPlasticTensile.h:32
TensorMechanicsPlasticTensile::validParams
static InputParameters validParams()
Definition: TensorMechanicsPlasticTensile.C:19
TensorMechanicsHardeningModel::derivative
virtual Real derivative(Real intnl) const
Definition: TensorMechanicsHardeningModel.C:47
TensorMechanicsPlasticTensile::dsmooth
virtual Real dsmooth(const RankTwoTensor &stress) const
returns the da/dstress_mean - see doco for _tip_scheme
Definition: TensorMechanicsPlasticTensile.C:269
TensorMechanicsPlasticTensile::tensile_strength
virtual Real tensile_strength(const Real internal_param) const
tensile strength as a function of residual value, rate, and internal_param
Definition: TensorMechanicsPlasticTensile.C:242
TensorMechanicsHardeningModel::value
virtual Real value(Real intnl) const
Definition: TensorMechanicsHardeningModel.C:45
RankTwoTensor
RankTwoTensorTempl< Real > RankTwoTensor
Definition: ACGrGrElasticDrivingForce.h:17
TensorMechanicsPlasticTensile::_cap_start
Real _cap_start
smoothing parameter dictating when the 'cap' will start - see doco for _tip_scheme
Definition: TensorMechanicsPlasticTensile.h:70
RankFourTensorTempl
Definition: ACGrGrElasticDrivingForce.h:20
TensorMechanicsPlasticTensile::flowPotential
RankTwoTensor flowPotential(const RankTwoTensor &stress, Real intnl) const override
The flow potential.
Definition: TensorMechanicsPlasticTensile.C:151
TensorMechanicsPlasticTensile::dflowPotential_dstress
RankFourTensor dflowPotential_dstress(const RankTwoTensor &stress, Real intnl) const override
The derivative of the flow potential with respect to stress.
Definition: TensorMechanicsPlasticTensile.C:158
TensorMechanicsPlasticTensile::yieldFunction
Real yieldFunction(const RankTwoTensor &stress, Real intnl) const override
The following functions are what you should override when building single-plasticity models.
Definition: TensorMechanicsPlasticTensile.C:89
TensorMechanicsPlasticModel
Plastic Model base class The virtual functions written below must be over-ridden in derived classes t...
Definition: TensorMechanicsPlasticModel.h:42
TensorMechanicsPlasticTensile::_aaa
Real _aaa
Abbo et al's A parameter.
Definition: TensorMechanicsPlasticTensile.h:91
defineLegacyParams
defineLegacyParams(TensorMechanicsPlasticTensile)
RankTwoTensorTempl< Real >
registerMooseObject
registerMooseObject("TensorMechanicsApp", TensorMechanicsPlasticTensile)
TensorMechanicsPlasticTensile::_cap_rate
Real _cap_rate
dictates how quickly the 'cap' degenerates to a hemisphere - see doco for _tip_scheme
Definition: TensorMechanicsPlasticTensile.h:73
TensorMechanicsHardeningModel
Hardening Model base class.
Definition: TensorMechanicsHardeningModel.h:27