OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
m4.C
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 #include "m4.h"
36 #include "microplane.h"
37 #include "floatmatrix.h"
38 #include "floatarray.h"
39 #include "mathfem.h"
40 #include "classfactory.h"
41 
42 namespace oofem {
43 REGISTER_Material(M4Material);
44 
47 { }
48 
49 
50 inline double
51 M4Material :: macbra(double x) /* Macauley bracket = positive part of x */
52 {
53  return ( max(x, 0.0) );
54 }
55 
56 inline double
57 M4Material :: FVplus(double ev, double k1, double c13, double c14, double c15, double Ev)
58 /*positive volumetric boundary */
59 {
60  return ( Ev * k1 * c13 / ( 1 + ( c14 / k1 ) * macbra(ev - c13 * c15 * k1) ) );
61 }
62 
63 inline double
64 M4Material :: FVminus(double ev, double k1, double k3, double k4, double E)
65 /*negative volumetric boundary */
66 {
67  return ( -E * k1 * k3 * exp( -ev / ( k1 * k4 ) ) );
68 }
69 
70 
71 inline double
72 M4Material :: FDminus(double ed, double k1, double c7, double c8, double c9,
73  double E)
74 /*negative deviatoric boundary */
75 {
76  double a;
77  a = macbra(-ed - c8 * c9 * k1) / ( k1 * c7 );
78  return ( -E * k1 * c8 / ( 1 + a * a ) );
79 }
80 
81 inline double
82 M4Material :: FDplus(double ed, double k1, double c5, double c6, double c7, double c20,
83  double E)
84 /*positive deviatoric bondary */
85 {
86  double a;
87  a = ( macbra(ed - c5 * c6 * k1) / ( k1 * c20 * c7 ) );
88  return ( E * k1 * c5 / ( 1 + a * a ) );
89 }
90 
91 inline double
92 M4Material :: FN(double en, double sv, double k1, double c1, double c2, double c3, double c4,
93  double E, double Ev)
94 /*normal boundary */
95 {
96  return ( E * k1 * c1 * exp( -macbra(en - c1 * c2 * k1) / ( k1 * c3 + macbra( -c4 * ( sv / Ev ) ) ) ) );
97 }
98 
99 inline double
100 M4Material :: FT(double sn, double ev, double k1, double k2, double c10,
101  double c11, double c12, double Et)
102 /*shear boundary */
103 {
104  double a, sn0;
105  //oprava sn0 fabs<=>macbra
106  sn0 = Et * k1 * c11 / ( 1 + c12 * macbra(ev) );
107  a = macbra(-sn + sn0);
108  return ( Et * k1 * k2 * c10 * a / ( Et * k1 * k2 + c10 * a ) );
109 }
110 
111 
112 void
114  Microplane *mplane,
115  const FloatArray &strain,
116  TimeStep *tStep)
117 {
118  M4MaterialStatus *status = static_cast< M4MaterialStatus * >( this->giveMicroplaneStatus(mplane) );
119  FloatArray previousStress;
120  FloatArray strainIncrement;
121  double EpsN, DEpsN, DEpsL, DEpsM;
122  double EpsV, DEpsV;
123  double SEV, SVdash, EpsD, DEpsD, SED, SEM, SEL, SD;
124  double SNdash, F;
125  double CV, CD;
126 
127 
128  // size answer
129  answer.resize(4);
130  answer.zero();
131 
132  // ask status for tempVH parameter
133  previousStress = status->giveStressVector();
134  strainIncrement.beDifferenceOf( strain, status->giveStrainVector() );
135  if ( !previousStress.isNotEmpty() ) {
136  previousStress.resize(4);
137  previousStress.zero();
138  }
139 
140  EpsV = strain.at(1);
141  EpsN = strain.at(2);
142  DEpsV = strainIncrement.at(1);
143  DEpsN = strainIncrement.at(2);
144  DEpsL = strainIncrement.at(3);
145  DEpsM = strainIncrement.at(4);
146  EpsD = EpsN - EpsV;
147  DEpsD = DEpsN - DEpsV;
148 
149  /* previousStress.at(i)...Vector of history parameters
150  * (1)...previous volumetric stress
151  * (2)..previous normal stress for microplane
152  * (3)..previous l-shear stress for microplane
153  * (4)..previous m-shear stress for microplane
154  *
155  */
156 
157 
158  // SVsum=0.0;
159  // novy koncept s odtizenim
160  CV = EV;
161  CD = ED;
162  /* EpsV0 = EpsV - DEpsV;
163  * EpsD0 = EpsD - DEpsD;
164  * SigV0 = previousStress.at(1);
165  * SigD0 = previousStress.at(2)-SigV0;
166  *
167  * if ((SigV0<0.0)&&(EpsV0<0.0)&&(DEpsV>0.0))
168  * CV = EV*(c11/(c11-EpsV0)+SigV0*EpsV0/(c11*c12*EV));
169  * if ((SigD0>0.0)&&(EpsD0>0.0)&&(DEpsD<0.0)) CD = (SigD0/EpsD0);
170  * if ((SigD0<0.0)&&(EpsD0<0.0)&&(DEpsD>0.0)) CD = (SigD0/EpsD0);
171  * // if (SigD0*DEpsD<0.0) CD = fabs(SigD0/EpsD0);
172  */
173 
174  SEV = previousStress.at(1) + CV * DEpsV;
175 
176  SVdash = min( max( SEV, this->FVminus(EpsV, k1, k3, k4, E) ), this->FVplus(EpsV, k1, c13, c14, c15, EV) );
177 
178  SED = previousStress.at(2) - previousStress.at(1) + CD * DEpsD;
179  SD = min( max( SED, this->FDminus(EpsD, k1, c7, c8, c9, E) ),
180  this->FDplus(EpsD, k1, c5, c6, c7, c20, E) );
181 
182  SNdash = SVdash + SD;
183  answer.at(2) = min( SNdash, this->FN(EpsN, previousStress.at(1), k1, c1, c2, c3, c4, E, EV) );
184 
185  SEM = previousStress.at(4) + ET * DEpsM;
186  SEL = previousStress.at(3) + ET * DEpsL;
187 
188  F = this->FT(answer.at(2), EpsV, k1, k2, c10, c11, c12, ET);
189 
190  if ( SEL > F ) {
191  answer.at(3) = F;
192  } else if ( SEL < -F ) {
193  answer.at(3) = -F;
194  } else {
195  answer.at(3) = SEL;
196  }
197 
198  if ( SEM > F ) {
199  answer.at(4) = F;
200  } else if ( SEM < -F ) {
201  answer.at(4) = -F;
202  } else {
203  answer.at(4) = SEM;
204  }
205 
206  answer.at(1) = SVdash;
207 
208  // uncomment this
209  //stressIncrement = answer;
210  //stressIncrement.subtract (previousStress);
211  //status->letStressIncrementVectorBe (stressIncrement);
212  //status->letStrainIncrementVectorBe (strainIncrement);
213 
214  // update gp
215  status->letTempStrainVectorBe(strain);
216  status->letTempStressVectorBe(answer);
217 }
218 
219 
222 {
223  IRResultType result; // Required by IR_GIVE_FIELD macro
224 
226  if ( result != IRRT_OK ) return result;
227 
228  c1 = 6.20e-1;
229  c2 = 2.76;
230  // c3 = 4.0;
232  c4 = 70.;
234  c5 = 2.50;
235  c6 = 1.30;
236  c7 = 50.;
237  c8 = 8.0;
238  c9 = 1.30;
239  c10 = 0.73;
240  c11 = 0.2;
241  c12 = 7000.;
242  c13 = 0.23;
243  c14 = 0.8;
244  c15 = 1.0;
245  c16 = 0.02;
246  c17 = 0.01;
247  c18 = 1.0;
248  c19 = 0.4;
249  //c20 = 14.0e-2;
251 
257  mu = 1.0;
258  EV = E / ( 1 - 2 * nu );
259  ED = 5 * E / ( 2 + 3 * mu ) / ( 1 + nu );
260  ET = mu * ED;
261 
262  return IRRT_OK;
263 }
264 
265 
266 void
268 {
269  //FloatArray stressIncrement;
270  FloatArray stress;
271  M4MaterialStatus *status = static_cast< M4MaterialStatus * >( this->giveStatus(mPlane) );
272  //stressIncrement = status->giveStressIncrementVector();
273  //stressIncrement.at(1) = sigv - status->giveStressVector().at(1);
274  //status->letStressIncrementVectorBe (stressIncrement);
275  stress = status->giveTempStressVector();
276  stress.at(1) = sigv;
277  status->letTempStressVectorBe(stress);
278 }
279 
280 
281 void
283  GaussPoint *gp, TimeStep *tStep)
284 //
285 // returns a FloatArray(6) of initial strain vector
286 // eps_0 = {exx_0, eyy_0, ezz_0, gyz_0, gxz_0, gxy_0}^T
287 // caused by unit temperature in direction of
288 // gp (element) local axes
289 //
290 {
291  answer.resize(6);
292  answer.zero();
293  answer.at(1) = talpha;
294  answer.at(2) = talpha;
295  answer.at(3) = talpha;
296 }
297 
298 
300 
302  StructuralMaterialStatus(n, d, g)
303 { }
304 
305 
307 { }
308 
309 void
311 {
313 }
314 
315 void
317 {
319 }
320 
323 {
324  return StructuralMaterialStatus :: saveContext(stream, mode, obj);
325 }
326 
329 {
330  return StructuralMaterialStatus :: restoreContext(stream, mode, obj);
331 }
332 } // end namespace oofem
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
Definition: structuralms.C:96
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
Definition: m4.C:316
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
Definition: structuralms.h:137
#define _IFT_M4Material_k3
Definition: m4.h:49
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
Definition: material.C:244
Class and object Domain.
Definition: domain.h:115
#define _IFT_M4Material_c20
Definition: m4.h:46
double E
Young&#39;s modulus.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: m4.C:221
double k2
Definition: m4.h:87
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)
Stores receiver state to output stream.
Definition: m4.C:322
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
int max(int i, int j)
Returns bigger value form two given decimals.
Definition: mathfem.h:71
double c20
Definition: m4.h:86
This class implements a structural material status information.
Definition: structuralms.h:65
#define _IFT_M4Material_k1
Definition: m4.h:47
double FDminus(double ed, double k1, double c7, double c8, double c9, double E)
Definition: m4.C:72
virtual void giveThermalDilatationVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Returns a vector of coefficients of thermal dilatation in direction of each material principal (local...
Definition: m4.C:282
double c9
Definition: m4.h:85
double c15
Definition: m4.h:86
double FVminus(double ev, double k1, double k3, double k4, double E)
Definition: m4.C:64
double c8
Definition: m4.h:85
double c19
Definition: m4.h:86
double EV
Definition: m4.h:88
double ET
Definition: m4.h:88
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
Sets receiver to be a - b.
Definition: floatarray.C:341
double mu
Definition: m4.h:87
double ED
Definition: m4.h:88
double FT(double sn, double ev, double k1, double k2, double c10, double c11, double c12, double Et)
Definition: m4.C:100
#define _IFT_M4Material_talpha
Definition: m4.h:51
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: m4.C:310
double macbra(double x)
Definition: m4.C:51
double c13
Definition: m4.h:86
double c17
Definition: m4.h:86
double c2
Definition: m4.h:85
double nu
Poisson&#39;s ratio.
Class representing microplane integration point in finite element program.
Definition: microplane.h:74
double c5
Definition: m4.h:85
double c16
Definition: m4.h:86
#define _IFT_M4Material_c3
Definition: m4.h:44
double c11
Definition: m4.h:85
double c1
Definition: m4.h:85
double k3
Definition: m4.h:87
virtual void updateVolumetricStressTo(Microplane *mPlane, double sigv)
Updates the volumetric stress component after computing real stress microplane vectors.
Definition: m4.C:267
M4Material(int n, Domain *d)
Constructor.
Definition: m4.C:45
double c10
Definition: m4.h:85
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...
Definition: m4.C:113
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: structuralms.C:157
double c14
Definition: m4.h:86
double k1
Definition: m4.h:87
Class representing vector of real numbers.
Definition: floatarray.h:82
M4MaterialStatus(int n, Domain *d, GaussPoint *g)
Definition: m4.C:301
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
double talpha
Definition: m4.h:89
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
Definition: structuralms.h:135
Abstract base class for all microplane models according to Bazant&#39;s approach.
const FloatArray & giveStressVector() const
Returns the const pointer to receiver&#39;s stress vector.
Definition: structuralms.h:107
double FDplus(double ed, double k1, double c5, double c6, double c7, double c20, double E)
Definition: m4.C:82
double c7
Definition: m4.h:85
Related material model status to M4Material class for storing history variables in particular integra...
Definition: m4.h:60
Class representing the general Input Record.
Definition: inputrecord.h:101
double FN(double en, double sv, double k1, double c1, double c2, double c3, double c4, double E, double Ev)
Definition: m4.C:92
double c12
Definition: m4.h:85
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
#define _IFT_M4Material_k2
Definition: m4.h:48
virtual ~M4MaterialStatus()
Definition: m4.C:306
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: structuralms.C:108
double c3
Definition: m4.h:85
int min(int i, int j)
Returns smaller value from two given decimals.
Definition: mathfem.h:59
virtual IntegrationPointStatus * giveMicroplaneStatus(GaussPoint *gp)
double c18
Definition: m4.h:86
REGISTER_Material(DummyMaterial)
#define _IFT_M4Material_k4
Definition: m4.h:50
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
const FloatArray & giveTempStressVector() const
Returns the const pointer to receiver&#39;s temporary stress vector.
Definition: structuralms.h:117
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: structuralms.C:133
the oofem namespace is to define a context or scope in which all oofem names are defined.
bool isNotEmpty() const
Returns true if receiver is not empty.
Definition: floatarray.h:220
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: m4.C:328
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver&#39;s strain vector.
Definition: structuralms.h:105
double FVplus(double ev, double k1, double c13, double c14, double c15, double Ev)
Definition: m4.C:57
double k4
Definition: m4.h:87
Class representing integration point in finite element program.
Definition: gausspoint.h:93
double c4
Definition: m4.h:85
#define _IFT_M4Material_c4
Definition: m4.h:45
Class representing solution step.
Definition: timestep.h:80
double c6
Definition: m4.h:85
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631

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