OOFEM 3.0
Loading...
Searching...
No Matches
anisodamagemodel.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 - 2025 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 program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2 of the License, or
23 * (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
28 * GNU General Public License for more details.
29 *
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 */
34
35#ifndef anisodamagemodel_h
36#define anisodamagemodel_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"
48
50
51// @todo add input parametres which are read from input file here
52#define _IFT_AnisotropicDamageMaterial_Name "adm"
53#define _IFT_AnisotropicDamageMaterial_equivStrainType "equivstraintype"
54#define _IFT_AnisotropicDamageMaterial_damageLawType "damlaw"
55#define _IFT_AnisotropicDamageMaterial_kappa0 "kappa0"
56#define _IFT_AnisotropicDamageMaterial_kappaf "kappaf"
57#define _IFT_AnisotropicDamageMaterial_aA "aa"
59
60namespace oofem {
61class GaussPoint;
62
68{
69protected:
71 double kappa = 0.;
73 double tempKappa = 0.;
79 double strainZ = 0.;
81 double tempStrainZ = 0.;
83 int flag = 0;
84 int tempFlag = 0;
85 double storedFactor = 1.;
86 double tempStoredFactor = 1.;
87
88#ifdef keep_track_of_dissipated_energy
90 double stressWork = 0.;
92 double tempStressWork = 0.;
94 double dissWork = 0.;
96 double tempDissWork = 0.;
97#endif
98
99public:
102
103 void printOutputAt(FILE *file, TimeStep *tStep) const override;
104
106 double giveKappa() { return kappa; }
108 double giveTempKappa() { return tempKappa; }
110 void setTempKappa(double newKappa) { tempKappa = newKappa; }
112 const FloatMatrix &giveDamage() { return damage; }
116 void setTempDamage(const FloatMatrix &d) { tempDamage = d; }
118 double giveStrainZ() { return strainZ; }
120 double giveTempStrainZ() { return tempStrainZ; }
122 void setTempStrainZ(double newStrainZ) { tempStrainZ = newStrainZ; }
124 int giveFlag() { return flag; }
126 void setTempFlag(int newflag) { tempFlag = newflag; }
128 int giveTempFlag() { return tempFlag; }
130 double giveStoredFactor() { return storedFactor; }
132 void setStoredFactor(double newStoredFactor) { storedFactor = newStoredFactor; }
136 void setTempStoredFactor(double newTempStoredFactor) { tempStoredFactor = newTempStoredFactor; }
137
138
139
140#ifdef keep_track_of_dissipated_energy
142 double giveStressWork() { return stressWork; }
146 void setTempStressWork(double w) { tempStressWork = w; }
148 double giveDissWork() { return dissWork; }
150 double giveTempDissWork() { return tempDissWork; }
152 void setTempDissWork(double w) { tempDissWork = w; }
155#endif
156
157 // definition
158 const char *giveClassName() const override { return "AnisotropicDamageMaterialModelStatus"; }
159
160 void initTempStatus() override;
161 void updateYourself(TimeStep *tStep) override;
162
163 void saveContext(DataStream &stream, ContextMode mode) override;
164 void restoreContext(DataStream &stream, ContextMode mode) override;
165};
166
167
178{
179protected:
183 double E = 0.;
185 double nu = 0.;
187 double kappa0 = 0.;
189 double kappaf = 0.;
191 double aA = 0.;
200
201public:
204
205 bool hasMaterialModeCapability(MaterialMode mode) const override;
206
207 const char *giveClassName() const override { return "AnisotropicDamageMaterial"; }
208 const char *giveInputRecordName() const override { return _IFT_AnisotropicDamageMaterial_Name; }
209
211 FloatArrayF<3> giveRealStressVector_PlaneStress(const FloatArrayF<3> &reducedE, GaussPoint *gp, TimeStep *tStep) const override;
212
213 void computePrincValDir2D(double &D1, double &D2, double &c, double &s, double Dx, double Dy, double Dxy) const;
214 bool checkPrincVal2D(double Dx, double Dy, double Dxy) const;
215 void computeDamage(FloatMatrix &tempDamage, const FloatMatrix &damage, double kappa, double eps1, double eps2, double ceps, double seps, double epsZ) const;
216 double computeTraceD(double equivStrain) const;
217 double computeOutOfPlaneStrain(const FloatArray &inplaneStrain, const FloatMatrix &dam, bool tens_flag) const;
218 double computeDimensionlessOutOfPlaneStress(const FloatArray &inplaneStrain, double epsZ, const FloatMatrix &dam) const;
219 void computeInplaneStress(FloatArray &inplaneStress, const FloatArray &inplaneStrain, double epsZ, const FloatMatrix &dam) const;
220
222 double obtainAlpha1(FloatMatrix tempDamageTensor, double deltaLambda, FloatMatrix positiveStrainTensor, double damageThreshold) const;
224 double obtainAlpha2(FloatMatrix tempDamageTensor, double deltaLambda, FloatMatrix positiveStrainTensor, FloatMatrix ProjMatrix, double damageThreshold) const;
226 double obtainAlpha3(FloatMatrix tempDamageTensor, double deltaLambda, FloatMatrix positiveStrainTensor, FloatArray vec3, double damageThreshold) const;
227
228 double checkSymmetry(FloatMatrix matrix) const;
229
230 void correctBigValues(FloatMatrix &matrix) const;
231
232 double computeTraceD(FloatMatrix tempDamageTensor, FloatMatrix strainTensor, GaussPoint *gp) const;
233
234 double computeCorrectionFactor(FloatMatrix tempDamageTensor, FloatMatrix strainTensor, GaussPoint *gp) const;
235
236 FloatMatrixF<6,6> give3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override;
237
239 const FloatArray &reducedStrain, TimeStep *tStep) const override;
240
242 {
243 FloatArray answer;
244 const_cast<AnisotropicDamageMaterial*>(this)->giveRealStressVector(answer, gp, strain, tStep);
245 return answer;
246 }
248 {
249 FloatArray answer;
250 const_cast<AnisotropicDamageMaterial*>(this)->giveRealStressVector(answer, gp, strain, tStep);
251 return answer;
252 }
253 FloatArray giveRealStressVector_StressControl(const FloatArray &strain, const IntArray &strainControl, GaussPoint *gp, TimeStep *tStep) const override
254 {
255 FloatArray answer;
256 const_cast<AnisotropicDamageMaterial*>(this)->giveRealStressVector(answer, gp, strain, tStep);
257 return answer;
258 }
260 {
261 FloatArray answer;
262 const_cast<AnisotropicDamageMaterial*>(this)->giveRealStressVector(answer, gp, strain, tStep);
263 return answer;
264 }
265
266 int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *atTime) override;
267
268 //InternalStateValueType giveIPValueType(InternalStateType type) override;
269 //FloatArrayF<6> giveThermalDilatationVector(GaussPoint *, TimeStep *) const override;
270
278 void computeEquivalentStrain(double &kappa, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) const;
279
280 void initializeFrom(InputRecord &ir) override;
281 void giveInputRecord(DynamicInputRecord &input) override;
282 void computeDamageTensor(FloatMatrix &answer, GaussPoint *gp, const FloatArray &totalStrain, double equivStrain, TimeStep *atTime) const;
283
284 std::unique_ptr<MaterialStatus> CreateStatus(GaussPoint *gp) const override { return std::make_unique<AnisotropicDamageMaterialStatus>(gp); }
285
286protected:
287
288 FloatMatrixF<3,3> givePlaneStressStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override;
289
290 FloatMatrixF<1,1> give1dStressStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override;
291 void computePlaneStressStrain(FloatMatrix &answer, FloatMatrix damageTensor, FloatArray totalStrain, GaussPoint *gp,
292 TimeStep *atTime) const;
293 void computePlaneStressSigmaZ(double &answer, FloatMatrix damageTensor, FloatArray reducedTotalStrainVector,
294 double epsZ, GaussPoint *gp, TimeStep *atTime) const;
295
296#if 0
298 const FloatArray &totalStrain, double equivStrain,
299 TimeStep *atTime) override;
300#endif
301
302 virtual void computeSecantOperator(FloatMatrix &answer, FloatMatrix strainTensor,
303 FloatMatrix damageTensor, GaussPoint *gp) const;
304
305 double computeK(GaussPoint *gp);
306
307 double computeKappa(FloatMatrix damageTensor) const;
308};
309} // end namespace oofem
310#endif // anisodamagemodel_h
#define _IFT_AnisotropicDamageMaterial_Name
double tempStrainZ
Non-equilibrated out-of-plane value for 2dPlaneStress mode.
double giveTempStressWork()
Returns the temp density of total work of stress on strain increments.
double giveStoredFactor()
Returns the last Stored Factor.
double strainZ
Out-of-plane value for 2dPlaneStress mode.
double giveStressWork()
Returns the density of total work of stress on strain increments.
void setTempDamage(const FloatMatrix &d)
Assigns temp. damage tensor to given tensor d.
double giveStrainZ()
Returns the last equilibrated scalar measure of the out-of-plane strain to given value (for 2dPlaneSt...
AnisotropicDamageMaterialStatus(GaussPoint *g)
Constructor.
double giveTempStoredFactor()
Returns the last Temp Stored Factor.
double giveDissWork()
Returns the density of dissipated work.
void setTempFlag(int newflag)
Sets the value of the temporary value of flag.
double giveTempStrainZ()
Returns the temp scalar measure of the out-of-plane strain to given value (for 2dPlaneStress mode).
void restoreContext(DataStream &stream, ContextMode mode) override
int giveFlag()
Returns the value of the flag.
double kappa
Scalar measure of the largest strain level ever reached in material.
void saveContext(DataStream &stream, ContextMode mode) override
int giveTempFlag()
Returns the value of the temporary value of flag.
FloatMatrix tempDamage
Non-equilibrated second order damage tensor.
void printOutputAt(FILE *file, TimeStep *tStep) const override
Print receiver's output to given stream.
FloatMatrix damage
Second order damage tensor.
void setTempStoredFactor(double newTempStoredFactor)
Sets the Temp Stored Factor to given value .
double tempStressWork
Non-equilibrated density of total work done by stresses on strain increments.
double dissWork
Density of dissipated work.
void updateYourself(TimeStep *tStep) override
void setTempKappa(double newKappa)
Sets the temp scalar measure of the largest strain level to given value.
const char * giveClassName() const override
void computeWork(GaussPoint *gp)
Computes the increment of total stress work and of dissipated work.
int flag
This flag turns into 1 and remains 1 when the trace of the damage tensor is >1 in compression (tr(str...
void setTempDissWork(double w)
Sets the density of dissipated work to given value.
double tempKappa
Non-equilibrated scalar measure of the largest strain level.
double giveTempDissWork()
Returns the density of temp dissipated work.
const FloatMatrix & giveTempDamage()
Returns the temp. second order damage tensor.
double tempDissWork
Non-equilibrated density of dissipated work.
double stressWork
Density of total work done by stresses on strain increments.
void setStoredFactor(double newStoredFactor)
Sets the Stored Factor to given value .
double giveTempKappa()
Returns the temp. scalar measure of the largest strain level.
void setTempStrainZ(double newStrainZ)
Sets the temp scalar measure of the out-of-plane strain to given value (for 2dPlaneStress mode).
double giveKappa()
Returns the last equilibrated scalar measure of the largest strain level.
void setTempStressWork(double w)
Sets the density of total work of stress on strain increments to given value.
const FloatMatrix & giveDamage()
Returns the last equilibrated second order damage tensor.
FloatMatrixF< 1, 1 > give1dStressStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override
IsotropicLinearElasticMaterial linearElasticMaterial
Reference to bulk (undamaged) material.
const char * giveClassName() const override
void computePlaneStressSigmaZ(double &answer, FloatMatrix damageTensor, FloatArray reducedTotalStrainVector, double epsZ, GaussPoint *gp, TimeStep *atTime) const
void computeDamage(FloatMatrix &tempDamage, const FloatMatrix &damage, double kappa, double eps1, double eps2, double ceps, double seps, double epsZ) const
double computeTraceD(double equivStrain) const
FloatArrayF< 6 > giveRealStressVector_3d(const FloatArrayF< 6 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
EquivStrainType
Type characterizing the algorithm used to compute equivalent strain measure.
DamLawType
Type characterizing the damage law.
double obtainAlpha2(FloatMatrix tempDamageTensor, double deltaLambda, FloatMatrix positiveStrainTensor, FloatMatrix ProjMatrix, double damageThreshold) const
Obtains the proportion of the damage tensor that is needed to get the second eigenvalue equal to the ...
const char * giveInputRecordName() const override
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *atTime) override
FloatMatrixF< 6, 6 > give3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
void initializeFrom(InputRecord &ir) override
double computeKappa(FloatMatrix damageTensor) const
FloatMatrixF< 3, 3 > givePlaneStressStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override
AnisotropicDamageMaterial(int n, Domain *d)
Constructor.
FloatArrayF< 3 > giveRealStressVector_PlaneStress(const FloatArrayF< 3 > &reducedE, GaussPoint *gp, TimeStep *tStep) const override
Plane-stress version of the stress evaluation algorithm.
FloatArrayF< 1 > giveRealStressVector_1d(const FloatArrayF< 1 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector_StressControl.
double computeDimensionlessOutOfPlaneStress(const FloatArray &inplaneStrain, double epsZ, const FloatMatrix &dam) const
void giveInputRecord(DynamicInputRecord &input) override
double kappa0
Damage threshold kappa0, as defined in the paper mentioned above.
bool checkPrincVal2D(double Dx, double Dy, double Dxy) const
bool hasMaterialModeCapability(MaterialMode mode) const override
void computeEquivalentStrain(double &kappa, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) const
void giveRealStressVector(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep) const override
double computeCorrectionFactor(FloatMatrix tempDamageTensor, FloatMatrix strainTensor, GaussPoint *gp) const
double checkSymmetry(FloatMatrix matrix) const
double aA
Damage parameter a*A, needed to obtain Kappa(trD), according to eq. 33 in the paper mentioned above.
double computeK(GaussPoint *gp)
std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const override
double obtainAlpha3(FloatMatrix tempDamageTensor, double deltaLambda, FloatMatrix positiveStrainTensor, FloatArray vec3, double damageThreshold) const
Obtains the proportion of the damage tensor that is needed to get the third eigenvalue equal to the d...
FloatArrayF< 4 > giveRealStressVector_PlaneStrain(const FloatArrayF< 4 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector_3d.
DamLawType damageLawType
Parameter specifying the damage law.
void correctBigValues(FloatMatrix &matrix) const
double kappaf
Damage parameter kappa_f (in the paper denoted as "a").
void computeDamageTensor(FloatMatrix &answer, GaussPoint *gp, const FloatArray &totalStrain, double equivStrain, TimeStep *atTime) const
void computeInplaneStress(FloatArray &inplaneStress, const FloatArray &inplaneStrain, double epsZ, const FloatMatrix &dam) const
double obtainAlpha1(FloatMatrix tempDamageTensor, double deltaLambda, FloatMatrix positiveStrainTensor, double damageThreshold) const
Obtains the proportion of the damage tensor that is needed to get the first eigenvalue equal to the d...
FloatArray giveRealStressVector_StressControl(const FloatArray &strain, const IntArray &strainControl, GaussPoint *gp, TimeStep *tStep) const override
Iteratively calls giveRealStressVector_3d to find the stress controlled equal to zero·
void computePrincValDir2D(double &D1, double &D2, double &c, double &s, double Dx, double Dy, double Dxy) const
void computePlaneStressStrain(FloatMatrix &answer, FloatMatrix damageTensor, FloatArray totalStrain, GaussPoint *gp, TimeStep *atTime) const
EquivStrainType equivStrainType
Parameter specifying the definition of equivalent strain.
virtual void computeSecantOperator(FloatMatrix &answer, FloatMatrix strainTensor, FloatMatrix damageTensor, GaussPoint *gp) const
double computeOutOfPlaneStrain(const FloatArray &inplaneStrain, const FloatMatrix &dam, bool tens_flag) const
GaussPoint * gp
Associated integration point.
StructuralMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralMaterialStatus with IntegrationPoint g.
StructuralMaterial(int n, Domain *d)
long ContextMode
Definition contextmode.h:43

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011