1
1
!-------------------------------------------------------------------------------
3
! Code_Saturne version 2.0.0-beta2
4
! --------------------------
6
! This file is part of the Code_Saturne Kernel, element of the
7
! Code_Saturne CFD tool.
9
! Copyright (C) 1998-2009 EDF S.A., France
11
! contact: saturne-support@edf.fr
13
! The Code_Saturne Kernel is free software; you can redistribute it
14
! and/or modify it under the terms of the GNU General Public License
15
! as published by the Free Software Foundation; either version 2 of
16
! the License, or (at your option) any later version.
18
! The Code_Saturne Kernel is distributed in the hope that it will be
19
! useful, but WITHOUT ANY WARRANTY; without even the implied warranty
20
! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
! GNU General Public License for more details.
23
! You should have received a copy of the GNU General Public License
24
! along with the Code_Saturne Kernel; if not, write to the
25
! Free Software Foundation, Inc.,
26
! 51 Franklin St, Fifth Floor,
27
! Boston, MA 02110-1301 USA
5
! This file is part of Code_Saturne, a general-purpose CFD tool.
7
! Copyright (C) 1998-2011 EDF S.A.
9
! This program is free software; you can redistribute it and/or modify it under
10
! the terms of the GNU General Public License as published by the Free Software
11
! Foundation; either version 2 of the License, or (at your option) any later
14
! This program is distributed in the hope that it will be useful, but WITHOUT
15
! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16
! FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19
! You should have received a copy of the GNU General Public License along with
20
! this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
21
! Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
23
!-------------------------------------------------------------------------------
31
25
subroutine uslwci &
35
ndim , ncelet , ncel , nfac , nfabor , nfml , nprfml , &
36
nnod , lndfac , lndfbr , ncelbr , &
37
nvar , nscal , nphas , &
38
nideve , nrdeve , nituse , nrtuse , &
39
ifacel , ifabor , ifmfbr , ifmcel , iprfml , maxelt , lstelt , &
40
ipnfac , nodfac , ipnfbr , nodfbr , &
41
idevel , ituser , ia , &
42
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
43
dt , rtp , propce , propfa , propfb , coefa , coefb , &
44
rdevel , rtuser , ra )
29
dt , rtp , propce , propfa , propfb , coefa , coefb )
46
31
!===============================================================================
64
49
! c) PROPFB (Properties at boundary faces).
67
! PROPCE(IEL,IPPROC(IROM (IPHAS))) = IROM of cell IEL of phase IPHAS
68
! PROPCE(IEL,IPPROC(ICP (IPHAS))) = ICP of cell IEL of phase IPHAS
52
! PROPCE(IEL,IPPROC(IROM )) = IROM of cell IEL
53
! PROPCE(IEL,IPPROC(ICP )) = ICP of cell IEL
70
55
! PROPFA(IFAC,IPPROF(IFLUMA(IVAR )))= FLUMAS of IVAR at the internal face IFAC
72
! PROPFB(IFAC,IPPROB(IROM (IPHAS)))= ROMB of IPHAS at the boundary face IFAC
57
! PROPFB(IFAC,IPPROB(IROM ))= ROMB at the boundary face IFAC
73
58
! PROPFB(IFAC,IPPROB(IFLUMA(IVAR )))= FLUMAB of IVAR at the boundary face IFAC
75
60
! All cells can be identified by using the subroutine 'getcel'.
139
124
!__________________.____._____.________________________________________________.
140
125
! name !type!mode ! role !
141
126
!__________________!____!_____!________________________________________________!
142
! idbia0 ! i ! <-- ! number of first free position in ia !
143
! idbra0 ! i ! <-- ! number of first free position in ra !
144
! ndim ! i ! <-- ! spatial dimension !
145
! ncelet ! i ! <-- ! number of extended (real + ghost) cells !
146
! ncel ! i ! <-- ! number of cells !
147
! nfac ! i ! <-- ! number of interior faces !
148
! nfabor ! i ! <-- ! number of boundary faces !
149
! nfml ! i ! <-- ! number of families (group classes) !
150
! nprfml ! i ! <-- ! number of properties per family (group class) !
151
! nnod ! i ! <-- ! number of vertices !
152
! lndfac ! i ! <-- ! size of nodfac indexed array !
153
! lndfbr ! i ! <-- ! size of nodfbr indexed array !
154
! ncelbr ! i ! <-- ! number of cells with faces on boundary !
155
127
! nvar ! i ! <-- ! total number of variables !
156
128
! nscal ! i ! <-- ! total number of scalars !
157
! nphas ! i ! <-- ! number of phases !
158
! nideve, nrdeve ! i ! <-- ! sizes of idevel and rdevel arrays !
159
! nituse, nrtuse ! i ! <-- ! sizes of ituser and rtuser arrays !
160
! ifacel(2, nfac) ! ia ! <-- ! interior faces -> cells connectivity !
161
! ifabor(nfabor) ! ia ! <-- ! boundary faces -> cells connectivity !
162
! ifmfbr(nfabor) ! ia ! <-- ! boundary face family numbers !
163
! ifmcel(ncelet) ! ia ! <-- ! cell family numbers !
164
! iprfml ! ia ! <-- ! property numbers per family !
165
! (nfml, nprfml) ! ! ! !
166
! maxelt ! e ! <-- ! max number of cells and faces (int/boundary) !
167
! lstelt(maxelt) ! ia ! --- ! work array !
168
! ipnfac(nfac+1) ! ia ! <-- ! interior faces -> vertices index (optional) !
169
! nodfac(lndfac) ! ia ! <-- ! interior faces -> vertices list (optional) !
170
! ipnfbr(nfabor+1) ! ia ! <-- ! boundary faces -> vertices index (optional) !
171
! nodfac(lndfbr) ! ia ! <-- ! boundary faces -> vertices list (optional) !
172
129
! icodcl ! ia ! --> ! boundary condition code !
173
130
! (nfabor, nvar) ! ! ! = 1 -> Dirichlet !
174
131
! ! ! ! = 2 -> flux density !
178
135
! ! ! ! = 9 -> free inlet/outlet (velocity) !
179
136
! ! ! ! inflowing possibly blocked !
180
137
! itrifb(nfabor ! ia ! <-- ! indirection for boundary faces ordering) !
181
! (nfabor, nphas) ! ! ! !
182
138
! itypfb ! ia ! --> ! boundary face types !
183
! (nfabor, nphas) ! ! ! !
184
! idevel(nideve) ! ia ! <-- ! integer work array for temporary developpement !
185
! ituser(nituse ! ia ! <-- ! user-reserved integer work array !
186
! ia(*) ! ia ! --- ! main integer work array !
187
! xyzcen ! ra ! <-- ! cell centers !
188
! (ndim, ncelet) ! ! ! !
189
! surfac ! ra ! <-- ! interior faces surface vectors !
190
! (ndim, nfac) ! ! ! !
191
! surfbo ! ra ! <-- ! boundary faces surface vectors !
192
! (ndim, nfavor) ! ! ! !
193
! cdgfac ! ra ! <-- ! interior faces centers of gravity !
194
! (ndim, nfac) ! ! ! !
195
! cdgfbo ! ra ! <-- ! boundary faces centers of gravity !
196
! (ndim, nfabor) ! ! ! !
197
! xyznod ! ra ! <-- ! vertex coordinates (optional) !
198
! (ndim, nnod) ! ! ! !
199
! volume(ncelet) ! ra ! <-- ! cell volumes !
200
139
! dt(ncelet) ! ra ! <-- ! time step (per cell) !
201
140
! rtp, rtpa ! ra ! <-- ! calculated variables at cell centers !
202
141
! (ncelet, *) ! ! ! (at current and preceding time steps) !
215
154
! ! ! ! for velocities ( vistl+visct)*gradu !
216
155
! ! ! ! for pressure dt*gradp !
217
156
! ! ! ! for scalars cp*(viscls+visct/sigmas)*gradt !
218
! w1,2,3,4,5,6 ! ra ! --- ! work arrays !
219
! (ncelet) ! ! ! (computation of pressure gradient) !
220
! coefu ! ra ! --- ! tab de trav !
221
! (nfabor, 3) ! ! ! (computation of pressure gradient) !
222
! rdevel(nrdeve) ! ra ! <-> ! tab reel complementaire developemt !
223
! rdevel(nideve) ! ra ! <-- ! real work array for temporary developpement !
224
! rtuser(nituse ! ra ! <-- ! user-reserved real work array !
225
! ra(*) ! ra ! --- ! main real work array !
226
157
!__________________!____!_____!________________________________________________!
228
159
! Type: i (integer), r (real), s (string), a (array), l (logical),
230
161
! mode: <-- input, --> output, <-> modifies data, --- work array
231
162
!===============================================================================
164
!===============================================================================
166
!===============================================================================
184
!===============================================================================
235
!===============================================================================
237
!===============================================================================
254
!===============================================================================
256
integer idbia0 , idbra0
257
integer ndim , ncelet , ncel , nfac , nfabor
258
integer nfml , nprfml
259
integer nnod , lndfac , lndfbr , ncelbr
260
integer nvar , nscal , nphas
261
integer nideve , nrdeve , nituse , nrtuse
263
integer ifacel(2,nfac) , ifabor(nfabor)
264
integer ifmfbr(nfabor) , ifmcel(ncelet)
265
integer iprfml(nfml,nprfml), maxelt, lstelt(maxelt)
266
integer ipnfac(nfac+1), nodfac(lndfac)
267
integer ipnfbr(nfabor+1), nodfbr(lndfbr)
268
integer idevel(nideve), ituser(nituse), ia(*)
270
double precision xyzcen(ndim,ncelet)
271
double precision surfac(ndim,nfac), surfbo(ndim,nfabor)
272
double precision cdgfac(ndim,nfac), cdgfbo(ndim,nfabor)
273
double precision xyznod(ndim,nnod), volume(ncelet)
274
192
double precision dt(ncelet), rtp(ncelet,*), propce(ncelet,*)
275
193
double precision propfa(nfac,*), propfb(nfabor,*)
276
194
double precision coefa(nfabor,*), coefb(nfabor,*)
277
double precision rdevel(nrdeve), rtuser(nrtuse), ra(*)
279
196
! Local Variables
281
integer idebia, idebra
282
integer iel, mode, igg, iphas, izone
198
integer iel, mode, igg, izone
283
199
double precision hinit, coefg(ngazgm)
284
200
double precision sommqf, sommqt, sommq, tentm, fmelm