OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lecflsw.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!|| lecflsw ../engine/source/fluid/lecflsw.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../engine/source/input/lectur.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../engine/source/output/message/message.F
29!|| arret ../engine/source/system/arret.F
30!|| nintrn ../engine/source/fluid/nintrn.F
31!||--- uses -----------------------------------------------------
32!|| message_mod ../engine/share/message_module/message_mod.F
33!||====================================================================
34 SUBROUTINE lecflsw (NSFLSW,NTFLSW,NEFLSW,NNFLSW,CRFLSW,
35 . X,IXS,IPARG,ITMP)
36 USE message_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "com01_c.inc"
45#include "com04_c.inc"
46#include "units_c.inc"
47#include "param_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER NSFLSW, NTFLSW
52 INTEGER NEFLSW(*), NNFLSW(8,*), IXS(NIXS,*), IPARG(NPARG,*), ITMP(*)
53 my_real crflsw(6,*), x(3,*)
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER IL, I, IS, NEL, J, K, IE, II, NG, ITY, LFT, LLT, NFT, NB1,
58 . n, i2, i1, ne, n1, n2, n3, n4
60 . crx, cry, crz, surs, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4,
61 . y4, z4, sfx, sfy, sfz, sfm, surv
62C-----------------------------------------------
63C E x t e r n a l F u n c t i o n s
64C-----------------------------------------------
65 INTEGER NINTRN
66C-----------------------------------------------
67 il = 0
68 WRITE (iout, 1000)
69 DO 200 i = 1, nsflsw
70C
71C LECTURE DU NUMERO DE LA SECTION ET DU NOMBRE DE FACES
72C
73 READ (iin, '(2I5,3F10.0)') is, nel, crx, cry, crz
74C
75C
76C LECTURE DES FACES PAR SECTION
77C
78 neflsw(i) = nel
79 crflsw(1,i) = crx
80 crflsw(2,i) = cry
81 crflsw(3,i) = crz
82 DO 100 j = 1, nel
83 il = il + 1
84 READ(iin, '(6I5)') nnflsw(7,il),(nnflsw(k,il),k=2,6)
85 100 CONTINUE
86 200 CONTINUE
87C
88C TEST SI LE NOMBRE TOTALE DE FACES EST EGALE A NTFLSW
89C
90 IF (il /= ntflsw) THEN
91 CALL ancmsg(msgid=16,anmode=aninfo,
92 . i1=il,i2=ntflsw)
93 CALL arret(2)
94 END IF
95C
96C CALCUL DE LA NUMEROTATION INTERNE DES ELEMENTS ET L'ADRESSE
97C DANS LE BUFFER D'ELEMENTS
98C IL : NUMERO LOCALE DE LA FACE ET DE L'ELEMENT
99C IE : NUMERO EXTERNE DE L'ELEMENT
100C NEL=NNFLSW(1,IL) : NOMBRE D'ELEMENTS DANS LE GROUPE D'ELEMENTS
101C IB2=NNFLSW(7,IL) : ADRESSE DE LA PRESSION (ECRASE NUMERO EXTERNE)
102C IB3=NNFLSW(8,IL) : ADRESSE DE L'ENERGIE
103C ITMP(II) = IL : NUMERATION LOCALE DES ELEMENTS DES SECTIONS
104C
105 DO 300 i = 1, numels
106 itmp(i) = 0
107 300 CONTINUE
108C
109 DO 310 il = 1, ntflsw
110 ie = nnflsw(7,il)
111 ii = nintrn(ie,ixs,11,numels)
112 itmp(ii) = il
113 IF (nnflsw(6,il) == 0) nnflsw(6,il) = 4
114 310 CONTINUE
115C
116 DO 350 ng=1,ngroup
117 ity = iparg(5,ng)
118 IF(ity>1) GO TO 350
119 lft = 1
120 llt = iparg(2,ng)
121 nft = iparg(3,ng)
122 nb1 = iparg(4,ng)
123 DO 330 i = lft,llt
124 n = i+nft
125 il = itmp(n)
126 IF (il > 0) THEN
127 nnflsw(7,il) = nb1 + llt + 6*i - 6
128 nnflsw(8,il) = nb1 + 7*llt + i - 1
129 nnflsw(1,il) = llt
130 END IF
131 330 CONTINUE
132 350 CONTINUE
133C
134C CALCUL DES SURFACES ET DE LA NORMALE PAR SECTION
135C
136 il = 0
137 i2 = 0
138 DO 500 is = 1, nsflsw
139 surs = 0.
140 nel = neflsw(is)
141 i1 = i2 + 1
142 i2 = i2 + nel
143 DO 400 i = i1, i2
144 ne = nnflsw(1,i)
145 n1 = nnflsw(2,i)
146 n2 = nnflsw(3,i)
147 n3 = nnflsw(4,i)
148 n4 = nnflsw(5,i)
149C
150 x1 = x(1,n1)
151 y1 = x(2,n1)
152 z1 = x(3,n1)
153 x2 = x(1,n2)
154 y2 = x(2,n2)
155 z2 = x(3,n2)
156 x3 = x(1,n3)
157 y3 = x(2,n3)
158 z3 = x(3,n3)
159 x4 = x(1,n4)
160 y4 = x(2,n4)
161 z4 = x(3,n4)
162C
163 sfx = half*((y3-y1)*(z4-z2)-
164 1 (z3-z1)*(y4-y2))
165 sfy = half*((z3-z1)*(x4-x2)-
166 1 (x3-x1)*(z4-z2))
167 sfz = half*((x3-x1)*(y4-y2)-
168 1 (y3-y1)*(x4-x2))
169 sfm = sqrt(sfx*sfx+sfy*sfy+sfz*sfz)
170C
171 crflsw(4,is) = crflsw(4,is) + sfx
172 crflsw(5,is) = crflsw(5,is) + sfy
173 crflsw(6,is) = crflsw(6,is) + sfz
174 surs = surs + sfm
175C
176 400 CONTINUE
177C
178 surv = sqrt(crflsw(4,is)**2+crflsw(5,is)**2+crflsw(6,is)**2)
179 crflsw(4,is) = crflsw(4,is)/surv
180 crflsw(5,is) = crflsw(5,is)/surv
181 crflsw(6,is) = crflsw(6,is)/surv
182C
183 WRITE (iout, 1100) is, nel, (crflsw(k,is),k=1,6),surv,surs
184 WRITE (iout, 1200)
185 1 (j,(nnflsw(k,il-nel+j),k=1,8),j=1,nel,nel-1)
186 500 CONTINUE
187C
188 1000 FORMAT (///' FLUX AND SWIRL CALCULATION'/
189 1 ' --------------------------'/)
190 1100 FORMAT (/
191 1 ' SET NUMBER . . . . . . . . . . ',i5/
192 1 ' NUMBER OF ELEMENTS. . . . . ',i5/
193 1 ' SWIRL CENTER. . . . . . . . ',3e12.4/
194 1 ' SWIRL AXIS. . . . . . . . . ',3e12.4/
195 1 ' VECTORIAL TOTAL SURFACE . . ',e12.4 /
196 1 ' SCALAR TOTAL SURFACE. . . . ',e12.4 /
197 1 1h ,16hfirst/last numb.,6hi.e.n.,4x,6hnode-1,4x,6hnode-2,4x,
198 2 6hnode-3,4x,6hnode-4,4x,6h ndiv )
199 1200 FORMAT (2h ,10i10)
200 RETURN
201 END
#define my_real
Definition cppsort.cpp:32
subroutine lecflsw(nsflsw, ntflsw, neflsw, nnflsw, crflsw, x, ixs, iparg, itmp)
Definition lecflsw.F:36
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889
subroutine arret(nn)
Definition arret.F:87