Télécharger tube1D_deto_C2H2.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier : tube1D_deto_C2H2.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4. ****************************************************************
  5. **** APPROCHE VF "Cell-Centred Formulation" pour la ****
  6. **** combustion. ****
  7. **** MODELE RDEM ****
  8. **** ****
  9. **** OPERATEURS 'PRIM', PRET, KONV ****
  10. **** ****
  11. **** PROPAGATION D'UNE CJDT DANS UN TUBE ****
  12. **** Cas de l'acetylene ****
  13. **** A. BECCANTINI, SFME/LTMF, 30.07.2010 ****
  14. ****************************************************************
  15. *
  16. * The file is divided into 6 parts
  17. *
  18. * 0) exact solution and procedures
  19. * 1) mesh
  20. * 2) initial conditions and gas properties
  21. * 3) parameters used in the computation
  22. * 4) the main part (where the computation is realised)
  23. * 5) the post-treatment
  24. *
  25. 'OPTION' 'ECHO' 1 'DIME' 2
  26. 'TRAC' 'PSC' ;
  27. GRAPH = VRAI ;
  28. * GRAPH = FAUX ;
  29. * Upwind scheme
  30. METO = 'VLH' ;
  31. * METO = 'SS' ;
  32. * METO = 'AUSMPUP' ;
  33. *
  34. ****************************************************************
  35. ****************************************************************
  36. ************* EXACT SOLUTION AND PROCEDURES ********************
  37. ****************************************************************
  38. ****************************************************************
  39. *
  40. ***** BEGIN EXACT SOLUTION
  41. *
  42. LEXACT = 'PROG'
  43. 0.0 .9300690945091593 3.979039320256561E-12 697580.6326340148
  44. 2563.02106222187 1.0 288819.5707231797 268622.1566190319
  45. 48.64683385104058 .9300690945091593 3.979039320256561E-12
  46. 697580.6326340148 2563.02106222187 1.0 288819.5707231797
  47. 268622.1566190319 97.29366770208105 .9300690945091593
  48. 3.979039320256561E-12 697580.6326340148 2563.02106222187 1.0
  49. 288819.5707231797 268622.1566190319
  50. ;
  51. LEXACT = LEXACT 'ET' ('PROG'
  52. 145.9405015531216 .9300690945091593 3.979039320256561E-12
  53. 697580.6326340148 2563.02106222187 1.0 288819.5707231797
  54. 268622.1566190319 194.5873354041621 .9300690945091593
  55. 3.979039320256561E-12 697580.6326340148 2563.02106222187
  56. 1.0 288819.5707231797 268622.1566190319 ) ;
  57.  
  58. LEXACT = LEXACT 'ET' ('PROG'
  59. 243.2341692552026
  60. .9300690945091593 3.979039320256561E-12 697580.6326340148
  61. 2563.02106222187 1.0 288819.5707231797 268622.1566190319
  62. 291.8810031062432 .9300690945091593 3.979039320256561E-12
  63. 697580.6326340148 2563.02106222187 1.0 288819.5707231797
  64. 268622.1566190319
  65. ) ;
  66.  
  67. LEXACT = LEXACT 'ET' ('PROG'
  68. 340.5278369572836 .9300690945091593 3.979039320256561E-12
  69. 697580.6326340148 2563.02106222187 1.0 288819.5707231797
  70. 268622.1566190319 389.1746708083242 .9300690945091593
  71. 3.979039320256561E-12 697580.6326340148 2563.02106222187 1.0
  72. 288819.5707231797 268622.1566190319) ;
  73.  
  74. LEXACT = LEXACT 'ET' ('PROG'
  75. 437.8215046593647 .9300690945091593 3.979039320256561E-12
  76. 697580.6326340148 2563.02106222187 1.0 288819.5707231797
  77. 268622.1566190319 486.4683385104051 .9300690945091593
  78. 3.979039320256561E-12 697580.6326340148 2563.02106222187
  79. 1.0 288819.5707231797 268622.1566190319) ;
  80.  
  81. LEXACT = LEXACT 'ET' ('PROG'
  82. 535.1151723614457 .9300690945091593 3.979039320256561E-12
  83. 697580.6326340148 2563.02106222187 1.0 288819.5707231797
  84. 268622.1566190319 583.7620062124862 .9300690945091593
  85. 3.979039320256561E-12 697580.6326340148 2563.02106222187 1.0
  86. 288819.5707231797 268622.1566190319) ;
  87.  
  88. LEXACT = LEXACT 'ET' ('PROG'
  89. 632.4088400635267 .9300690945091593 3.979039320256561E-12
  90. 697580.6326340148 2563.02106222187 1.0 288819.5707231797
  91. 268622.1566190319 681.0556739145673 .9300690945091593
  92. 3.979039320256561E-12 697580.6326340148 2563.02106222187 1.0
  93. 288819.5707231797 268622.1566190319) ;
  94.  
  95. LEXACT = LEXACT 'ET' ('PROG'
  96. 729.7025077656077 .9300690945091593 3.979039320256561E-12
  97. 697580.6326340148 2563.02106222187 1.0 288819.5707231797
  98. 268622.1566190319 778.3493416166482 .9300690945091593
  99. 3.979039320256561E-12 697580.6326340148 2563.02106222187
  100. 1.0 288819.5707231797 268622.1566190319) ;
  101.  
  102. LEXACT = LEXACT 'ET' ('PROG'
  103. 826.9961754676888 .9300690945091593 3.979039320256561E-12
  104. 697580.6326340148 2563.02106222187 1.0 288819.5707231797
  105. 268622.1566190319 875.6430093187292 .9300690945091593
  106. 3.979039320256561E-12 697580.6326340148 2563.02106222187 1.0
  107. 288819.5707231797 268622.1566190319) ;
  108.  
  109. LEXACT = LEXACT 'ET' ('PROG'
  110. 924.2898431697698 .9300690945091593 3.979039320256561E-12
  111. 697580.6326340148 2563.02106222187 1.0 288819.5707231797
  112. 268622.1566190319 972.9366770208103 .9300690945091593
  113. 3.979039320256561E-12 697580.6326340148 2563.02106222187 1.0
  114. 288819.5707231797 268622.1566190319) ;
  115.  
  116. LEXACT = LEXACT 'ET' ('PROG' 972.9366770208103 .9300690945091593
  117. 3.979039320256561E-12 697580.6326340148 2563.02106222187 1.0
  118. 288819.5707231797 268622.1566190319 1020.563696234262 .9711992885935007
  119. 42.21849439643984 736732.9074055142 2592.236892185716 1.0
  120. 321460.0704866028 313067.3251900754 1067.969151870608 1.01370750996012
  121. 84.2438857700123 777645.6009989232 2621.452722149562 1.0
  122. 354138.8712603799 362590.3908306613) ;
  123.  
  124. LEXACT = LEXACT 'ET' ('PROG' 1115.155623979032 1.057624905695079
  125. 126.0783005920503 820378.2182800922 2650.668552113408 1.0
  126. 386854.8055661046 417553.1413927785 1162.125645554223 1.102982969882543
  127. 167.7238330059224 864991.6014201408 2679.884382077254 1.0
  128. 419606.7429636912 478333.2552105426 1208.881704582817 1.149813544020885
  129. 209.1825462777236 911547.9450587952 2709.1002120411 1.0
  130. 452393.5895046745 545324.6661907386) ;
  131.  
  132. LEXACT = LEXACT 'ET' ('PROG' 1255.426245966713 1.198148817580572
  133. 250.4564741516483 960110.8116026787 2738.316042004945 1.0
  134. 485214.2871855269 618937.9308335221 1301.761673331164 1.248021328707566
  135. 291.5476221162355 1010745.146670078 2767.531871968791 1.0
  136. 518067.8134009624 699600.5972715921 1347.890350724929 1.299463965075698
  137. 332.4579685872177 1063517.29469371 2796.747701932637 1.0
  138. 550953.1803972456 787757.5764255146) ;
  139.  
  140. LEXACT = LEXACT 'ET' ('PROG' 1393.814604219309 1.352509964891132
  141. 373.1894660122936 1118495.014692988 2825.963531896483 1.0
  142. 583869.4347255011 883871.5153818108 1439.536723412327 1.407192918051686
  143. 413.7440419027419 1175747.496227202 2855.179361860329 1.0
  144. 616815.6566950218 988423.173109015 1485.058962843933 1.463546767463509
  145. 454.1235997964707 1235345.375540995 2884.395191824175 1.0
  146. 649790.9598265779 1101911.798635182) ;
  147.  
  148. LEXACT = LEXACT 'ET' ('PROG' 1530.383543327666 1.521605810517206
  149. 494.3300201567479 1297360.751913322 2913.611021788021 1.0
  150. 682794.4903057241 1224855.511818089 1575.512653203853 1.581404700725235
  151. 534.3651612105829 1361867.204221023 2942.826851751867 1.0
  152. 715825.426436109 1357791.686846843 1620.448449519048 1.642978449522024
  153. 574.2308597304395 1428939.807727903 2972.042681715713 1.0
  154. 748882.9780927855 1501277.33862052) ;
  155.  
  156. LEXACT = LEXACT 'ET' ('PROG' 1665.193059136131 1.70636242822789
  157. 613.9289317627123 1498655.151110031 3001.258511679559 1.0
  158. 781966.3861755147 1655889.512155949 1709.748579779141 1.771592370177581
  159. 653.4611733061729 1571091.353727757 3030.474341643404 1.0
  160. 815074.9220620818 1822225.67518284 1754.117081016696 1.838704373013818
  161. 692.8293609433672 1646328.083154666 3059.69017160725 1.0
  162. 848207.8870615955 2000904.114089844) ;
  163.  
  164. LEXACT = LEXACT 'ET' ('PROG' 1798.300605187562 1.907734901145937
  165. 732.0352524277539 1724446.572973421 3088.906001571096 1.0
  166. 881364.6118678055 2192564.333390289 1842.301168271707 1.978720788373339
  167. 771.0805872291835 1805529.640848111 3118.121831534942 1.0
  168. 914544.4560124031 2397867.458880638 1886.120760709965 2.05169924067314
  169. 809.9670870401542 1889661.706882407 3147.337661498788 1.0
  170. 947746.8073183382 2617496.644668788) ;
  171.  
  172. LEXACT = LEXACT 'ET' ('PROG' 1886.120760709965 1.170626887265085 0.0
  173. 101300.0 298 0.0 582562.3435327417 681963.1428475864 1904.981968317065
  174. 1.170626887265085 0.0 101300.0 298 0.0 582562.3435327417
  175. 681963.1428475864 1923.843175924165 1.170626887265085 0.0 101300.0 298
  176. 0.0 582562.3435327417 681963.1428475864 1942.704383531264
  177. 1.170626887265085 0.0 101300.0 298 0.0 582562.3435327417
  178. 681963.1428475864) ;
  179.  
  180. LEXACT = LEXACT 'ET' ('PROG' 1961.565591138364 1.170626887265085 0.0
  181. 101300.0 298 0.0 582562.3435327417 681963.1428475864 1980.426798745464
  182. 1.170626887265085 0.0 101300.0 298 0.0 582562.3435327417
  183. 681963.1428475864 1999.288006352563 1.170626887265085 0.0 101300.0 298
  184. 0.0 582562.3435327417 681963.1428475864 2018.149213959663
  185. 1.170626887265085 0.0 101300.0 298 0.0 582562.3435327417
  186. 681963.1428475864) ;
  187.  
  188. LEXACT = LEXACT 'ET' ('PROG' 2037.010421566762 1.170626887265085 0.0
  189. 101300.0 298 0.0 582562.3435327417 681963.1428475864 2055.871629173862
  190. 1.170626887265085 0.0 101300.0 298 0.0 582562.3435327417
  191. 681963.1428475864 2074.732836780962 1.170626887265085 0.0 101300.0 298
  192. 0.0 582562.3435327417 681963.1428475864 2093.594044388061
  193. 1.170626887265085 0.0 101300.0 298 0.0 582562.3435327417
  194. 681963.1428475864 ) ;
  195.  
  196. LEXACT = LEXACT 'ET' ('PROG'
  197. 2112.455251995161 1.170626887265085 0.0 101300.0 298 0.0
  198. 582562.3435327417 681963.1428475864 2131.316459602261 1.170626887265085
  199. 0.0 101300.0 298 0.0 582562.3435327417 681963.1428475864
  200. 2150.17766720936 1.170626887265085 0.0 101300.0 298 0.0
  201. 582562.3435327417 681963.1428475864 2169.03887481646 1.170626887265085
  202. 0.0 101300.0 298 0.0 582562.3435327417 681963.1428475864) ;
  203.  
  204. LEXACT = LEXACT 'ET' ('PROG'
  205. 2187.90008242356 1.170626887265085 0.0 101300.0 298 0.0
  206. 582562.3435327417 681963.1428475864 2206.76129003066 1.170626887265085
  207. 0.0 101300.0 298 0.0 582562.3435327417 681963.1428475864
  208. 2225.622497637759 1.170626887265085 0.0 101300.0 298 0.0
  209. 582562.3435327417 681963.1428475864 ) ;
  210.  
  211. LEXACT = LEXACT 'ET' ('PROG'
  212. 2244.483705244859 1.170626887265085 0.0 101300.0 298 0.0
  213. 582562.3435327417 681963.1428475864 2263.344912851958 1.170626887265085
  214. 0.0 101300.0 298 0.0 582562.3435327417 681963.1428475864) ;
  215.  
  216. LEXACT = LEXACT 'ET' ('PROG'
  217. 10000.0 1.170626887265085 0.0 101300.0 298 0.0
  218. 582562.3435327417 681963.1428475864) ;
  219.  
  220. aa = 'DIME' LEXACT ;
  221. LEX_XOT = 'LECT' 1 PAS 8 (aa '-' 7) ;
  222. LEX_XOT = 'EXTRAIRE' LEXACT LEX_XOT ;
  223. LEX_RHO = 'LECT' 2 PAS 8 (aa '-' 6) ;
  224. LEX_RHO = 'EXTRAIRE' LEXACT LEX_RHO ;
  225. LEX_U = 'LECT' 3 PAS 8 (aa '-' 5) ;
  226. LEX_U = 'EXTRAIRE' LEXACT LEX_U ;
  227. LEX_P = 'LECT' 4 PAS 8 (aa '-' 4) ;
  228. LEX_P = 'EXTRAIRE' LEXACT LEX_P ;
  229. LEX_T = 'LECT' 5 PAS 8 (aa '-' 3) ;
  230. LEX_T = 'EXTRAIRE' LEXACT LEX_T ;
  231. LEX_CSI = 'LECT' 6 PAS 8 (aa '-' 2) ;
  232. LEX_CSI = 'EXTRAIRE' LEXACT LEX_CSI ;
  233. LEX_EIN = 'LECT' 7 PAS 8 (aa '-' 1) ;
  234. LEX_EIN = 'EXTRAIRE' LEXACT LEX_EIN ;
  235. LEX_RET = 'LECT' 8 PAS 8 (aa '-' 0) ;
  236. LEX_RET = 'EXTRAIRE' LEXACT LEX_RET ;
  237.  
  238. *
  239. ****END EXACT SOLUTION
  240. *
  241. ******************
  242. **** PRIMCONS ****
  243. ******************
  244. *
  245. * From primitive to conservative variables
  246. *
  247. 'DEBPROC' PRIMCONS ;
  248. 'ARGUMENT' PGAS*TABLE TN1*'CHPOINT ' TN2*'CHPOINT '
  249. PN1*'CHPOINT ' PN2*'CHPOINT ' VN1*'CHPOINT ' VN2*'CHPOINT ' ;
  250. *
  251. * ETHER = int_0^T cv(T') dT' T < TMAX
  252. * = int_0^TMAX cv(T') dT' '+'
  253. * cv(TMAX) T >= TMAX
  254. ESP1 = 'EXTRAIRE' (PGAS . 'SPECIES') 1 ;
  255. * DY1 = y_i - y_f for the species 1
  256. DY1 = (('EXTRAIRE' (PGAS . 'MASSFRA') 1) '-'
  257. ('EXTRAIRE' (PGAS . 'MASSFRA') 2)) ;
  258. COEF1 = ('EXTRAIRE' (PGAS . 'CHEMCOEF') 1) '*'
  259. (PGAS . ESP1 . 'W') ;
  260. YFINPH1 = 1.0 ;
  261. YFINPH2 = 1.0 ;
  262. 'SI' (COEF1 > 0) ;
  263. YPH2 = 'EXTRAIRE' (PGAS . 'MASSFRA') 2 ;
  264. YPH1 = YPH2 '+' DY1 ;
  265. 'SINON' ;
  266. YPH1 = 'EXTRAIRE' (PGAS . 'MASSFRA') 2 ;
  267. YPH2 = YPH1 '-' DY1 ;
  268. 'FINSI' ;
  269. YFINPH1 = YFINPH1 '-' YPH1 ;
  270. YFINPH2 = YFINPH2 '-' YPH2 ;
  271. PRYPH1 = 'PROG' YPH1 ;
  272. PRYPH2 = 'PROG' YPH2 ;
  273. 'REPETER' BLESP (('DIME' (PGAS . 'SPECIES')) '-' 2) ;
  274. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') (&BLESP '+' 1) ;
  275. COEF = ('EXTRAIRE' (PGAS . 'CHEMCOEF') (&BLESP '+' 1))
  276. '*' (PGAS . ESP . 'W') ;
  277. DY = (DY1 * (COEF '/' COEF1)) ;
  278. 'SI' (COEF > 0) ;
  279. YPH2 = 'EXTRAIRE' (PGAS . 'MASSFRA') (&BLESP '+' 2) ;
  280. YPH1 = YPH2 '+' DY ;
  281. 'SINON' ;
  282. YPH1 = 'EXTRAIRE' (PGAS . 'MASSFRA') (&BLESP '+' 2) ;
  283. YPH2 = YPH1 '-' DY ;
  284. 'FINSI' ;
  285. PRYPH1 = PRYPH1 'ET' ('PROG' YPH1) ;
  286. PRYPH2 = PRYPH2 'ET' ('PROG' YPH2) ;
  287. YFINPH1 = YFINPH1 '-' YPH1 ;
  288. YFINPH2 = YFINPH2 '-' YPH2 ;
  289. 'FIN' BLESP ;
  290. PRYPH1 = PRYPH1 'ET' ('PROG' YFINPH1) ;
  291. PRYPH2 = PRYPH2 'ET' ('PROG' YFINPH2) ;
  292. 'LISTE' PRYPH1 ;
  293. 'LISTE' PRYPH2 ;
  294. *
  295. TMAX = (PGAS . 'TMAX') ;
  296. * TCAL1 = MIN TN1, TMAX
  297. TCAL1 = 0.5D0 '*' ((TMAX '+' TN1) '-' ('ABS' (TN1 '-' TMAX))) ;
  298. DTN1 = TN1 '-' TCAL1 ;
  299. * TCAL1 = MIN TN1, TMAX
  300. TCAL2 = 0.5D0 '*' ((TMAX '+' TN2) '-' ('ABS' (TN2 '-' TMAX))) ;
  301. DTN2 = TN2 '-' TCAL2 ;
  302. *
  303. * Internal energy (J/kg in SI)
  304. *
  305. ETHER1 = 0.0 ;
  306. CV1 = 0.0 ;
  307. ETHER2 = 0.0 ;
  308. CV2 = 0.0 ;
  309. FUNTN1 = 1.0 ;
  310. FUNTN2 = 1.0 ;
  311. 'REPETER' BLPO ((PGAS . 'NORD') '+' 1) ;
  312. 'REPETER' BLESP ('DIME' (PGAS . 'SPECIES')) ;
  313. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') &BLESP ;
  314. YCEL1 = 'EXTRAIRE' PRYPH1 &BLESP ;
  315. YCEL2 = 'EXTRAIRE' PRYPH2 &BLESP ;
  316. AA = 'EXTRAIRE' (PGAS . ESP . 'A') &BLPO ;
  317. DCV1 = (AA * YCEL1 * FUNTN1) ;
  318. DCV2 = (AA * YCEL2 * FUNTN2) ;
  319. CV1 = CV1 '+' DCV1 ;
  320. CV2 = CV2 '+' DCV2 ;
  321. ETHER1 = ETHER1 '+' (DCV1 * TCAL1 '/' (&BLPO)) ;
  322. ETHER2 = ETHER2 '+' (DCV2 * TCAL2 '/' (&BLPO)) ;
  323. 'FIN' BLESP ;
  324. FUNTN1 = FUNTN1 '*' TCAL1 ;
  325. FUNTN2 = FUNTN2 '*' TCAL2 ;
  326. 'FIN' BLPO ;
  327. ETHER1 = ETHER1 '+' (CV1 '*' DTN1) ;
  328. ETHER2 = ETHER2 '+' (CV2 '*' DTN2) ;
  329. *
  330. * Formation energy/enthalpy (J/kg in SI) and gas constant (J/kg/K)
  331. *
  332. EFORM1 = 0.0 ;
  333. EFORM2 = 0.0 ;
  334. RGAS1 = 0.0 ;
  335. RGAS2 = 0.0 ;
  336. 'REPETER' BLESP ('DIME' (PGAS . 'SPECIES')) ;
  337. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') &BLESP ;
  338. YCEL1 = 'EXTRAIRE' PRYPH1 &BLESP ;
  339. YCEL2 = 'EXTRAIRE' PRYPH2 &BLESP ;
  340. EFORM1 = EFORM1 '+' (YCEL1 * (PGAS . ESP . 'H0K')) ;
  341. EFORM2 = EFORM2 '+' (YCEL2 * (PGAS . ESP . 'H0K')) ;
  342. RGAS1 = RGAS1 '+' (YCEL1 * (PGAS . 'RUNIV') '/'
  343. (PGAS . ESP . 'W')) ;
  344. RGAS2 = RGAS2 '+' (YCEL2 * (PGAS . 'RUNIV') '/'
  345. (PGAS . ESP . 'W')) ;
  346. 'FIN' BLESP ;
  347. 'LISTE' RGAS1 ;
  348. 'LISTE' RGAS2 ;
  349. *
  350. * Computation of the conservative variables
  351. *
  352. RN1 = PN1 '/' (RGAS1 '*' TN1) ;
  353. RN2 = PN2 '/' (RGAS2 '*' TN2) ;
  354. GN1 = RN1 * VN1 ;
  355. GN2 = RN2 * VN2 ;
  356. LVEL = 'MOTS' 'UX' 'UY' 'UZ' ;
  357. ECIN1 = 0.5D0 '*' ('PSCAL' VN1 VN1 LVEL LVEL) ;
  358. ECIN2 = 0.5D0 '*' ('PSCAL' VN2 VN2 LVEL LVEL) ;
  359. RETN1 = RN1 '*' (ETHER1 '+' ECIN1 '+' EFORM1) ;
  360. RETN2 = RN2 '*' (ETHER2 '+' ECIN2 '+' EFORM2) ;
  361. *
  362. 'RESPRO' RN1 RN2 GN1 GN2 RETN1 RETN2 ;
  363. 'FINPROC' ;
  364.  
  365. *
  366. ****************************************************************
  367. ****************************************************************
  368. *********END EXACT SOLUTION AND PROCEDURES ********************
  369. ****************************************************************
  370. ****************************************************************
  371. *
  372. *
  373. ****************************************************************
  374. ****************************************************************
  375. ***** 1D mesh *****
  376. ****************************************************************
  377. ****************************************************************
  378. *
  379. *
  380. * A4 ------------------- A5 ----------------------- A6
  381. * | | |
  382. * | ZONE1 | ZONE2 |
  383. * | | |
  384. * A1 ------------------- A2 ----------------------- A3
  385. * | | |
  386. * | L1 | L2 |
  387. * >|<--------------------->|<----------------------->|
  388. *
  389. * AR = activation region
  390. * ZONE1
  391. * ZONE2
  392. *
  393.  
  394. RAF = 200 ;
  395.  
  396. L1 = 1. ;
  397. DX = L1 '/' RAF ;
  398. L2 = DX ;
  399.  
  400. N1 = RAF ;
  401. N2 = 1 ;
  402.  
  403. * For the sake of simplicity, we will only consider ny mesh in y-direction
  404.  
  405. NY = 3 ;
  406. H1 = NY '*' DX ;
  407.  
  408. A1 = 0.0 0.0 ;
  409. A2 = L1 0.0 ;
  410. A3 = (L1 '+' L2) 0.0 ;
  411. A4 = 0.0 H1 ;
  412. A5 = L1 H1 ;
  413. A6 = (L1 '+' L2) H1 ;
  414. *
  415. 'OPTION' 'ELEM' 'SEG2' ;
  416. A1A2 = A1 'DROIT' N1 A2 ;
  417. A2A3 = A2 'DROIT' N2 A3 ;
  418. A4A5 = A4 'DROIT' N1 A5 ;
  419. A5A6 = A5 'DROIT' N2 A6 ;
  420. *
  421. A1A4 = A1 'DROIT' NY A4 ;
  422. A2A5 = A2 'DROIT' NY A5 ;
  423. A3A6 = A3 'DROIT' NY A6 ;
  424. *
  425. *
  426. **** 2D mesh
  427. *
  428. * DOM1 is zone 1
  429. * DOM3 is zone 2
  430. *
  431. *
  432. 'OPTION' 'ELEM' 'QUA4' ;
  433. DOM1 = 'DALLER' A1A2 A2A5 ('INVERSE' A4A5) ('INVERSE' A1A4) ;
  434. DOM2 = 'DALLER' A2A3 A3A6 ('INVERSE' A5A6) ('INVERSE' A2A5) ;
  435. LIMG = A1A4 ;
  436. LIMD = A3A6 ;
  437. *
  438. * DOMTOT = total region
  439. *
  440. DOMTOT = DOM1 'ET' DOM2 ;
  441. 'ELIMINATION' (1.0D-3 '*' DX) DOMTOT ;
  442. DOMLIM = 'CONTOUR' DOMTOT ;
  443. *
  444. **** Line for graphics
  445. *
  446. LIMCON = 'MANUEL' 'QUA4'
  447. (A1 'PLUS' ((0.25 * DX) (0.25 * DX)))
  448. (A3 'PLUS' ((-0.25 * DX) (0.25 * DX)))
  449. (A3 'PLUS' ((-0.25 * DX) (0.75 * DX)))
  450. (A1 'PLUS' ((0.25 * DX) (0.75 * DX))) ;
  451. LIMCON = LIMCON 'COULEUR' ROUG ;
  452. *
  453. ANGLE = 45.0 ;
  454. DOMTOT2 = DOMTOT 'TOURNER' ANGLE (-10. -10.) ;
  455. CHAMP = DOMTOT2 'MOIN' DOMTOT ;
  456. FORM CHAMP ;
  457. LIMCON = LIMCON 'TOURNER' ANGLE (-10. -10.) ;
  458.  
  459. *
  460. **** The tables 'DOMAINE'
  461. *
  462. $DOMTOT = 'MODELISER' DOMTOT 'EULER' ;
  463. $DOMLIM = 'MODELISER' DOMLIM 'EULER' ;
  464. $DOM1 = 'MODELISER' DOM1 'EULER' ;
  465. $DOM2 = 'MODELISER' DOM2 'EULER' ;
  466. $LIMG = 'MODELISER' LIMG 'EULER' ;
  467. $LIMD = 'MODELISER' LIMD 'EULER' ;
  468. *
  469. TDOMTOT = 'DOMA' $DOMTOT 'VF' ;
  470. TDOMLIM = 'DOMA' $DOMLIM 'VF' ;
  471. TDOM1 = 'DOMA' $DOM1 'VF' ;
  472. TDOM2 = 'DOMA' $DOM2 'VF' ;
  473. TLIMG = 'DOMA' $LIMG 'VF' ;
  474. TLIMD = 'DOMA' $LIMD 'VF' ;
  475. *
  476. QDOMTOT = TDOMTOT . 'QUAF' ;
  477. QDOMLIM = TDOMLIM . 'QUAF' ;
  478. QDOM1 = TDOM1 . 'QUAF' ;
  479. QDOM2 = TDOM2 . 'QUAF' ;
  480. QLIMG = TLIMG . 'QUAF' ;
  481. QLIMD = TLIMD . 'QUAF' ;
  482. *
  483. 'ELIMINATION' QDOMTOT (0.001 '*' DX) QDOMLIM ;
  484. 'ELIMINATION' QDOMTOT (0.001 '*' DX) QDOM1 ;
  485. 'ELIMINATION' QDOMTOT (0.001 '*' DX) QDOM2 ;
  486. 'ELIMINATION' QDOMTOT (0.001 '*' DX) QLIMG ;
  487. 'ELIMINATION' QDOMTOT (0.001 '*' DX) QLIMD ;
  488. *
  489. **** MOD1 = model (created just to display the CHAMELEMs)
  490. *
  491. MOD1 = 'MODELISER' ('DOMA' $DOMTOT 'MAILLAGE') 'THERMIQUE' ;
  492. *
  493. **** Line for graphics
  494. *
  495. *
  496. LIGEVO = (TDOMTOT . 'CENTRE') 'INCL' LIMCON ;
  497. * P1 = 'POIN' (COOR 1 LIGEVO) 'MINIMUM' ;
  498. * 'ORDONNER' LIGEVO P1 ;
  499. 'ORDONNER' LIGEVO ;
  500. LIGEVO = 'QUELCONQUE' 'SEG2' LIGEVO 'COULEUR' 'VERT';
  501. 'SI' GRAPH ;
  502. 'TRACER' (LIMCON 'ET' QDOMTOT 'ET' LIGEVO)
  503. 'TITR' ('CHAINE' 'Maillage: ' ('NBEL' DOMTOT) ' elts') ;
  504. 'FINSI' ;
  505.  
  506.  
  507. * 'OPTION' 'SAUVER' ('CHAINE' 'mesh.sauv_raf' RAF) ;
  508. * 'SAUVER' RAF DOMTOT $DOMTOT $DOM1 $DOM2 $DOM3 LIGEVO MOD1 ;
  509.  
  510. ****************************************************************
  511. ****************************************************************
  512. ***** Initial conditions and gas properties. *****
  513. ****************************************************************
  514. ****************************************************************
  515. *
  516. *************************************************
  517. **** The table for the properties of the gas ****
  518. *************************************************
  519. *
  520. FCOMB = 0.0 ;
  521. FDISS = 0.6 ;
  522. PGAS = 'TABLE' ;
  523. *
  524. **** Order of the polynomial order for cv = cv(T)
  525. * For T > TMAX, cv(T) = cv(Tmax)
  526. *
  527. PGAS . 'TMAX' = 6000.0 ;
  528. PGAS . 'NORD' = 4 ;
  529. *
  530. **** Species involved in the mixture (before or after
  531. * the chemical reaction)
  532. *
  533. PGAS . 'SPECIES' = 'MOTS' 'C2H2' 'O2 ' 'H2O ' 'CO2 ' 'CO ' 'O '
  534. 'N2 ';
  535. *
  536. *
  537. **** Coefficient of the chemical reaction.
  538. * Note that for the first species this coefficient should be positive
  539. * Normal, we take it equal to 1.
  540. *
  541. * C2H2 '+' 2.5 O2 ---> H2O + (1-F) CO2 + F CO + F O
  542. *
  543. PGAS . 'CHEMCOEF' = 'PROG' 1.0 2.5 -1.0 (-2.0 '+' FDISS)
  544. (-1.0 '*' FDISS) (-1.0 '*' FDISS) 0.0 ;
  545. *
  546. **** Coef with the gas properties
  547. *
  548. PGAS . 'C2H2' = 'TABLE' ;
  549. PGAS . 'H2O ' = 'TABLE' ;
  550. PGAS . 'CO2 ' = 'TABLE' ;
  551. PGAS . 'O2 ' = 'TABLE' ;
  552. PGAS . 'N2 ' = 'TABLE' ;
  553. PGAS . 'CO ' = 'TABLE' ;
  554. PGAS . 'O ' = 'TABLE' ;
  555. *
  556. **** Runiv (J/mole/K)
  557. *
  558. PGAS . 'RUNIV' = 8.31441 ;
  559. *
  560. **** W (kg/mole). Gas constant (J/kg/K = Runiv/W)
  561. *
  562. PGAS . 'C2H2' . 'W' = 26.03788D-3 ;
  563. PGAS . 'CO2 ' . 'W' = (2. * 15.9994E-3) '+' 12.0107E-3 ;
  564. PGAS . 'O2 ' . 'W' = 2. * 15.9994E-3 ;
  565. PGAS . 'N2 ' . 'W' = 2. * 14.0067E-3 ;
  566. PGAS . 'H2O ' . 'W' = (2. * 1.00797E-3) '+'
  567. (15.9994E-3) ;
  568. PGAS . 'CO ' . 'W' = 15.9994E-3 '+' 12.0107E-3 ;
  569. PGAS . 'O ' . 'W' = 15.9994E-3 ;
  570. *
  571. **** Mass fraction of the first species before and after the combustion
  572. * Final mass fractions of the species with positive coefficients.
  573. * Final mass fractions of the species with non-positive coefficient.
  574. * The mass fraction of the last species is not given.
  575. *
  576. *
  577. NC2H2 = 1.;
  578. NO2 = 2.5 * NC2H2 ;
  579. NN2 = NO2 '*' 0.79 '/' 0.21 ;
  580. NH2O = 1.0D-12 ;
  581. NCO2 = 1.0D-12 ;
  582. NCO = 1.0D-12 ;
  583. NO = 1.0D-12 ;
  584. MC2H2 = NC2H2 * (PGAS . 'C2H2' . 'W') ;
  585. MO2 = NO2 * (PGAS . 'O2 ' . 'W') ;
  586. MN2 = NN2 * (PGAS . 'N2 ' . 'W') ;
  587. MH2O = NH2O * (PGAS . 'H2O ' . 'W') ;
  588. MCO2 = NCO2 * (PGAS . 'CO2 ' . 'W') ;
  589. MCO = NCO * (PGAS . 'CO ' . 'W') ;
  590. MO = NO * (PGAS . 'O ' . 'W') ;
  591. MTOT = MC2H2 '+' MO2 '+' MH2O '+' MN2 '+' MCO2 '+' MCO '+' MO;
  592. YC2H2 = MC2H2 '/' MTOT ;
  593. YO2 = MO2 '/' MTOT ;
  594. YH2O = MH2O '/' MTOT ;
  595. YN2 = MN2 '/' MTOT ;
  596. YCO2 = MCO2 '/' MTOT ;
  597. YCO = MCO '/' MTOT ;
  598. YO = MO '/' MTOT ;
  599. SI FAUX ;
  600. *
  601. **** Complete combustion
  602. *
  603. SI (NC2H2 > (0.4 * NO2)) ;
  604. * C2H2 en excès
  605. YO2F = 1.0D-12 ;
  606. YC2H2F = YC2H2 '-' ((YO2 '-' YO2F) * ((PGAS . 'C2H2' . 'W') '/'
  607. (2.5 * (PGAS . 'O2 ' . 'W')))) ;
  608. 'SINON' ;
  609. * O2 en excès
  610. YC2H2F = 1.0D-12 ;
  611. YO2F = YO2 '-'
  612. (2.5 * (YC2H2 '-' YC2H2F) * ((PGAS . 'O2 ' . 'W')
  613. '/'(PGAS . 'C2H2' . 'W'))) ;
  614. 'FINSI' ;
  615. 'SINON' ;
  616. YC2H2F = FCOMB * YC2H2 ;
  617. YO2F = YO2 '-'
  618. (2.5 * (YC2H2 '-' YC2H2F) * ((PGAS . 'O2 ' . 'W') '/'
  619. (PGAS . 'C2H2' . 'W'))) ;
  620. 'FINSI' ;
  621. YCO2F = YCO2 '+' ((YC2H2 '-' YC2H2F) '*' (2.0 '-' FDISS)
  622. '*' ((PGAS . 'CO2 ' . 'W') '/'
  623. (PGAS . 'C2H2' . 'W'))) ;
  624. YCOF = YCO '+' ((YC2H2 '-' YC2H2F) '*' (FDISS)
  625. '*' ((PGAS . 'CO ' . 'W') '/'
  626. (PGAS . 'C2H2' . 'W'))) ;
  627. YOF = YO '+' ((YC2H2 '-' YC2H2F) '*' (FDISS)
  628. '*' ((PGAS . 'O ' . 'W') '/'
  629. (PGAS . 'C2H2' . 'W'))) ;
  630. YH2OF = YH2O '+' (YC2H2 '-' YC2H2F) '+' (YO2 '-' YO2F) '+'
  631. (YCO2 '-' YCO2F) '+' (YO '-' YOF) '+' (YCO '-' YCOF) ;
  632. YN2F = YN2 ;
  633. ERRO = ((YC2H2F '+' YO2F '+' YH2OF '+' YN2F '+' YCO2F '+' YCOF
  634. '+' YOF) '-' 1.0) ;
  635. SI (ERRO > 1.0D-12) ;
  636. 'ERREUR' 21 ;
  637. 'FINSI' ;
  638. *
  639. * PGAS . 'CHEMCOEF' = 'PROG' 1.0 2.5 -1.0 (-2.0 '+' FDISS)
  640. * (-1.0 '*' FDISS) (-1.0 '*' FDISS) ;
  641. * PGAS . 'SPECIES' = 'MOTS' 'C2H2' 'O2 ' 'H2O ' 'CO2 ' 'CO ' 'O ';
  642. PGAS . 'MASSFRA' = 'PROG' YC2H2 YC2H2F YO2F YH2O YCO2 YCO YO ;
  643. *
  644. **** Polynomial coefficients
  645. *
  646. PGAS . 'C2H2' . 'A' = 'PROG' 0.88323615E+03 0.20414991E+01
  647. -0.76189061E-03 0.13137105E-06
  648. -0.83517351E-11 ;
  649. PGAS . 'H2O ' . 'A' = 'PROG' 1155.95625 0.768331151 -5.73129958E-05
  650. -1.82753232E-08 2.44485692E-12 ;
  651. PGAS . 'O2 ' . 'A' = 'PROG' 575.012333 0.350522002 -0.000128294865
  652. 2.33636971E-08 -1.53304905E-12;
  653. PGAS . 'N2 ' . 'A' = 'PROG' 652.940766 0.288239099 -7.80442298E-05
  654. 8.78233606E-09 -3.05514485E-13 ;
  655. PGAS . 'CO2 ' . 'A' = 'PROG' 4.0835592237504562e+02
  656. 9.8512056453381769e-01 -4.4170720111493721e-04
  657. 8.5343398699551964e-08 -5.8566495097123519e-12 ;
  658. PGAS . 'CO ' . 'A' = 'PROG' 0.66108887E+03 0.30437019E+00
  659. -0.90998496E-04 0.12134406E-07 -0.58302668E-12 ;
  660. PGAS . 'O ' . 'A' = 'PROG' 0.90791174E+03 -0.19422711E+00
  661. 0.94136383E-04 -0.17707293E-07 0.12172246E-11 ;
  662. *
  663. **** Formation enthalpies (energies) at 0K (J/Kg)
  664. *
  665. PGAS . 'C2H2' . 'H0K' = 9.05431D6 ;
  666. PGAS . 'H2O ' . 'H0K' = -1.395D7 ;
  667. PGAS . 'O2 ' . 'H0K' = -2.634D5 ;
  668. PGAS . 'N2 ' . 'H0K' = -2.953D5 ;
  669. PGAS . 'CO2 ' . 'H0K' = -93.965*((4.187E3)'/'(PGAS . 'CO2 ' . 'W'));
  670. PGAS . 'CO ' . 'H0K' = -4.06313D6 ;
  671. PGAS. 'O ' . 'H0K' = 1.54250E+07 ;
  672.  
  673. *************************************************
  674. **** The initial conditions *********************
  675. *************************************************
  676. *
  677. eps = 1.0D-64 ;
  678. K0 = 3000. ;
  679. *
  680. T1 = 298. ;
  681. alph11 = 1.0 '-' 1.0D-4 ;
  682. alph12 = 1.0D-4 ;
  683. alph21 = 1.0 '-' alph11 ;
  684. alph22 = 1.0 - alph12 ;
  685. T2 = 4000. ;
  686. un1 = 0.0 ;
  687. un2 = 0.0 ;
  688. ut1 = 0.0 ;
  689. ut2 = 0.0 ;
  690. pre1 = 1.013D5 ;
  691. pre2 = 1.013D5 ;
  692. *
  693. CHVN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 2 'UX' un1
  694. 'UY' ut1) ;
  695. CHVN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 2 'UX' un2
  696. 'UY' ut2) ;
  697. *
  698. CHTN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' T1) ;
  699. CHTN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' T2) ;
  700. *
  701. CHPN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' pre1) ;
  702. CHPN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' pre2) ;
  703. *
  704. CHAL1 = ('MANUEL' 'CHPO' (TDOM1 . 'CENTRE') 1 'SCAL'
  705. alph11) '+'
  706. ('MANUEL' 'CHPO' (TDOM2 . 'CENTRE') 1 'SCAL'
  707. alph12) ;
  708. CHAL2 = ('MANUEL' 'CHPO' (TDOM1 . 'CENTRE') 1 'SCAL'
  709. alph21) '+'
  710. ('MANUEL' 'CHPO' (TDOM2 . 'CENTRE') 1 'SCAL'
  711. alph22) ;
  712. *
  713. CHRN1 CHRN2 CHGN1 CHGN2 CHRET1 CHRET2 = PRIMCONS
  714. PGAS CHTN1 CHTN2 CHPN1 CHPN2 CHVN1 CHVN2 ;
  715. *
  716. RN1 RN2 VN1 VN2 PN1 PN2 TN1 TN2 = 'PRIM' 'DEM' PGAS CHAL1 CHAL2
  717. (CHAL1 * CHRN1) (CHAL2 * CHRN2) (CHAL1 * CHGN1)
  718. (CHAL2 * CHGN2) (CHAL1 * CHRET1) (CHAL2 * CHRET2)
  719. CHTN1 CHTN2 EPS ;
  720.  
  721. TN1M = TN1 ;
  722. TN2M = TN2 ;
  723. *
  724. **** Parameter for the time loop
  725. *
  726. * Names of the residuum components
  727. *
  728. LISTINCO = ('MOTS' 'ALF1' 'RN1' 'RNX1' 'RNY1' 'RET1'
  729. 'ALF2' 'RN2' 'RNX2' 'RNY2' 'RET2') ;
  730. *
  731. **** BC
  732. *
  733. KONLIM = 'DIFF' (TLIMG . 'CENTRE') (TLIMG . 'CENTRE') ;
  734. CHPVID CHMVID = 'KOPS' 'MATRIK' ;
  735. RESLIM = 'COPIER' CHPVID ;
  736.  
  737. *
  738. ****************************************************************
  739. ****************************************************************
  740. ***** Parameters for the computations ******
  741. ****************************************************************
  742. ****************************************************************
  743. *
  744.  
  745. * Iterations
  746. * Final time
  747. * Safety Factor fot the time step
  748. * Second order reconstruction?
  749.  
  750. NITER = 10000 ;
  751. TFINAL = 0.35D-3 ;
  752. SAFFAC = 0.75 ;
  753. LOGSO = VRAI ;
  754.  
  755.  
  756. * 'OPTION' 'SAUVER' 'parameters.sauv' ;
  757. * 'SAUVER' METO NITER TFINAL SAFFAC LOGSO ;
  758.  
  759. ****************************************************************
  760. ****************************************************************
  761. ***** The computation ******
  762. ****************************************************************
  763. ****************************************************************
  764.  
  765. AL1 = CHAL1 ;
  766. AL2 = CHAL2 ;
  767. ARN1 = CHAL1 * CHRN1 ;
  768. ARN2 = CHAL2 * CHRN2 ;
  769. AGN1 = CHAL1 * CHGN1 ;
  770. AGN2 = CHAL2 * CHGN2 ;
  771. AREN1 = CHAL1 * CHRET1 ;
  772. AREN2 = CHAL2 * CHRET2 ;
  773. *
  774. AL10 = 'COPIER' AL1 ;
  775. AL20 = 'COPIER' AL2 ;
  776. ARN10 = 'COPIER' ARN1 ;
  777. ARN20 = 'COPIER' ARN2 ;
  778. AGN10 = 'COPIER' AGN1 ;
  779. AGN20 = 'COPIER' AGN2 ;
  780. AREN10 = 'COPIER' AREN1 ;
  781. AREN20 = 'COPIER' AREN2 ;
  782. TN10 = 'COPIER' TN1 ;
  783. TN20 = 'COPIER' TN2 ;
  784.  
  785. *
  786. **** Geometrical coefficient to compute grad(alpha)/|grad(alpha)|
  787. *
  788.  
  789. EPSGR = 1.0D-6 ;
  790. CHPL1 = CHPVID ;
  791. CHPL2 = 'MANUEL' 'CHPO' (TDOMLIM . 'CENTRE') 2
  792. 'P1DX' 0.0 'P1DY' 0.0 ;
  793. GRALP1 GRAL = 'PENT' $DOMTOT 'FACE'
  794. 'DIAMAN2' ('MOTS' 'SCAL') ('MOTS' 'P1DX' 'P1DY')
  795. AL1 CHPL1 CHPL2 ;
  796. * 'SI' VRAI ;
  797. * V1 = 'VECTEUR'
  798. * ('NOMC' ('MOTS' 'P1DX' 'P1DY') GRALP1 ('MOTS' 'UX' 'UY')) ;
  799. * 'TRACER' DOMTOT V1 DOMLIM ;
  800. * 'FINSI' ;
  801. GRALP1 = GRALP1 '+' EPSGR ;
  802. GRALP1 = GRALP1 '/' (('PSCAL' GRALP1 GRALP1 ('MOTS' 'P1DX' 'P1DY')
  803. ('MOTS' 'P1DX' 'P1DY')) '**' 0.5) ;
  804. * 'SI' VRAI ;
  805. * V1 = 'VECTEUR'
  806. * ('NOMC' ('MOTS' 'P1DX' 'P1DY') GRALP1 ('MOTS' 'UX' 'UY')) ;
  807. * 'TRACER' DOMTOT V1 DOMLIM ;
  808. * 'FINSI' ;
  809.  
  810. *
  811. **** Geometrical coefficient to compute gradients
  812. *
  813. GRADR0 ALR0 COEFSCAL = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'NOLIMITE'
  814. ('MOTS' 'SCAL') AL10 ;
  815. GRADR0 = GRADR0 * 0.0 ;
  816. ALR0 = ALR0 * 0.0 ;
  817.  
  818. GRADV0 ALV0 COEFVECT = 'PENT' $DOMTOT 'CENTRE' 'EULEVECT' 'NOLIMITE'
  819. ('MOTS' 'UX' 'UY') AGN10 ;
  820. GRADV0 = GRADV0 * 0.0 ;
  821. ALV0 = ALV0 * 0.0 ;
  822.  
  823. VINF1 = 'MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' 10. ;
  824. VINF2 = 'MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' 100. ;
  825. *
  826. **** Temporal loop
  827. *
  828.  
  829. TPS = 0.0 ;
  830.  
  831. 'MESSAGE' ;
  832. 'MESSAGE' ('CHAINE' 'Methode = ' METO) ;
  833. 'MESSAGE' ('CHAINE' 'SAFFAC = ' SAFFAC) ;
  834. 'MESSAGE' ;
  835.  
  836. 'TEMPS' 'ZERO' ;
  837. 'REPETER' BLITER NITER ;
  838.  
  839. *
  840. **** Primitive variables
  841. *
  842.  
  843. RN1 RN2 VN1 VN2 PN1 PN2 TN1 TN2 = 'PRIM' 'DEM' PGAS AL1 AL2
  844. ARN1 ARN2 AGN1 AGN2 AREN1 AREN2 TN1M TN2M EPS ;
  845.  
  846. TN1M = 'COPIER' TN1 ;
  847. TN2M = 'COPIER' TN2 ;
  848.  
  849. **** Gradient of alpha
  850.  
  851. GRALP1 = 'PENT' $DOMTOT 'FACE'
  852. 'DIAMAN2' ('MOTS' 'SCAL') ('MOTS' 'P1DX' 'P1DY')
  853. AL1 CHPL1 CHPL2 'GRADGEO' GRAL ;
  854. * 'SI' VRAI ;
  855. * V1 = 'VECTEUR'
  856. * ('NOMC' ('MOTS' 'P1DX' 'P1DY') GRALP1 ('MOTS' 'UX' 'UY')) ;
  857. * 'TRACER' DOMTOT V1 DOMLIM ;
  858. * 'FINSI' ;
  859. GRALP1 = GRALP1 '+' EPSGR ;
  860. GRALP1 = GRALP1 '/' (('PSCAL' GRALP1 GRALP1 ('MOTS' 'P1DX' 'P1DY')
  861. ('MOTS' 'P1DX' 'P1DY')) '**' 0.5) ;
  862.  
  863. 'SI' LOGSO ;
  864.  
  865. GRADA1 ALA1 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  866. ('MOTS' 'SCAL') AL1 'GRADGEO' COEFSCAL ;
  867.  
  868. GRADR1 ALR1 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  869. ('MOTS' 'SCAL') RN1 'GRADGEO' COEFSCAL ;
  870.  
  871. GRADP1 ALP1 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  872. ('MOTS' 'SCAL') PN1 'GRADGEO' COEFSCAL ;
  873.  
  874. GRADV1 ALV1 = 'PENT' $DOMTOT 'CENTRE' 'EULEVECT' 'LIMITEUR'
  875. ('MOTS' 'UX' 'UY') VN1 'GRADGEO' COEFVECT ;
  876.  
  877. GRADA2 ALA2 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  878. ('MOTS' 'SCAL') AL2 'GRADGEO' COEFSCAL ;
  879.  
  880. GRADR2 ALR2 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  881. ('MOTS' 'SCAL') RN2 'GRADGEO' COEFSCAL ;
  882.  
  883. GRADP2 ALP2 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  884. ('MOTS' 'SCAL') PN2 'GRADGEO' COEFSCAL ;
  885.  
  886. GRADV2 ALV2 = 'PENT' $DOMTOT 'CENTRE' 'EULEVECT' 'LIMITEUR'
  887. ('MOTS' 'UX' 'UY') VN2 'GRADGEO' COEFVECT ;
  888.  
  889. CHFAL1 CHFAL2 CHFRN1 CHFRN2 CHFVN1 CHFVN2 CHFPN1 CHFPN2 =
  890. 'PRET' 'DEM' $DOMTOT
  891. AL1 GRADA1 ALA1
  892. AL2 GRADA2 ALA2
  893. * AL1 GRADA1 ALR0
  894. * AL2 GRADA2 ALR0
  895. RN1 GRADR1 ALR1
  896. RN2 GRADR2 ALR2
  897. VN1 GRADV1 ALV1
  898. VN2 GRADV2 ALV2
  899. PN1 GRADP1 ALP1
  900. PN2 GRADP2 ALP2 ;
  901.  
  902. 'SINON' ;
  903.  
  904. CHFAL1 CHFAL2 CHFRN1 CHFRN2 CHFVN1 CHFVN2 CHFPN1 CHFPN2 =
  905. 'PRET' 'DEM' $DOMTOT
  906. AL1 GRADR0 ALR0
  907. AL2 GRADR0 ALR0
  908. RN1 GRADR0 ALR0
  909. RN2 GRADR0 ALR0
  910. VN1 GRADV0 ALV0
  911. VN2 GRADV0 ALV0
  912. PN1 GRADR0 ALR0
  913. PN2 GRADR0 ALR0 ;
  914.  
  915. 'FINSI' ;
  916.  
  917. SI ('EGA' METO 'AUSMPUP') ;
  918. RESIDU DELTAT SURF = 'KONV' 'VF' 'DEM' 'RESI' METO 'CONS'
  919. $DOMTOT PGAS LISTINCO AL1 AL2 CHFAL1 CHFAL2 CHFRN1 CHFRN2
  920. CHFVN1 CHFVN2 CHFPN1 CHFPN2 K0 GRALP1 EPS KONLIM VINF1 VINF2 ;
  921. 'SINON' ;
  922. RESIDU DELTAT SURF = 'KONV' 'VF' 'DEM' 'RESI' METO 'CONS'
  923. $DOMTOT PGAS LISTINCO AL1 AL2 CHFAL1 CHFAL2 CHFRN1 CHFRN2
  924. CHFVN1 CHFVN2 CHFPN1 CHFPN2 K0 GRALP1 EPS KONLIM ;
  925. 'FINSI' ;
  926.  
  927. RESIDU = RESIDU '+' RESLIM ;
  928. *
  929. * 'REPETER' BL1 ('DIME' LISTINCO) ;
  930. * mot1 = 'EXTRAIRE' LISTINCO &BL1 ;
  931. * valre1 = 'MAXIMUM' ('EXCO' RESLIM mot1) 'ABS' ;
  932. * tit1 = 'CHAINE' 'Component ' mot1 ', reference value ' valre1 ;
  933. * evaa = 'EVOL' 'CHPO' RESIDU mot1 LIGEVO ;
  934. * 'DESSIN' evaa 'TITRE' tit1 ;
  935. * 'FIN' BL1 ;
  936.  
  937. * 'OPTION' DONN 5 ;
  938. * Problem with RNY1, RNY2
  939.  
  940. DT_CON = SAFFAC '*' DELTAT ;
  941. *
  942. **** The time step linked to tps
  943. *
  944.  
  945. DTTPS = (TFINAL '-' TPS) * (1. '+' 1.0D-6) ;
  946.  
  947. *
  948. **** Total time step
  949. *
  950.  
  951. DTMIN = 'MINIMUM' ('PROG' DT_CON DTTPS) ;
  952.  
  953. *
  954. **** Increment of the variables (predictor)
  955. *
  956. * RN1 RN2 VN1 VN2 PN1 PN2 TN1 TN2 = 'PRIM' 'DEM' PGAS AL1 AL2
  957. * ARN1 ARN2 AGN1 AGN2 AREN1 AREN2 CHTN1 CHTN2 EPS ;
  958.  
  959. RESIDU = (0.5 * DTMIN) '*' RESIDU ;
  960.  
  961. DALP1 = 'EXCO' 'ALF1' RESIDU 'SCAL' ;
  962. DRN1 = 'EXCO' 'RN1' RESIDU 'SCAL' ;
  963. DGN1 = 'EXCO' ('MOTS' 'RNX1' 'RNY1') RESIDU ('MOTS' 'UX' 'UY') ;
  964. DRET1 = 'EXCO' 'RET1' RESIDU 'SCAL' ;
  965. DALP2 = 'EXCO' 'ALF2' RESIDU 'SCAL' ;
  966. DRN2 = 'EXCO' 'RN2' RESIDU 'SCAL' ;
  967. DGN2 = 'EXCO' ('MOTS' 'RNX2' 'RNY2') RESIDU ('MOTS' 'UX' 'UY') ;
  968. DRET2 = 'EXCO' 'RET2' RESIDU 'SCAL' ;
  969.  
  970. AL1B = AL1 '+' DALP1 ;
  971. ARN1B = ARN1 '+' DRN1 ;
  972. AGN1B = AGN1 '+' DGN1 ;
  973. AREN1B = AREN1 '+' DRET1 ;
  974. AL2B = AL2 '+' DALP2 ;
  975. ARN2B = ARN2 '+' DRN2 ;
  976. AGN2B = AGN2 '+' DGN2 ;
  977. AREN2B = AREN2 '+' DRET2 ;
  978.  
  979. *
  980. **** Corrector
  981. *
  982.  
  983. RN1 RN2 VN1 VN2 PN1 PN2 TN1 TN2 = 'PRIM' 'DEM' PGAS AL1B AL2B
  984. ARN1B ARN2B AGN1B AGN2B AREN1B AREN2B TN1M TN2M EPS ;
  985.  
  986. **** Gradient of alpha
  987.  
  988. GRALP1 = 'PENT' $DOMTOT 'FACE'
  989. 'DIAMAN2' ('MOTS' 'SCAL') ('MOTS' 'P1DX' 'P1DY')
  990. AL1B CHPL1 CHPL2 'GRADGEO' GRAL ;
  991. * 'SI' VRAI ;
  992. * V1 = 'VECTEUR'
  993. * ('NOMC' ('MOTS' 'P1DX' 'P1DY') GRALP1 ('MOTS' 'UX' 'UY')) ;
  994. * 'TRACER' DOMTOT V1 DOMLIM ;
  995. * 'FINSI' ;
  996. GRALP1 = GRALP1 '+' EPSGR ;
  997. GRALP1 = GRALP1 '/' (('PSCAL' GRALP1 GRALP1 ('MOTS' 'P1DX' 'P1DY')
  998. ('MOTS' 'P1DX' 'P1DY')) '**' 0.5) ;
  999.  
  1000. 'SI' LOGSO ;
  1001.  
  1002. GRADA1 ALA1 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  1003. ('MOTS' 'SCAL') AL1B 'GRADGEO' COEFSCAL ;
  1004.  
  1005. GRADR1 ALR1 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  1006. ('MOTS' 'SCAL') RN1 'GRADGEO' COEFSCAL ;
  1007.  
  1008. GRADP1 ALP1 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  1009. ('MOTS' 'SCAL') PN1 'GRADGEO' COEFSCAL ;
  1010.  
  1011. GRADV1 ALV1 = 'PENT' $DOMTOT 'CENTRE' 'EULEVECT' 'LIMITEUR'
  1012. ('MOTS' 'UX' 'UY') VN1 'GRADGEO' COEFVECT ;
  1013.  
  1014. GRADA2 ALA2 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  1015. ('MOTS' 'SCAL') AL2B 'GRADGEO' COEFSCAL ;
  1016.  
  1017. GRADR2 ALR2 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  1018. ('MOTS' 'SCAL') RN2 'GRADGEO' COEFSCAL ;
  1019.  
  1020. GRADP2 ALP2 = 'PENT' $DOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  1021. ('MOTS' 'SCAL') PN2 'GRADGEO' COEFSCAL ;
  1022.  
  1023. GRADV2 ALV2 = 'PENT' $DOMTOT 'CENTRE' 'EULEVECT' 'LIMITEUR'
  1024. ('MOTS' 'UX' 'UY') VN2 'GRADGEO' COEFVECT ;
  1025.  
  1026. CHFAL1 CHFAL2 CHFRN1 CHFRN2 CHFVN1 CHFVN2 CHFPN1 CHFPN2 =
  1027. 'PRET' 'DEM' $DOMTOT
  1028. AL1B GRADA1 ALA1
  1029. AL2B GRADA2 ALA2
  1030. * AL1 GRADA1 ALR0
  1031. * AL2 GRADA2 ALR0
  1032. RN1 GRADR1 ALR1
  1033. RN2 GRADR2 ALR2
  1034. VN1 GRADV1 ALV1
  1035. VN2 GRADV2 ALV2
  1036. PN1 GRADP1 ALP1
  1037. PN2 GRADP2 ALP2 ;
  1038.  
  1039. 'SINON' ;
  1040.  
  1041. CHFAL1 CHFAL2 CHFRN1 CHFRN2 CHFVN1 CHFVN2 CHFPN1 CHFPN2 =
  1042. 'PRET' 'DEM' $DOMTOT
  1043. AL1B GRADR0 ALR0
  1044. AL2B GRADR0 ALR0
  1045. RN1 GRADR0 ALR0
  1046. RN2 GRADR0 ALR0
  1047. VN1 GRADV0 ALV0
  1048. VN2 GRADV0 ALV0
  1049. PN1 GRADR0 ALR0
  1050. PN2 GRADR0 ALR0 ;
  1051.  
  1052. 'FINSI' ;
  1053.  
  1054. SI ('EGA' METO 'AUSMPUP') ;
  1055. RESIDU DELTAT SURF = 'KONV' 'VF' 'DEM' 'RESI' METO 'CONS'
  1056. $DOMTOT PGAS LISTINCO AL1B AL2B CHFAL1 CHFAL2 CHFRN1 CHFRN2
  1057. CHFVN1 CHFVN2 CHFPN1 CHFPN2 K0 GRALP1 EPS KONLIM VINF1 VINF2 ;
  1058. 'SINON' ;
  1059. RESIDU DELTAT SURF = 'KONV' 'VF' 'DEM' 'RESI' METO 'CONS'
  1060. $DOMTOT PGAS LISTINCO AL1B AL2B CHFAL1 CHFAL2 CHFRN1 CHFRN2
  1061. CHFVN1 CHFVN2 CHFPN1 CHFPN2 K0 GRALP1 EPS KONLIM ;
  1062. 'FINSI' ;
  1063.  
  1064. RESIDU = RESIDU '+' RESLIM ;
  1065. *
  1066. * 'REPETER' BL1 ('DIME' LISTINCO) ;
  1067. * mot1 = 'EXTRAIRE' LISTINCO &BL1 ;
  1068. * valre1 = 'MAXIMUM' ('EXCO' RESLIM mot1) 'ABS' ;
  1069. * tit1 = 'CHAINE' 'Component ' mot1 ', reference value ' valre1 ;
  1070. * evaa = 'EVOL' 'CHPO' RESIDU mot1 LIGEVO ;
  1071. * 'DESSIN' evaa 'TITRE' tit1 ;
  1072. * 'FIN' BL1 ;
  1073.  
  1074. * 'OPTION' DONN 5 ;
  1075. * Problem with RNY1, RNY2
  1076.  
  1077.  
  1078. RESIDU = DTMIN '*' RESIDU ;
  1079.  
  1080. DALP1 = 'EXCO' 'ALF1' RESIDU 'SCAL' ;
  1081. DRN1 = 'EXCO' 'RN1' RESIDU 'SCAL' ;
  1082. DGN1 = 'EXCO' ('MOTS' 'RNX1' 'RNY1') RESIDU ('MOTS' 'UX' 'UY') ;
  1083. DRET1 = 'EXCO' 'RET1' RESIDU 'SCAL' ;
  1084. DALP2 = 'EXCO' 'ALF2' RESIDU 'SCAL' ;
  1085. DRN2 = 'EXCO' 'RN2' RESIDU 'SCAL' ;
  1086. DGN2 = 'EXCO' ('MOTS' 'RNX2' 'RNY2') RESIDU ('MOTS' 'UX' 'UY') ;
  1087. DRET2 = 'EXCO' 'RET2' RESIDU 'SCAL' ;
  1088.  
  1089. TPS = TPS '+' DTMIN ;
  1090. AL1 = AL1 '+' DALP1 ;
  1091. ARN1 = ARN1 '+' DRN1 ;
  1092. AGN1 = AGN1 '+' DGN1 ;
  1093. AREN1 = AREN1 '+' DRET1 ;
  1094. AL2 = AL2 '+' DALP2 ;
  1095. ARN2 = ARN2 '+' DRN2 ;
  1096. AGN2 = AGN2 '+' DGN2 ;
  1097. AREN2 = AREN2 '+' DRET2 ;
  1098.  
  1099. 'SI' (((&BLITER '/' 20) '*' 20) 'EGA' &BLITER) ;
  1100. 'MESSAGE' ('CHAINE' 'ITER =' &BLITER ' TPS =' TPS) ;
  1101. 'FINSI' ;
  1102.  
  1103. 'SI' (TPS > TFINAL) ;
  1104. 'QUITTER' BLITER ;
  1105. 'FINSI' ;
  1106.  
  1107. 'FIN' BLITER ;
  1108. * 'TEMPS' 'IMPR' ;
  1109. 'TEMPS' ;
  1110.  
  1111. * 'OPTION' 'SAUVER'
  1112. * ('CHAINE' '/RES/alberto/Dgros/result_tube1D.sauv_' RAF
  1113. * 'tps_' TPS ) ;
  1114. * 'SAUVER' ;
  1115. * 'FIN' ;
  1116.  
  1117.  
  1118. ****************************************************************
  1119. ****************************************************************
  1120. ***** The post-treatment ******
  1121. ****************************************************************
  1122. ****************************************************************
  1123.  
  1124. * 'OPTI' 'REST' 'result.sauv_1tps_5' ;
  1125. * 'REST' ;
  1126.  
  1127. ****************************************************************
  1128. ****************************************************************
  1129. ***** The post-treatment ******
  1130. ****************************************************************
  1131. ****************************************************************
  1132.  
  1133. * 'OPTI' 'REST' 'result.sauv_1tps_5' ;
  1134. * 'REST' ;
  1135.  
  1136. *
  1137. **** The mesh
  1138. *
  1139.  
  1140. * 'SI' GRAPH ;
  1141. * 'TRACER' ('DOMA' $DOMTOT 'MAILLAGE')
  1142. * 'TITR' ('CHAINE' 'Maillage: ' ('NBEL' DOMTOT) ' elts');
  1143. * 'FINSI' ;
  1144.  
  1145. *
  1146. **** Initial conditions
  1147. *
  1148.  
  1149. MOD1 = 'MODELISER' ('DOMA' $DOMTOT 'MAILLAGE') 'THERMIQUE' ;
  1150.  
  1151. 'SI' FAUX ;
  1152.  
  1153. RN10 RN20 VN10 VN20 PN10 PN20 TN10 TN20 = 'PRIM' 'DEM' PGAS
  1154. AL10 AL20 ARN10 ARN20 AGN10 AGN20 AREN10 AREN20 TN1M TN2M EPS ;
  1155.  
  1156. CHM_AL10 = 'KCHA' $DOMTOT 'CHAM' AL10 ;
  1157. CHM_RN10 = 'KCHA' $DOMTOT 'CHAM' RN10 ;
  1158. CHM_VN10 = 'KCHA' $DOMTOT 'CHAM' VN10 ;
  1159. CHM_PN10 = 'KCHA' $DOMTOT 'CHAM' PN10 ;
  1160. CHM_TN10 = 'KCHA' $DOMTOT 'CHAM' TN10 ;
  1161. CHM_AL20 = 'KCHA' $DOMTOT 'CHAM' AL20 ;
  1162. CHM_RN20 = 'KCHA' $DOMTOT 'CHAM' RN20 ;
  1163. CHM_VN20 = 'KCHA' $DOMTOT 'CHAM' VN20 ;
  1164. CHM_PN20 = 'KCHA' $DOMTOT 'CHAM' PN20 ;
  1165. CHM_TN20 = 'KCHA' $DOMTOT 'CHAM' TN20 ;
  1166.  
  1167. 'TRAC' CHM_AL10 MOD1
  1168. 'TITR' ('CHAINE' 'alp_1 at t=' 0.0) ;
  1169. 'TRAC' CHM_RN10 MOD1
  1170. 'TITR' ('CHAINE' 'rho_1 at t=' 0.0) ;
  1171. 'TRAC' CHM_VN10 MOD1
  1172. 'TITR' ('CHAINE' 'v_1 at t= ' 0.0) ;
  1173. 'TRAC' CHM_PN10 MOD1
  1174. 'TITR' ('CHAINE' 'p_1 at t= ' 0.0) ;
  1175. 'TRAC' CHM_TN10 MOD1
  1176. 'TITR' ('CHAINE' 'T_1 at t= ' 0.0) ;
  1177. 'TRAC' CHM_AL20 MOD1
  1178. 'TITR' ('CHAINE' 'alp_2 at t=' 0.0) ;
  1179. 'TRAC' CHM_RN20 MOD1
  1180. 'TITR' ('CHAINE' 'rho_2 at t=' 0.0) ;
  1181. 'TRAC' CHM_VN20 MOD1
  1182. 'TITR' ('CHAINE' 'v_2 at t= ' 0.0) ;
  1183. 'TRAC' CHM_PN20 MOD1
  1184. 'TITR' ('CHAINE' 'p_2 at t= ' 0.0) ;
  1185. 'TRAC' CHM_TN20 MOD1
  1186. 'TITR' ('CHAINE' 'T_2 at t= ' 0.0) ;
  1187.  
  1188. 'FINSI' ;
  1189.  
  1190. *
  1191. **** Results
  1192. *
  1193.  
  1194. RN1 RN2 VN1 VN2 PN1 PN2 TN1 TN2 = 'PRIM' 'DEM' PGAS AL1 AL2
  1195. ARN1 ARN2 AGN1 AGN2 AREN1 AREN2 TN1M TN2M EPS ;
  1196.  
  1197. 'SI' FAUX ;
  1198.  
  1199. CHM_AL1 = 'KCHA' $DOMTOT 'CHAM' AL1 ;
  1200. CHM_RN1 = 'KCHA' $DOMTOT 'CHAM' RN1 ;
  1201. CHM_VN1 = 'KCHA' $DOMTOT 'CHAM' VN1 ;
  1202. CHM_PN1 = 'KCHA' $DOMTOT 'CHAM' PN1 ;
  1203. CHM_TN1 = 'KCHA' $DOMTOT 'CHAM' TN1 ;
  1204. CHM_AL2 = 'KCHA' $DOMTOT 'CHAM' AL2 ;
  1205. CHM_RN2 = 'KCHA' $DOMTOT 'CHAM' RN2 ;
  1206. CHM_VN2 = 'KCHA' $DOMTOT 'CHAM' VN2 ;
  1207. CHM_PN2 = 'KCHA' $DOMTOT 'CHAM' PN2 ;
  1208. CHM_TN2 = 'KCHA' $DOMTOT 'CHAM' TN2 ;
  1209.  
  1210. 'TRAC' CHM_AL1 MOD1
  1211. 'TITR' ('CHAINE' 'alp_1 at t=' TPS) ;
  1212. 'TRAC' CHM_RN1 MOD1
  1213. 'TITR' ('CHAINE' 'rho_1 at t=' TPS) ;
  1214. 'TRAC' CHM_VN1 MOD1
  1215. 'TITR' ('CHAINE' 'v_1 at t= ' TPS) ;
  1216. 'TRAC' CHM_PN1 MOD1
  1217. 'TITR' ('CHAINE' 'p_1 at t= ' TPS) ;
  1218. 'TRAC' CHM_TN1 MOD1
  1219. 'TITR' ('CHAINE' 'T_1 at t= ' TPS) ;
  1220. 'TRAC' CHM_AL2 MOD1
  1221. 'TITR' ('CHAINE' 'alp_2 at t=' TPS) ;
  1222. 'TRAC' CHM_RN2 MOD1
  1223. 'TITR' ('CHAINE' 'rho_2 at t=' TPS) ;
  1224. 'TRAC' CHM_VN2 MOD1
  1225. 'TITR' ('CHAINE' 'v_2 at t= ' TPS) ;
  1226. 'TRAC' CHM_PN2 MOD1
  1227. 'TITR' ('CHAINE' 'p_2 at t= ' TPS) ;
  1228. 'TRAC' CHM_TN2 MOD1
  1229. 'TITR' ('CHAINE' 'T_2 at t= ' TPS) ;
  1230.  
  1231. 'FINSI' ;
  1232.  
  1233. *
  1234. *** Evolution Objects. We put the speed in a frame
  1235. * parallel to the mesh.
  1236. *
  1237.  
  1238. VN1old = 'COPIER' VN1 ;
  1239. VN2old = 'COPIER' VN2 ;
  1240. UX1N = (('EXCO' 'UX' VN1) * ('COS' ANGLE)) '+'
  1241. (('EXCO' 'UY' VN1) * ('SIN' ANGLE)) ;
  1242. UY1N = (('EXCO' 'UX' VN1) * ('SIN' ANGLE)) '-'
  1243. (('EXCO' 'UY' VN1) * ('COS' ANGLE)) ;
  1244. UX2N = (('EXCO' 'UX' VN2) * ('COS' ANGLE)) '+'
  1245. (('EXCO' 'UY' VN2) * ('SIN' ANGLE)) ;
  1246. UY2N = (('EXCO' 'UX' VN2) * ('SIN' ANGLE)) '-'
  1247. (('EXCO' 'UY' VN2) * ('COS' ANGLE)) ;
  1248. VN1 = ('NOMC' UX1N 'UX') '+' ('NOMC' UY1N 'UY') ;
  1249. VN2 = ('NOMC' UX2N 'UX') '+' ('NOMC' UY2N 'UY') ;
  1250.  
  1251. LXMED = 'PROG' ('DIME' LEX_XOT) '*' 1.0 ;
  1252.  
  1253. TABLEG = 'TABLE' ;
  1254. TABLEG . 1 = 'MOT' 'TIRC MARQ PLUS' ;
  1255. TABLEG . 2 = 'MOT' 'TIRC MARQ CROI' ;
  1256. TABLEG . 3 = 'MOT' '' ;
  1257. TABLEG . 'TITRE' = 'TABLE' ;
  1258. TABLEG . 'TITRE' . 1 = 'MOT' 'phase 1' ;
  1259. TABLEG . 'TITRE' . 2 = 'MOT' 'phase 2' ;
  1260. TABLEG . 'TITRE' . 3 = 'MOT' 'alp_1*ph_1 + alp_2 ph_2' ;
  1261.  
  1262. TABLE2 = 'TABLE' ;
  1263. TABLE2 . 1 = 'MOT' 'TIRC MARQ PLUS' ;
  1264. TABLE2 . 2 = 'MOT' '' ;
  1265. TABLE2 . 'TITRE' = 'TABLE' ;
  1266. TABLE2 . 'TITRE' . 1 = 'MOT' 'Num' ;
  1267. TABLE2 . 'TITRE' . 2 = 'MOT' 'Exa' ;
  1268.  
  1269. eval1 = ('EVOL' 'CHPO' al1 LIGEVO) 'COULEUR' 'ROUG' ;
  1270. eval2 = ('EVOL' 'CHPO' al2 LIGEVO) 'COULEUR' 'BLEU' ;
  1271. evone = (eval1 '+' eval2) 'COULEUR' 'VERT' ;
  1272. xmin = 'MINIMUM' ('EXTRAIRE' eval1 'ABSC') ;
  1273. xmax = 'MAXIMUM' ('EXTRAIRE' eval1 'ABSC') ;
  1274.  
  1275. evrn1 = ('EVOL' 'CHPO' rn1 LIGEVO) 'COULEUR' 'ROUG' ;
  1276. evrn2 = ('EVOL' 'CHPO' rn2 LIGEVO) 'COULEUR' 'BLEU' ;
  1277. evrn = ((eval1 * evrn1) '+' (eval2 * evrn2)) 'COULEUR' 'VERT' ;
  1278. evrna = 'EVOL' 'MANU' 'x' (LXMED '+' (LEX_XOT * TFINAL * -1))
  1279. 'SCAL' LEX_RHO ;
  1280.  
  1281. evpn1 = ('EVOL' 'CHPO' pn1 LIGEVO) 'COULEUR' 'ROUG' ;
  1282. evpn2 = ('EVOL' 'CHPO' pn2 LIGEVO) 'COULEUR' 'BLEU' ;
  1283. evpn = ((eval1 * evpn1) '+' (eval2 * evpn2)) 'COULEUR' 'VERT' ;
  1284. evpna = 'EVOL' 'MANU' 'x' (LXMED '+' (LEX_XOT * TFINAL * -1))
  1285. 'SCAL' LEX_P ;
  1286.  
  1287. evux1 = ('EVOL' 'CHPO' vn1 LIGEVO 'UX') 'COULEUR' 'ROUG' ;
  1288. evux2 = ('EVOL' 'CHPO' vn2 LIGEVO 'UX') 'COULEUR' 'BLEU' ;
  1289. evux = ((eval1 * evux1) '+' (eval2 * evux2)) 'COULEUR' 'VERT' ;
  1290. evuna = 'EVOL' 'MANU' 'x' (LXMED '+' (LEX_XOT * TFINAL * -1))
  1291. 'SCAL' (-1 * LEX_U) ;
  1292.  
  1293. evuy1 = ('EVOL' 'CHPO' vn1 LIGEVO 'UY') 'COULEUR' 'ROUG' ;
  1294. evuy2 = ('EVOL' 'CHPO' vn2 LIGEVO 'UY') 'COULEUR' 'BLEU' ;
  1295. evuy = ((eval1 * evuy1) '+' (eval2 * evuy2)) 'COULEUR' 'VERT' ;
  1296.  
  1297. evtn1 = ('EVOL' 'CHPO' tn1 LIGEVO) 'COULEUR' 'ROUG' ;
  1298. evtn2 = ('EVOL' 'CHPO' tn2 LIGEVO) 'COULEUR' 'BLEU' ;
  1299. evtn = ((eval1 * evtn1) '+' (eval2 * evtn2)) 'COULEUR' 'VERT' ;
  1300. evtna = 'EVOL' 'MANU' 'x' (LXMED '+' (LEX_XOT * TFINAL * -1))
  1301. 'SCAL' LEX_T ;
  1302.  
  1303. RET = AREN1 '+' AREN2 ;
  1304. evret = ('EVOL' 'CHPO' RET LIGEVO) 'COULEUR' 'VERT' ;
  1305. evreta = 'EVOL' 'MANU' 'x' (LXMED '+' (LEX_XOT * TFINAL * -1))
  1306. 'SCAL' LEX_RET ;
  1307.  
  1308.  
  1309. 'SI' GRAPH ;
  1310. 'DESSIN' (eval1 'ET' eval2 'ET' evone) 'TITRE'
  1311. 'alpha (alp_1 + alp_2)'
  1312. 'LEGE' TABLEG 'XBOR' XMIN XMAX ;
  1313.  
  1314. 'DESSIN' ((evone '-' (evone '/' evone))) 'TITRE'
  1315. '(alp_1 + alp_2), error' ;
  1316.  
  1317. 'DESSIN' (evrn1 'ET' evrn2 'ET' evrn) 'TITRE' 'Density'
  1318. 'LEGE' TABLEG 'XBOR' XMIN XMAX ;
  1319.  
  1320. 'DESSIN' (evrn et evrna) 'TITRE' 'Density' 'LEGE' TABLE2
  1321. 'XBOR' XMIN XMAX ;
  1322.  
  1323. 'DESSIN' (evpn1 'ET' evpn2 'ET' evpn) 'TITRE' 'Pressure'
  1324. 'LEGE' TABLEG 'XBOR' XMIN XMAX ;
  1325.  
  1326. 'DESSIN' (evpn et evpna) 'TITRE' 'Pressure' 'LEGE' TABLE2
  1327. 'XBOR' XMIN XMAX ;
  1328.  
  1329. 'DESSIN' (evtn1 'ET' evtn2 'ET' evtn) 'TITRE' 'Temperature'
  1330. 'LEGE' TABLEG 'XBOR' XMIN XMAX ;
  1331.  
  1332. 'DESSIN' (evtn et evtna) 'TITRE' 'Temperature' 'LEGE' TABLE2
  1333. 'XBOR' XMIN XMAX ;
  1334.  
  1335. 'DESSIN' (evux1 'ET' evux2 'ET' evux) 'TITRE' 'ux'
  1336. 'LEGE' TABLEG 'XBOR' XMIN XMAX ;
  1337.  
  1338. 'DESSIN' (evux et evuna) 'TITRE' 'ux' 'LEGE' TABLE2
  1339. 'XBOR' XMIN XMAX ;
  1340.  
  1341. 'DESSIN' (evuy1 'ET' evuy2 'ET' evuy) 'TITRE' 'uy'
  1342. 'LEGE' TABLEG 'XBOR' XMIN XMAX ;
  1343.  
  1344. 'DESSIN' (evuy) 'TITRE' 'uy' 'XBOR' XMIN XMAX ;
  1345.  
  1346. 'DESSIN' (evret et evreta) 'TITRE' 'ret' 'LEGE' TABLE2
  1347. 'XBOR' XMIN XMAX ;
  1348.  
  1349. 'FINSI' ;
  1350.  
  1351. *
  1352. **** Test
  1353. *
  1354. lxa = 'EXTRAIRE' EVRNA 'ABSC' ;
  1355. lrhoa = 'EXTRAIRE' EVRNA 'ORDO' ;
  1356. lx = 'EXTRAIRE' EVRN 'ABSC' ;
  1357. lrho = 'EXTRAIRE' EVRN 'ORDO' ;
  1358. lrhoa1 = 'IPOL' lx lxa lrhoa ;
  1359. erro = 'ABS' ((lrho '-' lrhoa1) '/' lrhoa1) ;
  1360. everro = 'EVOL' 'MANU' 'x' lx 'y' erro ;
  1361. erroint = ('PRIM' everro) ;
  1362. 'SI' GRAPH ;
  1363. 'DESSIN' everro 'TITRE' 'Erreur' ;
  1364. 'DESSIN' erroint 'TITRE' 'Integral de l Erreur' ;
  1365. 'FINSI' ;
  1366. errL1 = ('MAXIMUM' ('EXTRAIRE' erroint 'ORDO')) '/'
  1367. ('MAXIMUM' lx) ;
  1368. 'MESSAGE' ;
  1369. 'MESSAGE' ('CHAINE' 'ERR_L1 = ' errL1) ;
  1370. 'MESSAGE' ;
  1371.  
  1372. SI (errL1 > 5.0D-2) ;
  1373. 'ERREUR' 'errL1 too big !!! ' ;
  1374. 'ERREUR' 5 ;
  1375. 'FINSI' ;
  1376. *
  1377. * Conservation of the total energy
  1378. *
  1379. CHVO = TDOMTOT . 'XXVOLUM' ;
  1380. RETN0 = AREN10 '+' AREN20 ;
  1381. TOTE0 = 'XTY' RETN0 CHVO ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  1382. RETN = AREN1 '+' AREN2 ;
  1383. TOTE = 'XTY' RETN CHVO ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  1384. ERRO = 'ABS' (TOTE '-' TOTE0) '/' TOTE ;
  1385. SI (ERRO > 1.0D-6) ;
  1386. 'MESSAGE' ('CHAINE' 'Energy error ' erro) ;
  1387. 'MESSAGE' 'Conservation of the total energy' ;
  1388. 'ERREUR' 21 ;
  1389. 'FINSI' ;
  1390.  
  1391. 'FIN' ;
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  

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