11 #include "libmesh/utility.h"
22 params.addRequiredParam<UserObjectName>(
24 "A TensorMechanicsHardening UserObject that defines hardening of the "
25 "tensile strength. In physical situations this is positive (and always "
26 "must be greater than negative compressive-strength.");
27 params.addRequiredParam<UserObjectName>(
28 "compressive_strength",
29 "A TensorMechanicsHardening UserObject that defines hardening of the "
30 "compressive strength. In physical situations this is positive.");
31 params.addRequiredParam<UserObjectName>(
32 "cohesion",
"A TensorMechanicsHardening UserObject that defines hardening of the cohesion");
33 params.addRequiredParam<UserObjectName>(
"friction_angle",
34 "A TensorMechanicsHardening UserObject "
35 "that defines hardening of the "
36 "friction angle (in radians)");
37 params.addRequiredParam<UserObjectName>(
39 "A TensorMechanicsHardening UserObject that defines hardening of the "
40 "dilation angle (in radians). Unless you are quite confident, this should "
41 "be set positive and not greater than the friction angle.");
42 params.addParam<
bool>(
"perfect_guess",
44 "Provide a guess to the Newton-Raphson procedure "
45 "that is the result from perfect plasticity. With "
46 "severe hardening/softening this may be "
48 params.addClassDescription(
"Nonassociative, smoothed, Mohr-Coulomb plasticity capped with "
49 "tensile (Rankine) and compressive caps, with hardening/softening");
60 _perfect_guess(getParam<bool>(
"perfect_guess")),
66 mooseWarning(
"Usually the Mohr-Coulomb dilation angle is positive and not greater than the "
72 std::vector<Real> & stress_params)
const
75 stress.symmetricEigenvalues(stress_params);
78 std::vector<RankTwoTensor>
82 std::vector<RankTwoTensor> dsp;
83 stress.dsymmetricEigenvalues(sp, dsp);
87 std::vector<RankFourTensor>
90 std::vector<RankFourTensor> d2;
91 stress.d2symmetricEigenvalues(d2);
98 const std::vector<Real> & ,
99 const std::vector<Real> & ,
102 std::vector<Real> eigvals;
103 stress_trial.symmetricEigenvaluesEigenvectors(eigvals,
_eigvecs);
109 const std::vector<Real> & stress_params,
111 const std::vector<Real> & ,
117 stress =
RankTwoTensor(stress_params[0], stress_params[1], stress_params[2], 0.0, 0.0, 0.0);
124 const std::vector<Real> & intnl,
125 std::vector<Real> & yf)
const
130 const Real sinphi = std::sin(
_phi.
value(intnl[0]));
132 const Real smax = stress_params[2];
133 const Real smid = stress_params[1];
134 const Real smin = stress_params[0];
141 yf[6] = 0.5 * (smax - smin) + 0.5 * (smax + smin) * sinphi - cohcos;
142 yf[7] = 0.5 * (smid - smin) + 0.5 * (smid + smin) * sinphi - cohcos;
143 yf[8] = 0.5 * (smax - smid) + 0.5 * (smax + smid) * sinphi - cohcos;
144 yf[9] = 0.5 * (smid - smax) + 0.5 * (smid + smax) * sinphi - cohcos;
145 yf[10] = 0.5 * (smin - smid) + 0.5 * (smin + smid) * sinphi - cohcos;
146 yf[11] = 0.5 * (smin - smax) + 0.5 * (smin + smax) * sinphi - cohcos;
151 const std::vector<Real> & intnl,
152 std::vector<yieldAndFlow> & all_q)
const
158 const Real sinphi = std::sin(
_phi.
value(intnl[0]));
160 const Real sinpsi = std::sin(
_psi.
value(intnl[0]));
166 const Real smax = stress_params[2];
167 const Real smid = stress_params[1];
168 const Real smin = stress_params[0];
171 all_q[0].f = smax - ts;
172 all_q[1].f = smid - ts;
173 all_q[2].f = smin - ts;
174 all_q[3].f = -smin - cs;
175 all_q[4].f = -smid - cs;
176 all_q[5].f = -smax - cs;
177 all_q[6].f = 0.5 * (smax - smin) + 0.5 * (smax + smin) * sinphi - cohcos;
178 all_q[7].f = 0.5 * (smid - smin) + 0.5 * (smid + smin) * sinphi - cohcos;
179 all_q[8].f = 0.5 * (smax - smid) + 0.5 * (smax + smid) * sinphi - cohcos;
180 all_q[9].f = 0.5 * (smid - smax) + 0.5 * (smid + smax) * sinphi - cohcos;
181 all_q[10].f = 0.5 * (smin - smid) + 0.5 * (smin + smid) * sinphi - cohcos;
182 all_q[11].f = 0.5 * (smin - smax) + 0.5 * (smin + smax) * sinphi - cohcos;
185 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
186 for (
unsigned a = 0; a <
_num_sp; ++a)
187 all_q[yf].df[a] = 0.0;
188 all_q[0].df[2] = 1.0;
189 all_q[1].df[1] = 1.0;
190 all_q[2].df[0] = 1.0;
191 all_q[3].df[0] = -1.0;
192 all_q[4].df[1] = -1.0;
193 all_q[5].df[2] = -1.0;
194 all_q[6].df[2] = 0.5 * (1.0 + sinphi);
195 all_q[6].df[0] = 0.5 * (-1.0 + sinphi);
196 all_q[7].df[1] = 0.5 * (1.0 + sinphi);
197 all_q[7].df[0] = 0.5 * (-1.0 + sinphi);
198 all_q[8].df[2] = 0.5 * (1.0 + sinphi);
199 all_q[8].df[1] = 0.5 * (-1.0 + sinphi);
200 all_q[9].df[1] = 0.5 * (1.0 + sinphi);
201 all_q[9].df[2] = 0.5 * (-1.0 + sinphi);
202 all_q[10].df[0] = 0.5 * (1.0 + sinphi);
203 all_q[10].df[1] = 0.5 * (-1.0 + sinphi);
204 all_q[11].df[0] = 0.5 * (1.0 + sinphi);
205 all_q[11].df[2] = 0.5 * (-1.0 + sinphi);
208 for (
unsigned i = 0; i < 6; ++i)
209 all_q[i].df_di[0] = 0.0;
210 all_q[0].df_di[1] = all_q[1].df_di[1] = all_q[2].df_di[1] = -dts;
211 all_q[3].df_di[1] = all_q[4].df_di[1] = all_q[5].df_di[1] = -dcs;
212 for (
unsigned i = 6; i < 12; ++i)
213 all_q[i].df_di[1] = 0.0;
214 all_q[6].df_di[0] = 0.5 * (smax + smin) * dsinphi - dcohcos;
215 all_q[7].df_di[0] = 0.5 * (smid + smin) * dsinphi - dcohcos;
216 all_q[8].df_di[0] = 0.5 * (smax + smid) * dsinphi - dcohcos;
217 all_q[9].df_di[0] = 0.5 * (smid + smax) * dsinphi - dcohcos;
218 all_q[10].df_di[0] = 0.5 * (smin + smid) * dsinphi - dcohcos;
219 all_q[11].df_di[0] = 0.5 * (smin + smax) * dsinphi - dcohcos;
223 for (
unsigned yf = 0; yf < 6; ++yf)
224 for (
unsigned a = 0; a <
_num_sp; ++a)
225 all_q[yf].dg[a] = all_q[yf].df[a];
226 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] =
227 all_q[11].dg[0] = 0.5 * (1.0 + sinpsi);
228 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] =
229 all_q[11].dg[2] = 0.5 * (-1.0 + sinpsi);
232 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
233 for (
unsigned a = 0; a <
_num_sp; ++a)
235 all_q[yf].d2g_di[a][i] = 0.0;
236 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] =
237 all_q[10].d2g_di[0][0] = all_q[11].d2g_di[0][0] = 0.5 * dsinpsi;
238 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] =
239 all_q[10].d2g_di[1][0] = all_q[11].d2g_di[2][0] = 0.5 * dsinpsi;
242 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
243 for (
unsigned a = 0; a <
_num_sp; ++a)
244 for (
unsigned b = 0; b <
_num_sp; ++b)
245 all_q[yf].d2g[a][b] = 0.0;
253 for (
unsigned a = 0; a <
_num_sp; ++a)
254 for (
unsigned b = 0; b <
_num_sp; ++b)
255 _Eij[a][b] = Eijkl(a, a, b, b);
257 const Real denom =
_Eij[0][0] * (
_Eij[0][0] +
_Eij[0][1]) - 2 * Utility::pow<2>(
_Eij[0][1]);
258 for (
unsigned a = 0; a <
_num_sp; ++a)
261 for (
unsigned b = 0; b < a; ++b)
268 const std::vector<Real> & intnl_old,
269 std::vector<Real> & stress_params,
271 std::vector<Real> & intnl)
const
275 for (
unsigned i = 0; i <
_num_sp; ++i)
276 stress_params[i] = trial_stress_params[i];
283 const Real sinphi = std::sin(
_phi.
value(intnl_old[0]));
286 const Real trial_tensile_yf = trial_stress_params[2] - ts;
287 const Real trial_compressive_yf = -trial_stress_params[0] - cs;
288 const Real trial_mc_yf = 0.5 * (trial_stress_params[2] - trial_stress_params[0]) +
289 0.5 * (trial_stress_params[2] + trial_stress_params[0]) * sinphi -
317 bool found_solution =
false;
319 if (trial_tensile_yf <=
_f_tol && trial_compressive_yf <=
_f_tol && trial_mc_yf <=
_f_tol)
323 for (
unsigned i = 0; i <
_num_sp; ++i)
324 stress_params[i] = trial_stress_params[i];
326 found_solution =
true;
329 const bool tensile_possible = (ts < cohcos / sinphi);
330 const bool mc_tip_possible = (cohcos / sinphi < ts);
331 const bool mc_impossible = (0.5 * (ts + cs) + 0.5 * (ts - cs) * sinphi - cohcos <
334 const Real sinpsi = std::sin(
_psi.
value(intnl_old[0]));
335 const Real halfplus = 0.5 + 0.5 * sinpsi;
336 const Real neghalfplus = -0.5 + 0.5 * sinpsi;
338 if (!found_solution && tensile_possible && trial_tensile_yf >
_f_tol &&
339 (trial_compressive_yf <=
_f_tol || (trial_compressive_yf >
_f_tol && mc_impossible)))
345 const Real ga = (trial_stress_params[2] - ts) /
_Eij[2][2];
346 stress_params[2] = ts;
347 stress_params[1] = trial_stress_params[1] - ga *
_Eij[1][2];
348 stress_params[0] = trial_stress_params[0] - ga *
_Eij[0][2];
352 const Real to_subtract1 = stress_params[1] - (ts - 0.5 *
_shifter);
353 if (to_subtract1 > 0.0)
355 dist_mod += Utility::pow<2>(to_subtract1 / (trial_stress_params[2] - ts));
356 stress_params[1] -= to_subtract1;
358 const Real to_subtract0 = stress_params[0] - (ts -
_shifter);
359 if (to_subtract0 > 0.0)
361 dist_mod += Utility::pow<2>(to_subtract0 / (trial_stress_params[2] - ts));
362 stress_params[0] -= to_subtract0;
366 const Real to_add0 = -stress_params[0] - cs;
369 dist_mod += Utility::pow<2>(to_add0 / (trial_stress_params[2] - ts));
370 stress_params[0] += to_add0;
372 const Real to_add1 = -cs + 0.5 *
_shifter - stress_params[1];
375 dist_mod += Utility::pow<2>(to_add1 / (trial_stress_params[2] - ts));
376 stress_params[1] += to_add1;
380 const Real new_compressive_yf = -stress_params[0] - cs;
381 const Real new_mc_yf = 0.5 * (stress_params[2] - stress_params[0]) +
382 0.5 * (stress_params[2] + stress_params[0]) * sinphi - cohcos;
383 if (new_mc_yf <=
_f_tol && new_compressive_yf <=
_f_tol)
385 gaE = std::sqrt(dist_mod) * (trial_stress_params[2] - stress_params[2]);
386 found_solution =
true;
389 if (!found_solution && trial_compressive_yf >
_f_tol &&
390 (trial_tensile_yf <=
_f_tol || (trial_tensile_yf >
_f_tol && mc_impossible)))
395 const Real ga = (trial_stress_params[0] + cs) /
_Eij[0][0];
396 stress_params[0] = -cs;
397 stress_params[1] = trial_stress_params[1] - ga *
_Eij[1][0];
398 stress_params[2] = trial_stress_params[2] - ga *
_Eij[2][0];
402 const Real to_add1 = -cs + 0.5 *
_shifter - stress_params[1];
405 dist_mod += Utility::pow<2>(to_add1 / (trial_stress_params[0] + cs));
406 stress_params[1] += to_add1;
408 const Real to_add2 = -cs +
_shifter - stress_params[2];
411 dist_mod += Utility::pow<2>(to_add2 / (trial_stress_params[0] + cs));
412 stress_params[2] += to_add2;
416 const Real to_subtract2 = stress_params[2] - ts;
417 if (to_subtract2 > 0.0)
419 dist_mod += Utility::pow<2>(to_subtract2 / (trial_stress_params[0] + cs));
420 stress_params[2] -= to_subtract2;
422 const Real to_subtract1 = stress_params[1] - (ts - 0.5 *
_shifter);
423 if (to_subtract1 > 0.0)
425 dist_mod += Utility::pow<2>(to_subtract1 / (trial_stress_params[0] + cs));
426 stress_params[1] -= to_subtract1;
430 const Real new_tensile_yf = stress_params[2] - ts;
431 const Real new_mc_yf = 0.5 * (stress_params[2] - stress_params[0]) +
432 0.5 * (stress_params[2] + stress_params[0]) * sinphi - cohcos;
435 gaE = std::sqrt(dist_mod) * (-trial_stress_params[0] + stress_params[0]);
436 found_solution =
true;
439 if (!found_solution && !mc_impossible && trial_mc_yf >
_f_tol)
443 const Real ga = ((trial_stress_params[2] - trial_stress_params[0]) +
444 (trial_stress_params[2] + trial_stress_params[0]) * sinphi - 2.0 * cohcos) /
447 trial_stress_params[2] - ga * (
_Eij[2][2] * halfplus +
_Eij[2][0] * neghalfplus);
448 stress_params[1] = trial_stress_params[1] - ga *
_Eij[1][0] * sinpsi;
450 trial_stress_params[0] - ga * (
_Eij[0][0] * neghalfplus +
_Eij[0][2] * halfplus);
451 const Real f7 = 0.5 * (stress_params[1] - stress_params[0]) +
452 0.5 * (stress_params[1] + stress_params[0]) * sinphi - cohcos;
453 const Real f8 = 0.5 * (stress_params[2] - stress_params[1]) +
454 0.5 * (stress_params[2] + stress_params[1]) * sinphi - cohcos;
455 const Real new_tensile_yf = stress_params[2] - ts;
456 const Real new_compressive_yf = -stress_params[0] - cs;
460 gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
461 (stress_params[2] - stress_params[0])) /
463 found_solution =
true;
466 if (!found_solution && !mc_impossible && trial_mc_yf >
_f_tol)
481 const Real cmax6 =
_Eij[2][2] * halfplus +
_Eij[2][0] * neghalfplus;
482 const Real cmax7 =
_Eij[2][1] * halfplus +
_Eij[2][0] * neghalfplus;
485 const Real cmin6 =
_Eij[0][2] * halfplus +
_Eij[0][0] * neghalfplus;
486 const Real cmin7 =
_Eij[0][1] * halfplus +
_Eij[0][0] * neghalfplus;
490 const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
491 const Real c7 = 0.5 * (cmax7 - cmin7) + 0.5 * (cmax7 + cmin7) * sinphi;
497 const Real f6_trial = trial_mc_yf;
498 const Real f7_trial = 0.5 * (trial_stress_params[1] - trial_stress_params[0]) +
499 0.5 * (trial_stress_params[1] + trial_stress_params[0]) * sinphi -
501 const Real descr = Utility::pow<2>(c6) - Utility::pow<2>(c7);
502 Real ga6 = (c6 * f6_trial - c7 * f7_trial) / descr;
503 Real ga7 = (-c7 * f6_trial + c6 * f7_trial) / descr;
505 stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga7 * cmax7;
506 stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga7 * cmin7;
507 stress_params[1] = stress_params[2] - 0.5 *
_shifter;
509 Real f8 = 0.5 * (stress_params[2] - stress_params[1]) +
510 0.5 * (stress_params[2] + stress_params[1]) * sinphi - cohcos;
512 if (mc_tip_possible && f8 >
_f_tol)
514 stress_params[2] = cohcos / sinphi;
515 stress_params[1] = stress_params[2] - 0.5 *
_shifter;
516 stress_params[0] = stress_params[2] -
_shifter;
522 const Real new_tensile_yf = stress_params[2] - ts;
523 const Real new_compressive_yf = -stress_params[0] - cs;
526 ga6 >= 0.0 && ga7 >= 0.0)
528 gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
529 (stress_params[2] - stress_params[0])) /
531 found_solution =
true;
535 if (!found_solution && !mc_impossible && trial_mc_yf >
_f_tol)
550 const Real cmax6 =
_Eij[2][2] * halfplus +
_Eij[2][0] * neghalfplus;
551 const Real cmax8 =
_Eij[2][2] * halfplus +
_Eij[2][1] * neghalfplus;
554 const Real cmin6 =
_Eij[0][2] * halfplus +
_Eij[0][0] * neghalfplus;
555 const Real cmin8 =
_Eij[0][2] * halfplus +
_Eij[0][1] * neghalfplus;
559 const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
560 const Real c8 = 0.5 * (cmax8 - cmin8) + 0.5 * (cmax8 + cmin8) * sinphi;
566 const Real f6_trial = trial_mc_yf;
567 const Real f8_trial = 0.5 * (trial_stress_params[2] - trial_stress_params[1]) +
568 0.5 * (trial_stress_params[2] + trial_stress_params[1]) * sinphi -
570 const Real descr = Utility::pow<2>(c6) - Utility::pow<2>(c8);
571 Real ga6 = (c6 * f6_trial - c8 * f8_trial) / descr;
572 Real ga8 = (-c8 * f6_trial + c6 * f8_trial) / descr;
574 stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga8 * cmax8;
575 stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga8 * cmin8;
576 stress_params[1] = stress_params[0] + 0.5 *
_shifter;
578 Real f7 = 0.5 * (stress_params[1] - stress_params[0]) +
579 0.5 * (stress_params[1] + stress_params[0]) * sinphi - cohcos;
581 if (mc_tip_possible && f7 >
_f_tol)
583 stress_params[2] = cohcos / sinphi;
584 stress_params[1] = stress_params[2] - 0.5 *
_shifter;
585 stress_params[0] = stress_params[2] -
_shifter;
591 const Real new_tensile_yf = stress_params[2] - ts;
592 const Real new_compressive_yf = -stress_params[0] - cs;
595 ga6 >= 0.0 && ga8 >= 0.0)
597 gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
598 (stress_params[2] - stress_params[0])) /
600 found_solution =
true;
604 if (!found_solution && !mc_impossible && tensile_possible && trial_tensile_yf >
_f_tol)
619 const Real cmax6 =
_Eij[2][2] * halfplus +
_Eij[2][0] * neghalfplus;
620 const Real cmax0 =
_Eij[2][2];
621 const Real cmid6 =
_Eij[1][2] * halfplus +
_Eij[1][0] * neghalfplus;
622 const Real cmid0 =
_Eij[1][2];
623 const Real cmin6 =
_Eij[0][2] * halfplus +
_Eij[0][0] * neghalfplus;
624 const Real cmin0 =
_Eij[0][2];
628 const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
629 const Real c0 = 0.5 * (cmax0 - cmin0) + 0.5 * (cmax0 + cmin0) * sinphi;
633 const Real descr = c0 * cmax6 - c6 * cmax0;
636 const Real ga0 = (-c6 * trial_tensile_yf + cmax6 * trial_mc_yf) / descr;
637 const Real ga6 = (c0 * trial_tensile_yf - cmax0 * trial_mc_yf) / descr;
638 stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga0 * cmax0;
639 stress_params[1] = trial_stress_params[1] - ga6 * cmid6 - ga0 * cmid0;
640 stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga0 * cmin0;
644 std::min(stress_params[0],
646 stress_params[1] = std::max(std::min(stress_params[1], stress_params[2] - 0.5 *
_shifter),
649 const Real new_compressive_yf = -stress_params[0] - cs;
650 if (new_compressive_yf <= _f_tol && ga0 >= 0.0 && ga6 >= 0.0)
652 gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
653 (stress_params[2] - stress_params[0])) /
655 (trial_stress_params[2] - stress_params[2]);
656 found_solution =
true;
660 if (!found_solution && !mc_impossible)
675 const Real cmax6 =
_Eij[2][2] * halfplus +
_Eij[2][0] * neghalfplus;
676 const Real cmax3 = -
_Eij[2][0];
677 const Real cmid6 =
_Eij[1][2] * halfplus +
_Eij[1][0] * neghalfplus;
678 const Real cmid3 = -
_Eij[1][0];
679 const Real cmin6 =
_Eij[0][2] * halfplus +
_Eij[0][0] * neghalfplus;
680 const Real cmin3 = -
_Eij[0][0];
684 const Real c6 = 0.5 * (cmax6 - cmin6) + 0.5 * (cmax6 + cmin6) * sinphi;
685 const Real c3 = 0.5 * (cmax3 - cmin3) + 0.5 * (cmax3 + cmin3) * sinphi;
689 const Real descr = c3 * cmin6 - c6 * cmin3;
692 const Real ga3 = (c6 * trial_compressive_yf + cmin6 * trial_mc_yf) / descr;
693 const Real ga6 = (-c3 * trial_compressive_yf - cmin3 * trial_mc_yf) / descr;
694 stress_params[2] = trial_stress_params[2] - ga6 * cmax6 - ga3 * cmax3;
695 stress_params[1] = trial_stress_params[1] - ga6 * cmid6 - ga3 * cmid3;
696 stress_params[0] = trial_stress_params[0] - ga6 * cmin6 - ga3 * cmin3;
698 const Real new_tensile_yf = stress_params[2] - ts;
700 std::max(stress_params[2],
702 stress_params[1] = std::max(std::min(stress_params[1], stress_params[2] - 0.5 *
_shifter),
705 if (new_tensile_yf <= _f_tol && ga6 >= 0.0)
707 gaE = ((trial_stress_params[2] - trial_stress_params[0]) -
708 (stress_params[2] - stress_params[0])) /
710 (-trial_stress_params[0] - stress_params[0]);
712 found_solution =
true;
719 for (
unsigned i = 0; i <
_num_sp; ++i)
720 stress_params[i] = trial_stress_params[i];
722 mooseWarning(
"CappedMohrCoulombStressUpdate cannot initialize from max = ",
735 const std::vector<Real> & current_stress_params,
736 const std::vector<Real> & intnl_old,
737 std::vector<Real> & intnl)
const
740 const Real smax = current_stress_params[2];
741 const Real smin = current_stress_params[0];
742 const Real trial_smax = trial_stress_params[2];
743 const Real trial_smin = trial_stress_params[0];
744 const Real ga_shear = ((trial_smax - trial_smin) - (smax - smin)) / (
_Eij[2][2] -
_Eij[0][2]);
745 intnl[0] = intnl_old[0] + ga_shear;
746 const Real sinpsi = std::sin(
_psi.
value(intnl[0]));
747 const Real prefactor = (
_Eij[2][2] +
_Eij[0][2]) * sinpsi;
748 const Real shear_correction = prefactor * ga_shear;
750 ((trial_smax + trial_smin) - (smax + smin) - shear_correction) /
752 intnl[1] = intnl_old[1] + ga_tensile;
757 const std::vector<Real> & current_stress_params,
758 const std::vector<Real> & intnl,
759 std::vector<std::vector<Real>> & dintnl)
const
762 const Real smax = current_stress_params[2];
763 const Real smin = current_stress_params[0];
764 const Real trial_smax = trial_stress_params[2];
765 const Real trial_smin = trial_stress_params[0];
766 const Real ga_shear = ((trial_smax - trial_smin) - (smax - smin)) / (
_Eij[2][2] -
_Eij[0][2]);
767 const std::vector<Real> dga_shear = {
770 for (std::size_t i = 0; i <
_num_sp; ++i)
771 dintnl[0][i] = dga_shear[i];
773 const Real sinpsi = std::sin(
_psi.
value(intnl[0]));
776 const Real prefactor = (
_Eij[2][2] +
_Eij[0][2]) * sinpsi;
777 const Real dprefactor_di0 = (
_Eij[2][2] +
_Eij[0][2]) * dsinpsi_di0;
779 std::vector<Real> dshear_correction(
_num_sp);
780 for (std::size_t i = 0; i <
_num_sp; ++i)
781 dshear_correction[i] = prefactor * dga_shear[i] + dprefactor_di0 * dintnl[0][i] * ga_shear;
786 for (std::size_t i = 0; i <
_num_sp; ++i)
795 const std::vector<Real> & trial_stress_params,
797 const std::vector<Real> & stress_params,
801 bool compute_full_tangent_operator,
802 const std::vector<std::vector<Real>> & dvar_dtrial,
805 cto = elasticity_tensor;
806 if (!compute_full_tangent_operator)
820 for (
unsigned a = 0; a <
_num_sp; ++a)
822 if (trial_stress_params[a] == trial_stress_params[j])
826 (trial_stress_params[j] - trial_stress_params[a]);
836 for (
unsigned a = 0; a <
_num_sp; ++a)
837 dstress_dtrial(i, j, k, l) +=
838 drot_dstress(i, a, k, l) * stress_params[a] * eT(a, j) +
839 _eigvecs(i, a) * stress_params[a] * drot_dstress(j, a, k, l);
846 for (
unsigned a = 0; a <
_num_sp; ++a)
847 for (
unsigned b = 0; b <
_num_sp; ++b)
848 dstress_dtrial(i, j, k, l) +=
849 _eigvecs(i, a) * dvar_dtrial[a][b] * dsp_trial[b](k, l) * eT(a, j);
851 cto = dstress_dtrial * elasticity_tensor;