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
!-------------------------------------------------------------------------------
23
subroutine cs_coal_htconvers2 &
24
!============================
25
( mode , icla , enthal , xsolid , temper , t1)
26
!===============================================================================
29
! CALCUL DE LA TEMPERATURE DES PARTICULES
30
! EN FONCTION DE L'ENTHALPIE ET DES CONCENTRATIONS
32
! CALCUL DE L'ENTHALPIE DES PARTICULES
33
! EN FONCTION DE LA TEMPERATURE ET DES CONCENTRATIONS
35
!-------------------------------------------------------------------------------
37
!__________________.____._____.________________________________________________.
38
! name !type!mode ! role !
39
!__________________!____!_____!________________________________________________!
40
! mode ! e ! <-- ! -1 : t -> h ; 1 : h -> t !
41
! icla ! e ! <-- ! numero de la classe !
42
! enthal ! r ! <-- ! enthalpie massique j/kg !
43
! xsolid ! tr ! <-- ! fraction massique des constituants !
44
! temper ! r ! <-- ! temperature en kelvin !
45
!__________________!____!_____!________________________________________________!
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
50
!===============================================================================
52
!===============================================================================
54
!===============================================================================
67
!===============================================================================
73
integer mode , icla , icha
75
double precision xsolid(nsolim)
76
double precision temper , enthal , t1
80
integer it , isol , ihflt2
82
double precision eh1 , eh0 , x2
84
!===============================================================================
88
if ( ihflt2.eq.0 ) then
90
!===============================================================================
91
! 2. H2 FONCTION LINEAIRE T2
92
!===============================================================================
96
if ( mode.eq.-1 ) then
98
! --> Loi temperature -> enthalpie (MODE = -1)
100
enthal = h02ch(icha) + cp2ch(icha)*(temper-trefth)
102
elseif ( mode.eq.1 ) then
104
! --> Loi enthalpie -> temperature (MODE = 1)
106
temper = (enthal-h02ch(icha))/cp2ch(icha) + trefth
110
write(nfecra,1000) mode
117
elseif( ihflt2.ne.0 ) then
119
!===============================================================================
121
!===============================================================================
123
if ( mode.eq.-1 ) then
125
! --> Loi temperature -> enthalpie (MODE = -1)
128
if ( temper.ge.thc(it) ) then
131
enthal = enthal + xsolid(isol)*ehsoli(isol,it)
137
if ( temper.le.thc(it) ) then
140
enthal = enthal + xsolid(isol)*ehsoli(isol,it)
148
if ( temper.le.thc(it) ) then
152
eh0 = eh0 + xsolid(isol)*ehsoli(isol,it-1)
153
eh1 = eh1 + xsolid(isol)*ehsoli(isol,it )
156
+ (eh1-eh0)*(temper-thc(it-1)) &
163
elseif ( mode.eq.1 ) then
165
! --> Loi enthalpie -> temperature (MODE = 1)
169
x2 = x2 + xsolid(isol)
172
if ( x2 .gt. epsicp ) then
176
eh1 = eh1 + xsolid(isol)*ehsoli(isol,it+1)
178
if ( enthal.ge.eh1 ) temper = thc(it+1)
183
eh0 = eh0 + xsolid(isol)*ehsoli(isol,it )
185
if ( enthal.le.eh0 ) temper = thc(it)
191
eh0 = eh0 + xsolid(isol)*ehsoli(isol,it )
192
eh1 = eh1 + xsolid(isol)*ehsoli(isol,it+1)
194
if ( enthal.ge.eh0 .and. enthal.le.eh1 ) &
196
+ (enthal-eh0)*(thc(it+1)-thc(it))/(eh1-eh0)
206
write(nfecra,1000) mode
220
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&
222
'@ @@ ATTENTION : ERREUR DANS CS_COAL_HT_CONVERS2 ',/,&
224
'@ VALEUR INCORRECTE DE L''ARGUMENT MODE ',/,&
225
'@ CE DOIT ETRE UN ENTIER EGAL A 1 OU -1 ',/,&
226
'@ IL VAUT ICI ',I10 ,/,&
228
'@ Le calcul ne peut etre execute. ',/,&
230
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',/,&