1
1
!-------------------------------------------------------------------------------
3
! This file is part of the Code_Saturne Kernel, element of the
4
! Code_Saturne CFD tool.
6
! Copyright (C) 1998-2009 EDF S.A., France
8
! contact: saturne-support@edf.fr
10
! The Code_Saturne Kernel is free software; you can redistribute it
11
! and/or modify it under the terms of the GNU General Public License
12
! as published by the Free Software Foundation; either version 2 of
13
! the License, or (at your option) any later version.
15
! The Code_Saturne Kernel is distributed in the hope that it will be
16
! useful, but WITHOUT ANY WARRANTY; without even the implied warranty
17
! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
! GNU General Public License for more details.
20
! You should have received a copy of the GNU General Public License
21
! along with the Code_Saturne Kernel; if not, write to the
22
! Free Software Foundation, Inc.,
23
! 51 Franklin St, Fifth Floor,
24
! Boston, MA 02110-1301 USA
3
! This file is part of Code_Saturne, a general-purpose CFD tool.
5
! Copyright (C) 1998-2011 EDF S.A.
7
! This program is free software; you can redistribute it and/or modify it under
8
! the terms of the GNU General Public License as published by the Free Software
9
! Foundation; either version 2 of the License, or (at your option) any later
12
! This program is distributed in the hope that it will be useful, but WITHOUT
13
! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
! FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17
! You should have received a copy of the GNU General Public License along with
18
! this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
19
! Street, Fifth Floor, Boston, MA 02110-1301, USA.
26
21
!-------------------------------------------------------------------------------
28
23
subroutine raypun &
32
ndim , ncelet , ncel , nfac , nfabor , nfml , nprfml , &
33
nnod , lndfac , lndfbr , ncelbr , &
34
nvar , nscal , nphas , iphas , &
35
nideve , nrdeve , nituse , nrtuse , &
36
ifacel , ifabor , ifmfbr , ifmcel , iprfml , itypfb , &
37
ipnfac , nodfac , ipnfbr , nodfbr , &
38
idevel , ituser , ia , &
39
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
40
28
dt , rtp , rtpa , propce , propfa , propfb , &
42
30
cofrua , cofrub , &
43
31
flurds , flurdb , &
44
dtr , viscf , viscb , &
46
drtp , smbrs , rovsdt , &
47
34
theta4 , thetaa , sa , &
49
36
qincid , eps , tparoi , &
50
w1 , w2 , w3 , w4 , w5 , &
51
w6 , w7 , w8 , w9 , ckmel , &
52
rdevel , rtuser , ra )
54
39
!===============================================================================
66
51
!__________________.____._____.________________________________________________.
67
52
! name !type!mode ! role !
68
53
!__________________!____!_____!________________________________________________!
69
! idbia0 ! i ! <-- ! number of first free position in ia !
70
! idbra0 ! i ! <-- ! number of first free position in ra !
71
! ndim ! i ! <-- ! spatial dimension !
72
! ncelet ! i ! <-- ! number of extended (real + ghost) cells !
73
! ncel ! i ! <-- ! number of cells !
74
! nfac ! i ! <-- ! number of interior faces !
75
! nfabor ! i ! <-- ! number of boundary faces !
76
! nfml ! i ! <-- ! number of families (group classes) !
77
! nprfml ! i ! <-- ! number of properties per family (group class) !
78
! nnod ! i ! <-- ! number of vertices !
79
! lndfac ! i ! <-- ! size of nodfac indexed array !
80
! lndfbr ! i ! <-- ! size of nodfbr indexed array !
81
! ncelbr ! i ! <-- ! number of cells with faces on boundary !
82
54
! nvar ! i ! <-- ! total number of variables !
83
55
! nscal ! i ! <-- ! total number of scalars !
84
! nphas ! i ! <-- ! number of phases !
85
! iphas ! i ! --> ! phase number !
86
! nideve, nrdeve ! i ! <-- ! sizes of idevel and rdevel arrays !
87
! nituse, nrtuse ! i ! <-- ! sizes of ituser and rtuser arrays !
88
! ifacel(2, nfac) ! ia ! <-- ! interior faces -> cells connectivity !
89
! ifabor(nfabor) ! ia ! <-- ! boundary faces -> cells connectivity !
90
! ifmfbr(nfabor) ! ia ! <-- ! boundary face family numbers !
91
! ifmcel(ncelet) ! ia ! <-- ! cell family numbers !
92
! iprfml ! ia ! <-- ! property numbers per family !
93
! (nfml, nprfml) ! ! ! !
94
56
! itypfb ! ia ! <-- ! boundary face types !
95
! (nfabor, nphas) ! ! ! !
96
! ipnfac(nfac+1) ! ia ! <-- ! interior faces -> vertices index (optional) !
97
! nodfac(lndfac) ! ia ! <-- ! interior faces -> vertices list (optional) !
98
! ipnfbr(nfabor+1) ! ia ! <-- ! boundary faces -> vertices index (optional) !
99
! nodfbr(lndfbr) ! ia ! <-- ! boundary faces -> vertices list (optional) !
100
! idevel(nideve) ! ia ! <-> ! integer work array for temporary development !
101
! ituser(nituse) ! ia ! <-> ! user-reserved integer work array !
102
! ia(*) ! ia ! --- ! main integer work array !
103
! xyzcen ! ra ! <-- ! cell centers !
104
! (ndim, ncelet) ! ! ! !
105
! surfac ! ra ! <-- ! interior faces surface vectors !
106
! (ndim, nfac) ! ! ! !
107
! surfbo ! ra ! <-- ! boundary faces surface vectors !
108
! (ndim, nfabor) ! ! ! !
109
! cdgfac ! ra ! <-- ! interior faces centers of gravity !
110
! (ndim, nfac) ! ! ! !
111
! cdgfbo ! ra ! <-- ! boundary faces centers of gravity !
112
! (ndim, nfabor) ! ! ! !
113
! xyznod ! ra ! <-- ! vertex coordinates (optional) !
114
! (ndim, nnod) ! ! ! !
115
! volume(ncelet) ! ra ! <-- ! cell volumes !
116
57
! dt(ncelet) ! ra ! <-- ! time step (per cell) !
117
58
! rtp, rtpa ! ra ! <-- ! calculated variables at cell centers !
118
59
! (ncelet, *) ! ! ! (at current and previous time steps) !
125
66
!(nfabor) ! ! ! faces de bord pour la luminance !
126
67
! flurds,flurdb ! tr ! --- ! pseudo flux de masse (faces internes !
127
68
!(nfac)(nfabor) ! ! ! et faces de bord ) !
128
! dtr(ncelet) ! tr ! --- ! dt*cdtvar !
129
69
! viscf(nfac) ! tr ! --- ! visc*surface/dist aux faces internes !
130
70
! viscb(nfabor ! tr ! --- ! visc*surface/dist aux faces de bord !
131
! dam(ncelet ! tr ! --- ! tableau de travail pour matrice !
132
! xam(nfac,*) ! tr ! --- ! tableau de travail pour matrice !
133
! drtp(ncelet ! tr ! --- ! tableau de travail pour increment !
134
71
! smbrs(ncelet ! tr ! --- ! tableau de travail pour sec mem !
135
72
! rovsdt(ncelet ! tr ! --- ! tableau de travail pour terme instat !
136
73
! theta4(ncelet ! tr ! --- ! pseudo temperature radiative !
141
78
! qincid(nfabor ! tr ! --> ! densite de flux radiatif aux bords !
142
79
! eps (nfabor) ! tr ! <-- ! emissivite des facettes de bord !
143
80
! tparoi(nfabor ! tr ! <-- ! temperature de paroi en kelvin !
144
! w1...9(ncelet ! tr ! --- ! tableau de travail !
145
81
! ckmel(ncelet) ! tr ! <-- ! coeff d'absorption du melange !
146
82
! ! ! ! gaz-particules de charbon !
147
! rdevel(nrdeve) ! ra ! <-> ! real work array for temporary development !
148
! rtuser(nrtuse) ! ra ! <-> ! user-reserved real work array !
149
! ra(*) ! ra ! --- ! main real work array !
150
83
!__________________!____!_____!________________________________________________!
152
85
! TYPE : E (ENTIER), R (REEL), A (ALPHANUMERIQUE), T (TABLEAU)
153
86
! L (LOGIQUE) .. ET TYPES COMPOSES (EX : TR TABLEAU REEL)
154
87
! MODE : <-- donnee, --> resultat, <-> Donnee modifiee
155
88
! --- tableau de travail
156
!-------------------------------------------------------------------------------
89
!===============================================================================
91
!===============================================================================
93
!===============================================================================
157
110
!===============================================================================
161
!===============================================================================
163
!===============================================================================
181
!===============================================================================
185
integer idbia0 , idbra0
186
integer ndim , ncelet , ncel , nfac , nfabor
187
integer nfml , nprfml
188
integer nnod , lndfac , lndfbr , ncelbr
189
integer nvar , nscal , nphas , iphas
190
integer nideve , nrdeve , nituse , nrtuse
192
integer ifacel(2,nfac) , ifabor(nfabor)
193
integer ifmfbr(nfabor) , ifmcel(ncelet)
194
integer iprfml(nfml,nprfml) , itypfb(nfabor,nphas)
195
integer ipnfac(nfac+1), nodfac(lndfac)
196
integer ipnfbr(nfabor+1), nodfbr(lndfbr)
197
integer idevel(nideve), ituser(nituse)
200
double precision xyzcen(ndim,ncelet)
201
double precision surfac(ndim,nfac), surfbo(ndim,nfabor)
202
double precision cdgfac(ndim,nfac), cdgfbo(ndim,nfabor)
203
double precision xyznod(ndim,nnod), volume(ncelet)
118
integer itypfb(nfabor)
204
120
double precision dt(ncelet), rtp(ncelet,*), rtpa(ncelet,*)
205
121
double precision propce(ncelet,*)
206
122
double precision propfa(nfac,*), propfb(nfabor,*)
220
134
double precision qx(ncelet), qy(ncelet), qz(ncelet)
221
135
double precision qincid(nfabor), tparoi(nfabor), eps(nfabor)
223
double precision w1(ncelet), w2(ncelet), w3(ncelet)
224
double precision w4(ncelet), w5(ncelet), w6(ncelet)
225
double precision w7(ncelet), w8(ncelet), w9(ncelet)
226
137
double precision ckmel(ncelet)
227
double precision rdevel(nrdeve), rtuser(nrtuse), ra(*)
230
139
! Local variables
232
141
character*80 cnom
234
integer idebia, idebra
235
143
integer ifac , iel
236
144
integer iconv1, idiff1, ndirc1, ireso1
237
145
integer nitmap, nswrsp, nswrgp, iwarnp
328
( idebia , idebra , &
329
ndim , ncelet , ncel , nfac , nfabor , nfml , &
330
nprfml , nnod , lndfac , lndfbr , ncelbr , &
331
nideve , nrdeve , nituse , nrtuse , imvisf , &
332
ifacel , ifabor , ifmfbr , ifmcel , iprfml , &
333
ipnfac , nodfac , ipnfbr , nodfbr , &
334
idevel , ituser , ia , &
335
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , &
336
volume , ckmel , viscf , viscb , &
337
rdevel , rtuser , ra )
235
ckmel , viscf , viscb )
339
237
!===============================================================================
354
( idebia , idebra , &
355
ndim , ncelet , ncel , nfac , nfabor , nfml , nprfml , &
356
nnod , lndfac , lndfbr , ncelbr , &
357
nvar , nscal , nphas , &
358
nideve , nrdeve , nituse , nrtuse , &
359
253
idtva0 , ivar0 , iconv1 , idiff1 , ireso1 , ndirc1 , nitmap , &
360
254
imrgra , nswrsp , nswrgp , imligp , ircflp , &
361
255
ischcp , isstpp , iescap , &
362
256
imgr1 , ncymap , nitmgp , inum , iwarnp , &
363
257
blencp , epsilp , epsrsp , epsrgp , climgp , extrap , &
364
258
relaxp , thetap , &
365
ifacel , ifabor , ifmfbr , ifmcel , iprfml , &
366
ipnfac , nodfac , ipnfbr , nodfbr , &
367
idevel , ituser , ia , &
368
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , &
370
259
thetaa , thetaa , cofrua , cofrub , cofrua , cofrub , &
371
260
flurds , flurdb , &
372
261
viscf , viscb , viscf , viscb , &
373
262
rovsdt , smbrs , theta4 , &
375
w1 , w2 , w3 , w4 , w5 , &
376
w6 , w7 , w8 , w9 , &
377
rdevel , rtuser , ra )
379
265
!===============================================================================
380
266
! 4. Vecteur densite de flux radiatif
381
267
!===============================================================================
269
! Allocate a temporary array for gradient computation
270
allocate(grad(ncelet,3))
383
272
! En periodique et parallele, echange avant calcul du gradient
386
if (irangp.ge.0) then
392
if (iperio.eq.1) then
397
( idimte , itenso , &
398
theta4 , theta4 , theta4 , &
399
theta4 , theta4 , theta4 , &
400
theta4 , theta4 , theta4)
273
if (irangp.ge.0.or.iperio.eq.1) then
403
278
! Calcul de la densite du flux radiatif QX, QY, QZ
418
( idebia , idebra , &
419
ndim , ncelet , ncel , nfac , nfabor , nfml, &
421
nnod , lndfac , lndfbr , ncelbr , nphas , &
422
nideve , nrdeve , nituse , nrtuse , &
423
ivar0 , imrgra , inc , iccocg , nswrgp , imligp, &
292
( ivar0 , imrgra , inc , iccocg , nswrgp , imligp, &
425
293
iwarnp , nfecra , epsrgp , climgp , extrap , &
426
ifacel , ifabor , ifmfbr , ifmcel , iprfml , &
427
ipnfac , nodfac , ipnfbr , nodfbr , &
428
idevel , ituser , ia , &
429
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , &
432
294
theta4 , cofrua , cofrub , &
435
rdevel , rtuser , ra )
437
297
aa = - stephn * 4.d0 / 3.d0
440
300
aaa = aa * ckmel(iel)
441
qx(iel) = w1(iel) * aaa
442
qy(iel) = w2(iel) * aaa
443
qz(iel) = w3(iel) * aaa
301
qx(iel) = grad(iel,1) * aaa
302
qy(iel) = grad(iel,2) * aaa
303
qz(iel) = grad(iel,3) * aaa
446
309
!===============================================================================
447
310
! 5. Terme Source Radiatif d'absorption et densite de flux incident
448
311
!===============================================================================