www.mooseframework.org
TwoParameterPlasticityStressUpdate.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #ifndef TWOPARAMETERPLASTICITYSTRESSUPDATE_H
8 #define TWOPARAMETERPLASTICITYSTRESSUPDATE_H
9 
11 
12 #include <array>
13 
15 
16 template <>
18 
28 {
29 public:
30  TwoParameterPlasticityStressUpdate(const InputParameters & parameters,
31  unsigned num_yf,
32  unsigned num_intnl);
33 
34 protected:
36  constexpr static int _num_pq = 2;
37 
39  Real _p_trial;
40 
42  Real _q_trial;
43 
45  Real _Epp;
46 
48  Real _Eqq;
49 
51  Real _dgaE_dpt;
53  Real _dgaE_dqt;
55  Real _dp_dpt;
57  Real _dq_dpt;
59  Real _dp_dqt;
61  Real _dq_dqt;
62 
72  virtual void yieldFunctionValues(Real p,
73  Real q,
74  const std::vector<Real> & intnl,
75  std::vector<Real> & yf) const = 0;
76  void yieldFunctionValuesV(const std::vector<Real> & stress_params,
77  const std::vector<Real> & intnl,
78  std::vector<Real> & yf) const override;
79 
93  virtual void computeAllQ(Real p,
94  Real q,
95  const std::vector<Real> & intnl,
96  std::vector<yieldAndFlow> & all_q) const = 0;
97  void computeAllQV(const std::vector<Real> & stress_params,
98  const std::vector<Real> & intnl,
99  std::vector<yieldAndFlow> & all_q) const override;
100 
112  virtual void preReturnMap(Real p_trial,
113  Real q_trial,
114  const RankTwoTensor & stress_trial,
115  const std::vector<Real> & intnl_old,
116  const std::vector<Real> & yf,
117  const RankFourTensor & Eijkl);
118  void preReturnMapV(const std::vector<Real> & trial_stress_params,
119  const RankTwoTensor & stress_trial,
120  const std::vector<Real> & intnl_old,
121  const std::vector<Real> & yf,
122  const RankFourTensor & Eijkl) override;
123 
140  virtual void initializeVars(Real p_trial,
141  Real q_trial,
142  const std::vector<Real> & intnl_old,
143  Real & p,
144  Real & q,
145  Real & gaE,
146  std::vector<Real> & intnl) const;
147  void initializeVarsV(const std::vector<Real> & trial_stress_params,
148  const std::vector<Real> & intnl_old,
149  std::vector<Real> & stress_params,
150  Real & gaE,
151  std::vector<Real> & intnl) const override;
152 
165  virtual void setIntnlValues(Real p_trial,
166  Real q_trial,
167  Real p,
168  Real q,
169  const std::vector<Real> & intnl_old,
170  std::vector<Real> & intnl) const = 0;
171  void setIntnlValuesV(const std::vector<Real> & trial_stress_params,
172  const std::vector<Real> & current_stress_params,
173  const std::vector<Real> & intnl_old,
174  std::vector<Real> & intnl) const override;
175 
189  virtual void setIntnlDerivatives(Real p_trial,
190  Real q_trial,
191  Real p,
192  Real q,
193  const std::vector<Real> & intnl,
194  std::vector<std::vector<Real>> & dintnl) const = 0;
195  virtual void setIntnlDerivativesV(const std::vector<Real> & trial_stress_params,
196  const std::vector<Real> & current_stress_params,
197  const std::vector<Real> & intnl,
198  std::vector<std::vector<Real>> & dintnl) const override;
199 
207  virtual void computePQ(const RankTwoTensor & stress, Real & p, Real & q) const = 0;
208  virtual void computeStressParams(const RankTwoTensor & stress,
209  std::vector<Real> & stress_params) const override;
210 
218  virtual void setEppEqq(const RankFourTensor & Eijkl, Real & Epp, Real & Eqq) const = 0;
219  virtual void setEffectiveElasticity(const RankFourTensor & Eijkl) override;
220 
236  virtual void setStressAfterReturn(const RankTwoTensor & stress_trial,
237  Real p_ok,
238  Real q_ok,
239  Real gaE,
240  const std::vector<Real> & intnl,
241  const yieldAndFlow & smoothed_q,
242  const RankFourTensor & Eijkl,
243  RankTwoTensor & stress) const = 0;
244  void setStressAfterReturnV(const RankTwoTensor & stress_trial,
245  const std::vector<Real> & stress_params,
246  Real gaE,
247  const std::vector<Real> & intnl,
248  const yieldAndFlow & smoothed_q,
249  const RankFourTensor & Eijkl,
250  RankTwoTensor & stress) const override;
251 
252  void
253  setInelasticStrainIncrementAfterReturn(const RankTwoTensor & stress_trial,
254  Real gaE,
255  const yieldAndFlow & smoothed_q,
256  const RankFourTensor & elasticity_tensor,
257  const RankTwoTensor & returned_stress,
258  RankTwoTensor & inelastic_strain_increment) const override;
259 
279  virtual void consistentTangentOperator(const RankTwoTensor & stress_trial,
280  Real p_trial,
281  Real q_trial,
282  const RankTwoTensor & stress,
283  Real p,
284  Real q,
285  Real gaE,
286  const yieldAndFlow & smoothed_q,
287  const RankFourTensor & Eijkl,
288  bool compute_full_tangent_operator,
289  RankFourTensor & cto) const;
290 
291  void consistentTangentOperatorV(const RankTwoTensor & stress_trial,
292  const std::vector<Real> & trial_stress_params,
293  const RankTwoTensor & stress,
294  const std::vector<Real> & stress_params,
295  Real gaE,
296  const yieldAndFlow & smoothed_q,
297  const RankFourTensor & Eijkl,
298  bool compute_full_tangent_operator,
299  const std::vector<std::vector<Real>> & dvar_dtrial,
300  RankFourTensor & cto) override;
301 
302  virtual std::vector<RankTwoTensor>
303  dstress_param_dstress(const RankTwoTensor & stress) const override;
304  virtual std::vector<RankFourTensor>
305  d2stress_param_dstress(const RankTwoTensor & stress) const override;
312  virtual RankTwoTensor dpdstress(const RankTwoTensor & stress) const = 0;
313 
320  virtual RankFourTensor d2pdstress2(const RankTwoTensor & stress) const = 0;
321 
328  virtual RankTwoTensor dqdstress(const RankTwoTensor & stress) const = 0;
329 
336  virtual RankFourTensor d2qdstress2(const RankTwoTensor & stress) const = 0;
337 };
338 
339 #endif // TWOPARAMETERPLASTICITYSTRESSUPDATE_H
virtual void setIntnlValues(Real p_trial, Real q_trial, Real p, Real q, const std::vector< Real > &intnl_old, std::vector< Real > &intnl) const =0
Sets the internal parameters based on the trial values of p and q, their current values, and the old values of the internal parameters.
static constexpr int _num_pq
Number of variables = 2 = (p, q)
virtual void consistentTangentOperator(const RankTwoTensor &stress_trial, Real p_trial, Real q_trial, const RankTwoTensor &stress, Real p, Real q, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, bool compute_full_tangent_operator, RankFourTensor &cto) const
Calculates the consistent tangent operator.
Real _dp_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
virtual void initializeVars(Real p_trial, Real q_trial, const std::vector< Real > &intnl_old, Real &p, Real &q, Real &gaE, std::vector< Real > &intnl) const
Sets (p, q, gaE, intnl) at "good guesses" of the solution to the Return-Map algorithm.
Real _dq_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
virtual void setEffectiveElasticity(const RankFourTensor &Eijkl) override
Sets _Eij and _En and _Cij.
Struct designed to hold info about a single yield function and its derivatives, as well as the flow d...
virtual void setIntnlDerivativesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_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.
TwoParameterPlasticityStressUpdate performs the return-map algorithm and associated stress updates fo...
Real _dgaE_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
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.
virtual void setEppEqq(const RankFourTensor &Eijkl, Real &Epp, Real &Eqq) const =0
Set Epp and Eqq based on the elasticity tensor Derived classes must override this.
Real _dgaE_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
virtual void computePQ(const RankTwoTensor &stress, Real &p, Real &q) const =0
Computes p and q, given stress.
TwoParameterPlasticityStressUpdate(const InputParameters &parameters, unsigned num_yf, unsigned num_intnl)
Real _dq_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
InputParameters validParams< TwoParameterPlasticityStressUpdate >()
virtual std::vector< RankTwoTensor > dstress_param_dstress(const RankTwoTensor &stress) const override
d(stress_param[i])/d(stress) at given stress
virtual void computeAllQ(Real p, Real q, const std::vector< Real > &intnl, std::vector< yieldAndFlow > &all_q) const =0
Completely fills all_q with correct values.
virtual void setIntnlDerivatives(Real p_trial, Real q_trial, Real p, Real q, const std::vector< Real > &intnl, std::vector< std::vector< Real >> &dintnl) const =0
Sets the derivatives of internal parameters, based on the trial values of p and q, their current values, and the old values of the internal parameters.
virtual void setStressAfterReturn(const RankTwoTensor &stress_trial, Real p_ok, Real q_ok, Real gaE, const std::vector< Real > &intnl, const yieldAndFlow &smoothed_q, const RankFourTensor &Eijkl, RankTwoTensor &stress) const =0
Sets stress from the admissible parameters.
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.
void setIntnlValuesV(const std::vector< Real > &trial_stress_params, const std::vector< Real > &current_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...
Real _Epp
elasticity tensor in p direction
void setInelasticStrainIncrementAfterReturn(const RankTwoTensor &stress_trial, Real gaE, const yieldAndFlow &smoothed_q, const RankFourTensor &elasticity_tensor, const RankTwoTensor &returned_stress, RankTwoTensor &inelastic_strain_increment) const override
Sets inelastic strain increment from the returned configuration This is called after the return-map p...
virtual void computeStressParams(const RankTwoTensor &stress, std::vector< Real > &stress_params) const override
Computes stress_params, given stress.
virtual void yieldFunctionValues(Real p, Real q, const std::vector< Real > &intnl, std::vector< Real > &yf) const =0
Computes the values of the yield functions, given p, q and intnl parameters.
virtual RankFourTensor d2qdstress2(const RankTwoTensor &stress) const =0
d2(q)/d(stress)/d(stress) Derived classes must override this
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 std::vector< RankFourTensor > d2stress_param_dstress(const RankTwoTensor &stress) const override
d2(stress_param[i])/d(stress)/d(stress) at given stress
Real _Eqq
elasticity tensor in q direction
MultiParameterPlasticityStressUpdate performs the return-map algorithm and associated stress updates ...
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...
virtual void preReturnMap(Real p_trial, Real q_trial, const RankTwoTensor &stress_trial, const std::vector< Real > &intnl_old, const std::vector< Real > &yf, const RankFourTensor &Eijkl)
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.
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.
virtual RankTwoTensor dpdstress(const RankTwoTensor &stress) const =0
d(p)/d(stress) Derived classes must override this
Real _dp_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
virtual RankFourTensor d2pdstress2(const RankTwoTensor &stress) const =0
d2(p)/d(stress)/d(stress) Derived classes must override this
virtual RankTwoTensor dqdstress(const RankTwoTensor &stress) const =0
d(q)/d(stress) Derived classes must override this