OOFEM 3.0
Loading...
Searching...
No Matches
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 - 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 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 "gausspoint.h"
37#include "floatarray.h"
38#include "contextioerr.h"
39#include "mathfem.h"
40#include "dynamicinputrecord.h"
41
42namespace oofem {
43
44double
45MicroplaneMaterial :: giveMicroplaneIntegrationWeight(int mnumber) const
46{
47 return microplaneWeights [ mnumber - 1 ];
48}
49
50double
51MicroplaneMaterial :: computeNormalStrainComponent(int mnumber,
52 const FloatArray &macroStrain) const
53{
54 double en = 0.0;
55 for ( int i = 0; i < 6; i++ ) {
56 en += N [ mnumber - 1 ] [ i ] * macroStrain[ i ];
57 }
58
59 return en;
60}
61
62double
63MicroplaneMaterial :: computeNormalVolumetricStrainComponent(const FloatArray &macroStrain) const
64{
65 return ( macroStrain.at(1) + macroStrain.at(2) + macroStrain.at(3) ) / 3.0;
66}
67
68double
69MicroplaneMaterial :: computeNormalDeviatoricStrainComponent(int mnumber,
70 const FloatArray &macroStrain) const
71{
72 return this->computeNormalStrainComponent(mnumber, macroStrain) -
74}
75
76double
77MicroplaneMaterial :: computeShearMStrainComponent(int mnumber,
78 const FloatArray &macroStrain) const
79{
80 double em = 0.0;
81 for ( int i = 0; i < 6; i++ ) {
82 em += M [ mnumber - 1 ] [ i ] * macroStrain[ i ];
83 }
84
85 return em;
86}
87
88double
89MicroplaneMaterial :: computeShearLStrainComponent(int mnumber,
90 const FloatArray &macroStrain) const
91{
92 double el = 0.0;
93
94 for ( int i = 0; i < 6; i++ ) {
95 el += L [ mnumber - 1 ] [ i ] * macroStrain[ i ];
96 }
97
98 return el;
99}
100
102MicroplaneMaterial :: computeStrainVectorComponents(int mnumber,
103 const FloatArray &macroStrain) const
104{
106
107 for ( int i = 0; i < 6; i++ ) {
108 e.n += N [ mnumber - 1 ] [ i ] * macroStrain [ i ];
109 e.m += M [ mnumber - 1 ] [ i ] * macroStrain [ i ];
110 e.l += L [ mnumber - 1 ] [ i ] * macroStrain [ i ];
111 }
112
113 e.v = ( macroStrain.at(1) + macroStrain.at(2) + macroStrain.at(3) ) / 3.0;
114 return e;
115}
116
117
119MicroplaneMaterial :: give3dMaterialStiffnessMatrix(MatResponseMode mode,
120 GaussPoint *gp,
121 TimeStep *tStep) const
122{
123 FloatMatrixF<6,6> answer;
124 // elastic stiffness matrix
125 answer.at(4, 4) = answer.at(5, 5) = answer.at(6, 6) = E / ( 2. + 2. * nu );
126 answer.at(1, 1) = answer.at(2, 2) = answer.at(3, 3) = E * ( 1. - nu ) / ( ( 1. + nu ) * ( 1. - 2. * nu ) );
127 answer.at(1, 2) = answer.at(2, 1) = answer.at(1, 3) = answer.at(3, 1) =
128 answer.at(2, 3) = answer.at(3, 2) = E * nu / ( ( 1. + nu ) * ( 1. - 2. * nu ) );
129 return answer;
130}
131
132void
133MicroplaneMaterial :: initializeFrom(InputRecord &ir)
134{
135 StructuralMaterial :: initializeFrom(ir);
136
137 // elastic constants
140 // number of microplanes
143}
144
145
146void
147MicroplaneMaterial :: giveInputRecord(DynamicInputRecord &input)
148{
149 StructuralMaterial :: giveInputRecord(input);
151}
152
153
154void
155MicroplaneMaterial :: initializeData(int numberOfMicroplanes)
156{
157 int ij [ 6 ] [ 2 ] = { { 1, 1 }, { 2, 2 }, { 3, 3 }, { 2, 3 }, { 3, 1 }, { 1, 2 } };
158
159 // kronecker delta
160 Kronecker [ 0 ] = 1.;
161 Kronecker [ 1 ] = 1.;
162 Kronecker [ 2 ] = 1.;
163 Kronecker [ 3 ] = 0.;
164 Kronecker [ 4 ] = 0.;
165 Kronecker [ 5 ] = 0.;
166
167 // definition of intergation points and weights
170 M.resize(numberOfMicroplanes);
171 N.resize(numberOfMicroplanes);
172 L.resize(numberOfMicroplanes);
173
174 if ( numberOfMicroplanes == 28 ) {
175 for ( int i = 0; i < 4; i++ ) {
176 microplaneWeights [ i ] = 0.0160714276E0;
177 microplaneWeights [ i + 4 ] = 0.0204744730E0;
178 microplaneWeights [ i + 8 ] = 0.0204744730E0;
179 microplaneWeights [ i + 12 ] = 0.0204744730E0;
180 microplaneWeights [ i + 16 ] = 0.0158350505E0;
181 microplaneWeights [ i + 20 ] = 0.0158350505E0;
182 microplaneWeights [ i + 24 ] = 0.0158350505E0;
183 }
184
185 double help [ 7 ] [ 3 ] = {
186 { .577350259E0, .577350259E0, .577350259E0 }, { .935113132E0, .250562787E0, .250562787E0 },
187 { .250562787E0, .935113132E0, .250562787E0 }, { .250562787E0, .250562787E0, .935113132E0 },
188 { .186156720E0, .694746614E0, .694746614E0 }, { .694746614E0, .186156720E0, .694746614E0 },
189 { .694746614E0, .694746614E0, .186156720E0 }
190 };
191 for ( int i = 0; i < 7; i++ ) {
192 int i4 = i * 4;
193 microplaneNormals [ i4 ] [ 0 ] = help [ i ] [ 0 ];
194 microplaneNormals [ i4 ] [ 1 ] = help [ i ] [ 1 ];
195 microplaneNormals [ i4 ] [ 2 ] = help [ i ] [ 2 ];
196 microplaneNormals [ i4 + 1 ] [ 0 ] = help [ i ] [ 0 ];
197 microplaneNormals [ i4 + 1 ] [ 1 ] = help [ i ] [ 1 ];
198 microplaneNormals [ i4 + 1 ] [ 2 ] = -help [ i ] [ 2 ];
199 microplaneNormals [ i4 + 2 ] [ 0 ] = help [ i ] [ 0 ];
200 microplaneNormals [ i4 + 2 ] [ 1 ] = -help [ i ] [ 1 ];
201 microplaneNormals [ i4 + 2 ] [ 2 ] = help [ i ] [ 2 ];
202 microplaneNormals [ i4 + 3 ] [ 0 ] = help [ i ] [ 0 ];
203 microplaneNormals [ i4 + 3 ] [ 1 ] = -help [ i ] [ 1 ];
204 microplaneNormals [ i4 + 3 ] [ 2 ] = -help [ i ] [ 2 ];
205 }
206
207 /*
208 * // compute projection tensors for each microplane
209 * int ii,jj;
210 * FloatArray n(3), m(3), l(3);
211 * double aux;
212 *
213 * for (mPlane=0; mPlane < numberOfMicroplanes; mPlane++) {
214 * //prohozemo poradi os normal, aby smer 3 byl na prvnim miste
215 * n.at(1) = microplaneNormals[mPlane][2];
216 * n.at(2) = microplaneNormals[mPlane][1];
217 * n.at(3) = microplaneNormals[mPlane][0];
218 *
219 * if ((mPlane+1)%3 == 0) {
220 * aux = sqrt (n.at(1)*n.at(1) + n.at(2)*n.at(2));
221 * m.at(1) = n.at(2)/aux;
222 * m.at(2) = -n.at(1)/aux;
223 * m.at(3) = 0.0;
224 * } else if ((mPlane+1)%3 == 1) {
225 * aux = sqrt (n.at(2)*n.at(2) + n.at(3)*n.at(3));
226 * m.at(1) = 0.0;
227 * m.at(2) = n.at(3)/aux;
228 * m.at(3) = -n.at(2)/aux;
229 * } else {
230 * aux = sqrt (n.at(1)*n.at(1) + n.at(3)*n.at(3));
231 * m.at(1) = n.at(3)/aux;
232 * m.at(2) = 0.0;
233 * m.at(3) = -n.at(1)/aux;
234 * }
235 *
236 *
237 * l.beVectorProductOf (m,n);
238 *
239 * for (int i=0; i<6; i++) {
240 * ii = ij[i][0];
241 * jj = ij[i][1];
242 * N[mPlane][i] = n.at(ii)*n.at(jj);
243 * M[mPlane][i] = 0.5*(m.at(ii)*n.at(jj) + m.at(jj)*n.at(ii)) ;
244 * L[mPlane][i] = 0.5*(l.at(ii)*n.at(jj) + l.at(jj)*n.at(ii)) ;
245 * }
246 *
247 *
248 * } */
249 } else if ( numberOfMicroplanes == 21 ) {
250 for ( int i = 0; i < 3; i++ ) {
251 microplaneWeights [ i ] = 0.02652141274;
252 }
253
254 for ( int i = 3; i < 9; i++ ) {
255 microplaneWeights [ i ] = 0.01993014153;
256 }
257
258 for ( int i = 9; i < 21; i++ ) {
259 microplaneWeights [ i ] = 0.02507124272;
260 }
261
262
263 microplaneNormals [ 0 ] [ 0 ] = microplaneNormals [ 1 ] [ 1 ] = microplaneNormals [ 2 ] [ 2 ] = 1.;
264 microplaneNormals [ 0 ] [ 1 ] = microplaneNormals [ 0 ] [ 2 ] = microplaneNormals [ 1 ] [ 0 ] =
265 microplaneNormals [ 1 ] [ 2 ] = microplaneNormals [ 2 ] [ 0 ] = microplaneNormals [ 2 ] [ 1 ] = 0.;
266 microplaneNormals [ 3 ] [ 0 ] = microplaneNormals [ 3 ] [ 1 ] = microplaneNormals [ 4 ] [ 0 ] =
267 microplaneNormals [ 5 ] [ 0 ] = microplaneNormals [ 5 ] [ 2 ] = microplaneNormals [ 6 ] [ 0 ] =
268 microplaneNormals [ 7 ] [ 1 ] = microplaneNormals [ 7 ] [ 2 ] = microplaneNormals [ 8 ] [ 1 ] =
269 0.7071067812;
270 microplaneNormals [ 4 ] [ 1 ] = microplaneNormals [ 6 ] [ 2 ] = microplaneNormals [ 8 ] [ 2 ] =
271 -0.7071067812;
272 microplaneNormals [ 3 ] [ 2 ] = microplaneNormals [ 4 ] [ 2 ] = microplaneNormals [ 5 ] [ 1 ] =
273 microplaneNormals [ 6 ] [ 1 ] = microplaneNormals [ 7 ] [ 0 ] = microplaneNormals [ 8 ] [ 0 ] = 0.;
274
275
276 double help [ 3 ] [ 3 ] = { { 0.3879072746, 0.3879072746, 0.8360956240 },
277 { 0.3879072746, 0.8360956240, 0.3879072746 },
278 { 0.8360956240, 0.3879072746, 0.3879072746 } };
279
280 for ( int i = 0; i < 3; i++ ) {
281 int i4 = i * 4;
282 microplaneNormals [ 9 + i4 ] [ 0 ] = help [ i ] [ 0 ];
283 microplaneNormals [ 9 + i4 ] [ 1 ] = help [ i ] [ 1 ];
284 microplaneNormals [ 9 + i4 ] [ 2 ] = help [ i ] [ 2 ];
285
286 microplaneNormals [ 10 + i4 ] [ 0 ] = help [ i ] [ 0 ];
287 microplaneNormals [ 10 + i4 ] [ 1 ] = help [ i ] [ 1 ];
288 microplaneNormals [ 10 + i4 ] [ 2 ] = -help [ i ] [ 2 ];
289
290 microplaneNormals [ 11 + i4 ] [ 0 ] = help [ i ] [ 0 ];
291 microplaneNormals [ 11 + i4 ] [ 1 ] = -help [ i ] [ 1 ];
292 microplaneNormals [ 11 + i4 ] [ 2 ] = help [ i ] [ 2 ];
293
294 microplaneNormals [ 12 + i4 ] [ 0 ] = help [ i ] [ 0 ];
295 microplaneNormals [ 12 + i4 ] [ 1 ] = -help [ i ] [ 1 ];
296 microplaneNormals [ 12 + i4 ] [ 2 ] = -help [ i ] [ 2 ];
297 }
298
299
300 /* // compute projection tensors for each microplane
301 * int ii,jj;
302 * FloatArray n(3), m(3), l(3);
303 * double aux;
304 *
305 * for (mPlane=0; mPlane < numberOfMicroplanes; mPlane++) {
306 * n.at(1) = microplaneNormals[mPlane][0];
307 * n.at(2) = microplaneNormals[mPlane][1];
308 * n.at(3) = microplaneNormals[mPlane][2];
309 *
310 * if ((mPlane+1)%3 == 0) {
311 * aux = sqrt (n.at(1)*n.at(1) + n.at(2)*n.at(2));
312 * if(fabs(aux) > 1.0e-8){
313 * m.at(1) = n.at(2)/aux;
314 * m.at(2) = -n.at(1)/aux;
315 * m.at(3) = 0.0;
316 * }
317 * else {
318 * m.at(1) = 1.0;
319 * m.at(2) = 0.0;
320 * m.at(3) = 0.0;
321 * }
322 * } else if ((mPlane+1)%3 == 1) {
323 * aux = sqrt (n.at(2)*n.at(2) + n.at(3)*n.at(3));
324 * if(fabs(aux) > 1.0e-8){
325 * m.at(1) = 0.0;
326 * m.at(2) = n.at(3)/aux;
327 * m.at(3) = -n.at(2)/aux;
328 * }
329 * else {
330 * m.at(1) = 0.0;
331 * m.at(2) = 1.0;
332 * m.at(3) = 0.0;
333 * }
334 * } else {
335 * aux = sqrt (n.at(1)*n.at(1) + n.at(3)*n.at(3));
336 * if(fabs(aux) > 1.0e-8){
337 * m.at(1) = n.at(3)/aux;
338 * m.at(2) = 0.0;
339 * m.at(3) = -n.at(1)/aux;
340 * }
341 * else {
342 * m.at(1) = 0.0;
343 * m.at(2) = 0.0;
344 * m.at(3) = 1.0;
345 * }
346 * }
347 *
348 *
349 * l.beVectorProductOf (m,n);
350 *
351 * for (i=0; i<6; i++) {
352 * ii = ij[i][0];
353 * jj = ij[i][1];
354 *
355 * N[mPlane][i] = n.at(ii)*n.at(jj);
356 * M[mPlane][i] = 0.5*(m.at(ii)*n.at(jj) + m.at(jj)*n.at(ii)) ;
357 * L[mPlane][i] = 0.5*(l.at(ii)*n.at(jj) + l.at(jj)*n.at(ii)) ;
358 *
359 * // printf("\n i= %d,N= %lf,L= %lf,M= %lf \n",i,N[mPlane][i],L[mPlane][i],M[mPlane][i]);
360 * }
361 *
362 * }
363 *
364 */
365 } else if ( numberOfMicroplanes == 61 ) {
366 double help [ 61 ] [ 4 ] = {
367 { 1.000000000000, 0.000000000000, 0.000000000000, 0.00795844204678 },
368 { 0.745355992500, 0.0, 0.666666666667, 0.00795844204678 },
369 { 0.745355992500, -0.577350269190, -0.333333333333, 0.00795844204678 },
370 { 0.745355992500, 0.577350269190, -0.333333333333, 0.00795844204678 },
371 { 0.333333333333, 0.577350269190, 0.745355992500, 0.00795844204678 },
372 { 0.333333333333, -0.577350269190, 0.745355992500, 0.00795844204678 },
373 { 0.333333333333, -0.934172358963, 0.127322003750, 0.00795844204678 },
374 { 0.333333333333, -0.356822089773, -0.872677996250, 0.00795844204678 },
375 { 0.333333333333, 0.356822089773, -0.872677996250, 0.00795844204678 },
376 { 0.333333333333, 0.934172358963, 0.127322003750, 0.00795844204678 },
377 { 0.794654472292, -0.525731112119, 0.303530999103, 0.0105155242892 },
378 { 0.794654472292, 0.0, -0.607061998207, 0.0105155242892 },
379 { 0.794654472292, 0.525731112119, 0.303530999103, 0.0105155242892 },
380 { 0.187592474085, 0.0, 0.982246946377, 0.0105155242892 },
381 { 0.187592474085, -0.850650808352, -0.491123473188, 0.0105155242892 },
382 { 0.187592474085, 0.850650808352, -0.491123473188, 0.0105155242892 },
383 { 0.934172358963, 0.0, 0.356822089773, 0.0100119364272 },
384 { 0.934172358963, -0.309016994375, -0.178411044887, 0.0100119364272 },
385 { 0.934172358963, 0.309016994375, -0.178411044887, 0.0100119364272 },
386 { 0.577350269190, 0.309016994375, 0.755761314076, 0.0100119364272 },
387 { 0.577350269190, -0.309016994375, 0.755761314076, 0.0100119364272 },
388 { 0.577350269190, -0.809016994375, -0.110264089708, 0.0100119364272 },
389 { 0.577350269190, -0.5, -0.645497224368, 0.0100119364272 },
390 { 0.577350269190, 0.5, -0.645497224368, 0.0100119364272 },
391 { 0.577350269190, 0.809016994375, -0.110264089708, 0.0100119364272 },
392 { 0.356822089773, -0.809016994375, 0.467086179481, 0.0100119364272 },
393 { 0.356822089773, 0.0, -0.934172358963, 0.0100119364272 },
394 { 0.356822089773, 0.809016994375, 0.467086179481, 0.0100119364272 },
395 { 0.0, 0.5, 0.866025403784, 0.0100119364272 },
396 { 0.0, -1.0, 0.0, 0.0100119364272 },
397 { 0.0, 0.5, -0.866025403784, 0.0100119364272 },
398 { 0.947273580412, -0.277496978165, 0.160212955043, 0.00690477957966 },
399 { 0.812864676392, -0.277496978165, 0.512100034157, 0.00690477957966 },
400 { 0.595386501297, -0.582240127941, 0.553634669695, 0.00690477957966 },
401 { 0.595386501297, -0.770581752342, 0.227417407053, 0.00690477957966 },
402 { 0.812864676392, -0.582240127941, -0.015730584514, 0.00690477957966 },
403 { 0.492438766306, -0.753742692223, -0.435173546254, 0.00690477957966 },
404 { 0.274960591212, -0.942084316623, -0.192025554687, 0.00690477957966 },
405 { -0.076926487903, -0.942084316623, -0.326434458707, 0.00690477957966 },
406 { -0.076926487903, -0.753742692223, -0.652651721349, 0.00690477957966 },
407 { 0.274960591212, -0.637341166847, -0.719856173359, 0.00690477957966 },
408 { 0.947273580412, 0.0, -0.320425910085, 0.00690477957966 },
409 { 0.812864676392, -0.304743149777, -0.496369449643, 0.00690477957966 },
410 { 0.595386501297, -0.188341624401, -0.781052076747, 0.00690477957966 },
411 { 0.595386501297, 0.188341624401, -0.781052076747, 0.00690477957966 },
412 { 0.812864676392, 0.304743149777, -0.496369449643, 0.00690477957966 },
413 { 0.492438766306, 0.753742692223, -0.435173546254, 0.00690477957966 },
414 { 0.274960591212, 0.637341166847, -0.719856173359, 0.00690477957966 },
415 { -0.076926487903, 0.753742692223, -0.652651721349, 0.00690477957966 },
416 { -0.076926487903, 0.942084316623, -0.326434458707, 0.00690477957966 },
417 { 0.274960591212, 0.942084316623, -0.192025554687, 0.00690477957966 },
418 { 0.947273580412, 0.277496978165, 0.160212955043, 0.00690477957966 },
419 { 0.812864676392, 0.582240127941, -0.015730584514, 0.00690477957966 },
420 { 0.595386501297, 0.770581752342, 0.227417407053, 0.00690477957966 },
421 { 0.595386501297, 0.582240127941, 0.553634669695, 0.00690477957966 },
422 { 0.812864676392, 0.277496978165, 0.512100034157, 0.00690477957966 },
423 { 0.492438766306, 0.0, 0.870347092509, 0.00690477957966 },
424 { 0.274960591212, 0.304743149777, 0.911881728046, 0.00690477957966 },
425 { -0.076926487903, 0.188341624401, 0.979086180056, 0.00690477957966 },
426 { -0.076926487903, -0.188341624401, 0.979086180056, 0.00690477957966 },
427 { 0.274960591212, -0.304743149777, 0.911881728046, 0.00690477957966 }
428 };
429
430 for ( int i = 0; i < numberOfMicroplanes; i++ ) {
431 microplaneNormals [ i ] [ 0 ] = help [ i ] [ 0 ];
432 microplaneNormals [ i ] [ 1 ] = help [ i ] [ 1 ];
433 microplaneNormals [ i ] [ 2 ] = help [ i ] [ 2 ];
434 microplaneWeights [ i ] = help [ i ] [ 3 ];
435 }
436
437 /*
438 * // compute projection tensors for each microplane
439 * int ii,jj;
440 * FloatArray n(3), m(3), l(3);
441 * double aux;
442 *
443 * for (int mPlane=0; mPlane < numberOfMicroplanes; mPlane++) {
444 * n.at(1) = microplaneNormals[mPlane][0];
445 * n.at(2) = microplaneNormals[mPlane][1];
446 * n.at(3) = microplaneNormals[mPlane][2];
447 *
448 * //if ((mPlane+1)%3 == 0) {
449 * aux = sqrt (n.at(1)*n.at(1) + n.at(2)*n.at(2));
450 * if(fabs(aux) > 1.0e-8){
451 * m.at(1) = n.at(2)/aux;
452 * m.at(2) = -n.at(1)/aux;
453 * m.at(3) = 0.0;
454 * }
455 * else {
456 * m.at(1) = 1.0;
457 * m.at(2) = 0.0;
458 * m.at(3) = 0.0;
459 * }
460 *
461 * l.beVectorProductOf (m,n);
462 *
463 *
464 *
465 * for (i=0; i<6; i++) {
466 * ii = ij[i][0];
467 * jj = ij[i][1];
468 *
469 * N[mPlane][i] = n.at(ii)*n.at(jj);
470 * M[mPlane][i] = 0.5*(m.at(ii)*n.at(jj) + m.at(jj)*n.at(ii)) ;
471 * L[mPlane][i] = 0.5*(l.at(ii)*n.at(jj) + l.at(jj)*n.at(ii)) ;
472 *
473 *
474 * }
475 *
476 *
477 *
478 * }
479 */
480 } else {
481 OOFEM_ERROR("Unsupported number of microplanes");
482 }
483
484 // compute projection tensors for each microplane
485 FloatArray m(3), l(3);
486
487 for ( int mPlane = 0; mPlane < numberOfMicroplanes; mPlane++ ) {
488 auto n = microplaneNormals [ mPlane ];
489
490 if ( ( mPlane + 1 ) % 3 == 0 ) {
491 double aux = sqrt( n.at(1) * n.at(1) + n.at(2) * n.at(2) );
492 if ( fabs(aux) > 1.0e-12 ) {
493 m.at(1) = n.at(2) / aux;
494 m.at(2) = -n.at(1) / aux;
495 m.at(3) = 0.0;
496 } else {
497 m.at(1) = 1.0;
498 m.at(2) = 0.0;
499 m.at(3) = 0.0;
500 }
501 } else if ( ( mPlane + 1 ) % 3 == 1 ) {
502 double aux = sqrt( n.at(2) * n.at(2) + n.at(3) * n.at(3) );
503 if ( fabs(aux) > 1.0e-12 ) {
504 m.at(1) = 0.0;
505 m.at(2) = n.at(3) / aux;
506 m.at(3) = -n.at(2) / aux;
507 } else {
508 m.at(1) = 0.0;
509 m.at(2) = 1.0;
510 m.at(3) = 0.0;
511 }
512 } else {
513 double aux = sqrt( n.at(1) * n.at(1) + n.at(3) * n.at(3) );
514 if ( fabs(aux) > 1.0e-12 ) {
515 m.at(1) = n.at(3) / aux;
516 m.at(2) = 0.0;
517 m.at(3) = -n.at(1) / aux;
518 } else {
519 m.at(1) = 0.0;
520 m.at(2) = 0.0;
521 m.at(3) = 1.0;
522 }
523 }
524
525
526 l.beVectorProductOf(m, n);
527
528 for ( int i = 0; i < 6; i++ ) {
529 int ii = ij [ i ] [ 0 ];
530 int jj = ij [ i ] [ 1 ];
531
532 N [ mPlane ] [ i ] = n.at(ii) * n.at(jj);
533 M [ mPlane ] [ i ] = 0.5 * ( m.at(ii) * n.at(jj) + m.at(jj) * n.at(ii) );
534 L [ mPlane ] [ i ] = 0.5 * ( l.at(ii) * n.at(jj) + l.at(jj) * n.at(ii) );
535 }
536 }
537}
538} // end namespace oofem
void setField(int item, InputFieldType id)
double & at(Index i)
Definition floatarray.h:202
void beVectorProductOf(const FloatArray &v1, const FloatArray &v2)
Definition floatarray.C:476
double at(std::size_t i, std::size_t j) const
std::vector< FloatArrayF< 6 > > N
FloatArray microplaneWeights
Integration weights of microplanes.
virtual void initializeData(int numberOfMicroplanes)
double E
Young's modulus.
std::vector< FloatArrayF< 3 > > microplaneNormals
Normals of microplanes.
int numberOfMicroplanes
Number of microplanes.
FloatArrayF< 6 > Kronecker
Kronecker's delta.
std::vector< FloatArrayF< 6 > > M
double nu
Poisson's ratio.
std::vector< FloatArrayF< 6 > > L
double computeNormalStrainComponent(int mnumber, const FloatArray &macroStrain) const
double computeNormalVolumetricStrainComponent(const FloatArray &macroStrain) const
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
#define _IFT_MicroplaneMaterial_nmp
#define _IFT_MicroplaneMaterial_e
#define _IFT_MicroplaneMaterial_n
Defines the stress or strain state in a micro plane.

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