OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
trabbone3d.h
Go to the documentation of this file.
1 /*
2  * ##### ##### ###### ###### ### ###
3  * ## ## ## ## ## ## ## ### ##
4  * ## ## ## ## #### #### ## # ##
5  * ## ## ## ## ## ## ## ##
6  * ## ## ## ## ## ## ## ##
7  * ##### ##### ## ###### ## ##
8  *
9  *
10  * OOFEM : Object Oriented Finite Element Code
11  *
12  * Copyright (C) 1993 - 2013 Borek Patzak
13  *
14  *
15  *
16  * Czech Technical University, Faculty of Civil Engineering,
17  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
18  *
19  * This library is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU Lesser General Public
21  * License as published by the Free Software Foundation; either
22  * version 2.1 of the License, or (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27  * Lesser General Public License for more details.
28  *
29  * You should have received a copy of the GNU Lesser General Public
30  * License along with this library; if not, write to the Free Software
31  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
32  */
33 
34 #ifndef trabbone3d_h
35 #define trabbone3d_h
36 
37 #include "../sm/Materials/structuralmaterial.h"
38 #include "floatarray.h"
39 #include "floatmatrix.h"
40 #include "cltypes.h"
41 #include "matconst.h"
42 #include "matstatus.h"
43 #include "../sm/Materials/structuralms.h"
44 #include "cltypes.h"
45 
47 
48 #define _IFT_TrabBone3D_Name "trabbone3d"
49 #define _IFT_TrabBone3D_eps0 "eps0"
50 #define _IFT_TrabBone3D_nu0 "nu0"
51 #define _IFT_TrabBone3D_mu0 "mu0"
52 #define _IFT_TrabBone3D_expk "expk"
53 #define _IFT_TrabBone3D_expl "expl"
54 
55 #define _IFT_TrabBone3D_m1 "m1"
56 #define _IFT_TrabBone3D_m2 "m2"
57 #define _IFT_TrabBone3D_rho "rho"
58 
59 #define _IFT_TrabBone3D_sig0Pos "sig0pos"
60 #define _IFT_TrabBone3D_sig0Neg "sig0neg"
61 #define _IFT_TrabBone3D_chi0Pos "chi0pos"
62 #define _IFT_TrabBone3D_chi0Neg "chi0neg"
63 #define _IFT_TrabBone3D_tau0 "tau0"
64 #define _IFT_TrabBone3D_expp "expp"
65 #define _IFT_TrabBone3D_expq "expq"
66 #define _IFT_TrabBone3D_plasHardFactor "plashardfactor"
67 #define _IFT_TrabBone3D_expPlasHard "expplashard"
68 
69 #define _IFT_TrabBone3D_expDam "expdam"
70 #define _IFT_TrabBone3D_critDam "critdam"
71 
72 #define _IFT_TrabBone3D_x1 "x1"
73 #define _IFT_TrabBone3D_x2 "x2"
74 #define _IFT_TrabBone3D_x3 "x3"
75 #define _IFT_TrabBone3D_y1 "y1"
76 #define _IFT_TrabBone3D_y2 "y2"
77 #define _IFT_TrabBone3D_y3 "y3"
78 
79 #define _IFT_TrabBone3D_viscosity "viscosity"
80 
81 
82 #define _IFT_TrabBone3D_gMin "gmin"
83 #define _IFT_TrabBone3D_gammaL "gammal"
84 #define _IFT_TrabBone3D_gammaP "gammap"
85 #define _IFT_TrabBone3D_tDens "tdens"
86 #define _IFT_TrabBone3D_densCrit "denscrit"
87 
88 #define _IFT_TrabBone3D_printflag "printflag"
89 #define _IFT_TrabBone3D_max_num_iter "max_num_iter"
90 #define _IFT_TrabBone3D_max_num_substeps "max_num_substeps"
91 #define _IFT_TrabBone3D_rel_yield_tol "rel_yield_tol"
92 #define _IFT_TrabBone3D_strain_tol "strain_tol"
93 
94 
95 namespace oofem {
102 {
103 protected:
107 
109  double densG;
110 
111 
112 public:
113  TrabBone3DStatus(int n, Domain *d, GaussPoint *g);
114 
115  virtual ~TrabBone3DStatus();
116 
117  virtual void printOutputAt(FILE *file, TimeStep *tStep);
118 
119  double giveKappa();
120  double giveTempKappa();
121  double giveDam();
122  double giveTempDam();
123  double giveTempPSED();
124  double giveTSED();
125  double giveTempTSED();
126  double giveBeta();
127  double giveDensG() { return densG; }
128 
129  const FloatArray &givePlasDef() const;
130  const FloatArray &giveTempPlasDef() const;
131  const FloatArray &giveTempEffectiveStress() const;
132  const FloatArray &givePlasFlowDirec() const;
133  const FloatMatrix &giveTangentMatrix() const;
134  const FloatMatrix &giveSmtrx() const;
135  const FloatMatrix &giveSSaTensor() const;
136 
137  void setTempKappa(double al) { tempKappa = al; }
138  void setKappa(double values) { kappa = values; }
139  void setTempDam(double da) { tempDam = da; }
140  void setTempPSED(double pse) { tempPSED = pse; }
141  void setTempTSED(double tse) { tempTSED = tse; }
142  void setBeta(double be) { beta = be; }
143  void setTempEffectiveStress(FloatArray &sc) { tempEffectiveStress = sc; }
144  void setTempPlasDef(FloatArray &epsip) { tempPlasDef = epsip; }
145  void setPlasFlowDirec(FloatArray &pfd) { plasFlowDirec = pfd; }
146  void setSmtrx(FloatMatrix &smt) { smtrx = smt; }
147  void setTangentMatrix(FloatMatrix &tmm) { tangentMatrix = tmm; }
148  void setSSaTensor(FloatMatrix &ssa) { SSaTensor = ssa; }
149 
150  void setDensG(double g) { densG = g; }
151 
152  virtual const char *giveClassName() const { return "TrabBone3DStatus"; }
153 
154  virtual void initTempStatus();
155  virtual void updateYourself(TimeStep *);
156 
157  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
158  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
159 };
160 
161 
165 
166 
168 {
169 protected:
170  double m1, m2, rho, eps0, nu0, mu0, expk, expl, sig0Pos, sig0Neg, chi0Pos, chi0, chi0Neg, tau0, expq, expp;
171  double plasHardFactor, expPlasHard, expDam, critDam;
172  int printflag, max_num_iter;
173  double rel_yield_tol, strain_tol;
175  double x1, x2, x3, y1, y2, y3, z1, z2, z3;
177  double gammaL0, gammaP0, tDens, densCrit, rL, rP, gammaL, gammaP;
179  double viscosity;
180 
181 public:
182  TrabBone3D(int n, Domain *d);
183 
184  bool isCharacteristicMtrxSymmetric(MatResponseMode rMode) { return false; }
185  double evaluateCurrentYieldStress(const double kappa);
186  double evaluateCurrentPlasticModulus(const double kappa);
187  double evaluateCurrentViscousStress(const double deltaKappa, TimeStep *tStep);
188  double evaluateCurrentViscousModulus(const double deltaKappa, TimeStep *tStep);
189 
190  bool projectOnYieldSurface(double &tempKappa, FloatArray &tempEffectiveStress, FloatArray &tempPlasDef, const FloatArray &trialEffectiveStress, const FloatMatrix &elasticity, const FloatMatrix &compliance, TrabBone3DStatus *status, TimeStep *tStep, GaussPoint *gp, int lineSearchFlag);
191 
192  void performPlasticityReturn(GaussPoint *gp, const FloatArray &totalStrain, TimeStep *tStep);
193 
194  void constructPlasFlowDirec(FloatArray &answer, double &norm, FloatMatrix &fabric, FloatArray &F, FloatArray &S);
195  void constructDerivativeOfPlasFlowDirec(FloatMatrix &answer, FloatMatrix &fabric, FloatArray &F, FloatArray &S);
196  double evaluatePlasCriterion(FloatMatrix &fabric, FloatArray &F, FloatArray &stress, double kappa, double deltaKappa, TimeStep *tStep);
197 
198  double computeDamageParam(double kappa);
199  double computeDamageParamPrime(double kappa);
200 
201  double computeDamage(GaussPoint *gp, TimeStep *tStep);
202 
203  virtual void computeCumPlastStrain(double &kappa, GaussPoint *gp, TimeStep *tStep);
204 
205  void computePlasStrainEnerDensity(GaussPoint *gp, const FloatArray &totalStrain, const FloatArray &totalStress);
206 
207  void computeDensificationStress(FloatArray &answer, GaussPoint *gp, const FloatArray &totalStrain, TimeStep *tStep);
208 
210  void constructAnisoComplTensor(FloatMatrix &answer);
212  void constructAnisoStiffnessTensor(FloatMatrix &answer);
213 
215  void constructAnisoFabricTensor(FloatMatrix &answer);
216  void constructAnisoFtensor(FloatArray &answer);
217 
218  void constructStiffnessTransformationMatrix(FloatMatrix &answer);
219  void constructFabricTransformationMatrix(FloatMatrix &answer);
221  void constructNormAdjustTensor(FloatMatrix &answer);
222 
223 
224  virtual void give3dMaterialStiffnessMatrix(FloatMatrix & answer,
226  TimeStep * tStep);
227 
228  virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *,
229  const FloatArray &, TimeStep *);
230 
231  virtual const char *giveInputRecordName() const { return _IFT_TrabBone3D_Name; }
232  virtual const char *giveClassName() const { return "TrabBone3D"; }
233 
235 
236  virtual MaterialStatus *CreateStatus(GaussPoint *gp) const;
237 
238  virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep);
239 
240  virtual double predictRelativeComputationalCost(GaussPoint *gp);
241  virtual double predictRelativeRedistributionCost(GaussPoint *gp);
242 };
243 } //end namespace oofem
244 #endif
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
TrabBone3DStatus(int n, Domain *d, GaussPoint *g)
Definition: trabbone3d.C:1118
GaussPoint * gp
Associated integration point.
Class and object Domain.
Definition: domain.h:115
void setTangentMatrix(FloatMatrix &tmm)
Definition: trabbone3d.h:147
const FloatArray & giveTempEffectiveStress() const
Definition: trabbone3d.C:1193
void setTempPSED(double pse)
Definition: trabbone3d.h:140
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
Defines several material constant (respective their representative number).
This class implements a structural material status information.
Definition: structuralms.h:65
void setTempKappa(double al)
Definition: trabbone3d.h:137
#define S(p)
Definition: mdm.C:481
virtual const char * giveClassName() const
Definition: trabbone3d.h:152
MatResponseMode
Describes the character of characteristic material matrix.
FloatArray plasFlowDirec
Definition: trabbone3d.h:105
void setSSaTensor(FloatMatrix &ssa)
Definition: trabbone3d.h:148
void setBeta(double be)
Definition: trabbone3d.h:142
#define _IFT_TrabBone3D_Name
Definition: trabbone3d.h:48
void setTempTSED(double tse)
Definition: trabbone3d.h:141
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: trabbone3d.C:1312
bool isCharacteristicMtrxSymmetric(MatResponseMode rMode)
Returns true if stiffness matrix of receiver is symmetric Default implementation returns true...
Definition: trabbone3d.h:184
void setSmtrx(FloatMatrix &smt)
Definition: trabbone3d.h:146
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: matstatus.h:140
const FloatMatrix & giveTangentMatrix() const
const FloatArray & giveTempPlasDef() const
Definition: trabbone3d.C:1211
void setPlasFlowDirec(FloatArray &pfd)
Definition: trabbone3d.h:145
double plasHardFactor
Definition: trabbone3d.h:171
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: trabbone3d.C:1258
virtual const char * giveInputRecordName() const
Definition: trabbone3d.h:231
virtual void updateYourself(TimeStep *)
Update equilibrium history variables according to temp-variables.
Definition: trabbone3d.C:1247
void setTempDam(double da)
Definition: trabbone3d.h:139
Abstract base class representing a material status information.
Definition: matstatus.h:84
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual const char * giveClassName() const
Definition: trabbone3d.h:232
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
Definition: trabbone3d.C:1224
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
const FloatArray & givePlasFlowDirec() const
Definition: trabbone3d.C:1199
const FloatArray & givePlasDef() const
Definition: trabbone3d.C:1205
void setTempPlasDef(FloatArray &epsip)
Definition: trabbone3d.h:144
double norm(const FloatArray &x)
Definition: floatarray.C:985
const FloatMatrix & giveSSaTensor() const
Definition: trabbone3d.C:1217
void setTempEffectiveStress(FloatArray &sc)
Definition: trabbone3d.h:143
Class representing the general Input Record.
Definition: inputrecord.h:101
const FloatMatrix & giveSmtrx() const
void setKappa(double values)
Definition: trabbone3d.h:138
FloatMatrix tangentMatrix
Definition: trabbone3d.h:106
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.
This class implements associated Material Status to TrabBone3D (trabecular bone material).
Definition: trabbone3d.h:101
double densG
Densificator criterion.
Definition: trabbone3d.h:109
double viscosity
Viscosity parameter.
Definition: trabbone3d.h:179
the oofem namespace is to define a context or scope in which all oofem names are defined.
FloatArray tempEffectiveStress
Definition: trabbone3d.h:105
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
void setDensG(double g)
Definition: trabbone3d.h:150
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: trabbone3d.C:1235
FloatArray effectiveStress
Definition: trabbone3d.h:105

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