11 #include "libmesh/utility.h" 22 "A SolidMechanicsHardening UserObject that defines hardening of the " 23 "tensile strength. In physical situations this is positive (and always " 24 "must be greater than negative compressive-strength.");
26 "compressive_strength",
27 "A SolidMechanicsHardening UserObject that defines hardening of the " 28 "compressive strength. In physical situations this is positive.");
30 "cohesion",
"A SolidMechanicsHardening UserObject that defines hardening of the cohesion");
32 "A SolidMechanicsHardening UserObject " 33 "that defines hardening of the " 34 "friction angle (in radians)");
37 "A SolidMechanicsHardening UserObject that defines hardening of the " 38 "dilation angle (in radians). Unless you are quite confident, this should " 39 "be set positive and not greater than the friction angle.");
40 params.
addParam<
bool>(
"perfect_guess",
42 "Provide a guess to the Newton-Raphson procedure " 43 "that is the result from perfect plasticity. With " 44 "severe hardening/softening this may be " 47 "tensile (Rankine) and compressive caps, with hardening/softening");
58 _perfect_guess(getParam<bool>(
"perfect_guess")),
62 _dsp_trial_scratch(3),
63 _eigvals_scratch(_tensor_dimensionality),
64 _dga_shear_scratch(3),
65 _dshear_correction_scratch(3)
68 mooseWarning(
"Usually the Mohr-Coulomb dilation angle is positive and not greater than the " 74 std::vector<Real> & stress_params)
const 82 std::vector<RankTwoTensor> & dsp)
const 84 mooseAssert(dsp.size() == 3,
85 "CappedMohrCoulombStressUpdate: dsp incorrectly sized in dstressparam_dstress");
88 "_eigvals_scratch incorrectly sized in CappedMohrCoulombStressUpdate:dstressparam_dstress");
94 std::vector<RankFourTensor> & d2sp)
const 100 mooseAssert(d2sp.size() == 3,
101 "CappedMohrCoulombStressUpdate: d2sp incorrectly sized in d2stressparam_dstress");
108 const std::vector<Real> & ,
109 const std::vector<Real> & ,
113 "_eigvals_scratch incorrectly sized in CappedMohrCoulombStressUpdate:preReturnMapV");
120 const std::vector<Real> & stress_params,
122 const std::vector<Real> & ,
128 stress =
RankTwoTensor(stress_params[0], stress_params[1], stress_params[2], 0.0, 0.0, 0.0);
135 const std::vector<Real> & intnl,
136 std::vector<Real> & yf)
const 143 const Real smax = stress_params[2];
144 const Real smid = stress_params[1];
145 const Real smin = stress_params[0];
152 yf[6] = 0.5 * (smax - smin) + 0.5 * (smax + smin) * sinphi - cohcos;
153 yf[7] = 0.5 * (smid - smin) + 0.5 * (smid + smin) * sinphi - cohcos;
154 yf[8] = 0.5 * (smax - smid) + 0.5 * (smax + smid) * sinphi - cohcos;
155 yf[9] = 0.5 * (smid - smax) + 0.5 * (smid + smax) * sinphi - cohcos;
156 yf[10] = 0.5 * (smin - smid) + 0.5 * (smin + smid) * sinphi - cohcos;
157 yf[11] = 0.5 * (smin - smax) + 0.5 * (smin + smax) * sinphi - cohcos;
162 const std::vector<Real> & intnl,
163 std::vector<yieldAndFlow> & all_q)
const 177 const Real smax = stress_params[2];
178 const Real smid = stress_params[1];
179 const Real smin = stress_params[0];
182 all_q[0].f = smax - ts;
183 all_q[1].f = smid - ts;
184 all_q[2].f = smin - ts;
185 all_q[3].f = -smin - cs;
186 all_q[4].f = -smid - cs;
187 all_q[5].f = -smax - cs;
188 all_q[6].f = 0.5 * (smax - smin) + 0.5 * (smax + smin) * sinphi - cohcos;
189 all_q[7].f = 0.5 * (smid - smin) + 0.5 * (smid + smin) * sinphi - cohcos;
190 all_q[8].f = 0.5 * (smax - smid) + 0.5 * (smax + smid) * sinphi - cohcos;
191 all_q[9].f = 0.5 * (smid - smax) + 0.5 * (smid + smax) * sinphi - cohcos;
192 all_q[10].f = 0.5 * (smin - smid) + 0.5 * (smin + smid) * sinphi - cohcos;
193 all_q[11].f = 0.5 * (smin - smax) + 0.5 * (smin + smax) * sinphi - cohcos;
196 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
198 all_q[yf].df[
a] = 0.0;
199 all_q[0].df[2] = 1.0;
200 all_q[1].df[1] = 1.0;
201 all_q[2].df[0] = 1.0;
202 all_q[3].df[0] = -1.0;
203 all_q[4].df[1] = -1.0;
204 all_q[5].df[2] = -1.0;
205 all_q[6].df[2] = 0.5 * (1.0 + sinphi);
206 all_q[6].df[0] = 0.5 * (-1.0 + sinphi);
207 all_q[7].df[1] = 0.5 * (1.0 + sinphi);
208 all_q[7].df[0] = 0.5 * (-1.0 + sinphi);
209 all_q[8].df[2] = 0.5 * (1.0 + sinphi);
210 all_q[8].df[1] = 0.5 * (-1.0 + sinphi);
211 all_q[9].df[1] = 0.5 * (1.0 + sinphi);
212 all_q[9].df[2] = 0.5 * (-1.0 + sinphi);
213 all_q[10].df[0] = 0.5 * (1.0 + sinphi);
214 all_q[10].df[1] = 0.5 * (-1.0 + sinphi);
215 all_q[11].df[0] = 0.5 * (1.0 + sinphi);
216 all_q[11].df[2] = 0.5 * (-1.0 + sinphi);
219 for (
unsigned i = 0; i < 6; ++i)
220 all_q[i].df_di[0] = 0.0;
221 all_q[0].df_di[1] = all_q[1].df_di[1] = all_q[2].df_di[1] = -dts;
222 all_q[3].df_di[1] = all_q[4].df_di[1] = all_q[5].df_di[1] = -dcs;
223 for (
unsigned i = 6; i < 12; ++i)
224 all_q[i].df_di[1] = 0.0;
225 all_q[6].df_di[0] = 0.5 * (smax + smin) * dsinphi - dcohcos;
226 all_q[7].df_di[0] = 0.5 * (smid + smin) * dsinphi - dcohcos;
227 all_q[8].df_di[0] = 0.5 * (smax + smid) * dsinphi - dcohcos;
228 all_q[9].df_di[0] = 0.5 * (smid + smax) * dsinphi - dcohcos;
229 all_q[10].df_di[0] = 0.5 * (smin + smid) * dsinphi - dcohcos;
230 all_q[11].df_di[0] = 0.5 * (smin + smax) * dsinphi - dcohcos;
234 for (
unsigned yf = 0; yf < 6; ++yf)
236 all_q[yf].dg[
a] = all_q[yf].df[
a];
237 all_q[6].dg[2] = all_q[7].dg[1] = all_q[8].dg[2] = all_q[9].dg[1] = all_q[10].dg[0] =
238 all_q[11].dg[0] = 0.5 * (1.0 + sinpsi);
239 all_q[6].dg[0] = all_q[7].dg[0] = all_q[8].dg[1] = all_q[9].dg[2] = all_q[10].dg[1] =
240 all_q[11].dg[2] = 0.5 * (-1.0 + sinpsi);
243 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
246 all_q[yf].d2g_di[
a][i] = 0.0;
247 all_q[6].d2g_di[2][0] = all_q[7].d2g_di[1][0] = all_q[8].d2g_di[2][0] = all_q[9].d2g_di[1][0] =
248 all_q[10].d2g_di[0][0] = all_q[11].d2g_di[0][0] = 0.5 * dsinpsi;
249 all_q[6].d2g_di[0][0] = all_q[7].d2g_di[0][0] = all_q[8].d2g_di[1][0] = all_q[9].d2g_di[2][0] =
250 all_q[10].d2g_di[1][0] = all_q[11].d2g_di[2][0] = 0.5 * dsinpsi;
253 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
256 all_q[yf].d2g[
a][
b] = 0.0;
272 for (
unsigned b = 0;
b <
a; ++
b)
279 const std::vector<Real> & intnl_old,
280 std::vector<Real> & stress_params,
282 std::vector<Real> & intnl)
const 286 for (
unsigned i = 0; i <
_num_sp; ++i)
287 stress_params[i] = trial_stress_params[i];
297 const Real trial_tensile_yf = trial_stress_params[2] - ts;
298 const Real trial_compressive_yf = -trial_stress_params[0] - cs;
299 const Real trial_mc_yf = 0.5 * (trial_stress_params[2] - trial_stress_params[0]) +
300 0.5 * (trial_stress_params[2] + trial_stress_params[0]) * sinphi -
328 bool found_solution =
false;
330 if (trial_tensile_yf <=
_f_tol && trial_compressive_yf <=
_f_tol && trial_mc_yf <=
_f_tol)
334 for (
unsigned i = 0; i <
_num_sp; ++i)
335 stress_params[i] = trial_stress_params[i];
337 found_solution =
true;
340 const bool tensile_possible = (ts < cohcos / sinphi);
341 const bool mc_tip_possible = (cohcos / sinphi < ts);
342 const bool mc_impossible = (0.5 * (ts + cs) + 0.5 * (ts - cs) * sinphi - cohcos <
346 const Real halfplus = 0.5 + 0.5 * sinpsi;
347 const Real neghalfplus = -0.5 + 0.5 * sinpsi;
349 if (!found_solution && tensile_possible && trial_tensile_yf >
_f_tol &&
350 (trial_compressive_yf <=
_f_tol || (trial_compressive_yf >
_f_tol && mc_impossible)))
356 const Real ga = (trial_stress_params[2] - ts) /
_Eij[2][2];
357 stress_params[2] = ts;
358 stress_params[1] = trial_stress_params[1] - ga *
_Eij[1][2];
359 stress_params[0] = trial_stress_params[0] - ga *
_Eij[0][2];
363 const Real to_subtract1 = stress_params[1] - (ts - 0.5 *
_shifter);
364 if (to_subtract1 > 0.0)
366 dist_mod += Utility::pow<2>(to_subtract1 / (trial_stress_params[2] - ts));
367 stress_params[1] -= to_subtract1;
369 const Real to_subtract0 = stress_params[0] - (ts -
_shifter);
370 if (to_subtract0 > 0.0)
372 dist_mod += Utility::pow<2>(to_subtract0 / (trial_stress_params[2] - ts));
373 stress_params[0] -= to_subtract0;
377 const Real to_add0 = -stress_params[0] - cs;
380 dist_mod += Utility::pow<2>(to_add0 / (trial_stress_params[2] - ts));
381 stress_params[0] += to_add0;
383 const Real to_add1 = -cs + 0.5 *
_shifter - stress_params[1];
386 dist_mod += Utility::pow<2>(to_add1 / (trial_stress_params[2] - ts));
387 stress_params[1] += to_add1;
391 const Real new_compressive_yf = -stress_params[0] - cs;
392 const Real new_mc_yf = 0.5 * (stress_params[2] - stress_params[0]) +
393 0.5 * (stress_params[2] + stress_params[0]) * sinphi - cohcos;
394 if (new_mc_yf <=
_f_tol && new_compressive_yf <=
_f_tol)
396 gaE = std::sqrt(dist_mod) * (trial_stress_params[2] - stress_params[2]);
397 found_solution =
true;
400 if (!found_solution && trial_compressive_yf >
_f_tol &&
401 (trial_tensile_yf <=
_f_tol || (trial_tensile_yf >
_f_tol && mc_impossible)))
406 const Real ga = (trial_stress_params[0] + cs) /
_Eij[0][0];
407 stress_params[0] = -cs;
408 stress_params[1] = trial_stress_params[1] - ga *
_Eij[1][0];
409 stress_params[2] = trial_stress_params[2] - ga *
_Eij[2][0];
413 const Real to_add1 = -cs + 0.5 *
_shifter - stress_params[1];
416 dist_mod += Utility::pow<2>(to_add1 / (trial_stress_params[0] + cs));
417 stress_params[1] += to_add1;
422 dist_mod += Utility::pow<2>(to_add2 / (trial_stress_params[0] + cs));
423 stress_params[2] += to_add2;
427 const Real to_subtract2 = stress_params[2] - ts;
428 if (to_subtract2 > 0.0)
430 dist_mod += Utility::pow<2>(to_subtract2 / (trial_stress_params[0] + cs));
431 stress_params[2] -= to_subtract2;
433 const Real to_subtract1 = stress_params[1] - (ts - 0.5 *
_shifter);
434 if (to_subtract1 > 0.0)
436 dist_mod += Utility::pow<2>(to_subtract1 / (trial_stress_params[0] + cs));
437 stress_params[1] -= to_subtract1;
441 const Real new_tensile_yf = stress_params[2] - ts;
442 const Real new_mc_yf = 0.5 * (stress_params[2] - stress_params[0]) +
443 0.5 * (stress_params[2] + stress_params[0]) * sinphi - cohcos;
446 gaE = std::sqrt(dist_mod) * (-trial_stress_params[0] + stress_params[0]);
447 found_solution =
true;
450 if (!found_solution && !mc_impossible && trial_mc_yf >
_f_tol)
454 const Real ga = ((trial_stress_params[2] - trial_stress_params[0]) +
455 (trial_stress_params[2] + trial_stress_params[0]) * sinphi - 2.0 * cohcos) /
458 trial_stress_params[2] - ga * (
_Eij[2][2] * halfplus +
_Eij[2][0] * neghalfplus);
459 stress_params[1] = trial_stress_params[1] - ga *
_Eij[1][0] * sinpsi;
461 trial_stress_params[0] - ga * (
_Eij[0][0] * neghalfplus +
_Eij[0][2] * halfplus);
462 const Real f7 = 0.5 * (stress_params[1] - stress_params[0]) +
463 0.5 * (stress_params[1] + stress_params[0]) * sinphi - cohcos;
464 const Real f8 = 0.5 * (stress_params[2] - stress_params[1]) +
465 0.5 * (stress_params[2] + stress_params[1]) * sinphi - cohcos;
466 const Real new_tensile_yf = stress_params[2] - ts;
467 const Real new_compressive_yf = -stress_params[0] - cs;
471 gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
472 (stress_params[2] - stress_params[0])) /
474 found_solution =
true;
477 if (!found_solution && !mc_impossible && trial_mc_yf >
_f_tol)
492 const Real cmax6 =
_Eij[2][2] * halfplus +
_Eij[2][0] * neghalfplus;
493 const Real cmax7 =
_Eij[2][1] * halfplus +
_Eij[2][0] * neghalfplus;
496 const Real cmin6 =
_Eij[0][2] * halfplus +
_Eij[0][0] * neghalfplus;
497 const Real cmin7 =
_Eij[0][1] * halfplus +
_Eij[0][0] * neghalfplus;
501 const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
502 const Real c7 = 0.5 * (cmax7 - cmin7) + 0.5 * (cmax7 + cmin7) * sinphi;
508 const Real f6_trial = trial_mc_yf;
509 const Real f7_trial = 0.5 * (trial_stress_params[1] - trial_stress_params[0]) +
510 0.5 * (trial_stress_params[1] + trial_stress_params[0]) * sinphi -
512 const Real descr = Utility::pow<2>(c6) - Utility::pow<2>(c7);
513 Real ga6 = (c6 * f6_trial - c7 * f7_trial) / descr;
514 Real ga7 = (-c7 * f6_trial + c6 * f7_trial) / descr;
516 stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga7 * cmax7;
517 stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga7 * cmin7;
518 stress_params[1] = stress_params[2] - 0.5 *
_shifter;
520 Real f8 = 0.5 * (stress_params[2] - stress_params[1]) +
521 0.5 * (stress_params[2] + stress_params[1]) * sinphi - cohcos;
523 if (mc_tip_possible && f8 >
_f_tol)
525 stress_params[2] = cohcos / sinphi;
526 stress_params[1] = stress_params[2] - 0.5 *
_shifter;
527 stress_params[0] = stress_params[2] -
_shifter;
533 const Real new_tensile_yf = stress_params[2] - ts;
534 const Real new_compressive_yf = -stress_params[0] - cs;
537 ga6 >= 0.0 && ga7 >= 0.0)
539 gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
540 (stress_params[2] - stress_params[0])) /
542 found_solution =
true;
546 if (!found_solution && !mc_impossible && trial_mc_yf >
_f_tol)
561 const Real cmax6 =
_Eij[2][2] * halfplus +
_Eij[2][0] * neghalfplus;
562 const Real cmax8 =
_Eij[2][2] * halfplus +
_Eij[2][1] * neghalfplus;
565 const Real cmin6 =
_Eij[0][2] * halfplus +
_Eij[0][0] * neghalfplus;
566 const Real cmin8 =
_Eij[0][2] * halfplus +
_Eij[0][1] * neghalfplus;
570 const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
571 const Real c8 = 0.5 * (cmax8 - cmin8) + 0.5 * (cmax8 + cmin8) * sinphi;
577 const Real f6_trial = trial_mc_yf;
578 const Real f8_trial = 0.5 * (trial_stress_params[2] - trial_stress_params[1]) +
579 0.5 * (trial_stress_params[2] + trial_stress_params[1]) * sinphi -
581 const Real descr = Utility::pow<2>(c6) - Utility::pow<2>(c8);
582 Real ga6 = (c6 * f6_trial - c8 * f8_trial) / descr;
583 Real ga8 = (-c8 * f6_trial + c6 * f8_trial) / descr;
585 stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga8 * cmax8;
586 stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga8 * cmin8;
587 stress_params[1] = stress_params[0] + 0.5 *
_shifter;
589 Real f7 = 0.5 * (stress_params[1] - stress_params[0]) +
590 0.5 * (stress_params[1] + stress_params[0]) * sinphi - cohcos;
592 if (mc_tip_possible && f7 >
_f_tol)
594 stress_params[2] = cohcos / sinphi;
595 stress_params[1] = stress_params[2] - 0.5 *
_shifter;
596 stress_params[0] = stress_params[2] -
_shifter;
602 const Real new_tensile_yf = stress_params[2] - ts;
603 const Real new_compressive_yf = -stress_params[0] - cs;
606 ga6 >= 0.0 && ga8 >= 0.0)
608 gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
609 (stress_params[2] - stress_params[0])) /
611 found_solution =
true;
615 if (!found_solution && !mc_impossible && tensile_possible && trial_tensile_yf >
_f_tol)
630 const Real cmax6 =
_Eij[2][2] * halfplus +
_Eij[2][0] * neghalfplus;
632 const Real cmid6 =
_Eij[1][2] * halfplus +
_Eij[1][0] * neghalfplus;
634 const Real cmin6 =
_Eij[0][2] * halfplus +
_Eij[0][0] * neghalfplus;
639 const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
640 const Real c0 = 0.5 * (cmax0 - cmin0) + 0.5 * (cmax0 + cmin0) * sinphi;
644 const Real descr = c0 * cmax6 - c6 * cmax0;
647 const Real ga0 = (-c6 * trial_tensile_yf + cmax6 * trial_mc_yf) / descr;
648 const Real ga6 = (c0 * trial_tensile_yf - cmax0 * trial_mc_yf) / descr;
649 stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga0 * cmax0;
650 stress_params[1] = trial_stress_params[1] - ga6 * cmid6 - ga0 * cmid0;
651 stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga0 * cmin0;
655 std::min(stress_params[0],
660 const bool goto_corner = (stress_params[1] >= stress_params[2] - 0.5 *
_shifter);
661 stress_params[1] = std::max(std::min(stress_params[1], stress_params[2] - 0.5 *
_shifter),
664 const Real new_compressive_yf = -stress_params[0] - cs;
665 if (new_compressive_yf <=
_f_tol &&
666 (goto_corner || (ga0 >= 0.0 && ga6 >= 0.0)))
668 gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
669 (stress_params[2] - stress_params[0])) /
671 (trial_stress_params[2] - stress_params[2]);
672 found_solution =
true;
676 if (!found_solution && !mc_impossible)
691 const Real cmax6 =
_Eij[2][2] * halfplus +
_Eij[2][0] * neghalfplus;
693 const Real cmid6 =
_Eij[1][2] * halfplus +
_Eij[1][0] * neghalfplus;
695 const Real cmin6 =
_Eij[0][2] * halfplus +
_Eij[0][0] * neghalfplus;
700 const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
701 const Real c3 = 0.5 * (cmax3 - cmin3) + 0.5 * (cmax3 + cmin3) * sinphi;
705 const Real descr = c3 * cmin6 - c6 * cmin3;
708 const Real ga3 = (c6 * trial_compressive_yf + cmin6 * trial_mc_yf) / descr;
709 const Real ga6 = (-c3 * trial_compressive_yf - cmin3 * trial_mc_yf) / descr;
710 stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga3 * cmax3;
711 stress_params[1] = trial_stress_params[1] - ga6 * cmid6 - ga3 * cmid3;
712 stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga3 * cmin3;
714 const Real new_tensile_yf = stress_params[2] - ts;
716 std::max(stress_params[2],
718 stress_params[1] = std::max(std::min(stress_params[1], stress_params[2] - 0.5 *
_shifter),
721 if (new_tensile_yf <= _f_tol && ga6 >= 0.0)
723 gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
724 (stress_params[2] - stress_params[0])) /
726 (-trial_stress_params[0] - stress_params[0]);
728 found_solution =
true;
735 for (
unsigned i = 0; i <
_num_sp; ++i)
736 stress_params[i] = trial_stress_params[i];
738 mooseWarning(
"CappedMohrCoulombStressUpdate cannot initialize from max = ",
751 const std::vector<Real> & current_stress_params,
752 const std::vector<Real> & intnl_old,
753 std::vector<Real> & intnl)
const 756 const Real smax = current_stress_params[2];
757 const Real smin = current_stress_params[0];
758 const Real trial_smax = trial_stress_params[2];
759 const Real trial_smin = trial_stress_params[0];
760 const Real ga_shear = ((trial_smax - trial_smin) - (smax - smin)) / (
_Eij[2][2] -
_Eij[0][2]);
761 intnl[0] = intnl_old[0] + ga_shear;
763 const Real prefactor = (
_Eij[2][2] +
_Eij[0][2]) * sinpsi;
764 const Real shear_correction = prefactor * ga_shear;
766 ((trial_smax + trial_smin) - (smax + smin) - shear_correction) /
768 intnl[1] = intnl_old[1] + ga_tensile;
773 const std::vector<Real> & current_stress_params,
774 const std::vector<Real> & intnl,
775 std::vector<std::vector<Real>> & dintnl)
const 778 const Real smax = current_stress_params[2];
779 const Real smin = current_stress_params[0];
780 const Real trial_smax = trial_stress_params[2];
781 const Real trial_smin = trial_stress_params[0];
782 const Real ga_shear = ((trial_smax - trial_smin) - (smax - smin)) / (
_Eij[2][2] -
_Eij[0][2]);
785 "_dga_shear_scratch incorrectly sized in CappedMohrCoulombStressUpdate:setIntnlDerivativesV");
790 for (std::size_t i = 0; i <
_num_sp; ++i)
796 const Real prefactor = (
_Eij[2][2] +
_Eij[0][2]) * sinpsi;
797 const Real dprefactor_di0 = (
_Eij[2][2] +
_Eij[0][2]) * dsinpsi_di0;
800 "_dshear_correction_scratch incorrectly sized in " 801 "CappedMohrCoulombStressUpdate:setIntnlDerivativesV");
802 for (std::size_t i = 0; i <
_num_sp; ++i)
809 for (std::size_t i = 0; i <
_num_sp; ++i)
818 const std::vector<Real> & trial_stress_params,
820 const std::vector<Real> & stress_params,
824 bool compute_full_tangent_operator,
825 const std::vector<std::vector<Real>> & dvar_dtrial,
829 if (!compute_full_tangent_operator)
845 if (trial_stress_params[
a] == trial_stress_params[
j])
847 drot_dstress(i,
j,
k, l) +=
850 (trial_stress_params[
j] - trial_stress_params[
a]);
861 dstress_dtrial(i,
j,
k, l) +=
862 drot_dstress(i,
a,
k, l) * stress_params[
a] * eT(
a,
j) +
863 _eigvecs(i,
a) * stress_params[
a] * drot_dstress(
j,
a,
k, l);
872 dstress_dtrial(i,
j,
k, l) +=
const SolidMechanicsHardeningModel & _phi
Hardening model for friction angle.
void d2stressparam_dstress(const RankTwoTensor &stress, std::vector< RankFourTensor > &d2sp) const override
d2(stress_param[i])/d(stress)/d(stress) at given stress.
void symmetricEigenvalues(std::vector< Real > &eigvals) const
CappedMohrCoulombStressUpdate implements rate-independent nonassociative Mohr-Coulomb plus tensile pl...
void computeStressParams(const RankTwoTensor &stress, std::vector< Real > &stress_params) const override
Computes stress_params, given stress.
void computeAllQV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const override
Completely fills all_q with correct values.
void dsymmetricEigenvalues(std::vector< Real > &eigvals, std::vector< RankTwoTensorTempl< Real >> &deigvals) const
const bool _perfect_guess
Whether to provide an estimate of the returned stress, based on perfect plasticity.
const unsigned _num_intnl
Number of internal parameters.
virtual void consistentTangentOperatorV(const RankTwoTensor &stress_trial, const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress, const std::vector< Real > &stress_params, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, const std::vector< std::vector< Real >> &dvar_dtrial, RankFourTensor &cto) override
Calculates the consistent tangent operator.
Real _En
normalising factor
Struct designed to hold info about a single yield function and its derivatives, as well as the flow d...
const SolidMechanicsHardeningModel & _tensile_strength
Hardening model for tensile strength.
std::vector< std::vector< Real > > _Cij
_Cij[i, j] * _Eij[j, k] = 1 iff j == k
std::vector< Real > _eigvals_scratch
eigenvalues of the stress, used in dstressparam_dstress and preReturnMapV.
virtual Real value(Real intnl) const
std::vector< Real > _dshear_correction_scratch
scratch vector used in setIntnlDerivativesV.
void dstressparam_dstress(const RankTwoTensor &stress, std::vector< RankTwoTensor > &dsp) const override
d(stress_param[i])/d(stress) at given stress.
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)
void setEffectiveElasticity(const RankFourTensor &Eijkl) override
Sets _Eij and _En and _Cij.
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
const Real _f_tol
The yield-function tolerance.
const unsigned _num_yf
Number of yield functions.
std::vector< Real > _dga_shear_scratch
derivative of ga_shear w.r.t.
CappedMohrCoulombStressUpdate(const InputParameters ¶meters)
void setIntnlValuesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > ¤t_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const override
Sets the internal parameters based on the trial values of stress_params, their current values...
const Real _shifter
When equal-eigenvalues are predicted from the stress initialization routine, shift them by this amoun...
void d2symmetricEigenvalues(std::vector< RankFourTensorTempl< Real >> &deriv) const
virtual void preReturnMapV(const std::vector< Real > &trial_stress_params, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl) override
Derived classes may employ this function to record stuff or do other computations prior to the return...
void yieldFunctionValuesV(const std::vector< Real > &stress_params, const std::vector< Real > &intnl, std::vector< Real > &yf) const override
Computes the values of the yield functions, given stress_params and intnl parameters.
registerMooseObject("SolidMechanicsApp", CappedMohrCoulombStressUpdate)
void setIntnlDerivativesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > ¤t_stress_params, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const override
Sets the derivatives of internal parameters, based on the trial values of stress_params, their current values, and the current values of the internal parameters.
const SolidMechanicsHardeningModel & _compressive_strength
Hardening model for compressive strength.
virtual Real derivative(Real intnl) const
RankTwoTensorTempl< Real > transpose() const
Hardening Model base class.
const SolidMechanicsHardeningModel & _cohesion
Hardening model for cohesion.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
void initializeVarsV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &intnl_old, std::vector< Real > &stress_params, Real &gaE, std::vector< Real > &intnl) const override
Sets (stress_params, intnl) at "good guesses" of the solution to the Return-Map algorithm.
void symmetricEigenvaluesEigenvectors(std::vector< Real > &eigvals, RankTwoTensorTempl< Real > &eigvecs) const
std::vector< RankTwoTensor > _dsp_trial_scratch
this is d(stress_param[:])/d(stress) which is calculated by dstressparam_dstress. ...
MultiParameterPlasticityStressUpdate performs the return-map algorithm and associated stress updates ...
void mooseWarning(Args &&... args) const
const SolidMechanicsHardeningModel & _psi
Hardening model for dilation angle.
RankTwoTensor _eigvecs
Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to s...
static InputParameters validParams()
virtual void setStressAfterReturnV(const RankTwoTensor &stress_trial, const std::vector< Real > &stress_params, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const override
Sets stress from the admissible parameters.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
static constexpr unsigned _tensor_dimensionality
Internal dimensionality of tensors (currently this is 3 throughout solid mechanics) ...
static const std::string k
Real _poissons_ratio
Poisson's ratio.
const unsigned _num_sp
Number of stress parameters.