~ubuntu-branches/ubuntu/precise/code-saturne/precise

« back to all changes in this revision

Viewing changes to src/base/vortex.f90

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2011-11-24 00:00:08 UTC
  • mfrom: (6.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20111124000008-2vo99e38267942q5
Tags: 2.1.0-3
Install a missing file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
!-------------------------------------------------------------------------------
2
 
 
3
 
!     This file is part of the Code_Saturne Kernel, element of the
4
 
!     Code_Saturne CFD tool.
5
 
 
6
 
!     Copyright (C) 1998-2009 EDF S.A., France
7
 
 
8
 
!     contact: saturne-support@edf.fr
9
 
 
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.
14
 
 
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.
19
 
 
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
25
 
 
26
 
!-------------------------------------------------------------------------------
27
 
 
28
 
subroutine vortex &
29
 
!================
30
 
 
31
 
 ( ivorce , visco  , xyz    ,                                     &
32
 
   yzcel  , xu     , xv     , xw     ,                            &
33
 
   yzvor  , yzvora , signv  ,                                     &
34
 
   sigma  , gamma  , temps  , tpslim )
35
 
 
36
 
!===============================================================================
37
 
!  FONCTION  :
38
 
!  ----------
39
 
 
40
 
! GESTION DES ENTREES L.E.S. PAR LA METHODE DES VORTEX
41
 
 
42
 
!-------------------------------------------------------------------------------
43
 
! Arguments
44
 
!__________________.____._____.________________________________________________.
45
 
! name             !type!mode ! role                                           !
46
 
!__________________!____!_____!________________________________________________!
47
 
! ivorce           ! te ! <-- ! numero du vortex le plus proche d'un           !
48
 
!     (nvomax)     !    !     ! vortex donne                                   !
49
 
! visco            ! tr ! <-- ! viscosite cinematique sur les faces            !
50
 
!(icvmax,nnent)    !    !     ! d'entree                                       !
51
 
! xyz(icvmax,3)    !    ! <-- ! coordonnees des cellules d'entree              !
52
 
!                  !    !     ! dans le referentiel global                     !
53
 
! yzcel            ! tr ! <-- ! coordonnees des faces d'entree dans            !
54
 
!   (nelvmx ,2)    !    !     ! le referentiel local                           !
55
 
! xu(nelvmx)       ! tr ! <-- ! composante de vitesse principale               !
56
 
! xv(nelvmx)       ! tr ! <-- ! composantes de vitesse transverses             !
57
 
! xw(nelvmx)       ! tr ! <-- !                                                !
58
 
! yzvor            ! tr ! <-- ! coordonnees du centre des vortex               !
59
 
!   (nvomax,2)     !    !     !                                                !
60
 
! yzvora           ! tr ! <-- ! anciennes coordonnees du centre                !
61
 
!   (nvomax,2)     !    !     ! des vortex                                     !
62
 
! signv(nvomax)    ! tr ! <-- ! sens de rotation des vortex                    !
63
 
! sigma            ! tr ! <-- ! taille des vortex                              !
64
 
!(nvomax,nnent)    !    !     !                                                !
65
 
! gamma            ! tr ! <-- ! intensite des vortex                           !
66
 
!(nvomax,2,nnen    !    !     ! (dans les deux directions du plan)             !
67
 
! temps            ! tr ! <-- ! temps ecoule depuis la creation                !
68
 
!     (nvomax)     !    !     ! du vortex                                      !
69
 
! tpslim           ! tr ! <-- ! duree de vie du vortex                         !
70
 
!(nvomax,nnent)    !    !     !                                                !
71
 
!__________________.____._____.________________________________________________.
72
 
 
73
 
!     TYPE : E (ENTIER), R (REEL), A (ALPHANUMERIQUE), T (TABLEAU)
74
 
!            L (LOGIQUE)   .. ET TYPES COMPOSES (EX : TR TABLEAU REEL)
75
 
!     MODE : <-- donnee, --> resultat, <-> Donnee modifiee
76
 
!            --- tableau de travail
77
 
!===============================================================================
78
 
 
79
 
implicit none
80
 
 
81
 
!===============================================================================
82
 
! Common blocks
83
 
!===============================================================================
84
 
 
85
 
include "paramx.h"
86
 
include "entsor.h"
87
 
include "optcal.h"
88
 
include "vortex.h"
89
 
 
90
 
!===============================================================================
91
 
 
92
 
! Arguments
93
 
 
94
 
integer          ivorce(nvomax,nnent)
95
 
 
96
 
double precision yzcel(icvmax,2,nnent)    , visco(icvmax,nnent)
97
 
double precision xyz(icvmax,3,nnent)      , xu(icvmax,nnent)
98
 
double precision xv(icvmax,nnent)         , xw(icvmax,nnent)
99
 
double precision yzvor(nvomax,2,nnent)    , yzvora(nvomax,2,nnent)
100
 
double precision signv(nvomax,nnent)
101
 
double precision sigma(nvomax,nnent)      , gamma(nvomax,2,nnent)
102
 
double precision temps(nvomax,nnent)      , tpslim(nvomax,nnent)
103
 
 
104
 
!     VARIABLES LOCALES
105
 
 
106
 
integer          ii, ient
107
 
integer          ipass
108
 
data             ipass /0/
109
 
save             ipass
110
 
 
111
 
!===============================================================================
112
 
! 1. INITIALISATION
113
 
!===============================================================================
114
 
 
115
 
 
116
 
! L'EQUATION DE LANGEVIN RESTE A TRAVAILLER POUR UN CAS 3D QUELCONQUE
117
 
! OU A MODIFIER    . VU LE PEU D'IMPORTANCE QU'ELLE A SUR CE QUI SE PASSE
118
 
! EN AVAL DE L'ENTREE (L'IMPORTANT ETANT D'IMPOSER V' ET W'), ON NE VA
119
 
! PAS PLUS LOIN (ON ANNULE CES CONTRIBUTION POUR LE MOMENT POUR LES
120
 
! CAS 3 ET 4)
121
 
 
122
 
ipass = ipass + 1
123
 
 
124
 
do ient = 1, nnent
125
 
 
126
 
  if (ipass.eq.1)then
127
 
 
128
 
    call vorini                                                   &
129
 
    !==========
130
 
 ( icvor(ient)     , nvort(ient)     ,                            &
131
 
   ient   , ivorce(1,ient)  ,                                     &
132
 
   xyz(1,1,ient)   , yzcel(1,1,ient) ,                            &
133
 
   xu(1,ient)      , xv(1,ient)      , xw(1,ient)      ,          &
134
 
   yzvor(1,1,ient) , signv(1,ient)   , temps(1,ient)   ,          &
135
 
   tpslim(1,ient)  )
136
 
 
137
 
  endif
138
 
 
139
 
!===============================================================================
140
 
! 2. DEPLACEMENT DU VORTEX
141
 
!===============================================================================
142
 
 
143
 
  call vordep                                                     &
144
 
  !==========
145
 
 ( icvor(ient)     , nvort(ient)     , ient   , dtref  ,          &
146
 
   ivorce(1,ient)  , yzcel(1,1,ient) ,                            &
147
 
   xu(1,ient)      , xv(1,ient)      , xw(1,ient)      ,          &
148
 
   yzvor(1,1,ient) , yzvora(1,1,ient), signv(1,ient)   ,          &
149
 
   temps(1,ient)   , tpslim(1,ient)  )
150
 
 
151
 
!===============================================================================
152
 
! 3. CALCUL DE LA VITESSE
153
 
!===============================================================================
154
 
 
155
 
  call vorvit                                                     &
156
 
  !==========
157
 
 ( icvor(ient)     , nvort(ient)     , ient   ,                   &
158
 
   ivorce(1,ient)  , visco(1,ient)   ,                            &
159
 
   yzcel(1,1,ient) , xu(1,ient)      , xv(1,ient)       ,         &
160
 
   xw(1,ient)      , yzvor(1,1,ient) , signv(1,ient)    ,         &
161
 
   sigma(1,ient)   , gamma(1,1,ient) , temps(1,ient)    )
162
 
 
163
 
!===============================================================================
164
 
! 4. CALCUL DES FLUCTUATIONS DANS LE SENS DE L'ECOULEMENT
165
 
!===============================================================================
166
 
 
167
 
  call vorlgv                                                     &
168
 
  !==========
169
 
 ( icvor(ient)     , ient   , dtref  ,                            &
170
 
   yzcel(1,1,ient) , xu(1,ient)      ,                            &
171
 
   xv(1,ient)      , xw(1,ient)      )
172
 
 
173
 
enddo
174
 
 
175
 
!===============================================================================
176
 
! 5. ECRITURE DU FICHIER SUITE
177
 
!===============================================================================
178
 
 
179
 
! on ecrit a tous les pas de temps pour eviter
180
 
! les mauvaises surprises en cas de fin prematuree.
181
 
! Il ne faut pas mettre cette partie dans la boucle sur IENT
182
 
! car on accede deja a l'unite IMPMVO(=IMPDVO) dans VORINI.
183
 
! Seul le premier processeur ecrit (test avant l'appel � VORTEX)
184
 
 
185
 
open(unit=impvvo,file=ficvvo)
186
 
rewind(impvvo)
187
 
do ient = 1, nnent
188
 
  write(impvvo,100) ient
189
 
  write(impvvo,100) nvort(ient)
190
 
  do ii = 1, nvort(ient)
191
 
    write(impvvo,200) yzvor(ii,1,ient),yzvor(ii,2,ient),          &
192
 
         temps(ii,ient), tpslim(ii,ient), signv(ii,ient)
193
 
  enddo
194
 
enddo
195
 
close(impvvo)
196
 
 
197
 
!===============================================================================
198
 
! 6. FIN
199
 
!===============================================================================
200
 
 
201
 
! FORMATS
202
 
 
203
 
 100  format(i10)
204
 
 200  format(5e13.5)
205
 
 
206
 
return
207
 
 
208
 
end subroutine