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 typecl &
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 , &
37
ipnfac , nodfac , ipnfbr , nodfbr , &
38
27
itypfb , itrifb , icodcl , isostd , &
39
idevel , ituser , ia , &
40
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
41
28
dt , rtp , rtpa , propce , propfa , propfb , &
42
coefa , coefb , rcodcl , frcxt , &
43
w1 , w2 , w3 , w4 , w5 , w6 , coefu , &
44
rdevel , rtuser , ra )
29
coefa , coefb , rcodcl , frcxt )
46
31
!===============================================================================
150
84
! --- tableau de travail
151
85
!===============================================================================
87
!===============================================================================
89
!===============================================================================
92
use dimens, only: ndimfb
105
!===============================================================================
155
!===============================================================================
156
! Fortran common blocks
157
!===============================================================================
173
!===============================================================================
177
integer idbia0 , idbra0
178
integer ndim , ncelet , ncel , nfac , nfabor
179
integer nfml , nprfml
180
integer nnod , lndfac , lndfbr , ncelbr
181
integer nvar , nscal , nphas
182
integer nideve , nrdeve , nituse , nrtuse
184
integer ifacel(2,nfac) , ifabor(nfabor)
185
integer ifmfbr(nfabor) , ifmcel(ncelet)
186
integer iprfml(nfml,nprfml)
187
integer ipnfac(nfac+1), nodfac(lndfac)
188
integer ipnfbr(nfabor+1), nodfbr(lndfbr)
189
113
integer icodcl(nfabor,nvar)
190
integer itypfb(nfabor,nphas) , itrifb(nfabor,nphas)
191
integer isostd(nfabor+1,nphas)
192
integer idevel(nideve), ituser(nituse)
114
integer itypfb(nfabor) , itrifb(nfabor)
115
integer isostd(nfabor+1)
195
double precision xyzcen(ndim,ncelet)
196
double precision surfac(ndim,nfac), surfbo(ndim,nfabor)
197
double precision cdgfac(ndim,nfac), cdgfbo(ndim,nfabor)
198
double precision xyznod(ndim,nnod), volume(ncelet)
199
117
double precision dt(ncelet), rtp(ncelet,*), rtpa(ncelet,*)
200
118
double precision propce(ncelet,*)
201
119
double precision propfa(nfac,*), propfb(ndimfb,*)
202
120
double precision coefa(ndimfb,*), coefb(ndimfb,*)
203
121
double precision rcodcl(nfabor,nvar,3)
204
double precision frcxt(ncelet,3,nphas)
205
double precision w1(ncelet),w2(ncelet),w3(ncelet)
206
double precision w4(ncelet),w5(ncelet),w6(ncelet)
207
double precision coefu(nfabor,3)
208
double precision rdevel(nrdeve), rtuser(nrtuse), ra(*)
122
double precision frcxt(ncelet,3)
210
124
! Local variables
212
126
character chaine*80
213
integer idebia, idebra
214
127
integer ifac, ivar, iel
215
128
integer iok, inc, iccocg, ideb, ifin, inb, isum, iwrnp
216
integer ifrslb(nphsmx), itbslb(nphsmx)
217
integer ityp, ii, jj, iphas, iwaru, iflmab
129
integer ifrslb, itbslb
130
integer ityp, ii, jj, iwaru, iflmab
218
131
integer nswrgp, imligp, iwarnp
219
integer ipriph, iuiph, iviph, iwiph
220
integer ir11ip, ir22ip, ir33ip, ir12ip, ir13ip,ir23ip
221
integer ikiph , iepiph, iphiph, ifbiph, iomgip
222
integer iprnew, kphas, iii
223
133
integer irangd, iclipr, iiptot
224
integer itrois, ifadir, nfadir
225
135
double precision pref, epsrgp, climgp, extrap, coefup
226
136
double precision diipbx, diipby, diipbz
227
137
double precision flumbf, flumty(ntypmx)
228
double precision ro0iph, p0iph, pr0iph, xxp0, xyp0, xzp0
229
double precision xyzref(3)
138
double precision xxp0, xyp0, xzp0, d0, d0min
139
double precision xyzref(4) ! xyzref(3) + coefup for broadcast
141
double precision rvoid(1)
143
double precision, allocatable, dimension(:) :: coefu
144
double precision, allocatable, dimension(:,:) :: grad
271
191
! Count faces of each type (temporarily in ifinty)
281
ityp = itypfb(ifac,iphas)
282
ifinty(ityp,iphas) = ifinty(ityp,iphas) + 1
199
ifinty(ityp) = ifinty(ityp) + 1
287
203
! Set start of each group of faces in itrifb (sorted by type): idebty
298
idebty(jj,iphas) = idebty(jj,iphas) + ifinty(ii,iphas)
211
idebty(jj) = idebty(jj) + ifinty(ii)
303
215
! Sort faces in itrifb and use the opportunity to correctly set ifinty
307
ifinty(ii,iphas) = idebty(ii,iphas)-1
218
ifinty(ii) = idebty(ii)-1
313
ityp = itypfb(ifac,iphas)
314
ifin = ifinty(ityp,iphas)+1
315
itrifb(ifin,iphas) = ifac
316
ifinty(ityp,iphas) = ifin
223
ifin = ifinty(ityp)+1
325
if(ifinty(ii,iphas).ge.idebty(ii+1,iphas)) then
326
if (iok.eq.0) iok = ii
329
if (irangp.ge.0) call parcmx(iok)
332
write(nfecra,2010) iphas
333
if(ifinty(ii,iphas).ge.idebty(ii+1,iphas)) then
334
write(nfecra,2020) (ifinty(jj,iphas),jj=1,ntypmx)
335
write(nfecra,2030) (idebty(jj,iphas),jj=1,ntypmx)
336
write(nfecra,2040) (itypfb(jj,iphas),jj=1,nfabor)
337
write(nfecra,2098) ii,ifinty(ii,iphas),ii+1,idebty(ii+1,iphas)
339
write(nfecra,2099) ii,ii+1
232
if(ifinty(ii).ge.idebty(ii+1)) then
233
if (iok.eq.0) iok = ii
236
if (irangp.ge.0) call parcmx(iok)
239
if(ifinty(ii).ge.idebty(ii+1)) then
240
write(nfecra,2020) (ifinty(jj),jj=1,ntypmx)
241
write(nfecra,2030) (idebty(jj),jj=1,ntypmx)
242
write(nfecra,2040) (itypfb(jj),jj=1,nfabor)
243
write(nfecra,2098) ii,ifinty(ii),ii+1,idebty(ii+1)
245
write(nfecra,2099) ii,ii+1
349
isum = isum + ifinty(ii,iphas) - idebty(ii,iphas) + 1
351
if (irangp.ge.0) call parcpt (isum)
352
if(isum.ne.nfbrgb) then
353
write(nfecra,3099) iphas, isum, nfbrgb
253
isum = isum + ifinty(ii) - idebty(ii) + 1
255
if (irangp.ge.0) call parcpt (isum)
256
if(isum.ne.nfbrgb) then
257
write(nfecra,3099) isum, nfbrgb
357
260
if (iok.ne.0) then
363
266
! ---> On ecrit les types de faces avec la borne inf et sup et le nb
364
267
! pour chaque type de face trouve (tjrs pour les types par defaut)
366
if(ipass.eq.0.or.iwarni(iu(1)).ge.2) then
269
if(ipass.eq.0.or.iwarni(iu).ge.2) then
370
273
write(nfecra,6010)
374
write(nfecra,6011)iphas
376
if ( ippmod(icompf).lt.0 ) then
379
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
380
if (irangp.ge.0) call parcpt (inb)
381
#if defined(_CS_LANG_FR)
382
write(nfecra,6020) 'Entree ', ii, inb
384
write(nfecra,6020) 'Inlet ', ii, inb
387
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
388
if (irangp.ge.0) call parcpt (inb)
389
#if defined(_CS_LANG_FR)
390
write(nfecra,6020) 'Paroi lisse ', ii, inb
392
write(nfecra,6020) 'Smooth wall ', ii, inb
395
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
396
if (irangp.ge.0) call parcpt (inb)
397
#if defined(_CS_LANG_FR)
398
write(nfecra,6020) 'Paroi rugueuse ', ii, inb
400
write(nfecra,6020) 'Rough wall ', ii, inb
403
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
404
if (irangp.ge.0) call parcpt (inb)
405
#if defined(_CS_LANG_FR)
406
write(nfecra,6020) 'Symetrie ', ii, inb
408
write(nfecra,6020) 'Symmetry ', ii, inb
411
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
412
if (irangp.ge.0) call parcpt (inb)
413
#if defined(_CS_LANG_FR)
414
write(nfecra,6020) 'Sortie libre ', ii, inb
416
write(nfecra,6020) 'Free outlet ', ii, inb
419
if (nbrcpl.ge.1) then
421
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
422
if (irangp.ge.0) call parcpt (inb)
423
#if defined(_CS_LANG_FR)
424
write(nfecra,6020) 'Couplage sat/sat ', ii, inb
426
write(nfecra,6020) 'Sat/Sat coupling ', ii, inb
431
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
432
if (irangp.ge.0) call parcpt (inb)
433
#if defined(_CS_LANG_FR)
434
write(nfecra,6020) 'Indefini ', ii, inb
436
write(nfecra,6020) 'Undefined ', ii, inb
440
if (ii.ne.ientre .and. &
447
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
448
if (irangp.ge.0) call parcpt (inb)
450
#if defined(_CS_LANG_FR)
451
write(nfecra,6020) 'Type utilisateur ', ii, inb
453
write(nfecra,6020) 'User type ', ii, inb
462
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
463
if (irangp.ge.0) call parcpt (inb)
464
#if defined(_CS_LANG_FR)
465
write(nfecra,6020) 'Entree sub. enth.', ii, inb
467
write(nfecra,6020) 'Sub. enth. inlet ', ii, inb
471
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
472
if (irangp.ge.0) call parcpt (inb)
473
#if defined(_CS_LANG_FR)
474
write(nfecra,6020) 'Entree subsonique', ii, inb
476
write(nfecra,6020) 'Subsonic inlet ', ii, inb
480
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
481
if (irangp.ge.0) call parcpt (inb)
482
#if defined(_CS_LANG_FR)
483
write(nfecra,6020) 'Entree/Sortie imp', ii, inb
485
write(nfecra,6020) 'Imp inlet/outlet ', ii, inb
489
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
490
if (irangp.ge.0) call parcpt (inb)
491
#if defined(_CS_LANG_FR)
492
write(nfecra,6020) 'Sortie subsonique', ii, inb
494
write(nfecra,6020) 'Subsonic outlet ', ii, inb
498
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
499
if (irangp.ge.0) call parcpt (inb)
500
#if defined(_CS_LANG_FR)
501
write(nfecra,6020) 'Sortie supersoniq', ii, inb
503
write(nfecra,6020) 'Supersonic outlet', ii, inb
507
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
508
if (irangp.ge.0) call parcpt (inb)
509
#if defined(_CS_LANG_FR)
510
write(nfecra,6020) 'Paroi lisse ', ii, inb
512
write(nfecra,6020) 'Smooth wall ', ii, inb
516
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
517
if (irangp.ge.0) call parcpt (inb)
518
#if defined(_CS_LANG_FR)
519
write(nfecra,6020) 'Paroi rugueuse ', ii, inb
521
write(nfecra,6020) 'Rough wall ', ii, inb
525
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
526
if (irangp.ge.0) call parcpt (inb)
527
#if defined(_CS_LANG_FR)
528
write(nfecra,6020) 'Symetrie ', ii, inb
530
write(nfecra,6020) 'Symmetry ', ii, inb
534
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
535
if (irangp.ge.0) call parcpt (inb)
536
#if defined(_CS_LANG_FR)
537
write(nfecra,6020) 'Indefini ', ii, inb
539
write(nfecra,6020) 'Undefined ', ii, inb
543
if (ii.ne.iesicf .and. &
552
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
553
if (irangp.ge.0) call parcpt (inb)
555
#if defined(_CS_LANG_FR)
556
write(nfecra,6020) 'Type utilisateur ',ii, inb
558
write(nfecra,6020) 'User type ',ii, inb
277
if ( ippmod(icompf).lt.0 ) then
280
inb = ifinty(ii)-idebty(ii)+1
281
if (irangp.ge.0) call parcpt (inb)
282
#if defined(_CS_LANG_FR)
283
write(nfecra,6020) 'Entree ', ii, inb
285
write(nfecra,6020) 'Inlet ', ii, inb
288
inb = ifinty(ii)-idebty(ii)+1
289
if (irangp.ge.0) call parcpt (inb)
290
#if defined(_CS_LANG_FR)
291
write(nfecra,6020) 'Paroi lisse ', ii, inb
293
write(nfecra,6020) 'Smooth wall ', ii, inb
296
inb = ifinty(ii)-idebty(ii)+1
297
if (irangp.ge.0) call parcpt (inb)
298
#if defined(_CS_LANG_FR)
299
write(nfecra,6020) 'Paroi rugueuse ', ii, inb
301
write(nfecra,6020) 'Rough wall ', ii, inb
304
inb = ifinty(ii)-idebty(ii)+1
305
if (irangp.ge.0) call parcpt (inb)
306
#if defined(_CS_LANG_FR)
307
write(nfecra,6020) 'Symetrie ', ii, inb
309
write(nfecra,6020) 'Symmetry ', ii, inb
312
inb = ifinty(ii)-idebty(ii)+1
313
if (irangp.ge.0) call parcpt (inb)
314
#if defined(_CS_LANG_FR)
315
write(nfecra,6020) 'Sortie libre ', ii, inb
317
write(nfecra,6020) 'Free outlet ', ii, inb
320
if (nbrcpl.ge.1) then
322
inb = ifinty(ii)-idebty(ii)+1
323
if (irangp.ge.0) call parcpt (inb)
324
#if defined(_CS_LANG_FR)
325
write(nfecra,6020) 'Couplage sat/sat ', ii, inb
327
write(nfecra,6020) 'Sat/Sat coupling ', ii, inb
332
inb = ifinty(ii)-idebty(ii)+1
333
if (irangp.ge.0) call parcpt (inb)
334
#if defined(_CS_LANG_FR)
335
write(nfecra,6020) 'Indefini ', ii, inb
337
write(nfecra,6020) 'Undefined ', ii, inb
341
if (ii.ne.ientre .and. &
348
inb = ifinty(ii)-idebty(ii)+1
349
if (irangp.ge.0) call parcpt (inb)
351
#if defined(_CS_LANG_FR)
352
write(nfecra,6020) 'Type utilisateur ', ii, inb
354
write(nfecra,6020) 'User type ', ii, inb
363
inb = ifinty(ii)-idebty(ii)+1
364
if (irangp.ge.0) call parcpt (inb)
365
#if defined(_CS_LANG_FR)
366
write(nfecra,6020) 'Entree sub. enth.', ii, inb
368
write(nfecra,6020) 'Sub. enth. inlet ', ii, inb
372
inb = ifinty(ii)-idebty(ii)+1
373
if (irangp.ge.0) call parcpt (inb)
374
#if defined(_CS_LANG_FR)
375
write(nfecra,6020) 'Entree subsonique', ii, inb
377
write(nfecra,6020) 'Subsonic inlet ', ii, inb
381
inb = ifinty(ii)-idebty(ii)+1
382
if (irangp.ge.0) call parcpt (inb)
383
#if defined(_CS_LANG_FR)
384
write(nfecra,6020) 'Entree/Sortie imp', ii, inb
386
write(nfecra,6020) 'Imp inlet/outlet ', ii, inb
390
inb = ifinty(ii)-idebty(ii)+1
391
if (irangp.ge.0) call parcpt (inb)
392
#if defined(_CS_LANG_FR)
393
write(nfecra,6020) 'Sortie subsonique', ii, inb
395
write(nfecra,6020) 'Subsonic outlet ', ii, inb
399
inb = ifinty(ii)-idebty(ii)+1
400
if (irangp.ge.0) call parcpt (inb)
401
#if defined(_CS_LANG_FR)
402
write(nfecra,6020) 'Sortie supersoniq', ii, inb
404
write(nfecra,6020) 'Supersonic outlet', ii, inb
408
inb = ifinty(ii)-idebty(ii)+1
409
if (irangp.ge.0) call parcpt (inb)
410
#if defined(_CS_LANG_FR)
411
write(nfecra,6020) 'Paroi lisse ', ii, inb
413
write(nfecra,6020) 'Smooth wall ', ii, inb
417
inb = ifinty(ii)-idebty(ii)+1
418
if (irangp.ge.0) call parcpt (inb)
419
#if defined(_CS_LANG_FR)
420
write(nfecra,6020) 'Paroi rugueuse ', ii, inb
422
write(nfecra,6020) 'Rough wall ', ii, inb
426
inb = ifinty(ii)-idebty(ii)+1
427
if (irangp.ge.0) call parcpt (inb)
428
#if defined(_CS_LANG_FR)
429
write(nfecra,6020) 'Symetrie ', ii, inb
431
write(nfecra,6020) 'Symmetry ', ii, inb
435
inb = ifinty(ii)-idebty(ii)+1
436
if (irangp.ge.0) call parcpt (inb)
437
#if defined(_CS_LANG_FR)
438
write(nfecra,6020) 'Indefini ', ii, inb
440
write(nfecra,6020) 'Undefined ', ii, inb
444
if (ii.ne.iesicf .and. &
453
inb = ifinty(ii)-idebty(ii)+1
454
if (irangp.ge.0) call parcpt (inb)
456
#if defined(_CS_LANG_FR)
457
write(nfecra,6020) 'Type utilisateur ',ii, inb
459
write(nfecra,6020) 'User type ',ii, inb
575
474
! isolib and ientre are handled later.
576
475
!================================================================================
581
if((itypfb(ifac,iphas) .ne. isolib) .and. &
582
(itypfb(ifac,iphas) .ne. ientre) .and. &
583
(rcodcl(ifac,ivar,1) .gt. rinfin*0.5d0)) then
584
rcodcl(ifac,ivar,1) = 0.d0
479
if((itypfb(ifac) .ne. isolib) .and. &
480
(itypfb(ifac) .ne. ientre) .and. &
481
(rcodcl(ifac,ivar,1) .gt. rinfin*0.5d0)) then
482
rcodcl(ifac,ivar,1) = 0.d0
591
487
!===============================================================================
592
! 5. Compute pressure at boundary (in coefu(*,1))
488
! 5. Compute pressure at boundary (in coefu(*))
593
489
! (if we need it, that is if there are outlet boudary faces).
595
491
! The loop on phases starts here and ends at the end of the next block.
596
492
!===============================================================================
598
! --- Boucle sur les phases : debut
603
pr0iph = pred0(iphas)
604
xxp0 = xyzp0(1,iphas)
605
xyp0 = xyzp0(2,iphas)
606
xzp0 = xyzp0(3,iphas)
611
if(itytur(iphas).eq.2) then
614
elseif(itytur(iphas).eq.3) then
622
elseif(iturb(iphas).eq.50) then
627
elseif(iturb(iphas).eq.60) then
632
! Check if the pressure (unique) has not been handled already
636
do kphas = 1, iphas-1
637
if(ipr(iphas).eq.ipr(kphas)) then
643
! ifrslb = first free standard outlet face (icodcl not modified)
498
! ifrslb = closest free standard outlet face to xyzp0 (icodcl not modified)
644
499
! itbslb = max of ifrslb on all ranks, standard outlet face presence indicator
647
do ii = ifinty(isolib,iphas), idebty(isolib,iphas), -1
648
ifac = itrifb(ii,iphas)
649
if (icodcl(ifac,ipriph).eq.0) &
652
itbslb(iphas) = ifrslb(iphas)
653
if (irangp.ge.0) then
654
call parcmx (itbslb(iphas))
657
if ((itbslb(iphas).gt.0) .and. (iprnew.eq.1)) then
661
nswrgp = nswrgr(ipriph)
662
imligp = imligr(ipriph)
663
iwarnp = iwarni(ipriph)
664
epsrgp = epsrgr(ipriph)
665
climgp = climgr(ipriph)
666
extrap = extrag(ipriph)
667
iclipr = iclrtp(ipriph,icoef)
671
( idebia , idebra , &
672
ndim , ncelet , ncel , nfac , nfabor , nfml , nprfml , &
673
nnod , lndfac , lndfbr , ncelbr , nphas , &
674
nideve , nrdeve , nituse , nrtuse , &
675
ipriph , imrgra , inc , iccocg , nswrgp , imligp , iphydr , &
676
iwarnp , nfecra , epsrgp , climgp , extrap , &
677
ifacel , ifabor , ifmfbr , ifmcel , iprfml , &
678
ipnfac , nodfac , ipnfbr , nodfbr , &
679
idevel , ituser , ia , &
680
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
681
frcxt(1,1,iphas), frcxt(1,2,iphas), frcxt(1,3,iphas), &
682
rtpa(1,ipriph) , coefa(1,iclipr) , coefb(1,iclipr) , &
684
! ------ ------ ------
686
rdevel , rtuser , ra )
689
! Put in coefu the value at I' or F (depending on iphydr) of the
690
! total pressure, computed from P*
692
if (iphydr.eq.0) then
695
iii = idiipb-1+3*(ifac-1)
699
coefu(ifac,1) = rtpa(ii,ipriph) &
700
+ diipbx*w1(ii)+ diipby*w2(ii) + diipbz*w3(ii) &
701
+ ro0iph*( gx*(cdgfbo(1,ifac)-xxp0) &
702
+ gy*(cdgfbo(2,ifac)-xyp0) &
703
+ gz*(cdgfbo(3,ifac)-xzp0)) &
709
coefu(ifac,1) = rtpa(ii,ipriph) &
710
+ (cdgfbo(1,ifac)-xyzcen(1,ii))*w1(ii) &
711
+ (cdgfbo(2,ifac)-xyzcen(2,ii))*w2(ii) &
712
+ (cdgfbo(3,ifac)-xyzcen(3,ii))*w3(ii) &
713
+ ro0iph*( gx*(cdgfbo(1,ifac)-xxp0) &
714
+ gy*(cdgfbo(2,ifac)-xyp0) &
715
+ gz*(cdgfbo(3,ifac)-xzp0)) &
501
! Even when the user has not chosen xyzp0 (and it is thus at the
502
! origin), we choose the face whose center is closest to it, so
503
! as to be mesh numbering (and partitioning) independent.
509
ideb = idebty(isolib)
510
ifin = ifinty(isolib)
514
if (icodcl(ifac,ipr).eq.0) then
515
d0 = (cdgfbo(1,ifac)-xxp0)**2 &
516
+ (cdgfbo(2,ifac)-xyp0)**2 &
517
+ (cdgfbo(3,ifac)-xzp0)**2
518
if (d0.lt.d0min) then
525
! If we have free outlet faces, irangd and itbslb will
526
! contain respectively the rank having the boundary face whose
527
! center is closest to xyzp0, and the local number of that face
528
! on that rank (also equal to ifrslb on that rank).
529
! If we do not have free outlet faces, than itbslb = 0
530
! (as it was initialized that way on all ranks).
534
if (irangp.ge.0) then
535
call parfpt(itbslb, irangd, d0min)
538
if (itbslb.gt.0) then
540
! Allocate a work array for the gradient calculation
541
allocate(grad(ncelet,3))
551
iclipr = iclrtp(ipr,icoef)
555
( ipr , imrgra , inc , iccocg , nswrgp , imligp , iphydr , &
556
iwarnp , nfecra , epsrgp , climgp , extrap , &
558
frcxt(1,1), frcxt(1,2), frcxt(1,3), &
559
rtpa(1,ipr) , coefa(1,iclipr) , coefb(1,iclipr) , &
563
! Put in coefu the value at I' or F (depending on iphydr) of the
564
! total pressure, computed from P*
566
if (iphydr.eq.0) then
569
diipbx = diipb(1,ifac)
570
diipby = diipb(2,ifac)
571
diipbz = diipb(3,ifac)
572
coefu(ifac) = rtpa(ii,ipr) &
573
+ diipbx*grad(ii,1)+ diipby*grad(ii,2) + diipbz*grad(ii,3) &
574
+ ro0*( gx*(cdgfbo(1,ifac)-xxp0) &
575
+ gy*(cdgfbo(2,ifac)-xyp0) &
576
+ gz*(cdgfbo(3,ifac)-xzp0)) &
582
coefu(ifac) = rtpa(ii,ipr) &
583
+ (cdgfbo(1,ifac)-xyzcen(1,ii))*grad(ii,1) &
584
+ (cdgfbo(2,ifac)-xyzcen(2,ii))*grad(ii,2) &
585
+ (cdgfbo(3,ifac)-xyzcen(3,ii))*grad(ii,3) &
586
+ ro0*( gx*(cdgfbo(1,ifac)-xxp0) &
587
+ gy*(cdgfbo(2,ifac)-xyp0) &
588
+ gz*(cdgfbo(3,ifac)-xzp0)) &
723
598
!===============================================================================
724
599
! 6. Convert to rcodcl and icodcl
761
634
! (le reste Neumann, ou Dirichlet si donn�e utilisateur,
762
635
! sera traite plus tard)
764
if (iphydr.eq.1) then
637
if (iphydr.eq.1) then
766
639
! En cas de prise en compte de la pression hydrostatique,
767
640
! on remplit le tableau ISOSTD
768
641
! 0 -> pas une face de sortie standard (i.e. pas sortie ou sortie avec CL
769
642
! de pression modifiee)
770
643
! 1 -> face de sortie libre avec CL de pression automatique.
771
! le numero de la face de reference est stocke dans ISOSTD(NFABOR+1,IPHAS)
644
! le numero de la face de reference est stocke dans ISOSTD(NFABOR+1)
772
645
! qui est d'abord initialise a -1 (i.e. pas de face de sortie std)
773
isostd(nfabor+1,iphas) = -1
775
isostd(ifac,iphas) = 0
776
if ((itypfb(ifac,iphas).eq.isolib).and. &
777
(icodcl(ifac,ipriph).eq.0)) then
778
isostd(ifac,iphas) = 1
783
! ---> Pression de recalage (unique, meme s'il y a plusieurs sorties)
784
! En cas de prise en compte de la pression hydrostatique, on cherche
785
! la face de reference
787
! Determination de la pression P I' unique en parallele
788
! S'il y a des faces de sortie libre, on cherche le premier
789
! proc sur lequel il y en a.
646
isostd(nfabor+1) = -1
649
if ((itypfb(ifac).eq.isolib).and. &
650
(icodcl(ifac,ipr).eq.0)) then
656
! ---> Reference pressure (unique, even if there are multiple outlets)
657
! In case we account for the hydrostatic pressure, we search for the
660
! Determine a unique P I' pressure in parallel
661
! if there are free outlet faces, we have determined that the rank
662
! with the outlet face closest to xyzp0 is irangd.
791
664
! We also retrieve the coordinates of the reference point, so as to
792
665
! calculate pref later on.
794
if (itbslb(iphas).gt.0) then
796
if (irangp.ge.0) then
798
! Indicateur de sorties locales et pointeur sur la premiere face
799
! S'il y a des sorties libres standards quelque part
800
! et s'il n'y en a pas en local, on affecte a IRANGD la valeur -1
801
if(ifrslb(iphas).le.0) then
803
! et s'il y en a en local, on affecte a IRANGD la valeur IRANGP
809
! on prend le numero du dernier proc sur lequel il y en a
811
! si c'est le proc courant, on affecte P I' a COEFUP
812
if (irangp.eq.irangd) then
813
coefup = coefu(ifrslb(iphas),1)
814
if (iphydr.eq.1) isostd(nfabor+1,iphas) = ifrslb(iphas)
815
! sinon on affecte 0 a COEFUP
819
! la somme sur les procs de COEFUP donne donc P I', disponible
820
! pour tous les procs (c'est plus simple qu'un bcast pour
821
! lequel il faudrait au prealable que tous les proc sachent
825
! Reference de pression pour les sorties
826
if (irangp.eq.irangd) then
827
xyzref(1) = cdgfbo(1,ifrslb(iphas))
828
xyzref(2) = cdgfbo(2,ifrslb(iphas))
829
xyzref(3) = cdgfbo(3,ifrslb(iphas))
836
call parrsm(itrois,xyzref)
838
! Determination de la pression P I' unique en sequentiel
839
! on repere la premiere face de sortie libre standard
840
! et on affecte PI' a COEFUP
844
coefup = coefu(ifrslb(iphas),1)
845
if (iphydr.eq.1) isostd(nfabor+1,iphas) = ifrslb(iphas)
846
xyzref(1) = cdgfbo(1,ifrslb(iphas))
847
xyzref(2) = cdgfbo(2,ifrslb(iphas))
848
xyzref(3) = cdgfbo(3,ifrslb(iphas))
851
! Si l'utilisateur n'a rien specifie, on met IXYZP0 a 2 pour mettre
852
! a jour le point de reference
853
if (ixyzp0(iphas).eq.-1) ixyzp0(iphas) = 2
855
elseif (ixyzp0(iphas).lt.0) then
856
! S'il n'y a pas de faces de sortie, on cherche des Dirichlets
857
! eventuels specifies par l'utilisateur pour y localiser
858
! le point de reference.
862
if (icodcl(ifac,ipriph).eq.1) then
667
if (itbslb.gt.0) then
669
! If irangd is the local rank, we assign PI' to coefup
670
! (this is always the case in serial mode)
672
if (irangp.eq.irangd) then
673
xyzref(1) = cdgfbo(1,ifrslb)
674
xyzref(2) = cdgfbo(2,ifrslb)
675
xyzref(3) = cdgfbo(3,ifrslb)
676
xyzref(4) = coefu(ifrslb) ! coefup
677
if (iphydr.eq.1) isostd(nfabor+1) = ifrslb
680
! Broadcast coefup and pressure reference
681
! from irangd to all other ranks.
682
if (irangp.ge.0) then
684
call parbcr(irangd, inb, xyzref)
690
! If the user has not specified anything, we set ixyzp0 to 2 so as
691
! to update the reference point.
693
if (ixyzp0.eq.-1) ixyzp0 = 2
695
elseif (ixyzp0.lt.0) then
697
! If there are no outlet faces, we search for possible Dirichlets
698
! specified by the user so as to locate the reference point.
699
! As before, we chose the face closest to xyzp0 so as to
700
! be mesh numbering (and partitioning) independent.
706
if (icodcl(ifac,ipr).eq.1) then
707
d0 = (cdgfbo(1,ifac)-xxp0)**2 &
708
+ (cdgfbo(2,ifac)-xyp0)**2 &
709
+ (cdgfbo(3,ifac)-xzp0)**2
710
if (d0.lt.d0min) then
868
if (irangp.ge.0) call parcmx(nfadir)
869
if (nfadir.gt.0) then
870
! on met IXYZP0 a 2 pour mettre a jour le point de reference
872
! en parallele on prend le numero du dernier proc sur lequel il y en a
873
if (irangp.ge.0) then
875
if (irangp.eq.irangd) then
876
xyzref(1) = cdgfbo(1,ifadir)
877
xyzref(2) = cdgfbo(2,ifadir)
878
xyzref(3) = cdgfbo(3,ifadir)
885
call parrsm(itrois,xyzref)
887
xyzref(1) = cdgfbo(1,ifadir)
888
xyzref(2) = cdgfbo(2,ifadir)
889
xyzref(3) = cdgfbo(3,ifadir)
718
if (irangp.ge.0) call parfpt(ifadir, irangd, d0min)
720
if (ifadir.gt.0) then
722
! on met ixyzp0 a 2 pour mettre a jour le point de reference
725
if (irangp.eq.irangd) then
726
xyzref(1) = cdgfbo(1,ifadir)
727
xyzref(2) = cdgfbo(2,ifadir)
728
xyzref(3) = cdgfbo(3,ifadir)
731
! Broadcast xyzref from irangd to all other ranks.
732
if (irangp.ge.0) then
734
call parbcr(irangd, inb, xyzref)
896
742
! Si le point de reference n'a pas ete specifie par l'utilisateur
897
743
! on le change et on decale alors COEFU s'il y a des sorties.
898
744
! La pression totale dans PROPCE est aussi decalee (c'est a priori
899
745
! inutile sauf si l'utilisateur l'utilise dans ustsns par exemple)
901
if (ixyzp0(iphas).eq.2) then
903
xxp0 = xyzref(1) - xyzp0(1,iphas)
904
xyp0 = xyzref(2) - xyzp0(2,iphas)
905
xzp0 = xyzref(3) - xyzp0(3,iphas)
906
xyzp0(1,iphas) = xyzref(1)
907
xyzp0(2,iphas) = xyzref(2)
908
xyzp0(3,iphas) = xyzref(3)
909
if (ippmod(icompf).lt.0) then
910
iiptot = ipproc(iprtot(iphas))
912
propce(iel,iiptot) = propce(iel,iiptot) &
913
- ro0iph*( gx*xxp0 + gy*xyp0 + gz*xzp0 )
916
if (itbslb(iphas).gt.0) then
917
write(nfecra,8000)iphas,xxp0,xyp0,xzp0
919
coefu(ifac,1) = coefu(ifac,1) &
920
- ro0iph*( gx*xxp0 + gy*xyp0 + gz*xzp0 )
922
coefup = coefup - ro0iph*( gx*xxp0 + gy*xyp0 + gz*xzp0 )
924
write(nfecra,8001)iphas,xxp0,xyp0,xzp0
926
elseif (ixyzp0(iphas).eq.-1) then
927
! Il n'y a pas de sorties ni de Dirichlet et l'utilisateur n'a
928
! rien specifie -> on met IXYZP0 a 0 pour ne plus y toucher, tout
929
! en differenciant du cas =1 qui necessitera une ecriture en suite
747
if (ixyzp0.eq.2) then
749
xxp0 = xyzref(1) - xyzp0(1)
750
xyp0 = xyzref(2) - xyzp0(2)
751
xzp0 = xyzref(3) - xyzp0(3)
755
if (ippmod(icompf).lt.0) then
756
iiptot = ipproc(iprtot)
758
propce(iel,iiptot) = propce(iel,iiptot) &
759
- ro0*( gx*xxp0 + gy*xyp0 + gz*xzp0 )
762
if (itbslb.gt.0) then
763
write(nfecra,8000)xxp0,xyp0,xzp0
765
coefu(ifac) = coefu(ifac) - ro0*( gx*xxp0 + gy*xyp0 + gz*xzp0 )
767
coefup = coefup - ro0*( gx*xxp0 + gy*xyp0 + gz*xzp0 )
769
write(nfecra,8001)xxp0,xyp0,xzp0
771
elseif (ixyzp0.eq.-1) then
772
! Il n'y a pas de sorties ni de Dirichlet et l'utilisateur n'a
773
! rien specifie -> on met IXYZP0 a 0 pour ne plus y toucher, tout
774
! en differenciant du cas =1 qui necessitera une ecriture en suite
933
778
! La pression totale doit etre recalee en Xref a la valeur
934
779
! Po + rho_0*g.(Xref-X0)
935
if (itbslb(iphas).gt.0) then
936
xxp0 = xyzp0(1,iphas)
937
xyp0 = xyzp0(2,iphas)
938
xzp0 = xyzp0(3,iphas)
940
+ ro0iph*( gx*(xyzref(1)-xxp0) &
941
+ gy*(xyzref(2)-xyp0) &
942
+ gz*(xyzref(3)-xzp0) ) &
780
if (itbslb.gt.0) then
785
+ ro0*( gx*(xyzref(1)-xxp0) &
786
+ gy*(xyzref(2)-xyp0) &
787
+ gz*(xyzref(3)-xzp0) ) &
947
792
! ---> Entree/Sortie libre
949
ideb = idebty(isolib,iphas)
950
ifin = ifinty(isolib,iphas)
953
if (ivar.eq.ipriph) then
956
ifac = itrifb(ii,iphas)
957
if(icodcl(ifac,ivar).eq.0) then
958
icodcl(ifac,ivar) = 1
959
rcodcl(ifac,ivar,1) = coefu(ifac,1) + pref
960
rcodcl(ifac,ivar,2) = rinfin
961
rcodcl(ifac,ivar,3) = 0.d0
965
elseif(ivar.eq.iuiph.or.ivar.eq.iviph.or.ivar.eq.iwiph) then
967
ifac = itrifb(ii,iphas)
968
if(icodcl(ifac,ivar).eq.0) then
969
icodcl(ifac,ivar) = 9
970
rcodcl(ifac,ivar,1) = 0.d0
971
rcodcl(ifac,ivar,2) = rinfin
972
rcodcl(ifac,ivar,3) = 0.d0
794
ideb = idebty(isolib)
795
ifin = ifinty(isolib)
798
if (ivar.eq.ipr) then
801
if(icodcl(ifac,ivar).eq.0) then
802
icodcl(ifac,ivar) = 1
803
rcodcl(ifac,ivar,1) = coefu(ifac) + pref
804
rcodcl(ifac,ivar,2) = rinfin
805
rcodcl(ifac,ivar,3) = 0.d0
808
elseif(ivar.eq.iu.or.ivar.eq.iv.or.ivar.eq.iw) then
811
if(icodcl(ifac,ivar).eq.0) then
812
icodcl(ifac,ivar) = 9
813
rcodcl(ifac,ivar,1) = 0.d0
814
rcodcl(ifac,ivar,2) = rinfin
815
rcodcl(ifac,ivar,3) = 0.d0
1021
865
! ---> La vitesse et les grandeurs turbulentes ont le code 5
1022
866
! le reste Neumann sera traite plus tard
1024
ideb = idebty(iparoi,iphas)
1025
ifin = ifinty(iparoi,iphas)
868
ideb = idebty(iparoi)
869
ifin = ifinty(iparoi)
1028
if ( ivar.eq.iuiph.or.ivar.eq.iviph.or.ivar.eq.iwiph) then
1030
ifac = itrifb(ii,iphas)
1031
if(icodcl(ifac,ivar).eq.0) then
1032
icodcl(ifac,ivar) = 5
1033
! rcodcl(ifac,ivar,1) = Utilisateur
1034
rcodcl(ifac,ivar,2) = rinfin
1035
rcodcl(ifac,ivar,3) = 0.d0
1039
( itytur(iphas).eq.2.and. &
1040
(ivar.eq.ikiph .or.ivar.eq.iepiph) ).or. &
1041
( itytur(iphas).eq.3.and. &
1042
(ivar.eq.ir11ip.or.ivar.eq.ir22ip.or.ivar.eq.ir33ip.or. &
1043
ivar.eq.ir12ip.or.ivar.eq.ir13ip.or.ivar.eq.ir23ip.or. &
1044
ivar.eq.iepiph) ).or. &
1045
( iturb(iphas).eq.50.and. &
1046
(ivar.eq.ikiph.or.ivar.eq.iepiph.or.ivar.eq.iphiph.or. &
1047
ivar.eq.ifbiph) ).or. &
1048
( iturb(iphas).eq.60.and. &
1049
(ivar.eq.ikiph.or.ivar.eq.iomgip) ) ) then
1051
ifac = itrifb(ii,iphas)
1052
if(icodcl(ifac,ivar).eq.0) then
1053
icodcl(ifac,ivar) = 5
1054
rcodcl(ifac,ivar,1) = 0.d0
1055
rcodcl(ifac,ivar,2) = rinfin
1056
rcodcl(ifac,ivar,3) = 0.d0
1059
elseif(ivar.eq.ipriph) then
1060
if(iprnew.eq.1) then
1062
ifac = itrifb(ii,iphas)
1063
if(icodcl(ifac,ivar).eq.0) then
1064
icodcl(ifac,ivar) = 3
1065
rcodcl(ifac,ivar,1) = 0.d0
1066
rcodcl(ifac,ivar,2) = rinfin
1067
rcodcl(ifac,ivar,3) = 0.d0
872
if ( ivar.eq.iu.or.ivar.eq.iv.or.ivar.eq.iw) then
875
if(icodcl(ifac,ivar).eq.0) then
876
icodcl(ifac,ivar) = 5
877
! rcodcl(ifac,ivar,1) = Utilisateur
878
rcodcl(ifac,ivar,2) = rinfin
879
rcodcl(ifac,ivar,3) = 0.d0
884
(ivar.eq.ik .or.ivar.eq.iep) ).or. &
886
(ivar.eq.ir11.or.ivar.eq.ir22.or.ivar.eq.ir33.or. &
887
ivar.eq.ir12.or.ivar.eq.ir13.or.ivar.eq.ir23.or. &
890
(ivar.eq.ik.or.ivar.eq.iep.or.ivar.eq.iphi.or. &
893
(ivar.eq.ik.or.ivar.eq.iep.or.ivar.eq.iphi.or. &
896
(ivar.eq.ik.or.ivar.eq.iomg) ).or. &
898
(ivar.eq.inusa) ) ) then
901
if(icodcl(ifac,ivar).eq.0) then
902
icodcl(ifac,ivar) = 5
903
rcodcl(ifac,ivar,1) = 0.d0
904
rcodcl(ifac,ivar,2) = rinfin
905
rcodcl(ifac,ivar,3) = 0.d0
908
elseif(ivar.eq.ipr) then
911
if(icodcl(ifac,ivar).eq.0) then
912
icodcl(ifac,ivar) = 3
913
rcodcl(ifac,ivar,1) = 0.d0
914
rcodcl(ifac,ivar,2) = rinfin
915
rcodcl(ifac,ivar,3) = 0.d0
1074
921
! 6.5 PAROI RUGUEUSE
1075
922
! ==================
1078
925
! la rugosite est stockee dans rcodcl(..,..,3)
1079
926
! le reste Neumann sera traite plus tard (idem paroi lisse)
1081
ideb = idebty(iparug,iphas)
1082
ifin = ifinty(iparug,iphas)
1085
if ( ivar.eq.iuiph.or.ivar.eq.iviph.or.ivar.eq.iwiph) then
1087
ifac = itrifb(ii,iphas)
1088
if(icodcl(ifac,ivar).eq.0) then
1089
icodcl(ifac,ivar) = 6
1090
! rcodcl(ifac,ivar,1) = Utilisateur
1091
rcodcl(ifac,ivar,2) = rinfin
1092
! rcodcl(ifac,ivar,3) = Utilisateur
1096
( itytur(iphas).eq.2.and. &
1097
(ivar.eq.ikiph .or.ivar.eq.iepiph) ).or. &
1098
( itytur(iphas).eq.3.and. &
1099
(ivar.eq.ir11ip.or.ivar.eq.ir22ip.or.ivar.eq.ir33ip.or. &
1100
ivar.eq.ir12ip.or.ivar.eq.ir13ip.or.ivar.eq.ir23ip.or. &
1101
ivar.eq.iepiph) ).or. &
1102
( iturb(iphas).eq.50.and. &
1103
(ivar.eq.ikiph.or.ivar.eq.iepiph.or.ivar.eq.iphiph.or. &
1104
ivar.eq.ifbiph) ).or. &
1105
( iturb(iphas).eq.60.and. &
1106
(ivar.eq.ikiph.or.ivar.eq.iomgip) ) ) then
1108
ifac = itrifb(ii,iphas)
1109
if(icodcl(ifac,ivar).eq.0) then
1110
icodcl(ifac,ivar) = 6
1111
rcodcl(ifac,ivar,1) = 0.d0
1112
rcodcl(ifac,ivar,2) = rinfin
1113
rcodcl(ifac,ivar,3) = 0.d0
1116
elseif(ivar.eq.ipriph) then
1117
if(iprnew.eq.1) then
1119
ifac = itrifb(ii,iphas)
1120
if(icodcl(ifac,ivar).eq.0) then
1121
icodcl(ifac,ivar) = 3
1122
rcodcl(ifac,ivar,1) = 0.d0
1123
rcodcl(ifac,ivar,2) = rinfin
1124
rcodcl(ifac,ivar,3) = 0.d0
928
ideb = idebty(iparug)
929
ifin = ifinty(iparug)
932
if ( ivar.eq.iu.or.ivar.eq.iv.or.ivar.eq.iw) then
935
if(icodcl(ifac,ivar).eq.0) then
936
icodcl(ifac,ivar) = 6
937
! rcodcl(ifac,ivar,1) = Utilisateur
938
rcodcl(ifac,ivar,2) = rinfin
939
! rcodcl(ifac,ivar,3) = Utilisateur
944
(ivar.eq.ik .or.ivar.eq.iep) ).or. &
946
(ivar.eq.ir11.or.ivar.eq.ir22.or.ivar.eq.ir33.or. &
947
ivar.eq.ir12.or.ivar.eq.ir13.or.ivar.eq.ir23.or. &
950
(ivar.eq.ik.or.ivar.eq.iep.or.ivar.eq.iphi.or. &
953
(ivar.eq.ik.or.ivar.eq.iep.or.ivar.eq.iphi.or. &
956
(ivar.eq.ik.or.ivar.eq.iomg) ).or. &
958
(ivar.eq.inusa) ) ) then
961
if(icodcl(ifac,ivar).eq.0) then
962
icodcl(ifac,ivar) = 6
963
rcodcl(ifac,ivar,1) = 0.d0
964
rcodcl(ifac,ivar,2) = rinfin
965
rcodcl(ifac,ivar,3) = 0.d0
968
elseif(ivar.eq.ipr) then
971
if(icodcl(ifac,ivar).eq.0) then
972
icodcl(ifac,ivar) = 3
973
rcodcl(ifac,ivar,1) = 0.d0
974
rcodcl(ifac,ivar,2) = rinfin
975
rcodcl(ifac,ivar,3) = 0.d0
1133
! --- Boucle sur les phases : fin
1136
981
!===============================================================================
1137
982
! 6.bis CONVERSION EN RCODCL ICODCL
1153
994
! Dirichlet si l'utilisateur fournit une valeur, sinon on utilise
1154
995
! Neumann homogene si le flux de masse est sortant (erreur sinon).
1156
ideb = idebty(ientre,iphas)
1157
ifin = ifinty(ientre,iphas)
1162
ifac = itrifb(ii,iphas)
1163
if(icodcl(ifac,ivar).eq.0) then
1165
if (ivar.eq.iuiph.or.ivar.eq.iviph.or.ivar.eq.iwiph) &
1167
if (rcodcl(ifac,ivar,1).gt.rinfin*0.5d0) then
1168
itypfb(ifac,iphas) = - abs(itypfb(ifac,iphas))
1169
if (iok.eq.0.or.iok.eq.2) iok = iok + 1
1171
icodcl(ifac,ivar) = 1
1172
! rcodcl(ifac,ivar,1) = Utilisateur
1173
rcodcl(ifac,ivar,2) = rinfin
1174
rcodcl(ifac,ivar,3) = 0.d0
1177
elseif (rcodcl(ifac,ivar,1).gt.rinfin*0.5d0) then
1179
flumbf = propfb(ifac,ipprob(ifluma(iuiph)))
1180
if( flumbf.ge.-epzero) then
1181
icodcl(ifac,ivar) = 3
1182
rcodcl(ifac,ivar,1) = 0.d0
1183
rcodcl(ifac,ivar,2) = rinfin
1184
rcodcl(ifac,ivar,3) = 0.d0
1186
itypfb(ifac,iphas) = - abs(itypfb(ifac,iphas))
1187
if (iok.lt.2) iok = iok + 2
997
ideb = idebty(ientre)
998
ifin = ifinty(ientre)
1004
if(icodcl(ifac,ivar).eq.0) then
1006
if (ivar.eq.iu.or.ivar.eq.iv.or.ivar.eq.iw) &
1008
if (rcodcl(ifac,ivar,1).gt.rinfin*0.5d0) then
1009
itypfb(ifac) = - abs(itypfb(ifac))
1010
if (iok.eq.0.or.iok.eq.2) iok = iok + 1
1190
1012
icodcl(ifac,ivar) = 1
1191
! rcodcl(ifac,ivar,1) = Utilisateur
1192
rcodcl(ifac,ivar,2) = rinfin
1193
rcodcl(ifac,ivar,3) = 0.d0
1013
! rcodcl(ifac,ivar,1) = Utilisateur
1014
rcodcl(ifac,ivar,2) = rinfin
1015
rcodcl(ifac,ivar,3) = 0.d0
1018
elseif (rcodcl(ifac,ivar,1).gt.rinfin*0.5d0) then
1020
flumbf = propfb(ifac,ipprob(ifluma(iu)))
1021
if( flumbf.ge.-epzero) then
1022
icodcl(ifac,ivar) = 3
1023
rcodcl(ifac,ivar,1) = 0.d0
1024
rcodcl(ifac,ivar,2) = rinfin
1025
rcodcl(ifac,ivar,3) = 0.d0
1027
itypfb(ifac) = - abs(itypfb(ifac))
1028
if (iok.lt.2) iok = iok + 2
1031
icodcl(ifac,ivar) = 1
1032
! rcodcl(ifac,ivar,1) = Utilisateur
1033
rcodcl(ifac,ivar,2) = rinfin
1034
rcodcl(ifac,ivar,3) = 0.d0
1200
if (irangp.ge.0) call parcmx(iok)
1202
if (iok.eq.1 .or. iok.eq.3) write(nfecra,6060)
1203
if (iok.eq.2 .or. iok.eq.3) write(nfecra,6070)
1204
call bcderr(nphas, itypfb)
1041
if (irangp.ge.0) call parcmx(iok)
1043
if (iok.eq.1 .or. iok.eq.3) write(nfecra,6060)
1044
if (iok.eq.2 .or. iok.eq.3) write(nfecra,6070)
1358
1194
write(nfecra,7010)
1364
iflmab = ipprob(ifluma(iuiph))
1366
iwrnp = iwarni(iu(iphas))
1367
if (irangp.ge.0) call parcmx (iwrnp)
1197
iflmab = ipprob(ifluma(iu))
1200
if (irangp.ge.0) call parcmx (iwrnp)
1370
1203
! On ecrit le flux de masse si IWARNI>0, a la periodicite NTLIST
1371
1204
! et au deux premiers et deux derniers pas de temps.
1372
if(iwrnp.ge.1 .or. mod(ntcabs,ntlist).eq.0 &
1373
.or.(ntcabs.le.ntpabs+2).or.(ntcabs.ge.ntmabs-1)) then
1380
ideb = idebty(ii,iphas)
1381
ifin = ifinty(ii,iphas)
1383
ifac = itrifb(jj,iphas)
1384
flumty(ii) = flumty(ii) + propfb(ifac,iflmab)
1389
write(nfecra,7011) iphas
1391
if (ippmod(icompf).lt.0 ) then
1394
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1395
if (irangp.ge.0) then
1397
call parsom (flumty(ii))
1399
#if defined(_CS_LANG_FR)
1400
write(nfecra,7020) 'Entree ',ii,inb,flumty(ii)
1402
write(nfecra,7020) 'Inlet ',ii,inb,flumty(ii)
1405
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1406
if (irangp.ge.0) then
1408
call parsom (flumty(ii))
1410
#if defined(_CS_LANG_FR)
1411
write(nfecra,7020) 'Paroi lisse ',ii,inb,flumty(ii)
1413
write(nfecra,7020) 'Smooth wall ',ii,inb,flumty(ii)
1416
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1417
if (irangp.ge.0) then
1419
call parsom (flumty(ii))
1421
#if defined(_CS_LANG_FR)
1422
write(nfecra,7020) 'Paroi rugueuse ',ii,inb,flumty(ii)
1424
write(nfecra,7020) 'Rough wall ',ii,inb,flumty(ii)
1427
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1428
if (irangp.ge.0) then
1430
call parsom (flumty(ii))
1432
#if defined(_CS_LANG_FR)
1433
write(nfecra,7020) 'Symetrie ',ii,inb,flumty(ii)
1435
write(nfecra,7020) 'Symmetry ',ii,inb,flumty(ii)
1439
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1440
if (irangp.ge.0) then
1442
call parsom (flumty(ii))
1444
#if defined(_CS_LANG_FR)
1445
write(nfecra,7020) 'Sortie libre ',ii,inb,flumty(ii)
1447
write(nfecra,7020) 'Free outlet ',ii,inb,flumty(ii)
1450
if (nbrcpl.ge.1) then
1452
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1453
if (irangp.ge.0) then
1455
call parsom (flumty(ii))
1457
#if defined(_CS_LANG_FR)
1458
write(nfecra,7020) 'Couplage sat/sat ',ii,inb,flumty(ii)
1460
write(nfecra,7020) 'Sat/Sat coupling ',ii,inb,flumty(ii)
1465
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1466
if (irangp.ge.0) then
1468
call parsom (flumty(ii))
1470
#if defined(_CS_LANG_FR)
1471
write(nfecra,7020) 'Indefini ',ii,inb,flumty(ii)
1473
write(nfecra,7020) 'Undefined ',ii,inb,flumty(ii)
1477
if( ii.ne.ientre .and. &
1478
ii.ne.iparoi .and. &
1479
ii.ne.iparug .and. &
1480
ii.ne.isymet .and. &
1481
ii.ne.isolib .and. &
1482
ii.ne.icscpl .and. &
1484
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1485
if (irangp.ge.0) then
1487
call parsom (flumty(ii))
1490
#if defined(_CS_LANG_FR)
1491
write(nfecra,7020) 'Type utilisateur ',ii,inb,flumty(ii)
1493
write(nfecra,7020) 'User type ',ii,inb,flumty(ii)
1502
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1503
if (irangp.ge.0) then
1505
call parsom (flumty(ii))
1507
#if defined(_CS_LANG_FR)
1508
write(nfecra,7020) 'Entree sub. enth.',ii,inb,flumty(ii)
1510
write(nfecra,7020) 'Sub. enth. inlet ',ii,inb,flumty(ii)
1514
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1515
if (irangp.ge.0) then
1517
call parsom (flumty(ii))
1519
#if defined(_CS_LANG_FR)
1520
write(nfecra,7020) 'Entree subsonique',ii,inb,flumty(ii)
1522
write(nfecra,7020) 'Subsonic inlet ',ii,inb,flumty(ii)
1526
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1527
if (irangp.ge.0) then
1529
call parsom (flumty(ii))
1531
#if defined(_CS_LANG_FR)
1532
write(nfecra,7020) 'Entree/Sortie imp',ii,inb,flumty(ii)
1534
write(nfecra,7020) 'Imp inlet/outlet ',ii,inb,flumty(ii)
1538
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1539
if (irangp.ge.0) then
1541
call parsom (flumty(ii))
1543
#if defined(_CS_LANG_FR)
1544
write(nfecra,7020) 'Sortie subsonique',ii,inb,flumty(ii)
1546
write(nfecra,7020) 'Subsonic outlet ',ii,inb,flumty(ii)
1550
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1551
if (irangp.ge.0) then
1553
call parsom (flumty(ii))
1555
#if defined(_CS_LANG_FR)
1556
write(nfecra,7020) 'Sortie supersoniq',ii,inb,flumty(ii)
1558
write(nfecra,7020) 'Supersonic outlet',ii,inb,flumty(ii)
1562
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1563
if (irangp.ge.0) then
1565
call parsom (flumty(ii))
1567
#if defined(_CS_LANG_FR)
1568
write(nfecra,7020) 'Paroi ',ii,inb,flumty(ii)
1570
write(nfecra,7020) 'Wall ',ii,inb,flumty(ii)
1574
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1575
if (irangp.ge.0) then
1577
call parsom (flumty(ii))
1579
#if defined(_CS_LANG_FR)
1580
write(nfecra,7020) 'Symetrie ',ii,inb,flumty(ii)
1582
write(nfecra,7020) 'Symmetry ',ii,inb,flumty(ii)
1586
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1587
if (irangp.ge.0) then
1589
call parsom (flumty(ii))
1591
#if defined(_CS_LANG_FR)
1592
write(nfecra,7020) 'Indefini ',ii,inb,flumty(ii)
1594
write(nfecra,7020) 'Undefined ',ii,inb,flumty(ii)
1598
if (ii.ne.iesicf .and. &
1599
ii.ne.isspcf .and. &
1600
ii.ne.ieqhcf .and. &
1601
ii.ne.ierucf .and. &
1602
ii.ne.isopcf .and. &
1603
ii.ne.iparoi .and. &
1604
ii.ne.isymet .and. &
1606
inb = ifinty(ii,iphas)-idebty(ii,iphas)+1
1607
if (irangp.ge.0) then
1609
call parsom (flumty(ii))
1612
#if defined(_CS_LANG_FR)
1613
write(nfecra,7020) 'Type utilisateur ',ii,inb,flumty(ii)
1615
write(nfecra,7020) 'User type ',ii,inb,flumty(ii)
1205
if(iwrnp.ge.1 .or. mod(ntcabs,ntlist).eq.0 &
1206
.or.(ntcabs.le.ntpabs+2).or.(ntcabs.ge.ntmabs-1)) then
1217
flumty(ii) = flumty(ii) + propfb(ifac,iflmab)
1224
if (ippmod(icompf).lt.0 ) then
1227
inb = ifinty(ii)-idebty(ii)+1
1228
if (irangp.ge.0) then
1230
call parsom (flumty(ii))
1232
#if defined(_CS_LANG_FR)
1233
write(nfecra,7020) 'Entree ',ii,inb,flumty(ii)
1235
write(nfecra,7020) 'Inlet ',ii,inb,flumty(ii)
1238
inb = ifinty(ii)-idebty(ii)+1
1239
if (irangp.ge.0) then
1241
call parsom (flumty(ii))
1243
#if defined(_CS_LANG_FR)
1244
write(nfecra,7020) 'Paroi lisse ',ii,inb,flumty(ii)
1246
write(nfecra,7020) 'Smooth wall ',ii,inb,flumty(ii)
1249
inb = ifinty(ii)-idebty(ii)+1
1250
if (irangp.ge.0) then
1252
call parsom (flumty(ii))
1254
#if defined(_CS_LANG_FR)
1255
write(nfecra,7020) 'Paroi rugueuse ',ii,inb,flumty(ii)
1257
write(nfecra,7020) 'Rough wall ',ii,inb,flumty(ii)
1260
inb = ifinty(ii)-idebty(ii)+1
1261
if (irangp.ge.0) then
1263
call parsom (flumty(ii))
1265
#if defined(_CS_LANG_FR)
1266
write(nfecra,7020) 'Symetrie ',ii,inb,flumty(ii)
1268
write(nfecra,7020) 'Symmetry ',ii,inb,flumty(ii)
1272
inb = ifinty(ii)-idebty(ii)+1
1273
if (irangp.ge.0) then
1275
call parsom (flumty(ii))
1277
#if defined(_CS_LANG_FR)
1278
write(nfecra,7020) 'Sortie libre ',ii,inb,flumty(ii)
1280
write(nfecra,7020) 'Free outlet ',ii,inb,flumty(ii)
1283
if (nbrcpl.ge.1) then
1285
inb = ifinty(ii)-idebty(ii)+1
1286
if (irangp.ge.0) then
1288
call parsom (flumty(ii))
1290
#if defined(_CS_LANG_FR)
1291
write(nfecra,7020) 'Couplage sat/sat ',ii,inb,flumty(ii)
1293
write(nfecra,7020) 'Sat/Sat coupling ',ii,inb,flumty(ii)
1298
inb = ifinty(ii)-idebty(ii)+1
1299
if (irangp.ge.0) then
1301
call parsom (flumty(ii))
1303
#if defined(_CS_LANG_FR)
1304
write(nfecra,7020) 'Indefini ',ii,inb,flumty(ii)
1306
write(nfecra,7020) 'Undefined ',ii,inb,flumty(ii)
1310
if ( ii.ne.ientre .and. &
1311
ii.ne.iparoi .and. &
1312
ii.ne.iparug .and. &
1313
ii.ne.isymet .and. &
1314
ii.ne.isolib .and. &
1315
ii.ne.icscpl .and. &
1317
inb = ifinty(ii)-idebty(ii)+1
1318
if (irangp.ge.0) then
1320
call parsom (flumty(ii))
1323
#if defined(_CS_LANG_FR)
1324
write(nfecra,7020) 'Type utilisateur ',ii,inb,flumty(ii)
1326
write(nfecra,7020) 'User type ',ii,inb,flumty(ii)
1335
inb = ifinty(ii)-idebty(ii)+1
1336
if (irangp.ge.0) then
1338
call parsom (flumty(ii))
1340
#if defined(_CS_LANG_FR)
1341
write(nfecra,7020) 'Entree sub. enth.',ii,inb,flumty(ii)
1343
write(nfecra,7020) 'Sub. enth. inlet ',ii,inb,flumty(ii)
1347
inb = ifinty(ii)-idebty(ii)+1
1348
if (irangp.ge.0) then
1350
call parsom (flumty(ii))
1352
#if defined(_CS_LANG_FR)
1353
write(nfecra,7020) 'Entree subsonique',ii,inb,flumty(ii)
1355
write(nfecra,7020) 'Subsonic inlet ',ii,inb,flumty(ii)
1359
inb = ifinty(ii)-idebty(ii)+1
1360
if (irangp.ge.0) then
1362
call parsom (flumty(ii))
1364
#if defined(_CS_LANG_FR)
1365
write(nfecra,7020) 'Entree/Sortie imp',ii,inb,flumty(ii)
1367
write(nfecra,7020) 'Imp inlet/outlet ',ii,inb,flumty(ii)
1371
inb = ifinty(ii)-idebty(ii)+1
1372
if (irangp.ge.0) then
1374
call parsom (flumty(ii))
1376
#if defined(_CS_LANG_FR)
1377
write(nfecra,7020) 'Sortie subsonique',ii,inb,flumty(ii)
1379
write(nfecra,7020) 'Subsonic outlet ',ii,inb,flumty(ii)
1383
inb = ifinty(ii)-idebty(ii)+1
1384
if (irangp.ge.0) then
1386
call parsom (flumty(ii))
1388
#if defined(_CS_LANG_FR)
1389
write(nfecra,7020) 'Sortie supersoniq',ii,inb,flumty(ii)
1391
write(nfecra,7020) 'Supersonic outlet',ii,inb,flumty(ii)
1395
inb = ifinty(ii)-idebty(ii)+1
1396
if (irangp.ge.0) then
1398
call parsom (flumty(ii))
1400
#if defined(_CS_LANG_FR)
1401
write(nfecra,7020) 'Paroi ',ii,inb,flumty(ii)
1403
write(nfecra,7020) 'Wall ',ii,inb,flumty(ii)
1407
inb = ifinty(ii)-idebty(ii)+1
1408
if (irangp.ge.0) then
1410
call parsom (flumty(ii))
1412
#if defined(_CS_LANG_FR)
1413
write(nfecra,7020) 'Symetrie ',ii,inb,flumty(ii)
1415
write(nfecra,7020) 'Symmetry ',ii,inb,flumty(ii)
1419
inb = ifinty(ii)-idebty(ii)+1
1420
if (irangp.ge.0) then
1422
call parsom (flumty(ii))
1424
#if defined(_CS_LANG_FR)
1425
write(nfecra,7020) 'Indefini ',ii,inb,flumty(ii)
1427
write(nfecra,7020) 'Undefined ',ii,inb,flumty(ii)
1431
if (ii.ne.iesicf .and. &
1432
ii.ne.isspcf .and. &
1433
ii.ne.ieqhcf .and. &
1434
ii.ne.ierucf .and. &
1435
ii.ne.isopcf .and. &
1436
ii.ne.iparoi .and. &
1437
ii.ne.isymet .and. &
1439
inb = ifinty(ii)-idebty(ii)+1
1440
if (irangp.ge.0) then
1442
call parsom (flumty(ii))
1445
#if defined(_CS_LANG_FR)
1446
write(nfecra,7020) 'Type utilisateur ',ii,inb,flumty(ii)
1448
write(nfecra,7020) 'User type ',ii,inb,flumty(ii)
1630
1460
!===============================================================================