OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
mplasticmaterial.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 mplasticmaterial_h
36 #define mplasticmaterial_h
37 
38 #include "../sm/Materials/structuralmaterial.h"
40 #include "intarray.h"
41 #include "floatarray.h"
42 #include "floatmatrix.h"
43 #include "../sm/Materials/structuralms.h"
44 
45 #include <vector>
46 
47 namespace oofem {
48 class GaussPoint;
49 
65 {
66 public:
68 
69 protected:
73 
77 
81 
86 
87 public:
88  MPlasticMaterialStatus(int n, Domain * d, GaussPoint * g, int statusSize);
89  virtual ~MPlasticMaterialStatus();
90 
91  virtual void printOutputAt(FILE *file, TimeStep *tStep);
92 
93  virtual void initTempStatus();
94  virtual void updateYourself(TimeStep *tStep);
95 
96  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
97  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
98 
109 
111  { plasticStrainVector = std :: move(v); }
113  { tempPlasticStrainVector = std :: move(v); }
115  { tempStrainSpaceHardeningVarsVector = std :: move(v); }
117  { strainSpaceHardeningVarsVector = std :: move(v); }
118 
119  int giveStateFlag() { return state_flag; }
121  void letTempStateFlagBe(int v) { temp_state_flag = v; }
122 
124  void setTempActiveConditionMap(IntArray v) { tempActiveConditionMap = std :: move(v); }
125  const FloatArray &giveTempGamma() { return tempGamma; }
126  void setTempGamma(FloatArray v) { tempGamma = std :: move(v); }
127 
128  // definition
129  virtual const char *giveClassName() const { return "MPlasticMaterialStatus"; }
130 };
131 
143 {
144 protected:
148  int nsurf;
150  enum ReturnMappingAlgoType { mpm_ClosestPoint, mpm_CuttingPlane } rmType;
152  enum functType { yieldFunction, loadFunction };
153  enum plastType { associatedPT, nonassociatedPT } plType;
154 
155 public:
156  MPlasticMaterial(int n, Domain * d);
157  virtual ~MPlasticMaterial();
158 
159  // identification and auxiliary functions
160  virtual int hasNonLinearBehaviour() { return 1; }
161  virtual int hasMaterialModeCapability(MaterialMode mode);
162  virtual const char *giveClassName() const { return "MPlasticMaterial"; }
163 
165  LinearElasticMaterial *giveLinearElasticMaterial() { return linearElasticMaterial; }
166 
171  virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode) { return true; }
172 
173  virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer,
175  GaussPoint *gp,
176  TimeStep *tStep);
177 
178 
179  virtual void giveRealStressVector(FloatArray &answer, GaussPoint *,
180  const FloatArray &, TimeStep *);
181 
182  virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
183  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
184  virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
185  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
186  virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
187  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
188  virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
189  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
190 
191  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
192 
193  // auxiliary functions
194  virtual int giveSizeOfFullHardeningVarsVector() { return 0; }
195  virtual int giveSizeOfReducedHardeningVarsVector(GaussPoint *) const { return 0; }
196 
197  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const;
198 
199 protected:
200  void closestPointReturn(FloatArray &answer, IntArray &activeConditionMap, FloatArray &gamma,
201  GaussPoint *gp,
202  const FloatArray &totalStrain, FloatArray &plasticStrainR,
203  FloatArray &strainSpaceHardeningVariables, TimeStep *tStep);
204 
205  void cuttingPlaneReturn(FloatArray &answer, IntArray &activeConditionMap, FloatArray &gamma,
206  GaussPoint *gp,
207  const FloatArray &totalStrain, FloatArray &plasticStrainR,
208  FloatArray &strainSpaceHardeningVariables, TimeStep *tStep);
209 
210  void computeGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, const FloatArray &fullStressVector,
211  const FloatArray &fullStressSpaceHardeningVars);
212  void computeResidualVector(FloatArray &answer, GaussPoint *gp, const FloatArray &gamma,
213  const IntArray &activeConditionMap, const FloatArray &plasticStrainVectorR,
214  const FloatArray &strainSpaceHardeningVariables, std :: vector< FloatArray > &gradVec);
215  virtual void giveConsistentStiffnessMatrix(FloatMatrix &answer,
217  GaussPoint *gp,
218  TimeStep *tStep);
219 
220  virtual void giveElastoPlasticStiffnessMatrix(FloatMatrix &answer,
221  MatResponseMode mode,
222  GaussPoint *gp,
223  TimeStep *tStep);
224 
225  void computeAlgorithmicModuli(FloatMatrix &answer,
226  GaussPoint *gp, const FloatMatrix &elasticModuliInverse,
227  const FloatMatrix &hardeningModuliInverse,
228  const FloatArray &gamma, const IntArray &activeConditionMap,
229  const FloatArray &fullStressVector,
230  const FloatArray &fullStressSpaceHardeningVars);
231  void computeDiagModuli(FloatMatrix &answer,
232  GaussPoint *gp, FloatMatrix &elasticModuliInverse,
233  FloatMatrix &hardeningModuliInverse);
234 
235  virtual void computeStressSpaceHardeningVars(FloatArray &answer, GaussPoint *gp,
236  const FloatArray &strainSpaceHardeningVariables) = 0;
237  virtual double computeYieldValueAt(GaussPoint *gp, int isurf, const FloatArray &stressVector,
238  const FloatArray &stressSpaceHardeningVars) = 0;
239  virtual void computeHardeningReducedModuli(FloatMatrix &answer,
240  GaussPoint *gp,
241  const FloatArray &strainSpaceHardeningVariables,
242  TimeStep *tStep) = 0;
243  virtual void computeStressGradientVector(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp, const FloatArray &stressVector,
244  const FloatArray &stressSpaceHardeningVars) = 0;
245  virtual void computeStressSpaceHardeningVarsReducedGradient(FloatArray &answer, functType ftype, int isurf, GaussPoint *gp,
246  const FloatArray &stressVector,
247  const FloatArray &stressSpaceHardeningVars) = 0;
248  virtual int hasHardening() { return 0; }
249  virtual void computeReducedGradientMatrix(FloatMatrix &answer, int isurf,
250  GaussPoint *gp,
251  const FloatArray &stressVector,
252  const FloatArray &stressSpaceHardeningVars) = 0;
253 
254  virtual void computeTrialStressIncrement(FloatArray &answer, GaussPoint *gp,
255  const FloatArray &strainIncrement, TimeStep *tStep);
256  virtual void computeReducedElasticModuli(FloatMatrix &answer, GaussPoint *gp,
257  TimeStep *tStep);
258  //virtual void compute3dElasticModuli(FloatMatrix& answer, GaussPoint *gp,
259  // TimeStep *tStep) = 0;
260 
261  // next functions overloaded from structural material level
262  virtual void givePlaneStressStiffMtrx(FloatMatrix &answer,
264  GaussPoint *gp,
265  TimeStep *tStep);
266  virtual void givePlaneStrainStiffMtrx(FloatMatrix &answer,
268  GaussPoint *gp,
269  TimeStep *tStep);
270  virtual void give1dStressStiffMtrx(FloatMatrix &answer,
272  GaussPoint *gp,
273  TimeStep *tStep);
274  virtual void give2dBeamLayerStiffMtrx(FloatMatrix &answer,
276  GaussPoint *gp,
277  TimeStep *tStep);
278  virtual void givePlateLayerStiffMtrx(FloatMatrix &answer,
280  GaussPoint *gp,
281  TimeStep *tStep);
282 
283  virtual void giveFiberStiffMtrx(FloatMatrix &answer,
285  TimeStep *tStep);
286 };
287 } // end namespace oofem
288 #endif // mplasticmaterial_h
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
FloatArray plasticStrainVector
Plastic strain vector.
const FloatArray & giveTempGamma()
functType
Type that allows to distinguish between yield function and loading function.
void letTempPlasticStrainVectorBe(FloatArray v)
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
This class implements a structural material status information.
Definition: structuralms.h:65
virtual const char * giveClassName() const
FloatArray stressVector
Equilibrated stress vector in reduced form.
Definition: structuralms.h:71
LinearElasticMaterial * linearElasticMaterial
Reference to bulk (undamaged) material.
virtual int giveSizeOfFullHardeningVarsVector()
virtual const char * giveClassName() const
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
LinearElasticMaterial * giveLinearElasticMaterial()
Returns reference to undamaged (bulk) material.
This class implements a general plastic material.
const FloatArray & givePlasticStrainVector() const
Returns the equilibrated strain vector.
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
const IntArray & giveTempActiveConditionMap()
This class is a abstract base class for all linear elastic material models in a finite element proble...
FloatArray strainSpaceHardeningVarsVector
Strain space hardening variables.
void letTempStrainSpaceHardeningVarsVectorBe(FloatArray v)
virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_3d.
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 & giveStrainSpaceHardeningVars() const
Returns the equilibrated hardening variable vector.
int nsurf
Number of yield surfaces.
virtual int hasNonLinearBehaviour()
Returns nonzero if receiver is non linear.
virtual int giveSizeOfReducedHardeningVarsVector(GaussPoint *) const
virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
This class implements associated Material Status to MPlasticMaterial.
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
void setTempActiveConditionMap(IntArray v)
IntArray activeConditionMap
Active set of yield functions (needed for algorithmic stiffness).
int state_flag
Yield function status indicator.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver&#39;s output to given stream.
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.
FloatArray gamma
Consistency parameter values (needed for algorithmic stiffness).
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual bool isCharacteristicMtrxSymmetric(MatResponseMode rMode)
Returns true if stiffness matrix of receiver is symmetric.
void letPlasticStrainVectorBe(FloatArray v)
const FloatArray & giveTempPlasticStrainVector() const
Returns the actual (temp) strain vector.
ReturnMappingAlgoType
Protected type to determine the return mapping algorithm.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
void letStrainSpaceHardeningVarsVectorBe(FloatArray v)
MPlasticMaterialStatus(int n, Domain *d, GaussPoint *g, int statusSize)

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