muMECH  1.0
stiffness.cpp
Go to the documentation of this file.
1 //********************************************************************************************************
2 // code: ### ### ##### #### ## ##
3 // ## ## ######## ## ## ## ## ##
4 // ## ## ## ## ## ### ## ######
5 // ## ## ## ## ## ## ## ## ##
6 // ##### ## ## ##### #### ## ##
7 // ##
8 //
9 // name: stiffness.cpp
10 // author(s): Jan Novak
11 // language: C, C++
12 // license: This program is free software; you can redistribute it and/or modify
13 // it under the terms of the GNU Lesser General Public License as published by
14 // the Free Software Foundation; either version 2 of the License, or
15 // (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU Lesser General Public License for more details.
21 //
22 // You should have received a copy of the GNU Lesser General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 //********************************************************************************************************
26 
27 #include "stiffness.h"
28 #include "types.h"
29 #include <iostream>
30 
31 
32 namespace mumech {
33 
35 void Stiffness :: giveReducedIsoStiffMatrix (double *C, double E, double nu, bool twodim)
36 {
37  double mult = E / ( ( 1. + nu ) * ( 1. - 2. * nu ) );
38 
39  if (twodim) {
40  C[0] = C[3] = mult * ( 1. - nu );
41  C[1] = C[2] = mult * nu;
42  C[4] = E / ( 1. + nu );
43  }
44  else {
45  C[0] = C[4] = C[8] = mult * ( 1. - nu );
46  C[1] = C[2] = C[3] = C[5] = C[6] = C[7] = mult * nu;
47  C[9] = C[10] = C[11] = E / ( 1. + nu );
48  }
49 }
51 void Stiffness :: giveReducedIsoComplMatrix (double M[12], double E, double nu)
52 {
53  double mult = 1./E;
54 
55  M[0] = M[4] = M[8] = mult;
56  M[1] = M[2] = M[3] = M[5] = M[6] = M[7] = -mult * nu;
57  //mandel notation
58  M[9] = M[10] = M[11] = 2. * mult * ( 1. + nu );
59 }//end of function: giveReducedIsoComplMatrix( )
60 
61 } // end of namespace mumech
62 
63 /*end of file*/
file of various types and symbolic constant definitions
void giveReducedIsoStiffMatrix(double *C, double E, double nu, bool twodim)
Function gives the reduced isotropic stiffness matrix of a homogeneous material.
Definition: stiffness.cpp:35
Namespace Stiffness.
void giveReducedIsoComplMatrix(double M[12], double E, double nu)
Function gives the reduced isotropic complience matrix of a homogeneous material. ...
Definition: stiffness.cpp:51