OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
mplasticmaterial2.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef mplasticmaterial2_h
36 #define mplasticmaterial2_h
37 
38 #include "../sm/Materials/structuralmaterial.h"
40 #include "dictionary.h"
41 #include "intarray.h"
42 #include "floatarray.h"
43 #include "floatmatrix.h"
44 #include "../sm/Materials/structuralms.h"
45 
46 #include <vector>
47 #include <set>
48 
49 namespace oofem {
50 class GaussPoint;
51 
68 {
69 public:
71 
72 protected:
76 
83 
87 
89  double damage, tempDamage;
90 
95 
96 public:
97  MPlasticMaterial2Status(int n, Domain * d, GaussPoint * g, int statusSize);
98  virtual ~MPlasticMaterial2Status();
99 
100  virtual void printOutputAt(FILE *file, TimeStep *tStep);
101 
102  virtual void initTempStatus();
103  virtual void updateYourself(TimeStep *tStep);
104 
105  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
106  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
107 
116 
117  void letPlasticStrainVectorBe(FloatArray v) { plasticStrainVector = std :: move(v); }
118  void letTempPlasticStrainVectorBe(FloatArray v) { tempPlasticStrainVector = std :: move(v); }
119  void letTempStrainSpaceHardeningVarsVectorBe(FloatArray v) { tempStrainSpaceHardeningVarsVector = std :: move(v); }
120  void letStrainSpaceHardeningVarsVectorBe(FloatArray v) { strainSpaceHardeningVarsVector = std :: move(v); }
121 
122  void letTempDamageBe(double v) { tempDamage = v; }
123  double giveDamage() { return damage; }
124  double giveTempDamage() { return tempDamage; }
125 
126  int giveStateFlag() { return state_flag; }
128  void letTempStateFlagBe(int v) { temp_state_flag = v; }
129 
131  void setTempActiveConditionMap(IntArray v) { tempActiveConditionMap = std :: move(v); }
132  const FloatArray &giveTempGamma() { return tempGamma; }
133  void setTempGamma(FloatArray v) { tempGamma = std :: move(v); }
134 
135  // definition
136  virtual const char *giveClassName() const { return "MPlasticMaterial2Status"; }
137 };
138 
176 {
177 protected:
181  int nsurf;
183  enum ReturnMappingAlgoType { mpm_ClosestPoint, mpm_CuttingPlane } rmType;
185  enum functType { yieldFunction, loadFunction };
186  enum plastType { associatedPT, nonassociatedPT } plType;
190  std :: set< long >populationSet;
191 
192 public:
193  MPlasticMaterial2(int n, Domain * d);
194  virtual ~MPlasticMaterial2();
195 
196  // identification and auxiliary functions
197  virtual int hasNonLinearBehaviour() { return 1; }
198  virtual int hasMaterialModeCapability(MaterialMode mode);
199  virtual const char *giveClassName() const { return "MPlasticMaterial2"; }
200 
202  LinearElasticMaterial *giveLinearElasticMaterial() { return linearElasticMaterial; }
203 
204  virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode) { return true; }
205 
207  {
208  double alpha = this->linearElasticMaterial->give(tAlpha, gp);
209  answer = {alpha, alpha, alpha, 0, 0, 0};
210  }
211 
212  virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer,
214  GaussPoint *gp,
215  TimeStep *tStep);
216 
217 
218  virtual void giveRealStressVector(FloatArray &answer, GaussPoint *,
219  const FloatArray &, TimeStep *);
220 
221  virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
222  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
223  virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
224  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
225  virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
226  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
227  virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
228  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
229 
230  virtual double computeDamage(GaussPoint *gp, const FloatArray &strainSpaceHardeningVariables, TimeStep *tStep);
231 
232  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
233 
234  // auxiliary functions
235  virtual int giveSizeOfFullHardeningVarsVector() { return 0; }
236  virtual int giveSizeOfReducedHardeningVarsVector(GaussPoint *) const { return 0; }
237 
238  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const;
239 
240 protected:
241 
242  virtual int giveMaxNumberOfActiveYieldConds(GaussPoint *gp) = 0;
243  void closestPointReturn(FloatArray &answer, IntArray &activeConditionMap, FloatArray &gamma,
244  GaussPoint *gp,
245  const FloatArray &totalStrain, FloatArray &plasticStrainR,
246  FloatArray &strainSpaceHardeningVariables, TimeStep *tStep);
247 
248  void cuttingPlaneReturn(FloatArray &answer, IntArray &activeConditionMap, FloatArray &gamma,
249  GaussPoint *gp,
250  const FloatArray &totalStrain, FloatArray &plasticStrainR,
251  FloatArray &strainSpaceHardeningVariables, TimeStep *tStep);
252 
253  // add here some auxiliary functions if needed
254  /* void computeGradientVector (FloatArray& answer, functType ftype, int isurf, GaussPoint* gp, const FloatArray& fullStressVector,
255  * const FloatArray& fullStressSpaceHardeningVars);*/
256  void computeResidualVector(FloatArray &answer, GaussPoint *gp, const FloatArray &gamma,
257  const IntArray &activeConditionMap, const FloatArray &plasticStrainVectorR,
258  const FloatArray &strainSpaceHardeningVariables, std :: vector< FloatArray > &gradVec);
259  virtual void giveConsistentStiffnessMatrix(FloatMatrix &answer,
261  GaussPoint *gp,
262  TimeStep *tStep);
263 
264  virtual void giveElastoPlasticStiffnessMatrix(FloatMatrix &answer,
265  MatResponseMode mode,
266  GaussPoint *gp,
267  TimeStep *tStep);
268 
269  void computeAlgorithmicModuli(FloatMatrix &answer,
270  GaussPoint *gp, const FloatMatrix &elasticModuliInverse,
271  const FloatArray &gamma, const IntArray &activeConditionMap,
272  const FloatArray &fullStressVector,
273  const FloatArray &strainSpaceHardeningVariables);
274 
275  /*void computeDiagModuli(FloatMatrix& answer,
276  * GaussPoint *gp, FloatMatrix &elasticModuliInverse,
277  * FloatMatrix &hardeningModuliInverse);*/
278 
280  virtual double computeYieldValueAt(GaussPoint *gp, int isurf, const FloatArray &stressVector,
281  const FloatArray &strainSpaceHardeningVariables) = 0;
282 
284  virtual void computeStressGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, const FloatArray &stressVector,
285  const FloatArray &strainSpaceHardeningVariables) = 0;
286  void computeReducedStressGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, const FloatArray &stressVector,
287  const FloatArray &strainSpaceHardeningVariables);
288 
298  virtual void computeStrainHardeningVarsIncrement(FloatArray &answer, GaussPoint *gp,
299  const FloatArray &stress, const FloatArray &dlambda,
300  const FloatArray &dplasticStrain, const IntArray &activeConditionMap) = 0;
304  virtual void computeKGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, FloatArray &fullStressVector,
305  const FloatArray &strainSpaceHardeningVariables) = 0;
306 
310  virtual void computeReducedHardeningVarsSigmaGradient(FloatMatrix &answer, GaussPoint *gp, const IntArray &activeConditionMap,
311  const FloatArray &fullStressVector,
312  const FloatArray &strainSpaceHardeningVars,
313  const FloatArray &gamma) = 0;
315  virtual void computeReducedHardeningVarsLamGradient(FloatMatrix &answer, GaussPoint *gp, int actSurf,
316  const IntArray &activeConditionMap,
317  const FloatArray &fullStressVector,
318  const FloatArray &strainSpaceHardeningVars,
319  const FloatArray &gamma) = 0;
323  virtual int hasHardening() = 0;
324  /* virtual void computeReducedGradientMatrix (FloatMatrix& answer, int isurf,
325  * GaussPoint *gp,
326  * const FloatArray& stressVector,
327  * const FloatArray& stressSpaceHardeningVars) = 0;*/
329  virtual void computeReducedSSGradientMatrix(FloatMatrix &gradientMatrix, int i, GaussPoint *gp, const FloatArray &fullStressVector,
330  const FloatArray &strainSpaceHardeningVariables) = 0;
332  virtual void computeReducedSKGradientMatrix(FloatMatrix &gradientMatrix, int i, GaussPoint *gp, const FloatArray &fullStressVector,
333  const FloatArray &strainSpaceHardeningVariables) = 0;
334 
342  virtual void computeTrialStressIncrement(FloatArray &answer, GaussPoint *gp,
343  const FloatArray &strainIncrement, TimeStep *tStep);
344  virtual void computeReducedElasticModuli(FloatMatrix &answer, GaussPoint *gp,
345  TimeStep *tStep);
346  //virtual void compute3dElasticModuli(FloatMatrix& answer, GaussPoint *gp,
347  // TimeStep *tStep) = 0;
348 
349  // next functions overloaded rom structural material level
350  virtual void givePlaneStressStiffMtrx(FloatMatrix &answer,
352  GaussPoint *gp,
353  TimeStep *tStep);
354  virtual void givePlaneStrainStiffMtrx(FloatMatrix &answer,
356  GaussPoint *gp,
357  TimeStep *tStep);
358  virtual void give1dStressStiffMtrx(FloatMatrix &answer,
360  GaussPoint *gp,
361  TimeStep *tStep);
362  virtual void give2dBeamLayerStiffMtrx(FloatMatrix &answer,
364  GaussPoint *gp,
365  TimeStep *tStep);
366  virtual void givePlateLayerStiffMtrx(FloatMatrix &answer,
368  GaussPoint *gp,
369  TimeStep *tStep);
370 
371  virtual void giveFiberStiffMtrx(FloatMatrix &answer,
373  TimeStep *tStep);
374 
375 protected:
376  long getPopulationSignature(IntArray &mask);
377  int testPopulation(long pop);
378  void clearPopulationSet();
379  void addNewPopulation(IntArray &mask);
380  int getNewPopulation(IntArray &result, IntArray &candidateMask, int degree, int size);
381 };
382 } // end namespace oofem
383 #endif // mplasticmaterial2_h
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
const FloatArray & giveTempPlasticStrainVector() const
Returns the actual (temp) strain vector.
MPlasticMaterial2Status(int n, Domain *d, GaussPoint *g, int statusSize)
FloatArray gamma
Consistency parameter values (needed for algorithmic stiffness).
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
LinearElasticMaterial * linearElasticMaterial
Reference to bulk (undamaged) material.
bool iterativeUpdateOfActiveConds
Flag indicating whether iterative update of a set of active yield conditions takes place...
#define tAlpha
Definition: matconst.h:67
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
int nsurf
Number of yield surfaces.
This class implements a structural material status information.
Definition: structuralms.h:65
FloatArray stressVector
Equilibrated stress vector in reduced form.
Definition: structuralms.h:71
const FloatArray & giveTempGamma()
virtual const char * giveClassName() const
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode)
Returns true if stiffness matrix of receiver is symmetric Default implementation returns true...
virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
This class implements associated Material Status to MPlasticMaterial.
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
functType
Type that allows to distinguish between yield function and loading function.
This class is a abstract base class for all linear elastic material models in a finite element proble...
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
std::set< long > populationSet
Set for keeping record of generated populations of active yield conditions during return...
void letTempPlasticStrainVectorBe(FloatArray v)
virtual double give(int aProperty, GaussPoint *gp)
Returns the value of material property &#39;aProperty&#39;.
Definition: material.C:52
FloatArray strainSpaceHardeningVarsVector
Strain space hardening variables, e.g.
int state_flag
Yield function status indicator.
virtual int giveSizeOfFullHardeningVarsVector()
LinearElasticMaterial * giveLinearElasticMaterial()
Returns reference to undamaged (bulk) material.
void letStrainSpaceHardeningVarsVectorBe(FloatArray v)
Abstract base class representing a material status information.
Definition: matstatus.h:84
Class representing vector of real numbers.
Definition: floatarray.h:82
const FloatArray & giveTempStrainSpaceHardeningVarsVector() const
Returns the actual (temp) hardening variable vector.
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IntArray activeConditionMap
Active set of yield functions (needed for algorithmic stiffness).
void letPlasticStrainVectorBe(FloatArray v)
const FloatArray & giveStrainSpaceHardeningVars() const
Returns the equilibrated hardening variable vector.
virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_3d.
virtual void giveThermalDilatationVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Returns a vector of coefficients of thermal dilatation in direction of each material principal (local...
void setTempActiveConditionMap(IntArray v)
void letTempStrainSpaceHardeningVarsVectorBe(FloatArray v)
virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
Abstract base class for all "structural" constitutive models.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
ReturnMappingAlgoType
Protected type to determine the return mapping algorithm.
const IntArray & giveTempActiveConditionMap()
virtual int giveSizeOfReducedHardeningVarsVector(GaussPoint *) const
the oofem namespace is to define a context or scope in which all oofem names are defined.
FloatArray plasticStrainVector
Plastic strain vector.
virtual const char * giveClassName() const
virtual int hasNonLinearBehaviour()
Returns nonzero if receiver is non linear.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
const FloatArray & givePlasticStrainVector() const
Returns the equilibrated strain vector.
Class representing solution step.
Definition: timestep.h:80
This class represents a base class for non-associated multisurface plasticity.
double damage
Isotropic damage variables.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011