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 lages1 &
32
ndim , ncelet , ncel , nfac , nfabor , nfml , &
33
nprfml , nnod , lndfac , lndfbr , ncelbr , &
34
nvar , nscal , nphas , &
35
27
nbpmax , nvp , nvp1 , nvep , nivep , &
36
28
ntersl , nvlsta , nvisbr , &
37
nideve , nrdeve , nituse , nrtuse , &
38
itepa , idevel , ituser , ia , &
39
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
40
30
dt , rtpa , propce , propfa , propfb , &
41
31
ettp , ettpa , tepa , statis , &
42
32
taup , tlag , piil , &
43
33
bx , vagaus , gradpr , gradvf , romp , &
44
brgaus , terbru , fextla , &
45
rdevel , rtuser , ra )
34
brgaus , terbru , fextla )
47
36
!===============================================================================
58
47
!__________________.____._____.________________________________________________.
59
48
! name !type!mode ! role !
60
49
!__________________!____!_____!________________________________________________!
61
! idbia0 ! i ! <-- ! number of first free position in ia !
62
! idbra0 ! i ! <-- ! number of first free position in ra !
63
! ndim ! i ! <-- ! spatial dimension !
64
! ncelet ! i ! <-- ! number of extended (real + ghost) cells !
65
! ncel ! i ! <-- ! number of cells !
66
! nfac ! i ! <-- ! number of interior faces !
67
! nfabor ! i ! <-- ! number of boundary faces !
68
! nfml ! i ! <-- ! number of families (group classes) !
69
! nprfml ! i ! <-- ! number of properties per family (group class) !
70
! nnod ! i ! <-- ! number of vertices !
71
! lndfac ! i ! <-- ! size of nodfac indexed array !
72
! lndfbr ! i ! <-- ! size of nodfbr indexed array !
73
! ncelbr ! i ! <-- ! number of cells with faces on boundary !
74
50
! nvar ! i ! <-- ! total number of variables !
75
51
! nscal ! i ! <-- ! total number of scalars !
76
! nphas ! i ! <-- ! number of phases !
77
52
! nbpmax ! e ! <-- ! nombre max de particulies autorise !
78
53
! nvp ! e ! <-- ! nombre de variables particulaires !
79
54
! nvp1 ! e ! <-- ! nvp sans position, vfluide, vpart !
82
57
! ntersl ! e ! <-- ! nbr termes sources de couplage retour !
83
58
! nvlsta ! e ! <-- ! nombre de var statistiques lagrangien !
84
59
! nvisbr ! e ! <-- ! nombre de statistiques aux frontieres !
85
! nideve, nrdeve ! i ! <-- ! sizes of idevel and rdevel arrays !
86
! nituse, nrtuse ! i ! <-- ! sizes of ituser and rtuser arrays !
87
60
! itepa ! te ! <-- ! info particulaires (entiers) !
88
61
! (nbpmax,nivep ! ! ! (cellule de la particule,...) !
89
! idevel(nideve) ! ia ! <-> ! integer work array for temporary development !
90
! ituser(nituse) ! ia ! <-> ! user-reserved integer work array !
91
! ia(*) ! ia ! --- ! main integer work array !
92
! xyzcen ! ra ! <-- ! cell centers !
93
! (ndim, ncelet) ! ! ! !
94
! surfac ! ra ! <-- ! interior faces surface vectors !
95
! (ndim, nfac) ! ! ! !
96
! surfbo ! ra ! <-- ! boundary faces surface vectors !
97
! (ndim, nfabor) ! ! ! !
98
! cdgfac ! ra ! <-- ! interior faces centers of gravity !
99
! (ndim, nfac) ! ! ! !
100
! cdgfbo ! ra ! <-- ! boundary faces centers of gravity !
101
! (ndim, nfabor) ! ! ! !
102
! xyznod ! tr ! <-- ! coordonnes des noeuds !
103
! (ndim,nnod) ! ! ! !
104
! volume(ncelet ! tr ! <-- ! volume d'un des ncelet elements !
105
62
! dt(ncelet) ! ra ! <-- ! time step (per cell) !
106
63
! rtpa ! tr ! <-- ! variables de calcul au centre des !
107
64
! (ncelet,*) ! ! ! cellules (pas de temps precedent) !
127
84
! romp ! tr ! <-- ! masse volumique des particules !
128
85
! fextla ! tr ! <-- ! champ de forces exterieur !
129
86
!(ncelet,3) ! ! ! utilisateur (m/s2) !
130
! rdevel(nrdeve) ! ra ! <-> ! real work array for temporary development !
131
! rtuser(nrtuse) ! ra ! <-> ! user-reserved real work array !
132
! ra(*) ! ra ! --- ! main real work array !
133
87
!__________________!____!_____!________________________________________________!
135
89
! TYPE : E (ENTIER), R (REEL), A (ALPHANUMERIQUE), T (TABLEAU)
136
90
! L (LOGIQUE) .. ET TYPES COMPOSES (EX : TR TABLEAU REEL)
137
91
! MODE : <-- donnee, --> resultat, <-> Donnee modifiee
138
92
! --- tableau de travail
93
!===============================================================================
95
!===============================================================================
97
!===============================================================================
140
112
!===============================================================================
144
!===============================================================================
146
!===============================================================================
160
!===============================================================================
164
integer idbia0 , idbra0
165
integer ndim , ncelet , ncel , nfac , nfabor
166
integer nfml , nprfml
167
integer nnod ,lndfac , lndfbr , ncelbr
168
integer nvar , nscal , nphas
169
119
integer nbpmax , nvp , nvp1 , nvep , nivep
170
120
integer ntersl , nvlsta , nvisbr
171
integer nideve , nrdeve , nituse , nrtuse
172
122
integer itepa(nbpmax,nivep)
173
integer idevel(nideve), ituser(nituse)
176
double precision xyzcen(ndim,ncelet)
177
double precision surfac(ndim,nfac) , surfbo(ndim,nfabor)
178
double precision cdgfac(ndim,nfac) , cdgfbo(ndim,nfabor)
179
double precision xyznod(ndim,nnod) , volume(ncelet)
180
124
double precision dt(ncelet) , rtpa(ncelet,*)
181
125
double precision propce(ncelet,*)
182
126
double precision propfa(nfac,*) , propfb(nfabor,*)
189
133
double precision gradpr(ncelet,3) , gradvf(ncelet,9)
190
134
double precision romp(nbpmax)
191
135
double precision fextla(nbpmax,3)
192
double precision rdevel(nrdeve), rtuser(nrtuse)
193
double precision ra(*)
195
137
! Local variables
197
integer idebia , idebra
198
integer iel , ip , id , i0 , iromf , iphas , mode
139
integer iel , ip , id , i0 , iromf , mode
200
141
double precision aa , bb , cc , dd , ee
201
142
double precision aux1 , aux2 ,aux3 , aux4 , aux5 , aux6
410
351
tempf = propce(iel,ipproc(itemp))
412
else if ( iscsth(iscalt(iphas)).eq.-1 ) then
413
tempf = rtpa(iel,isca(iscalt(iphas)))
415
else if ( iscsth(iscalt(iphas)).eq.1 ) then
416
tempf = rtpa(iel,isca(iscalt(iphas)))
418
else if ( iscsth(iscalt(iphas)).eq.2 ) then
353
else if ( iscsth(iscalt).eq.-1 ) then
354
tempf = rtpa(iel,isca(iscalt))
356
else if ( iscsth(iscalt).eq.1 ) then
357
tempf = rtpa(iel,isca(iscalt))
359
else if ( iscsth(iscalt).eq.2 ) then
420
call usthht(mode,rtpa(iel,isca(iscalt(iphas))),tempf)
361
call usthht(mode,rtpa(iel,isca(iscalt)),tempf)
422
363
tempf = tempf+tkelvi
427
368
ddbr = sqrt( 2.d0*kboltz*tempf &