https://mooseframework.inl.gov
SolidMechanicsPlasticModel.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 
12 #include "GeneralUserObject.h"
13 #include "RankTwoTensor.h"
14 
38 {
39 public:
41 
43 
44  void initialize();
45  void execute();
46  void finalize();
47 
49  virtual unsigned int numberSurfaces() const;
50 
58  virtual void
59  yieldFunctionV(const RankTwoTensor & stress, Real intnl, std::vector<Real> & f) const;
60 
67  virtual void dyieldFunction_dstressV(const RankTwoTensor & stress,
68  Real intnl,
69  std::vector<RankTwoTensor> & df_dstress) const;
70 
77  virtual void dyieldFunction_dintnlV(const RankTwoTensor & stress,
78  Real intnl,
79  std::vector<Real> & df_dintnl) const;
80 
87  virtual void
88  flowPotentialV(const RankTwoTensor & stress, Real intnl, std::vector<RankTwoTensor> & r) const;
89 
96  virtual void dflowPotential_dstressV(const RankTwoTensor & stress,
97  Real intnl,
98  std::vector<RankFourTensor> & dr_dstress) const;
99 
106  virtual void dflowPotential_dintnlV(const RankTwoTensor & stress,
107  Real intnl,
108  std::vector<RankTwoTensor> & dr_dintnl) const;
109 
116  virtual void
117  hardPotentialV(const RankTwoTensor & stress, Real intnl, std::vector<Real> & h) const;
118 
125  virtual void dhardPotential_dstressV(const RankTwoTensor & stress,
126  Real intnl,
127  std::vector<RankTwoTensor> & dh_dstress) const;
128 
135  virtual void dhardPotential_dintnlV(const RankTwoTensor & stress,
136  Real intnl,
137  std::vector<Real> & dh_dintnl) const;
138 
154  virtual void activeConstraints(const std::vector<Real> & f,
155  const RankTwoTensor & stress,
156  Real intnl,
157  const RankFourTensor & Eijkl,
158  std::vector<bool> & act,
159  RankTwoTensor & returned_stress) const;
160 
161  virtual std::string modelName() const = 0;
162 
164  virtual bool useCustomReturnMap() const;
165 
167  virtual bool useCustomCTO() const;
168 
170  const Real _f_tol;
171 
173  const Real _ic_tol;
174 
251  virtual bool returnMap(const RankTwoTensor & trial_stress,
252  Real intnl_old,
253  const RankFourTensor & E_ijkl,
254  Real ep_plastic_tolerance,
255  RankTwoTensor & returned_stress,
256  Real & returned_intnl,
257  std::vector<Real> & dpm,
258  RankTwoTensor & delta_dp,
259  std::vector<Real> & yf,
260  bool & trial_stress_inadmissible) const;
261 
279  virtual RankFourTensor consistentTangentOperator(const RankTwoTensor & trial_stress,
280  Real intnl_old,
281  const RankTwoTensor & stress,
282  Real intnl,
283  const RankFourTensor & E_ijkl,
284  const std::vector<Real> & cumulative_pm) const;
285 
293  bool KuhnTuckerSingleSurface(Real yf, Real dpm, Real dpm_tol) const;
294 
295 protected:
297 
303  virtual Real yieldFunction(const RankTwoTensor & stress, Real intnl) const;
304 
311  virtual RankTwoTensor dyieldFunction_dstress(const RankTwoTensor & stress, Real intnl) const;
312 
319  virtual Real dyieldFunction_dintnl(const RankTwoTensor & stress, Real intnl) const;
320 
327  virtual RankTwoTensor flowPotential(const RankTwoTensor & stress, Real intnl) const;
328 
335  virtual RankFourTensor dflowPotential_dstress(const RankTwoTensor & stress, Real intnl) const;
336 
343  virtual RankTwoTensor dflowPotential_dintnl(const RankTwoTensor & stress, Real intnl) const;
344 
351  virtual Real hardPotential(const RankTwoTensor & stress, Real intnl) const;
352 
359  virtual RankTwoTensor dhardPotential_dstress(const RankTwoTensor & stress, Real intnl) const;
360 
367  virtual Real dhardPotential_dintnl(const RankTwoTensor & stress, Real intnl) const;
368 };
virtual void flowPotentialV(const RankTwoTensor &stress, Real intnl, std::vector< RankTwoTensor > &r) const
The flow potentials.
virtual void yieldFunctionV(const RankTwoTensor &stress, Real intnl, std::vector< Real > &f) const
Calculates the yield functions.
virtual RankFourTensor dflowPotential_dstress(const RankTwoTensor &stress, Real intnl) const
The derivative of the flow potential with respect to stress.
const Real _ic_tol
Tolerance on internal constraint.
virtual std::string modelName() const =0
virtual void dflowPotential_dintnlV(const RankTwoTensor &stress, Real intnl, std::vector< RankTwoTensor > &dr_dintnl) const
The derivative of the flow potential with respect to the internal parameter.
virtual RankTwoTensor dflowPotential_dintnl(const RankTwoTensor &stress, Real intnl) const
The derivative of the flow potential with respect to the internal parameter.
virtual Real hardPotential(const RankTwoTensor &stress, Real intnl) const
The hardening potential.
virtual RankFourTensor consistentTangentOperator(const RankTwoTensor &trial_stress, Real intnl_old, const RankTwoTensor &stress, Real intnl, const RankFourTensor &E_ijkl, const std::vector< Real > &cumulative_pm) const
Calculates a custom consistent tangent operator.
virtual RankTwoTensor dhardPotential_dstress(const RankTwoTensor &stress, Real intnl) const
The derivative of the hardening potential with respect to stress.
virtual void dyieldFunction_dintnlV(const RankTwoTensor &stress, Real intnl, std::vector< Real > &df_dintnl) const
The derivative of yield functions with respect to the internal parameter.
virtual void hardPotentialV(const RankTwoTensor &stress, Real intnl, std::vector< Real > &h) const
The hardening potential.
virtual Real yieldFunction(const RankTwoTensor &stress, Real intnl) const
The following functions are what you should override when building single-plasticity models...
bool KuhnTuckerSingleSurface(Real yf, Real dpm, Real dpm_tol) const
Returns true if the Kuhn-Tucker conditions for the single surface are satisfied.
virtual void dhardPotential_dstressV(const RankTwoTensor &stress, Real intnl, std::vector< RankTwoTensor > &dh_dstress) const
The derivative of the hardening potential with respect to stress.
static InputParameters validParams()
virtual bool useCustomReturnMap() const
Returns false. You will want to override this in your derived class if you write a custom returnMap f...
Real f(Real x)
Test function for Brents method.
SolidMechanicsPlasticModel(const InputParameters &parameters)
virtual bool useCustomCTO() const
Returns false. You will want to override this in your derived class if you write a custom consistent ...
virtual RankTwoTensor flowPotential(const RankTwoTensor &stress, Real intnl) const
The flow potential.
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
Performs a custom return-map.
virtual Real dhardPotential_dintnl(const RankTwoTensor &stress, Real intnl) const
The derivative of the hardening potential with respect to the internal parameter. ...
virtual unsigned int numberSurfaces() const
The number of yield surfaces for this plasticity model.
virtual RankTwoTensor dyieldFunction_dstress(const RankTwoTensor &stress, Real intnl) const
The derivative of yield function with respect to stress.
const Real _f_tol
Tolerance on yield function.
virtual void dflowPotential_dstressV(const RankTwoTensor &stress, Real intnl, std::vector< RankFourTensor > &dr_dstress) const
The derivative of the flow potential with respect to stress.
virtual void dyieldFunction_dstressV(const RankTwoTensor &stress, Real intnl, std::vector< RankTwoTensor > &df_dstress) const
The derivative of yield functions with respect to stress.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void activeConstraints(const std::vector< Real > &f, const RankTwoTensor &stress, Real intnl, const RankFourTensor &Eijkl, std::vector< bool > &act, RankTwoTensor &returned_stress) const
The active yield surfaces, given a vector of yield functions.
const InputParameters & parameters() const
Plastic Model base class The virtual functions written below must be over-ridden in derived classes t...
virtual Real dyieldFunction_dintnl(const RankTwoTensor &stress, Real intnl) const
The derivative of yield function with respect to the internal parameter.
virtual void dhardPotential_dintnlV(const RankTwoTensor &stress, Real intnl, std::vector< Real > &dh_dintnl) const
The derivative of the hardening potential with respect to the internal parameter. ...