OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
qrcoor2.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!|| qrcoor2 ../engine/source/elements/solid_2d/quad/qrcoor2.F
25!||--- called by ------------------------------------------------------
26!|| q4ke2 ../engine/source/elements/solid_2d/quad4/q4ke2.F
27!|| qforc2 ../engine/source/elements/solid_2d/quad/qforc2.F
28!||====================================================================
29 SUBROUTINE qrcoor2(
30 1 X, NCP, Y1, Y2,
31 2 Y3, Y4, Z1, Z2,
32 3 Z3, Z4, NC1, NC2,
33 4 NC3, NC4, NGL, MAT,
34 5 NGEO, VD2, R11, R12,
35 6 R13, R21, R22, R23,
36 7 R31, R32, R33, GAMA,
37 8 Y234, Y124, VIS, NEL,
38 9 ISORTH)
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C G l o b a l P a r a m e t e r s
45C-----------------------------------------------
46#include "mvsiz_p.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER, INTENT(IN) :: NEL
51 INTEGER, INTENT(IN) :: ISORTH
52 INTEGER NC1(*), NC2(*), NC3(*), NC4(*), MAT(*), NGL(*), NGEO(*),
53 . NCP(7,*)
54C REAL
55 my_real
56 . X(3,*),Y1(*),Y2(*),Y3(*),Y4(*),Z1(*),Z2(*),Z3(*),Z4(*),VD2(*),
57 . R11(*),R12(*),R13(*),
58 . R21(*),R22(*),R23(*),
59 . r31(*),r32(*),r33(*),gama(mvsiz,6),
60 . y234(*),y124(*),vis(*)
61C-----------------------------------------------
62C C o m m o n B l o c k s
63C-----------------------------------------------
64#include "com01_c.inc"
65C-----------------------------------------------
66C L o c a l V a r i a b l e s
67C-----------------------------------------------
68 INTEGER I,II,IV
69 my_real
70 . SY(MVSIZ) , SZ(MVSIZ) ,
71 . TY(MVSIZ) , TZ(MVSIZ) ,
72 . YL , ZL , SUMA,
73 . G22,G23,G32,G33,
74 . T22,T23,T32,T33,CS,CT
75C-----------------------------------------------
76 DO I=1,nel
77 ngeo(i)=ncp(6,i)
78 ngl(i)=ncp(7,i)
79 mat(i)=ncp(1,i)
80 nc1(i)=ncp(2,i)
81 nc2(i)=ncp(3,i)
82 nc3(i)=ncp(4,i)
83 nc4(i)=ncp(5,i)
84 END DO
85C
86C----------------------------
87C COORDONNEES NODALES
88C----------------------------
89 DO i=1,nel
90 y1(i)=x(2,nc1(i))
91 z1(i)=x(3,nc1(i))
92 y2(i)=x(2,nc2(i))
93 z2(i)=x(3,nc2(i))
94 y3(i)=x(2,nc3(i))
95 z3(i)=x(3,nc3(i))
96 y4(i)=x(2,nc4(i))
97 z4(i)=x(3,nc4(i))
98 END DO
99C----------------------------
100 IF(n2d==1)THEN
101 DO i=1,nel
102 y234(i)=y2(i)+y3(i)+y4(i)
103 y124(i)=y1(i)+y2(i)+y4(i)
104 END DO
105 END IF
106C---------------------------------------
107C REPERE LOCAL
108C---------------------------------------
109 DO i=1,nel
110 sy(i)=half*(y2(i)+y3(i)-y1(i)-y4(i))
111 sz(i)=half*(z2(i)+z3(i)-z1(i)-z4(i))
112 ty(i)=half*(y3(i)+y4(i)-y1(i)-y2(i))
113 tz(i)=half*(z3(i)+z4(i)-z1(i)-z2(i))
114 END DO
115C-----------
116C REPERE CONVECTE : Same than the shell
117C-----------
118 DO i=1,nel
119 ct = ty(i)*ty(i)+tz(i)*tz(i)
120 cs = sy(i)*sy(i)+sz(i)*sz(i)
121 IF(cs /= zero) THEN
122 suma = sqrt(ct/max(em20,cs))
123 sy(i) = sy(i)*suma + tz(i)
124 sz(i) = sz(i)*suma - ty(i)
125 ELSEIF(ct /= zero)THEN
126 suma = sqrt(cs/max(em20,ct))
127 sy(i) = sy(i) + tz(i)*suma
128 sz(i) = sz(i) - ty(i)*suma
129 END IF
130 ENDDO
131
132 DO i=1,nel
133 suma=one/max(sqrt(sy(i)*sy(i)+sz(i)*sz(i)),em20)
134 sy(i)=sy(i)*suma
135 sz(i)=sz(i)*suma
136 ENDDO
137
138 DO i=1,nel
139 r11(i)= one
140 r21(i)= zero
141 r31(i)= zero
142 r12(i)= zero
143 r22(i)= sy(i)
144 r32(i)= sz(i)
145 r13(i)= zero
146 r23(i)=-sz(i)
147 r33(i)= sy(i)
148 END DO
149C-----------
150 DO i=1,nel
151 yl=r22(i)*y1(i)+r32(i)*z1(i)
152 zl=r23(i)*y1(i)+r33(i)*z1(i)
153 y1(i)=yl
154 z1(i)=zl
155 yl=r22(i)*y2(i)+r32(i)*z2(i)
156 zl=r23(i)*y2(i)+r33(i)*z2(i)
157 y2(i)=yl
158 z2(i)=zl
159 yl=r22(i)*y3(i)+r32(i)*z3(i)
160 zl=r23(i)*y3(i)+r33(i)*z3(i)
161 y3(i)=yl
162 z3(i)=zl
163 yl=r22(i)*y4(i)+r32(i)*z4(i)
164 zl=r23(i)*y4(i)+r33(i)*z4(i)
165 y4(i)=yl
166 z4(i)=zl
167 END DO
168C-----------
169C PASSAGE AU REPERE ORTHOTROPE.
170C-----------
171 IF (isorth /= 0)THEN
172 DO i=1,nel
173C Extration de G tq Xortho=Transpose(G) Xcvt
174C =Transpose(G) Transpose(R) Xglobal.
175 g22=gama(i,2)
176 g32=gama(i,3)
177 g23=gama(i,5)
178 g33=gama(i,6)
179C
180 yl=g22*y1(i)+g32*z1(i)
181 zl=g23*y1(i)+g33*z1(i)
182 y1(i)=yl
183 z1(i)=zl
184 yl=g22*y2(i)+g32*z2(i)
185 zl=g23*y2(i)+g33*z2(i)
186 y2(i)=yl
187 z2(i)=zl
188 yl=g22*y3(i)+g32*z3(i)
189 zl=g23*y3(i)+g33*z3(i)
190 y3(i)=yl
191 z3(i)=zl
192 yl=g22*y4(i)+g32*z4(i)
193 zl=g23*y4(i)+g33*z4(i)
194 y4(i)=yl
195 z4(i)=zl
196C MATRICE DE PASSAGE GLOBAL -> ORTHOTROPE.
197 t22=r22(i)*g22+r23(i)*g32
198 t23=r22(i)*g23+r23(i)*g33
199 t32=r32(i)*g22+r33(i)*g32
200 t33=r32(i)*g23+r33(i)*g33
201 r22(i)=t22
202 r23(i)=t23
203 r32(i)=t32
204 r33(i)=t33
205 ENDDO
206 ENDIF
207C-----------
208 DO i=1,nel
209 vd2(i)=zero
210 vis(i)=zero
211 END DO
212C
213 RETURN
214 END
subroutine qrcoor2(x, ncp, y1, y2, y3, y4, z1, z2, z3, z4, nc1, nc2, nc3, nc4, ngl, mat, ngeo, vd2, r11, r12, r13, r21, r22, r23, r31, r32, r33, gama, y234, y124, vis, nel, isorth)
Definition qrcoor2.F:39
#define max(a, b)
Definition macros.h:21