11 #include "RankFourTensor.h"
12 #include "libmesh/utility.h"
22 params.addRequiredParam<UserObjectName>(
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>(
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>(
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 "
45 params.addParam<Real>(
48 "For the 'cap' tip_scheme, smoothing is performed in the stress_zz > cap_start region");
49 params.addRangeCheckedParam<Real>(
"cap_rate",
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)");
63 const InputParameters & parameters)
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"))
76 mooseError(
"Weak-Plane-Shear friction and dilation angles must lie in [0, Pi/2]");
79 "Weak-Plane-Shear friction angle must not be less than Weak-Plane-Shear dilation angle");
81 mooseError(
"Weak-Plane-Shear cohesion must not be negative");
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)) +
95 Real _tan_phi_or_psi)
const
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));
106 deriv(0, 2) = deriv(2, 0) = 0.5;
107 deriv(1, 2) = deriv(2, 1) = 0.5;
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;
115 deriv(2, 2) += _tan_phi_or_psi;
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));
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;
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;
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;
230 smoother2 += Utility::pow<2>(p);
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;
250 dsmoother2 += 2 * p * dp_dx;
258 Real d2smoother2 = 0;
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;
272 d2smoother2 += 2.0 * Utility::pow<2>(dp_dx) + 2.0 * p * d2p_dx2;
282 std::vector<bool> & act,
285 act.assign(1,
false);
286 returned_stress = stress;
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));
306 norm[0] = 0.25 * (stress(0, 2) + stress(2, 0)) / tau;
307 norm[1] = 0.25 * (stress(1, 2) + stress(2, 1)) / tau;
311 returned_stress(2, 2) =
cohesion(intnl) / tanphi;
323 Real alpha = f[0] / (Eijkl(0, 2, 0, 2) + Eijkl(2, 2, 2, 2) * tanpsi * tanphi);
325 if (1 - alpha * Eijkl(0, 2, 0, 2) / tau >= 0)
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];
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) =
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);
352 return "WeakPlaneShear";