OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
isodamagemodel.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 isodamagemodel_h
36 #define isodamagemodel_h
37 
38 // this turns on or off a bunch of internal variables
39 // that allow tracing the distribution of dissipated energy
40 // (can be turned off if such information is not needed)
41 #define keep_track_of_dissipated_energy
42 
43 #include "material.h"
45 #include "../sm/Materials/structuralmaterial.h"
46 #include "../sm/Materials/structuralms.h"
47 
49 
50 #define _IFT_IsotropicDamageMaterial_talpha "talpha"
51 #define _IFT_IsotropicDamageMaterial_maxOmega "maxomega"
52 #define _IFT_IsotropicDamageMaterial_permstrain "ps"
53 
54 
55 namespace oofem {
56 class GaussPoint;
57 
63 {
64 protected:
66  double kappa;
68  double tempKappa;
70  double damage;
72  double tempDamage;
78  double le;
80  double crack_angle;
83 
84 #ifdef keep_track_of_dissipated_energy
85  double stressWork;
90  double dissWork;
92  double tempDissWork;
93 #endif
94 
95 public:
100 
101  virtual void printOutputAt(FILE *file, TimeStep *tStep);
102 
104  double giveKappa() { return kappa; }
106  double giveTempKappa() { return tempKappa; }
108  void setTempKappa(double newKappa) { tempKappa = newKappa; }
110  double giveDamage() { return damage; }
112  double giveTempDamage() { return tempDamage; }
114  void setTempDamage(double newDamage) { tempDamage = newDamage; }
115 
117  double giveLe() { return le; }
119  void setLe(double ls) { le = ls; }
121  double giveCrackAngle() { return crack_angle; }
123  void setCrackAngle(double ca) { crack_angle = ca; }
125  void giveCrackVector(FloatArray &answer);
127  void setCrackVector(FloatArray cv) { crackVector = cv; }
128 
129 #ifdef keep_track_of_dissipated_energy
130  double giveStressWork() { return stressWork; }
133  double giveTempStressWork() { return tempStressWork; }
135  void setTempStressWork(double w) { tempStressWork = w; }
137  double giveDissWork() { return dissWork; }
139  double giveTempDissWork() { return tempDissWork; }
141  void setTempDissWork(double w) { tempDissWork = w; }
143  void computeWork(GaussPoint *gp);
144 #endif
145 
146  // definition
147  virtual const char *giveClassName() const { return "IsotropicDamageMaterialModelStatus"; }
148 
149  virtual void initTempStatus();
150  virtual void updateYourself(TimeStep *tStep);
151 
152  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
153  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
154 };
155 
156 
164 {
165 protected:
168 
170  double maxOmega;
171 
174 
183  enum loaUnloCriterium { idm_strainLevelCR, idm_damageLevelCR } llcriteria;
184 
185 public:
187  IsotropicDamageMaterial(int n, Domain *d);
189  virtual ~IsotropicDamageMaterial();
190 
191  virtual int hasNonLinearBehaviour() { return 1; }
192 
193  virtual int hasMaterialModeCapability(MaterialMode mode);
194  virtual const char *giveClassName() const { return "IsotropicDamageMaterial"; }
195 
197  LinearElasticMaterial *giveLinearElasticMaterial() { return linearElasticMaterial; }
198 
199  virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer,
200  MatResponseMode mode,
201  GaussPoint *gp,
202  TimeStep *tStep);
203 
204  virtual void giveRealStressVector(FloatArray &answer, GaussPoint *gp,
205  const FloatArray &reducedStrain, TimeStep *tStep);
206 
207  virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
208  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
209  virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
210  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
211  virtual void giveRealStressVector_StressControl(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, const IntArray &strainControl, TimeStep *tStep)
212  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
213  virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
214  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
215  virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
216  { this->giveRealStressVector(answer, gp, reducedE, tStep); }
217 
218  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
219 
220  virtual void giveThermalDilatationVector(FloatArray &answer, GaussPoint *, TimeStep *);
221  virtual double evaluatePermanentStrain(double kappa, double omega) { return 0.; }
222 
231  virtual double give(int aProperty, GaussPoint *gp);
239  virtual void computeEquivalentStrain(double &kappa, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) = 0;
246  virtual void computeEta(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) { OOFEM_ERROR("not implemented"); }
254  virtual void computeDamageParam(double &omega, double kappa, const FloatArray &strain, GaussPoint *gp) = 0;
255 
257  virtual void giveInputRecord(DynamicInputRecord &input);
258 
260 
261 protected:
268  virtual void initDamaged(double kappa, FloatArray &totalStrainVector, GaussPoint *gp) { }
269 
278  virtual double damageFunctionPrime(double kappa, GaussPoint *gp) {
279  OOFEM_ERROR("not implemented");
280  return 0;
281  }
282 
283  virtual void givePlaneStressStiffMtrx(FloatMatrix &answer, MatResponseMode mmode,
284  GaussPoint *gp,
285  TimeStep *tStep);
286 
287  virtual void givePlaneStrainStiffMtrx(FloatMatrix &answer, MatResponseMode mmode,
288  GaussPoint *gp,
289  TimeStep *tStep);
290 
291  virtual void give1dStressStiffMtrx(FloatMatrix &answer, MatResponseMode mmode,
292  GaussPoint *gp,
293  TimeStep *tStep);
294 };
295 } // end namespace oofem
296 #endif // isodamagemodel_h
virtual void computeEta(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Computes derivative of the equivalent strain with regards to strain.
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
double giveDamage()
Returns the last equilibrated damage level.
double le
Characteristic element length, computed when damage initialized from direction of maximum positive pr...
Base class representing general isotropic damage model.
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
loaUnloCriterium
Variable controlling type of loading/unloading law, default set to idm_strainLevel defines the two tw...
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
double tempDillatCoeff
Coefficient of thermal dilatation.
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Definition: femcmpnn.h:82
double kappa
Scalar measure of the largest strain level ever reached in material.
double tempDamage
Non-equilibrated damage level of material.
virtual int hasNonLinearBehaviour()
Returns nonzero if receiver is non linear.
virtual double evaluatePermanentStrain(double kappa, double omega)
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
void setTempStressWork(double w)
Sets the density of total work of stress on strain increments to given value.
double damage
Damage level of material.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual ~IsotropicDamageMaterialStatus()
Destructor.
double tempStressWork
Non-equilibrated density of total work done by stresses on strain increments.
This class implements a structural material status information.
Definition: structuralms.h:65
virtual void giveRealStressVector_StressControl(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, const IntArray &strainControl, TimeStep *tStep)
Iteratively calls giveRealStressVector_3d to find the stress controlled equal to zero· ...
void setLe(double ls)
Sets characteristic length to given value.
double giveStressWork()
Returns the density of total work of stress on strain increments.
virtual double damageFunctionPrime(double kappa, GaussPoint *gp)
Returns the value of derivative of damage function wrt damage-driving variable kappa corresponding to...
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: femcmpnn.C:77
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
This class is a abstract base class for all linear elastic material models in a finite element proble...
void computeWork(GaussPoint *gp)
Computes the increment of total stress work and of dissipated work.
void giveCrackVector(FloatArray &answer)
Returns crack vector stored in receiver. This is useful for plotting cracks as a vector field (paravi...
double giveLe()
Returns characteristic length stored in receiver.
virtual const char * giveClassName() const
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: matstatus.h:140
void setTempDamage(double newDamage)
Sets the temp damage level to given value.
double stressWork
Density of total work done by stresses on strain increments.
double maxOmega
Maximum limit on omega. The purpose is elimination of a too compliant material which may cause conver...
void setCrackAngle(double ca)
Sets crack angle to given value.
#define OOFEM_ERROR(...)
Definition: error.h:61
double giveKappa()
Returns the last equilibrated scalar measure of the largest strain level.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
virtual void giveRealStressVector_PlaneStrain(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_3d.
double giveTempStressWork()
Returns the temp density of total work of stress on strain increments.
LinearElasticMaterial * giveLinearElasticMaterial()
Returns reference to undamaged (bulk) material.
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
Abstract base class representing a material status information.
Definition: matstatus.h:84
double giveTempKappa()
Returns the temp. scalar measure of the largest strain level.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
double tempDissWork
Non-equilibrated density of dissipated work.
Class representing vector of real numbers.
Definition: floatarray.h:82
IsotropicDamageMaterialStatus(int n, Domain *d, GaussPoint *g)
Constructor.
virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
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
int permStrain
Indicator of the type of permanent strain formulation (0 = standard damage with no permanent strain) ...
double giveCrackAngle()
Returns crack angle stored in receiver.
double giveDissWork()
Returns the density of dissipated work.
double giveTempDamage()
Returns the temp. damage level.
double tempKappa
Non-equilibrated scalar measure of the largest strain level.
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual void initDamaged(double kappa, FloatArray &totalStrainVector, GaussPoint *gp)
Abstract service allowing to perform some initialization, when damage first appear.
Class representing the a dynamic Input Record.
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.
the oofem namespace is to define a context or scope in which all oofem names are defined.
double giveTempDissWork()
Returns the density of temp dissipated work.
double crack_angle
Angle characterizing the crack direction.
void setTempKappa(double newKappa)
Sets the temp scalar measure of the largest strain level to given value.
This class implements associated Material Status to IsotropicDamageMaterial.
virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedE, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
double dissWork
Density of dissipated work.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
FloatArray crackVector
Crack orientation normalized to damage magnitude. This is useful for plotting cracks as a vector fiel...
Class representing solution step.
Definition: timestep.h:80
void setTempDissWork(double w)
Sets the density of dissipated work to given value.
virtual const char * giveClassName() const
LinearElasticMaterial * linearElasticMaterial
Reference to bulk (undamaged) material.
void setCrackVector(FloatArray cv)
Sets crack vector to given value. This is useful for plotting cracks as a vector field (paraview etc...

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