www.mooseframework.org
TwoParameterPlasticityStressUpdate.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
13 
14 #include <array>
15 
17 
18 template <>
20 
30 {
31 public:
32  static InputParameters validParams();
33 
34  TwoParameterPlasticityStressUpdate(const InputParameters & parameters,
35  unsigned num_yf,
36  unsigned num_intnl);
37 
38 protected:
40  constexpr static int _num_pq = 2;
41 
43  Real _p_trial;
44 
46  Real _q_trial;
47 
49  Real _Epp;
50 
52  Real _Eqq;
53 
55  Real _dgaE_dpt;
57  Real _dgaE_dqt;
59  Real _dp_dpt;
61  Real _dq_dpt;
63  Real _dp_dqt;
65  Real _dq_dqt;
66 
76  virtual void yieldFunctionValues(Real p,
77  Real q,
78  const std::vector<Real> & intnl,
79  std::vector<Real> & yf) const = 0;
80  void yieldFunctionValuesV(const std::vector<Real> & stress_params,
81  const std::vector<Real> & intnl,
82  std::vector<Real> & yf) const override;
83 
97  virtual void computeAllQ(Real p,
98  Real q,
99  const std::vector<Real> & intnl,
100  std::vector<yieldAndFlow> & all_q) const = 0;
101  void computeAllQV(const std::vector<Real> & stress_params,
102  const std::vector<Real> & intnl,
103  std::vector<yieldAndFlow> & all_q) const override;
104 
116  virtual void preReturnMap(Real p_trial,
117  Real q_trial,
118  const RankTwoTensor & stress_trial,
119  const std::vector<Real> & intnl_old,
120  const std::vector<Real> & yf,
121  const RankFourTensor & Eijkl);
122  void preReturnMapV(const std::vector<Real> & trial_stress_params,
123  const RankTwoTensor & stress_trial,
124  const std::vector<Real> & intnl_old,
125  const std::vector<Real> & yf,
126  const RankFourTensor & Eijkl) override;
127 
144  virtual void initializeVars(Real p_trial,
145  Real q_trial,
146  const std::vector<Real> & intnl_old,
147  Real & p,
148  Real & q,
149  Real & gaE,
150  std::vector<Real> & intnl) const;
151  void initializeVarsV(const std::vector<Real> & trial_stress_params,
152  const std::vector<Real> & intnl_old,
153  std::vector<Real> & stress_params,
154  Real & gaE,
155  std::vector<Real> & intnl) const override;
156 
169  virtual void setIntnlValues(Real p_trial,
170  Real q_trial,
171  Real p,
172  Real q,
173  const std::vector<Real> & intnl_old,
174  std::vector<Real> & intnl) const = 0;
175  void setIntnlValuesV(const std::vector<Real> & trial_stress_params,
176  const std::vector<Real> & current_stress_params,
177  const std::vector<Real> & intnl_old,
178  std::vector<Real> & intnl) const override;
179 
193  virtual void setIntnlDerivatives(Real p_trial,
194  Real q_trial,
195  Real p,
196  Real q,
197  const std::vector<Real> & intnl,
198  std::vector<std::vector<Real>> & dintnl) const = 0;
199  virtual void setIntnlDerivativesV(const std::vector<Real> & trial_stress_params,
200  const std::vector<Real> & current_stress_params,
201  const std::vector<Real> & intnl,
202  std::vector<std::vector<Real>> & dintnl) const override;
203 
211  virtual void computePQ(const RankTwoTensor & stress, Real & p, Real & q) const = 0;
212  virtual void computeStressParams(const RankTwoTensor & stress,
213  std::vector<Real> & stress_params) const override;
214 
222  virtual void setEppEqq(const RankFourTensor & Eijkl, Real & Epp, Real & Eqq) const = 0;
223  virtual void setEffectiveElasticity(const RankFourTensor & Eijkl) override;
224 
240  virtual void setStressAfterReturn(const RankTwoTensor & stress_trial,
241  Real p_ok,
242  Real q_ok,
243  Real gaE,
244  const std::vector<Real> & intnl,
245  const yieldAndFlow & smoothed_q,
246  const RankFourTensor & Eijkl,
247  RankTwoTensor & stress) const = 0;
248  void setStressAfterReturnV(const RankTwoTensor & stress_trial,
249  const std::vector<Real> & stress_params,
250  Real gaE,
251  const std::vector<Real> & intnl,
252  const yieldAndFlow & smoothed_q,
253  const RankFourTensor & Eijkl,
254  RankTwoTensor & stress) const override;
255 
256  void
258  Real gaE,
259  const yieldAndFlow & smoothed_q,
260  const RankFourTensor & elasticity_tensor,
261  const RankTwoTensor & returned_stress,
262  RankTwoTensor & inelastic_strain_increment) const override;
263 
283  virtual void consistentTangentOperator(const RankTwoTensor & stress_trial,
284  Real p_trial,
285  Real q_trial,
286  const RankTwoTensor & stress,
287  Real p,
288  Real q,
289  Real gaE,
290  const yieldAndFlow & smoothed_q,
291  const RankFourTensor & Eijkl,
292  bool compute_full_tangent_operator,
293  RankFourTensor & cto) const;
294 
295  void consistentTangentOperatorV(const RankTwoTensor & stress_trial,
296  const std::vector<Real> & trial_stress_params,
297  const RankTwoTensor & stress,
298  const std::vector<Real> & stress_params,
299  Real gaE,
300  const yieldAndFlow & smoothed_q,
301  const RankFourTensor & Eijkl,
302  bool compute_full_tangent_operator,
303  const std::vector<std::vector<Real>> & dvar_dtrial,
304  RankFourTensor & cto) override;
305 
306  virtual std::vector<RankTwoTensor>
307  dstress_param_dstress(const RankTwoTensor & stress) const override;
308  virtual std::vector<RankFourTensor>
309  d2stress_param_dstress(const RankTwoTensor & stress) const override;
316  virtual RankTwoTensor dpdstress(const RankTwoTensor & stress) const = 0;
317 
324  virtual RankFourTensor d2pdstress2(const RankTwoTensor & stress) const = 0;
325 
332  virtual RankTwoTensor dqdstress(const RankTwoTensor & stress) const = 0;
333 
340  virtual RankFourTensor d2qdstress2(const RankTwoTensor & stress) const = 0;
341 };
TwoParameterPlasticityStressUpdate::d2qdstress2
virtual RankFourTensor d2qdstress2(const RankTwoTensor &stress) const =0
d2(q)/d(stress)/d(stress) Derived classes must override this
TwoParameterPlasticityStressUpdate::computeStressParams
virtual void computeStressParams(const RankTwoTensor &stress, std::vector< Real > &stress_params) const override
Computes stress_params, given stress.
Definition: TwoParameterPlasticityStressUpdate.C:156
MultiParameterPlasticityStressUpdate::yieldAndFlow
Struct designed to hold info about a single yield function and its derivatives, as well as the flow d...
Definition: MultiParameterPlasticityStressUpdate.h:214
TwoParameterPlasticityStressUpdate::setIntnlValuesV
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,...
Definition: TwoParameterPlasticityStressUpdate.C:129
TwoParameterPlasticityStressUpdate::d2pdstress2
virtual RankFourTensor d2pdstress2(const RankTwoTensor &stress) const =0
d2(p)/d(stress)/d(stress) Derived classes must override this
TwoParameterPlasticityStressUpdate::yieldFunctionValues
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.
TwoParameterPlasticityStressUpdate::d2stress_param_dstress
virtual std::vector< RankFourTensor > d2stress_param_dstress(const RankTwoTensor &stress) const override
d2(stress_param[i])/d(stress)/d(stress) at given stress
Definition: TwoParameterPlasticityStressUpdate.C:301
TwoParameterPlasticityStressUpdate::setEppEqq
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.
TwoParameterPlasticityStressUpdate::setIntnlValues
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,...
TwoParameterPlasticityStressUpdate::validParams
static InputParameters validParams()
Definition: TwoParameterPlasticityStressUpdate.C:18
TwoParameterPlasticityStressUpdate::setEffectiveElasticity
virtual void setEffectiveElasticity(const RankFourTensor &Eijkl) override
Sets _Eij and _En and _Cij.
Definition: TwoParameterPlasticityStressUpdate.C:52
TwoParameterPlasticityStressUpdate::_dp_dqt
Real _dp_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:63
TwoParameterPlasticityStressUpdate::_Epp
Real _Epp
elasticity tensor in p direction
Definition: TwoParameterPlasticityStressUpdate.h:49
TwoParameterPlasticityStressUpdate::dstress_param_dstress
virtual std::vector< RankTwoTensor > dstress_param_dstress(const RankTwoTensor &stress) const override
d(stress_param[i])/d(stress) at given stress
Definition: TwoParameterPlasticityStressUpdate.C:292
TwoParameterPlasticityStressUpdate::_dgaE_dqt
Real _dgaE_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:57
TwoParameterPlasticityStressUpdate::setIntnlDerivativesV
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,...
Definition: TwoParameterPlasticityStressUpdate.C:142
TwoParameterPlasticityStressUpdate::_dq_dqt
Real _dq_dqt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:65
TwoParameterPlasticityStressUpdate::yieldFunctionValuesV
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.
Definition: TwoParameterPlasticityStressUpdate.C:42
TwoParameterPlasticityStressUpdate
TwoParameterPlasticityStressUpdate performs the return-map algorithm and associated stress updates fo...
Definition: TwoParameterPlasticityStressUpdate.h:29
TwoParameterPlasticityStressUpdate::TwoParameterPlasticityStressUpdate
TwoParameterPlasticityStressUpdate(const InputParameters &parameters, unsigned num_yf, unsigned num_intnl)
Definition: TwoParameterPlasticityStressUpdate.C:25
TwoParameterPlasticityStressUpdate::setStressAfterReturnV
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.
Definition: TwoParameterPlasticityStressUpdate.C:265
TwoParameterPlasticityStressUpdate::computePQ
virtual void computePQ(const RankTwoTensor &stress, Real &p, Real &q) const =0
Computes p and q, given stress.
TwoParameterPlasticityStressUpdate::initializeVarsV
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.
Definition: TwoParameterPlasticityStressUpdate.C:113
TwoParameterPlasticityStressUpdate::computeAllQV
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.
Definition: TwoParameterPlasticityStressUpdate.C:103
validParams< TwoParameterPlasticityStressUpdate >
InputParameters validParams< TwoParameterPlasticityStressUpdate >()
TwoParameterPlasticityStressUpdate::preReturnMapV
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...
Definition: TwoParameterPlasticityStressUpdate.C:65
TwoParameterPlasticityStressUpdate::_dp_dpt
Real _dp_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:59
TwoParameterPlasticityStressUpdate::_q_trial
Real _q_trial
Trial value of q.
Definition: TwoParameterPlasticityStressUpdate.h:46
TwoParameterPlasticityStressUpdate::preReturnMap
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...
Definition: TwoParameterPlasticityStressUpdate.C:77
TwoParameterPlasticityStressUpdate::dpdstress
virtual RankTwoTensor dpdstress(const RankTwoTensor &stress) const =0
d(p)/d(stress) Derived classes must override this
TwoParameterPlasticityStressUpdate::_p_trial
Real _p_trial
Trial value of p.
Definition: TwoParameterPlasticityStressUpdate.h:43
TwoParameterPlasticityStressUpdate::_dgaE_dpt
Real _dgaE_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:55
TwoParameterPlasticityStressUpdate::initializeVars
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.
Definition: TwoParameterPlasticityStressUpdate.C:88
TwoParameterPlasticityStressUpdate::_num_pq
constexpr static int _num_pq
Number of variables = 2 = (p, q)
Definition: TwoParameterPlasticityStressUpdate.h:40
TwoParameterPlasticityStressUpdate::setIntnlDerivatives
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,...
RankFourTensorTempl< Real >
TwoParameterPlasticityStressUpdate::setStressAfterReturn
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.
MultiParameterPlasticityStressUpdate.h
TwoParameterPlasticityStressUpdate::_dq_dpt
Real _dq_dpt
derivative of Variable with respect to trial variable (used in consistent-tangent-operator calculatio...
Definition: TwoParameterPlasticityStressUpdate.h:61
TwoParameterPlasticityStressUpdate::setInelasticStrainIncrementAfterReturn
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...
Definition: TwoParameterPlasticityStressUpdate.C:279
TwoParameterPlasticityStressUpdate::consistentTangentOperatorV
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.
Definition: TwoParameterPlasticityStressUpdate.C:167
RankTwoTensorTempl< Real >
TwoParameterPlasticityStressUpdate::_Eqq
Real _Eqq
elasticity tensor in q direction
Definition: TwoParameterPlasticityStressUpdate.h:52
MultiParameterPlasticityStressUpdate
MultiParameterPlasticityStressUpdate performs the return-map algorithm and associated stress updates ...
Definition: MultiParameterPlasticityStressUpdate.h:99
TwoParameterPlasticityStressUpdate::computeAllQ
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.
TwoParameterPlasticityStressUpdate::consistentTangentOperator
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.
Definition: TwoParameterPlasticityStressUpdate.C:203
TwoParameterPlasticityStressUpdate::dqdstress
virtual RankTwoTensor dqdstress(const RankTwoTensor &stress) const =0
d(q)/d(stress) Derived classes must override this