Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vol_elem_mat_ortho.f90
Go to the documentation of this file.
1 !*********************************************************************
2 !* Illinois Open Source License *
3 !* *
4 !* University of Illinois/NCSA *
5 !* Open Source License *
6 !* *
7 !* Copyright@2008, University of Illinois. All rights reserved. *
8 !* *
9 !* Developed by: *
10 !* *
11 !* Center for Simulation of Advanced Rockets *
12 !* *
13 !* University of Illinois *
14 !* *
15 !* www.csar.uiuc.edu *
16 !* *
17 !* Permission is hereby granted, free of charge, to any person *
18 !* obtaining a copy of this software and associated documentation *
19 !* files (the "Software"), to deal with the Software without *
20 !* restriction, including without limitation the rights to use, *
21 !* copy, modify, merge, publish, distribute, sublicense, and/or *
22 !* sell copies of the Software, and to permit persons to whom the *
23 !* Software is furnished to do so, subject to the following *
24 !* conditions: *
25 !* *
26 !* *
27 !* @ Redistributions of source code must retain the above copyright *
28 !* notice, this list of conditions and the following disclaimers. *
29 !* *
30 !* @ Redistributions in binary form must reproduce the above *
31 !* copyright notice, this list of conditions and the following *
32 !* disclaimers in the documentation and/or other materials *
33 !* provided with the distribution. *
34 !* *
35 !* @ Neither the names of the Center for Simulation of Advanced *
36 !* Rockets, the University of Illinois, nor the names of its *
37 !* contributors may be used to endorse or promote products derived *
38 !* from this Software without specific prior written permission. *
39 !* *
40 !* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
41 !* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
42 !* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
43 !* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
44 !* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
45 !* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
46 !* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
47 !* USE OR OTHER DEALINGS WITH THE SOFTWARE. *
48 !*********************************************************************
49 !* Please acknowledge The University of Illinois Center for *
50 !* Simulation of Advanced Rockets in works and publications *
51 !* resulting from this software or its derivatives. *
52 !*********************************************************************
53 SUBROUTINE vol_elem_mat_ortho( ci_full, ci, NumMatVol, NumMatOrtho, MatOrtho, E11, E22, E33, &
54  xnu12, xnu13, xnu23, g12, g13, g23, vx1o, vy1o, vz1o, vx2o, vy2o, vz2o, &
55  vx3o, vy3o, vz3o )
56 
57  IMPLICIT NONE
58 
59  ! Input/output vars
60  INTEGER :: nummatvol, nummatortho
61  REAL*8, DIMENSION(1:6,1:6,1:NumMatVol) :: ci_full
62  REAL*8, DIMENSION(1:9,1:NumMatVol) :: ci
63  INTEGER, DIMENSION(1:NumMatVol) :: matortho
64  REAL*8, DIMENSION(1:NumMatOrtho) :: e11, e22, e33
65  REAL*8, DIMENSION(1:NumMatOrtho) :: xnu12, xnu13, xnu23
66  REAL*8, DIMENSION(1:NumMatOrtho) :: g12, g13, g23
67  REAL*8, DIMENSION(1:NumMatOrtho) :: vx1o, vy1o, vz1o
68  REAL*8, DIMENSION(1:NumMatOrtho) :: vx2o, vy2o, vz2o
69  REAL*8, DIMENSION(1:NumMatOrtho) :: vx3o, vy3o, vz3o
70 
71  ! Internal vars
72  INTEGER :: i, ii, j, k
73  REAL*8 :: a, b
74  REAL*8, DIMENSION(1:6,1:6) :: temp0, temp1, temp2, temp3, temp4
75  REAL*8, DIMENSION(1:6,1:6) :: t, ti, r, ri
76  REAL*8, DIMENSION(1:3) :: x, y, z, v1, v2, v3
77  REAL*8 :: m1, m2, m3, n1, n2, n3, p1, p2, p3
78 
79  DO i = 1, nummatvol
80 
81  IF ( matortho(i) == 0 ) THEN
82 
83  ! Put the isotropic ci into the full ci
84  ci_full(:,:,i) = 0.0
85  ci_full(1,1,i) = ci(1,i)
86  ci_full(1,2,i) = ci(2,i)
87  ci_full(1,3,i) = ci(4,i)
88  ci_full(2,1,i) = ci(2,i)
89  ci_full(2,2,i) = ci(3,i)
90  ci_full(2,3,i) = ci(5,i)
91  ci_full(3,1,i) = ci(4,i)
92  ci_full(3,2,i) = ci(5,i)
93  ci_full(3,3,i) = ci(6,i)
94  ci_full(4,4,i) = ci(7,i)
95  ci_full(5,5,i) = ci(8,i)
96  ci_full(6,6,i) = ci(9,i)
97 
98  ELSE
99 
100  ii = matortho(i)
101 
102  ! Compute the unrotated material compliance matrix
103 
104  temp0(:,:) = 0.0
105  temp1(:,:) = 0.0
106  temp2(:,:) = 0.0
107 
108  temp0(1,1) = 1.0/e11(ii)
109  temp0(1,2) = -xnu12(ii)/e11(ii)
110  temp0(1,3) = -xnu13(ii)/e11(ii)
111  temp0(2,1) = -xnu12(ii)/e11(ii)
112  temp0(2,2) = 1.0/e22(ii)
113  temp0(2,3) = -xnu23(ii)/e11(ii)
114  temp0(3,1) = -xnu13(ii)/e11(ii)
115  temp0(3,2) = -xnu23(ii)/e11(ii)
116  temp0(3,3) = 1.0/e33(ii)
117  temp0(4,4) = 1.0/g23(ii)
118  temp0(5,5) = 1.0/g13(ii)
119  temp0(6,6) = 1.0/g12(ii)
120 
121 
122  ! Compute the stiffness matrix
123 
124  CALL invert6x6(temp0,temp1)
125 
126 
127  ! Compute the rotation matrices
128 
129  r(:,:) = 0.0
130  r(1,1) = 1.0
131  r(2,2) = 1.0
132  r(3,3) = 1.0
133  r(4,4) = 2.0
134  r(5,5) = 2.0
135  r(6,6) = 2.0
136 
137  ri(:,:) = 0.0
138  ri(1,1) = 1.0
139  ri(2,2) = 1.0
140  ri(3,3) = 1.0
141  ri(4,4) = 0.5
142  ri(5,5) = 0.5
143  ri(6,6) = 0.5
144 
145  t(:,:) = 0.0
146  ti(:,:) = 0.0
147 
148  v1(1) = vx1o(ii)
149  v1(2) = vy1o(ii)
150  v1(3) = vz1o(ii)
151 
152  v2(1) = vx2o(ii)
153  v2(2) = vy2o(ii)
154  v2(3) = vz2o(ii)
155 
156  v3(1) = vx3o(ii)
157  v3(2) = vy3o(ii)
158  v3(3) = vz3o(ii)
159 
160  x(1) = 1.0
161  x(2) = 0.0
162  x(3) = 0.0
163 
164  y(1) = 0.0
165  y(2) = 1.0
166  y(3) = 0.0
167 
168  z(1) = 0.0
169  z(2) = 0.0
170  z(3) = 1.0
171 
172  m1 = dot_product(x,v1)
173  m2 = dot_product(x,v2)
174  m3 = dot_product(x,v3)
175 
176  n1 = dot_product(y,v1)
177  n2 = dot_product(y,v2)
178  n3 = dot_product(y,v3)
179 
180  p1 = dot_product(z,v1)
181  p2 = dot_product(z,v2)
182  p3 = dot_product(z,v3)
183 
184  t(1,1) = m1*m1
185  t(1,2) = n1*n1
186  t(1,3) = p1*p1
187  t(2,1) = m2*m2
188  t(2,2) = n2*n2
189  t(2,3) = p2*p2
190  t(3,1) = m3*m3
191  t(3,2) = n3*n3
192  t(3,3) = p3*p3
193 
194  t(1,4) = 2.0*n1*p1
195  t(1,5) = 2.0*p1*m1
196  t(1,6) = 2.0*m1*n1
197  t(2,4) = 2.0*n2*p2
198  t(2,5) = 2.0*p2*m2
199  t(2,6) = 2.0*m2*n2
200  t(3,4) = 2.0*n3*p3
201  t(3,5) = 2.0*p3*m3
202  t(3,6) = 2.0*m3*n3
203 
204  t(4,1) = m2*m3
205  t(4,2) = n2*n3
206  t(4,3) = p2*p3
207  t(5,1) = m3*m1
208  t(5,2) = n3*n1
209  t(5,3) = p3*p1
210  t(6,1) = m1*m2
211  t(6,2) = n1*n2
212  t(6,3) = p1*p2
213 
214  t(4,4) = n2*p3 + n3*p2
215  t(4,5) = p2*m3 + p3*m2
216  t(4,6) = m2*n3 + m3*n2
217  t(5,4) = n3*p1 + n1*p3
218  t(5,5) = p3*m1 + p1*m3
219  t(5,6) = m3*n1 + m1*n3
220  t(6,4) = n1*p2 + n2*p1
221  t(6,5) = p1*m2 + p2*m1
222  t(6,6) = m1*n2 + m2*n1
223 
224  ! Invert the rotation matrix
225  CALL invert6x6(t,ti)
226 
227  ! Rotate the material stiffness matrix
228  temp2 = matmul(ti,temp1)
229  temp3 = matmul(temp2, r)
230  temp4 = matmul(temp3, t)
231  ci_full(:,:,i) = matmul(temp4, ri)
232 
233  END IF
234 
235  END DO
236 
237 END SUBROUTINE vol_elem_mat_ortho
238 
unsigned char r() const
Definition: Color.h:68
j indices k indices k
Definition: Indexing.h:6
void int int REAL REAL * y
Definition: read.cpp:74
NT p1
unsigned char b() const
Definition: Color.h:70
subroutine invert6x6(T, Ti)
Definition: invert6x6.f90:53
void int int int REAL REAL REAL * z
Definition: write.cpp:76
blockLoc i
Definition: read.cpp:79
void int int REAL * x
Definition: read.cpp:74
subroutine vol_elem_mat_ortho(ci_full, ci, NumMatVol, NumMatOrtho, MatOrtho, E11, E22, E33, xnu12, xnu13, xnu23, G12, G13, G23, vx1o, vy1o, vz1o, vx2o, vy2o, vz2o, vx3o, vy3o, vz3o)
j indices j
Definition: Indexing.h:6
long double dot_product(pnt vec1, pnt vec2)
RT a() const
Definition: Line_2.h:140