OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
microplanematerial.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 "microplanematerial.h"
36 #include "microplane.h"
37 #include "gausspoint.h"
38 #include "floatarray.h"
39 #include "contextioerr.h"
40 #include "mathfem.h"
41 #include "dynamicinputrecord.h"
42 
43 namespace oofem {
44 Microplane *
46 {
47  //
48  // return the i-th slave integration point (microplane) of master gp
49  // if slaves of gp don't exists - create them
50 
51  //
52  GaussPoint *slave = masterGp->giveSlaveGaussPoint(i);
53  if ( slave == NULL ) {
54  // check for proper dimensions - slave can be NULL if index too high or if not
55  // slaves previously defined
56  if ( ( i < 0 ) || ( i > ( this->numberOfMicroplanes - 1 ) ) ) {
57  OOFEM_ERROR("no such microplane defined");
58  }
59 
60  // create new slave record in masterGp
61  // (requires that this is friend of gp)
62 
63  MaterialMode slaveMode, masterMode = masterGp->giveMaterialMode();
64  slaveMode = this->giveCorrespondingSlaveMaterialMode(masterMode);
65 
66  masterGp->gaussPoints.resize(this->numberOfMicroplanes);
67  for ( int j = 0; j < numberOfMicroplanes; j++ ) {
68  masterGp->gaussPoints [ j ] = new Microplane(masterGp->giveIntegrationRule(), j + 1, slaveMode);
69  }
70 
71  slave = masterGp->gaussPoints [ i ];
72  }
73 
74  return static_cast< Microplane * >(slave);
75 }
76 
77 
80 {
81  return _3dMicroplane;
82 }
83 
86 /*
87  * returns material status in gp corresponding to specific material class
88  */
89 {
91  if ( status == NULL ) {
92  // create a new one
93  status = this->CreateMicroplaneStatus(gp);
94  // if newly created status is null
95  // don't include it. specific instance
96  // does not have status.
97  if ( status != NULL ) {
98  gp->setMaterialStatus( status, this->giveNumber() );
99  }
100  }
101 
102  return status;
103 }
104 
105 void
107 {
108  // init master
109  this->giveStatus(gp)->initTempStatus();
110 
111  // init master microplanes
112  for ( int mPlaneIndex = 0; mPlaneIndex < numberOfMicroplanes; mPlaneIndex++ ) {
113  Microplane *mPlane = this->giveMicroplane(mPlaneIndex, gp);
114  MaterialStatus *status = dynamic_cast< MaterialStatus * >( this->giveMicroplaneStatus(mPlane) );
115  if ( status ) {
116  status->initTempStatus();
117  }
118  }
119 }
120 
123 {
124  contextIOResultType iores;
125 
126  if ( gp == NULL ) {
128  }
129 
130  // save master
131  if ( ( iores = StructuralMaterial :: saveIPContext(stream, mode, gp) ) != CIO_OK ) {
132  THROW_CIOERR(iores);
133  }
134 
135  // save microplanes
136  for ( int mPlaneIndex = 0; mPlaneIndex < numberOfMicroplanes; mPlaneIndex++ ) {
137  Microplane *mPlane = this->giveMicroplane(mPlaneIndex, gp);
138  IntegrationPointStatus *status = this->giveMicroplaneStatus(mPlane);
139  if ( status ) {
140  if ( ( iores = status->saveContext(stream, mode, gp) ) != CIO_OK ) {
141  THROW_CIOERR(iores);
142  }
143  }
144  }
145 
146  return CIO_OK;
147 }
148 
151 {
152  contextIOResultType iores;
153 
154  // corresponding gp is passed in obj
155  if ( gp == NULL ) {
157  }
158 
159  // save master
160  if ( ( iores = StructuralMaterial :: restoreIPContext(stream, mode, gp) ) != CIO_OK ) {
161  THROW_CIOERR(iores);
162  }
163 
164  // save microplanes
165  for ( int mPlaneIndex = 0; mPlaneIndex < numberOfMicroplanes; mPlaneIndex++ ) {
166  Microplane *mPlane = this->giveMicroplane(mPlaneIndex, gp);
167  IntegrationPointStatus *status = this->giveMicroplaneStatus(mPlane);
168  if ( status ) {
169  if ( ( iores = status->restoreContext(stream, mode, gp) ) != CIO_OK ) {
170  THROW_CIOERR(iores);
171  }
172  }
173  }
174 
175  return CIO_OK;
176 }
177 
178 
179 
180 
181 void
183 {
184  int mnumber = mplane->giveNumber();
185  answer.resize(3);
186 
187  answer.at(1) = microplaneNormals [ mnumber - 1 ] [ 0 ];
188  answer.at(2) = microplaneNormals [ mnumber - 1 ] [ 1 ];
189  answer.at(3) = microplaneNormals [ mnumber - 1 ] [ 2 ];
190 }
191 
192 double
194 {
195  int mnumber = mplane->giveNumber();
196 
197  return microplaneWeights [ mnumber - 1 ];
198 }
199 
200 double
202  const FloatArray &macroStrain)
203 {
204  int mnumber = mplane->giveNumber();
205  double en = 0.0;
206 
207  for ( int i = 0; i < 6; i++ ) {
208  en += N [ mnumber - 1 ] [ i ] * macroStrain.at(i + 1);
209  }
210 
211  return en;
212 }
213 
214 double
216  const FloatArray &macroStrain)
217 {
218  return ( macroStrain.at(1) + macroStrain.at(2) + macroStrain.at(3) ) / 3.0;
219 }
220 
221 double
223  const FloatArray &macroStrain)
224 {
225  return this->computeNormalStrainComponent(mplane, macroStrain) -
226  this->computeNormalVolumetricStrainComponent(mplane, macroStrain);
227 }
228 
229 double
231  const FloatArray &macroStrain)
232 {
233  int mnumber = mplane->giveNumber();
234  double em = 0.0;
235 
236  for ( int i = 0; i < 6; i++ ) {
237  em += M [ mnumber - 1 ] [ i ] * macroStrain.at(i + 1);
238  }
239 
240  return em;
241 }
242 
243 double
245  const FloatArray &macroStrain)
246 {
247  int mnumber = mplane->giveNumber();
248  double el = 0.0;
249 
250  for ( int i = 0; i < 6; i++ ) {
251  el += L [ mnumber - 1 ] [ i ] * macroStrain.at(i + 1);
252  }
253 
254  return el;
255 }
256 
257 void
259  const FloatArray &macroStrain)
260 {
261  int mnumber = mplane->giveNumber();
262  double en = 0., ev = 0., em = 0., el = 0.;
263 
264  for ( int i = 0; i < 6; i++ ) {
265  en += N [ mnumber - 1 ] [ i ] * macroStrain.at(i + 1);
266  em += M [ mnumber - 1 ] [ i ] * macroStrain.at(i + 1);
267  el += L [ mnumber - 1 ] [ i ] * macroStrain.at(i + 1);
268  }
269 
270  ev = ( macroStrain.at(1) + macroStrain.at(2) + macroStrain.at(3) ) / 3.0;
271 
272  answer.resize(4);
273  answer.zero();
274  answer.at(1) = ev;
275  answer.at(2) = en;
276  answer.at(3) = el;
277  answer.at(4) = em;
278 }
279 
280 void
282  MatResponseMode mode,
283  GaussPoint *gp,
284  TimeStep *tStep)
285 {
286  answer.resize(6, 6);
287  answer.zero();
288  // elastic stiffness matrix
289  answer.at(4, 4) = answer.at(5, 5) = answer.at(6, 6) = E / ( 2. + 2. * nu );
290  answer.at(1, 1) = answer.at(2, 2) = answer.at(3, 3) = E * ( 1. - nu ) / ( ( 1. + nu ) * ( 1. - 2. * nu ) );
291  answer.at(1, 2) = answer.at(2, 1) = answer.at(1, 3) = answer.at(3, 1) =
292  answer.at(2, 3) = answer.at(3, 2) = E * nu / ( ( 1. + nu ) * ( 1. - 2. * nu ) );
293 }
294 
297 {
298  IRResultType result; // Required by IR_GIVE_FIELD macro
299 
301  if ( result != IRRT_OK ) return result;
302 
303  // elastic constants
306  // number of microplanes
309  return IRRT_OK;
310 }
311 
312 
313 void
315 {
318 }
319 
320 
321 void
323 {
324  int i, i4, mPlane;
325  int ij [ 6 ] [ 2 ] = { { 1, 1 }, { 2, 2 }, { 3, 3 }, { 2, 3 }, { 3, 1 }, { 1, 2 } };
326 
327  // kronecker delta
328  Kronecker [ 0 ] = 1.;
329  Kronecker [ 1 ] = 1.;
330  Kronecker [ 2 ] = 1.;
331  Kronecker [ 3 ] = 0.;
332  Kronecker [ 4 ] = 0.;
333  Kronecker [ 5 ] = 0.;
334 
335  // definition of intergation points and weights
336 
337  if ( numberOfMicroplanes == 28 ) {
338  for ( i = 0; i < 4; i++ ) {
339  microplaneWeights [ i ] = 0.0160714276E0;
340  microplaneWeights [ i + 4 ] = 0.0204744730E0;
341  microplaneWeights [ i + 8 ] = 0.0204744730E0;
342  microplaneWeights [ i + 12 ] = 0.0204744730E0;
343  microplaneWeights [ i + 16 ] = 0.0158350505E0;
344  microplaneWeights [ i + 20 ] = 0.0158350505E0;
345  microplaneWeights [ i + 24 ] = 0.0158350505E0;
346  }
347 
348  double help [ 7 ] [ 3 ] = {
349  { .577350259E0, .577350259E0, .577350259E0 }, { .935113132E0, .250562787E0, .250562787E0 },
350  { .250562787E0, .935113132E0, .250562787E0 }, { .250562787E0, .250562787E0, .935113132E0 },
351  { .186156720E0, .694746614E0, .694746614E0 }, { .694746614E0, .186156720E0, .694746614E0 },
352  { .694746614E0, .694746614E0, .186156720E0 }
353  };
354  for ( i = 0; i < 7; i++ ) {
355  i4 = i * 4;
356  microplaneNormals [ i4 ] [ 0 ] = help [ i ] [ 0 ];
357  microplaneNormals [ i4 ] [ 1 ] = help [ i ] [ 1 ];
358  microplaneNormals [ i4 ] [ 2 ] = help [ i ] [ 2 ];
359  microplaneNormals [ i4 + 1 ] [ 0 ] = help [ i ] [ 0 ];
360  microplaneNormals [ i4 + 1 ] [ 1 ] = help [ i ] [ 1 ];
361  microplaneNormals [ i4 + 1 ] [ 2 ] = -help [ i ] [ 2 ];
362  microplaneNormals [ i4 + 2 ] [ 0 ] = help [ i ] [ 0 ];
363  microplaneNormals [ i4 + 2 ] [ 1 ] = -help [ i ] [ 1 ];
364  microplaneNormals [ i4 + 2 ] [ 2 ] = help [ i ] [ 2 ];
365  microplaneNormals [ i4 + 3 ] [ 0 ] = help [ i ] [ 0 ];
366  microplaneNormals [ i4 + 3 ] [ 1 ] = -help [ i ] [ 1 ];
367  microplaneNormals [ i4 + 3 ] [ 2 ] = -help [ i ] [ 2 ];
368  }
369 
370  /*
371  * // compute projection tensors for each microplane
372  * int ii,jj;
373  * FloatArray n(3), m(3), l(3);
374  * double aux;
375  *
376  * for (mPlane=0; mPlane < numberOfMicroplanes; mPlane++) {
377  * //prohozemo poradi os normal, aby smer 3 byl na prvnim miste
378  * n.at(1) = microplaneNormals[mPlane][2];
379  * n.at(2) = microplaneNormals[mPlane][1];
380  * n.at(3) = microplaneNormals[mPlane][0];
381  *
382  * if ((mPlane+1)%3 == 0) {
383  * aux = sqrt (n.at(1)*n.at(1) + n.at(2)*n.at(2));
384  * m.at(1) = n.at(2)/aux;
385  * m.at(2) = -n.at(1)/aux;
386  * m.at(3) = 0.0;
387  * } else if ((mPlane+1)%3 == 1) {
388  * aux = sqrt (n.at(2)*n.at(2) + n.at(3)*n.at(3));
389  * m.at(1) = 0.0;
390  * m.at(2) = n.at(3)/aux;
391  * m.at(3) = -n.at(2)/aux;
392  * } else {
393  * aux = sqrt (n.at(1)*n.at(1) + n.at(3)*n.at(3));
394  * m.at(1) = n.at(3)/aux;
395  * m.at(2) = 0.0;
396  * m.at(3) = -n.at(1)/aux;
397  * }
398  *
399  *
400  * l.beVectorProductOf (m,n);
401  *
402  * for (i=0; i<6; i++) {
403  * ii = ij[i][0];
404  * jj = ij[i][1];
405  * N[mPlane][i] = n.at(ii)*n.at(jj);
406  * M[mPlane][i] = 0.5*(m.at(ii)*n.at(jj) + m.at(jj)*n.at(ii)) ;
407  * L[mPlane][i] = 0.5*(l.at(ii)*n.at(jj) + l.at(jj)*n.at(ii)) ;
408  * }
409  *
410  *
411  * } */
412  } else if ( numberOfMicroplanes == 21 ) {
413  for ( i = 0; i < 3; i++ ) {
414  microplaneWeights [ i ] = 0.02652141274;
415  }
416 
417  for ( i = 3; i < 9; i++ ) {
418  microplaneWeights [ i ] = 0.01993014153;
419  }
420 
421  for ( i = 9; i < 21; i++ ) {
422  microplaneWeights [ i ] = 0.02507124272;
423  }
424 
425 
426  microplaneNormals [ 0 ] [ 0 ] = microplaneNormals [ 1 ] [ 1 ] = microplaneNormals [ 2 ] [ 2 ] = 1.;
427  microplaneNormals [ 0 ] [ 1 ] = microplaneNormals [ 0 ] [ 2 ] = microplaneNormals [ 1 ] [ 0 ] =
428  microplaneNormals [ 1 ] [ 2 ] = microplaneNormals [ 2 ] [ 0 ] = microplaneNormals [ 2 ] [ 1 ] = 0.;
429  microplaneNormals [ 3 ] [ 0 ] = microplaneNormals [ 3 ] [ 1 ] = microplaneNormals [ 4 ] [ 0 ] =
430  microplaneNormals [ 5 ] [ 0 ] = microplaneNormals [ 5 ] [ 2 ] = microplaneNormals [ 6 ] [ 0 ] =
431  microplaneNormals [ 7 ] [ 1 ] = microplaneNormals [ 7 ] [ 2 ] = microplaneNormals [ 8 ] [ 1 ] =
432  0.7071067812;
433  microplaneNormals [ 4 ] [ 1 ] = microplaneNormals [ 6 ] [ 2 ] = microplaneNormals [ 8 ] [ 2 ] =
434  -0.7071067812;
435  microplaneNormals [ 3 ] [ 2 ] = microplaneNormals [ 4 ] [ 2 ] = microplaneNormals [ 5 ] [ 1 ] =
436  microplaneNormals [ 6 ] [ 1 ] = microplaneNormals [ 7 ] [ 0 ] = microplaneNormals [ 8 ] [ 0 ] = 0.;
437 
438 
439  double help [ 3 ] [ 3 ] = { { 0.3879072746, 0.3879072746, 0.8360956240 },
440  { 0.3879072746, 0.8360956240, 0.3879072746 },
441  { 0.8360956240, 0.3879072746, 0.3879072746 } };
442 
443  for ( i = 0; i < 3; i++ ) {
444  i4 = i * 4;
445  microplaneNormals [ 9 + i4 ] [ 0 ] = help [ i ] [ 0 ];
446  microplaneNormals [ 9 + i4 ] [ 1 ] = help [ i ] [ 1 ];
447  microplaneNormals [ 9 + i4 ] [ 2 ] = help [ i ] [ 2 ];
448 
449  microplaneNormals [ 10 + i4 ] [ 0 ] = help [ i ] [ 0 ];
450  microplaneNormals [ 10 + i4 ] [ 1 ] = help [ i ] [ 1 ];
451  microplaneNormals [ 10 + i4 ] [ 2 ] = -help [ i ] [ 2 ];
452 
453  microplaneNormals [ 11 + i4 ] [ 0 ] = help [ i ] [ 0 ];
454  microplaneNormals [ 11 + i4 ] [ 1 ] = -help [ i ] [ 1 ];
455  microplaneNormals [ 11 + i4 ] [ 2 ] = help [ i ] [ 2 ];
456 
457  microplaneNormals [ 12 + i4 ] [ 0 ] = help [ i ] [ 0 ];
458  microplaneNormals [ 12 + i4 ] [ 1 ] = -help [ i ] [ 1 ];
459  microplaneNormals [ 12 + i4 ] [ 2 ] = -help [ i ] [ 2 ];
460  }
461 
462 
463  /* // compute projection tensors for each microplane
464  * int ii,jj;
465  * FloatArray n(3), m(3), l(3);
466  * double aux;
467  *
468  * for (mPlane=0; mPlane < numberOfMicroplanes; mPlane++) {
469  * n.at(1) = microplaneNormals[mPlane][0];
470  * n.at(2) = microplaneNormals[mPlane][1];
471  * n.at(3) = microplaneNormals[mPlane][2];
472  *
473  * if ((mPlane+1)%3 == 0) {
474  * aux = sqrt (n.at(1)*n.at(1) + n.at(2)*n.at(2));
475  * if(fabs(aux) > 1.0e-8){
476  * m.at(1) = n.at(2)/aux;
477  * m.at(2) = -n.at(1)/aux;
478  * m.at(3) = 0.0;
479  * }
480  * else {
481  * m.at(1) = 1.0;
482  * m.at(2) = 0.0;
483  * m.at(3) = 0.0;
484  * }
485  * } else if ((mPlane+1)%3 == 1) {
486  * aux = sqrt (n.at(2)*n.at(2) + n.at(3)*n.at(3));
487  * if(fabs(aux) > 1.0e-8){
488  * m.at(1) = 0.0;
489  * m.at(2) = n.at(3)/aux;
490  * m.at(3) = -n.at(2)/aux;
491  * }
492  * else {
493  * m.at(1) = 0.0;
494  * m.at(2) = 1.0;
495  * m.at(3) = 0.0;
496  * }
497  * } else {
498  * aux = sqrt (n.at(1)*n.at(1) + n.at(3)*n.at(3));
499  * if(fabs(aux) > 1.0e-8){
500  * m.at(1) = n.at(3)/aux;
501  * m.at(2) = 0.0;
502  * m.at(3) = -n.at(1)/aux;
503  * }
504  * else {
505  * m.at(1) = 0.0;
506  * m.at(2) = 0.0;
507  * m.at(3) = 1.0;
508  * }
509  * }
510  *
511  *
512  * l.beVectorProductOf (m,n);
513  *
514  * for (i=0; i<6; i++) {
515  * ii = ij[i][0];
516  * jj = ij[i][1];
517  *
518  * N[mPlane][i] = n.at(ii)*n.at(jj);
519  * M[mPlane][i] = 0.5*(m.at(ii)*n.at(jj) + m.at(jj)*n.at(ii)) ;
520  * L[mPlane][i] = 0.5*(l.at(ii)*n.at(jj) + l.at(jj)*n.at(ii)) ;
521  *
522  * // printf("\n i= %d,N= %lf,L= %lf,M= %lf \n",i,N[mPlane][i],L[mPlane][i],M[mPlane][i]);
523  * }
524  *
525  * }
526  *
527  */
528  } else if ( numberOfMicroplanes == 61 ) {
529  double help [ 61 ] [ 4 ] = {
530  { 1.000000000000, 0.000000000000, 0.000000000000, 0.00795844204678 },
531  { 0.745355992500, 0.0, 0.666666666667, 0.00795844204678 },
532  { 0.745355992500, -0.577350269190, -0.333333333333, 0.00795844204678 },
533  { 0.745355992500, 0.577350269190, -0.333333333333, 0.00795844204678 },
534  { 0.333333333333, 0.577350269190, 0.745355992500, 0.00795844204678 },
535  { 0.333333333333, -0.577350269190, 0.745355992500, 0.00795844204678 },
536  { 0.333333333333, -0.934172358963, 0.127322003750, 0.00795844204678 },
537  { 0.333333333333, -0.356822089773, -0.872677996250, 0.00795844204678 },
538  { 0.333333333333, 0.356822089773, -0.872677996250, 0.00795844204678 },
539  { 0.333333333333, 0.934172358963, 0.127322003750, 0.00795844204678 },
540  { 0.794654472292, -0.525731112119, 0.303530999103, 0.0105155242892 },
541  { 0.794654472292, 0.0, -0.607061998207, 0.0105155242892 },
542  { 0.794654472292, 0.525731112119, 0.303530999103, 0.0105155242892 },
543  { 0.187592474085, 0.0, 0.982246946377, 0.0105155242892 },
544  { 0.187592474085, -0.850650808352, -0.491123473188, 0.0105155242892 },
545  { 0.187592474085, 0.850650808352, -0.491123473188, 0.0105155242892 },
546  { 0.934172358963, 0.0, 0.356822089773, 0.0100119364272 },
547  { 0.934172358963, -0.309016994375, -0.178411044887, 0.0100119364272 },
548  { 0.934172358963, 0.309016994375, -0.178411044887, 0.0100119364272 },
549  { 0.577350269190, 0.309016994375, 0.755761314076, 0.0100119364272 },
550  { 0.577350269190, -0.309016994375, 0.755761314076, 0.0100119364272 },
551  { 0.577350269190, -0.809016994375, -0.110264089708, 0.0100119364272 },
552  { 0.577350269190, -0.5, -0.645497224368, 0.0100119364272 },
553  { 0.577350269190, 0.5, -0.645497224368, 0.0100119364272 },
554  { 0.577350269190, 0.809016994375, -0.110264089708, 0.0100119364272 },
555  { 0.356822089773, -0.809016994375, 0.467086179481, 0.0100119364272 },
556  { 0.356822089773, 0.0, -0.934172358963, 0.0100119364272 },
557  { 0.356822089773, 0.809016994375, 0.467086179481, 0.0100119364272 },
558  { 0.0, 0.5, 0.866025403784, 0.0100119364272 },
559  { 0.0, -1.0, 0.0, 0.0100119364272 },
560  { 0.0, 0.5, -0.866025403784, 0.0100119364272 },
561  { 0.947273580412, -0.277496978165, 0.160212955043, 0.00690477957966 },
562  { 0.812864676392, -0.277496978165, 0.512100034157, 0.00690477957966 },
563  { 0.595386501297, -0.582240127941, 0.553634669695, 0.00690477957966 },
564  { 0.595386501297, -0.770581752342, 0.227417407053, 0.00690477957966 },
565  { 0.812864676392, -0.582240127941, -0.015730584514, 0.00690477957966 },
566  { 0.492438766306, -0.753742692223, -0.435173546254, 0.00690477957966 },
567  { 0.274960591212, -0.942084316623, -0.192025554687, 0.00690477957966 },
568  { -0.076926487903, -0.942084316623, -0.326434458707, 0.00690477957966 },
569  { -0.076926487903, -0.753742692223, -0.652651721349, 0.00690477957966 },
570  { 0.274960591212, -0.637341166847, -0.719856173359, 0.00690477957966 },
571  { 0.947273580412, 0.0, -0.320425910085, 0.00690477957966 },
572  { 0.812864676392, -0.304743149777, -0.496369449643, 0.00690477957966 },
573  { 0.595386501297, -0.188341624401, -0.781052076747, 0.00690477957966 },
574  { 0.595386501297, 0.188341624401, -0.781052076747, 0.00690477957966 },
575  { 0.812864676392, 0.304743149777, -0.496369449643, 0.00690477957966 },
576  { 0.492438766306, 0.753742692223, -0.435173546254, 0.00690477957966 },
577  { 0.274960591212, 0.637341166847, -0.719856173359, 0.00690477957966 },
578  { -0.076926487903, 0.753742692223, -0.652651721349, 0.00690477957966 },
579  { -0.076926487903, 0.942084316623, -0.326434458707, 0.00690477957966 },
580  { 0.274960591212, 0.942084316623, -0.192025554687, 0.00690477957966 },
581  { 0.947273580412, 0.277496978165, 0.160212955043, 0.00690477957966 },
582  { 0.812864676392, 0.582240127941, -0.015730584514, 0.00690477957966 },
583  { 0.595386501297, 0.770581752342, 0.227417407053, 0.00690477957966 },
584  { 0.595386501297, 0.582240127941, 0.553634669695, 0.00690477957966 },
585  { 0.812864676392, 0.277496978165, 0.512100034157, 0.00690477957966 },
586  { 0.492438766306, 0.0, 0.870347092509, 0.00690477957966 },
587  { 0.274960591212, 0.304743149777, 0.911881728046, 0.00690477957966 },
588  { -0.076926487903, 0.188341624401, 0.979086180056, 0.00690477957966 },
589  { -0.076926487903, -0.188341624401, 0.979086180056, 0.00690477957966 },
590  { 0.274960591212, -0.304743149777, 0.911881728046, 0.00690477957966 }
591  };
592 
593  for ( i = 0; i < numberOfMicroplanes; i++ ) {
594  microplaneNormals [ i ] [ 0 ] = help [ i ] [ 0 ];
595  microplaneNormals [ i ] [ 1 ] = help [ i ] [ 1 ];
596  microplaneNormals [ i ] [ 2 ] = help [ i ] [ 2 ];
597  microplaneWeights [ i ] = help [ i ] [ 3 ];
598  }
599 
600  /*
601  * // compute projection tensors for each microplane
602  * int ii,jj;
603  * FloatArray n(3), m(3), l(3);
604  * double aux;
605  *
606  * for (mPlane=0; mPlane < numberOfMicroplanes; mPlane++) {
607  * n.at(1) = microplaneNormals[mPlane][0];
608  * n.at(2) = microplaneNormals[mPlane][1];
609  * n.at(3) = microplaneNormals[mPlane][2];
610  *
611  * //if ((mPlane+1)%3 == 0) {
612  * aux = sqrt (n.at(1)*n.at(1) + n.at(2)*n.at(2));
613  * if(fabs(aux) > 1.0e-8){
614  * m.at(1) = n.at(2)/aux;
615  * m.at(2) = -n.at(1)/aux;
616  * m.at(3) = 0.0;
617  * }
618  * else {
619  * m.at(1) = 1.0;
620  * m.at(2) = 0.0;
621  * m.at(3) = 0.0;
622  * }
623  *
624  * l.beVectorProductOf (m,n);
625  *
626  *
627  *
628  * for (i=0; i<6; i++) {
629  * ii = ij[i][0];
630  * jj = ij[i][1];
631  *
632  * N[mPlane][i] = n.at(ii)*n.at(jj);
633  * M[mPlane][i] = 0.5*(m.at(ii)*n.at(jj) + m.at(jj)*n.at(ii)) ;
634  * L[mPlane][i] = 0.5*(l.at(ii)*n.at(jj) + l.at(jj)*n.at(ii)) ;
635  *
636  *
637  * }
638  *
639  *
640  *
641  * }
642  */
643  } else {
644  OOFEM_ERROR("Unsupported number of microplanes");
645  }
646 
647  // compute projection tensors for each microplane
648  int ii, jj;
649  FloatArray n(3), m(3), l(3);
650  double aux;
651 
652  for ( mPlane = 0; mPlane < numberOfMicroplanes; mPlane++ ) {
653  n.at(1) = microplaneNormals [ mPlane ] [ 0 ];
654  n.at(2) = microplaneNormals [ mPlane ] [ 1 ];
655  n.at(3) = microplaneNormals [ mPlane ] [ 2 ];
656 
657  if ( ( mPlane + 1 ) % 3 == 0 ) {
658  aux = sqrt( n.at(1) * n.at(1) + n.at(2) * n.at(2) );
659  if ( fabs(aux) > 1.0e-12 ) {
660  m.at(1) = n.at(2) / aux;
661  m.at(2) = -n.at(1) / aux;
662  m.at(3) = 0.0;
663  } else {
664  m.at(1) = 1.0;
665  m.at(2) = 0.0;
666  m.at(3) = 0.0;
667  }
668  } else if ( ( mPlane + 1 ) % 3 == 1 ) {
669  aux = sqrt( n.at(2) * n.at(2) + n.at(3) * n.at(3) );
670  if ( fabs(aux) > 1.0e-12 ) {
671  m.at(1) = 0.0;
672  m.at(2) = n.at(3) / aux;
673  m.at(3) = -n.at(2) / aux;
674  } else {
675  m.at(1) = 0.0;
676  m.at(2) = 1.0;
677  m.at(3) = 0.0;
678  }
679  } else {
680  aux = sqrt( n.at(1) * n.at(1) + n.at(3) * n.at(3) );
681  if ( fabs(aux) > 1.0e-12 ) {
682  m.at(1) = n.at(3) / aux;
683  m.at(2) = 0.0;
684  m.at(3) = -n.at(1) / aux;
685  } else {
686  m.at(1) = 0.0;
687  m.at(2) = 0.0;
688  m.at(3) = 1.0;
689  }
690  }
691 
692 
693  l.beVectorProductOf(m, n);
694 
695  for ( i = 0; i < 6; i++ ) {
696  ii = ij [ i ] [ 0 ];
697  jj = ij [ i ] [ 1 ];
698 
699  N [ mPlane ] [ i ] = n.at(ii) * n.at(jj);
700  M [ mPlane ] [ i ] = 0.5 * ( m.at(ii) * n.at(jj) + m.at(jj) * n.at(ii) );
701  L [ mPlane ] [ i ] = 0.5 * ( l.at(ii) * n.at(jj) + l.at(jj) * n.at(ii) );
702  }
703  }
704 }
705 } // end namespace oofem
void setField(int item, InputFieldType id)
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
Definition: gausspoint.h:191
int numberOfMicroplanes
Number of microplanes.
double computeShearMStrainComponent(Microplane *mplane, const FloatArray &macroStrain)
Computes the shear component (in m direction) of macro strain on given microplane.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
Definition: material.C:244
double L[MAX_NUMBER_OF_MICROPLANES][6]
Shear projection tensors (l direction) for all microplanes.
#define _IFT_MicroplaneMaterial_n
void beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
Computes vector product (or cross product) of vectors given as parameters, , and stores the result in...
Definition: floatarray.C:415
virtual MaterialMode giveCorrespondingSlaveMaterialMode(MaterialMode masterMode)
Returns corresponding material mode for microplane according to macro integration mode...
IntegrationPointStatus * setMaterialStatus(IntegrationPointStatus *ptr, int n)
Sets Material status managed by receiver.
Definition: gausspoint.h:213
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
double E
Young&#39;s modulus.
double M[MAX_NUMBER_OF_MICROPLANES][6]
Shear projection tensors (m direction) for all microplanes.
virtual contextIOResultType saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Stores integration point state to output stream.
Definition: material.C:173
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
virtual MaterialStatus * CreateMicroplaneStatus(GaussPoint *gp)=0
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
double computeNormalDeviatoricStrainComponent(Microplane *mplane, const FloatArray &macroStrain)
Computes the normal deviatoric component of macro strain on given microplane.
double microplaneNormals[MAX_NUMBER_OF_MICROPLANES][3]
Normals of microplanes.
Microplane * giveMicroplane(int i, GaussPoint *masterGp)
Returns i-th microplane belonging to master-macro-integration point. )-based indexing.
virtual contextIOResultType saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Stores integration point state to output stream.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: femcmpnn.C:51
virtual contextIOResultType restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Reads integration point state to output stream.
Definition: material.C:204
GaussPoint * giveSlaveGaussPoint(int index)
Returns index-th slave gauss point of receiver.
Definition: gausspoint.C:106
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
MatResponseMode
Describes the character of characteristic material matrix.
virtual void initializeData(int numberOfMicroplanes)
Initializes internal data (integration weights, microplane normals and computes projection tensors)...
#define THROW_CIOERR(e)
Definition: contextioerr.h:61
virtual void initTempStatus(GaussPoint *gp)
Initializes temporary variables stored in integration point status at the beginning of new time step...
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
Definition: matstatus.h:103
virtual void giveMicroplaneNormal(FloatArray &answer, Microplane *mplane)
Computes normal of given microplane.
#define _IFT_MicroplaneMaterial_nmp
#define OOFEM_ERROR(...)
Definition: error.h:61
int giveNumber()
Returns number of receiver.
Definition: gausspoint.h:184
double nu
Poisson&#39;s ratio.
Class representing microplane integration point in finite element program.
Definition: microplane.h:74
virtual double giveMicroplaneIntegrationWeight(Microplane *mplane)
Returns microplane integration weight.
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
double computeNormalStrainComponent(Microplane *mplane, const FloatArray &macroStrain)
Computes the length of normal strain vector on given microplane.
IntegrationRule * giveIntegrationRule()
Returns corresponding integration rule to receiver.
Definition: gausspoint.h:186
Abstract base class representing a material status information.
Definition: matstatus.h:84
Class representing vector of real numbers.
Definition: floatarray.h:82
double N[MAX_NUMBER_OF_MICROPLANES][6]
Normal projection tensors for all microplanes.
double computeNormalVolumetricStrainComponent(Microplane *mplane, const FloatArray &macroStrain)
Computes the normal volumetric component of macro strain on given microplane.
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
double microplaneWeights[MAX_NUMBER_OF_MICROPLANES]
Integration weights of microplanes.
IntegrationPointStatus * giveMaterialStatus()
Returns reference to associated material status (NULL if not defined).
Definition: gausspoint.h:205
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
std::vector< GaussPoint * > gaussPoints
List of slave integration points.
Definition: gausspoint.h:114
Class representing the general Input Record.
Definition: inputrecord.h:101
#define _IFT_MicroplaneMaterial_e
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
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
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
virtual IntegrationPointStatus * giveMicroplaneStatus(GaussPoint *gp)
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: femcmpnn.C:64
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
the oofem namespace is to define a context or scope in which all oofem names are defined.
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
virtual contextIOResultType restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp)
Reads integration point state to output stream.
int giveNumber() const
Definition: femcmpnn.h:107
Bad object passed.
double computeShearLStrainComponent(Microplane *mplane, const FloatArray &macroStrain)
Computes the shear component (in l direction) of macro strain on given microplane.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
Abstract base class representing a integration status.
double Kronecker[6]
Kronecker&#39;s delta.
void computeStrainVectorComponents(FloatArray &answer, Microplane *mplane, const FloatArray &macroStrain)
Computes the vector of all micro stress components (Ev, En, Em, El) of macro strain vector on given m...
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:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011