OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
stressvector.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 "stressvector.h"
36 #include "strainvector.h"
37 #include "mathfem.h"
38 #include "floatarray.h"
39 #include "floatmatrix.h"
40 #include "error.h"
41 #include "mathfem.h"
42 
43 namespace oofem {
45 { }
46 
48 { }
49 
50 void
52 {
53  MaterialMode myMode = this->giveStressStrainMode();
54 
55  if ( myMode == _1dMat ) {
56  // 1D model
57  OOFEM_ERROR("No Split for 1D!");
58  // dev.resize(1); dev.at(1) = 0.0;
59  // vol = this->at (1);
60  } else if ( myMode == _PlaneStress ) {
61  // plane stress problem
62  OOFEM_ERROR("No Split for plane stress!");
63  // dev = *this;
64  // vol = (this->at(1)+this->at(2))/2.0;
65  // dev.at(1) -= vol;
66  // dev.at(2) -= vol;
67  } else {
68  // 3d, plane strain or axisymmetric problem
69  dev = * this;
70  vol = ( this->at(1) + this->at(2) + this->at(3) ) / 3.0;
71  dev.at(1) -= vol;
72  dev.at(2) -= vol;
73  dev.at(3) -= vol;
74  }
75 }
76 
77 void
79 {
80  MaterialMode myMode = this->giveStressStrainMode();
81 
82  if ( myMode == _1dMat ) {
83  // 1D model
84  OOFEM_ERROR("No sum for 1D!");
85  // dev.resize(1); dev.at(1) = 0.0;
86  // vol = this->at (1);
87  } else if ( myMode == _PlaneStress ) {
88  // plane stress problem
89  OOFEM_ERROR("No sum for plane stress!");
90  // dev = *this;
91  // vol = (this->at(1)+this->at(2))/2.0;
92  // dev.at(1) -= vol;
93  // dev.at(2) -= vol;
94  } else {
95  // 3d, plane strain or axisymmetric problem
96  answer = * this;
97  for ( int i = 0; i < 3; i++ ) {
98  answer(i) += vol;
99  }
100  }
101 }
102 
103 void
105 {
106  //
107  // This function computes sorted principal values of a stress vector.
108  // Engineering notation is used.
109  //
110  MaterialMode myMode = this->giveStressStrainMode();
111  int size = this->giveSize();
112 
113  if ( myMode == _1dMat ) {
114  answer = * this;
115  } else if ( myMode == _PlaneStress ) {
116  // 2D problem
117  double ast, dst, D;
118  answer.resize(2);
119 
120  ast = this->at(1) + this->at(2);
121  dst = this->at(1) - this->at(2);
122  D = sqrt( dst * dst + 4.0 * this->at(3) * this->at(3) );
123  answer.at(1) = 0.5 * ( ast + D );
124  answer.at(2) = 0.5 * ( ast - D );
125  } else {
126  // 3D problem
127  double I1 = 0.0, I2 = 0.0, I3 = 0.0, s1, s2, s3;
128  FloatArray s;
129  int nonzeroFlag = 0;
130 
131  this->convertToFullForm(s);
132  for ( int i = 1; i <= size; i++ ) { // is this really needed?
133  if ( fabs( s.at(i) ) > 1.e-20 ) { // is there an underflow problem for small values?
134  nonzeroFlag = 1;
135  }
136  }
137 
138  answer.resize(3);
139  answer.zero();
140  if ( nonzeroFlag == 0 ) {
141  return;
142  }
143 
144  I1 = s.at(1) + s.at(2) + s.at(3);
145  I2 = s.at(1) * s.at(2) + s.at(2) * s.at(3) + s.at(3) * s.at(1) -
146  ( s.at(4) * s.at(4) + s.at(5) * s.at(5) + s.at(6) * s.at(6) );
147  I3 = s.at(1) * s.at(2) * s.at(3) + 2. * s.at(4) * s.at(5) * s.at(6) -
148  ( s.at(1) * s.at(4) * s.at(4) + s.at(2) * s.at(5) * s.at(5) +
149  s.at(3) * s.at(6) * s.at(6) );
150 
151  /*
152  * Call cubic3r to ensure that all three real eigenvalues will be found, because we have a symmetric tensor.
153  * This allows to overcome various rounding errors when solving general cubic equation.
154  */
155  int num;
156  cubic3r( ( double ) -1., I1, -I2, I3, & s1, & s2, & s3, &num);
157 
158  if (num > 0 ) {
159  answer.at(1) = s1;
160  }
161 
162  if (num > 1 ) {
163  answer.at(2) = s2;
164  }
165 
166  if (num > 2 ) {
167  answer.at(3) = s3;
168  }
169 
170  // sort results
171  for ( int i = 1; i < 3; i++ ) {
172  for ( int j = 1; j < 3; j++ ) {
173  if ( answer.at(j + 1) > answer.at(j) ) {
174  std :: swap( answer.at(j + 1), answer.at(j) );
175  }
176  }
177  }
178  }
179 }
180 
181 void
183 {
184  //
185  // This function cumputes Principal values & directions corresponding to receiver.
186  //
187  // Return Values:
188  //
189  // matrix dir -> principal directions of strains or stresses
190  // array sp -> principal strains or stresses
191  //
192 
193  FloatMatrix ss;
194  FloatArray sp;
195  int nval;
196  int nonzeroFlag = 0;
197  int size = this->giveSize();
198  MaterialMode myMode = this->giveStressStrainMode();
199 
200  if ( myMode == _1dMat ) {
201  answer = * this;
202  dir.resize(1, 1);
203  dir.at(1, 1) = 1.0;
204  return;
205  } else if ( myMode == _PlaneStress ) {
206  // 2D problem
207  ss.resize(2, 2);
208  answer.resize(2);
209 
210  for ( int i = 1; i <= size; i++ ) {
211  if ( fabs( this->at(i) ) > 1.e-20 ) {
212  nonzeroFlag = 1;
213  }
214  }
215 
216  if ( nonzeroFlag == 0 ) {
217  answer.zero();
218  ss.zero();
219  return;
220  }
221 
222  ss.at(1, 1) = this->at(1);
223  ss.at(2, 2) = this->at(2);
224  ss.at(1, 2) = ss.at(2, 1) = this->at(3);
225  } else {
226  // 3D problem
227  ss.resize(3, 3);
228  FloatArray s;
229 
230  answer.resize(3);
231 
232  this->convertToFullForm(s);
233  for ( int i = 1; i <= size; i++ ) {
234  if ( fabs( s.at(i) ) > 1.e-20 ) {
235  nonzeroFlag = 1;
236  }
237  }
238 
239  if ( nonzeroFlag == 0 ) {
240  answer.zero();
241  ss.zero();
242  return;
243  }
244 
245  ss.at(1, 1) = s.at(1);
246  ss.at(2, 2) = s.at(2);
247  ss.at(3, 3) = s.at(3);
248  ss.at(1, 2) = ss.at(2, 1) = s.at(6);
249  ss.at(1, 3) = ss.at(3, 1) = s.at(5);
250  ss.at(2, 3) = ss.at(3, 2) = s.at(4);
251  }
252 
253 #if 0
254  ss.Jacobi(& answer, & dir, & i);
255 #else
256  ss.jaco_(answer, dir, 10);
257 #endif
258  // sort results
259  nval = 3;
260  if ( myMode == _PlaneStress ) {
261  nval = 2;
262  }
263 
264  for ( int ii = 1; ii < nval; ii++ ) {
265  for ( int jj = 1; jj < nval; jj++ ) {
266  if ( answer.at(jj + 1) > answer.at(jj) ) {
267  // swap eigen values and eigen vectors
268  std :: swap( answer.at(jj + 1), answer.at(jj) );
269  for ( int kk = 1; kk <= nval; kk++ ) {
270  std :: swap( dir.at(kk, jj + 1), dir.at(kk, jj) );
271  }
272  }
273  }
274  }
275 }
276 
277 void
279 {
280  printf("StressVector (MaterialMode %d)\n", mode);
281  for ( double x : *this ) {
282  printf("%10.3e ", x);
283  }
284 
285  printf("\n");
286 }
287 
288 
289 
290 double
292 {
293  //
294  // This function computes the first invariant
295  // of the stress vector
296  //
298  if ( myMode == _1dMat ) {
299  // 1d problem
300  return values [ 0 ];
301  } else if ( myMode == _PlaneStress ) {
302  // 2d problem: plane stress
303  return values [ 0 ] + values [ 1 ];
304  } else {
305  // plane strain, axisymmetry or full 3d
306  return values [ 0 ] + values [ 1 ] + values [ 2 ];
307  }
308 }
309 
310 double
312 {
313  //
314  // This function computes the second invariant of
315  // of the deviatoric stress vector
316  //
318  if ( myMode == _1dMat ) {
319  // 1d problem
320  return .5 * values [ 0 ] * values [ 0 ];
321  } else if ( myMode == _PlaneStress ) {
322  // 2d problem: plane stress
323  return .5 * ( values [ 0 ] * values [ 0 ] + values [ 1 ] * values [ 1 ] ) + values [ 2 ] * values [ 2 ];
324  } else if ( myMode == _PlaneStrain ) {
325  // plane strain or axisymmetry
326  return .5 * ( values [ 0 ] * values [ 0 ] + values [ 1 ] * values [ 1 ] + values [ 2 ] * values [ 2 ] ) +
327  values [ 3 ] * values [ 3 ];
328  } else {
329  // 3d problem
330  return .5 * ( values [ 0 ] * values [ 0 ] + values [ 1 ] * values [ 1 ] + values [ 2 ] * values [ 2 ] ) +
331  values [ 3 ] * values [ 3 ] + values [ 4 ] * values [ 4 ] + values [ 5 ] * values [ 5 ];
332  }
333 }
334 
335 double
337 {
338  //
339  // This function computes the third invariant
340  // of the deviatoric stress vector.
341  //
343  if ( myMode == _1dMat ) {
344  // 1d problem
345  return ( 1. / 3. ) * values [ 0 ] * values [ 0 ] * values [ 0 ];
346  } else if ( myMode == _PlaneStress ) {
347  // 2d problem: plane stress
348  return ( 1. / 3. ) * ( values [ 0 ] * values [ 0 ] * values [ 0 ] + 3. * values [ 1 ] * values [ 2 ] * values [ 2 ]
349  + 3. * values [ 0 ] * values [ 2 ] * values [ 2 ] + values [ 1 ] * values [ 1 ] * values [ 1 ] );
350  } else if ( myMode == _PlaneStrain ) {
351  // plane strain or axisymmetry
352  return ( 1. / 3. ) * ( values [ 0 ] * values [ 0 ] * values [ 0 ] + 3. * values [ 0 ] * values [ 3 ] * values [ 3 ] +
353  3. * values [ 1 ] * values [ 3 ] * values [ 3 ] + values [ 1 ] * values [ 1 ] * values [ 1 ] +
354  values [ 2 ] * values [ 2 ] * values [ 2 ] );
355  } else {
356  // 3d problem
357  return ( 1. / 3. ) * ( values [ 0 ] * values [ 0 ] * values [ 0 ] + 3. * values [ 0 ] * values [ 5 ] * values [ 5 ] +
358  3. * values [ 0 ] * values [ 4 ] * values [ 4 ] + 6. * values [ 3 ] * values [ 5 ] * values [ 4 ] +
359  3. * values [ 1 ] * values [ 5 ] * values [ 5 ] + 3 * values [ 2 ] * values [ 4 ] * values [ 4 ] +
360  values [ 1 ] * values [ 1 ] * values [ 1 ] + 3. * values [ 1 ] * values [ 3 ] * values [ 3 ] +
361  3. * values [ 2 ] * values [ 3 ] * values [ 3 ] + values [ 2 ] * values [ 2 ] * values [ 2 ] );
362  }
363 }
364 
365 
366 void
368  double &rho,
369  double &theta) const
370 {
371  xsi = this->computeFirstCoordinate();
372 
373  StressVector deviatoricStress( this->giveStressStrainMode() );
374  double volumetricStress;
375  this->computeDeviatoricVolumetricSplit(deviatoricStress, volumetricStress);
376  rho = deviatoricStress.computeSecondCoordinate();
377  theta = deviatoricStress.computeThirdCoordinate();
378 }
379 
380 
381 double
383 {
384  //
385  // This function computes the first Haigh-Westergaard coordinate
386  // from the stress state
387  //
388  return computeFirstInvariant() / sqrt(3.);
389 }
390 
391 double
393 {
394  //
395  // This function computes the second Haigh-Westergaard coordinate
396  // from the deviatoric stress state
397  //
398  return sqrt( 2. * computeSecondInvariant() );
399 }
400 
401 double
403 {
404  //
405  // This function computes the third Haigh-Westergaard coordinate
406  // from the deviatoric stress state
407  //
408  double c1 = 0.0;
409  if ( computeSecondInvariant() == 0. ) {
410  c1 = 0.0;
411  } else {
412  c1 = ( 3. * sqrt(3.) / 2. ) * computeThirdInvariant() / ( pow( computeSecondInvariant(), ( 3. / 2. ) ) );
413  }
414 
415  if ( c1 > 1.0 ) {
416  c1 = 1.0;
417  }
418 
419  if ( c1 < -1.0 ) {
420  c1 = -1.0;
421  }
422 
423  return 1. / 3. * acos(c1);
424 }
425 
426 void
427 StressVector :: applyElasticCompliance(StrainVector &strain, const double EModulus, const double nu) const
428 {
429  //
430  // This function multiplies the receiver by the elastic compliance matrix
431  // and stores the result in strain
432  //
434  if ( myMode == _1dMat ) {
435  strain(0) = values [ 0 ] / EModulus;
436  } else if ( myMode == _PlaneStress ) {
437  strain(0) = ( values [ 0 ] - nu * values [ 1 ] ) / EModulus;
438  strain(1) = ( -nu * values [ 0 ] + values [ 1 ] ) / EModulus;
439  strain(2) = ( ( 2. + 2. * nu ) * values [ 2 ] ) / EModulus;
440  } else if ( myMode == _PlaneStrain ) {
441  strain(0) = ( values [ 0 ] - nu * values [ 1 ] - nu * values [ 2 ] ) / EModulus;
442  strain(1) = ( -nu * values [ 0 ] + values [ 1 ] - nu * values [ 2 ] ) / EModulus;
443  strain(2) = ( -nu * values [ 0 ] - nu * values [ 1 ] + values [ 2 ] ) / EModulus;
444  strain(3) = 2. * ( 1. + nu ) * values [ 3 ] / EModulus;
445  } else {
446  strain(0) = ( values [ 0 ] - nu * values [ 1 ] - nu * values [ 2 ] ) / EModulus;
447  strain(1) = ( -nu * values [ 0 ] + values [ 1 ] - nu * values [ 2 ] ) / EModulus;
448  strain(2) = ( -nu * values [ 0 ] - nu * values [ 1 ] + values [ 2 ] ) / EModulus;
449  strain(3) = ( 2. * ( 1. + nu ) * values [ 3 ] ) / EModulus;
450  strain(4) = ( 2. * ( 1. + nu ) * values [ 4 ] ) / EModulus;
451  strain(5) = ( 2. * ( 1. + nu ) * values [ 5 ] ) / EModulus;
452  }
453 }
454 
455 void
457  const double EModulus,
458  const double nu) const
459 {
460  //
461  // This function applies the elastic compliance to the deviatoric strain vector
462  //
463  applyDeviatoricElasticCompliance( strain, EModulus / 2. / ( 1. + nu ) );
464 }
465 
466 void
468  const double GModulus) const
469 {
470  //
471  // This function applies the elastic compliance to the deviatoric strain vector
472  //
474  if ( myMode == _1dMat ) {
475  OOFEM_ERROR("No Split for 1D");
476  } else if ( myMode == _PlaneStress ) {
477  OOFEM_ERROR("No Split for Plane Stress");
478  } else if ( myMode == _PlaneStrain ) {
479  strain(0) = 1. / ( 2. * GModulus ) * values [ 0 ];
480  strain(1) = 1. / ( 2. * GModulus ) * values [ 1 ];
481  strain(2) = 1. / ( 2. * GModulus ) * values [ 2 ];
482  strain(3) = 1. / GModulus * values [ 3 ];
483  } else if ( myMode == _PlaneStrainGrad ) {
484  strain(0) = 1. / ( 2. * GModulus ) * values [ 0 ];
485  strain(1) = 1. / ( 2. * GModulus ) * values [ 1 ];
486  strain(2) = 1. / ( 2. * GModulus ) * values [ 2 ];
487  strain(3) = 1. / GModulus * values [ 3 ];
488  strain(4) = values [ 4 ];
489  } else {
490  strain(0) = 1. / ( 2. * GModulus ) * values [ 0 ];
491  strain(1) = 1. / ( 2. * GModulus ) * values [ 1 ];
492  strain(2) = 1. / ( 2. * GModulus ) * values [ 2 ];
493  strain(3) = 1. / GModulus * values [ 3 ];
494  strain(4) = 1. / GModulus * values [ 4 ];
495  strain(5) = 1. / GModulus * values [ 5 ];
496  }
497 }
498 
499 double
501 {
502  //
503  // This function computes the tensorial Norm of the stress in engineering notation
504  //
506  if ( myMode == _1dMat ) {
507  // 1d problem
508  return fabs(values [ 0 ]);
509  } else if ( myMode == _PlaneStress ) {
510  // 2d problem: plane stress
511  return sqrt(values [ 0 ] * values [ 0 ] + values [ 1 ] * values [ 1 ] + 2. * values [ 2 ] * values [ 2 ]);
512  } else if ( myMode == _PlaneStrain ) {
513  // plane strain or axisymmetry
514  return sqrt(values [ 0 ] * values [ 0 ] + values [ 1 ] * values [ 1 ] + values [ 2 ] * values [ 2 ] +
515  2. * values [ 3 ] * values [ 3 ]);
516  } else if ( myMode == _PlaneStrainGrad ) {
517  // plane strain or axisymmetry
518  return sqrt(values [ 0 ] * values [ 0 ] + values [ 1 ] * values [ 1 ] + values [ 2 ] * values [ 2 ] +
519  2. * values [ 3 ] * values [ 3 ]);
520  } else {
521  // 3d problem
522  return sqrt(values [ 0 ] * values [ 0 ] + values [ 1 ] * values [ 1 ] + values [ 2 ] * values [ 2 ] +
523  2. * values [ 3 ] * values [ 3 ] + 2. * values [ 4 ] * values [ 4 ] + 2. * values [ 5 ] * values [ 5 ]);
524  }
525 }
526 
527 
528 void
530  const FloatMatrix &base,
531  int transpose) const
532 //
533 // returns transformation matrix for 3d - stress to another system of axes,
534 // given by base.
535 // In base (FloatMatrix[3,3]) there are on each column stored vectors of
536 // coordinate system to which we do transformation.
537 //
538 // If transpose == 1 we transpose base matrix before transforming
539 //
540 {
541  FloatMatrix t;
542  answer.resize(6, 6);
543  answer.zero();
544 
545  if ( transpose == 1 ) {
546  t.beTranspositionOf(base);
547  } else {
548  t = base;
549  }
550 
551  answer.at(1, 1) = t.at(1, 1) * t.at(1, 1);
552  answer.at(1, 2) = t.at(2, 1) * t.at(2, 1);
553  answer.at(1, 3) = t.at(3, 1) * t.at(3, 1);
554  answer.at(1, 4) = 2.0 * t.at(2, 1) * t.at(3, 1);
555  answer.at(1, 5) = 2.0 * t.at(1, 1) * t.at(3, 1);
556  answer.at(1, 6) = 2.0 * t.at(1, 1) * t.at(2, 1);
557 
558  answer.at(2, 1) = t.at(1, 2) * t.at(1, 2);
559  answer.at(2, 2) = t.at(2, 2) * t.at(2, 2);
560  answer.at(2, 3) = t.at(3, 2) * t.at(3, 2);
561  answer.at(2, 4) = 2.0 * t.at(2, 2) * t.at(3, 2);
562  answer.at(2, 5) = 2.0 * t.at(1, 2) * t.at(3, 2);
563  answer.at(2, 6) = 2.0 * t.at(1, 2) * t.at(2, 2);
564 
565  answer.at(3, 1) = t.at(1, 3) * t.at(1, 3);
566  answer.at(3, 2) = t.at(2, 3) * t.at(2, 3);
567  answer.at(3, 3) = t.at(3, 3) * t.at(3, 3);
568  answer.at(3, 4) = 2.0 * t.at(2, 3) * t.at(3, 3);
569  answer.at(3, 5) = 2.0 * t.at(1, 3) * t.at(3, 3);
570  answer.at(3, 6) = 2.0 * t.at(1, 3) * t.at(2, 3);
571 
572  answer.at(4, 1) = t.at(1, 2) * t.at(1, 3);
573  answer.at(4, 2) = t.at(2, 2) * t.at(2, 3);
574  answer.at(4, 3) = t.at(3, 2) * t.at(3, 3);
575  answer.at(4, 4) = ( t.at(2, 2) * t.at(3, 3) + t.at(3, 2) * t.at(2, 3) );
576  answer.at(4, 5) = ( t.at(1, 2) * t.at(3, 3) + t.at(3, 2) * t.at(1, 3) );
577  answer.at(4, 6) = ( t.at(1, 2) * t.at(2, 3) + t.at(2, 2) * t.at(1, 3) );
578 
579  answer.at(5, 1) = t.at(1, 1) * t.at(1, 3);
580  answer.at(5, 2) = t.at(2, 1) * t.at(2, 3);
581  answer.at(5, 3) = t.at(3, 1) * t.at(3, 3);
582  answer.at(5, 4) = ( t.at(2, 1) * t.at(3, 3) + t.at(3, 1) * t.at(2, 3) );
583  answer.at(5, 5) = ( t.at(1, 1) * t.at(3, 3) + t.at(3, 1) * t.at(1, 3) );
584  answer.at(5, 6) = ( t.at(1, 1) * t.at(2, 3) + t.at(2, 1) * t.at(1, 3) );
585 
586  answer.at(6, 1) = t.at(1, 1) * t.at(1, 2);
587  answer.at(6, 2) = t.at(2, 1) * t.at(2, 2);
588  answer.at(6, 3) = t.at(3, 1) * t.at(3, 2);
589  answer.at(6, 4) = ( t.at(2, 1) * t.at(3, 2) + t.at(3, 1) * t.at(2, 2) );
590  answer.at(6, 5) = ( t.at(1, 1) * t.at(3, 2) + t.at(3, 1) * t.at(1, 2) );
591  answer.at(6, 6) = ( t.at(1, 1) * t.at(2, 2) + t.at(2, 1) * t.at(1, 2) );
592 }
593 } // end namespace oofem
double computeThirdCoordinate() const
Computes the third Haigh-Westergaard coordinate of the deviatoric stress.
Definition: stressvector.C:402
double computeThirdInvariant() const
Computes the third invariant J3 of the deviatoric stress state.
Definition: stressvector.C:336
std::vector< double > values
Stored values.
Definition: floatarray.h:86
Specialization of a floating point array for representing a stress state.
Definition: stressvector.h:48
MaterialMode giveStressStrainMode() const
Returns the material mode of receiver.
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
void convertToFullForm(FloatArray &fullform) const
Computes the full form of receiver.
void computePrincipalValDir(FloatArray &answer, FloatMatrix &dir) const
Computes principal values and directions of receiver vector.
Definition: stressvector.C:182
double computeFirstInvariant() const
Computes the first invariant I1 of the stress.
Definition: stressvector.C:291
StressStrainMatMode mode
Stress strain mode.
Specialization of a floating point array for representing a strain state.
Definition: strainvector.h:45
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
double computeSecondInvariant() const
Computes the second invariant J2 of the deviatoric stress.
Definition: stressvector.C:311
Base class for stress/strain vector representations.
void printYourself() const
Prints receiver on stdout, useful for debugging.
Definition: stressvector.C:278
double computeStressNorm() const
Computes the norm of the stress tensor using engineering notation.
Definition: stressvector.C:500
void applyDeviatoricElasticCompliance(StrainVector &strain, const double EModulus, const double nu) const
Applies the isotropic elastic stiffness to the deviatoric stress.
Definition: stressvector.C:456
bool jaco_(FloatArray &eval, FloatMatrix &v, int nf)
Computes eigenvalues and eigenvectors of receiver (must be symmetric) The receiver is preserved...
Definition: floatmatrix.C:1912
void computeDeviatoricVolumetricSum(StressVector &answer, double vol) const
Sums volumetric part to receiver.
Definition: stressvector.C:78
void cubic3r(double a, double b, double c, double d, double *r1, double *r2, double *r3, int *num)
Solves cubic equation for real roots, assuming that if cubic polynomial given then the only possibili...
Definition: mathfem.C:155
#define OOFEM_ERROR(...)
Definition: error.h:61
void giveTranformationMtrx(FloatMatrix &answer, const FloatMatrix &base, int transpose=0) const
Computes 3d transformation matrix from standard vector transformation matrix.
Definition: stressvector.C:529
double computeSecondCoordinate() const
Computes the second Haigh-Westergaard coordinate of the deviatoric stress.
Definition: stressvector.C:392
void applyElasticCompliance(StrainVector &strain, const double EModulus, const double nu) const
Applies the isotropic elastic compliance to the stress.
Definition: stressvector.C:427
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
void computeAllThreeHWCoordinates(double &xsi, double &rho, double &theta) const
Computes all three Haigh-Westergaard coordinate of the stress.
Definition: stressvector.C:367
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
void beTranspositionOf(const FloatMatrix &src)
Assigns to the receiver the transposition of parameter.
Definition: floatmatrix.C:323
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
StressVector(MaterialMode)
Constructor. Creates zero value stress/strain vector for given material mode.
Definition: stressvector.C:44
void computePrincipalValues(FloatArray &answer) const
Member function that computes principal values of receiver (stress vector).
Definition: stressvector.C:104
double computeFirstCoordinate() const
Computes the first Haigh-Westergaard coordinate of the stress.
Definition: stressvector.C:382
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
the oofem namespace is to define a context or scope in which all oofem names are defined.
void computeDeviatoricVolumetricSplit(StressVector &dev, double &vol) const
Computes split of receiver into deviatoric and volumetric part.
Definition: stressvector.C:51
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:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011