OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
fcm.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 - 2016 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 fcm_h
36 #define fcm_h
37 
38 #include "material.h"
40 #include "structuralmaterial.h"
41 #include "structuralms.h"
42 #include "intarray.h"
43 
45 
46 #define _IFT_FCM_nAllowedCracks "ncracks"
47 #define _IFT_FCM_crackSpacing "crackspacing"
48 #define _IFT_FCM_multipleCrackShear "multiplecrackshear"
49 #define _IFT_FCM_ecsm "ecsm"
50 
51 
52 namespace oofem {
53 // crack statuses
54 #define pscm_NONE 0
55 #define pscm_JUST_INIT 1
56 #define pscm_SOFTENING 2
57 #define pscm_UNLO_RELO 3
58 #define pscm_CLOSED 4
59 
60 #define fcm_SMALL_STRAIN 1.e-12
61 #define fcm_BIGNUMBER 1.e6
62 #define fcm_TOLERANCE 1.e-6
63 
64 
69 {
70 protected:
81 
90 
93 
94 public:
95  FCMMaterialStatus(int n, Domain *d, GaussPoint *g);
96  virtual ~FCMMaterialStatus();
98  virtual void printOutputAt(FILE *file, TimeStep *tStep);
100  virtual int giveNumberOfCracks() const;
102  virtual int giveNumberOfTempCracks() const;
103 
107  double giveMaxCrackStrain(int icrack) { return maxCrackStrains.at(icrack); }
109  void setMaxCrackStrain(int icrack, double val) { maxCrackStrains.at(icrack) = val; }
110 
112  double giveTempMaxCrackStrain(int icrack) { return tempMaxCrackStrains.at(icrack); }
114  void setTempMaxCrackStrain(int icrack, double val) { tempMaxCrackStrains.at(icrack) = val; }
115 
119  int giveTempCrackStatus(int icrack) const { return tempCrackStatuses.at(icrack); }
121  void setTempCrackStatus(int icrack, int val) { tempCrackStatuses.at(icrack) = val; }
123  int giveCrackStatus(int icrack) const { return crackStatuses.at(icrack); }
124 
130  double giveCrackStrain(int icrack) const { return crackStrainVector.at(icrack); }
132  double giveTempCrackStrain(int icrack) const { return tempCrackStrainVector.at(icrack); }
134  void setTempCrackStrainVector(FloatArray a) { tempCrackStrainVector = std :: move(a); }
136  void setTempCrackStrain(int icrack, double val) { tempCrackStrainVector.at(icrack) = val; }
138  void setCrackStrainVector(FloatArray a) { crackStrainVector = std :: move(a); }
140  void setG2LStressVectorTransformationMtrx(FloatMatrix t) { transMatrix_G2Lstress = std :: move(t); }
142  void setG2LStrainVectorTransformationMtrx(FloatMatrix s) { transMatrix_G2Lstrain = std :: move(s); }
144  void setL2GStressVectorTransformationMtrx(FloatMatrix t) { transMatrix_L2Gstress = std :: move(t); }
146  void setL2GStrainVectorTransformationMtrx(FloatMatrix s) { transMatrix_L2Gstrain = std :: move(s); }
147 
156 
158  double giveCharLength(int icrack) const {
159  if ( icrack ) {
160  return charLengths.at(icrack);
161  } else {
162  return 0.0;
163  }
164  }
166  void setCharLength(int icrack, double val) { charLengths.at(icrack) = val; }
168  const FloatMatrix &giveCrackDirs() { return crackDirs; }
172  void setCrackDirs(FloatMatrix a) { crackDirs = std :: move(a); }
174  virtual int giveMaxNumberOfCracks(GaussPoint *gp);
175 
176  // definition
177  virtual const char *giveClassName() const { return "FCMMaterialStatus"; }
178 
180  virtual void initTempStatus();
182  virtual void updateYourself(TimeStep *tStep);
183 
185  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
187  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
188 };
189 
198 {
199 protected:
201 
202 public:
203  FCMMaterial(int n, Domain *d);
204  virtual ~FCMMaterial();
205 
206  // identification and auxiliary functions
207  virtual int hasNonLinearBehaviour() { return 1; }
208  virtual int hasMaterialModeCapability(MaterialMode mode);
209 
210  virtual const char *giveClassName() const { return "FCMMaterial"; }
211 
213 
214  virtual double give(int aProperty, GaussPoint *gp);
215 
216  IsotropicLinearElasticMaterial *giveLinearElasticMaterial() { return linearElasticMaterial; }
217 
218  virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer,
219  MatResponseMode mode,
220  GaussPoint *gp,
221  TimeStep *tStep);
222 
223 
224  virtual void givePlaneStressStiffMtrx(FloatMatrix &answer,
225  MatResponseMode mmode,
226  GaussPoint *gp,
227  TimeStep *tStep);
228 
229  virtual void givePlaneStrainStiffMtrx(FloatMatrix &answer,
230  MatResponseMode mmode,
231  GaussPoint *gp,
232  TimeStep *tStep);
233 
234  virtual void giveRealStressVector(FloatArray &answer, GaussPoint *gp,
235  const FloatArray &reducedStrain, TimeStep *tStep);
236 
237  virtual void initializeCrack(GaussPoint *gp, FloatMatrix &base, int nCrack);
238 
239  virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
240  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
241  virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
242  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
243  virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
244  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
245  virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
246  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
247  virtual void giveRealStressVector_2dBeamLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
248  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
249  virtual void giveRealStressVector_PlateLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
250  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
251 
252 
253  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
254 
256  virtual double computeNormalCrackOpening(GaussPoint *gp, int i);
258  virtual double computeMaxNormalCrackOpening(GaussPoint *gp, int i);
259 
261  virtual double computeShearSlipOnCrack(GaussPoint *gp, int i);
262 
263  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const { return new FCMMaterialStatus(1, domain, gp); }
264 
265 protected:
266 
269 
272 
275 
277  virtual double giveTensileStrength(GaussPoint *gp) = 0;
278 
280  virtual void checkSnapBack(GaussPoint *gp, int crack) = 0;
281 
283  virtual void updateCrackStatus(GaussPoint *gp);
284 
286  virtual double giveNormalCrackingStress(GaussPoint *gp, double eps_cr, int i) = 0;
287 
289  virtual double giveCharacteristicElementLength(GaussPoint *gp, const FloatArray &crackPlaneNormal);
290 
292  virtual double giveCrackingModulus(MatResponseMode rMode, GaussPoint *gp, int i) = 0;
293 
295  virtual double computeEffectiveShearModulus(GaussPoint *gp, int i) = 0;
296 
298  virtual double computeTotalD2Modulus(GaussPoint *gp, int i);
299 
301  virtual double computeD2ModulusForCrack(GaussPoint *gp, int icrack) = 0;
302 
304  virtual double maxShearStress(GaussPoint *gp, int i) = 0;
305 
307  virtual bool isIntactForShear(GaussPoint *gp, int i);
308 
310  virtual bool isIntact(GaussPoint *gp, int icrack);
311 
313  virtual bool checkStrengthCriterion(FloatMatrix &newBase, const FloatArray &globalStress, GaussPoint *gp, TimeStep *tStep, int nCrack);
314 
316  virtual bool isStrengthExceeded(const FloatMatrix &base, GaussPoint *gp, TimeStep *tStep, int iCrack, double trialStress);
317 
319  virtual double computeShearStiffnessRedistributionFactor(GaussPoint *gp, int ithCrackPlane, int jthCrackDirection);
320 
322  double crackSpacing;
323 
325  virtual double giveCrackSpacing(void);
326 
328  virtual double giveNumberOfCracksInDirection(GaussPoint *gp, int iCrack);
329 
331  virtual double giveNumberOfCracksForShearDirection(GaussPoint *gp, int i);
332 
333 
334  virtual void giveMaterialStiffnessMatrix(FloatMatrix & answer, MatResponseMode,
335  GaussPoint * gp,
336  TimeStep * tStep);
337 
339  virtual void giveLocalCrackedStiffnessMatrix(FloatMatrix &answer,
340  MatResponseMode rMode,
341  GaussPoint *gp, TimeStep *tStep);
342 
344  virtual double computeOverallElasticStiffness(void) { return linearElasticMaterial->giveYoungsModulus(); }
345 
347  virtual double computeOverallElasticShearModulus(void) { return linearElasticMaterial->giveShearModulus(); }
348 };
349 } // end namespace oofem
350 #endif // fcm_h
void setG2LStressVectorTransformationMtrx(FloatMatrix t)
sets transformation matrix for stress transformation from global to local coordinate system ...
Definition: fcm.h:140
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
bool multipleCrackShear
if true = takes shear compliance of all cracks, false = only dominant crack contribution, default value is false
Definition: fcm.h:274
int giveTempCrackStatus(int icrack) const
returns temporary value of status associated with i-th crack direction
Definition: fcm.h:119
virtual double computeOverallElasticStiffness(void)
returns overall Young's modulus
Definition: fcm.h:344
FloatMatrix crackDirs
Storing direction of cracks (crack normals) in columwise format.
Definition: fcm.h:78
int nMaxCracks
number of maximum possible cracks (optional parameter)
Definition: fcm.h:92
void setL2GStrainVectorTransformationMtrx(FloatMatrix s)
sets transformation matrix for stress transformation from global to local coordinate system ...
Definition: fcm.h:146
void setMaxCrackStrain(int icrack, double val)
sets value of the maximum crack strain for the i-th crack (equilibrated value)
Definition: fcm.h:109
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
double crackSpacing
value of crack spacing (allows to "have" more parallel cracks in one direction if the element size ex...
Definition: fcm.h:322
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_3d.
Definition: fcm.h:241
int nAllowedCracks
allowed number of cracks (user-defined)
Definition: fcm.h:268
This class implements associated Material Status to FCMMaterial (fixed crack material).
Definition: fcm.h:68
void setTempCrackStatus(int icrack, int val)
sets temporary value of status for of the i-th crack
Definition: fcm.h:121
const FloatMatrix & giveG2LStressVectorTransformationMtrx()
returns transformation matrix for stress transformation from global to local coordinate system ...
Definition: fcm.h:149
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)
saves current context(state) into stream
Definition: fcm.C:1951
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
const FloatMatrix & giveG2LStrainVectorTransformationMtrx()
sets transformation matrix for strain transformation from global to local coordinate system ...
Definition: fcm.h:151
FloatArray charLengths
Characteristic lengths computed from the crack orientation and element geometry.
Definition: fcm.h:80
This class implements a structural material status information.
Definition: structuralms.h:65
This class implements a Fixed Crack Model for fracture (after initiation the crack directions cannot ...
Definition: fcm.h:197
FloatArray maxCrackStrains
Max. crack strain reached in the entire previous history.
Definition: fcm.h:74
virtual int hasNonLinearBehaviour()
Returns nonzero if receiver is non linear.
Definition: fcm.h:207
virtual int giveNumberOfCracks() const
returns number of cracks from the previous time step (equilibrated value)
Definition: fcm.C:1829
FloatArray tempCrackStrainVector
Definition: fcm.h:76
const FloatMatrix & giveCrackDirs()
returns crack directions
Definition: fcm.h:168
double giveCharLength(int icrack) const
returns characteristic length associated with i-th crack direction
Definition: fcm.h:158
ElementCharSizeMethod ecsMethod
Method used for evaluation of characteristic element size.
Definition: fcm.h:271
double giveShearModulus()
Returns the shear elastic modulus .
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
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.
Definition: fcm.h:249
const IntArray & giveCrackStatus()
returns crack statuses
Definition: fcm.h:170
virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
Definition: fcm.h:245
const FloatArray & giveMaxCrackStrainVector()
returns vector with maximum cracking strains (max 3 components)
Definition: fcm.h:105
void setCrackDirs(FloatMatrix a)
sets matrix with crack directions (normal vectors)
Definition: fcm.h:172
virtual void initTempStatus()
initializes temporary status
Definition: fcm.C:1891
double giveTempCrackStrain(int icrack) const
returns i-th component of the crack strain vector (temporary)
Definition: fcm.h:132
IntArray tempCrackStatuses
Definition: fcm.h:72
const FloatArray & giveTempCrackStrainVector()
return temporary crack strain vector (max 6 components)
Definition: fcm.h:128
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
Definition: fcm.h:263
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: matstatus.h:140
void setTempCrackStrain(int icrack, double val)
sets temporary value of i-th cracking strain (max 6 components)
Definition: fcm.h:136
This class implements an isotropic linear elastic material in a finite element problem.
void setG2LStrainVectorTransformationMtrx(FloatMatrix s)
sets transformation matrix for strain transformation from global to local coordinate system ...
Definition: fcm.h:142
const FloatMatrix & giveL2GStressVectorTransformationMtrx()
sets transformation matrix for stress transformation from local to global coordinate system ...
Definition: fcm.h:153
virtual int giveNumberOfTempCracks() const
returns temporary number of cracks
Definition: fcm.C:1847
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
restores context(state) from stream
Definition: fcm.C:2010
FloatArray tempMaxCrackStrains
Definition: fcm.h:74
FloatMatrix transMatrix_G2Lstress
transformation matrix converting stress from global to local coordinate system
Definition: fcm.h:83
void setTempMaxCrackStrain(int icrack, double val)
sets value of the maximum crack strain for the i-th crack (temporary value)
Definition: fcm.h:114
void setTempCrackStrainVector(FloatArray a)
sets temporary vector of cracking strains (max 6 components)
Definition: fcm.h:134
Abstract base class representing a material status information.
Definition: matstatus.h:84
Class representing vector of real numbers.
Definition: floatarray.h:82
const IntArray & giveTempCrackStatus()
returns vector of temporary crack statuses
Definition: fcm.h:117
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
const FloatArray & giveCrackStrainVector() const
return equilibrated crack strain vector (max 6 components)
Definition: fcm.h:126
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
const FloatMatrix & giveL2GStrainVectorTransformationMtrx()
sets transformation matrix for stress transformation from global to local coordinate system ...
Definition: fcm.h:155
virtual const char * giveClassName() const
Definition: fcm.h:177
Class representing the general Input Record.
Definition: inputrecord.h:101
IntArray crackStatuses
crack statuses (none, just initialized, softenin, unlo-relo, closed)
Definition: fcm.h:72
void setL2GStressVectorTransformationMtrx(FloatMatrix t)
sets transformation matrix for stress transformation from local to global coordinate system ...
Definition: fcm.h:144
IsotropicLinearElasticMaterial * linearElasticMaterial
Definition: fcm.h:200
double giveMaxCrackStrain(int icrack)
returns maximum crack strain for the i-th crack (equilibrated value)
Definition: fcm.h:107
double giveCrackStrain(int icrack) const
returns i-th component of the crack strain vector (equilibrated)
Definition: fcm.h:130
virtual int giveMaxNumberOfCracks(GaussPoint *gp)
returns maximum number of cracks associated with current mode
Definition: fcm.C:1864
virtual void printOutputAt(FILE *file, TimeStep *tStep)
prints the output into the output file
Definition: fcm.C:1784
virtual const char * giveClassName() const
Definition: fcm.h:210
virtual void updateYourself(TimeStep *tStep)
replaces equilibrated values with temporary values
Definition: fcm.C:1906
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 crackStrainVector
Components of crack strain vector (normal as well as shear).
Definition: fcm.h:76
double giveTempMaxCrackStrain(int icrack)
returns maximum crack strain for the i-th crack (temporary value)
Definition: fcm.h:112
void setCharLength(int icrack, double val)
sets characteristic length for i-th crack
Definition: fcm.h:166
FloatMatrix transMatrix_G2Lstrain
transformation matrix converting strain from global to local coordinate system
Definition: fcm.h:85
FloatMatrix transMatrix_L2Gstrain
transformation matrix converting strain from local to global coordinate system
Definition: fcm.h:89
the oofem namespace is to define a context or scope in which all oofem names are defined.
void setCrackStrainVector(FloatArray a)
sets equilibrated vector of cracking strains (max 6 components)
Definition: fcm.h:138
double giveYoungsModulus()
Returns Young's modulus.
FCMMaterialStatus(int n, Domain *d, GaussPoint *g)
Definition: fcm.C:1722
int giveCrackStatus(int icrack) const
return equilibrated value of status associated with i-th crack direction
Definition: fcm.h:123
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
Definition: fcm.h:239
virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
Definition: fcm.h:243
IsotropicLinearElasticMaterial * giveLinearElasticMaterial()
Definition: fcm.h:216
virtual void giveRealStressVector_2dBeamLayer(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
Definition: fcm.h:247
FloatMatrix transMatrix_L2Gstress
transformation matrix converting stress from local to global coordinate system
Definition: fcm.h:87
virtual double computeOverallElasticShearModulus(void)
returns overall shear modulus
Definition: fcm.h:347
virtual ~FCMMaterialStatus()
Definition: fcm.C:1778

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:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011