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

« back to all changes in this revision

Viewing changes to users/comb/user_coal_ini1.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
!VERS
 
4
 
 
5
! This file is part of Code_Saturne, a general-purpose CFD tool.
 
6
!
 
7
! Copyright (C) 1998-2011 EDF S.A.
 
8
!
 
9
! This program is free software; you can redistribute it and/or modify it under
 
10
! the terms of the GNU General Public License as published by the Free Software
 
11
! Foundation; either version 2 of the License, or (at your option) any later
 
12
! version.
 
13
!
 
14
! This program is distributed in the hope that it will be useful, but WITHOUT
 
15
! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
16
! FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 
17
! details.
 
18
!
 
19
! You should have received a copy of the GNU General Public License along with
 
20
! this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
 
21
! Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
22
 
 
23
!-------------------------------------------------------------------------------
 
24
 
 
25
subroutine user_coal_ini1
 
26
!==================================
 
27
 
 
28
 
 
29
!===============================================================================
 
30
!  PURPOSE   :
 
31
!  ---------
 
32
!  User's routine to control outing of variables for pulverised coal combustion
 
33
!  (these parameters are in COMMON)
 
34
!-------------------------------------------------------------------------------
 
35
! Arguments
 
36
!__________________.____._____.________________________________________________.
 
37
! name             !type!mode ! role                                           !
 
38
!__________________!____!_____!________________________________________________!
 
39
!__________________!____!_____!________________________________________________!
 
40
!     Type: i (integer), r (real), s (string), a (array), l (logical),
 
41
!           and composite types (ex: ra real array)
 
42
!     mode: <-- input, --> output, <-> modifies data, --- work array
 
43
!===============================================================================
 
44
 
 
45
!===============================================================================
 
46
! Module files
 
47
!===============================================================================
 
48
 
 
49
use paramx
 
50
use dimens
 
51
use numvar
 
52
use optcal
 
53
use cstphy
 
54
use entsor
 
55
use cstnum
 
56
use parall
 
57
use period
 
58
use ihmpre
 
59
use ppppar
 
60
use ppthch
 
61
use coincl
 
62
use cpincl
 
63
use ppincl
 
64
use ppcpfu
 
65
use cs_coal_incl
 
66
 
 
67
!===============================================================================
 
68
 
 
69
implicit none
 
70
 
 
71
integer          ipp , icla , icha
 
72
 
 
73
!===============================================================================
 
74
 
 
75
 
 
76
!===============================================================================
 
77
! 1. TRANSPORTED VARIABLES
 
78
!===============================================================================
 
79
 
 
80
! OUTLET chrono, listing, and histo
 
81
!     if below vector are not allocated, default values will be used
 
82
 
 
83
!       ICHRVR( ) =  chono outlet (Yes 1/No  0)
 
84
!       ILISVR( ) =  listing outlet (Yes 1/No  0)
 
85
!       IHISVR( ) =  histo outlet (number of roiqu and number)
 
86
!       if IHISVR(.,1)  = -1 every probes defined in usini1
 
87
 
 
88
 
 
89
! --> Variables for the mix (carrying gas and coal particles)
 
90
 
 
91
!      - Enthalpy
 
92
ipp = ipprtp(isca(ihm))
 
93
ichrvr(ipp)  = 1
 
94
ilisvr(ipp)  = 1
 
95
ihisvr(ipp,1)= -1
 
96
 
 
97
! --> Variables for coal particles
 
98
 
 
99
do icla = 1, nclacp
 
100
 
 
101
!       - Char mass fraction (in class ICLA)
 
102
  ipp = ipprtp(isca(ixck(icla)))
 
103
  ichrvr(ipp)  = 1
 
104
  ilisvr(ipp)  = 1
 
105
  ihisvr(ipp,1)= -1
 
106
 
 
107
!       - Coal mass fraction (in class ICLA)
 
108
  ipp = ipprtp(isca(ixch(icla)))
 
109
  ichrvr(ipp)  = 1
 
110
  ilisvr(ipp)  = 1
 
111
  ihisvr(ipp,1)= -1
 
112
 
 
113
!       - Number of particles for 1 kg mix (from class ICLA)
 
114
  ipp = ipprtp(isca(inp(icla)))
 
115
  ichrvr(ipp)  = 1
 
116
  ilisvr(ipp)  = 1
 
117
  ihisvr(ipp,1)= -1
 
118
 
 
119
!       - Enthalpy J/kg (for class ICLA)
 
120
  ipp = ipprtp(isca(ih2(icla)))
 
121
  ichrvr(ipp)  = 1
 
122
  ilisvr(ipp)  = 1
 
123
  ihisvr(ipp,1)= -1
 
124
 
 
125
!       - Water mass fraction (in class ICLA)
 
126
  if ( ippmod(icp3pl) .eq. 1 ) then
 
127
    ipp = ipprtp(isca(ixwt(icla)))
 
128
    ichrvr(ipp)  = 1
 
129
    ilisvr(ipp)  = 1
 
130
    ihisvr(ipp,1)= -1
 
131
  endif
 
132
enddo
 
133
 
 
134
! --> Variables for the carrier phase
 
135
 
 
136
do icha = 1, ncharb
 
137
 
 
138
!       - Mean of 1 mixture fraction
 
139
!         (from light volatiles of char ICHA)
 
140
  ipp = ipprtp(isca(if1m(icha)))
 
141
  ichrvr(ipp)  = 1
 
142
  ilisvr(ipp)  = 1
 
143
  ihisvr(ipp,1)= -1
 
144
 
 
145
!       - Mean of 2 mixture fraction
 
146
!         (from heavy volatiles of char ICHA)
 
147
  ipp = ipprtp(isca(if2m(icha)))
 
148
  ichrvr(ipp)  = 1
 
149
  ilisvr(ipp)  = 1
 
150
  ihisvr(ipp,1)= -1
 
151
 
 
152
enddo
 
153
 
 
154
! ---- Variables propres a la phase continue
 
155
  if ( noxyd .ge. 2 ) then
 
156
    ipp = ipprtp(isca(if4m))
 
157
    ichrvr(ipp)  = 1
 
158
    ilisvr(ipp)  = 1
 
159
    ihisvr(ipp,1)= -1
 
160
  endif
 
161
  if ( noxyd .eq. 3 ) then
 
162
    ipp = ipprtp(isca(if5m))
 
163
    ichrvr(ipp)  = 1
 
164
    ilisvr(ipp)  = 1
 
165
    ihisvr(ipp,1)= -1
 
166
  endif
 
167
  if ( ippmod(iccoal) .ge. 1 ) then
 
168
    ipp = ipprtp(isca(if6m))
 
169
    ichrvr(ipp)  = 1
 
170
    ilisvr(ipp)  = 1
 
171
    ihisvr(ipp,1)= -1
 
172
  endif
 
173
  ipp = ipprtp(isca(if7m))
 
174
  ichrvr(ipp)  = 1
 
175
  ilisvr(ipp)  = 1
 
176
  ihisvr(ipp,1)= -1
 
177
  if ( ihtco2 .eq. 1 ) then
 
178
    ipp = ipprtp(isca(if8m))
 
179
    ichrvr(ipp)  = 1
 
180
    ilisvr(ipp)  = 1
 
181
    ihisvr(ipp,1)= -1
 
182
  endif
 
183
  if ( ihth2o .eq. 1 ) then
 
184
    ipp = ipprtp(isca(if9m))
 
185
    ichrvr(ipp)  = 1
 
186
    ilisvr(ipp)  = 1
 
187
    ihisvr(ipp,1)= -1
 
188
  endif
 
189
!
 
190
 
 
191
  ipp = ipprtp(isca(ifvp2m))
 
192
  ichrvr(ipp)  = 1
 
193
  ilisvr(ipp)  = 1
 
194
  ihisvr(ipp,1)= -1
 
195
 
 
196
!
 
197
  if ( ieqco2 .ge. 1 ) then
 
198
    ipp = ipprtp(isca(iyco2))
 
199
    ichrvr(ipp)  = 1
 
200
    ilisvr(ipp)  = 1
 
201
    ihisvr(ipp,1)= -1
 
202
  endif
 
203
  if ( ieqnox .ge. 1 ) then
 
204
    ipp = ipprtp(isca(iyhcn))
 
205
    NOMVAR(IPP)  = 'FR_HCN'
 
206
    ichrvr(ipp)  = 1
 
207
    ilisvr(ipp)  = 1
 
208
    ihisvr(ipp,1)= -1
 
209
    ipp = ipprtp(isca(iyno))
 
210
    NOMVAR(IPP)  = 'FR_NO'
 
211
    ichrvr(ipp)  = 1
 
212
    ilisvr(ipp)  = 1
 
213
    ihisvr(ipp,1)= -1
 
214
    ipp = ipprtp(isca(ihox))
 
215
    NOMVAR(IPP)  = 'Enth_Ox'
 
216
    ichrvr(ipp)  = 1
 
217
    ilisvr(ipp)  = 1
 
218
    ihisvr(ipp,1)= -1
 
219
  endif
 
220
 
 
221
!===============================================================================
 
222
! 2. Sate variables
 
223
!===============================================================================
 
224
 
 
225
! OUTLET chrono, listing, and histo
 
226
!     if below vector are not allocated, default values will be used
 
227
 
 
228
!       ICHRVR( ) =  chono outlet (Yes 1/No  0)
 
229
!       ILISVR( ) =  listing outlet (Yes 1/No  0)
 
230
!       IHISVR( ) =  histo outlet (number of roiqu and number)
 
231
!       if IHISVR(.,1)  = -1 every probes defined in usini1
 
232
 
 
233
! --> State varables for the mix
 
234
 
 
235
!     - Mean Molar Mass
 
236
ipp = ipppro(ipproc(immel))
 
237
ichrvr(ipp)   = 1
 
238
ilisvr(ipp)   = 1
 
239
ihisvr(ipp,1) = -1
 
240
 
 
241
! --> State variables for coal particles
 
242
 
 
243
do icla = 1, nclacp
 
244
 
 
245
!       - Particles' Temperature K (of class ICLA)
 
246
  ipp = ipppro(ipproc(itemp2(icla)))
 
247
  ichrvr(ipp)   = 1
 
248
  ilisvr(ipp)   = 1
 
249
  ihisvr(ipp,1) = -1
 
250
 
 
251
!       - Particles' Density kg/m3 (of class ICLA)
 
252
  ipp = ipppro(ipproc(irom2(icla)))
 
253
  ichrvr(ipp)   = 1
 
254
  ilisvr(ipp)   = 1
 
255
  ihisvr(ipp,1) = -1
 
256
 
 
257
!       - Particles' Diameter m (of class ICLA)
 
258
  ipp = ipppro(ipproc(idiam2(icla)))
 
259
  ichrvr(ipp)   = 1
 
260
  ilisvr(ipp)   = 1
 
261
  ihisvr(ipp,1) = -1
 
262
 
 
263
!       - Rate of coal consumption  (s-1) < 0
 
264
!         (for class ICLA)
 
265
  ipp = ipppro(ipproc(igmdch(icla)))
 
266
  ichrvr(ipp)   = 0
 
267
  ilisvr(ipp)   = 0
 
268
  ihisvr(ipp,1) = -1
 
269
 
 
270
!       - Rate of light volatiles exhaust (s-1) < 0
 
271
!         (for class ICLA)
 
272
  ipp = ipppro(ipproc(igmdv1(icla)))
 
273
  ichrvr(ipp)   = 0
 
274
  ilisvr(ipp)   = 0
 
275
  ihisvr(ipp,1) = -1
 
276
 
 
277
!       - Rate of heavy volatile exhaust (s-1) < 0
 
278
!         (de la classe ICLA)
 
279
  ipp = ipppro(ipproc(igmdv2(icla)))
 
280
  ichrvr(ipp)   = 0
 
281
  ilisvr(ipp)   = 0
 
282
  ihisvr(ipp,1) = -1
 
283
 
 
284
!       - Rate of char oxidation by O2 (s-1) < 0
 
285
!         (from class ICLA)
 
286
  ipp = ipppro(ipproc(igmhet(icla)))
 
287
  ichrvr(ipp)   = 0
 
288
  ilisvr(ipp)   = 0
 
289
  ihisvr(ipp,1) = -1
 
290
 
 
291
!       - Rate of char gazeification by CO2 (s-1) < 0
 
292
!         (from class ICLA)
 
293
  if ( ihtco2 .eq. 1 ) then
 
294
    ipp = ipppro(ipproc(ighco2(icla)))
 
295
    ichrvr(ipp)   = 0
 
296
    ilisvr(ipp)   = 0
 
297
    ihisvr(ipp,1) = -1
 
298
  endif
 
299
 
 
300
!       - Rate of char gazeification by H2O (s-1) < 0
 
301
!         (from class ICLA)
 
302
  if ( ihth2o .eq. 1 ) then
 
303
    ipp = ipppro(ipproc(ighh2o(icla)))
 
304
    ichrvr(ipp)   = 0
 
305
    ilisvr(ipp)   = 0
 
306
    ihisvr(ipp,1) = -1
 
307
  endif
 
308
 
 
309
!       - Rate of drying (s-1) < 0
 
310
!         (from class ICLA)
 
311
  if ( ippmod(icp3pl) .eq. 1 ) then
 
312
    ipp = ipppro(ipproc(igmsec(icla)))
 
313
    ichrvr(ipp)   = 0
 
314
    ilisvr(ipp)   = 0
 
315
    ihisvr(ipp,1) = -1
 
316
  endif
 
317
 
 
318
!       - Mass fraction (of class ICLA) in mix
 
319
  ipp = ipppro(ipproc(ix2(icla)))
 
320
  ichrvr(ipp)   = 1
 
321
  ilisvr(ipp)   = 1
 
322
  ihisvr(ipp,1) = -1
 
323
 
 
324
enddo
 
325
 
 
326
! --> State variables for carrier gas phase
 
327
 
 
328
!     - Temperature of gas mixture
 
329
ipp = ipppro(ipproc(itemp1))
 
330
ichrvr(ipp)   = 1
 
331
ilisvr(ipp)   = 1
 
332
ihisvr(ipp,1) = -1
 
333
 
 
334
!     - Mass fraction (among gases) of  CHx1m
 
335
ipp = ipppro(ipproc(iym1(1)))
 
336
ichrvr(ipp)   = 1
 
337
ilisvr(ipp)   = 1
 
338
ihisvr(ipp,1) = -1
 
339
 
 
340
!     - mass fraction (among gases) of CHx2m
 
341
ipp = ipppro(ipproc(iym1(2)))
 
342
ichrvr(ipp)   = 1
 
343
ilisvr(ipp)   = 1
 
344
ihisvr(ipp,1) = -1
 
345
 
 
346
!     - mass fraction (among gases) of CO
 
347
ipp = ipppro(ipproc(iym1(3)))
 
348
ichrvr(ipp)   = 1
 
349
ilisvr(ipp)   = 1
 
350
ihisvr(ipp,1) = -1
 
351
 
 
352
!     - mass fraction (among gases) of H2S
 
353
ipp = ipppro(ipproc(iym1(4)))
 
354
ichrvr(ipp)   = 1
 
355
ilisvr(ipp)   = 1
 
356
ihisvr(ipp,1) = -1
 
357
 
 
358
!     - mass fraction (among gases) of H2
 
359
ipp = ipppro(ipproc(iym1(5)))
 
360
ichrvr(ipp)   = 1
 
361
ilisvr(ipp)   = 1
 
362
ihisvr(ipp,1) = -1
 
363
 
 
364
!     - mass fraction (among gases) of HCN
 
365
ipp = ipppro(ipproc(iym1(6)))
 
366
ichrvr(ipp)   = 1
 
367
ilisvr(ipp)   = 1
 
368
ihisvr(ipp,1) = -1
 
369
 
 
370
!     - mass fraction (among gases) of NH3
 
371
ipp = ipppro(ipproc(iym1(7)))
 
372
ichrvr(ipp)   = 1
 
373
ilisvr(ipp)   = 1
 
374
ihisvr(ipp,1) = -1
 
375
 
 
376
!     - mass fraction (among gases) of O2
 
377
ipp = ipppro(ipproc(iym1(8)))
 
378
ichrvr(ipp)   = 1
 
379
ilisvr(ipp)   = 1
 
380
ihisvr(ipp,1) = -1
 
381
 
 
382
!     - mass fraction (among gases) of CO2
 
383
ipp = ipppro(ipproc(iym1(9)))
 
384
ichrvr(ipp)   = 1
 
385
ilisvr(ipp)   = 1
 
386
ihisvr(ipp,1) = -1
 
387
 
 
388
!     - mass fraction (among gases) of H2O
 
389
ipp = ipppro(ipproc(iym1(10)))
 
390
ichrvr(ipp)   = 1
 
391
ilisvr(ipp)   = 1
 
392
ihisvr(ipp,1) = -1
 
393
 
 
394
!     - mass fraction (among gases) of SO2
 
395
ipp = ipppro(ipproc(iym1(11)))
 
396
ichrvr(ipp)   = 1
 
397
ilisvr(ipp)   = 1
 
398
ihisvr(ipp,1) = -1
 
399
 
 
400
!     - mass fraction (among gases) of N2
 
401
ipp = ipppro(ipproc(iym1(12)))
 
402
ichrvr(ipp)   = 1
 
403
ilisvr(ipp)   = 1
 
404
ihisvr(ipp,1) = -1
 
405
 
 
406
!===============================================================================
 
407
! 3. Computation OPTION
 
408
!===============================================================================
 
409
 
 
410
! --- Relaxation for density (Advisable when starting combustion computation)
 
411
!                            (Forbidden for unstationnary computation)
 
412
!      RHO(n+1) = SRROM * RHO(n) + (1-SRROM) * RHO(n+1)
 
413
 
 
414
srrom = 0.95d0
 
415
 
 
416
!===============================================================================
 
417
! 4. Physical constants
 
418
!===============================================================================
 
419
 
 
420
! ---  Laminar viscosity for enthalpy (dynamical diffusivity) kg/(m.s)
 
421
diftl0 = 4.25d-5
 
422
 
 
423
!----
 
424
! END
 
425
!----
 
426
 
 
427
 
 
428
end subroutine