OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
microplane_m1.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 - 2014 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 microplane_m1_h
36 #define microplane_m1_h
37 
38 // by commenting this out we can switch back to the old implementation (2D version not inheriting from MicroplaneMaterial)
39 #define microplane_m1_new_implementation
40 
41 #ifdef microplane_m1_new_implementation
42 // ========================= new implementation =========================
43 
44  #include "structuralms.h"
45  #include "microplanematerial.h"
46  #include "gausspoint.h"
47 
49 
50  #define _IFT_M1Material_Name "microplane_m1"
51  #define _IFT_M1Material_s0 "s0"
52  #define _IFT_M1Material_hn "hn"
53  #define _IFT_M1Material_talpha "talpha"
54 
55 
56 namespace oofem {
58 {
59 protected:
62 
63 public:
64  M1MaterialStatus(int n, Domain *d, GaussPoint *g);
65  virtual ~M1MaterialStatus();
66 
67  // definition
68  virtual const char *giveClassName() const { return "M1MaterialStatus"; }
69  void letTempNormalMplaneStressesBe(FloatArray sigmaN) { tempSigN = std :: move(sigmaN); }
70  void letTempNormalMplanePlasticStrainsBe(FloatArray epsilonpN) { tempEpspN = std :: move(epsilonpN); }
71  void letPlasticStateIndicatorsBe(IntArray plSt) { plasticState = std :: move(plSt); }
77  virtual void initTempStatus();
78  virtual void printOutputAt(FILE *file, TimeStep *tStep);
79  virtual void updateYourself(TimeStep *tStep);
80 
81  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
82  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
83 };
84 
89 {
90 protected:
91 
92  double EN; // normal microplane elastic modulus
93  double ENtan; // normal microplane tangent (elastoplastic) modulus
94  double HN; // normal microplane hardening/softening modulus
95  double s0; // normal microplane initial yield stress
96 
97 public:
103  M1Material(int n, Domain *d);
105  virtual ~M1Material() { }
106 
107  virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp,
108  const FloatArray &reducedStrain, TimeStep *tStep);
109  virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer,
110  MatResponseMode mode,
111  GaussPoint *gp,
112  TimeStep *tStep);
113  virtual void giveRealMicroplaneStressVector(FloatArray &answer, Microplane *mplane, const FloatArray &strain, TimeStep *tStep) {};
114 
115  virtual const char *giveClassName() const { return "M1Material"; }
116  virtual const char *giveInputRecordName() const { return _IFT_M1Material_Name; }
118 
119  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const { return new M1MaterialStatus(1, domain, gp); }
120 
121 protected:
123  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
124 };
125 } // end namespace oofem
126 
127 #else
128 // ========================= old implementation =========================
129 
130  #include "structuralms.h"
131  #include "structuralmaterial.h"
132  #include "gausspoint.h"
133 
134 
136 
137  #define _IFT_M1Material_Name "microplane_m1"
138  #define _IFT_M1Material_e "e"
139  #define _IFT_M1Material_s0 "s0"
140  #define _IFT_M1Material_hn "hn"
141  #define _IFT_M1Material_talpha "talpha"
142  #define _IFT_M1Material_nmp "nmp"
143 
144 
145 namespace oofem {
150 {
151 protected:
152  FloatArray sigN, tempSigN, sigNyield;
153 
154 public:
155  M1MaterialStatus(int n, Domain *d, GaussPoint *g);
156  virtual ~M1MaterialStatus();
157 
158  // definition
159  virtual const char *giveClassName() const { return "M1MaterialStatus"; }
160  void letTempNormalMplaneStressesBe(FloatArray sigmaN) { tempSigN = std :: move(sigmaN); }
161  void letNormalMplaneYieldStressesBe(FloatArray sigmaNyield) { sigNyield = std :: move(sigmaNyield); }
162  const FloatArray &giveNormalMplaneStresses() { return sigN; }
164  const FloatArray &giveNormalMplaneYieldStresses() { return sigNyield; }
165  virtual void initTempStatus();
166  virtual void printOutputAt(FILE *file, TimeStep *tStep);
167  virtual void updateYourself(TimeStep *tStep);
168 
169  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
170  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
171 };
172 
173 
177 class M1Material : public StructuralMaterial
178 {
179 protected:
180 
181  double E; // Young's modulus
182  double nu; // Poisson ratio
183  double EN; // normal microplane elastic modulus
184  double HN; // normal microplane hardening/softening modulus
185  double s0; // normal microplane initial yield stress
186  int nmp; // number of microplanes
187  FloatMatrix n; // microplane normals
188  FloatMatrix N; // N = n x n in Voigt notation
189  FloatMatrix NN; // NN = n x n x n x n in special notation
190  FloatArray mw; // microplane weights
191 
192 public:
198  M1Material(int n, Domain *d);
200  virtual ~M1Material() { }
201 
202  virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp,
203  const FloatArray &reducedStrain, TimeStep *tStep);
204  virtual void giveElasticPlaneStressStiffMtrx(FloatMatrix &answer);
205  virtual void givePlaneStressStiffMtrx(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep);
206  virtual const char *giveClassName() const { return "M1Material"; }
207  virtual const char *giveInputRecordName() const { return _IFT_M1Material_Name; }
209  virtual int hasMaterialModeCapability(MaterialMode mode);
210  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const { return new M1MaterialStatus(1, domain, gp); }
211 
212 protected:
213  MaterialStatus *CreateMicroplaneStatus(GaussPoint *gp) { return new M1MaterialStatus(1, domain, gp); }
214  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
215 };
216 } // end namespace oofem
217 #endif // end of old implementation
218 #endif // microplane_m1_h
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
virtual void giveRealMicroplaneStressVector(FloatArray &answer, Microplane *mplane, const FloatArray &strain, TimeStep *tStep)
Computes real stress vector on given microplane (the meaning of values depends on particular implemen...
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
void letTempNormalMplaneStressesBe(FloatArray sigmaN)
Definition: microplane_m1.h:69
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
virtual const char * giveClassName() const
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
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
Simple microplane model - version M1, just with normal microplane strains.
Definition: microplane_m1.h:88
void letTempNormalMplanePlasticStrainsBe(FloatArray epsilonpN)
Definition: microplane_m1.h:70
This class implements a structural material status information.
Definition: structuralms.h:65
const FloatArray & giveNormalMplaneStresses()
Definition: microplane_m1.h:72
void letPlasticStateIndicatorsBe(IntArray plSt)
Definition: microplane_m1.h:71
#define _IFT_M1Material_Name
Definition: microplane_m1.h:50
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
M1MaterialStatus(int n, Domain *d, GaussPoint *g)
virtual const char * giveInputRecordName() const
Class implementing an array of integers.
Definition: intarray.h:61
const FloatArray & giveNormalMplanePlasticStrains()
Definition: microplane_m1.h:74
MatResponseMode
Describes the character of characteristic material matrix.
Abstract base class for all microplane models.
virtual const char * giveInputRecordName() const
#define E(p)
Definition: mdm.C:368
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: matstatus.h:140
Class representing microplane integration point in finite element program.
Definition: microplane.h:74
#define N(p, q)
Definition: mdm.C:367
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
Abstract base class representing a material status information.
Definition: matstatus.h:84
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
Class representing the general Input Record.
Definition: inputrecord.h:101
const FloatArray & giveTempNormalMplanePlasticStrains()
Definition: microplane_m1.h:75
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 ~M1Material()
Destructor.
const IntArray & givePlasticStateIndicators()
Definition: microplane_m1.h:76
the oofem namespace is to define a context or scope in which all oofem names are defined.
MaterialStatus * CreateMicroplaneStatus(GaussPoint *gp)
const FloatArray & giveTempNormalMplaneStresses()
Definition: microplane_m1.h:73
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
virtual const char * giveClassName() const
Definition: microplane_m1.h:68
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