https://mooseframework.inl.gov
SolidMechanicsPlasticMohrCoulombMulti.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
14 
20 {
21 public:
23 
25 
27  virtual unsigned int numberSurfaces() const override;
28 
29  virtual void
30  yieldFunctionV(const RankTwoTensor & stress, Real intnl, std::vector<Real> & f) const override;
31 
32  virtual void dyieldFunction_dstressV(const RankTwoTensor & stress,
33  Real intnl,
34  std::vector<RankTwoTensor> & df_dstress) const override;
35 
36  virtual void dyieldFunction_dintnlV(const RankTwoTensor & stress,
37  Real intnl,
38  std::vector<Real> & df_dintnl) const override;
39 
40  virtual void flowPotentialV(const RankTwoTensor & stress,
41  Real intnl,
42  std::vector<RankTwoTensor> & r) const override;
43 
44  virtual void dflowPotential_dstressV(const RankTwoTensor & stress,
45  Real intnl,
46  std::vector<RankFourTensor> & dr_dstress) const override;
47 
48  virtual void dflowPotential_dintnlV(const RankTwoTensor & stress,
49  Real intnl,
50  std::vector<RankTwoTensor> & dr_dintnl) const override;
51 
52  virtual void activeConstraints(const std::vector<Real> & f,
53  const RankTwoTensor & stress,
54  Real intnl,
55  const RankFourTensor & Eijkl,
56  std::vector<bool> & act,
57  RankTwoTensor & returned_stress) const override;
58 
59  virtual std::string modelName() const override;
60 
61  virtual bool useCustomReturnMap() const override;
62 
63  virtual bool returnMap(const RankTwoTensor & trial_stress,
64  Real intnl_old,
65  const RankFourTensor & E_ijkl,
66  Real ep_plastic_tolerance,
67  RankTwoTensor & returned_stress,
68  Real & returned_intnl,
69  std::vector<Real> & dpm,
70  RankTwoTensor & delta_dp,
71  std::vector<Real> & yf,
72  bool & trial_stress_inadmissible) const override;
73 
74 protected:
76  virtual Real cohesion(const Real internal_param) const;
77 
79  virtual Real dcohesion(const Real internal_param) const;
80 
82  virtual Real phi(const Real internal_param) const;
83 
85  virtual Real dphi(const Real internal_param) const;
86 
88  virtual Real psi(const Real internal_param) const;
89 
91  virtual Real dpsi(const Real internal_param) const;
92 
93 private:
96 
99 
102 
104  const unsigned int _max_iters;
105 
107  const Real _shift;
108 
111 
122  Real e0, Real e1, Real e2, Real sinphi, Real cohcos, std::vector<Real> & f) const;
123 
129  void df_dsig(const RankTwoTensor & stress, Real sin_angle, std::vector<RankTwoTensor> & df) const;
130 
138  void perturbStress(const RankTwoTensor & stress,
139  std::vector<Real> & eigvals,
140  std::vector<RankTwoTensor> & deigvals) const;
141 
149  bool KuhnTuckerOK(const std::vector<Real> & yf,
150  const std::vector<Real> & dpm,
151  Real ep_plastic_tolerance) const;
152 
158  bool doReturnMap(const RankTwoTensor & trial_stress,
159  Real intnl_old,
160  const RankFourTensor & E_ijkl,
161  Real ep_plastic_tolerance,
162  RankTwoTensor & returned_stress,
163  Real & returned_intnl,
164  std::vector<Real> & dpm,
165  RankTwoTensor & delta_dp,
166  std::vector<Real> & yf,
167  bool & trial_stress_inadmissible) const;
168 
195  bool returnTip(const std::vector<Real> & eigvals,
196  const std::vector<RealVectorValue> & n,
197  std::vector<Real> & dpm,
198  RankTwoTensor & returned_stress,
199  Real intnl_old,
200  Real & sinphi,
201  Real & cohcos,
202  Real initial_guess,
203  bool & nr_converged,
204  Real ep_plastic_tolerance,
205  std::vector<Real> & yf) const;
206 
229  bool returnPlane(const std::vector<Real> & eigvals,
230  const std::vector<RealVectorValue> & n,
231  std::vector<Real> & dpm,
232  RankTwoTensor & returned_stress,
233  Real intnl_old,
234  Real & sinphi,
235  Real & cohcos,
236  Real initial_guess,
237  bool & nr_converged,
238  Real ep_plastic_tolerance,
239  std::vector<Real> & yf) const;
240 
265  bool returnEdge000101(const std::vector<Real> & eigvals,
266  const std::vector<RealVectorValue> & n,
267  std::vector<Real> & dpm,
268  RankTwoTensor & returned_stress,
269  Real intnl_old,
270  Real & sinphi,
271  Real & cohcos,
272  Real initial_guess,
273  Real mag_E,
274  bool & nr_converged,
275  Real ep_plastic_tolerance,
276  std::vector<Real> & yf) const;
277 
302  bool returnEdge010100(const std::vector<Real> & eigvals,
303  const std::vector<RealVectorValue> & n,
304  std::vector<Real> & dpm,
305  RankTwoTensor & returned_stress,
306  Real intnl_old,
307  Real & sinphi,
308  Real & cohcos,
309  Real initial_guess,
310  Real mag_E,
311  bool & nr_converged,
312  Real ep_plastic_tolerance,
313  std::vector<Real> & yf) const;
314 
316  {
322  };
323 };
bool KuhnTuckerOK(const std::vector< Real > &yf, const std::vector< Real > &dpm, Real ep_plastic_tolerance) const
Returns true if the Kuhn-Tucker conditions are satisfied.
virtual bool returnMap(const RankTwoTensor &trial_stress, Real intnl_old, const RankFourTensor &E_ijkl, Real ep_plastic_tolerance, RankTwoTensor &returned_stress, Real &returned_intnl, std::vector< Real > &dpm, RankTwoTensor &delta_dp, std::vector< Real > &yf, bool &trial_stress_inadmissible) const override
Performs a custom return-map.
void perturbStress(const RankTwoTensor &stress, std::vector< Real > &eigvals, std::vector< RankTwoTensor > &deigvals) const
perturbs the stress tensor in the case of almost-equal eigenvalues.
void yieldFunctionEigvals(Real e0, Real e1, Real e2, Real sinphi, Real cohcos, std::vector< Real > &f) const
Calculates the yield functions given the eigenvalues of stress.
void df_dsig(const RankTwoTensor &stress, Real sin_angle, std::vector< RankTwoTensor > &df) const
this is exactly dyieldFunction_dstress, or flowPotential, depending on whether sin_angle = sin(phi)...
virtual void dyieldFunction_dstressV(const RankTwoTensor &stress, Real intnl, std::vector< RankTwoTensor > &df_dstress) const override
The derivative of yield functions with respect to stress.
virtual void dflowPotential_dstressV(const RankTwoTensor &stress, Real intnl, std::vector< RankFourTensor > &dr_dstress) const override
The derivative of the flow potential with respect to stress.
virtual Real dphi(const Real internal_param) const
d(phi)/d(internal_param) as a function of residual value, rate, and internal_param ...
virtual void flowPotentialV(const RankTwoTensor &stress, Real intnl, std::vector< RankTwoTensor > &r) const override
The flow potentials.
SolidMechanicsPlasticMohrCoulombMulti(const InputParameters &parameters)
virtual Real dpsi(const Real internal_param) const
d(psi)/d(internal_param) as a function of residual value, rate, and internal_param ...
const SolidMechanicsHardeningModel & _cohesion
Hardening model for cohesion.
const bool _use_custom_returnMap
Whether to use the custom return-map algorithm.
const SolidMechanicsHardeningModel & _psi
Hardening model for psi.
virtual Real psi(const Real internal_param) const
psi as a function of residual value, rate, and internal_param
bool returnEdge000101(const std::vector< Real > &eigvals, const std::vector< RealVectorValue > &n, std::vector< Real > &dpm, RankTwoTensor &returned_stress, Real intnl_old, Real &sinphi, Real &cohcos, Real initial_guess, Real mag_E, bool &nr_converged, Real ep_plastic_tolerance, std::vector< Real > &yf) const
Tries to return-map to the MC edge using the n[4] and n[6] directions The return value is true if the...
Real f(Real x)
Test function for Brents method.
virtual void yieldFunctionV(const RankTwoTensor &stress, Real intnl, std::vector< Real > &f) const override
Calculates the yield functions.
virtual void dyieldFunction_dintnlV(const RankTwoTensor &stress, Real intnl, std::vector< Real > &df_dintnl) const override
The derivative of yield functions with respect to the internal parameter.
virtual void dflowPotential_dintnlV(const RankTwoTensor &stress, Real intnl, std::vector< RankTwoTensor > &dr_dintnl) const override
The derivative of the flow potential with respect to the internal parameter.
const Real _shift
yield function is shifted by this amount to avoid problems with stress-derivatives at equal eigenvalu...
virtual Real cohesion(const Real internal_param) const
cohesion as a function of residual value, rate, and internal_param
const SolidMechanicsHardeningModel & _phi
Hardening model for phi.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned int _max_iters
Maximum Newton-Raphison iterations in the custom returnMap algorithm.
FiniteStrainMohrCoulombMulti implements rate-independent non-associative mohr-coulomb with hardening/...
bool doReturnMap(const RankTwoTensor &trial_stress, Real intnl_old, const RankFourTensor &E_ijkl, Real ep_plastic_tolerance, RankTwoTensor &returned_stress, Real &returned_intnl, std::vector< Real > &dpm, RankTwoTensor &delta_dp, std::vector< Real > &yf, bool &trial_stress_inadmissible) const
See doco for returnMap function.
const InputParameters & parameters() const
bool returnTip(const std::vector< Real > &eigvals, const std::vector< RealVectorValue > &n, std::vector< Real > &dpm, RankTwoTensor &returned_stress, Real intnl_old, Real &sinphi, Real &cohcos, Real initial_guess, bool &nr_converged, Real ep_plastic_tolerance, std::vector< Real > &yf) const
Tries to return-map to the MC tip using the THREE directions given in n, and THREE dpm values are ret...
virtual unsigned int numberSurfaces() const override
The number of yield surfaces for this plasticity model.
virtual void activeConstraints(const std::vector< Real > &f, const RankTwoTensor &stress, Real intnl, const RankFourTensor &Eijkl, std::vector< bool > &act, RankTwoTensor &returned_stress) const override
The active yield surfaces, given a vector of yield functions.
virtual Real phi(const Real internal_param) const
phi as a function of residual value, rate, and internal_param
virtual Real dcohesion(const Real internal_param) const
d(cohesion)/d(internal_param) as a function of residual value, rate, and internal_param ...
bool returnPlane(const std::vector< Real > &eigvals, const std::vector< RealVectorValue > &n, std::vector< Real > &dpm, RankTwoTensor &returned_stress, Real intnl_old, Real &sinphi, Real &cohcos, Real initial_guess, bool &nr_converged, Real ep_plastic_tolerance, std::vector< Real > &yf) const
Tries to return-map to the MC plane using the n[3] direction The return value is true if the internal...
Plastic Model base class The virtual functions written below must be over-ridden in derived classes t...
virtual bool useCustomReturnMap() const override
Returns false. You will want to override this in your derived class if you write a custom returnMap f...
bool returnEdge010100(const std::vector< Real > &eigvals, const std::vector< RealVectorValue > &n, std::vector< Real > &dpm, RankTwoTensor &returned_stress, Real intnl_old, Real &sinphi, Real &cohcos, Real initial_guess, Real mag_E, bool &nr_converged, Real ep_plastic_tolerance, std::vector< Real > &yf) const
Tries to return-map to the MC edge using the n[1] and n[3] directions The return value is true if the...