11 #include "libmesh/utility.h"
21 params.addRequiredParam<UserObjectName>(
23 "A TensorMechanicsHardening UserObject that defines hardening of the tensile strength");
24 params.addParam<
bool>(
"perfect_guess",
26 "Provide a guess to the Newton-Raphson procedure "
27 "that is the result from perfect plasticity. With "
28 "severe hardening/softening this may be "
30 params.addClassDescription(
31 "Associative, smoothed, tensile (Rankine) plasticity with hardening/softening");
38 _perfect_guess(getParam<bool>(
"perfect_guess")),
45 std::vector<Real> & stress_params)
const
48 stress.symmetricEigenvalues(stress_params);
51 std::vector<RankTwoTensor>
55 std::vector<RankTwoTensor> dsp;
56 stress.dsymmetricEigenvalues(sp, dsp);
60 std::vector<RankFourTensor>
63 std::vector<RankFourTensor> d2;
64 stress.d2symmetricEigenvalues(d2);
71 const std::vector<Real> & ,
72 const std::vector<Real> & ,
75 std::vector<Real> eigvals;
76 stress_trial.symmetricEigenvaluesEigenvectors(eigvals,
_eigvecs);
81 const std::vector<Real> & stress_params,
83 const std::vector<Real> & ,
89 stress =
RankTwoTensor(stress_params[0], stress_params[1], stress_params[2], 0.0, 0.0, 0.0);
96 const std::vector<Real> & intnl,
97 std::vector<Real> & yf)
const
104 yf[0] = stress_params[2] - ts;
105 yf[1] = stress_params[1] - ts;
106 yf[2] = stress_params[0] - ts;
111 const std::vector<Real> & intnl,
112 std::vector<yieldAndFlow> & all_q)
const
118 all_q[0].f = stress_params[2] - ts;
119 all_q[1].f = stress_params[1] - ts;
120 all_q[2].f = stress_params[0] - ts;
123 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
124 for (
unsigned a = 0; a <
_num_sp; ++a)
125 all_q[yf].df[a] = 0.0;
126 all_q[0].df[2] = 1.0;
127 all_q[1].df[1] = 1.0;
128 all_q[2].df[0] = 1.0;
131 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
132 all_q[yf].df_di[0] = -dts;
136 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
137 for (
unsigned a = 0; a <
_num_sp; ++a)
138 all_q[yf].dg[a] = all_q[yf].df[a];
141 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
142 for (
unsigned a = 0; a <
_num_sp; ++a)
143 all_q[yf].d2g_di[a][0] = 0.0;
146 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
147 for (
unsigned a = 0; a <
_num_sp; ++a)
148 for (
unsigned b = 0; b <
_num_sp; ++b)
149 all_q[yf].d2g[a][b] = 0.0;
157 for (
unsigned a = 0; a <
_num_sp; ++a)
158 for (
unsigned b = 0; b <
_num_sp; ++b)
159 _Eij[a][b] = Eijkl(a, a, b, b);
161 const Real denom =
_Eij[0][0] * (
_Eij[0][0] +
_Eij[0][1]) - 2 * Utility::pow<2>(
_Eij[0][1]);
162 for (
unsigned a = 0; a <
_num_sp; ++a)
165 for (
unsigned b = 0; b < a; ++b)
172 const std::vector<Real> & intnl_old,
173 std::vector<Real> & stress_params,
175 std::vector<Real> & intnl)
const
179 for (
unsigned i = 0; i <
_num_sp; ++i)
180 stress_params[i] = trial_stress_params[i];
186 stress_params[2] = ts;
187 stress_params[1] = std::min(stress_params[1], ts);
188 stress_params[0] = std::min(stress_params[0], ts);
189 gaE = trial_stress_params[2] - stress_params[2];
196 const std::vector<Real> & current_stress_params,
197 const std::vector<Real> & intnl_old,
198 std::vector<Real> & intnl)
const
200 intnl[0] = intnl_old[0] + (trial_stress_params[2] - current_stress_params[2]) /
_Eij[2][2];
205 const std::vector<Real> & ,
206 const std::vector<Real> & ,
207 std::vector<std::vector<Real>> & dintnl)
const
211 dintnl[0][2] = -1.0 /
_Eij[2][2];
228 const std::vector<Real> & trial_stress_params,
230 const std::vector<Real> & stress_params,
234 bool compute_full_tangent_operator,
235 const std::vector<std::vector<Real>> & dvar_dtrial,
238 cto = elasticity_tensor;
239 if (!compute_full_tangent_operator)
253 for (
unsigned a = 0; a <
_num_sp; ++a)
255 if (trial_stress_params[a] == trial_stress_params[j])
259 (trial_stress_params[j] - trial_stress_params[a]);
269 for (
unsigned a = 0; a <
_num_sp; ++a)
270 dstress_dtrial(i, j, k, l) +=
271 drot_dstress(i, a, k, l) * stress_params[a] * eT(a, j) +
272 _eigvecs(i, a) * stress_params[a] * drot_dstress(j, a, k, l);
279 for (
unsigned a = 0; a <
_num_sp; ++a)
280 for (
unsigned b = 0; b <
_num_sp; ++b)
281 dstress_dtrial(i, j, k, l) +=
282 _eigvecs(i, a) * dvar_dtrial[a][b] * dsp_trial[b](k, l) * eT(a, j);
284 cto = dstress_dtrial * elasticity_tensor;