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 elphyv &
32
ndim , ncelet , ncel , nfac , nfabor , nfml , nprfml , &
33
nnod , lndfac , lndfbr , ncelbr , &
34
nvar , nscal , nphas , &
35
nideve , nrdeve , nituse , nrtuse , nphmx , &
36
ifacel , ifabor , ifmfbr , ifmcel , iprfml , &
37
ipnfac , nodfac , ipnfbr , nodfbr , ibrom , izfppp , &
38
idevel , ituser , ia , &
39
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
40
28
dt , rtp , rtpa , propce , propfa , propfb , &
44
rdevel , rtuser , ra )
46
31
!===============================================================================
117
102
!__________________.____._____.________________________________________________.
118
103
! name !type!mode ! role !
119
104
!__________________!____!_____!________________________________________________!
120
! idbia0 ! i ! <-- ! number of first free position in ia !
121
! idbra0 ! i ! <-- ! number of first free position in ra !
122
! ndim ! i ! <-- ! spatial dimension !
123
! ncelet ! i ! <-- ! number of extended (real + ghost) cells !
124
! ncel ! i ! <-- ! number of cells !
125
! nfac ! i ! <-- ! number of interior faces !
126
! nfabor ! i ! <-- ! number of boundary faces !
127
! nfml ! i ! <-- ! number of families (group classes) !
128
! nprfml ! i ! <-- ! number of properties per family (group class) !
129
! nnod ! i ! <-- ! number of vertices !
130
! lndfac ! i ! <-- ! size of nodfac indexed array !
131
! lndfbr ! i ! <-- ! size of nodfbr indexed array !
132
! ncelbr ! i ! <-- ! number of cells with faces on boundary !
133
105
! nvar ! i ! <-- ! total number of variables !
134
106
! nscal ! i ! <-- ! total number of scalars !
135
! nphas ! i ! <-- ! number of phases !
136
! nideve, nrdeve ! i ! <-- ! sizes of idevel and rdevel arrays !
137
! nituse, nrtuse ! i ! <-- ! sizes of ituser and rtuser arrays !
138
! nphmx ! e ! <-- ! nphsmx !
139
! ifacel(2, nfac) ! ia ! <-- ! interior faces -> cells connectivity !
140
! ifabor(nfabor) ! ia ! <-- ! boundary faces -> cells connectivity !
141
! ifmfbr(nfabor) ! ia ! <-- ! boundary face family numbers !
142
! ifmcel(ncelet) ! ia ! <-- ! cell family numbers !
143
! iprfml ! ia ! <-- ! property numbers per family !
144
! (nfml, nprfml) ! ! ! !
145
! ipnfac(nfac+1) ! ia ! <-- ! interior faces -> vertices index (optional) !
146
! nodfac(lndfac) ! ia ! <-- ! interior faces -> vertices list (optional) !
147
! ipnfbr(nfabor+1) ! ia ! <-- ! boundary faces -> vertices index (optional) !
148
! nodfbr(lndfbr) ! ia ! <-- ! boundary faces -> vertices list (optional) !
149
107
! ibrom ! te ! <-- ! indicateur de remplissage de romb !
151
109
! izfppp ! te ! <-- ! numero de zone de la face de bord !
152
110
! (nfabor) ! ! ! pour le module phys. part. !
153
! idevel(nideve) ! ia ! <-> ! integer work array for temporary development !
154
! ituser(nituse) ! ia ! <-> ! user-reserved integer work array !
155
! ia(*) ! ia ! --- ! main integer work array !
156
! xyzcen ! ra ! <-- ! cell centers !
157
! (ndim, ncelet) ! ! ! !
158
! surfac ! ra ! <-- ! interior faces surface vectors !
159
! (ndim, nfac) ! ! ! !
160
! surfbo ! ra ! <-- ! boundary faces surface vectors !
161
! (ndim, nfabor) ! ! ! !
162
! cdgfac ! ra ! <-- ! interior faces centers of gravity !
163
! (ndim, nfac) ! ! ! !
164
! cdgfbo ! ra ! <-- ! boundary faces centers of gravity !
165
! (ndim, nfabor) ! ! ! !
166
! xyznod ! ra ! <-- ! vertex coordinates (optional) !
167
! (ndim, nnod) ! ! ! !
168
! volume(ncelet) ! ra ! <-- ! cell volumes !
169
111
! dt(ncelet) ! ra ! <-- ! time step (per cell) !
170
112
! rtp, rtpa ! ra ! <-- ! calculated variables at cell centers !
171
113
! (ncelet, *) ! ! ! (at current and previous time steps) !
174
116
! propfb(nfabor, *)! ra ! <-- ! physical properties at boundary face centers !
175
117
! coefa, coefb ! ra ! <-- ! boundary conditions !
176
118
! (nfabor, *) ! ! ! !
177
! w1...8(ncelet ! tr ! --- ! tableau de travail !
178
! rdevel(nrdeve) ! ra ! <-> ! real work array for temporary development !
179
! rtuser(nrtuse) ! ra ! <-> ! user-reserved real work array !
180
! ra(*) ! ra ! --- ! main real work array !
181
119
!__________________!____!_____!________________________________________________!
183
121
! TYPE : E (ENTIER), R (REEL), A (ALPHANUMERIQUE), T (TABLEAU)
186
124
! --- tableau de travail
187
125
!===============================================================================
127
!===============================================================================
129
!===============================================================================
143
!===============================================================================
191
!===============================================================================
193
!===============================================================================
206
!===============================================================================
210
integer idbia0 , idbra0
211
integer ndim , ncelet , ncel , nfac , nfabor
212
integer nfml , nprfml
213
integer nnod , lndfac , lndfbr , ncelbr
214
integer nvar , nscal , nphas
215
integer nideve , nrdeve , nituse , nrtuse , nphmx
217
integer ifacel(2,nfac) , ifabor(nfabor)
218
integer ifmfbr(nfabor) , ifmcel(ncelet)
219
integer iprfml(nfml,nprfml)
220
integer ipnfac(nfac+1), nodfac(lndfac)
221
integer ipnfbr(nfabor+1), nodfbr(lndfbr), ibrom(nphmx)
222
152
integer izfppp(nfabor)
223
integer idevel(nideve), ituser(nituse), ia(*)
225
double precision xyzcen(ndim,ncelet)
226
double precision surfac(ndim,nfac), surfbo(ndim,nfabor)
227
double precision cdgfac(ndim,nfac), cdgfbo(ndim,nfabor)
228
double precision xyznod(ndim,nnod), volume(ncelet)
229
154
double precision dt(ncelet), rtp(ncelet,*), rtpa(ncelet,*)
230
155
double precision propce(ncelet,*)
231
156
double precision propfa(nfac,*), propfb(nfabor,*)
232
157
double precision coefa(nfabor,*), coefb(nfabor,*)
233
double precision w1(ncelet),w2(ncelet),w3(ncelet),w4(ncelet)
234
double precision w5(ncelet),w6(ncelet),w7(ncelet),w8(ncelet)
235
double precision rdevel(nrdeve), rtuser(nrtuse), ra(*)
237
159
! Local variables
239
integer idebia, idebra, ifinia
241
162
integer ipcrom, ipcvis, ipccp , ipcray
242
163
integer ipcvsl, ith , iscal , ii
243
164
integer iiii , ipcsig, it
244
165
integer iesp , iesp1 , iesp2 , mode , isrrom
247
167
double precision tp , delt , somphi, val
248
168
double precision alpro , alpvis, alpcp , alpsig, alplab , alpkab
295
218
! On n'utilisera donc PAS les variables
296
219
! =====================
297
! CP0(IPHAS), VISLS0(ISCALT(IPHAS))
220
! CP0, VISLS0(ISCALT)
298
221
! VISLS0(IPOTR) et VISLS0(IPOTI)
300
223
! Informatiquement, ceci se traduit par le fait que
301
! ICP(IPHAS)>0, IVISLS(ISCALT(IPHAS))>0,
224
! ICP>0, IVISLS(ISCALT)>0,
302
225
! IVISLS(IPOTR)>0 et IVISLS(IPOTI)>0
304
227
! Les verifications ont ete faites dans elveri
718
641
! Lambda/CP VARIABLE en kg/(m s)
719
642
! ===============================
721
if (ivisls(iscalt(iphas)).gt.0) then
644
if (ivisls(iscalt).gt.0) then
723
ipcvsl = ipproc(ivisls(iscalt(iphas)))
646
ipcvsl = ipproc(ivisls(iscalt))
725
648
if(ipccp.le.0) then
727
! --- Si CP est uniforme, on utilise CP0(IPHAS)
650
! --- Si CP est uniforme, on utilise CP0
730
propce(iel,ipcvsl) = 1.d0/cp0(iphas)
653
propce(iel,ipcvsl) = 1.d0/cp0
789
712
! 4 - ON PASSE LA MAIN A L'UTILISATEUR (joule en particulier)
790
713
!===============================================================================
792
maxelt = max(ncelet, nfac, nfabor)
794
ifinia = ils + maxelt
795
CALL IASIZE('ELPHYV',IFINIA)
799
( ifinia , idebra , &
800
ndim , ncelet , ncel , nfac , nfabor , nfml , nprfml , &
801
nnod , lndfac , lndfbr , ncelbr , &
802
nvar , nscal , nphas , &
803
nideve , nrdeve , nituse , nrtuse , nphmx , &
804
ifacel , ifabor , ifmfbr , ifmcel , iprfml , maxelt , ia(ils), &
805
ipnfac , nodfac , ipnfbr , nodfbr , ibrom , izfppp , &
806
idevel , ituser , ia , &
807
xyzcen , surfac , surfbo , cdgfac , cdgfbo , xyznod , volume , &
808
719
dt , rtp , rtpa , propce , propfa , propfb , &
810
w1 , w2 , w3 , w4 , &
811
w5 , w6 , w7 , w8 , &
812
rdevel , rtuser , ra )