Télécharger prim_ther_dem.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier : prim_ther_dem.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4. ***********************************************************
  5. **** FV "Cell-Centred Formulation" for the solution of ****
  6. **** the Euler equations for a thermally perfect gas. ****
  7. **** Discrete Equation Method for the propagation of ****
  8. **** infinitely thin flames in initially homogeneous ****
  9. **** media. ****
  10. **** PRIM operator ****
  11. **** It computes primitive variables from conservative ****
  12. **** ones. ****
  13. **** ****
  14. **** A. BECCANTINI DEN/DM2S/SFME/LTMF JUILLET 2007 ****
  15. ***********************************************************
  16. *
  17. * Conservative variables Primitive variables
  18. *
  19. * u(1,*) = alpha1 w(1,*) = alpha1
  20. * u(2,*) = alpha1 rho1 w(2,*) = rho1
  21. * u(3,*) = alpha1 rhou1 w(3,*) = u1
  22. * u(4,*) = alpha1 rhov1 w(4,*) = v1
  23. * u(5,*) = alpha1 rhoet1 w(5,*) = p1
  24. * u(6,*) = alpha2 w(6,*) = alpha2
  25. * u(7,*) = alpha2 rho2 w(7,*) = rho2
  26. * u(8,*) = alpha2 rhou2 w(8,*) = u2
  27. * u(9,*) = alpha2 rhov2 w(9,*) = v2
  28. * u(10,*) = alpha2 rhoet2 w(10,*) = p2
  29. *
  30. * alpha1 = 1 -> unburnt phase
  31. * alpha2 = 1 -> burnt phase
  32. * In exact algebra, alpha2 = 1 - alpha1
  33. * alpha2 can be seen as a progress variable
  34. *
  35. ****************************
  36. **** PRODECURE PRIMCONS ****
  37. ****************************
  38. *
  39. 'DEBPROC' PRIMCONS ;
  40. 'ARGUMENT' PGAS*TABLE TN1*'CHPOINT ' TN2*'CHPOINT '
  41. PN1*'CHPOINT ' PN2*'CHPOINT ' VN1*'CHPOINT ' VN2*'CHPOINT ' ;
  42. *
  43. * ETHER = int_0^T cv(T') dT' T < TMAX
  44. * = int_0^TMAX cv(T') dT' '+'
  45. * cv(TMAX) T >= TMAX
  46. ESP1 = 'EXTRAIRE' (PGAS . 'SPECIES') 1 ;
  47. * DY1 = y_i - y_f for the species 1
  48. DY1 = (('EXTRAIRE' (PGAS . 'MASSFRA') 1) '-'
  49. ('EXTRAIRE' (PGAS . 'MASSFRA') 2)) ;
  50. COEF1 = ('EXTRAIRE' (PGAS . 'CHEMCOEF') 1) '*'
  51. (PGAS . ESP1 . 'W') ;
  52. YFINPH1 = 1.0 ;
  53. YFINPH2 = 1.0 ;
  54. 'SI' (COEF1 > 0) ;
  55. YPH2 = 'EXTRAIRE' (PGAS . 'MASSFRA') 2 ;
  56. YPH1 = YPH2 '+' DY1 ;
  57. 'SINON' ;
  58. YPH1 = 'EXTRAIRE' (PGAS . 'MASSFRA') 2 ;
  59. YPH2 = YPH1 '-' DY1 ;
  60. 'FINSI' ;
  61. YFINPH1 = YFINPH1 '-' YPH1 ;
  62. YFINPH2 = YFINPH2 '-' YPH2 ;
  63. PRYPH1 = 'PROG' YPH1 ;
  64. PRYPH2 = 'PROG' YPH2 ;
  65. 'REPETER' BLESP (('DIME' (PGAS . 'SPECIES')) '-' 2) ;
  66. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') (&BLESP '+' 1) ;
  67. COEF = ('EXTRAIRE' (PGAS . 'CHEMCOEF') (&BLESP '+' 1))
  68. '*' (PGAS . ESP . 'W') ;
  69. DY = (DY1 * (COEF '/' COEF1)) ;
  70. 'SI' (COEF > 0) ;
  71. YPH2 = 'EXTRAIRE' (PGAS . 'MASSFRA') (&BLESP '+' 2) ;
  72. YPH1 = YPH2 '+' DY ;
  73. 'SINON' ;
  74. YPH1 = 'EXTRAIRE' (PGAS . 'MASSFRA') (&BLESP '+' 2) ;
  75. YPH2 = YPH1 '-' DY ;
  76. 'FINSI' ;
  77. PRYPH1 = PRYPH1 'ET' ('PROG' YPH1) ;
  78. PRYPH2 = PRYPH2 'ET' ('PROG' YPH2) ;
  79. YFINPH1 = YFINPH1 '-' YPH1 ;
  80. YFINPH2 = YFINPH2 '-' YPH2 ;
  81. 'FIN' BLESP ;
  82. PRYPH1 = PRYPH1 'ET' ('PROG' YFINPH1) ;
  83. PRYPH2 = PRYPH2 'ET' ('PROG' YFINPH2) ;
  84. 'LISTE' PRYPH1 ;
  85. 'LISTE' PRYPH2 ;
  86. *
  87. TMAX = (PGAS . 'TMAX') ;
  88. * TCAL1 = MIN TN1, TMAX
  89. TCAL1 = 0.5D0 '*' ((TMAX '+' TN1) '-' ('ABS' (TN1 '-' TMAX))) ;
  90. DTN1 = TN1 '-' TCAL1 ;
  91. * TCAL1 = MIN TN1, TMAX
  92. TCAL2 = 0.5D0 '*' ((TMAX '+' TN2) '-' ('ABS' (TN2 '-' TMAX))) ;
  93. DTN2 = TN2 '-' TCAL2 ;
  94. *
  95. * Internal energy (J/kg in SI)
  96. *
  97. ETHER1 = 0.0 ;
  98. CV1 = 0.0 ;
  99. ETHER2 = 0.0 ;
  100. CV2 = 0.0 ;
  101. FUNTN1 = 1.0 ;
  102. FUNTN2 = 1.0 ;
  103. 'REPETER' BLPO ((PGAS . 'NORD') '+' 1) ;
  104. 'REPETER' BLESP ('DIME' (PGAS . 'SPECIES')) ;
  105. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') &BLESP ;
  106. YCEL1 = 'EXTRAIRE' PRYPH1 &BLESP ;
  107. YCEL2 = 'EXTRAIRE' PRYPH2 &BLESP ;
  108. AA = 'EXTRAIRE' (PGAS . ESP . 'A') &BLPO ;
  109. DCV1 = (AA * YCEL1 * FUNTN1) ;
  110. DCV2 = (AA * YCEL2 * FUNTN2) ;
  111. CV1 = CV1 '+' DCV1 ;
  112. CV2 = CV2 '+' DCV2 ;
  113. ETHER1 = ETHER1 '+' (DCV1 * TCAL1 '/' (&BLPO)) ;
  114. ETHER2 = ETHER2 '+' (DCV2 * TCAL2 '/' (&BLPO)) ;
  115. 'FIN' BLESP ;
  116. FUNTN1 = FUNTN1 '*' TCAL1 ;
  117. FUNTN2 = FUNTN2 '*' TCAL2 ;
  118. 'FIN' BLPO ;
  119. ETHER1 = ETHER1 '+' (CV1 '*' DTN1) ;
  120. ETHER2 = ETHER2 '+' (CV2 '*' DTN2) ;
  121. *
  122. * Formation energy/enthalpy (J/kg in SI) and gas constant (J/kg/K)
  123. *
  124. EFORM1 = 0.0 ;
  125. EFORM2 = 0.0 ;
  126. RGAS1 = 0.0 ;
  127. RGAS2 = 0.0 ;
  128. 'REPETER' BLESP ('DIME' (PGAS . 'SPECIES')) ;
  129. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') &BLESP ;
  130. YCEL1 = 'EXTRAIRE' PRYPH1 &BLESP ;
  131. YCEL2 = 'EXTRAIRE' PRYPH2 &BLESP ;
  132. EFORM1 = EFORM1 '+' (YCEL1 * (PGAS . ESP . 'H0K')) ;
  133. EFORM2 = EFORM2 '+' (YCEL2 * (PGAS . ESP . 'H0K')) ;
  134. RGAS1 = RGAS1 '+' (YCEL1 * (PGAS . 'RUNIV') '/'
  135. (PGAS . ESP . 'W')) ;
  136. RGAS2 = RGAS2 '+' (YCEL2 * (PGAS . 'RUNIV') '/'
  137. (PGAS . ESP . 'W')) ;
  138. 'FIN' BLESP ;
  139. 'LISTE' RGAS1 ;
  140. 'LISTE' RGAS2 ;
  141. *
  142. * Computation of the conservative variables
  143. *
  144. RN1 = PN1 '/' (RGAS1 '*' TN1) ;
  145. RN2 = PN2 '/' (RGAS2 '*' TN2) ;
  146. GN1 = RN1 * VN1 ;
  147. GN2 = RN2 * VN2 ;
  148. LVEL = 'MOTS' 'UX' 'UY' 'UZ' ;
  149. ECIN1 = 0.5D0 '*' ('PSCAL' VN1 VN1 LVEL LVEL) ;
  150. ECIN2 = 0.5D0 '*' ('PSCAL' VN2 VN2 LVEL LVEL) ;
  151. RETN1 = RN1 '*' (ETHER1 '+' ECIN1 '+' EFORM1) ;
  152. RETN2 = RN2 '*' (ETHER2 '+' ECIN2 '+' EFORM2) ;
  153. *
  154. 'RESPRO' RN1 RN2 GN1 GN2 RETN1 RETN2 ;
  155. 'FINPROC' ;
  156. *
  157. ********************************
  158. **** FIN PRODECURE PRIMCONS ****
  159. ********************************
  160. *
  161. *
  162. 'OPTION' 'DIME' 2 ;
  163. 'OPTION' 'ELEM' 'QUA4' ;
  164. 'OPTION' 'ECHO' 1 ;
  165. 'OPTION' 'TRAC' 'X';
  166. *
  167. **** GRAPH
  168. *
  169. GRAPH = FAUX ;
  170. * GRAPH = VRAI ;
  171. *
  172. *** We consider a mixture of H2, O2, H2O, N2
  173. *
  174. *************************************************
  175. **** The table for the properties of the gas ****
  176. *************************************************
  177. *
  178. PGAS = 'TABLE' ;
  179. *
  180. **** Order of the polynomial order for cv = cv(T)
  181. * For T > TMAX, cv(T) = cv(Tmax)
  182. *
  183. PGAS . 'TMAX' = 6000.0 ;
  184. PGAS . 'NORD' = 4 ;
  185. *
  186. **** Species involved in the mixture (before or after
  187. * the chemical reaction)
  188. *
  189. PGAS . 'SPECIES' = 'MOTS' 'H2 ' 'O2 ' 'H2O ' 'N2 ' ;
  190. *
  191. *
  192. **** Coefficient of the chemical reaction.
  193. * Note that for the first species this coefficient should be positive
  194. * Normal, we take it equal to 1.
  195. *
  196. * H2 '+' 0.5 O2 ---> H2O
  197. *
  198. PGAS . 'CHEMCOEF' = 'PROG' 1.0 0.5 -1.0 0.0 ;
  199. *
  200. **** Mass fraction of the first species before and after the combustion
  201. * Final mass fractions of the species with positive coefficients.
  202. * Final mass fractions of the species with non-positive coefficient.
  203. * The mass fraction of the last species is not given.
  204. *
  205. PGAS . 'MASSFRA' = 'PROG' 0.285219E-01 0.964039E-11 0.765104E-10
  206. 0.127442E-10 ;
  207. *
  208. **** Coef with the gas properties
  209. *
  210. PGAS . 'H2 ' = 'TABLE' ;
  211. PGAS . 'H2O ' = 'TABLE' ;
  212. PGAS . 'N2 ' = 'TABLE' ;
  213. PGAS . 'O2 ' = 'TABLE' ;
  214. *
  215. **** Runiv (J/mole/K)
  216. *
  217. PGAS . 'RUNIV' = 8.31441 ;
  218. *
  219. **** W (kg/mole). Gas constant (J/kg/K = Runiv/W)
  220. *
  221. PGAS . 'H2 ' . 'W' = 2.016E-3 ;
  222. PGAS . 'O2 ' . 'W' = 31.999E-3 ;
  223. PGAS . 'H2O ' . 'W' = 18.0155E-3 ;
  224. PGAS . 'N2 ' . 'W' = 28.013E-3 ;
  225. *
  226. **** Polynomial coefficients
  227. *
  228. PGAS . 'H2 ' . 'A' = 'PROG' 9834.91866 0.54273926 0.000862203836
  229. -2.37281455E-07 1.84701105E-11 ;
  230. PGAS . 'H2O ' . 'A' = 'PROG' 1155.95625 0.768331151 -5.73129958E-05
  231. -1.82753232E-08 2.44485692E-12 ;
  232. PGAS . 'N2 ' . 'A' = 'PROG' 652.940766 0.288239099 -7.80442298E-05
  233. 8.78233606E-09 -3.05514485E-13 ;
  234. PGAS . 'O2 ' . 'A' = 'PROG' 575.012333 0.350522002 -0.000128294865
  235. 2.33636971E-08 -1.53304905E-12;
  236. *
  237. **** Formation enthalpies (energies) at 0K (J/Kg)
  238. *
  239. PGAS . 'H2 ' . 'H0K' = -4.195D6 ;
  240. PGAS . 'H2O ' . 'H0K' = -1.395D7 ;
  241. PGAS . 'N2 ' . 'H0K' = -2.953D5 ;
  242. PGAS . 'O2 ' . 'H0K' = -2.634D5 ;
  243.  
  244.  
  245. *************************************************
  246. **** The mesh ****
  247. *************************************************
  248.  
  249. A1 = 0.0D0 0.0D0;
  250. A2 = 0.0D0 1.0D0;
  251. A3 = 1.0D0 0.0D0;
  252. A4 = 1.0D0 1.0D0;
  253. A5 = 2.0D0 0.0D0;
  254. A6 = 2.0D0 1.0D0;
  255.  
  256. L12 = A1 'DROIT' 4 A2 ;
  257. L34 = A3 'DROIT' 4 A4 ;
  258. L56 = A5 'DROIT' 4 A6 ;
  259.  
  260. DOM1 = L12 'REGLER' 5 L34 'COULEUR' 'ROUG' ;
  261. DOM2 = L34 'REGLER' 5 L56 'COULEUR' 'VERT' ;
  262. DOMTOT = DOM1 'ET' DOM2 ;
  263.  
  264. 'SI' GRAPH ;
  265. 'TRACER' DOMTOT 'TITRE' 'Domaine' ;
  266. 'FINSI' ;
  267.  
  268. $DOMTOT = 'MODE' DOMTOT 'EULER' ;
  269. $DOM1 = 'MODE' DOM1 'EULER' ;
  270. $DOM2 = 'MODE' DOM2 'EULER' ;
  271.  
  272. TDOMTOT = 'DOMA' $DOMTOT 'VF' ;
  273. TDOM1 = 'DOMA' $DOM1 'VF' ;
  274. TDOM2 = 'DOMA' $DOM2 'VF' ;
  275.  
  276. MDOMTOT = TDOMTOT . 'QUAF' ;
  277. MDOM1 = TDOM1 . 'QUAF' ;
  278. MDOM2 = TDOM2 . 'QUAF' ;
  279. 'ELIM' (MDOMTOT 'ET' MDOM1 'ET' MDOM2) (1 '/' 100.) ;
  280.  
  281. MAIL1 = TDOM1 . 'CENTRE' ;
  282. MAIL2 = TDOM2 . 'CENTRE' ;
  283.  
  284. *************************************************
  285. **** Initial condition on primitive variables ***
  286. *************************************************
  287.  
  288. TN1 = ('MANUEL' 'CHPO' MAIL1 1 'SCAL' 293.16) '+'
  289. ('MANUEL' 'CHPO' MAIL2 1 'SCAL' 283.16) ;
  290. TN2 = ('MANUEL' 'CHPO' MAIL1 1 'SCAL' 2800.15) '+'
  291. ('MANUEL' 'CHPO' MAIL2 1 'SCAL' 2910.15) ;
  292. PN1 = ('MANUEL' 'CHPO' MAIL1 1 'SCAL' 1.013E5) '+'
  293. ('MANUEL' 'CHPO' MAIL2 1 'SCAL' 1.011E5) ;
  294. PN2 = ('MANUEL' 'CHPO' MAIL1 1 'SCAL' 1.023E5) '+'
  295. ('MANUEL' 'CHPO' MAIL2 1 'SCAL' 1.033E5) ;
  296. VN1 = ('MANUEL' 'CHPO' MAIL1 2 'UX' 122.
  297. 'UY' 101. ) '+'
  298. ('MANUEL' 'CHPO' MAIL2 2 'UX' 120.
  299. 'UY' 102. ) ;
  300. VN2 = ('MANUEL' 'CHPO' MAIL1 2 'UX' 150.
  301. 'UY' 160. ) '+'
  302. ('MANUEL' 'CHPO' MAIL2 2 'UX' 140.
  303. 'UY' 160.) ;
  304. ALPHA1 = ('MANUEL' 'CHPO' MAIL1 1 'SCAL' 0.9) '+'
  305. ('MANUEL' 'CHPO' MAIL2 1 'SCAL' 0.1) ;
  306. ALPHA2 = -1 '*' (ALPHA1 '-' 1.0) ;
  307. *
  308. * Computation of the conservative variables
  309. *
  310. RN1 RN2 GN1 GN2 RETN1 RETN2 = PRIMCONS
  311. PGAS TN1 TN2 PN1 PN2 VN1 VN2 ;
  312.  
  313. *
  314. ARN1 = ALPHA1 * RN1 ;
  315. ARN2 = ALPHA2 * RN2 ;
  316. AGN1 = ALPHA1 * GN1 ;
  317. AGN2 = ALPHA2 * GN2 ;
  318. ARETN1 = ALPHA1 * RETN1 ;
  319. ARETN2 = ALPHA2 * RETN2 ;
  320. *
  321. * K0 = 22.5 ;
  322. EPS = 1.0D-16 ;
  323. *
  324. TG1 = TN1 '*' 10. ;
  325. TG2 = TN2 '/' 10. ;
  326. R1 R2 V1 V2 P1 P2 T1 T2
  327. = 'PRIM' 'DEM' PGAS ALPHA1 ALPHA2
  328. ARN1 ARN2 AGN1 AGN2
  329. ARETN1 ARETN2 TG1 TG2 EPS ;
  330. *
  331. ERRO1 = 'MAXIMUM' ((TN1 '-' T1) '/' TN1) 'ABS' ;
  332. ERRO2 = 'MAXIMUM' ((TN2 '-' T2) '/' TN2) 'ABS' ;
  333. ERRO3 = 'MAXIMUM' ((PN2 '-' P2) '/' PN2) 'ABS' ;
  334. ERRO4 = 'MAXIMUM' ((PN1 '-' P1) '/' PN1) 'ABS' ;
  335. ERRO5 = 'MAXIMUM' ((RN1 '-' R1) '/' RN1) 'ABS' ;
  336. ERRO6 = 'MAXIMUM' ((RN2 '-' R2) '/' RN2) 'ABS' ;
  337. ERRO = 'MAXIMUM' ('PROG' ERRO1 ERRO2 ERRO3 ERRO4
  338. ERRO5 ERRO6) ;
  339. 'SI' (ERRO > 1.0D-12) ;
  340. 'ERREUR' 5 ;
  341. 'FINSI' ;
  342. *
  343. *** We consider a mixture of H2, O2, H2O
  344. *
  345. *************************************************
  346. **** The table for the properties of the gas ****
  347. *************************************************
  348. *
  349. PGAS2 = 'TABLE' ;
  350. *
  351. **** Order of the polynomial order for cv = cv(T)
  352. * For T > TMAX, cv(T) = cv(Tmax)
  353. *
  354. PGAS2 . 'TMAX' = 6000.0 ;
  355. PGAS2 . 'NORD' = 4 ;
  356. *
  357. **** Species involved in the mixture (before or after
  358. * the chemical reaction)
  359. *
  360. PGAS2 . 'SPECIES' = 'MOTS' 'H2 ' 'O2 ' 'H2O ' ;
  361. *
  362. *
  363. **** Coefficient of the chemical reaction.
  364. * Note that for the first species this coefficient should be positive
  365. * Normal, we take it equal to 1.
  366. *
  367. * H2 '+' 0.5 O2 ---> H2O
  368. *
  369. PGAS2 . 'CHEMCOEF' = 'PROG' 1.0 0.5 -1.0 ;
  370. *
  371. **** Coef with the gas properties
  372. *
  373. PGAS2 . 'H2 ' = 'TABLE' ;
  374. PGAS2 . 'H2O ' = 'TABLE' ;
  375. PGAS2 . 'O2 ' = 'TABLE' ;
  376. *
  377. **** Runiv (J/mole/K)
  378. *
  379. PGAS2 . 'RUNIV' = 8.31441 ;
  380. *
  381. **** W (kg/mole). Gas constant (J/kg/K = Runiv/W)
  382. *
  383. PGAS2 . 'H2 ' . 'W' = 2. * 1.00797E-3 ;
  384. PGAS2 . 'O2 ' . 'W' = 2. * 15.9994E-3 ;
  385. PGAS2 . 'H2O ' . 'W' = (PGAS2 . 'H2 ' . 'W' ) '+'
  386. (0.5 * (PGAS2 . 'O2 ' . 'W' )) ;
  387. *
  388. **** Mass fraction of the first species before and after the combustion
  389. * Final mass fractions of the species with positive coefficients.
  390. * Final mass fractions of the species with non-positive coefficient.
  391. * The mass fraction of the last species is not given.
  392. *
  393. NH2 = 1.;
  394. NO2 = 0.4999999999 * NH2 ;
  395. NH2O = 1.0D-12 ;
  396. MH2 = NH2 * (PGAS2 . 'H2 ' . 'W') ;
  397. MO2 = NO2 * (PGAS2 . 'O2 ' . 'W') ;
  398. MH2O = NH2O * (PGAS2 . 'H2O ' . 'W') ;
  399. MTOT = MH2 '+' MO2 '+' MH2O ;
  400. YH2 = MH2 '/' MTOT ;
  401. YO2 = MO2 '/' MTOT ;
  402. YH2O = MH2O '/' MTOT ;
  403. SI FAUX ;
  404. *
  405. **** Complete combustion
  406. *
  407. SI (NH2 > (2.0 * NO2)) ;
  408. YO2F = 1.0D-12 ;
  409. YH2F = YH2 '-' ((YO2 '-' YO2F) * ((PGAS2 . 'H2 ' . 'W') '/'
  410. (0.5 * (PGAS2 . 'O2 ' . 'W')))) ;
  411. 'SINON' ;
  412. YH2F = 1.0D-12 ;
  413. YO2F = YO2 '-' (0.5 * (YH2 '-' YH2F) * ((PGAS2 . 'O2 ' . 'W')
  414. '/'(PGAS2 . 'H2 ' . 'W'))) ;
  415. 'FINSI' ;
  416. 'SINON' ;
  417. YH2F = 1. '/' 3. * YH2 ;
  418. YO2F = YO2 '-' (0.5 * (YH2 '-' YH2F) * ((PGAS2 . 'O2 ' . 'W') '/'
  419. (PGAS2 . 'H2 ' . 'W'))) ;
  420. 'FINSI' ;
  421. YH2OF = YH2O '+' (YH2 '-' YH2F) '+' (YO2 '-' YO2F) ;
  422. ERRO = ((YH2F '+' YO2F '+' YH2OF) '-' 1.0) ;
  423. SI (ERRO > 1.0D-12) ;
  424. 'ERREUR' 21 ;
  425. 'FINSI' ;
  426. *
  427. PGAS2 . 'MASSFRA' = 'PROG' YH2 YH2F YO2F ;
  428. *
  429. **** Polynomial coefficients
  430. *
  431. PGAS2 . 'H2 ' . 'A' = 'PROG' 9834.91866 0.54273926 0.000862203836
  432. -2.37281455E-07 1.84701105E-11 ;
  433. PGAS2 . 'H2O ' . 'A' = 'PROG' 1155.95625 0.768331151 -5.73129958E-05
  434. -1.82753232E-08 2.44485692E-12 ;
  435. PGAS2 . 'O2 ' . 'A' = 'PROG' 575.012333 0.350522002 -0.000128294865
  436. 2.33636971E-08 -1.53304905E-12;
  437. 8.78233606E-09 -3.05514485E-13 ;
  438. *
  439. **** Formation enthalpies (energies) at 0K (J/Kg)
  440. *
  441. PGAS2 . 'H2 ' . 'H0K' = -4.195D6 ;
  442. PGAS2 . 'H2O ' . 'H0K' = -1.395D7 ;
  443. PGAS2 . 'O2 ' . 'H0K' = -2.634D5 ;
  444. *
  445. *
  446. *************************************************
  447. **** The initial conditions *********************
  448. *************************************************
  449. *
  450. eps = 1.0D-64 ;
  451. K0 = 3000. ;
  452. *
  453. T1 = 473. ;
  454. * alph11 = 1.0 '-' 1.0D-5 ;
  455. alph11 = 1.0 '-' 5.0D-3 ;
  456. * alph12 = 1.0D-5 ;
  457. alph12 = 5.0D-3 ;
  458. alph21 = 1.0 '-' alph11 ;
  459. alph22 = 1.0 - alph12 ;
  460. T2 = 4000. ;
  461. un1 = 0.0 ;
  462. un2 = 0.0 ;
  463. ut1 = 0.0 ;
  464. ut2 = 0.0 ;
  465. pre1 = 6.909D5 ;
  466. pre2 = 6.909D5 ;
  467. *
  468. CHVN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 2 'UX' un1
  469. 'UY' ut1) ;
  470. CHVN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 2 'UX' un2
  471. 'UY' ut2) ;
  472. *
  473. CHTN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' T1) ;
  474. CHTN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' T2) ;
  475. *
  476. CHPN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' pre1) ;
  477. CHPN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' pre2) ;
  478. *
  479. DOMAL = TDOM1 . 'CENTRE' ;
  480. DOMRES = 'DIFF' (TDOMTOT . 'CENTRE') DOMAL ;
  481. CHAL1 = ('MANUEL' 'CHPO' DOMRES 1 'SCAL'
  482. alph11) '+'
  483. ('MANUEL' 'CHPO' DOMAL 1 'SCAL'
  484. alph12) ;
  485. CHAL2 = ('MANUEL' 'CHPO' DOMRES 1 'SCAL'
  486. alph21) '+'
  487. ('MANUEL' 'CHPO' DOMAL 1 'SCAL'
  488. alph22) ;
  489. *
  490. CHRN1 CHRN2 CHGN1 CHGN2 CHRET1 CHRET2 = PRIMCONS
  491. PGAS2 CHTN1 CHTN2 CHPN1 CHPN2 CHVN1 CHVN2 ;
  492. *
  493. RN1 RN2 VN1 VN2 PN1 PN2 TN1 TN2 = 'PRIM' 'DEM' PGAS2 CHAL1 CHAL2
  494. (CHAL1 * CHRN1) (CHAL2 * CHRN2) (CHAL1 * CHGN1)
  495. (CHAL2 * CHGN2) (CHAL1 * CHRET1) (CHAL2 * CHRET2)
  496. CHTN1 CHTN2 EPS ;
  497. TN1M = COPIER TN1 ;
  498. TN2M = COPIER TN2 ;
  499. *
  500. ERRO = 'MAXIMUM' (PRE1 '-' ('REDU' PN1 DOMAL)) 'ABS' ;
  501. ERRO = ERRO '/' (pre1) ;
  502. 'SI' (ERRO > 1.0D-6) ;
  503. 'MESSAGE' ('CHAINE' 'Erreur PRIM ' ERRO);
  504. 'ERREUR' 21 ;
  505. 'FINSI' ;
  506. ERRO = 'MAXIMUM' (PRE2 '-' ('REDU' PN2 DOMRES)) 'ABS' ;
  507. ERRO = ERRO '/' (pre2) ;
  508. 'SI' (ERRO > 1.0D-6) ;
  509. 'MESSAGE' ('CHAINE' 'Erreur PRIM ' ERRO);
  510. 'ERREUR' 21 ;
  511. 'FINSI' ;
  512. ERRO = 'MAXIMUM' (T1 '-' ('REDU' TN1 DOMAL)) 'ABS' ;
  513. ERRO = ERRO '/' (T1) ;
  514. 'SI' (ERRO > 1.0D-6) ;
  515. 'MESSAGE' ('CHAINE' 'Erreur PRIM ' ERRO);
  516. 'ERREUR' 21 ;
  517. 'FINSI' ;
  518. ERRO = 'MAXIMUM' (T2 '-' ('REDU' TN2 DOMRES)) 'ABS' ;
  519. ERRO = ERRO '/' (T2) ;
  520. 'SI' (ERRO > 1.0D-6) ;
  521. 'MESSAGE' ('CHAINE' 'Erreur PRIM ' ERRO);
  522. 'ERREUR' 21 ;
  523. 'FINSI' ;
  524.  
  525. 'FIN' ;
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales