Télécharger crebe12.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier : crebe12.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4. *--------------------------------------------
  5. * GIBIANE file for the HDR test E12.3.2 *
  6. * in 2D *
  7. * We make 100 iterations on the coarse mesh *
  8. * and compare the overpressure in the room *
  9. * R1904 with earlier computed values *
  10. * CREBCOM combustion model is used *
  11. *--------------------------------------------
  12. *--------------------------------------------
  13. * Here we construct the mesh for the *
  14. * HDR test E12.3.2 *
  15. *--------------------------------------------
  16.  
  17. 'OPTION' 'ECHO' 1 'DIME' 2 'ELEM' 'QUA4'
  18. 'TRAC' 'X' ;
  19.  
  20. *-------------------------------------------
  21. * Given a line and a mesh, this procedure
  22. * computes a new line which containes the
  23. * points of the mesh closest to the points
  24. * of the given line
  25. *-------------------------------------------
  26. 'DEBPROC' LIGPROC ;
  27. ******* inputs
  28. 'ARGUMENT' LIGG*'MAILLAGE' MAI1*'MAILLAGE' ;
  29. NPOI = 'NBNO' LIGG ;
  30. MAI2 = 'CHANGER' MAI1 'POI1' ;
  31. * First element of the line
  32. P1 = LIGG 'POIN' 1 ;
  33. P1P = MAI2 'POIN' 'PROC' P1 ;
  34. P2 = LIGG 'POIN' 2 ;
  35. P2P = MAI2 'POIN' 'PROC' P2 ;
  36. 'REPETER' BL1 (NPOI '-' 1) ;
  37. 'SI' ('NEG' P1P P2P) ;
  38. NPOI = (NPOI '-' &BL1) '+' 1 ;
  39. 'QUITTER' BL1 ;
  40. 'FINSI' ;
  41. P2 = LIGG 'POIN' (&BL1 '+' 2) ;
  42. P2P = LIGG 'POIN' 'PROC' P2 ;
  43. 'FIN' BL1 ;
  44. LIGRES = 'MANUEL' 'SEG2' P1P P2P ;
  45. * The other element of the line
  46. 'REPETER' BL1 (NPOI '-' 2) ;
  47. P1P = P2P ;
  48. P2 = LIGG 'POIN' (&BL1 '+' 2) ;
  49. P2P = MAI2 'POIN' 'PROC' P2 ;
  50. 'SI' ('NEG' P1P P2P) ;
  51. LIGRES = LIGRES 'ET' ('MANUEL' 'SEG2' P1P P2P) ;
  52. 'FINSI' ;
  53. 'FIN' BL1 ;
  54. 'RESPRO' LIGRES ;
  55. 'FINPROC' ;
  56. *--------------------------------------------------------
  57. *---refinement of the mesh (10 or 16)
  58. RAF = 10 ;
  59. *-- Length of the thirst and second room
  60. L1 = 7.32D0 ;
  61. *-- Height of the first window
  62. H1 = 0.5D0 ;
  63. *-- Height of the first and second room
  64. H2 = 4.0D0 ;
  65. *---------------------------------
  66. * Number of cells in each region
  67. *---------------------------------
  68. N1 = RAF ;
  69. *---- number of points in window1
  70. ** It is BETTER to have NY1 even!
  71. NY1 = 'ENTIER' (RAF '/' 4) ;
  72. *---------------------------------
  73. DX = L1 '/' N1 ;
  74. *---- cell size in window
  75. DX1 = H1 '/' NY1 ;
  76. *---- number of points in the outer window
  77. NY2 = 'ENTIER' ((H2 '-' H1) '/' DX) ;
  78. ***---- wall thickness
  79. DW = H1 ;
  80. *-----------------------------------------
  81. * First and Second Room (R1904 and R1905)
  82. *-----------------------------------------
  83. LB = L1 '-' (7.5 '*' H1) ;
  84. A1 = 0.0 0.0 ;
  85. A12 = LB 0.0 ;
  86. A13 = LB (H1 '/' 2) ;
  87. A14 = 0.0 (H1 '/' 2) ;
  88. *------------------------------------
  89. * "Lower-left" domain
  90. *-------------------------------------
  91. NY1M = NY1 '/' 2 ;
  92. A1A12 = A1 'DROIT' A12 'DINI' DX1 'DFIN' (DW '/' NY1) ;
  93. A12A13 = A12 'DROIT' NY1M A13 ;
  94. A13A14 = A13 'DROIT' A14 'DINI' (DW '/' NY1) 'DFIN' DX1 ;
  95. A14A1 = A14 'DROIT' NY1M A1 ;
  96.  
  97. DOM1L = 'DALLER' A1A12 A12A13 A13A14 A14A1 'PLAN' ;
  98. *--------------------------------------
  99. * "Lower-right" domain
  100. *--------------------------------------
  101. LB1 = L1 '-' (2.5 '*' H1) ;
  102. AI1 = LB1 0.0 ;
  103. A2 = L1 0.0 ;
  104. AI3 = L1 (H1 '/' 2) ;
  105. AI4 = LB1 (H1 '/' 2) ;
  106. *------------------------------------
  107. DENF = (DW '/' NY1) ;
  108. AI1A2 = AI1 'DROIT' A2 'DINI' DENF 'DFIN' DENF ;
  109. A2AI3 = A2 'DROIT' NY1M AI3 ;
  110. AI3AI4 = AI3 'DROIT' AI4 'DINI' DENF 'DFIN' DENF ;
  111. AI4AI1 = AI4 'DROIT' NY1M AI1 ;
  112.  
  113. DOM1R = 'DALLER' AI1A2 A2AI3 AI3AI4 AI4AI1 'PLAN' ;
  114.  
  115. DOM1 = DOM1L 'ET' DOM1R ;
  116. 'ELIMINATION' DOM1 1.0D-6 ;
  117. *----------------------------------------------------
  118. * Line for postreatment
  119. *----------------------------------------------------
  120. *** NNN is the number of points in the disc
  121. NNN = NY1 '*' 4 ;
  122. xcel = LB '+' (H1 '/' 2) ;
  123. ycel = H1 '/' 2 ;
  124. ACEL = xcel ycel ;
  125. LIGB = A13 'DROIT' NY1M ACEL ;
  126. *------------------
  127. xmm = LB '+' (2.5 '*' H1) ;
  128. 'REPETER' BL1 NNN ;
  129. ACEL0 = ACEL ;
  130. xcel = xcel '+' DX1 ;
  131. dop = 18.0625 '*' H1 '*' H1 ;
  132. dop = dop '-' ((xcel-xmm) '*' (xcel-xmm)) ;
  133. dop = dop '**' 0.5 ;
  134. ycel = dop '-' (3.25 '*' H1) ;
  135. ACEL = xcel ycel ;
  136. LIGB = LIGB 'ET' (ACEL0 'DROIT' 1 ACEL) ;
  137. 'FIN' BL1 ;
  138. LIGB = LIGB 'ET' (ACEL 'DROIT' AI4 'DINI' DX1 'DFIN' DX1 ) ;
  139. *--------------------------------------------
  140. LIGBG = ('INVERSE' A13A14) 'ET' LIGB 'ET'
  141. ('INVERSE' AI3AI4) ;
  142. *-------------------------------------
  143. * "HIGH" domain
  144. *-------------------------------------
  145. A3 = L1 H1 ;
  146. A4 = 0.0 H1 ;
  147. A5 = L1 H2 ;
  148. A6 = 0.0 H2 ;
  149. AI5 = LB H2 ;
  150. *---------------------------------
  151. AI3A5 = AI3 'DROIT' A5 'DINI' DX1 'DFIN' DX1 ;
  152. A5AI5 = A5 'DROIT' AI5 'DINI' DX1 'DFIN' DX1 ;
  153. AI5A6 = AI5 'DROIT' A6 'DINI' DX1 'DFIN' DX1 ;
  154. LIGH = A5AI5 'ET' AI5A6 ;
  155. A6A14 = A6 'DROIT' A14 'DINI' DX1 'DFIN' DX1 ;
  156. *---------------------------
  157. DOM2 = 'DALLER' LIGBG AI3A5 LIGH A6A14 'PLAN' ;
  158. *---------------------------------------------
  159. * The Channel (junction between rooms)
  160. *---------------------------------------------
  161. A21 = A2 'PLUS' (DW 0.0) ;
  162. A31 = A3 'PLUS' (DW 0.0) ;
  163. A2A21 = A2 'DROIT' NY1 A21 ;
  164. A21A31 = A21 'DROIT' NY1 A31 ;
  165. A31A3 = A31 'DROIT' NY1 A3 ;
  166. A3A2 = A3 'DROIT' NY1 A2 ;
  167. *-------------------------
  168. DOMC = 'DALLER' A2A21 A21A31 A31A3 A3A2 'PLAN' ;
  169. *--------------------------------------------
  170. * Third room (R1801)
  171. *--------------------------------------------
  172. *---- Length of the third room
  173. L3 = 5.0D0 ;
  174. *--- length before the window
  175. LB = 1.8D0 ;
  176. *--- width of window
  177. LW = 0.668D0 ;
  178. *--- length after the window
  179. LA = L3 '-' LB '-' LW ;
  180. *----------------------------------------
  181. * Low Domain
  182. *----------------------------------------
  183. H3 = (9.5 '-' H2) '-' H1 ;
  184. MH3 = (-1.0D0) '*' H3 ;
  185. A70 = (L1 '+' DW) MH3 ;
  186. A71 = (L1 '+' LB '+' DW) MH3 ;
  187. A72 = (L1 '+' LB '+' DW) 0.0 ;
  188. *----------------------------
  189. DW1 = LW '/' NY1 ;
  190. A70A71 = A70 'DROIT' A71 'DINI' (DW '/' NY1) 'DFIN' DW1 ;
  191. A71A72 = A71 'DROIT' A72 'DINI' DX1 'DFIN' DX1 ;
  192. A72A21 = A72 'DROIT' A21 'DINI' DW1 'DFIN' (DW '/' NY1) ;
  193. A21A70 = A21 'DROIT' A70 'DINI' DX1 'DFIN' DX1 ;
  194. *------------------------------
  195. DOM3A = 'DALLER' A70A71 A71A72 A72A21 A21A70 'PLAN' ;
  196. *------------------------------
  197. A7W = A71 'PLUS' (LW 0.0) ;
  198. A7U = A72 'PLUS' (LW 0.0) ;
  199. *--------------------------
  200. A71A7W = A71 'DROIT' NY1 A7W ;
  201. A7WA7U = A7W 'DROIT' A7U 'DINI' DX1 'DFIN' DX1 ;
  202. A7UA72 = A7U 'DROIT' NY1 A72 ;
  203. A72A71 = 'INVERSE' (A71A72) ;
  204. *-------------------------
  205. DOM3B = 'DALLER' A71A7W A7WA7U A7UA72 A72A71 'PLAN' ;
  206. *-------------------------
  207. A81 = A7W 'PLUS' (LA 0.0) ;
  208. A82 = A7U 'PLUS' (LA 0.0) ;
  209. *-------------------------
  210. A7WA81 = A7W 'DROIT' A81 'DINI' DW1 'DFIN' DX1 ;
  211. A81A82 = A81 'DROIT' A82 'DINI' DX1 'DFIN' DX1 ;
  212. A82A7U = A82 'DROIT' A7U 'DINI' DX1 'DFIN' DW1 ;
  213. A7UA7W = 'INVERSE' (A7WA7U) ;
  214. *-------------------------
  215. DOM3C = 'DALLER' A7WA81 A81A82 A82A7U A7UA7W 'PLAN' ;
  216. *-------------------------
  217. DOM3 = DOM3A 'ET' DOM3B 'ET' DOM3C ;
  218. 'ELIMINATION' DOM3 1.0D-6 ;
  219. *-----------------------------------------
  220. * Middle domain
  221. *-----------------------------------------
  222. A73 = A72 'PLUS' (0.0 H1) ;
  223. ***--- first layer
  224. A21A72 = A21 'DROIT' A72 'DINI' (DW '/' NY1) 'DFIN' DW1 ;
  225. A72A73 = A72 'DROIT' NY1 A73 ;
  226. A73A31 = A73 'DROIT' A31 'DINI' DW1 'DFIN' (DW '/' NY1) ;
  227. A31A21 = A31 'DROIT' NY1 A21 ;
  228. *-----------------------------
  229. DOM4A = 'DALLER' A21A72 A72A73 A73A31 A31A21 'PLAN' ;
  230. *-------------------------------------------
  231. A7M = A7U 'PLUS' (0.0 H1) ;
  232. *---------------
  233. A72A7U = A72 'DROIT' NY1 A7U ;
  234. A7UA7M = A7U 'DROIT' NY1 A7M ;
  235. A7MA73 = A7M 'DROIT' NY1 A73 ;
  236. A73A72 = 'INVERSE' (A72A73) ;
  237. *---------------------
  238. DOM4B = 'DALLER' A72A7U A7UA7M A7MA73 A73A72 'PLAN' ;
  239. *---------------------------
  240. A83 = A82 'PLUS' (0.0 H1) ;
  241. *---------------------------
  242. A7UA82 = A7U 'DROIT' A82 'DINI' DW1 'DFIN' DX1 ;
  243. A82A83 = A82 'DROIT' NY1 A83 ;
  244. A83A7M = A83 'DROIT' A7M 'DINI' DX1 'DFIN' DW1 ;
  245. A7MA7U = 'INVERSE' (A7UA7M) ;
  246. *---------------------------
  247. DOM4C = 'DALLER' A7UA82 A82A83 A83A7M A7MA7U 'PLAN' ;
  248. *---------------------------
  249. DOM4 = DOM4A 'ET' DOM4B 'ET' DOM4C ;
  250. 'ELIMINATION' DOM4 1.0D-6 ;
  251. *-----------------------------------------
  252. * High domain
  253. *-----------------------------------------
  254. A32 = A31 'PLUS' (0.0 H2) ;
  255. A74 = A73 'PLUS' (0.0 H2) ;
  256. *---------------------------
  257. A31A73 = 'INVERSE' (A73A31) ;
  258. A73A74 = A73 'DROIT' A74 'DINI' DX1 'DFIN' DW1 ;
  259. A74A32 = A74 'DROIT' A32 'DINI' DW1 'DFIN' (DW '/' NY1) ;
  260. A32A31 = A32 'DROIT' A31 'DINI' DW1 'DFIN' DX1 ;
  261. *---------------------------
  262. DOM5A = 'DALLER' A31A73 A73A74 A74A32 A32A31 'PLAN' ;
  263. *---------------------------
  264. A7H = A7M 'PLUS' (0.0 H2) ;
  265. *---------------------------
  266. A73A7M = 'INVERSE' (A7MA73) ;
  267. A7MA7H = A7M 'DROIT' A7H 'DINI' DX1 'DFIN' DW1 ;
  268. A7HA74 = A7H 'DROIT' NY1 A74 ;
  269. A74A73 = 'INVERSE' (A73A74) ;
  270. *---------------------------
  271. DOM5B = 'DALLER' A73A7M A7MA7H A7HA74 A74A73 'PLAN' ;
  272. *---------------------------
  273. A84 = A83 'PLUS' (0.0 H2) ;
  274. *---------------------------
  275. A7MA83 = A7M 'DROIT' A83 'DINI' DW1 'DFIN' DX1 ;
  276. A83A84 = A83 'DROIT' A84 'DINI' DX1 'DFIN' DW1 ;
  277. A84A7H = A84 'DROIT' A7H 'DINI' DX1 'DFIN' DW1 ;
  278. A7HA7M = 'INVERSE' (A7MA7H) ;
  279. *-----------------------------
  280. DOM5C = 'DALLER' A7MA83 A83A84 A84A7H A7HA7M 'PLAN' ;
  281. *-------------------------------------
  282. DOM5 = DOM5A 'ET' DOM5B 'ET' DOM5C ;
  283. 'ELIMINATION' DOM5 1.0D-6 ;
  284. ****----------*****----------------------******-------
  285. * Upper vent
  286. *---**********-----**********************------*******
  287. A75 = A74 'PLUS' (0.0 LW) ;
  288. A7F = A7H 'PLUS' (0.0 LW) ;
  289. *---------------------------
  290. A74A7H = A74 'DROIT' NY1 A7H ;
  291. A7HA7F = A7H 'DROIT' NY1 A7F ;
  292. A7FA75 = A7F 'DROIT' NY1 A75 ;
  293. A75A74 = A75 'DROIT' NY1 A74 ;
  294. *---------------------------
  295. DOMW = 'DALLER' A74A7H A7HA7F A7FA75 A75A74 'PLAN' ;
  296.  
  297. FRONTH = A7FA75 ;
  298. *----------------------------------*
  299. * Ignition Zone *
  300. *----------------------------------*
  301. ** height at which we ignite
  302. HIGN = H2 '/' 2.0D0 ;
  303. *-------------------------
  304. PP1 = 0.0 HIGN ;
  305. PP2 = PP1 'PLUS' (0.0 (DX1)) ;
  306. PP3 = PP2 'PLUS' (0.0 (DX1)) ;
  307. gg = (-1.0D0) '*' DX '*' 0.6 ;
  308. PP5 = PP1 'PLUS' (0.0 gg) ;
  309. PP51 = PP5 'PLUS' (0.0 gg) ;
  310. PO1 = A6A14 'POIN' 'PROCHE' PP1 ;
  311. PO2 = A6A14 'POIN' 'PROCHE' PP2 ;
  312. PO31 = A6A14 'POIN' 'PROCHE' PP3 ;
  313. PO5 = A6A14 'POIN' 'PROCHE' PP5 ;
  314. PO51 = A6A14 'POIN' 'PROCHE' PP51 ;
  315. **--------------------------------
  316. PPP = DX1 0.0 ;
  317. PA1 = A1A12 'POIN' 'PROCHE' PPP ;
  318. PPP = (2.0 '*' DX) 0.0 ;
  319. PA2 = A1A12 'POIN' 'PROCHE' PPP ;
  320. XXX1 = 'COORDONNEE' 1 PA1 ;
  321. XXX2 = 'COORDONNEE' 1 PA2 ;
  322. YYY2 = 'COORDONNEE' 2 PO2 ;
  323. YYY3 = 'COORDONNEE' 2 PO31 ;
  324. PO4 = XXX1 YYY2 ;
  325. PO7 = XXX1 YYY3 ;
  326. *-----------------------------
  327. * Just eight cells
  328. *-----------------------------
  329. PO1PO2 = PO1 'DROIT' 1 PO2 ;
  330. PO2PO31 = PO2 'DROIT' 1 PO31 ;
  331. PO4PO7 = PO4 'DROIT' 1 PO7 ;
  332. PO5PO51 = PO5 'DROIT' 1 PO51 ;
  333. **------------------------------
  334. 'SI' (RAF 'EGA' 10) ;
  335. NZD = 1 ;
  336. KEF = -1.0D0 ;
  337. 'SINON' ;
  338. KEF = -2.0D0 ;
  339. NZD = 2 ;
  340. 'FINSI' ;
  341. DIG1 = 'TRANSLATION' PO1PO2 NZD ((KEF '*' XXX1) 0.0) ;
  342. DIG5 = 'TRANSLATION' PO2PO31 NZD ((KEF '*' XXX1) 0.0) ;
  343. DIG6 = 'TRANSLATION' PO4PO7 1 ((XXX2-XXX1) 0.0) ;
  344. DIG7 = 'TRANSLATION' PO5PO51 1 (XXX1 0.0) ;
  345. 'SI' (RAF '>' 10) ;
  346. YO31 = 'COORDONNEE' 2 PO31 ;
  347. YO2 = 'COORDONNEE' 2 PO1 ;
  348. DIFY = YO31 '-' YO2 ;
  349. VECUP = (0.0 DIFY) ;
  350. DIG6 = DIG1 'PLUS' VECUP ;
  351. DIG7 = DIG5 'PLUS' VECUP ;
  352. 'FINSI' ;
  353. *-----------------------------
  354. 'SI' (RAF '>' 10) ;
  355. DOMI = DIG1 'ET' DIG5 'ET' DIG6 'ET' DIG7 ;
  356. 'SINON' ;
  357. DOMI = DIG1 'ET' DIG5 ;
  358. 'FINSI' ;
  359.  
  360. 'ELIMINATION' DOMI 1.0D-6;
  361. * 'TRACER' DOMI ;
  362. *----------------------------------------------------
  363. * Total Domain
  364. *----------------------------------------------------
  365. DOMTOT = DOM1 'ET' DOM2 'ET' DOM3 'ET' DOM4 'ET' DOM5 'ET'
  366. DOMC 'ET' DOMW 'ET' DOMI ;
  367. 'ELIMINATION' DOMTOT 1D-6 ;
  368. *-------------------------------------
  369. * Total Domain without ignition region
  370. *-------------------------------------
  371. DREST = 'DIFF' DOMTOT DOMI ;
  372. *----------------------------------
  373. * The fird room (R1801)
  374. *----------------------------------
  375. DTHIRD = DOM3 'ET' DOM4 'ET' DOM5 'ET' DOMC 'ET' DOMW ;
  376. 'ELIMINATION' DTHIRD 1.0D-6 ;
  377. *----------------------------------------
  378. * First and second room (R1904 and R1905)
  379. *----------------------------------------
  380. DSEC = DOM1 'ET' DOM2 ;
  381. *-------------------------------
  382. * Lignes de postreatment
  383. *-------------------------------
  384. LIGA = LIGBG 'PLUS' (0.0 (DX1 '/' 2.0)) ;
  385. A3A31 = 'INVERSE' A31A3 ;
  386. A31A73 = 'INVERSE' A73A31 ;
  387. A73A7M = 'INVERSE' A7MA73 ;
  388. A7MA83 = 'INVERSE' A83A7M ;
  389. LIGT = A3A31 'ET' A31A73 'ET' A73A7M 'ET' A7MA83 ;
  390. 'ELIMINATION' LIGT 1.0D-6 ;
  391. dis1 = (DX1 '/' 2) '-' (DW '/' 2.0) ;
  392. LIGB2 = LIGT 'PLUS' (0.0 dis1) ;
  393. LIGC = LIGA 'ET' LIGB2 ;
  394. 'ELIMINATION' LIGC 1.0D-6;
  395. LIG1 = LIGC ;
  396.  
  397. * 'TRACER' (DOMTOT 'ET' LIG1) ;
  398. *-------------------------------
  399. * Points for capturing variables
  400. *-------------------------------
  401. *--------- inside the first two rooms
  402. dish = (H2 '/' 2) '-' (DX1 '/' 2) ;
  403. disl = (H1 '/' 2) '+' (DX1 '/' 2) ;
  404. PCEL1 = (L1 '/' 6) dish ;
  405. PCEL2 = (L1 '/' 6) disl ;
  406. PCEL3 = (L1 '/' 2) dish ;
  407. PCEL4 = (L1 '/' 2) disl ;
  408. PCEL5 = (L1 '-' (L1 '/' 6)) dish ;
  409. PCEL6 = (L1 '-' (L1 '/' 6)) disl ;
  410. *-------- inside the third room
  411. dis1 = L1 '+' (2.0 '*' DW) ;
  412. PCEL7 = dis1 (2.0 '*' DW) ;
  413. dis2 = (LB '+' (LW '/' 2) '+' (DX1 '/' 2.0)) '+' L1 '+' DW ;
  414. PCEL8 = dis2 (DW '-' 5.0) ;
  415. PCEL9 = dis2 (4.5 '-' DW) ;
  416.  
  417. * 'TRACER' (DOMTOT 'ET' PCEL1 'ET' PCEL2 'ET' PCEL3 'ET' PCEL4
  418. * 'ET' PCEL5 'ET' PCEL6 'ET' PCEL7 'ET' PCEL8 'ET' PCEL9) ;
  419. *
  420. * 'TRACER' (('CONTOUR' DREST)
  421. * 'ET' PCEL1 'ET' PCEL2 'ET' PCEL3 'ET' PCEL4
  422. * 'ET' PCEL5 'ET' PCEL6 'ET' PCEL7 'ET' PCEL8 'ET' PCEL9) ;
  423. *----------------------------------
  424. * Creating the models
  425. *----------------------------------
  426. MDNS = 'EULER' ;
  427. *---------------------------------
  428. MDOMI = 'MODELISER' DOMI MDNS ;
  429. MDREST = 'MODELISER' DREST MDNS ;
  430. MFRONTH = 'MODELISER' FRONTH MDNS ;
  431. MDOMTOT = 'MODELISER' DOMTOT MDNS ;
  432. MDTHIRD = 'MODELISER' DTHIRD MDNS ;
  433. MDSEC = 'MODELISER' DSEC MDNS ;
  434. *----------------------------------
  435. $DOMI = 'DOMA' MDOMI 'VF' ;
  436. $DREST = 'DOMA' MDREST 'VF' ;
  437. $FRONTH = 'DOMA' MFRONTH 'VF' ;
  438. $DOMTOT = 'DOMA' MDOMTOT 'VF' ;
  439. $DTHIRD = 'DOMA' MDTHIRD 'VF' ;
  440. $DSEC = 'DOMA' MDSEC 'VF' ;
  441. *----------------------------------
  442. QDOMI = $DOMI . 'QUAF' ;
  443. QDREST = $DREST . 'QUAF' ;
  444. QFRONTH = $FRONTH . 'QUAF' ;
  445. QDOMTOT = $DOMTOT . 'QUAF' ;
  446. QDTHIRD = $DTHIRD . 'QUAF' ;
  447. QDSEC = $DSEC . 'QUAF' ;
  448. *----------------------------------
  449. 'ELIMINATION' QDOMTOT (1.0D-6 '/' RAF) QDOMI ;
  450. 'ELIMINATION' QDOMTOT (1.0D-6 '/' RAF) QDREST ;
  451. 'ELIMINATION' QDOMTOT (1.0D-6 '/' RAF) QFRONTH ;
  452. 'ELIMINATION' QDOMTOT (1.0D-6 '/' RAF) QDTHIRD ;
  453. 'ELIMINATION' QDOMTOT (1.0D-6 '/' RAF) QDSEC ;
  454. *-------------------------------
  455. LIN1 = LIGPROC LIG1 ('DOMA' MDOMTOT 'CENTRE') ;
  456.  
  457. * 'TRACER' (DOMTOT 'ET' LIN1) ;
  458. *----------------------------------
  459. * Ligne at the "coridor"
  460. *----------------------------------
  461. VECL = ((-0.5 '*' DX1) (0.5 '*' DX1)) ;
  462. PL2 = A21 'PLUS' VECL ;
  463. PL2 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PL2 ;
  464. VECL = ((-0.5 '*' DX1) (-0.5 '*' DX1)) ;
  465. PL3 = A31 'PLUS' VECL ;
  466. PL3 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PL3 ;
  467. LIG2 = PL2 'DROIT' (NY1 '-' 1) PL3 ;
  468. 'SI' (RAF 'EGA' 10) ;
  469. LIN2 = LIG2 ;
  470. 'SINON' ;
  471. LIN2 = LIGPROC LIG2 ('DOMA' MDOMTOT 'CENTRE') ;
  472. 'FINSI' ;
  473. * 'TRACER' (DOMTOT 'ET' LIG2) ;
  474. * 'TRACER' (DOMTOT 'ET' LIN2) ;
  475. *--------------------------------
  476. MDLIN2 = 'MODELISER' LIN2 MDNS ;
  477. $DLIN2 = 'DOMA' MDLIN2 'VF' ;
  478. QDLIN2 = $DLIN2 . 'QUAF' ;
  479. 'ELIMINATION' QDOMTOT (1.0D-6 '/' RAF) QDLIN2 ;
  480. *----------------------------------
  481. * "Centralising the capteurs"
  482. *----------------------------------
  483. PCE1 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PCEL1 ;
  484. PCE2 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PCEL2 ;
  485. PCE3 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PCEL3 ;
  486. PCE4 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PCEL4 ;
  487. PCE5 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PCEL5 ;
  488. PCE6 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PCEL6 ;
  489. PCE7 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PCEL7 ;
  490. PCE8 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PCEL8 ;
  491. PCE9 = ('DOMA' MDOMTOT 'CENTRE') 'POIN' 'PROCHE' PCEL9 ;
  492.  
  493. * 'TRACER' (DOMTOT 'ET' PCE1 'ET' PCE2 'ET' PCE3 'ET' PCE4
  494. * 'ET' PCE5 'ET' PCE6 'ET' PCE7 'ET' PCE8 'ET' PCE9) ;
  495. * 'TRACER' (DOMTOT 'ET' ('DOMA' MDOMI 'CENTRE')) ;
  496.  
  497. numbel = 'NBEL' DOMTOT ;
  498. *-------------------------------------------
  499. * Cells sizes: min, max and averaged
  500. *-------------------------------------------
  501. VOLC = 'DOMA' MDOMTOT 'VOLUME' ;
  502. SIZE = VOLC '**' 0.5 ;
  503. *------- minimal
  504. SMIN = 'MINIMUM' SIZE ;
  505. *------- maximal
  506. SMAX = 'MAXIMUM' SIZE ;
  507. *------- averaged
  508. CHUN = 'MANUEL' 'CHPO' ('DOMA' MDOMTOT 'CENTRE')
  509. 1 'SCAL' 1.0 'NATU' 'DISCRET' ;
  510. SIZEAV = 'XTY' SIZE CHUN ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  511. SIZEAV = SIZEAV '/' numbel ;
  512. *-------------------------------
  513. * Saving the results
  514. *-------------------------------
  515.  
  516. *'OPTION' 'SAUVER' ('CHAINE' '/serg/HDR12.3.2_dir/'
  517. * 'mail' RAF '.sauv') ;
  518. * 'SAUV' ;
  519. *-----------------------------------------------
  520. * Initial conditions '+' gas properties
  521. *-----------------------------------------------
  522. * 'OPTION' 'ECHO' 1 'DIME' 2 'ELEM' 'QUA4'
  523. * 'TRAC' 'X' ;
  524. *
  525. * RAF = 10 ;
  526. *
  527. * 'OPTION' 'REST' ('CHAINE' '/serg/HDR12.3.2_dir/mail' RAF '.sauv') ;
  528. * 'RESTITUER' ;
  529.  
  530. zero = 1.0D-9 ;
  531. GRAPH = FAUX ;
  532.  
  533. ***************************************************************
  534. ***** PROCEDURE POUR CALCULER LES 'CP' ET 'CV' *****
  535. ***************************************************************
  536. 'DEBPROC' CPCV TN*'FLOTTANT' PGAZ*'TABLE' ;
  537. *
  538. CPP = 'TABLE' ;
  539. CVV = 'TABLE' ;
  540.  
  541. TT = TN ;
  542. T2 = TT '*' TT ;
  543. T3 = T2 '*' TT ;
  544. T4 = T3 '*' TT ;
  545.  
  546. 'REPETER' BL1 ('DIME' (PGAZ . 'ESPEULE')) ;
  547. NOMCOM = 'EXTRAIRE' &BL1 (PGAZ . 'ESPEULE');
  548. A0 = ('EXTRAIRE' 1 (PGAZ . NOMCOM . 'A')) ;
  549. A1 = ('EXTRAIRE' 2 (PGAZ . NOMCOM . 'A')) '/' 2.0 ;
  550. A2 = ('EXTRAIRE' 3 (PGAZ . NOMCOM . 'A')) '/' 3.0 ;
  551. A3 = ('EXTRAIRE' 4 (PGAZ . NOMCOM . 'A')) '/' 4.0 ;
  552. A4 = ('EXTRAIRE' 5 (PGAZ . NOMCOM . 'A')) '/' 5.0 ;
  553. CVV . NOMCOM = A0 '+' (A1*TT) '+' (A2 '*' T2) '+'
  554. (A3 '*' T3) '+' (A4 '*' T4) ;
  555. CPP . NOMCOM = (CVV . NOMCOM) '+' (PGAZ . NOMCOM . 'R') ;
  556. 'FIN' BL1 ;
  557.  
  558. NOMCOM = PGAZ . 'ESPNEULE' ;
  559. A0 = ('EXTRAIRE' 1 (PGAZ . NOMCOM . 'A')) ;
  560. A1 = ('EXTRAIRE' 2 (PGAZ . NOMCOM . 'A')) '/' 2.0 ;
  561. A2 = ('EXTRAIRE' 3 (PGAZ . NOMCOM . 'A')) '/' 3.0 ;
  562. A3 = ('EXTRAIRE' 4 (PGAZ . NOMCOM . 'A')) '/' 4.0 ;
  563. A4 = ('EXTRAIRE' 5 (PGAZ . NOMCOM . 'A')) '/' 5.0 ;
  564. CVV . NOMCOM = A0 '+' (A1*TT) '+' (A2 '*' T2) '+'
  565. (A3 '*' T3) '+' (A4 '*' T4) ;
  566. CPP . NOMCOM = (CVV . NOMCOM) '+' (PGAZ . NOMCOM . 'R') ;
  567.  
  568.  
  569. 'FINPROC' CPP CVV ;
  570. ***************************************************************
  571. ***** PROCEDURE POUR CALCULER LES VARIABLES CONSERVATIVES *****
  572. ***************************************************************
  573. 'DEBPROC' CONS RN*'CHPOINT' VN*'CHPOINT' PN*'CHPOINT'
  574. YN*'CHPOINT' $DM*'MMODEL' PGAZ*'TABLE' ;
  575. *
  576.  
  577. A0 = 'KCHT' $DM 'SCAL' 'CENTRE' 0.0 ;
  578. A1 = 'KCHT' $DM 'SCAL' 'CENTRE' 0.0 ;
  579. A2 = 'KCHT' $DM 'SCAL' 'CENTRE' 0.0 ;
  580. A3 = 'KCHT' $DM 'SCAL' 'CENTRE' 0.0 ;
  581. A4 = 'KCHT' $DM 'SCAL' 'CENTRE' 0.0 ;
  582. RTOT = 'KCHT' $DM 'SCAL' 'CENTRE' 0.0 ;
  583. YTOT = 'KCHT' $DM 'SCAL' 'CENTRE' 0.0 ;
  584.  
  585. 'REPETER' BL1 ('DIME' (PGAZ . 'ESPEULE')) ;
  586. NOMCOM = 'EXTRAIRE' &BL1 (PGAZ . 'ESPEULE');
  587. YCEL = 'EXCO' NOMCOM YN ;
  588. RYCEL = 'NOMC' (YCEL * RN) NOMCOM 'NATU' 'DISCRET' ;
  589. YTOT = YTOT '+' YCEL ;
  590. RTOT = RTOT '+' ((PGAZ . NOMCOM . 'R') * YCEL) ;
  591. A0 = A0 '+' (('EXTRAIRE' 1 (PGAZ . NOMCOM . 'A')) '*' YCEL) ;
  592. A1 = A1 '+' (('EXTRAIRE' 2 (PGAZ . NOMCOM . 'A')) '*' YCEL) ;
  593. A2 = A2 '+' (('EXTRAIRE' 3 (PGAZ . NOMCOM . 'A')) '*' YCEL) ;
  594. A3 = A3 '+' (('EXTRAIRE' 4 (PGAZ . NOMCOM . 'A')) '*' YCEL) ;
  595. A4 = A4 '+' (('EXTRAIRE' 5 (PGAZ . NOMCOM . 'A')) '*' YCEL) ;
  596. 'SI' ('EGA' &BL1 1) ;
  597. RYN = 'KCHT' $DM 'SCAL' 'CENTRE' 'COMP' NOMCOM RYCEL ;
  598. 'SINON' ;
  599. RYN = RYN 'ET'
  600. ('KCHT' $DM 'SCAL' 'CENTRE' 'COMP' NOMCOM RYCEL) ;
  601. 'FINSI' ;
  602. 'FIN' BL1 ;
  603.  
  604. YCEL = ('KCHT' $DM 'SCAL' 'CENTRE' 1.0) '-' YTOT ;
  605. NOMCOM = PGAZ . 'ESPNEULE' ;
  606. A0 = A0 '+' (('EXTRAIRE' 1 (PGAZ . NOMCOM . 'A')) '*' YCEL) ;
  607. A1 = A1 '+' (('EXTRAIRE' 2 (PGAZ . NOMCOM . 'A')) '*' YCEL) ;
  608. A2 = A2 '+' (('EXTRAIRE' 3 (PGAZ . NOMCOM . 'A')) '*' YCEL) ;
  609. A3 = A3 '+' (('EXTRAIRE' 4 (PGAZ . NOMCOM . 'A')) '*' YCEL) ;
  610. A4 = A4 '+' (('EXTRAIRE' 5 (PGAZ . NOMCOM . 'A')) '*' YCEL) ;
  611. RTOT = RTOT '+' ((PGAZ . NOMCOM . 'R') '*' YCEL);
  612.  
  613. TN = PN '/' (RN '*' RTOT) ;
  614. T2 = TN '*' TN ;
  615. T3 = T2 '*' TN ;
  616. T4 = T3 '*' TN ;
  617. T5 = T4 '*' TN ;
  618.  
  619.  
  620. ETHER = (A0 * TN) '+' ((A1 '/' 2.0) * T2) '+'
  621. ((A2 '/' 3.0) * T3) '+' ((A3 '/' 4.0) * T4) '+'
  622. ((A4 '/' 5.0) * T5) ;
  623.  
  624. GN = RN '*' VN ('MOTS' 'SCAL' 'SCAL') ('MOTS' 'UX ' 'UY ')
  625. ('MOTS' 'UX ' 'UY ') ;
  626.  
  627. GN = 'KCHT' $DM 'VECT' 'CENTRE' GN ;
  628.  
  629. ECIN = 0.5D0 '*' ('PSCAL' GN VN ('MOTS' 'UX ' 'UY ')
  630. ('MOTS' 'UX ' 'UY ')) ;
  631.  
  632. REN = (RN '*' ETHER) '+' ECIN ;
  633.  
  634. REN = 'KCHT' $DM 'SCAL' 'CENTRE' REN ;
  635.  
  636. 'FINPROC' GN REN RYN ;
  637. ************************************************************
  638. ************************************************************
  639. * *
  640. ***** Gas properties *****
  641. * *
  642. ************************************************************
  643. ************************************************************
  644. PGAZ = 'TABLE' ;
  645. PGAZB = 'TABLE' ;
  646. * Polynomial degree of specific heats
  647. PGAZ . 'NORD' = 4 ;
  648. PGAZB . 'NORD' = 0 ;
  649. * Species explicitly treated in the Euler Equations
  650. PGAZ . 'ESPEULE' = 'MOTS' 'H2 ' 'O2 ' 'H2O ' ;
  651. PGAZB . 'ESPEULE' = PGAZ . 'ESPEULE' ;
  652. * Species non explicitly treated
  653. PGAZ . 'ESPNEULE' = 'N2 ';
  654. PGAZB . 'ESPNEULE' = PGAZ . 'ESPNEULE' ;
  655. * Gas species properties
  656. PGAZ . 'H2 ' = 'TABLE' ;
  657. PGAZ . 'H2O ' = 'TABLE' ;
  658. PGAZ . 'N2 ' = 'TABLE' ;
  659. PGAZ . 'O2 ' = 'TABLE' ;
  660. *----------------
  661. PGAZB . 'H2 ' = 'TABLE' ;
  662. PGAZB . 'H2O ' = 'TABLE' ;
  663. PGAZB . 'N2 ' = 'TABLE' ;
  664. PGAZB . 'O2 ' = 'TABLE' ;
  665. * R (J/Kg/K) and molar masses
  666. mH2 = 2. '*' 1.00797E-3 ;
  667. mO2 = 2. '*' 15.9994E-3 ;
  668. mH2O = mh2 '+' (0.5 '*' mo2) ;
  669. mN2 = 2 '*' 14.0067E-3 ;
  670. RGAS = 8.31441 ;
  671. *-------------------------------------
  672. PGAZ . 'H2 ' . 'R' = RGAS '/' mh2 ;
  673. PGAZ . 'H2O ' . 'R' = RGAS '/' mh2o ;
  674. PGAZ . 'N2 ' . 'R' = RGAS '/' mn2 ;
  675. PGAZ . 'O2 ' . 'R' = RGAS '/' mo2 ;
  676. *-------------------------------------
  677. PGAZB . 'H2 ' . 'R' = RGAS '/' mh2 ;
  678. PGAZB . 'H2O ' . 'R' = RGAS '/' mh2o ;
  679. PGAZB . 'N2 ' . 'R' = RGAS '/' mn2 ;
  680. PGAZB . 'O2 ' . 'R' = RGAS '/' mo2 ;
  681. *-------------------------------------
  682. * Polynomials regressions coefficients
  683. PGAZ . 'H2 ' . 'A' = 'PROG' 9834.91866 0.54273926 0.000862203836
  684. -2.37281455E-07 1.84701105E-11 ;
  685. PGAZ . 'H2O ' . 'A' = 'PROG' 1155.95625 0.768331151 -5.73129958E-05
  686. -1.82753232E-08 2.44485692E-12 ;
  687. PGAZ . 'N2 ' . 'A' = 'PROG' 652.940766 0.288239099 -7.80442298E-05
  688. 8.78233606E-09 -3.05514485E-13 ;
  689. PGAZ . 'O2 ' . 'A' = 'PROG' 575.012333 0.350522002 -0.000128294865
  690. 2.33636971E-08 -1.53304905E-12;
  691. *-------------------------------------------------------
  692. * Formation enthalpies at 0K (J/Kg))
  693. *
  694. * h_i(0K) = h_i(T0) '-' \int_0^{T0} cp_i(x) dx
  695. * = h_i(T0) '-' (\int_0^{T0} cv_i(x) dx '+' R_i * T0)
  696. *-------------------------------------------------------
  697. PGAZ . 'H2 ' . 'H0K' = -4.195D6 ;
  698. PGAZ . 'H2O ' . 'H0K' = -1.395D7 ;
  699. PGAZ . 'N2 ' . 'H0K' = -2.953D5 ;
  700. PGAZ . 'O2 ' . 'H0K' = -2.634D5 ;
  701. *-------------------------------------
  702. PGAZB . 'H2 ' . 'H0K' = -4.195D6 ;
  703. PGAZB . 'H2O ' . 'H0K' = -1.395D7 ;
  704. PGAZB . 'N2 ' . 'H0K' = -2.953D5 ;
  705. PGAZB . 'O2 ' . 'H0K' = -2.634D5 ;
  706. *-----------------------------------
  707. *** Names of the passive scalars
  708. *-----------------------------------
  709. PGAZ . 'SCALPASS' = 'MOTS' 'H2IN' 'H2FI' 'K0 ' ;
  710. *-----------------------------------------------
  711. PGAZB . 'SCALPASS' = 'MOTS' 'H2IN' 'H2FI' 'K0 ' ;
  712. ****************************************************
  713. ****************************************************
  714. * Initial conditions *
  715. ****************************************************
  716. ****************************************************
  717. *** inside the domain
  718. tg = 337.0D0 ;
  719. pg = 100000.0D0 ;
  720. xh2o = 0.26D0 ;
  721. xh2 = 0.1D0 ;
  722. xo2 = 0.1344D0 ;
  723. xn2 = 1.0D0 - (xh2 + xo2 + xh2O) ;
  724. uxg = 0.0 ;
  725. uyg = 0.0 ;
  726. *-------------------------
  727. td = 337.0D0 ;
  728. uxd = 0.0D0 ;
  729. uyd = 0.0D0 ;
  730. pd = 100000.0D0 ;
  731. *---- values of K_0
  732. K0IN = 0.41D0 ;
  733. K0IG = 0.41D0 ;
  734. K03 = 3.7D0 ;
  735. *--------------------------------------------
  736. * After burning: AIBC (same pressure)
  737. *--------------------------------------------
  738. tc = 1086.38864D0 ;
  739. xh2c = zero ;
  740. xo2c = 0.0888421D0 ;
  741. xh2oc = 0.3789469D0 ;
  742. xn2c = 1.0D0 '-' (xh2c '+' xo2c '+' xh2oc) ;
  743. pc = pg ;
  744. *---------------------------------------------
  745. CP1 CV1 = CPCV tg PGAZ ;
  746. *'-'*'-'*'-'*'-'*'-'*-
  747. PGAZB . 'CP' = 'TABLE' ;
  748. PGAZB . 'CP' . 'H2 ' = CP1 . 'H2' ;
  749. PGAZB . 'CP' . 'H2O ' = CP1 . 'H2O' ;
  750. PGAZB . 'CP' . 'O2 ' = CP1 . 'O2' ;
  751. PGAZB . 'CP' . 'N2 ' = CP1 . 'N2' ;
  752. *----------------------------------------
  753. PGAZB . 'CV' = 'TABLE' ;
  754. PGAZB . 'CV' . 'H2 ' = CV1 . 'H2' ;
  755. PGAZB . 'CV' . 'H2O ' = CV1 . 'H2O' ;
  756. PGAZB . 'CV' . 'O2 ' = CV1 . 'O2' ;
  757. PGAZB . 'CV' . 'N2 ' = CV1 . 'N2' ;
  758. *---------------------------------------------
  759. * Creating CHAMPOINTS
  760. *---------------------------------------------
  761. *** Pressure
  762. MAILC = 'DOMA' MDOMTOT 'CENTRE' ;
  763. MAILCI = 'DOMA' MDOMI 'CENTRE' ;
  764. MAILCR = 'DOMA' MDREST 'CENTRE' ;
  765. MAILC2 = 'DOMA' MDSEC 'CENTRE' ;
  766. MAILC3 = 'DOMA' MDTHIRD 'CENTRE' ;
  767. *********************************
  768. PINI = ('MANUEL' 'CHPO' MAILCI 1 'SCAL' pc 'NATU' 'DISCRET') 'ET'
  769. ('MANUEL' 'CHPO' MAILCR 1 'SCAL' pg 'NATU' 'DISCRET') ;
  770. *** Temperature
  771. TINI = ('MANUEL' 'CHPO' MAILCI 1 'SCAL' tc
  772. 'NATU' 'DISCRET') 'ET'
  773. ('MANUEL' 'CHPO' MAILCR 1 'SCAL' tg
  774. 'NATU' 'DISCRET') ;
  775. **** Velocity
  776. WINI = 'MANUEL' 'CHPO' MAILC 2 'UX' uxg 'UY' uyg ;
  777. *-------------------------------------------------------
  778. * Combustion is complete, i.e. \ksi = 1 after combustion
  779. *-------------------------------------------------------
  780. CSIMAX = 'MANUEL' 'CHPO' MAILC 1 'SCAL' 1.0D0 ;
  781. **** Molar fractions before combustion
  782. XH21 = ('MANUEL' 'CHPO' MAILCI 1 'H2' xh2c
  783. 'NATU' 'DISCRET') 'ET'
  784. ('MANUEL' 'CHPO' MAILCR 1 'H2' xh2
  785. 'NATU' 'DISCRET') ;
  786. XH2O1 = ('MANUEL' 'CHPO' MAILCI 1 'H2O' xh2oc
  787. 'NATU' 'DISCRET') 'ET'
  788. ('MANUEL' 'CHPO' MAILCR 1 'H2O' xh2o
  789. 'NATU' 'DISCRET') ;
  790. XO21 = ('MANUEL' 'CHPO' MAILCI 1 'O2' xo2c
  791. 'NATU' 'DISCRET') 'ET'
  792. ('MANUEL' 'CHPO' MAILCR 1 'O2' xo2
  793. 'NATU' 'DISCRET') ;
  794. XN21 = ('MANUEL' 'CHPO' MAILCI 1 'N2' xn2c
  795. 'NATU' 'DISCRET') 'ET'
  796. ('MANUEL' 'CHPO' MAILCR 1 'N2' xn2
  797. 'NATU' 'DISCRET') ;
  798.  
  799. XN = XH21 'ET' XH2O1 'ET' XO21 'ET' XN21 ;
  800. **** Mass Fractions
  801. MMOL = ('MANUEL' 'CHPO' ('DOMA' MDOMTOT 'CENTRE') 1 'H2' mH2
  802. 'NATURE' 'DISCRET') 'ET'
  803. ('MANUEL' 'CHPO' ('DOMA' MDOMTOT 'CENTRE') 1 'O2' mO2
  804. 'NATURE' 'DISCRET') 'ET'
  805. ('MANUEL' 'CHPO' ('DOMA' MDOMTOT 'CENTRE') 1 'H2O' mH2O
  806. 'NATURE' 'DISCRET') 'ET'
  807. ('MANUEL' 'CHPO' ('DOMA' MDOMTOT 'CENTRE') 1 'N2' mN2
  808. 'NATURE' 'DISCRET') ;
  809.  
  810. MTOT = 'PSCAL' MMOL XN ('MOTS' 'H2' 'O2' 'H2O' 'N2')
  811. ('MOTS' 'H2' 'O2' 'H2O' 'N2') ;
  812.  
  813. YH21 = (XH21 '*' mH2) '/' MTOT ;
  814. YO21 = (XO21 '*' mO2) '/' MTOT ;
  815. YN21 = (XN21 '*' mN2) '/' MTOT ;
  816. YH2O1 = (XH2O1 '*' mH2O) '/' MTOT ;
  817. aaa = 'MAXIMUM' (YH21) ;
  818. *----------------------------------------------
  819. * Burned gas
  820. * First we find how much of the burned gas
  821. * produces using 1 mole of unburned gas
  822. *----------------------------------------------
  823. CHUN = 'MANUEL' 'CHPO' MAILC 1 'SCAL' 1.0D0 'NATU' 'DISCRET' ;
  824. H2MAG = (0.5 '*' ('EXCO' 'H2' XN)) 'MASQUE' 'SUPERIEUR'
  825. ('EXCO' 'O2' XN) ;
  826. O2MAG = CHUN '-' H2MAG ;
  827.  
  828. XO22a = 'MANUEL' 'CHPO' MAILC 1 'O2' zero ;
  829. XH22a = XH21 '-' ('NOMC' 'H2' (2.0 '*' (XO21 '-' XO22a))) ;
  830.  
  831. XO22a = XO22a ;
  832. XH22a = XH22a ;
  833.  
  834. XH22b = 'MANUEL' 'CHPO' MAILC 1 'H2' zero ;
  835. XO22b = XO21 '-' ('NOMC' 'O2' (0.5 '*' (XH21 '-' XH22b))) ;
  836.  
  837. XH22 = (XH22a '*' H2MAG) '+' (XH22b '*' O2MAG) ;
  838. XO22 = (XO22a '*' H2MAG) '+' (XO22b '*' O2MAG) ;
  839. XH2O2 = XH2O1 '+' ('NOMC' 'H2O' (2 '*' (XO21 '-' XO22))) ;
  840. XN22 = XN21 ;
  841. *---------------------------------------------------
  842. * Verifying that mtot2 = mtot
  843. *---------------------------------------------------
  844. MTOT2 = 'PSCAL' MMOL (XH22 '+' XO22 '+' XH2O2 '+' XN22)
  845. ('MOTS' 'H2' 'O2' 'H2O' 'N2')
  846. ('MOTS' 'H2' 'O2' 'H2O' 'N2') ;
  847.  
  848. 'SI' (('MAXIMUM' (mtot2 '-' mtot) 'ABS') '>' zero) ;
  849. 'MESSAGE' 'problem1' ;
  850. 'FINSI' ;
  851. ***** xtot2 = mole of burned gas per mole of unburned gas
  852. xtot2 = 'PSCAL' (XH22 '+' XO22 '+' XH2O2 '+' XN22)
  853. CHUN ('MOTS' 'H2' 'O2' 'H2O' 'N2')
  854. ('MOTS' 'SCAL' 'SCAL' 'SCAL' 'SCAL') ;
  855. ***** X now is the real molar fractions
  856. XH22 = XH22 '/' xtot2 ;
  857. XO22 = XO22 '/' xtot2 ;
  858. XH2O2 = XH2O2 '/' xtot2 ;
  859. XN22 = XN22 '/' xtot2 ;
  860.  
  861. xtot3 = 'PSCAL' (XH22 '+' XO22 '+' XH2O2 '+' XN22)
  862. CHUN ('MOTS' 'H2' 'O2' 'H2O' 'N2')
  863. ('MOTS' 'SCAL' 'SCAL' 'SCAL' 'SCAL') ;
  864.  
  865. 'SI' (('MAXIMUM' (xtot3 '-' 1) 'ABS') '>' zero) ;
  866. 'MESSAGE' 'problem2' ;
  867. 'FINSI' ;
  868. **** mtot2 = weight of 1 mole of burned gas
  869. MTOT2 = 'PSCAL' MMOL (XH22 '+' XO22 '+' XH2O2 '+' XN22)
  870. ('MOTS' 'H2' 'O2' 'H2O' 'N2')
  871. ('MOTS' 'H2' 'O2' 'H2O' 'N2') ;
  872. **** Mass fractions of burned gas after complete combustion
  873. YH22 = (XH22 '*' MH2) '/' MTOT2 ;
  874. YO22 = (XO22 '*' MO2) '/' MTOT2 ;
  875. YN22 = (XN22 '*' MN2) '/' MTOT2 ;
  876. YH2O2 = (XH2O2 '*' MH2O) '/' MTOT2 ;
  877. *---------------------------------------------
  878. * Conservative variables
  879. *---------------------------------------------
  880. RINI = (('NOMC' 'SCAL' yh21) '*' (PGAZ . 'H2' . 'R')) '+'
  881. (('NOMC' 'SCAL' yo21) '*' (PGAZ . 'O2' . 'R')) '+'
  882. (('NOMC' 'SCAL' yh2o1) '*' (PGAZ . 'H2O' . 'R')) '+'
  883. (('NOMC' 'SCAL' yn21) '*' (PGAZ . 'N2' . 'R')) ;
  884.  
  885. RN = PINI '/' (RINI '*' TINI) ;
  886. YN = YH21 '+' YO21 '+' YH2O1 ;
  887.  
  888. GN RETN RYN = CONS RN WINI PINI YN MDOMTOT PGAZ ;
  889. *--------------------------------------
  890. * Passive scalars
  891. *--------------------------------------
  892. YININ = 'MANUEL' 'CHPO' MAILC 1 'H2' aaa 'NATU' 'DISCRET' ;
  893. YFINN = 'MANUEL' 'CHPO' MAILC 1 'H2' zero 'NATU' 'DISCRET' ;
  894. K0N = ('MANUEL' 'CHPO' MAILCI 1 'SCAL' K0IG
  895. 'NATU' 'DISCRET') 'ET'
  896. ('MANUEL' 'CHPO' MAILC2 1 'SCAL' K0IN
  897. 'NATU' 'DISCRET') 'ET'
  898. ('MANUEL' 'CHPO' MAILC3 1 'SCAL' K03
  899. 'NATU' 'DISCRET') ;
  900. *---------------------------------------
  901. RSN = RN '*' (('NOMC' 'H2IN' YININ 'NATU' 'DISCRET') 'ET'
  902. ('NOMC' 'H2FI' YFINN 'NATU' 'DISCRET') 'ET'
  903. ('NOMC' 'K0' K0N 'NATU' 'DISCRET')) ;
  904. *-------------------
  905. ***** Verification
  906. *-------------------
  907. VN P T Y S GAMN = 'PRIM' 'PERFTEMP' PGAZ RN GN RETN RYN RSN ;
  908. *-----------------------
  909. PCEL = 'MAXIMUM' PINI ;
  910. TCEL = 'MAXIMUM' TINI ;
  911. 'SI'(('MAXIMUM' ((P '-' PINI) '/' PCEL) 'ABS') '>' (zero '*' 10.0)) ;
  912. 'MESSAGE' 'problem3' ;
  913. 'LISTE' ('MAXIMUM' ((P '-' PINI) '/' PCEL) 'ABS') ;
  914. 'FINSI' ;
  915. 'SI'(('MAXIMUM' ((T '-' TINI) '/' TCEL) 'ABS') '>' (zero '*' 10.0)) ;
  916. 'MESSAGE' 'problem4' ;
  917. 'LISTE' ('MAXIMUM' ((T '-' TINI) '/' TCEL) 'ABS') ;
  918. 'FINSI' ;
  919. 'SI' (('MAXIMUM' VN 'ABS') '>' zero) ;
  920. 'MESSAGE' 'problem5' ;
  921. 'LISTE' ('MAXIMUM' VN 'ABS') ;
  922. 'FINSI' ;
  923. 'SI'(('MAXIMUM' (Y '-' YN) 'ABS') '>' zero) ;
  924. 'MESSAGE' 'problem6' ;
  925. 'LISTE' ('MAXIMUM' (Y '-' YN) 'ABS') ;
  926. 'FINSI' ;
  927. *--------------------------------------
  928. * Graphics
  929. *--------------------------------------
  930. 'SI' GRAPH ;
  931. CHM_TN = 'KCHA' MDOMTOT 'CHAM' TINI ;
  932. CHM_RN = 'KCHA' MDOMTOT 'CHAM' RN ;
  933. CHM_PN = 'KCHA' MDOMTOT 'CHAM' PINI ;
  934. CHM_VN = 'KCHA' MDOMTOT 'CHAM' WINI ;
  935. CHM_H2 = 'KCHA' MDOMTOT 'CHAM' YN ;
  936. CHM_YIN = 'KCHA' MDOMTOT 'CHAM' YININ ;
  937. CHM_YFI = 'KCHA' MDOMTOT 'CHAM' YFINN ;
  938. CHM_K0 = 'KCHA' MDOMTOT 'CHAM' K0N ;
  939. 'TRACER' CHM_TN MDOMTOT
  940. 'TITR' ('CHAINE' 'Temperature at t=' 0.0) ;
  941. 'TRACER' CHM_RN MDOMTOT
  942. 'TITR' ('CHAINE' 'RN at t=' 0.0) ;
  943. 'TRACER' CHM_PN MDOMTOT
  944. 'TITR' ('CHAINE' 'PN at t=' 0.0) ;
  945. 'TRACER' CHM_VN MDOMTOT
  946. 'TITR' ('CHAINE' 'VN at t=' 0.0) ;
  947. 'TRACER' CHM_H2 MDOMTOT
  948. 'TITR' ('CHAINE' 'H2 at t=' 0.0) ;
  949. 'TRACER' CHM_YIN MDOMTOT
  950. 'TITR' ('CHAINE' 'YIN at t=' 0.0) ;
  951. 'TRACER' CHM_YFI MDOMTOT
  952. 'TITR' ('CHAINE' 'YFI at t=' 0.0) ;
  953. 'TRACER' CHM_K0 MDOMTOT
  954. 'TITR' ('CHAINE' 'K0 at t=' 0.0) ;
  955. 'FINSI' ;
  956.  
  957.  
  958. *-----------------------------------------------
  959. * Parameters for the computation
  960. *-----------------------------------------------
  961. *** Upwind scheme
  962. METO = 'SS' ;
  963. **** Iterations
  964. NITER = 100 ;
  965. **** Final time (no restriction)
  966. TFINAL = 10000.1 ;
  967. **** Safety factor for the time step
  968. SAFFAC = 0.7 ;
  969. *** Second order ?
  970. LOGSO = VRAI ;
  971. LOGSO = FAUX ;
  972. *** EPS_CC '-' epsilon in CREBCOM criterion
  973. EPS_CC = 0.5 ;
  974. **** "explosive" initial conditions?
  975. LOGEXP = VRAI ;
  976. LOGEXP = FAUX ;
  977. *** Are there any Boundary conditions
  978. LOGBC = VRAI ;
  979. *-------------------------------
  980. * Time intervals for the output
  981. *-------------------------------
  982. LISTT = 'PROG' 4.5 ;
  983. *** Mesh size
  984. DELTAXN = ('DOMA' MDOMTOT 'VOLUME') '**' 0.5 ;
  985. DELX = 'MAXIMUM' DELTAXN ;
  986. *-------------------------------------
  987. TABLIM = 'TABLE' ;
  988. pwin = (('MAXIMUM' RN) '*' 9.8) '*' 4.668 ;
  989. TABLIM . 'CHPOUT' =
  990. 'MANUEL' 'CHPO' ('DOMA' MFRONTH 'CENTRE') 1 'PN' (pg '-' pwin) ;
  991. TABLIM . 'H' = 50.0D0 ;
  992. TABLIM . 'TNUL' =
  993. 'MANUEL' 'CHPO' ('DOMA' MDOMTOT 'CENTRE') 1 'SCAL' tg ;
  994. TABLIM . 'FREQ' = 1 ;
  995. *----- gravity ----------
  996. TABLIM . 'GRAV' = 'MANUEL' 'CHPO' ('DOMA' MDOMTOT 'CENTRE')
  997. 'UX' 0.0D0 'UY' (-9.8D0) ;
  998. *----------------------------------------------
  999. * Table for evolution of the variables with time
  1000. * at the fixed points
  1001. *----------------------------------------------
  1002. TABC = 'TABLE' 'CAPTEUR' ;
  1003. TABC . 'LPOINTS' = PCEL1 'ET' PCEL2 'ET' PCEL3 'ET' PCEL4
  1004. 'ET' PCEL5 'ET' PCEL6 'ET' PCEL7 'ET' PCEL8 'ET' PCEL9 ;
  1005.  
  1006. TABC . 'LTPS' = 'PROG';
  1007. TABC . 'NOMC' = 'MOTS' 'C1' 'C2' 'C3' 'C4' 'C5' 'C6'
  1008. 'C7' 'C8' 'C9' ;
  1009.  
  1010. TABC . 'COMP' = 'MOTS' 'PN' 'TN' ;
  1011. TABC . 'FREQ' = 10 ;
  1012. MSLIN2 = 'DOMA' MDLIN2 'SOMMET' ;
  1013. bnb = 'NBEL' MSLIN2 ;
  1014. VOLGOR = DX1 '*' DX1 '*' bnb ;
  1015. *-----------------------------------------------
  1016. * In MDOM1 we 'burn' the gas;
  1017. * In order to do so we shall apply the
  1018. * operator 'FLAM' in MDOM1 with eps=0
  1019. * and DELTAT >> DELTATC
  1020. *----------------------------------------------
  1021. YN = RYN '/' RN ;
  1022. SN = RSN '/' RN ;
  1023. K0N = 'EXCO' 'K0' SN ;
  1024. YININ = 'EXCO' 'H2IN' SN 'H2' ;
  1025. YFINN = 'EXCO' 'H2FI' SN 'H2' ;
  1026.  
  1027. DELTATC = 0.25 '*' ('MINIMUM' (DELTAXN '/' K0N)) ;
  1028. LMOT1 = 'MOTS' 'H2' 'O2' 'H2O' ;
  1029. **** Stocheom. coefficients
  1030. LCOEF = 'PROG' 1.0 0.5 -1.0 ;
  1031. *-------------------------------------------
  1032. * This to activate in case of constant volume
  1033. * combustion
  1034. *-------------------------------------------
  1035. 'SI' LOGEXP ;
  1036. DELTARE DELTARY = 'FLAM' 'CREBCOM2' MDOMI PGAZ LMOT1 LCOEF
  1037. ('REDU' RN MAILCI) ('REDU' YN MAILCI)
  1038. ('REDU' YININ MAILCI) ('REDU' YFINN MAILCI)
  1039. ('REDU' K0N MAILCI) ('REDU' DELTAXN MAILCI)
  1040. 0.0 (1D10 '*' DELTATC) zero ;
  1041.  
  1042. RYN = RYN '+' DELTARY ;
  1043. YN = RYN '/' RN ;
  1044. RETN = RETN '+' DELTARE ;
  1045. 'FINSI' ;
  1046. *-----------------------------------------------
  1047. * Names of the components
  1048. *-----------------------------------------------
  1049. LISTINCO = 'MOTS' 'RN' 'RUX' 'RUY' 'RETN' 'H2' 'O2'
  1050. 'H2O' 'H2IN' 'H2FI' 'K0' ;
  1051. ****** names of the primitive variables
  1052. LISTINCP = 'MOTS' 'RN' 'UX' 'UY' 'PN' 'H2' 'O2'
  1053. 'H2O' 'H2IN' 'H2FI' 'K0' ;
  1054. *--------------------------------------------
  1055. LMOT111 = 'MOTS' 'SCAL' ;
  1056. GRADR CCC COEFSCAL = 'PENT' MDOMTOT 'CENTRE'
  1057. 'EULESCAL' 'NOLIMITE' LMOT111 RN ;
  1058.  
  1059. LMOT2 = 'MOTS' 'UX' 'UY' ;
  1060. GRADV CCC COEFVECT = 'PENT' MDOMTOT 'CENTRE'
  1061. 'EULEVECT' 'NOLIMITE' LMOT2 GN ;
  1062. *--------------------------------------------
  1063. * Volumes of the rooms ;
  1064. *--------------------------------------------
  1065. VV2 = 'DOMA' MDSEC 'VOLUME' ;
  1066. CHUN = ('MANUEL' 'CHPO' MAILC2 1 'SCAL' 1.0 'NATU' 'DISCRET') ;
  1067. VV2S = ('XTY' CHUN VV2 ('MOTS' 'SCAL')
  1068. ('MOTS' 'SCAL')) ;
  1069. *-------------------------------
  1070. VV3 = 'DOMA' MDTHIRD 'VOLUME' ;
  1071. CHUN = ('MANUEL' 'CHPO' MAILC3 1 'SCAL' 1.0 'NATU' 'DISCRET') ;
  1072. VV3S = ('XTY' CHUN VV3 ('MOTS' 'SCAL')
  1073. ('MOTS' 'SCAL')) ;
  1074. *-------------------------------------------
  1075. LISTPS2 = 'PROG' ;
  1076. LISTPS3 = 'PROG' ;
  1077. LISTTS2 = 'PROG' ;
  1078. LISTTS2 = 'PROG' ;
  1079. *---- 'LISTE' for the discharge at the coridor
  1080. LISCOR1 = 'PROG' ;
  1081. *---- 'LISTE' for the averaged velocity at the coridor
  1082. LISCOR2 = 'PROG' ;
  1083. *---- 'LISTE' for the discharge at the vent
  1084. LISVEN1 = 'PROG' ;
  1085. *---- 'LISTE' for the averaged velocity at the vent
  1086. LISVEN2 = 'PROG' ;
  1087. *--------------------------------------------
  1088. TPS = 0.0 ;
  1089. *------------------------------------------
  1090. * Chemical time step
  1091. *------------------------------------------
  1092. DT_CHEM = SAFFAC '*' DELTATC ;
  1093. *-------------------------------------------
  1094. **** Temporal loop
  1095. *-------------------------------------------
  1096. 'MESSAGE' ;
  1097. 'MESSAGE' ('CHAINE' 'Methode = ' METO) ;
  1098. 'MESSAGE' ('CHAINE' 'SAFFAC = ' SAFFAC) ;
  1099. 'MESSAGE' ;
  1100. *-----------------------------------
  1101. 'REPETER' BLG ('DIME' LISTT) ;
  1102. *----------------------------------
  1103. TFINAL = 'EXTRAIRE' &BLG LISTT ;
  1104. *----------------------------------
  1105. VN PN TN YN SN GAMMAN = 'PRIM' 'PERFTEMP' PGAZ RN GN RETN RYN RSN ;
  1106.  
  1107. TNM1 = 'COPIER' TN ;
  1108.  
  1109. 'TEMPS' 'ZERO' ;
  1110. 'REPETER' BL1 NITER ;
  1111. *
  1112. **** Primitive variables
  1113. *
  1114. FREQC = TABC.'FREQ' ;
  1115. 'SI' (((&BL1 '/' FREQC) '*' FREQC) 'EGA' &BL1) ;
  1116. ******* The "coridor" **********************
  1117. RL2 = 'REDU' RN MSLIN2 ;
  1118. GL2 = 'REDU' GN MSLIN2 ;
  1119. GLX2 = 'EXCO' 'UX' GL2 ;
  1120. CHUN = ('MANUEL' 'CHPO' MSLIN2 1
  1121. 'SCAL' (DX1) 'NATU' 'DISCRET') ;
  1122. *------- rashod discharge ----------------
  1123. GLXAV = ('XTY' CHUN GLX2 ('MOTS' 'SCAL')
  1124. ('MOTS' 'SCAL')) ;
  1125. GLXAV = GLXAV '/' H1 ;
  1126. LISCOR1 = LISCOR1 'ET' ('PROG' GLXAV) ;
  1127. *---- redifining CHUN -------------------
  1128. CHUN = ('MANUEL' 'CHPO' MSLIN2 1
  1129. 'SCAL' (DX1 '*' DX1) 'NATU' 'DISCRET') ;
  1130. *------- averaged density ----------------
  1131. RLAV = ('XTY' CHUN RL2 ('MOTS' 'SCAL')
  1132. ('MOTS' 'SCAL')) ;
  1133. RLAV = RLAV '/' VOLGOR ;
  1134. *------- averaged momentum ---------------
  1135. GLXAV = ('XTY' CHUN GLX2 ('MOTS' 'SCAL')
  1136. ('MOTS' 'SCAL')) ;
  1137. GLXAV = GLXAV '/' VOLGOR ;
  1138. *-----------------------------------------
  1139. * UXL = GLXAV '/' RLAV ;
  1140. CHVIT = GLX2 '*' ('INVERSE' RL2) ;
  1141. UXL = 'MAXIMUM' CHVIT ;
  1142. LISCOR2 = LISCOR2 'ET' ('PROG' UXL) ;
  1143. ******* The second room **********************
  1144. *----------------------------------------------------
  1145. * Computation of averaged pressure and temperature
  1146. *----------------------------------------------------
  1147. RN2 = 'REDU' RN MAILC2 ;
  1148. GN2 = 'REDU' GN MAILC2 ;
  1149. RETN2 = 'REDU' RETN MAILC2 ;
  1150. RYN2 = 'REDU' RYN MAILC2 ;
  1151. RSN2 = 'REDU' RSN MAILC2 ;
  1152. *--- we average the conservative data
  1153. RN2S = ('XTY' RN2 VV2 ('MOTS' 'SCAL')
  1154. ('MOTS' 'SCAL')) ;
  1155. RN2S = RN2S '/' VV2S ;
  1156. *----------------------
  1157. RETN2S = ('XTY' RETN2 VV2 ('MOTS' 'SCAL')
  1158. ('MOTS' 'SCAL')) ;
  1159. RETN2S = RETN2S '/' VV2S ;
  1160. *-----------------------
  1161. GNX2 = 'EXCO' 'UX' GN2 'UX' ;
  1162. GNY2 = 'EXCO' 'UY' GN2 'UY' ;
  1163. *-------------------
  1164. GNX2S = ('XTY' GNX2 VV2 ('MOTS' 'SCAL')
  1165. ('MOTS' 'SCAL')) ;
  1166. GNX2S = GNX2S '/' VV2S ;
  1167. *-------------------
  1168. GNY2S = ('XTY' GNY2 VV2 ('MOTS' 'SCAL')
  1169. ('MOTS' 'SCAL')) ;
  1170. GNY2S = GNY2S '/' VV2S ;
  1171. *--------------------
  1172. RYNH2 = 'EXCO' 'H2' RYN2 'H2' ;
  1173. RYNO2 = 'EXCO' 'O2' RYN2 'O2' ;
  1174. RYNH2O = 'EXCO' 'H2O' RYN2 'H2O' ;
  1175. *-------------------
  1176. RYH2S = ('XTY' RYNH2 VV2 ('MOTS' 'H2')
  1177. ('MOTS' 'SCAL')) ;
  1178. RYH2S = RYH2S '/' VV2S ;
  1179. *-------------------
  1180. RYO2S = ('XTY' RYNO2 VV2 ('MOTS' 'O2')
  1181. ('MOTS' 'SCAL')) ;
  1182. RYO2S = RYO2S '/' VV2S ;
  1183. *-------------------
  1184. RYHO2S = ('XTY' RYNH2O VV2 ('MOTS' 'H2O')
  1185. ('MOTS' 'SCAL')) ;
  1186. RYHO2S = RYHO2S '/' VV2S ;
  1187. *--------------------------------------
  1188. *--------------------------------------
  1189. R2S = ('MANUEL' 'CHPO' MAILCI 1 'SCAL' RN2S 'NATU' 'DISCRET') ;
  1190. G2S = ('MANUEL' 'CHPO' MAILCI 1 'UX' GNX2S 'NATU' 'DISCRET') 'ET'
  1191. ('MANUEL' 'CHPO' MAILCI 1 'UY' GNY2S 'NATU' 'DISCRET') ;
  1192. RET2S = ('MANUEL' 'CHPO' MAILCI 1 'SCAL' RETN2S 'NATU' 'DISCRET') ;
  1193. RY2S = ('MANUEL' 'CHPO' MAILCI 1 'H2' RYH2S 'NATU' 'DISCRET') 'ET'
  1194. ('MANUEL' 'CHPO' MAILCI 1 'O2' RYO2S 'NATU' 'DISCRET') 'ET'
  1195. ('MANUEL' 'CHPO' MAILCI 1 'H2O' RYHO2S 'NATU' 'DISCRET') ;
  1196.  
  1197. RS2S = ('MANUEL' 'CHPO' MAILCI 1 'H2IN' (aaa) 'NATU' 'DISCRET') 'ET'
  1198. ('MANUEL' 'CHPO' MAILCI 1 'H2FI' zero 'NATU' 'DISCRET') 'ET'
  1199. ('MANUEL' 'CHPO' MAILCI 1 'K0' K0IN 'NATU' 'DISCRET') ;
  1200. *--------------------------------------------
  1201. VS PS TS YS SS GAMS = 'PRIM' 'PERFTEMP' PGAZ R2S G2S RET2S RY2S RS2S ;
  1202. PN2S = 'MAXIMUM' PS ;
  1203. TN2S = 'MAXIMUM' TS ;
  1204. *-------------------------------
  1205. LISTPS2 = LISTPS2 'ET' ('PROG' PN2S) ;
  1206. LISTTS2 = LISTTS2 'ET' ('PROG' TN2S) ;
  1207. *-------------------------------------------------
  1208. ******** IN THE BIGGEST ROOM ********************
  1209. RN2 = 'REDU' RN MAILC3 ;
  1210. GN2 = 'REDU' GN MAILC3 ;
  1211. RETN2 = 'REDU' RETN MAILC3 ;
  1212. RYN2 = 'REDU' RYN MAILC3 ;
  1213. RSN2 = 'REDU' RSN MAILC3 ;
  1214. *--- we average the conservative data
  1215. RN2S = ('XTY' RN2 VV3 ('MOTS' 'SCAL')
  1216. ('MOTS' 'SCAL')) ;
  1217. RN2S = RN2S '/' VV3S ;
  1218. *----------------------
  1219. RETN2S = ('XTY' RETN2 VV3 ('MOTS' 'SCAL')
  1220. ('MOTS' 'SCAL')) ;
  1221. RETN2S = RETN2S '/' VV3S ;
  1222. *-----------------------
  1223. GNX2 = 'EXCO' 'UX' GN2 'UX' ;
  1224. GNY2 = 'EXCO' 'UY' GN2 'UY' ;
  1225. *-------------------
  1226. GNX2S = ('XTY' GNX2 VV3 ('MOTS' 'SCAL')
  1227. ('MOTS' 'SCAL')) ;
  1228. GNX2S = GNX2S '/' VV3S ;
  1229. *-------------------
  1230. GNY2S = ('XTY' GNY2 VV3 ('MOTS' 'SCAL')
  1231. ('MOTS' 'SCAL')) ;
  1232. GNY2S = GNY2S '/' VV3S ;
  1233. *--------------------
  1234. RYNH2 = 'EXCO' 'H2' RYN2 'H2' ;
  1235. RYNO2 = 'EXCO' 'O2' RYN2 'O2' ;
  1236. RYNH2O = 'EXCO' 'H2O' RYN2 'H2O' ;
  1237. *-------------------
  1238. RYH2S = ('XTY' RYNH2 VV3 ('MOTS' 'H2')
  1239. ('MOTS' 'SCAL')) ;
  1240. RYH2S = RYH2S '/' VV3S ;
  1241. *-------------------
  1242. RYO2S = ('XTY' RYNO2 VV3 ('MOTS' 'O2')
  1243. ('MOTS' 'SCAL')) ;
  1244. RYO2S = RYO2S '/' VV3S ;
  1245. *-------------------
  1246. RYHO2S = ('XTY' RYNH2O VV3 ('MOTS' 'H2O')
  1247. ('MOTS' 'SCAL')) ;
  1248. RYHO2S = RYHO2S '/' VV3S ;
  1249. *--------------------------------------
  1250. *--------------------------------------
  1251. R2S = ('MANUEL' 'CHPO' MAILCI 1 'SCAL' RN2S 'NATU' 'DISCRET') ;
  1252. G2S = ('MANUEL' 'CHPO' MAILCI 1 'UX' GNX2S 'NATU' 'DISCRET') 'ET'
  1253. ('MANUEL' 'CHPO' MAILCI 1 'UY' GNY2S 'NATU' 'DISCRET') ;
  1254. RET2S = ('MANUEL' 'CHPO' MAILCI 1 'SCAL' RETN2S 'NATU' 'DISCRET') ;
  1255. RY2S = ('MANUEL' 'CHPO' MAILCI 1 'H2' RYH2S 'NATU' 'DISCRET') 'ET'
  1256. ('MANUEL' 'CHPO' MAILCI 1 'O2' RYO2S 'NATU' 'DISCRET') 'ET'
  1257. ('MANUEL' 'CHPO' MAILCI 1 'H2O' RYHO2S 'NATU' 'DISCRET') ;
  1258.  
  1259. RS2S = ('MANUEL' 'CHPO' MAILCI 1 'H2IN' (aaa) 'NATU' 'DISCRET') 'ET'
  1260. ('MANUEL' 'CHPO' MAILCI 1 'H2FI' zero 'NATU' 'DISCRET') 'ET'
  1261. ('MANUEL' 'CHPO' MAILCI 1 'K0' K0IN 'NATU' 'DISCRET') ;
  1262. *--------------------------------------------
  1263. VS PS TS YS SS GAMS = 'PRIM' 'PERFTEMP' PGAZ R2S G2S RET2S RY2S RS2S ;
  1264. PN2S = 'MAXIMUM' PS ;
  1265. TN2S = 'MAXIMUM' TS ;
  1266. *-------------------------------------------------
  1267. LISTPS3 = LISTPS3 'ET' ('PROG' PN2S) ;
  1268. LISTTS3 = LISTTS3 'ET' ('PROG' TN2S) ;
  1269. 'FINSI' ;
  1270. *--------------------------------------------------
  1271. *-------------------------------------------
  1272. VN PN TN YN SN GAMMAN = 'PRIM' 'PERFTEMP' PGAZ RN GN RETN RYN RSN
  1273. TNM1 ;
  1274. *--------------------------------------------
  1275. * Boundary conditions
  1276. *--------------------------------------------
  1277. *** find new CP and CV *******
  1278. * CP1 CV1 = CPCV tg PGAZ ;
  1279. *------------------------------------------
  1280. 'SI' LOGBC ;
  1281. 'SI' (&BLG 'EGA' 1) ;
  1282. SHIN = 'EXCO' SN 'H2IN' ;
  1283. SHFI = 'EXCO' SN 'H2FI' ;
  1284. SHK0 = 'EXCO' SN 'K0' ;
  1285. RCHLIM RCHRES = 'KONV' 'VF' 'PERFMULT' 'CLIM' 'RESI'
  1286. MDOMTOT MFRONTH PGAZB LISTINCO LISTINCP
  1287. RN VN PN YN SHIN SHFI SHK0
  1288. (TABLIM . 'CHPOUT') 'OUTP' ;
  1289. 'FINSI' ;
  1290. *------------------------------------
  1291. MAILLIM = 'EXTRAIRE' RCHLIM 'MAILLAGE' ;
  1292. MAIL111 = 'EXTRAIRE' RCHRES 'MAILLAGE' ;
  1293. *------------------------------------
  1294. NBB = 'NBEL' MAIL111 ;
  1295. TTT = 'REDU' TN MAIL111 ;
  1296. UNIF = 'MANUEL' CHPO ('DOMA' MDOMTOT 'CENTRE')
  1297. 1 'SCAL' 1.0 ;
  1298. UNI1 = 'REDU' UNIF MAIL111 ;
  1299. NUNI = UNI1 '*' (1.0 '/' NBB) ;
  1300. **** computing average temperature at the boundary
  1301. TAV = 'XTY' TTT NUNI ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  1302. *** find new CP and CV *******
  1303. CPN CVN = CPCV TAV PGAZ ;
  1304. *** Updating CP and CV for the boundary conditions
  1305. PGAZB . 'CP' . 'H2 ' = CPN . 'H2' ;
  1306. PGAZB . 'CP' . 'H2O ' = CPN . 'H2O' ;
  1307. PGAZB . 'CP' . 'O2 ' = CPN . 'O2' ;
  1308. PGAZB . 'CP' . 'N2 ' = CPN . 'N2' ;
  1309. *----------------------------------------
  1310. PGAZB . 'CV' . 'H2 ' = CVN . 'H2' ;
  1311. PGAZB . 'CV' . 'H2O ' = CVN . 'H2O' ;
  1312. PGAZB . 'CV' . 'O2 ' = CVN . 'O2' ;
  1313. PGAZB . 'CV' . 'N2 ' = CVN . 'N2' ;
  1314. * 'FINSI' ;
  1315. *--------------------------------
  1316. SHIN = 'EXCO' SN 'H2IN' ;
  1317. SHFI = 'EXCO' SN 'H2FI' ;
  1318. SHK0 = 'EXCO' SN 'K0' ;
  1319. RCHLIM RCHRES = 'KONV' 'VF' 'PERFMULT' 'CLIM' 'RESI'
  1320. MDOMTOT MFRONTH PGAZB LISTINCO LISTINCP
  1321. RN VN PN YN SHIN SHFI SHK0
  1322. (TABLIM . 'CHPOUT') 'OUTP' ;
  1323. MAILLIM = 'EXTRAIRE' RCHLIM 'MAILLAGE' ;
  1324. MAIL111 = 'EXTRAIRE' RCHRES 'MAILLAGE' ;
  1325. *--------------------------------------------
  1326. * We compute the debit et vitesse
  1327. *--------------------------------------------
  1328. 'SI' (((&BL1 '/' FREQC) '*' FREQC) 'EGA' &BL1) ;
  1329. VOLUP = 'REDU' ('DOMA' MDOMTOT 'VOLUME')
  1330. MAIL111 ;
  1331. RLIM1 = 'EXCO' 'RN' RCHRES ;
  1332. DEBUP = 'XTY' VOLUP RLIM1 ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  1333. DEBUP = (DEBUP '/' LW) '*' (-1.0) ;
  1334. LISVEN1 = LISVEN1 'ET' ('PROG' DEBUP) ;
  1335. *--------------------------------------------
  1336. RNUP = 'REDU' RN MAIL111 ;
  1337. GNUP = 'REDU' GN MAIL111 ;
  1338. GXUP = 'EXCO' 'UY' GNUP ;
  1339. CUN = ('MANUEL' 'CHPO' MAIL111 1
  1340. 'SCAL' 1.0D0 'NATU' 'DISCRET') ;
  1341. *------------------------
  1342. GXUPS = 'XTY' GXUP VOLUP ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  1343. RNUPS = 'XTY' RNUP VOLUP ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  1344. VITUP = GXUPS '/' RNUPS ;
  1345. LISVEN2 = LISVEN2 'ET' ('PROG' VITUP) ;
  1346. 'FINSI' ;
  1347. *--------------------------------------------
  1348. 'FINSI' ;
  1349. *------------------------------------
  1350. *--------------------------------
  1351. TNM1 = 'COPIER' TN ;
  1352. 'SI' LOGSO ;
  1353. GRADR ALR = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  1354. ('MOTS' 'SCAL') RN 'GRADGEO' COEFSCAL ;
  1355.  
  1356. GRADP ALP = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  1357. ('MOTS' 'SCAL') PN 'GRADGEO' COEFSCAL ;
  1358.  
  1359. GRADV ALV = 'PENT' MDOMTOT 'CENTRE' 'EULEVECT' 'LIMITEUR'
  1360. ('MOTS' 'UX' 'UY') VN 'GRADGEO' COEFVECT ;
  1361.  
  1362. GRADY ALY = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  1363. ('MOTS' 'H2' 'O2' 'H2O') YN 'GRADGEO' COEFSCAL ;
  1364.  
  1365. GRADS ALS = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  1366. ('MOTS' 'H2IN' 'H2FI' 'K0') SN 'GRADGEO' COEFSCAL ;
  1367.  
  1368. ROF VITF PF YF SF = 'PRET' 'PERFTEMP' 2 1
  1369. MDOMTOT PGAZ
  1370. RN GRADR ALR
  1371. VN GRADV ALV
  1372. PN GRADP ALP
  1373. YN GRADY ALY
  1374. SN GRADS ALS ;
  1375. 'SINON' ;
  1376.  
  1377. ROF VITF PF YF SF = 'PRET' 'PERFTEMP' 1 1
  1378. MDOMTOT PGAZ
  1379. RN
  1380. VN
  1381. PN
  1382. YN
  1383. SN ;
  1384. 'FINSI' ;
  1385. *-----------------------------------------------
  1386. 'SI' LOGBC ;
  1387. RESIDU DELTAT = 'KONV' 'VF' 'PERFTEMP' 'RESI' METO
  1388. MDOMTOT PGAZ LISTINCO ROF VITF PF YF SF MAILLIM ;
  1389. RESIDU = RESIDU 'ET' RCHRES ;
  1390. 'SINON' ;
  1391. RESIDU DELTAT = 'KONV' 'VF' 'PERFTEMP' 'RESI' METO
  1392. MDOMTOT PGAZ LISTINCO ROF VITF PF YF SF ;
  1393. 'FINSI' ;
  1394. *-----------------------------------------------
  1395. DT_CON = SAFFAC '*' DELTAT ;
  1396. *
  1397. **** The time step linked to tps
  1398. *
  1399. DTTPS = (TFINAL '-' TPS) * (1. '+' ZERO) ;
  1400. *
  1401. **** Total time step
  1402. *
  1403. DTMIN = 'MINIMUM' ('PROG' DT_CON DTTPS DT_CHEM ) ;
  1404. *
  1405. **** Increment of the variables (convection)
  1406. *
  1407. RESIDU = DTMIN '*' RESIDU ;
  1408.  
  1409. DRN = 'EXCO' 'RN' RESIDU 'SCAL' ;
  1410. DGN = 'EXCO' ('MOTS' 'RUX' 'RUY') RESIDU ('MOTS' 'UX' 'UY') ;
  1411. DRETN = 'EXCO' 'RETN' RESIDU 'SCAL' ;
  1412. DRYN = 'EXCO' ('MOTS' 'H2' 'O2' 'H2O') RESIDU
  1413. ('MOTS' 'H2' 'O2' 'H2O') ;
  1414. DRSN = 'EXCO' ('MOTS' 'H2IN' 'H2FI' 'K0') RESIDU
  1415. ('MOTS' 'H2IN' 'H2FI' 'K0') ;
  1416.  
  1417.  
  1418. TPS = TPS '+' DTMIN ;
  1419.  
  1420. RN = RN '+' DRN ;
  1421. GN = GN '+' DGN ;
  1422. RETN = RETN '+' DRETN ;
  1423. RYN = RYN '+' DRYN ;
  1424. RSN = RSN '+' DRSN ;
  1425. YN = RYN '/' RN ;
  1426. SN = RSN '/' RN ;
  1427. *
  1428. **** Increment of the variables (chemical source)
  1429. *
  1430. K0N = 'EXCO' 'K0' SN 'SCAL' ;
  1431. YININ = 'EXCO' 'H2IN' SN 'H2' ;
  1432. YFINN = 'EXCO' 'H2FI' SN 'H2' ;
  1433.  
  1434. DRETN DRYN = 'FLAM' 'CREBCOM2' MDOMTOT PGAZ LMOT1 LCOEF RN YN
  1435. YININ YFINN K0N DELTAXN EPS_CC DTMIN (zero '*' 1.0D3) ;
  1436.  
  1437. RYN = RYN '+' DRYN ;
  1438. RETN = RETN '+' DRETN ;
  1439. *---------------------------------------------------
  1440. * Rate of loosing energy due to boundary conditions
  1441. *---------------------------------------------------
  1442. * 'SI' (TPS '>' 3.0) ;
  1443. VN PN TN YN SN GAMMAN = 'PRIM' 'PERFTEMP' PGAZ RN GN RETN RYN RSN ;
  1444. HH = TABLIM . 'H' ;
  1445. PERT = HH '*' (TN '-' (TABLIM . 'TNUL')) ;
  1446. RETN = RETN '-' (DTMIN '*' PERT) ;
  1447. * 'FINSI' ;
  1448. *--------------------------------------------------
  1449. * Gravity forces
  1450. *--------------------------------------------------
  1451. LIMOT1 = 'MOTS' 'SCAL' 'SCAL' ;
  1452. LIMOT2 = 'MOTS' 'UX' 'UY' ;
  1453. LIMOT3 = 'MOTS' 'UX' 'UY' ;
  1454. ROG = RN '*' (TABLIM . 'GRAV') LIMOT1 LIMOT2 LIMOT3 ;
  1455. GN = GN '+' (DTMIN '*' ROG) ;
  1456. ROGU = 'PSCAL' ROG VN LIMOT3 LIMOT2 ;
  1457. RETN = RETN '+' (DTMIN '*' ROGU) ;
  1458. *---------------------------------------------------
  1459. *---------------------------------------------
  1460. * Capturing variables at the capteurs
  1461. *---------------------------------------------
  1462. 'SI' (((&BL1 '/' FREQC) '*' FREQC) 'EGA' &BL1) ;
  1463. CENTOT = 'DOMA' MDOMTOT 'CENTRE';
  1464. PTS = TABC . 'LPOINTS' ;
  1465. ***** M1 is the number of capteurs
  1466. M1 = 'NBEL' PTS ;
  1467.  
  1468. LTPS = TABC . 'LTPS' ;
  1469. NTPS = 'DIME' LTPS ;
  1470. **** N1 is the number of variables captured
  1471. L1 = TABC . 'COMP' ;
  1472. N1 = 'DIME' L1 ;
  1473. * On etudie uniquement la pression
  1474. * peut evoluer par la suite !!!
  1475. LOG1 = 'EXISTE' TABC 'NOMC' ;
  1476. * Initialisation des tables
  1477. 'SI' (NTPS EGA 0 );
  1478. 'REPETER' BOU1 M1;
  1479. **** extract the names of the capteurs
  1480. PT1 = PTS 'POIN' &BOU1;
  1481. 'SI' (LOG1 'ET' (('DIME' (TABC.'NOMC')) 'EGA' M1 )) ;
  1482. CAPI = 'EXTR' (TABC.'NOMC') &BOU1;
  1483. 'SINON' ;
  1484. CAPI = 'CHAINE' 'CAPT' &BOU1;
  1485. 'FINSI';
  1486. PT2 = CENTOT 'POIN' 'PROCHE' PT1;
  1487. 'SI' (&BOU1 'EGA' 1);
  1488. TABC.'RPOINTS' = PT2 ;
  1489. 'SINON';
  1490. TABC.'RPOINTS' = TABC .'RPOINTS' 'ET' PT2;
  1491. 'FINSI';
  1492. TABC . CAPI = 'TABLE';
  1493. 'REPETER' BOU2 N1;
  1494. MOI = EXTR L1 &BOU2 ;
  1495. TABC . CAPI . MOI = 'PROG';
  1496. 'FIN' BOU2;
  1497. 'FIN' BOU1;
  1498. 'FINSI';
  1499. *--------------------------------------------
  1500. 'REPETER' BOU1 M1 ;
  1501. PT1 = TABC.'RPOINTS' 'POIN' &BOU1;
  1502. 'SI' (LOG1 'ET' (('DIME' (TABC.'NOMC')) 'EGA' M1 )) ;
  1503. CAPI = 'EXTR' (TABC.'NOMC') &BOU1;
  1504. 'SINON' ;
  1505. CAPI = 'CHAINE' 'CAPT' &BOU1;
  1506. 'FINSI';
  1507.  
  1508. 'REPETER' BOU2 N1;
  1509. MOI = EXTR L1 &BOU2 ;
  1510. *** captage de la pression
  1511. 'SI' ('EGA' MOI 'PN');
  1512. X1 = 'EXTR' PN 'SCAL' PT1 ;
  1513. * 'LISTE' X1 ;
  1514. TABC . CAPI . MOI = (TABC . CAPI . MOI) 'ET' ('PROG' X1);
  1515. 'FINSI';
  1516. *** captage de temperature
  1517. 'SI' ('EGA' MOI 'TN');
  1518. X1 = 'EXTR' TN 'SCAL' PT1 ;
  1519. TABC . CAPI . MOI = TABC . CAPI . MOI 'ET' ('PROG' X1);
  1520. 'FINSI';
  1521. 'FIN' BOU2;
  1522.  
  1523. 'FIN' BOU1;
  1524. 'FINSI' ;
  1525. *****---- creating listreel of time steps
  1526. 'SI' (((&BL1 '/' FREQC) '*' FREQC) 'EGA' &BL1) ;
  1527. TABC . 'LTPS' = (TABC . 'LTPS') 'ET' ('PROG' TPS);
  1528. 'FINSI' ;
  1529. *---------------------------------------------
  1530. 'SI' (((&BL1 '/' 20) '*' 20) 'EGA' &BL1) ;
  1531. 'MESSAGE' ('CHAINE' 'ITER =' &BL1 ' TPS =' TPS) ;
  1532. 'FINSI' ;
  1533. *-------------------------------------------------------
  1534. 'SI' (TPS '>EG' TFINAL) ;
  1535. 'QUITTER' BL1 ;
  1536. 'FINSI' ;
  1537.  
  1538.  
  1539. 'FIN' BL1 ;
  1540. *------------------------------------
  1541. *-----------------------------------
  1542. 'FIN' BLG ;
  1543. 'TEMPS' ;
  1544. *************************************************
  1545. * Posttreatment *
  1546. *************************************************
  1547. LISTP0 = 'PROG' 10 '*' 100000.0D0 ;
  1548. OVPRES = (TABC . 'C1' . 'PN') '-' LISTP0 ;
  1549. EVERP1 = 'EVOL' 'MANU' 'Niter' (TABC . 'LTPS' ) 'PC1'
  1550. OVPRES ;
  1551. *------------------------------------------------
  1552. LPGOOD = 'PROG' 1.3086 21.753 43.070 41.450 30.604 26.187
  1553. 32.615 43.088 48.922 47.665 ;
  1554.  
  1555. DIFFER = OVPRES '-' LPGOOD ;
  1556.  
  1557. 'SI' (('MAXIMUM' DIFFER) <EG 1.D-3) ;
  1558. 'MESSAGE' ;
  1559. 'MESSAGE' 'OVERPRESSURE IS OK' ;
  1560. 'MESSAGE' ;
  1561. 'SINON' ;
  1562. 'MESSAGE' ;
  1563. 'MESSAGE' 'THERE IS A PROBLEM' ;
  1564. 'MESSAGE' ;
  1565. 'FINSI' ;
  1566.  
  1567. 'FIN' ;
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  

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