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

« back to all changes in this revision

Viewing changes to src/ctwr/ctini1.f90

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2011-11-01 17:43:32 UTC
  • mto: (6.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20111101174332-tl4vk45no0x3emc3
Tags: upstream-2.1.0
ImportĀ upstreamĀ versionĀ 2.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
!-------------------------------------------------------------------------------
2
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
 
3
! This file is part of Code_Saturne, a general-purpose CFD tool.
 
4
!
 
5
! Copyright (C) 1998-2011 EDF S.A.
 
6
!
 
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
 
10
! version.
 
11
!
 
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
 
15
! details.
 
16
!
 
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.
25
20
 
26
21
!-------------------------------------------------------------------------------
27
22
 
30
25
 
31
26
 
32
27
!===============================================================================
33
 
!  FONCTION  :
34
 
!  ---------
 
28
! Purpose:
 
29
! --------
35
30
 
36
 
!   INIT DES OPTIONS DES VARIABLES POUR LE MODULE AEROREFRIGERANTS
37
 
!      EN COMPLEMENT DE CE QUI A DEJA ETE FAIT DANS USINI1
 
31
! Initialize global settings for cooling towers module
 
32
! in addition to what has been done in usini1.
38
33
 
39
34
!-------------------------------------------------------------------------------
40
35
! Arguments
43
38
!__________________!____!_____!________________________________________________!
44
39
!__________________!____!_____!________________________________________________!
45
40
 
46
 
!     TYPE : E (ENTIER), R (REEL), A (ALPHANUMERIQUE), T (TABLEAU)
47
 
!            L (LOGIQUE)   .. ET TYPES COMPOSES (EX : TR TABLEAU REEL)
48
 
!     MODE : <-- donnee, --> resultat, <-> Donnee modifiee
49
 
!            --- tableau de travail
 
41
!     Type: i (integer), r (real), s (string), a (array), l (logical),
 
42
!           and composite types (ex: ra real array)
 
43
!     mode: <-- input, --> output, <-> modifies data, --- work array
 
44
!===============================================================================
 
45
 
 
46
!===============================================================================
 
47
! Module files
 
48
!===============================================================================
 
49
 
 
50
use paramx
 
51
use dimens
 
52
use numvar
 
53
use optcal
 
54
use cstphy
 
55
use entsor
 
56
use cstnum
 
57
use ppppar
 
58
use ppthch
 
59
use ppincl
 
60
use ctincl
 
61
 
50
62
!===============================================================================
51
63
 
52
64
implicit none
53
65
 
54
 
!===============================================================================
55
 
! Common blocks
56
 
!===============================================================================
57
 
 
58
 
include "paramx.h"
59
 
include "dimens.h"
60
 
include "numvar.h"
61
 
include "optcal.h"
62
 
include "cstphy.h"
63
 
include "entsor.h"
64
 
include "cstnum.h"
65
 
include "ppppar.h"
66
 
include "ppthch.h"
67
 
include "ppincl.h"
68
 
include "ctincl.h"
69
 
 
70
 
!===============================================================================
71
 
 
72
66
! Local variables
73
67
 
74
 
integer iphas, ii, jj, isc, ipp
75
 
 
76
 
!===============================================================================
77
 
 
78
 
!===============================================================================
79
 
! 0. VERIFICATION ISCALT, ISCSTH
80
 
!===============================================================================
81
 
!     L'utilisateur ne doit pas y avoir touche.
82
 
 
83
 
do iphas = 1, nphas
84
 
  if(iscalt(iphas).ne.-1) then
85
 
    write(nfecra,1000)iphas,iscalt(iphas)
86
 
    call csexit (1)
87
 
    !==========
88
 
  endif
89
 
enddo
 
68
integer ii, jj, isc, ipp
 
69
 
 
70
!===============================================================================
 
71
 
 
72
!===============================================================================
 
73
! 0. Check iscalt, iscsth
 
74
!===============================================================================
 
75
! The user should not have modified them.
 
76
 
 
77
if(iscalt.ne.-1) then
 
78
  write(nfecra,1000)iscalt
 
79
  call csexit (1)
 
80
  !==========
 
81
endif
90
82
do ii = 1, nscapp
91
83
  if(iscsth(iscapp(ii)).ne.-10) then
92
84
    write(nfecra,1001)ii,iscapp(ii),iscapp(ii),iscsth(iscapp(ii))
97
89
 
98
90
 
99
91
!===============================================================================
100
 
! 1. VARIABLES TRANSPORTEES
 
92
! 1. Transported variables
101
93
!===============================================================================
102
94
 
103
95
iscsth(itemp4) = 1
104
96
iscsth(ihumid) = 0
105
97
 
106
 
iphas = 1
107
 
iscalt(iphas) = itemp4
108
 
 
109
 
irovar(iphas) = 1
110
 
ivivar(iphas) = 0
111
 
 
112
 
! --> Donnees physiques ou numeriques propres aux scalaires
 
98
iscalt = itemp4
 
99
 
 
100
irovar = 1
 
101
ivivar = 0
 
102
 
 
103
! --> Physical or numerical properties specific to scalars
113
104
 
114
105
do isc = 1, nscapp
115
106
 
116
107
  jj = iscapp(isc)
117
108
 
118
109
  if (iscavr(jj).le.0) then
119
 
    visls0(jj) = viscl0(iphsca(jj))
 
110
    visls0(jj) = viscl0
120
111
  endif
121
112
 
122
113
  blencv(isca(jj)) = 1.d0
123
114
 
124
115
enddo
125
116
 
126
 
do iphas = 1, nphas
127
 
 
128
 
  ipp = ipprtp(isca(itemp4))
129
 
  NOMVAR(IPP)  = 'Temperature'
130
 
  ichrvr(ipp)  = 1
131
 
  ilisvr(ipp)  = 1
132
 
  ihisvr(ipp,1)= -1
133
 
 
134
 
  ipp = ipprtp(isca(ihumid))
135
 
  NOMVAR(IPP)  = 'Humidite'
136
 
  ichrvr(ipp)  = 1
137
 
  ilisvr(ipp)  = 1
138
 
  ihisvr(ipp,1)= -1
139
 
 
140
 
enddo
 
117
ipp = ipprtp(isca(itemp4))
 
118
nomvar(ipp)  = 'Temperature'
 
119
ichrvr(ipp)  = 1
 
120
ilisvr(ipp)  = 1
 
121
ihisvr(ipp,1)= -1
 
122
 
 
123
ipp = ipprtp(isca(ihumid))
 
124
nomvar(ipp)  = 'Humidity'
 
125
ichrvr(ipp)  = 1
 
126
ilisvr(ipp)  = 1
 
127
ihisvr(ipp,1)= -1
 
128
 
 
129
! Postprocessing output
 
130
 
 
131
ichrze = 1
141
132
 
142
133
!===============================================================================
143
 
! 2. ON DONNE LA MAIN A L'UTLISATEUR
 
134
! 2. Define user settings
144
135
!===============================================================================
145
136
 
146
137
call uscti1
147
138
!==========
148
139
 
149
140
!--------
150
 
! FORMATS
 
141
! Formats
151
142
!--------
152
143
 
153
144
 1000 format(                                                           &
162
153
'@                                                            ',/,&
163
154
'@  L''utilisateur ne doit pas la renseigner dans usini1, or  ',/,&
164
155
'@    elle a ete affectee comme suit :                        ',/,&
165
 
'@    ISCALT(',I10   ,') = ',I10                               ,/,&
 
156
'@    ISCALT = ',I10                                           ,/,&
166
157
'@                                                            ',/,&
167
158
'@  Le calcul ne sera pas execute.                            ',/,&
168
159
'@                                                            ',/,&