www.mooseframework.org
MultiPlasticityRawComponentAssembler.h
Go to the documentation of this file.
1 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
2 /* */
3 /* All contents are licensed under LGPL V2.1 */
4 /* See LICENSE for full restrictions */
5 /****************************************************************/
6 #ifndef MULTIPLASTICITYRAWCOMPONENTASSEMBLER_H
7 #define MULTIPLASTICITYRAWCOMPONENTASSEMBLER_H
8 
10 #include "UserObjectInterface.h"
11 
13 
14 template <>
16 
36 class MultiPlasticityRawComponentAssembler : public UserObjectInterface
37 {
38 public:
39  MultiPlasticityRawComponentAssembler(const MooseObject * moose_object);
40 
42 
43 protected:
44  const InputParameters & _params;
45 
47  unsigned int _num_models;
48 
56  unsigned int _num_surfaces;
57 
59  std::vector<std::vector<unsigned int>> _surfaces_given_model;
60 
62  MooseEnum _specialIC;
63 
65  std::vector<const TensorMechanicsPlasticModel *> _f;
66 
74  virtual void yieldFunction(const RankTwoTensor & stress,
75  const std::vector<Real> & intnl,
76  const std::vector<bool> & active,
77  std::vector<Real> & f);
78 
87  virtual void dyieldFunction_dstress(const RankTwoTensor & stress,
88  const std::vector<Real> & intnl,
89  const std::vector<bool> & active,
90  std::vector<RankTwoTensor> & df_dstress);
91 
100  virtual void dyieldFunction_dintnl(const RankTwoTensor & stress,
101  const std::vector<Real> & intnl,
102  const std::vector<bool> & active,
103  std::vector<Real> & df_dintnl);
104 
112  virtual void flowPotential(const RankTwoTensor & stress,
113  const std::vector<Real> & intnl,
114  const std::vector<bool> & active,
115  std::vector<RankTwoTensor> & r);
116 
125  virtual void dflowPotential_dstress(const RankTwoTensor & stress,
126  const std::vector<Real> & intnl,
127  const std::vector<bool> & active,
128  std::vector<RankFourTensor> & dr_dstress);
129 
138  virtual void dflowPotential_dintnl(const RankTwoTensor & stress,
139  const std::vector<Real> & intnl,
140  const std::vector<bool> & active,
141  std::vector<RankTwoTensor> & dr_dintnl);
142 
153  virtual void hardPotential(const RankTwoTensor & stress,
154  const std::vector<Real> & intnl,
155  const std::vector<bool> & active,
156  std::vector<Real> & h);
157 
167  virtual void dhardPotential_dstress(const RankTwoTensor & stress,
168  const std::vector<Real> & intnl,
169  const std::vector<bool> & active,
170  std::vector<RankTwoTensor> & dh_dstress);
171 
182  virtual void dhardPotential_dintnl(const RankTwoTensor & stress,
183  const std::vector<Real> & intnl,
184  const std::vector<bool> & active,
185  std::vector<Real> & dh_dintnl);
186 
197  virtual void buildActiveConstraints(const std::vector<Real> & f,
198  const RankTwoTensor & stress,
199  const std::vector<Real> & intnl,
200  const RankFourTensor & Eijkl,
201  std::vector<bool> & act);
202 
204  unsigned int modelNumber(unsigned int surface);
205 
207  bool anyActiveSurfaces(int model, const std::vector<bool> & active);
208 
216  void activeModelSurfaces(int model,
217  const std::vector<bool> & active,
218  std::vector<unsigned int> & active_surfaces_of_model);
219 
227  void activeSurfaces(int model,
228  const std::vector<bool> & active,
229  std::vector<unsigned int> & active_surfaces);
230 
270  bool returnMapAll(const RankTwoTensor & trial_stress,
271  const std::vector<Real> & intnl_old,
272  const RankFourTensor & E_ijkl,
273  Real ep_plastic_tolerance,
274  RankTwoTensor & stress,
275  std::vector<Real> & intnl,
276  std::vector<Real> & pm,
277  std::vector<Real> & cumulative_pm,
278  RankTwoTensor & delta_dp,
279  std::vector<Real> & yf,
280  unsigned & num_successful_plastic_returns,
281  unsigned & custom_model);
282 
283 private:
285  std::vector<unsigned int> _model_given_surface;
286 
288  std::vector<unsigned int> _model_surface_given_surface;
289 
301  void buildActiveConstraintsRock(const std::vector<Real> & f,
302  const RankTwoTensor & stress,
303  const std::vector<Real> & intnl,
304  const RankFourTensor & Eijkl,
305  std::vector<bool> & act);
306 
318  void buildActiveConstraintsJoint(const std::vector<Real> & f,
319  const RankTwoTensor & stress,
320  const std::vector<Real> & intnl,
321  const RankFourTensor & Eijkl,
322  std::vector<bool> & act);
323 };
324 
325 #endif // MULTIPLASTICITYRAWCOMPONENTASSEMBLER_H
std::vector< std::vector< unsigned int > > _surfaces_given_model
_surfaces_given_model[model_number] = vector of surface numbers for this model
void activeModelSurfaces(int model, const std::vector< bool > &active, std::vector< unsigned int > &active_surfaces_of_model)
Returns the internal surface number(s) of the active surfaces of the given model This may be of size=...
std::vector< unsigned int > _model_surface_given_surface
given a surface number, this returns the corresponding-model&#39;s internal surface number ...
virtual void dyieldFunction_dstress(const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< RankTwoTensor > &df_dstress)
The derivative of the active yield function(s) with respect to stress.
MooseEnum _specialIC
Allows initial set of active constraints to be chosen optimally.
unsigned int modelNumber(unsigned int surface)
returns the model number, given the surface number
virtual void buildActiveConstraints(const std::vector< Real > &f, const RankTwoTensor &stress, const std::vector< Real > &intnl, const RankFourTensor &Eijkl, std::vector< bool > &act)
Constructs a set of active constraints, given the yield functions, f.
virtual void dhardPotential_dintnl(const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< Real > &dh_dintnl)
The derivative of the active hardening potentials with respect to the active internal parameters...
bool returnMapAll(const RankTwoTensor &trial_stress, const std::vector< Real > &intnl_old, const RankFourTensor &E_ijkl, Real ep_plastic_tolerance, RankTwoTensor &stress, std::vector< Real > &intnl, std::vector< Real > &pm, std::vector< Real > &cumulative_pm, RankTwoTensor &delta_dp, std::vector< Real > &yf, unsigned &num_successful_plastic_returns, unsigned &custom_model)
Performs a returnMap for each plastic model using their inbuilt returnMap functions.
std::vector< unsigned int > _model_given_surface
given a surface number, this returns the model number
InputParameters validParams< MultiPlasticityRawComponentAssembler >()
virtual void yieldFunction(const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< Real > &f)
The active yield function(s)
virtual void dhardPotential_dstress(const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< RankTwoTensor > &dh_dstress)
The derivative of the active hardening potentials with respect to stress By assumption in the Userobj...
void buildActiveConstraintsRock(const std::vector< Real > &f, const RankTwoTensor &stress, const std::vector< Real > &intnl, const RankFourTensor &Eijkl, std::vector< bool > &act)
"Rock" version Constructs a set of active constraints, given the yield functions, f...
void buildActiveConstraintsJoint(const std::vector< Real > &f, const RankTwoTensor &stress, const std::vector< Real > &intnl, const RankFourTensor &Eijkl, std::vector< bool > &act)
"Joint" version Constructs a set of active constraints, given the yield functions, f.
unsigned int _num_surfaces
Number of surfaces within the plastic models.
MultiPlasticityRawComponentAssembler holds and computes yield functions, flow directions, etc, for use in FiniteStrainMultiPlasticity.
std::vector< const TensorMechanicsPlasticModel * > _f
User objects that define the yield functions, flow potentials, etc.
virtual void dflowPotential_dintnl(const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< RankTwoTensor > &dr_dintnl)
The derivative of the active flow potentials with respect to the active internal parameters The UserO...
bool anyActiveSurfaces(int model, const std::vector< bool > &active)
returns true if any internal surfaces of the given model are active according to &#39;active&#39; ...
virtual void flowPotential(const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< RankTwoTensor > &r)
The active flow potential(s) - one for each yield function.
unsigned int _num_models
Number of plastic models for this material.
MultiPlasticityRawComponentAssembler(const MooseObject *moose_object)
virtual void dflowPotential_dstress(const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< RankFourTensor > &dr_dstress)
The derivative of the active flow potential(s) with respect to stress.
virtual void hardPotential(const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< Real > &h)
The active hardening potentials (one for each internal parameter and for each yield function) by assu...
virtual void dyieldFunction_dintnl(const RankTwoTensor &stress, const std::vector< Real > &intnl, const std::vector< bool > &active, std::vector< Real > &df_dintnl)
The derivative of active yield function(s) with respect to their internal parameters (the user object...
void activeSurfaces(int model, const std::vector< bool > &active, std::vector< unsigned int > &active_surfaces)
Returns the external surface number(s) of the active surfaces of the given model This may be of size=...