OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
perfectlyplasticmaterial.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 perfectlyplasticmaterial_h
36 #define perfectlyplasticmaterial_h
37 
38 #include "../sm/Materials/structuralmaterial.h"
40 #include "floatarray.h"
41 #include "floatmatrix.h"
42 #include "../sm/Materials/structuralms.h"
43 
44 namespace oofem {
63 {
64 protected:
65  FloatArray plasticStrainVector; // reduced form to save memory
69 
70 public:
73 
74  virtual void printOutputAt(FILE *file, TimeStep *tStep);
75 
76  int setTempYieldFlag(int i) { return temp_yield_flag = i; }
78  int giveYieldFlag() { return yield_flag; }
79 
80  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
81  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
82 
83  virtual void initTempStatus();
84  virtual void updateYourself(TimeStep *tStep);
85 
88  void letPlasticStrainVectorBe(FloatArray v) { plasticStrainVector = std :: move(v); }
89  void letPlasticStrainIncrementVectorBe(FloatArray v) { plasticStrainIncrementVector = std :: move(v); }
90 
91  // definition
92  virtual const char *giveClassName() const { return "PerfectlyPlasticMaterialStatus"; }
93 };
94 
116 {
117 protected:
121 
122 public:
123 
125  {
126  yieldCriteria = 0;
127  loadingCriteria = 0;
128  linearElasticMaterial = NULL;
129  }
130 
132  delete linearElasticMaterial;
133  }
134 
135  virtual void giveRealStressVector(FloatArray &answer, GaussPoint *gp,
136  const FloatArray &reducedStrain, TimeStep *tStep);
137 
138  virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
139  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
140  virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
141  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
142  virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
143  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
144  virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
145  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
146  virtual void giveRealStressVector_2dBeamLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
147  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
148  virtual void giveRealStressVector_PlateLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
149  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
150 
151  // can be moved to parent classes
152  virtual void updateIfFailure(GaussPoint *gp,
153  FloatArray *stressVector3d,
154  FloatArray *PlasticStrainVector3d) { }
155 
156  // identification and auxiliary functions
157  virtual int hasNonLinearBehaviour() { return 1; }
158  virtual int hasMaterialModeCapability(MaterialMode mode);
159  virtual const char *giveClassName() const { return "PerfectlyPlasticMaterial"; }
161  LinearElasticMaterial *giveLinearElasticMaterial() { return linearElasticMaterial; }
162 
163  virtual double give(int aProperty, GaussPoint *gp);
164 
165  virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer,
166  MatResponseMode mode,
167  GaussPoint *gp,
168  TimeStep *tStep);
169 
170  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
171  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const;
172 
173 protected:
174  // two functions used to initialize and updating temporary variables in
175  // gps status. These variables are used to control process, when
176  // we try to find equilibrium state
177 
178  virtual void giveMaterialStiffnessMatrix(FloatMatrix &answer,
179  MatResponseMode mode, GaussPoint *gp,
180  TimeStep *tStep);
181  virtual void giveEffectiveMaterialStiffnessMatrix(FloatMatrix &answer,
182  MatResponseMode mode, GaussPoint *gp,
183  TimeStep *tStep);
184 
185  virtual void givePlaneStressStiffMtrx(FloatMatrix &answer,
186  MatResponseMode mode,
187  GaussPoint *gp,
188  TimeStep *tStep);
189  virtual void givePlaneStrainStiffMtrx(FloatMatrix &answer,
190  MatResponseMode mode,
191  GaussPoint *gp,
192  TimeStep *tStep);
193  virtual void give1dStressStiffMtrx(FloatMatrix &answer,
194  MatResponseMode mode,
195  GaussPoint *gp,
196  TimeStep *tStep);
197  virtual void give2dBeamLayerStiffMtrx(FloatMatrix &answer,
198  MatResponseMode mode,
199  GaussPoint *gp,
200  TimeStep *tStep);
201  virtual void givePlateLayerStiffMtrx(FloatMatrix &answer,
202  MatResponseMode mode,
203  GaussPoint *gp,
204  TimeStep *tStep);
205 
206  void computeTrialStressIncrement(FloatArray &answer, GaussPoint *gp,
207  const FloatArray &strainIncrement, TimeStep *tStep);
208  void computePlasticStiffnessAt(FloatMatrix &answer,
209  GaussPoint *gp,
210  FloatArray *currentStressVector,
211  FloatArray *currentPlasticStrainVector,
212  FloatArray *strainIncrement3d,
213  TimeStep *tStep,
214  double &lambda);
215 
216  FloatArray *GiveStressCorrectionBackToYieldSurface(GaussPoint *gp,
217  FloatArray *stressVector3d,
218  FloatArray *plasticVector3d);
219  //
220  // yield(YC-like functions) and loading(LC-like functions) criteria specific section
221  //
222 
223  virtual double computeYCValueAt(GaussPoint *gp, FloatArray *, FloatArray *) { return -1.0; }
224  virtual FloatArray *GiveYCStressGradient(GaussPoint *gp, FloatArray *, FloatArray *) { return NULL; }
225  virtual FloatArray *GiveLCStressGradient(GaussPoint *gp, FloatArray *, FloatArray *) { return NULL; }
228  //virtual FloatArray* GiveHardeningGradient (GaussPoint *gp,FloatArray *,FloatArray *) {return NULL;}
229  virtual void updateTempYC(GaussPoint *gp, FloatArray *, FloatArray *) { }
230  virtual void updateTempLC(GaussPoint *gp, FloatArray *, FloatArray *) { }
231  //virtual int updateYieldStatus(GaussPoint* gp, FloatArray* strainIncrementIn3d);
232 };
233 } // end namespace oofem
234 #endif // perfectlyplasticmaterial_h
virtual FloatArray * GiveYCStressGradient(GaussPoint *gp, FloatArray *, FloatArray *)
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
const FloatArray & givePlasticStrainVector() const
const FloatArray & givePlasticStrainIncrementVector() const
virtual void updateTempLC(GaussPoint *gp, FloatArray *, FloatArray *)
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual FloatArray * GiveYCPlasticStrainGradient(GaussPoint *gp, FloatArray *, FloatArray *)
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
virtual const char * giveClassName() const
virtual void updateTempYC(GaussPoint *gp, FloatArray *, FloatArray *)
virtual void updateIfFailure(GaussPoint *gp, FloatArray *stressVector3d, FloatArray *PlasticStrainVector3d)
This class implements a structural material status information.
Definition: structuralms.h:65
This class implements associated Material Status to PerfectlyPlasticMaterial.
virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_3d.
virtual FloatArray * GiveLCPlasticStrainGradient(GaussPoint *gp, FloatArray *, FloatArray *)
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
MatResponseMode
Describes the character of characteristic material matrix.
virtual void giveRealStressVector_PlateLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
This class is a abstract base class for all linear elastic material models in a finite element proble...
LinearElasticMaterial * linearElasticMaterial
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: matstatus.h:140
This class implements a perfectly plastic material in a finite element problem.
virtual int hasNonLinearBehaviour()
Returns nonzero if receiver is non linear.
LinearElasticMaterial * giveLinearElasticMaterial()
virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
virtual void giveRealStressVector_2dBeamLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
virtual FloatArray * GiveLCStressGradient(GaussPoint *gp, FloatArray *, FloatArray *)
Abstract base class representing a material status information.
Definition: matstatus.h:84
PerfectlyPlasticMaterialStatus(int n, Domain *d, GaussPoint *g)
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual const char * giveClassName() const
Class representing the general Input Record.
Definition: inputrecord.h:101
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 double computeYCValueAt(GaussPoint *gp, FloatArray *, FloatArray *)
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80

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