OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
plasticmaterial.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 plasticmaterial_h
36 #define plasticmaterial_h
37 
38 #include "../sm/Materials/structuralmaterial.h"
40 #include "floatarray.h"
41 #include "floatmatrix.h"
42 #include "../sm/Materials/structuralms.h"
43 #include "matstatmapperint.h"
44 
45 namespace oofem {
46 class GaussPoint;
47 
53 {
54 protected:
58 
62 
66 
68  double gamma, temp_gamma;
69 
70 public:
71  PlasticMaterialStatus(int n, Domain * d, GaussPoint * g, int statusSize);
72  virtual ~PlasticMaterialStatus();
73 
74  virtual void printOutputAt(FILE *file, TimeStep *tStep);
75 
76  virtual void initTempStatus();
77  virtual void updateYourself(TimeStep *tStep);
78 
79  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
80  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
81 
86 
87  void letPlasticStrainVectorBe(FloatArray v) { plasticStrainVector = std :: move(v); }
88  void letTempPlasticStrainVectorBe(FloatArray v) { tempPlasticStrainVector = std :: move(v); }
89  void letTempStrainSpaceHardeningVarsVectorBe(FloatArray v) { tempStrainSpaceHardeningVarsVector = std :: move(v); }
90  void letStrainSpaceHardeningVarsVectorBe(FloatArray v) { strainSpaceHardeningVarsVector = std :: move(v); }
91 
92  int giveStateFlag() const { return state_flag; }
93  int giveTempStateFlag() const { return temp_state_flag; }
94  double givePlasticConsistencyPrameter() const { return gamma; }
96  void letTempPlasticConsistencyPrameterBe(double v) { gamma = v; }
97 
98  void letTempStateFlagBe(int v) { temp_state_flag = v; }
99 
100  // definition
101  virtual const char *giveClassName() const { return "PlasticMaterialStatus"; }
102 
103  virtual void printYourself();
104 
106  virtual void copyStateVariables(const MaterialStatus &iStatus);
107  virtual void addStateVariables(const MaterialStatus &iStatus);
108 };
109 
121 {
122 protected:
125 
126 public:
127  PlasticMaterial(int n, Domain * d);
128  virtual ~PlasticMaterial();
129 
130  // identification and auxiliary functions
131  virtual int hasNonLinearBehaviour() { return 1; }
132  virtual int hasMaterialModeCapability(MaterialMode mode);
133  virtual const char *giveClassName() const { return "PlasticMaterial"; }
134 
136  LinearElasticMaterial *giveLinearElasticMaterial() { return linearElasticMaterial; }
137 
138  virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer,
139  MatResponseMode mode,
140  GaussPoint *gp,
141  TimeStep *tStep);
142 
143 
144  virtual void giveRealStressVector(FloatArray &answer, GaussPoint *gp,
145  const FloatArray &reducedStrain, TimeStep *tStep);
146 
147  virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
148  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
149  virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
150  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
151  virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
152  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
153  virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
154  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
155  virtual void giveRealStressVector_2dBeamLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
156  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
157  virtual void giveRealStressVector_PlateLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
158  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
159  virtual void giveRealStressVector_Fiber(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
160  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
161 
162 
163  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
164 
165  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const;
166 
167 protected:
168  // add here some auxiliary functions if needed
169  FloatArray *ComputeGradientVector(GaussPoint *gp, FloatArray *fullStressVector,
170  FloatArray *fullStressSpaceHardeningVars);
171  FloatArray *ComputeResidualVector(GaussPoint *gp, double Gamma,
172  FloatArray *plasticStrainVectorR,
173  FloatArray *strainSpaceHardeningVariables,
174  FloatArray *gradientVectorR);
175  virtual void giveConsistentStiffnessMatrix(FloatMatrix &answer,
177  GaussPoint *gp,
178  TimeStep *tStep);
179 
180  void computeConsistentModuli(FloatMatrix &answer,
181  GaussPoint *gp, FloatMatrix &elasticModuliInverse,
182  FloatMatrix &hardeningModuliInverse,
183  double Gamma, const FloatArray &fullStressVector,
184  const FloatArray &fullStressSpaceHardeningVars);
185  void computeDiagModuli(FloatMatrix &answer,
186  GaussPoint *gp, FloatMatrix &elasticModuliInverse,
187  FloatMatrix &hardeningModuliInverse);
188 
190  FloatArray *strainSpaceHardeningVariables)
191  { return NULL; }
193  FloatArray *stressSpaceHardeningVars) { return 0.; }
194  virtual void computeHardeningReducedModuli(FloatMatrix &answer,
195  GaussPoint *gp,
196  FloatArray *strainSpaceHardeningVariables,
197  TimeStep *tStep) = 0;
199  FloatArray *stressSpaceHardeningVars) { return NULL; }
202  FloatArray *stressSpaceHardeningVars)
203  { return NULL; }
204  virtual int hasHardening() { return 0; }
205  virtual void computeReducedGradientMatrix(FloatMatrix &answer,
206  GaussPoint *gp,
207  const FloatArray &stressVector,
208  const FloatArray &stressSpaceHardeningVars) = 0;
209 
210  virtual void computeTrialStressIncrement(FloatArray &answer, GaussPoint *gp,
211  const FloatArray &strainIncrement, TimeStep *tStep);
212  virtual void computeReducedElasticModuli(FloatMatrix &answer, GaussPoint *gp,
213  TimeStep *tStep);
214  virtual void compute3dElasticModuli(FloatMatrix &answer, GaussPoint *gp,
215  TimeStep *tStep) = 0;
216 
217  // auxiliary functions
218  virtual int giveSizeOfFullHardeningVarsVector() { return 0; }
219  virtual int giveSizeOfReducedHardeningVarsVector(GaussPoint *) const { return 0; }
220 
221  friend class PlasticMaterialStatus;
222 
223 
224 
225  // next functions overloaded rom structural material level
226  virtual void givePlaneStressStiffMtrx(FloatMatrix &answer,
227  MatResponseMode mode,
228  GaussPoint *gp,
229  TimeStep *tStep);
230 
231  virtual void givePlaneStrainStiffMtrx(FloatMatrix &answer,
232  MatResponseMode mode,
233  GaussPoint *gp,
234  TimeStep *tStep);
235 
236  virtual void give1dStressStiffMtrx(FloatMatrix &answer,
237  MatResponseMode mode,
238  GaussPoint *gp,
239  TimeStep *tStep);
240 
241  virtual void give2dBeamLayerStiffMtrx(FloatMatrix &answer,
242  MatResponseMode mode,
243  GaussPoint *gp,
244  TimeStep *tStep);
245 
246  virtual void givePlateLayerStiffMtrx(FloatMatrix &answer,
247  MatResponseMode mode,
248  GaussPoint *gp,
249  TimeStep *tStep);
250 
251  virtual void giveFiberStiffMtrx(FloatMatrix &answer,
252  MatResponseMode mode,
253  GaussPoint *gp,
254  TimeStep *tStep);
255 };
256 } // end namespace oofem
257 #endif // plasticmaterial_h
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
virtual int hasHardening()
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
virtual FloatArray * ComputeStressSpaceHardeningVars(GaussPoint *gp, FloatArray *strainSpaceHardeningVariables)
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
This class implements a structural material status information.
Definition: structuralms.h:65
PlasticMaterialStatus(int n, Domain *d, GaussPoint *g, int statusSize)
FloatArray stressVector
Equilibrated stress vector in reduced form.
Definition: structuralms.h:71
virtual int giveSizeOfFullHardeningVarsVector()
FloatArray plasticStrainVector
Plastic strain vector (reduced form).
virtual double computeYieldValueAt(GaussPoint *gp, FloatArray *stressVector, FloatArray *stressSpaceHardeningVars)
virtual const char * giveClassName() const
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
MatResponseMode
Describes the character of characteristic material matrix.
virtual int hasNonLinearBehaviour()
Returns nonzero if receiver is non linear.
void letStrainSpaceHardeningVarsVectorBe(FloatArray v)
This class is a abstract base class for all linear elastic material models in a finite element proble...
virtual FloatArray * ComputeStressSpaceHardeningVarsReducedGradient(GaussPoint *gp, FloatArray *stressVector, FloatArray *stressSpaceHardeningVars)
virtual FloatArray * ComputeStressGradient(GaussPoint *gp, FloatArray *stressVector, FloatArray *stressSpaceHardeningVars)
LinearElasticMaterial * linearElasticMaterial
Reference to bulk (undamaged) material.
FloatArray tempStrainSpaceHardeningVarsVector
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
virtual void giveRealStressVector_1d(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 void giveRealStressVector_Fiber(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
double gamma
Plastic consistency parameter.
LinearElasticMaterial * giveLinearElasticMaterial()
Returns reference to undamaged (bulk) material.
void letTempStrainSpaceHardeningVarsVectorBe(FloatArray v)
virtual void copyStateVariables(const MaterialStatus &iStatus)
Functions for MaterialStatusMapperInterface.
const FloatArray & giveTempPlasticStrainVector() const
double giveTempPlasticConsistencyPrameter() const
Abstract base class representing a material status information.
Definition: matstatus.h:84
double givePlasticConsistencyPrameter() const
void letTempPlasticStrainVectorBe(FloatArray v)
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
void letTempPlasticConsistencyPrameterBe(double v)
virtual void giveRealStressVector_2dBeamLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
const FloatArray & givePlasticStrainVector() const
void letPlasticStrainVectorBe(FloatArray v)
virtual int giveSizeOfReducedHardeningVarsVector(GaussPoint *) const
FloatArray strainSpaceHardeningVarsVector
Strain space hardening variables.
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.
This class implements associated Material Status to PlasticMaterial.
virtual void addStateVariables(const MaterialStatus &iStatus)
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
int state_flag
Yield function status indicator.
the oofem namespace is to define a context or scope in which all oofem names are defined.
const FloatArray & givetempStrainSpaceHardeningVarsVector() const
virtual const char * giveClassName() const
virtual void giveRealStressVector_PlateLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
const FloatArray & giveStrainSpaceHardeningVars() const
virtual void printYourself()
Prints receiver state on stdout. Useful for debugging.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
This class implements a general plastic material.
Class representing solution step.
Definition: timestep.h:80
virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.

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