OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
qrota3.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| qrota3 ../engine/source/output/anim/generate/qrota3.F
25!||--- called by ------------------------------------------------------
26!|| thquad ../engine/source/output/th/thquad.F
27!||--- uses -----------------------------------------------------
28!|| element_mod ../common_source/modules/elements/element_mod.F90
29!||====================================================================
30 SUBROUTINE qrota3(
31 1 X, IXQ, KCVT, TENS,
32 2 GAMA, ISORTH)
33 use element_mod , only : nixq
34C-----------------------------------------------
35C I m p l i c i t T y p e s
36C-----------------------------------------------
37#include "implicit_f.inc"
38C-----------------------------------------------
39C C o m m o n B l o c k s
40C-----------------------------------------------
41C-----------------------------------------------
42C D u m m y A r g u m e n t s
43C-----------------------------------------------
44 INTEGER, INTENT(IN) :: ISORTH
45 my_real
46 . x(3,*),tens(6),gama(6)
47 INTEGER IXQ(NIXQ), KCVT
48C-----------------------------------------------
49C L o c a l V a r i a b l e s
50C-----------------------------------------------
51 my_real
52 .
53 . y1, y2, y3, y4,
54 . z1, z2, z3, z4,
55 .
56 . r22,r23,r32,r33,
57 . g22,g33,g23,g32,
58 . t22,t33,t23,t32,
59 .
60 . sy,sz,ty,tz,ct,cs,suma,
61 . t1,t2,t3,t4,s1,s2,s4
62 INTEGER NC1, NC2, NC3, NC4
63C-----------------------------------------------
64 nc1=ixq(2)
65 nc2=ixq(3)
66 nc3=ixq(4)
67 nc4=ixq(5)
68C----------------------------
69C NODE COORDINATES
70C----------------------------
71 y1=x(2,nc1)
72 z1=x(3,nc1)
73 y2=x(2,nc2)
74 z2=x(3,nc2)
75 y3=x(2,nc3)
76 z3=x(3,nc3)
77 y4=x(2,nc4)
78 z4=x(3,nc4)
79C-----------
80C convected frame
81C-----------
82 sy=half*(y2+y3-y1-y4)
83 sz=half*(z2+z3-z1-z4)
84 ty=half*(y3+y4-y1-y2)
85 tz=half*(z3+z4-z1-z2)
86 ct = ty*ty+tz*tz
87 cs = sy*sy+sz*sz
88 IF(cs /= zero) THEN
89 suma = sqrt(ct/max(em20,cs))
90 sy = sy*suma + tz
91 sz = sz*suma - ty
92 ELSEIF(ct /= zero)THEN
93 suma = sqrt(cs/max(em20,ct))
94 sy = sy + tz*suma
95 sz = sz - ty*suma
96 END IF
97 suma=one/max(sqrt(sy*sy+sz*sz),em20)
98 sy=sy*suma
99 sz=sz*suma
100C-----------
101C TRANSFORMATION MATRIX GLOBAL -> CONVECTED
102C-----------
103 r22= sy
104 r32=-sz
105 r23= sz
106 r33= sy
107c
108 IF (isorth /= 0) THEN
109 IF (kcvt == 0) THEN
110 g22=gama(1)
111 g32=gama(2)
112 g23=gama(4)
113 g33=gama(5)
114C-----------
115c TRANSFORMATION MATRIX GLOBAL -> ORTHOTROPIC.
116C-----------
117 t22=r22*g22+r23*g32
118 t23=r22*g23+r23*g33
119 t32=r32*g22+r33*g32
120 t33=r32*g23+r33*g33
121 r22=t22
122 r23=t23
123 r32=t32
124 r33=t33
125 ELSEIF (kcvt /=0) THEN
126 g22=gama(2)
127 g32=gama(3)
128 g23=gama(5)
129 g33=gama(6)
130 t22=r22*g22+r23*g32
131 t23=r22*g23+r23*g33
132 t32=r32*g22+r33*g32
133 t33=r32*g23+r33*g33
134C-----------
135c TRANSFORMATION MATRIX ORTHOTROPIC -> GLOBAL
136C-----------
137 r22=t22
138 r23=t23
139 r32=t32
140 r33=t33
141 ENDIF
142 END IF
143C-----------
144C SIZE(TENS)=6 STORED AS SOLIDS BUT ONLY USE 1, 2 and 4
145C-----------
146 s1=tens(1)
147 s2=tens(2)
148 s4=tens(4)
149C-----------
150 IF (kcvt == 0) THEN
151C-----------
152C Rotation from GLOBAL FRAME TO CONVECTED OR ORTHO
153C-----------
154 t1=s1*r22+s4*r23
155 t2=s4*r32+s2*r33
156 t3=s1*r32+s4*r33
157 t4=s4*r22+s2*r23
158 tens(1)=r22*t1+r23*t4
159 tens(2)=r32*t3+r33*t2
160 tens(4)=r22*t3+r23*t2
161 ELSE
162C-----------
163C Rotation from CONVECTE FRAME OR ORTHO TO GLOBAL FRAME
164C-----------
165 t1=s1*r22-s4*r23
166 t2=-s4*r32+s2*r33
167 t3=-s1*r32+s4*r33
168 t4=s4*r22-s2*r23
169 tens(1)=r22*t1-r23*t4
170 tens(2)=-r32*t3+r33*t2
171 tens(4)=r22*t3-r23*t2
172 ENDIF
173C-----------
174 RETURN
175 END
#define max(a, b)
Definition macros.h:21
subroutine qrota3(x, ixq, kcvt, tens, gama, isorth)
Definition qrota3.F:33