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
!-------------------------------------------------------------------------------
42
37
! CONTROLER LES ZONES OU SONT INITIALISES LES VARIABLES (PAR
43
38
! LE BIAIS DE PARAMETRES PASSES EN ARGUMENT)
45
! ON INITIALISE EGALEMENT ICI NPHAS ET ISCAPH QUI VALENT 1 EN
46
! PRATIQUE DANS TOUS LES CALCULS (C'EST UN PARAMETRE UTILISATEUR,
47
! MAIS SA VALEUR EST QUELQUE PEU CONTRAINTE ENCORE...)
50
41
!-------------------------------------------------------------------------------
61
52
! --- tableau de travail
62
53
!===============================================================================
55
!===============================================================================
57
!===============================================================================
79
!===============================================================================
66
!===============================================================================
68
!===============================================================================
90
!===============================================================================
98
integer ii, iphas , iscal , nmodpp
99
integer nphmax, nscmax, nesmax, nphusi, nscusi
89
integer ii, iscal , nmodpp
90
integer nscmax, nesmax, nscusi
100
91
integer ieepre, ieeder, ieecor, ieetot, iihmpu
101
integer ialgce, imgrpr
92
integer ialgce, imgrpr, icwfps
103
double precision relaxp, extrap
94
double precision relaxp, extrap, cwfthr
105
96
!===============================================================================
129
120
!===============================================================================
130
! 1. INITIALISATION DE PARAMETRES DEPENDANT DU NOMBRE DE PHASES
121
! 1. INITIALISATION DE PARAMETRES POUR LA PHASE CONTINUE
131
122
!===============================================================================
133
! --- Nombre de phases
135
! Egal a 1 en version 1.2
136
! =======================
138
! Le nombre de phases maximal est donne par NPHSMX dans paramx.h
139
! On teste la valeur donnee par l'utilisateur avant de completer
140
! les tableaux dimensionnes a NPHSMX (ex. ITURB(NPHSMX)).
146
! Verification du nombre de phases
151
! --- Parametres dependant du nombre de phases
154
125
! Chaleur massique variable ou non
169
140
! - Sous-programme utilisateur
170
141
! ==========================
177
(nphmax , nphusi , iihmpu , nfecra , iturb , icp , iverif)
146
(iihmpu , nfecra , iturb , icp , iverif)
179
148
!===============================================================================
180
149
! 2. INITIALISATION DE PARAMETRES DEPENDANT DU NOMBRE DE SCALAIRES
285
254
( nscmax , nscusi , iihmpu , nfecra , iscavr , ivisls , iverif )
288
! --- Parametres dependant du nombre de scalaires : exception
289
! IPHSCA indique le numero de la phase porteuse pour chaque
290
! scalaire UTILISATEUR
292
! Dans le cas d'une seule phase, IPHSCA(ISCAL) = 1 : ne rien changer.
293
! ==================================================================
295
! Sinon noter bien que :
297
! La phase porteuse des scalaires UTILISATEUR ISCAL qui
298
! representent la moyenne du carre des fluctuations d'un
299
! scalaire utilisateur K sera la meme que celle de ce scalaire
301
! Donc, pour de tels scalaires ISCAL (reperes par ISCAVR(ISCAL)>0),
302
! on ne doit pas renseigner IPHSCA(ISCAL) ici.
303
! C'est l'objet du test inclus dans l'exemple ci-dessous.
305
! Pour les scalaires non utilisateur relatifs a des physiques
306
! particulieres, (charbon, combustion, electrique : voir usppmo)
307
! implicitement definis selon le modele,
308
! les informations sont donnees automatiquement par ailleurs :
309
! on ne modifie pas IPHSCA ici.
312
if(iscavr(iscal).le.0) then
318
257
!===============================================================================
319
258
! 3. INITIALISATION DE PARAMETRES "GLOBAUX"
320
259
!===============================================================================
360
302
! Le blindage en erreur est dans cs_maillage_grd.c (erreur si IALGCE>1,
361
303
! cs_glob_maillage_grd_cdg_cel inchange si IALGCE<0)
305
icwfps = 0 ! Set to 1 to postprocess cutting of warped faces
306
cwfthr = -1.d0 ! Threshold (in degrees) to triangulate warped faces if positive
366
( nphmax , nesmax , &
367
311
ieepre , ieeder , ieecor , ieetot , &
368
nphusi , iihmpu , nfecra , &
369
idtvar , ipucou , iphydr , ialgce , iescal , iverif )
313
idtvar , ipucou , iphydr , ialgce , iescal , iverif, &
371
316
if (ialgce.ne.-999) call algcen(ialgce)
317
if (cwfthr.ge.0.d0) call setcwf(icwfps, cwfthr)
373
319
! --- Parametres de la methode ALE
419
365
iturb, ik, iep, &
420
366
ir11, ir22, ir33, &
421
367
ir12, ir13, ir23, &
368
iomg, iphi, ifb, ial, &
423
370
iale, iuma, ivma, iwma, &
426
373
! Suite de calcul, relecture fichier auxiliaire, champ de vitesse figé
427
call csisui(isuite, ntsuit, ileaux, iccvfg)
375
call csisui(ntsuit, ileaux, iccvfg)
430
378
! Pas de temps (seulement NTMABS, DTREF, INPDT0)
454
402
call csnum2 (ivisse, relaxp, ipucou, extrap, imrgra, imgrpr)
457
extrag(ipr(iphas)) = extrap
458
if (idtvar.ge.0) relaxv(ipr(iphas)) = relaxp
459
imgr(ipr(iphas)) = imgrpr
405
if (idtvar.ge.0) relaxv(ipr) = relaxp
461
408
! Gravite, prop. phys
477
424
! Init turb (uref, almax) si necessaire (modele RANS)
479
if (itytur(iphas).eq.2 .or. itytur(iphas).eq.3 .or. &
480
itytur(iphas).eq.5 .or. itytur(iphas).eq.6 ) then
425
if (itytur.eq.2 .or. itytur.eq.3 .or. &
426
itytur.eq.5 .or. itytur.eq.6 ) then
481
427
call cstini(uref, almax)
543
( nvppmx, ncapt, nthist, ntlist, &
544
ichrvl, ichrbo, ichrsy, ichrmd, &
545
fmtchr, len(fmtchr), optchr, len(optchr), &
494
( nvppmx, ncapt, nthist, frhist, ntlist, iecaux, &
547
495
ipstdv, ipstyp, ipstcl, ipstft, ipstfo, &
548
ichrvr, ilisvr, ihisvr, isca, iscapp, &
496
ichrvr, ilisvr, ihisvr, tplfmt, isca, iscapp, &