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 d3pini &
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
!===============================================================================
67
53
! PROPCE (prop au centre), PROPFA (aux faces internes),
68
54
! PROPFB (prop aux faces de bord)
70
! PROPCE(IEL,IPPROC(IROM (IPHAS))) designe ROM (IEL ,IPHAS)
71
! PROPCE(IEL,IPPROC(IVISCL(IPHAS))) designe VISCL (IEL ,IPHAS)
72
! PROPCE(IEL,IPPROC(ICP (IPHAS))) designe CP (IEL ,IPHAS)
56
! PROPCE(IEL,IPPROC(IROM )) designe ROM (IEL)
57
! PROPCE(IEL,IPPROC(IVISCL)) designe VISCL (IEL)
58
! PROPCE(IEL,IPPROC(ICP )) designe CP (IEL)
73
59
! PROPCE(IEL,IPPROC(IVISLS(ISCAL))) designe VISLS (IEL ,ISCAL)
75
61
! PROPFA(IFAC,IPPROF(IFLUMA(IVAR ))) designe FLUMAS(IFAC,IVAR)
77
! PROPFB(IFAC,IPPROB(IROM (IPHAS))) designe ROMB (IFAC,IPHAS)
63
! PROPFB(IFAC,IPPROB(IROM )) designe ROMB (IFAC)
78
64
! PROPFB(IFAC,IPPROB(IFLUMA(IVAR ))) designe FLUMAB(IFAC,IVAR)
80
66
! LA MODIFICATION DES PROPRIETES PHYSIQUES (ROM, VISCL, VISCLS, CP)
85
71
!__________________.____._____.________________________________________________.
86
72
! name !type!mode ! role !
87
73
!__________________!____!_____!________________________________________________!
88
! idbia0 ! i ! <-- ! number of first free position in ia !
89
! idbra0 ! i ! <-- ! number of first free position in ra !
90
! ndim ! i ! <-- ! spatial dimension !
91
! ncelet ! i ! <-- ! number of extended (real + ghost) cells !
92
! ncel ! i ! <-- ! number of cells !
93
! nfac ! i ! <-- ! number of interior faces !
94
! nfabor ! i ! <-- ! number of boundary faces !
95
! nfml ! i ! <-- ! number of families (group classes) !
96
! nprfml ! i ! <-- ! number of properties per family (group class) !
97
! nnod ! i ! <-- ! number of vertices !
98
! lndfac ! i ! <-- ! size of nodfac indexed array !
99
! lndfbr ! i ! <-- ! size of nodfbr indexed array !
100
! ncelbr ! i ! <-- ! number of cells with faces on boundary !
101
74
! nvar ! i ! <-- ! total number of variables !
102
75
! nscal ! i ! <-- ! total number of scalars !
103
! nphas ! i ! <-- ! number of phases !
104
! nideve, nrdeve ! i ! <-- ! sizes of idevel and rdevel arrays !
105
! nituse, nrtuse ! i ! <-- ! sizes of ituser and rtuser arrays !
106
! ifacel(2, nfac) ! ia ! <-- ! interior faces -> cells connectivity !
107
! ifabor(nfabor) ! ia ! <-- ! boundary faces -> cells connectivity !
108
! ifmfbr(nfabor) ! ia ! <-- ! boundary face family numbers !
109
! ifmcel(ncelet) ! ia ! <-- ! cell family numbers !
110
! iprfml ! ia ! <-- ! property numbers per family !
111
! (nfml, nprfml) ! ! ! !
112
! maxelt ! i ! <-- ! max number of cells and faces (int/boundary) !
113
! lstelt(maxelt) ! ia ! --- ! work array !
114
! ipnfac(nfac+1) ! ia ! <-- ! interior faces -> vertices index (optional) !
115
! nodfac(lndfac) ! ia ! <-- ! interior faces -> vertices list (optional) !
116
! ipnfbr(nfabor+1) ! ia ! <-- ! boundary faces -> vertices index (optional) !
117
! nodfbr(lndfbr) ! ia ! <-- ! boundary faces -> vertices list (optional) !
118
! idevel(nideve) ! ia ! <-> ! integer work array for temporary development !
119
! ituser(nituse) ! ia ! <-> ! user-reserved integer work array !
120
! ia(*) ! ia ! --- ! main integer work array !
121
! xyzcen ! ra ! <-- ! cell centers !
122
! (ndim, ncelet) ! ! ! !
123
! surfac ! ra ! <-- ! interior faces surface vectors !
124
! (ndim, nfac) ! ! ! !
125
! surfbo ! ra ! <-- ! boundary faces surface vectors !
126
! (ndim, nfabor) ! ! ! !
127
! cdgfac ! ra ! <-- ! interior faces centers of gravity !
128
! (ndim, nfac) ! ! ! !
129
! cdgfbo ! ra ! <-- ! boundary faces centers of gravity !
130
! (ndim, nfabor) ! ! ! !
131
! xyznod ! ra ! <-- ! vertex coordinates (optional) !
132
! (ndim, nnod) ! ! ! !
133
! volume(ncelet) ! ra ! <-- ! cell volumes !
134
76
! dt(ncelet) ! tr ! <-- ! valeur du pas de temps !
135
77
! rtp ! tr ! <-- ! variables de calcul au centre des !
136
78
! (ncelet,*) ! ! ! cellules !
150
89
! --- tableau de travail
151
90
!===============================================================================
92
!===============================================================================
94
!===============================================================================
111
!===============================================================================
155
!===============================================================================
157
!===============================================================================
173
!===============================================================================
175
integer idbia0 , idbra0
176
integer ndim , ncelet , ncel , nfac , nfabor
177
integer nfml , nprfml
178
integer nnod , lndfac , lndfbr , ncelbr
179
integer nvar , nscal , nphas
180
integer nideve , nrdeve , nituse , nrtuse
182
integer ifacel(2,nfac) , ifabor(nfabor)
183
integer ifmfbr(nfabor) , ifmcel(ncelet)
184
integer iprfml(nfml,nprfml), maxelt, lstelt(maxelt)
185
integer ipnfac(nfac+1), nodfac(lndfac)
186
integer ipnfbr(nfabor+1), nodfbr(lndfbr)
187
integer idevel(nideve), ituser(nituse), ia(*)
189
double precision xyzcen(ndim,ncelet)
190
double precision surfac(ndim,nfac), surfbo(ndim,nfabor)
191
double precision cdgfac(ndim,nfac), cdgfbo(ndim,nfabor)
192
double precision xyznod(ndim,nnod), volume(ncelet)
193
118
double precision dt(ncelet), rtp(ncelet,*), propce(ncelet,*)
194
119
double precision propfa(nfac,*), propfb(nfabor,*)
195
120
double precision coefa(nfabor,*), coefb(nfabor,*)
196
double precision rdevel(nrdeve), rtuser(nrtuse), ra(*)
198
122
! Local variables
200
124
character*80 chaine
201
integer idebia, idebra
202
integer iel, igg, iphas, mode
203
integer iscal, ivar, ii, idimte, itenso
125
integer iel, igg, mode
126
integer iscal, ivar, ii
204
127
double precision coefg(ngazgm), hair, tinitk
205
128
double precision valmax, valmin
302
( idebia , idebra , &
303
ndim , ncelet , ncel , nfac , nfabor , nfml , nprfml , &
304
nnod , lndfac , lndfbr , ncelbr , &
305
nvar , nscal , nphas , &
306
nideve , nrdeve , nituse , nrtuse , &
307
ifacel , ifabor , ifmfbr , ifmcel , iprfml , maxelt , lstelt , &
308
ipnfac , nodfac , ipnfbr , nodfbr , &
309
idevel , ituser , ia , &
310
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
311
dt , rtp , propce , propfa , propfb , coefa , coefb , &
312
rdevel , rtuser , ra )
221
dt , rtp , propce , propfa , propfb , coefa , coefb )
314
223
! ----- En periodique et en parallele,
315
224
! il faut echanger ces initialisations
319
call parcom(rtp(1,isca(ifm )))
321
call parcom(rtp(1,isca(ifp2m)))
323
if ( ippmod(icod3p).eq.1 ) then
324
call parcom(rtp(1,isca(ihm )))
336
( idimte , itenso , &
337
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
338
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
339
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar))
345
( idimte , itenso , &
346
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
347
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
348
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar))
349
if ( ippmod(icod3p).eq.1 ) then
355
( idimte , itenso , &
356
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
357
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar), &
358
rtp(1,ivar), rtp(1,ivar), rtp(1,ivar))
226
if (irangp.ge.0.or.iperio.eq.1) then
227
call synsca(rtp(1,isca(ifm)))
229
call synsca(rtp(1,isca(ifp2m)))
231
if ( ippmod(icod3p).eq.1 ) then
232
call synsca(rtp(1,isca(ihm)))