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 ebuini &
32
ndim , ncelet , ncel , nfac , nfabor , nfml , nprfml , &
33
nnod , lndfac , lndfbr , ncelbr , &
34
nvar , nscal , nphas , &
35
nideve , nrdeve , nituse , nrtuse , &
36
ifacel , ifabor , ifmfbr , ifmcel , iprfml , maxelt , lstelt , &
37
ipnfac , nodfac , ipnfbr , nodfbr , &
38
idevel , ituser , ia , &
39
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
40
dt , rtp , propce , propfa , propfb , coefa , coefb , &
41
rdevel , rtuser , ra )
27
dt , rtp , propce , propfa , propfb , coefa , coefb )
43
29
!===============================================================================
66
52
! PROPCE (prop au centre), PROPFA (aux faces internes),
67
53
! PROPFB (prop aux faces de bord)
69
! PROPCE(IEL,IPPROC(IROM (IPHAS))) designe ROM (IEL ,IPHAS)
70
! PROPCE(IEL,IPPROC(IVISCL(IPHAS))) designe VISCL (IEL ,IPHAS)
71
! PROPCE(IEL,IPPROC(ICP (IPHAS))) designe CP (IEL ,IPHAS)
55
! PROPCE(IEL,IPPROC(IROM )) designe ROM (IEL)
56
! PROPCE(IEL,IPPROC(IVISCL)) designe VISCL (IEL)
57
! PROPCE(IEL,IPPROC(ICP )) designe CP (IEL)
72
58
! PROPCE(IEL,IPPROC(IVISLS(ISCAL))) designe VISLS (IEL ,ISCAL)
74
60
! PROPFA(IFAC,IPPROF(IFLUMA(IVAR ))) designe FLUMAS(IFAC,IVAR)
76
! PROPFB(IFAC,IPPROB(IROM (IPHAS))) designe ROMB (IFAC,IPHAS)
62
! PROPFB(IFAC,IPPROB(IROM )) designe ROMB (IFAC)
77
63
! PROPFB(IFAC,IPPROB(IFLUMA(IVAR ))) designe FLUMAB(IFAC,IVAR)
79
65
! LA MODIFICATION DES PROPRIETES PHYSIQUES (ROM, VISCL, VISCLS, CP)
84
70
!__________________.____._____.________________________________________________.
85
71
! name !type!mode ! role !
86
72
!__________________!____!_____!________________________________________________!
87
! idbia0 ! i ! <-- ! number of first free position in ia !
88
! idbra0 ! i ! <-- ! number of first free position in ra !
89
! ndim ! i ! <-- ! spatial dimension !
90
! ncelet ! i ! <-- ! number of extended (real + ghost) cells !
91
! ncel ! i ! <-- ! number of cells !
92
! nfac ! i ! <-- ! number of interior faces !
93
! nfabor ! i ! <-- ! number of boundary faces !
94
! nfml ! i ! <-- ! number of families (group classes) !
95
! nprfml ! i ! <-- ! number of properties per family (group class) !
96
! nnod ! i ! <-- ! number of vertices !
97
! lndfac ! i ! <-- ! size of nodfac indexed array !
98
! lndfbr ! i ! <-- ! size of nodfbr indexed array !
99
! ncelbr ! i ! <-- ! number of cells with faces on boundary !
100
73
! nvar ! i ! <-- ! total number of variables !
101
74
! nscal ! i ! <-- ! total number of scalars !
102
! nphas ! i ! <-- ! number of phases !
103
! nideve, nrdeve ! i ! <-- ! sizes of idevel and rdevel arrays !
104
! nituse, nrtuse ! i ! <-- ! sizes of ituser and rtuser arrays !
105
! ifacel(2, nfac) ! ia ! <-- ! interior faces -> cells connectivity !
106
! ifabor(nfabor) ! ia ! <-- ! boundary faces -> cells connectivity !
107
! ifmfbr(nfabor) ! ia ! <-- ! boundary face family numbers !
108
! ifmcel(ncelet) ! ia ! <-- ! cell family numbers !
109
! iprfml ! ia ! <-- ! property numbers per family !
110
! (nfml, nprfml) ! ! ! !
111
! maxelt ! i ! <-- ! max number of cells and faces (int/boundary) !
112
! lstelt(maxelt) ! ia ! --- ! work array !
113
! ipnfac(nfac+1) ! ia ! <-- ! interior faces -> vertices index (optional) !
114
! nodfac(lndfac) ! ia ! <-- ! interior faces -> vertices list (optional) !
115
! ipnfbr(nfabor+1) ! ia ! <-- ! boundary faces -> vertices index (optional) !
116
! nodfbr(lndfbr) ! ia ! <-- ! boundary faces -> vertices list (optional) !
117
! idevel(nideve) ! ia ! <-> ! integer work array for temporary development !
118
! ituser(nituse) ! ia ! <-> ! user-reserved integer work array !
119
! ia(*) ! ia ! --- ! main integer work array !
120
! xyzcen ! ra ! <-- ! cell centers !
121
! (ndim, ncelet) ! ! ! !
122
! surfac ! ra ! <-- ! interior faces surface vectors !
123
! (ndim, nfac) ! ! ! !
124
! surfbo ! ra ! <-- ! boundary faces surface vectors !
125
! (ndim, nfabor) ! ! ! !
126
! cdgfac ! ra ! <-- ! interior faces centers of gravity !
127
! (ndim, nfac) ! ! ! !
128
! cdgfbo ! ra ! <-- ! boundary faces centers of gravity !
129
! (ndim, nfabor) ! ! ! !
130
! xyznod ! ra ! <-- ! vertex coordinates (optional) !
131
! (ndim, nnod) ! ! ! !
132
! volume(ncelet) ! ra ! <-- ! cell volumes !
133
75
! dt(ncelet) ! tr ! <-- ! valeur du pas de temps !
134
76
! rtp ! tr ! <-- ! variables de calcul au centre des !
135
77
! (ncelet,*) ! ! ! cellules !
149
88
! --- tableau de travail
150
89
!===============================================================================
91
!===============================================================================
93
!===============================================================================
110
!===============================================================================
154
!===============================================================================
156
!===============================================================================
172
!===============================================================================
174
integer idbia0 , idbra0
175
integer ndim , ncelet , ncel , nfac , nfabor
176
integer nfml , nprfml
177
integer nnod , lndfac , lndfbr , ncelbr
178
integer nvar , nscal , nphas
179
integer nideve , nrdeve , nituse , nrtuse
181
integer ifacel(2,nfac) , ifabor(nfabor)
182
integer ifmfbr(nfabor) , ifmcel(ncelet)
183
integer iprfml(nfml,nprfml), maxelt, lstelt(maxelt)
184
integer ipnfac(nfac+1), nodfac(lndfac)
185
integer ipnfbr(nfabor+1), nodfbr(lndfbr)
186
integer idevel(nideve), ituser(nituse), ia(*)
188
double precision xyzcen(ndim,ncelet)
189
double precision surfac(ndim,nfac), surfbo(ndim,nfabor)
190
double precision cdgfac(ndim,nfac), cdgfbo(ndim,nfabor)
191
double precision xyznod(ndim,nnod), volume(ncelet)
192
117
double precision dt(ncelet), rtp(ncelet,*), propce(ncelet,*)
193
118
double precision propfa(nfac,*), propfb(nfabor,*)
194
119
double precision coefa(nfabor,*), coefb(nfabor,*)
195
double precision rdevel(nrdeve), rtuser(nrtuse), ra(*)
198
122
! Local variables
200
124
character*80 chaine
201
integer idebia, idebra
202
integer iel, mode, igg, iphas, izone
203
integer iscal, ivar, ii, idimte, itenso
125
integer iel, mode, igg, izone
126
integer iscal, ivar, ii
204
127
double precision hinit, coefg(ngazgm), hair, tinitk
205
128
double precision sommqf, sommqt, sommq, tentm, fmelm
206
129
double precision valmax, valmin, xkent, xeent, d2s3
274
193
! ---- TURBULENCE
276
if (itytur(iphas).eq.2) then
278
rtp(iel,ik(iphas)) = xkent
279
rtp(iel,iep(iphas)) = xeent
281
elseif (itytur(iphas).eq.3) then
283
rtp(iel,ir11(iphas)) = d2s3*xkent
284
rtp(iel,ir22(iphas)) = d2s3*xkent
285
rtp(iel,ir33(iphas)) = d2s3*xkent
286
rtp(iel,ir12(iphas)) = 0.d0
287
rtp(iel,ir13(iphas)) = 0.d0
288
rtp(iel,ir23(iphas)) = 0.d0
289
rtp(iel,iep(iphas)) = xeent
291
elseif (iturb(iphas).eq.50) then
293
rtp(iel,ik(iphas)) = xkent
294
rtp(iel,iep(iphas)) = xeent
295
rtp(iel,iphi(iphas)) = d2s3
296
rtp(iel,ifb(iphas)) = 0.d0
298
elseif (iturb(iphas).eq.60) then
300
rtp(iel,ik(iphas)) = xkent
301
rtp(iel,iomg(iphas)) = xeent/cmu/xkent
195
if (itytur.eq.2) then
200
elseif (itytur.eq.3) then
202
rtp(iel,ir11) = d2s3*xkent
203
rtp(iel,ir22) = d2s3*xkent
204
rtp(iel,ir33) = d2s3*xkent
210
elseif (iturb.eq.50) then
217
elseif (iturb.eq.60) then
220
rtp(iel,iomg) = xeent/cmu/xkent
222
elseif(iturb.eq.70) then
224
rtp(iel,inusa) = cmu*xkent**2/xeent
384
( idebia , idebra , &
385
ndim , ncelet , ncel , nfac , nfabor , nfml , nprfml , &
386
nnod , lndfac , lndfbr , ncelbr , &
387
nvar , nscal , nphas , &
388
nideve , nrdeve , nituse , nrtuse , &
389
ifacel , ifabor , ifmfbr , ifmcel , iprfml , maxelt , lstelt , &
390
ipnfac , nodfac , ipnfbr , nodfbr , &
391
idevel , ituser , ia , &
392
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
393
dt , rtp , propce , propfa , propfb , coefa , coefb , &
394
rdevel , rtuser , ra )
308
dt , rtp , propce , propfa , propfb , coefa , coefb )
396
310
! ----- En periodique et en parallele,
397
311
! il faut echanger ces initialisations (qui sont en fait dans RTPA)
401
call parcom(rtp(1,isca(iygfm)))
403
if ( ippmod(icoebu).eq.2 .or. ippmod(icoebu).eq.3 ) then
404
call parcom(rtp(1,isca(ifm )))
407
if ( ippmod(icoebu).eq.1 .or. ippmod(icoebu).eq.3 ) then
408
call parcom(rtp(1,isca(ihm )))
420
( idimte , itenso , &
421
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
422
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
423
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar))
424
if ( ippmod(icoebu).eq.2 .or. ippmod(icoebu).eq.3 ) then
430
( idimte , itenso , &
431
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
432
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
433
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar))
435
if ( ippmod(icoebu).eq.1 .or. ippmod(icoebu).eq.3 ) then
441
( idimte , itenso , &
442
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
443
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
444
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar))
313
if (irangp.ge.0.or.iperio.eq.1) then
314
call synsca(rtp(1,isca(iygfm)))
316
if ( ippmod(icoebu).eq.2 .or. ippmod(icoebu).eq.3 ) then
317
call synsca(rtp(1,isca(ifm)))
320
if ( ippmod(icoebu).eq.1 .or. ippmod(icoebu).eq.3 ) then
321
call synsca(rtp(1,isca(ihm)))