1
!-------------------------------------------------------------------------------
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.
21
!-------------------------------------------------------------------------------
30
!===============================================================================
34
! CALCUL DE LA VITESSE DE DIFFUSION "ORTHOTROPE"
35
! VISCF,B = VISCOSITE*SURFACE/DISTANCE, HOMOGENE A UN DEBIT EN KG/S
38
! (NX**2*VISC11_MOY_FACE
39
! +NY**2*VISC22_MOY_FACE+NZ**2*VISC33_MOY_FACE)*SURFACE/DISTANCE
41
! LA VISCOSITE EST DONNE PAR W1, W2, W3
43
! RQE : A PRIORI, PAS BESOIN DE TECHNIQUE DE RECONSTRUCTION
44
! ( A AMELIORER SI NECESSAIRE )
46
!-------------------------------------------------------------------------------
48
!__________________.____._____.________________________________________________.
49
! name !type!mode ! role !
50
!__________________!____!_____!________________________________________________!
51
! imvisf ! e ! <-- ! methode de calcul de la visc face !
52
! ! ! ! = 0 arithmetique !
53
! ! ! ! = 1 harmonique !
54
! w1,2,3(ncelet ! tr ! <-- ! valeurs de la viscosite !
55
! viscf(nfac) ! tr ! --> ! visc*surface/dist aux faces internes !
56
! viscb(nfabor ! tr ! --> ! visc*surface/dist aux faces de bord !
57
!__________________!____!_____!________________________________________________!
59
! TYPE : E (ENTIER), R (REEL), A (ALPHANUMERIQUE), T (TABLEAU)
60
! L (LOGIQUE) .. ET TYPES COMPOSES (EX : TR TABLEAU REEL)
61
! MODE : <-- donnee, --> resultat, <-> Donnee modifiee
62
! --- tableau de travail
63
!===============================================================================
65
!===============================================================================
67
!===============================================================================
75
!===============================================================================
84
double precision w1(ncelet), w2(ncelet), w3(ncelet)
85
double precision viscf(nfac), viscb(nfabor)
90
double precision viscxi, viscxj, viscyi, viscyj, visczi, visczj
91
double precision sx2, sy2, sz2, distbf, pnd, surfn
93
!===============================================================================
95
! ---> TRAITEMENT DU PARALLELISME ET DE LA PERIODICITE
97
if (irangp.ge.0.or.iperio.eq.1) then
98
call syndia(w1, w2, w3)
103
if( imvisf.eq.0 ) then
119
sx2 = surfac(1,ifac)**2
120
sy2 = surfac(2,ifac)**2
121
sz2 = surfac(3,ifac)**2
123
viscf(ifac) = 0.5d0*( &
124
(viscxi+viscxj)*sx2 &
125
+ (viscyi+viscyj)*sy2 &
126
+ (visczi+visczj)*sz2 ) / (surfn*dist(ifac))
147
sx2 = surfac(1,ifac)**2
148
sy2 = surfac(2,ifac)**2
149
sz2 = surfac(3,ifac)**2
152
( viscxi*viscxj*sx2 &
153
/(pnd*viscxi+(1.d0-pnd)*viscxj) &
154
+ viscyi*viscyj*sy2 &
155
/(pnd*viscyi+(1.d0-pnd)*viscyj) &
156
+ visczi*visczj*sz2 &
157
/(pnd*visczi+(1.d0-pnd)*visczj) &
158
) /(surfn*dist(ifac))
174
sx2 = surfbo(1,ifac)**2
175
sy2 = surfbo(2,ifac)**2
176
sz2 = surfbo(3,ifac)**2
179
(viscxi*sx2+viscyi*sy2+visczi*sz2)/(surfn*distbf)