11 #include "libmesh/utility.h" 21 "A SolidMechanicsHardening UserObject that defines hardening of the tensile strength");
22 params.
addParam<
bool>(
"perfect_guess",
24 "Provide a guess to the Newton-Raphson procedure " 25 "that is the result from perfect plasticity. With " 26 "severe hardening/softening this may be " 29 "Associative, smoothed, tensile (Rankine) plasticity with hardening/softening");
36 _perfect_guess(getParam<bool>(
"perfect_guess")),
38 _dsp_trial_scratch(3),
39 _eigvals_scratch(_tensor_dimensionality)
45 std::vector<Real> & stress_params)
const 53 std::vector<RankTwoTensor> & dsp)
const 55 mooseAssert(dsp.size() == 3,
56 "TensileStressUpdate: dsp incorrectly sized in dstressparam_dstress");
58 "_eigvals_scratch incorrectly sized in TensileStressUpdate:dstressparam_dstress");
64 std::vector<RankFourTensor> & d2sp)
const 70 mooseAssert(d2sp.size() == 3,
71 "TensileStressUpdate: d2sp incorrectly sized in d2stressparam_dstress");
78 const std::vector<Real> & ,
79 const std::vector<Real> & ,
83 "_eigvals_scratch incorrectly sized in TensileStressUpdate:preReturnMapV");
89 const std::vector<Real> & stress_params,
91 const std::vector<Real> & ,
97 stress =
RankTwoTensor(stress_params[0], stress_params[1], stress_params[2], 0.0, 0.0, 0.0);
104 const std::vector<Real> & intnl,
105 std::vector<Real> & yf)
const 112 yf[0] = stress_params[2] - ts;
113 yf[1] = stress_params[1] - ts;
114 yf[2] = stress_params[0] - ts;
119 const std::vector<Real> & intnl,
120 std::vector<yieldAndFlow> & all_q)
const 126 all_q[0].f = stress_params[2] - ts;
127 all_q[1].f = stress_params[1] - ts;
128 all_q[2].f = stress_params[0] - ts;
131 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
133 all_q[yf].df[
a] = 0.0;
134 all_q[0].df[2] = 1.0;
135 all_q[1].df[1] = 1.0;
136 all_q[2].df[0] = 1.0;
139 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
140 all_q[yf].df_di[0] = -dts;
144 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
146 all_q[yf].dg[
a] = all_q[yf].df[
a];
149 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
151 all_q[yf].d2g_di[
a][0] = 0.0;
154 for (
unsigned yf = 0; yf <
_num_yf; ++yf)
157 all_q[yf].d2g[
a][
b] = 0.0;
173 for (
unsigned b = 0;
b <
a; ++
b)
180 const std::vector<Real> & intnl_old,
181 std::vector<Real> & stress_params,
183 std::vector<Real> & intnl)
const 187 for (
unsigned i = 0; i <
_num_sp; ++i)
188 stress_params[i] = trial_stress_params[i];
194 stress_params[2] = ts;
195 stress_params[1] = std::min(stress_params[1], ts);
196 stress_params[0] = std::min(stress_params[0], ts);
197 gaE = trial_stress_params[2] - stress_params[2];
204 const std::vector<Real> & current_stress_params,
205 const std::vector<Real> & intnl_old,
206 std::vector<Real> & intnl)
const 208 intnl[0] = intnl_old[0] + (trial_stress_params[2] - current_stress_params[2]) /
_Eij[2][2];
213 const std::vector<Real> & ,
214 const std::vector<Real> & ,
215 std::vector<std::vector<Real>> & dintnl)
const 219 dintnl[0][2] = -1.0 /
_Eij[2][2];
236 const std::vector<Real> & trial_stress_params,
238 const std::vector<Real> & stress_params,
242 bool compute_full_tangent_operator,
243 const std::vector<std::vector<Real>> & dvar_dtrial,
247 if (!compute_full_tangent_operator)
263 if (trial_stress_params[
a] == trial_stress_params[
j])
265 drot_dstress(i,
j,
k, l) +=
268 (trial_stress_params[
j] - trial_stress_params[
a]);
279 dstress_dtrial(i,
j,
k, l) +=
280 drot_dstress(i,
a,
k, l) * stress_params[
a] * eT(
a,
j) +
281 _eigvecs(i,
a) * stress_params[
a] * drot_dstress(
j,
a,
k, l);
290 dstress_dtrial(i,
j,
k, l) +=
TensileStressUpdate(const InputParameters ¶meters)
registerMooseObject("SolidMechanicsApp", TensileStressUpdate)
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...
std::vector< RankTwoTensor > _dsp_trial_scratch
this is d(stress_param[:])/d(stress) which is calculated by dstressparam_dstress. ...
void symmetricEigenvalues(std::vector< Real > &eigvals) const
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.
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 ...
void dsymmetricEigenvalues(std::vector< Real > &eigvals, std::vector< RankTwoTensorTempl< Real >> &deigvals) const
void d2stressparam_dstress(const RankTwoTensor &stress, std::vector< RankFourTensor > &d2sp) const override
d2(stress_param[i])/d(stress)/d(stress) at given stress.
Real _En
normalising factor
Struct designed to hold info about a single yield function and its derivatives, as well as the flow d...
TensileStressUpdate implements rate-independent associative tensile failure ("Rankine" plasticity) wi...
void dstressparam_dstress(const RankTwoTensor &stress, std::vector< RankTwoTensor > &dsp) const override
d(stress_param[i])/d(stress) at given stress.
std::vector< std::vector< Real > > _Cij
_Cij[i, j] * _Eij[j, k] = 1 iff j == k
void setEffectiveElasticity(const RankFourTensor &Eijkl) override
Sets _Eij and _En and _Cij.
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.
virtual Real value(Real intnl) const
const SolidMechanicsHardeningModel & _strength
Hardening model for tensile strength.
RankTwoTensor _eigvecs
Eigenvectors of the trial stress as a RankTwoTensor, in order to rotate the returned stress back to s...
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.
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.
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)
std::vector< std::vector< Real > > _Eij
E[i, j] in the system of equations to be solved.
const unsigned _num_yf
Number of yield functions.
void d2symmetricEigenvalues(std::vector< RankFourTensorTempl< Real >> &deriv) const
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.
virtual Real derivative(Real intnl) const
RankTwoTensorTempl< Real > transpose() const
Hardening Model base class.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void symmetricEigenvaluesEigenvectors(std::vector< Real > &eigvals, RankTwoTensorTempl< Real > &eigvecs) const
const bool _perfect_guess
Whether to provide an estimate of the returned stress, based on perfect plasticity.
MultiParameterPlasticityStressUpdate performs the return-map algorithm and associated stress updates ...
static InputParameters validParams()
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...
static InputParameters validParams()
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
void computeStressParams(const RankTwoTensor &stress, std::vector< Real > &stress_params) const override
Computes stress_params, given stress.
virtual Real tensile_strength(const Real internal_param) const
tensile strength as a function of residual value, rate, and internal_param
std::vector< Real > _eigvals_scratch
eigenvalues of the stress, used in dstressparam_dstress and preReturnMapV.
static constexpr unsigned _tensor_dimensionality
Internal dimensionality of tensors (currently this is 3 throughout solid mechanics) ...
static const std::string k
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.
const unsigned _num_sp
Number of stress parameters.