Télécharger konv_resi_dem_stationaryshock_21.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier : konv_resi_dem_stationaryshock_21.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4. ***************************************************************
  5. **** APPROCHE VF "Cell-Centred Formulation" pour la ****
  6. **** solution des ****
  7. **** Equations d'Euler pour un gaz parfait ****
  8. **** Approche DEM pour la combustion ****
  9. **** OPERATEURS PRET, KONV ****
  10. **** ****
  11. **** Consistency in the case of reactive stationary shock. ****
  12. **** Left state = phase 2 ****
  13. **** Right state = phase 1 ****
  14. **** ****
  15. **** Methodes: SS, VLH ****
  16. **** ****
  17. **** A. BECCANTINI DM2S/SFME/LTMF DECEMBRE 2009 ****
  18. ***************************************************************
  19.  
  20.  
  21. 'OPTION' 'DIME' 2 ;
  22. 'OPTION' 'ELEM' QUA4 ;
  23. 'OPTION' 'ECHO' 1 ;
  24. 'OPTION' 'TRAC' 'X' ;
  25.  
  26. *
  27. *** GRAPH
  28. *
  29.  
  30. GRAPH = FAUX ;
  31. * GRAPH = VRAI ;
  32.  
  33. **** Cas homogene : la table proprieté de gaz
  34.  
  35. *************************************************
  36. **** The table for the properties of the gas ****
  37. *************************************************
  38. *
  39. PGAS = 'TABLE' ;
  40. *
  41. **** Order of the polynomial order for cv = cv(T)
  42. * For T > TMAX, cv(T) = cv(Tmax)
  43. *
  44. PGAS . 'TMAX' = 6000.0 ;
  45. PGAS . 'NORD' = 4 ;
  46. *
  47. **** Species involved in the mixture (before or after
  48. * the chemical reaction)
  49. *
  50. PGAS . 'SPECIES' = 'MOTS' 'H2 ' 'O2 ' 'H2O ' 'N2 ' ;
  51. *
  52. *
  53. **** Coefficient of the chemical reaction.
  54. * Note that for the first species this coefficient should be positive
  55. * Normal, we take it equal to 1.
  56. *
  57. * H2 '+' 0.5 O2 ---> H2O
  58. *
  59. PGAS . 'CHEMCOEF' = 'PROG' 1.0 0.5 -1.0 0.0 ;
  60. *
  61. **** Mass fraction of the first species before and after the combustion
  62. * Final mass fractions of the species with positive coefficients.
  63. * Final mass fractions of the species with non-positive coefficient.
  64. * The mass fraction of the last species is not given.
  65. *
  66. PGAS . 'MASSFRA' = 'PROG' 0.285219E-01 0.964039E-11 0.765104E-10
  67. 0.127442E-10 ;
  68. PGAS . 'MASSFRA' = 'PROG' 0.285219E-01 0.964039E-11 0.765104E-10
  69. 0.127442E-10 ;
  70. *
  71. **** Coef with the gas properties
  72. *
  73. PGAS . 'H2 ' = 'TABLE' ;
  74. PGAS . 'H2O ' = 'TABLE' ;
  75. PGAS . 'N2 ' = 'TABLE' ;
  76. PGAS . 'O2 ' = 'TABLE' ;
  77. *
  78. **** Runiv (J/mole/K)
  79. *
  80. PGAS . 'RUNIV' = 8.31441 ;
  81. *
  82. **** W (kg/mole). Gas constant (J/kg/K = Runiv/W)
  83. *
  84. PGAS . 'H2 ' . 'W' = 2. * 1.00797E-3 ;
  85. PGAS . 'O2 ' . 'W' = 2. * 15.9994E-3 ;
  86. PGAS . 'H2O ' . 'W' = (PGAS . 'H2 ' . 'W' ) '+'
  87. (0.5 * (PGAS . 'O2 ' . 'W' )) ;
  88. PGAS . 'N2 ' . 'W' = 2 * 14.0067E-3 ;
  89. *
  90. **** Polynomial coefficients
  91. *
  92. PGAS . 'H2 ' . 'A' = 'PROG' 9834.91866 0.54273926 0.000862203836
  93. -2.37281455E-07 1.84701105E-11 ;
  94. PGAS . 'H2O ' . 'A' = 'PROG' 1155.95625 0.768331151 -5.73129958E-05
  95. -1.82753232E-08 2.44485692E-12 ;
  96. PGAS . 'N2 ' . 'A' = 'PROG' 652.940766 0.288239099 -7.80442298E-05
  97. 8.78233606E-09 -3.05514485E-13 ;
  98. PGAS . 'O2 ' . 'A' = 'PROG' 575.012333 0.350522002 -0.000128294865
  99. 2.33636971E-08 -1.53304905E-12;
  100. *
  101. **** Formation enthalpies (energies) at 0K (J/Kg)
  102. *
  103. PGAS . 'H2 ' . 'H0K' = -4.195D6 ;
  104. PGAS . 'H2O ' . 'H0K' = -1.395D7 ;
  105. PGAS . 'N2 ' . 'H0K' = -2.953D5 ;
  106. PGAS . 'O2 ' . 'H0K' = -2.634D5 ;
  107.  
  108.  
  109. ***************************
  110. ***** DOMAINE SPATIAL ****
  111. ***************************
  112.  
  113. A1 = 0.0D0 0.0D0;
  114. A2 = 1.0D0 0.0D0;
  115. A3 = 3.0D0 0.0D0;
  116. A4 = 3.0D0 1.0D0;
  117. A5 = 1.0D0 1.0D0;
  118. A6 = 0.0D0 1.0D0;
  119.  
  120. L12 = A1 'DROIT' 1 A2;
  121. L23 = A2 'DROIT' 1 A3;
  122. L34 = A3 'DROIT' 1 A4;
  123. L45 = A4 'DROIT' 1 A5;
  124. L56 = A5 'DROIT' 1 A6;
  125. L61 = A6 'DROIT' 1 A1;
  126. L25 = A2 'DROIT' 1 A5;
  127.  
  128. DOM10 = 'DALL' L12 L25 L56 L61
  129. 'PLANE';
  130. DOM20 = 'DALL' L23 L34 L45 ('INVERSE' L25)
  131. 'PLANE';
  132.  
  133. *
  134. *** Point ou on controlle la consistence
  135. *
  136.  
  137. P10 = 1.0 0.5;
  138.  
  139. *
  140. EPS = 1.0D-16 ;
  141. K0 = 45.2 ;
  142. *
  143. *******************************************
  144. *** Etats gauche et droite ****************
  145. *******************************************
  146. *
  147. * Case 1 -> 2
  148. * Reactive stationary shock.
  149. *
  150. epsv = 0.0 ;
  151. tg1 = 327.0 ;
  152. td1 = 327.0 ;
  153. pg1 = 139000.0 ;
  154. pd1 = 139000.0 ;
  155. ung1 = -45.2 '-' epsv ;
  156. und1 = -45.2 '-' epsv ;
  157. utg1 = 0.0 ;
  158. utd1 = 0.0 ;
  159. * utg1 = 0.0 ;
  160. * utd1 = 0.0 ;
  161. tg2 = 2518.582685186033 ;
  162. td2 = 2518.582685186033 ;
  163. pg2 = 125279.9833247705 ;
  164. pd2 = 125279.9833247705 ;
  165. ung2 = -329.121088555842 '-' epsv ;
  166. und2 = -329.121088555842 '-' epsv ;
  167. utg2 = 0.0 ;
  168. utd2 = 0.0 ;
  169.  
  170. TN1 = 'PROG' tg1 td1 ;
  171. TN2 = 'PROG' tg2 td2 ;
  172. PN1 = 'PROG' pg1 pd1 ;
  173. PN2 = 'PROG' pg2 pd2 ;
  174. UN1 = 'PROG' ung1 und1 ;
  175. UN2 = 'PROG' ung2 und2 ;
  176. UT1 = 'PROG' utg1 utd1 ;
  177. UT2 = 'PROG' utg2 utd2 ;
  178. ALPHA1 = 'PROG' 0.0 1.0 ;
  179. ALPHA2 = ('PROG' ('DIME' ALPHA1) '*' 1.0) '-' ALPHA1 ;
  180.  
  181. *
  182. * ETHER = int_0^T cv(T') dT' T < TMAX
  183. * = int_0^TMAX cv(T') dT' '+'
  184. * cv(TMAX) T >= TMAX
  185. *
  186.  
  187. ESP1 = 'EXTRAIRE' (PGAS . 'SPECIES') 1 ;
  188. * DY1 = y_i - y_f for the species 1
  189. DY1 = (('EXTRAIRE' (PGAS . 'MASSFRA') 1) '-'
  190. ('EXTRAIRE' (PGAS . 'MASSFRA') 2)) ;
  191. COEF1 = ('EXTRAIRE' (PGAS . 'CHEMCOEF') 1) '*'
  192. (PGAS . ESP1 . 'W') ;
  193. YFINPH1 = 1.0 ;
  194. YFINPH2 = 1.0 ;
  195. 'SI' (COEF1 > 0) ;
  196. YPH2 = 'EXTRAIRE' (PGAS . 'MASSFRA') 2 ;
  197. YPH1 = YPH2 '+' DY1 ;
  198. 'SINON' ;
  199. YPH1 = 'EXTRAIRE' (PGAS . 'MASSFRA') 2 ;
  200. YPH2 = YPH1 '-' DY1 ;
  201. 'FINSI' ;
  202. YFINPH1 = YFINPH1 '-' YPH1 ;
  203. YFINPH2 = YFINPH2 '-' YPH2 ;
  204. PRYPH1 = 'PROG' YPH1 ;
  205. PRYPH2 = 'PROG' YPH2 ;
  206. 'REPETER' BLESP (('DIME' (PGAS . 'SPECIES')) '-' 2) ;
  207. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') (&BLESP '+' 1) ;
  208. COEF = ('EXTRAIRE' (PGAS . 'CHEMCOEF') (&BLESP '+' 1))
  209. '*' (PGAS . ESP . 'W') ;
  210. DY = (DY1 * (COEF '/' COEF1)) ;
  211. 'SI' (COEF > 0) ;
  212. YPH2 = 'EXTRAIRE' (PGAS . 'MASSFRA') (&BLESP '+' 2) ;
  213. YPH1 = YPH2 '+' DY ;
  214. 'SINON' ;
  215. YPH1 = 'EXTRAIRE' (PGAS . 'MASSFRA') (&BLESP '+' 2) ;
  216. YPH2 = YPH1 '-' DY ;
  217. 'FINSI' ;
  218. PRYPH1 = PRYPH1 'ET' ('PROG' YPH1) ;
  219. PRYPH2 = PRYPH2 'ET' ('PROG' YPH2) ;
  220. YFINPH1 = YFINPH1 '-' YPH1 ;
  221. YFINPH2 = YFINPH2 '-' YPH2 ;
  222. 'FIN' BLESP ;
  223. PRYPH1 = PRYPH1 'ET' ('PROG' YFINPH1) ;
  224. PRYPH2 = PRYPH2 'ET' ('PROG' YFINPH2) ;
  225. * 'LISTE' PRYPH1 ;
  226. * 'LISTE' PRYPH2 ;
  227. *
  228. *
  229. TMAX = ('PROG' ('DIME' ALPHA1) '*' (PGAS . 'TMAX')) ;
  230. * TCAL1 = MIN TN1, TMAX
  231. TCAL1 = 0.5D0 '*' ((TMAX '+' TN1) '-' ('ABS' (TN1 '-' TMAX))) ;
  232. DTN1 = TN1 '-' TCAL1 ;
  233. * TCAL1 = MIN TN1, TMAX
  234. TCAL2 = 0.5D0 '*' ((TMAX '+' TN2) '-' ('ABS' (TN2 '-' TMAX))) ;
  235. DTN2 = TN2 '-' TCAL2 ;
  236. *
  237. * Internal energy (J/kg in SI)
  238. *
  239. ETHER1 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  240. CV1 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  241. ETHER2 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  242. CV2 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  243. FUNTN1 = ('PROG' ('DIME' ALPHA1) '*' 1.0) ;
  244. FUNTN2 = ('PROG' ('DIME' ALPHA1) '*' 1.0) ;
  245. 'REPETER' BLPO ((PGAS . 'NORD') '+' 1) ;
  246. 'REPETER' BLESP ('DIME' (PGAS . 'SPECIES')) ;
  247. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') &BLESP ;
  248. YCEL1 = 'EXTRAIRE' PRYPH1 &BLESP ;
  249. YCEL2 = 'EXTRAIRE' PRYPH2 &BLESP ;
  250. AA = 'EXTRAIRE' (PGAS . ESP . 'A') &BLPO ;
  251. DCV1 = (AA * YCEL1 * FUNTN1) ;
  252. DCV2 = (AA * YCEL2 * FUNTN2) ;
  253. CV1 = CV1 '+' DCV1 ;
  254. CV2 = CV2 '+' DCV2 ;
  255. ETHER1 = ETHER1 '+' (DCV1 * TCAL1 '/' (&BLPO)) ;
  256. ETHER2 = ETHER2 '+' (DCV2 * TCAL2 '/' (&BLPO)) ;
  257. 'FIN' BLESP ;
  258. FUNTN1 = FUNTN1 '*' TCAL1 ;
  259. FUNTN2 = FUNTN2 '*' TCAL2 ;
  260. 'FIN' BLPO ;
  261. ETHER1 = ETHER1 '+' (CV1 '*' DTN1) ;
  262. ETHER2 = ETHER2 '+' (CV2 '*' DTN2) ;
  263. *
  264. * Formation energy/enthalpy (J/kg in SI) and gas constant (J/kg/K)
  265. *
  266. EFORM1 = 0.0 ;
  267. EFORM2 = 0.0 ;
  268. RGAS1 = 0.0 ;
  269. RGAS2 = 0.0 ;
  270. 'REPETER' BLESP ('DIME' (PGAS . 'SPECIES')) ;
  271. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') &BLESP ;
  272. YCEL1 = 'EXTRAIRE' PRYPH1 &BLESP ;
  273. YCEL2 = 'EXTRAIRE' PRYPH2 &BLESP ;
  274. EFORM1 = EFORM1 '+' (YCEL1 * (PGAS . ESP . 'H0K')) ;
  275. EFORM2 = EFORM2 '+' (YCEL2 * (PGAS . ESP . 'H0K')) ;
  276. RGAS1 = RGAS1 '+' (YCEL1 * (PGAS . 'RUNIV') '/'
  277. (PGAS . ESP . 'W')) ;
  278. RGAS2 = RGAS2 '+' (YCEL2 * (PGAS . 'RUNIV') '/'
  279. (PGAS . ESP . 'W')) ;
  280. 'FIN' BLESP ;
  281. EFORM1 = 'PROG' ('DIME' ETHER1) '*' EFORM1 ;
  282. EFORM2 = 'PROG' ('DIME' ETHER2) '*' EFORM2 ;
  283. *
  284. * Computation of the conservative variables
  285. *
  286. RN1 = PN1 '/' (RGAS1 '*' TN1) ;
  287. RN2 = PN2 '/' (RGAS2 '*' TN2) ;
  288. GNX1 = RN1 * UN1 ;
  289. GNY1 = RN1 * UT1 ;
  290. GNX2 = RN2 * UN2 ;
  291. GNY2 = RN2 * UT2 ;
  292. ERRO = 'MAXIMUM' (GNX1 '-' GNX2) 'ABS' ;
  293. ERRO = ERRO '/' ('MAXIMUM' GNX1 'ABS' ) ;
  294. 'MESSAGE' ('CHAINE' 'Erreur R-H, mass ' ERRO);
  295. 'SI' (ERRO > 1.0D-6) ;
  296. 'ERREUR' 21 ;
  297. 'FINSI' ;
  298. *
  299. RHMOM1 = (GNX1 * UN1) '+' PN1 ;
  300. RHMOM2 = (GNX2 * UN2) '+' PN2 ;
  301. ERRO = 'MAXIMUM' (RHMOM1 '-' RHMOM2) 'ABS' ;
  302. ERRO = ERRO '/' ('MAXIMUM' RHMOM1 'ABS' ) ;
  303. 'MESSAGE' ('CHAINE' 'Erreur R-H, momentum' ERRO);
  304. 'SI' (ERRO > 1.0D-6) ;
  305. 'ERREUR' 21 ;
  306. 'FINSI' ;
  307. *
  308. ECIN1 = 0.5D0 '*' ('PROG' ((ung1 * ung1) '+' (utg1 * utg1))
  309. ((und1 * und1) '+' (utd1 * utd1)));
  310. ECIN2 = 0.5D0 '*' ('PROG' ((ung2 * ung2) '+' (utg2 * utg2))
  311. ((und2 * und2) '+' (utd2 * utd2)));
  312. RETN1 = RN1 '*' (ETHER1 '+' ECIN1 '+' EFORM1) ;
  313. RETN2 = RN2 '*' (ETHER2 '+' ECIN2 '+' EFORM2) ;
  314. HN1 = (ETHER1 '+' ECIN1 '+' EFORM1) '+' (PN1 '/' RN1) ;
  315. HN2 = (ETHER2 '+' ECIN2 '+' EFORM2) '+' (PN2 '/' RN2) ;
  316. ERRO = 'MAXIMUM' (HN1 '-' HN2) 'ABS' ;
  317. ERRO = ERRO '/' ('MAXIMUM' ((PN1 '/' RN1) '+' (PN2 '/' RN2)) 'ABS') ;
  318. 'MESSAGE' ('CHAINE' 'Erreur R-H, energy ' ERRO);
  319. 'SI' (ERRO > 1.0D-6) ;
  320. 'ERREUR' 21 ;
  321. 'FINSI' ;
  322. *
  323. * Computation of the resi contribution in (n,t)
  324. *
  325. retg1 = MAXI RETN1 ;
  326. rhog1 = 'MAXIMUM' RN1 ;
  327. fA11gd = ung1 '*' rhog1 ;
  328. fA12gd = (fA11gd '*' ung1) '+' pg1 ;
  329. fA13gd = fA11gd '*' utg1 ;
  330. fA14gd = ung1 '*' (retg1 '+' pg1);
  331. *
  332. retg2 = MAXI RETN2 ;
  333. rhog2 = 'MAXIMUM' RN2 ;
  334. fA21gd = ung2 '*' rhog2 ;
  335. fA22gd = (fA21gd '*' ung2) '+' pg2 ;
  336. fA23gd = fA21gd '*' utg2 ;
  337. fA24gd = ung2 '*' (retg2 '+' pg2);
  338. *
  339. ****************************************************
  340. ****************************************************
  341. ******** Boucle sur les angles *********
  342. ****************************************************
  343. ****************************************************
  344. *
  345. DANGLE = 360 '/' 7.15;
  346. ANGLE = 11.3 ;
  347. *
  348. 'REPETER' BLOC 8;
  349. *
  350. *** Rotation
  351. *
  352. ANGLE = ANGLE '+' DANGLE;
  353. ORIG = 0.0D0 0.0D0;
  354. *
  355. 'MESSAGE' ;
  356. 'MESSAGE' (CHAIN 'Angle de rotation= ' ANGLE);
  357. 'MESSAGE' ;
  358. *
  359. DOM1 = DOM10 'TOURNER' ANGLE ORIG;
  360. DOM2 = DOM20 'TOURNER' ANGLE ORIG;
  361. P1FAC = P10 'TOURNER' ANGLE ORIG;
  362. *
  363. DOMTOT = DOM1 ET DOM2;
  364. 'ELIMINATION' DOMTOT 1D-6;
  365. *
  366. $DOMTOT = 'MODELISER' DOMTOT 'EULER';
  367. $DOM1 = 'MODELISER' DOM1 'EULER';
  368. $DOM2 = 'MODELISER' DOM2 'EULER';
  369. TDOMTOT = 'DOMA' $DOMTOT 'VF';
  370. TDOM1 = 'DOMA' $DOM1 'VF';
  371. TDOM2 = 'DOMA' $DOM2 'VF';
  372. MDOM1 = TDOM1 . 'QUAF' ;
  373. MDOM2 = TDOM2 . 'QUAF' ;
  374. MDOMTOT = TDOMTOT . 'QUAF' ;
  375. *
  376. 'ELIM' (MDOMTOT 'ET' MDOM1 'ET' MDOM2) 1.E-6 ;
  377. GRALP1 = 'NOMC' ('MOTS' 'UX' 'UY') ('DOMA' $DOMTOT 'XXNORMAF')
  378. ('MOTS' 'P1DX' 'P1DY') ;
  379. *
  380. VINF = 'MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' 100. ;
  381.  
  382. *
  383. **** Redefinition de P1FAC dans $DOMTOT 'FACE'
  384. *
  385. P1FAC = ('DOMA' $DOMTOT 'FACE') 'POIN' 'PROC' P1FAC ;
  386. XSURF = 'EXTRAIRE' ('DOMA' $DOMTOT 'XXSURFAC') P1FAC 'SCAL' ;
  387. NX = 'EXTRAIRE' ('DOMA' $DOMTOT 'XXNORMAF') P1FAC 'UX' ;
  388. NY = 'EXTRAIRE' ('DOMA' $DOMTOT 'XXNORMAF') P1FAC 'UY' ;
  389. TX = -1 * NY ;
  390. TY = NX ;
  391. *
  392. GEOPC = ('DOMA' $DOMTOT 'FACEL') 'ELEM' 'APPUYE' 'LARGEMENT'
  393. P1FAC ;
  394. AA = 'CHANGER' GEOPC 'POI1' ;
  395. PC1 = 'POIN' 1 AA ;
  396. P2 = 'POIN' 1 ('DOMA' $DOMTOT 'CENTRE') ;
  397. PC2 = 'POIN' 3 AA ;
  398. * Si P3 n'existe pas, probleme en FACEL.
  399. 'SI' ('NEG' PC1 P2) ;
  400. ORIENT = -1 ;
  401. PCD = PC1 ;
  402. PCG = PC2 ;
  403. XVOLD = 'MAXIMUM' (TDOM1 . 'XXVOLUM') ;
  404. XVOLG = 'MAXIMUM' (TDOM2 . 'XXVOLUM') ;
  405. 'SINON' ;
  406. ORIENT = 1 ;
  407. PCD = PC2 ;
  408. PCG = PC1 ;
  409. XVOLG = 'MAXIMUM' (TDOM1 . 'XXVOLUM') ;
  410. XVOLD = 'MAXIMUM' (TDOM2 . 'XXVOLUM') ;
  411. 'FINSI' ;
  412. *
  413. uxg1 = ((ung1 '*' NX) '+' (utg1 '*' TX)) '*' ORIENT ;
  414. uyg1 = ((ung1 '*' NY) '+' (utg1 '*' TY)) '*' ORIENT ;
  415. uxg2 = ((ung2 '*' NX) '+' (utg2 '*' TX)) '*' ORIENT ;
  416. uyg2 = ((ung2 '*' NY) '+' (utg2 '*' TY)) '*' ORIENT ;
  417. uxd1 = ((und1 '*' NX) '+' (utd1 '*' TX)) '*' ORIENT ;
  418. uyd1 = ((und1 '*' NY) '+' (utd1 '*' TY)) '*' ORIENT ;
  419. uxd2 = ((und2 '*' NX) '+' (utd2 '*' TX)) '*' ORIENT ;
  420. uyd2 = ((und2 '*' NY) '+' (utd2 '*' TY)) '*' ORIENT ;
  421. *
  422. 'SI' GRAPH;
  423. 'TRACER' (('DOMA' $DOMTOT 'MAILLAGE') 'ET'
  424. ('COULEUR' ('DOMA' $DOMTOT 'FACEL') 'ROUGE') 'ET' P1FAC)
  425. 'TITRE' 'Domaine et FACEL';
  426. 'FINSI' ;
  427. *
  428. MAILIM = 'DIFF' ('DOMA' $DOMTOT 'FACE') ('MANUEL' 'POI1' P1FAC) ;
  429. *
  430. ***********************
  431. **** Les CHPOINTs ****
  432. ***********************
  433. *
  434. CHRN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RN1) ;
  435. CHRN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RN2) ;
  436. *
  437. CHVN1 = ('MANUEL' 'CHPO' (TDOM1 . 'CENTRE') 2 'UX' uxg1
  438. 'UY' uyg1) '+'
  439. ('MANUEL' 'CHPO' (TDOM2 . 'CENTRE') 2 'UX' uxd1
  440. 'UY' uyd1) ;
  441. CHVN2 = ('MANUEL' 'CHPO' (TDOM1 . 'CENTRE') 2 'UX' uxg2
  442. 'UY' uyg2) '+'
  443. ('MANUEL' 'CHPO' (TDOM2 . 'CENTRE') 2 'UX' uxd2
  444. 'UY' uyd2) ;
  445. *
  446. CHGN1 = CHRN1 '*' CHVN1 ;
  447. CHGN2 = CHRN2 '*' CHVN2 ;
  448. *
  449. CHRET1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RETN1) ;
  450. CHRET2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RETN2) ;
  451. *
  452. CHTN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' TN1) ;
  453. CHTN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' TN2) ;
  454. *
  455. CHAL1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' ALPHA1) ;
  456. CHAL2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' ALPHA2) ;
  457. *
  458. R1 R2 V1 V2 P1 P2 T1 T2 = 'PRIM' 'DEM' PGAS CHAL1 CHAL2
  459. (CHAL1 * CHRN1) (CHAL2 * CHRN2) (CHAL1 * CHGN1)
  460. (CHAL2 * CHGN2) (CHAL1 * CHRET1) (CHAL2 * CHRET2)
  461. CHTN1 CHTN2 EPS ;
  462. *
  463. GRADAL1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  464. 'P1DX' 0.0 'P1DY' 0.0 ;
  465. GRADAL2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  466. 'P1DX' 0.0 'P1DY' 0.0 ;
  467. LIMAL1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  468. 'P1' 0.0 ;
  469. LIMAL2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  470. 'P1' 0.0 ;
  471. GRADR1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  472. 'P1DX' 0.0 'P1DY' 0.0 ;
  473. GRADR2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  474. 'P1DX' 0.0 'P1DY' 0.0 ;
  475. LIMR1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  476. 'P1' 0.0 ;
  477. LIMR2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  478. 'P1' 0.0 ;
  479. GRADV1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 4
  480. 'P1DX' 0.0 'P1DY' 0.0 'P2DX' 0.0 'P2DY' 0.0 ;
  481. GRADV2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 4
  482. 'P1DX' 0.0 'P1DY' 0.0 'P2DX' 0.0 'P2DY' 0.0 ;
  483. LIMV1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  484. 'P1' 0.0 'P2' 0.0 ;
  485. LIMV2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  486. 'P1' 0.0 'P2' 0.0 ;
  487. GRADP1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  488. 'P1DX' 0.0 'P1DY' 0.0 ;
  489. GRADP2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  490. 'P1DX' 0.0 'P1DY' 0.0 ;
  491. LIMP1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  492. 'P1' 0.0 ;
  493. LIMP2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  494. 'P1' 0.0 ;
  495. *
  496. **** L'operateur 'PRET'
  497. *
  498. CHFAL1 CHFAL2 CHFRN1 CHFRN2 CHFVN1 CHFVN2 CHFPN1 CHFPN2 =
  499. 'PRET' 'DEM' $DOMTOT
  500. CHAL1 (0.0 * GRADAL1) LIMAL1
  501. CHAL2 (0.0 * GRADAL2) LIMAL2
  502. R1 (0.0 * GRADR1) LIMR1
  503. R2 (0.0 * GRADR2) LIMR2
  504. V1 (0.0 * GRADV1) LIMV1
  505. V2 (0.0 * GRADV2) LIMV2
  506. P1 (0.0 * GRADP1) LIMP1
  507. P2 (0.0 * GRADP2) LIMP2 ;
  508. *
  509. **** L'operateur 'KONV'
  510. *
  511. 'REPETER' BLMETO 3 ;
  512. *
  513. 'SI' ('EGA' &BLMETO 1) ;
  514. METO = 'SS' ;
  515. 'FINSI' ;
  516. 'SI' ('EGA' &BLMETO 2) ;
  517. METO = 'VLH' ;
  518. 'FINSI' ;
  519. 'SI' ('EGA' &BLMETO 3) ;
  520. METO = 'AUSMPUP' ;
  521. 'FINSI' ;
  522. *
  523. 'MESSAGE' ('CHAINE' 'METO = ' METO) ;
  524. LISTINC1 = ('MOTS' 'ALF1' 'RN1' 'RNX1' 'RUY1' 'RET1'
  525. 'ALF2' 'RN2' 'RUX2' 'RUY2' 'RET2') ;
  526. *
  527. SI ('EGA' METO 'AUSMPUP') ;
  528. CHPRES DT SURF = 'KONV' 'VF' 'DEM' 'RESI' METO 'CONS'
  529. $DOMTOT PGAS LISTINC1 CHAL1 CHAL2 CHFAL1 CHFAL2 CHFRN1 CHFRN2
  530. CHFVN1 CHFVN2 CHFPN1 CHFPN2 K0 GRALP1 EPS MAILIM VINF VINF ;
  531. 'SINON' ;
  532. CHPRES DT SURF = 'KONV' 'VF' 'DEM' 'RESI' METO 'CONS'
  533. $DOMTOT PGAS LISTINC1 CHAL1 CHAL2 CHFAL1 CHFAL2 CHFRN1 CHFRN2
  534. CHFVN1 CHFVN2 CHFPN1 CHFPN2 K0 GRALP1 EPS MAILIM ;
  535. 'FINSI' ;
  536. *
  537. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' ETHER1 1)) ;
  538. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' ECIN1 1)) ;
  539. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' EFORM1 1)) ;
  540. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' (pg1)) ;
  541. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' RN1 1)) ;
  542. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' (ung1)) ;
  543. *
  544. * We verify that the residum contribution of P1FAC is the one
  545. * of a reactive stationary shock.
  546. *
  547. RA11 = 'EXCO' ('EXTRAIRE' LISTINC1 1) CHPRES ;
  548. RA12 = 'EXCO' ('EXTRAIRE' LISTINC1 2) CHPRES ;
  549. RA13X = 'EXCO' ('EXTRAIRE' LISTINC1 3) CHPRES ;
  550. RA13Y = 'EXCO' ('EXTRAIRE' LISTINC1 4) CHPRES ;
  551. RA13N = (RA13X '*' NX) '+' (RA13Y * NY) ;
  552. RA13T = (RA13X '*' TX) '+' (RA13Y * TY) ;
  553. RA14 = 'EXCO' ('EXTRAIRE' LISTINC1 5) CHPRES ;
  554. *
  555. RA21 = 'EXCO' ('EXTRAIRE' LISTINC1 6) CHPRES ;
  556. RA22 = 'EXCO' ('EXTRAIRE' LISTINC1 7) CHPRES ;
  557. RA23X = 'EXCO' ('EXTRAIRE' LISTINC1 8) CHPRES ;
  558. RA23Y = 'EXCO' ('EXTRAIRE' LISTINC1 9) CHPRES ;
  559. RA23N = (RA23X '*' NX) '+' (RA23Y * NY);
  560. RA23T = (RA23X '*' TX) '+' (RA23Y * TY);
  561. RA24 = 'EXCO' ('EXTRAIRE' LISTINC1 10) CHPRES ;
  562. *
  563. ERRO = 1D-7 ;
  564. HORROR = 'MAXIMUM' RA11 'ABS' ;
  565. LOGI1 = HORROR < ERRO ;
  566. 'SI' ('NON' LOGI1) ;
  567. 'MESSAGE' ('CHAINE' 'Erreur alpha ' HORROR ' > ' ERRO);
  568. 'FINSI' ;
  569. HORROR = 'MAXIMUM' RA21 'ABS' ;
  570. LOGI2 = HORROR < ERRO ;
  571. 'SI' ('NON' LOGI2) ;
  572. 'MESSAGE' ('CHAINE' 'Erreur alpha ' HORROR ' > ' ERRO);
  573. 'FINSI' ;
  574. LOGI1 = LOGI1 'ET' LOGI2;
  575. *
  576. dRA12 = ('EXTRAIRE' RA12 'SCAL' PCD) '*' XVOLD ;
  577. gRA12 = ('EXTRAIRE' RA12 'SCAL' PCG) '*' XVOLG ;
  578. dRA22 = ('EXTRAIRE' RA22 'SCAL' PCD) '*' XVOLD ;
  579. gRA22 = ('EXTRAIRE' RA22 'SCAL' PCG) '*' XVOLG ;
  580. ERRO = 1.0D-8 * fA11gd 'ABS' ;
  581. HORROR = ('MAXIMUM' ('PROG' gRA12 (dRA12 '-' fA11gd)
  582. (gRA22 '+' fA21gd) dRA22) 'ABS') ;
  583. LOGI2 = HORROR < ERRO ;
  584. 'SI' ('NON' LOGI2) ;
  585. 'MESSAGE' ('CHAINE' 'Erreur density ' HORROR ' > ' ERRO);
  586. 'FINSI' ;
  587. LOGI1 = LOGI1 'ET' LOGI2;
  588. *
  589. dRA13N = ('EXTRAIRE' RA13N 'SCAL' PCD) '*' XVOLD ;
  590. gRA13N = ('EXTRAIRE' RA13N 'SCAL' PCG) '*' XVOLG ;
  591. dRA23N = ('EXTRAIRE' RA23N 'SCAL' PCD) '*' XVOLD ;
  592. gRA23N = ('EXTRAIRE' RA23N 'SCAL' PCG) '*' XVOLG ;
  593. ERRO = 1.0D-8 * fA12gd 'ABS' ;
  594. HORROR = ('MAXIMUM' ('PROG' gRA13N (dRA13N '-' fA12gd)
  595. (gRA23N '+' fA22gd) dRA23N) 'ABS') ;
  596. LOGI2 = HORROR < ERRO ;
  597. 'SI' ('NON' LOGI2) ;
  598. 'MESSAGE' ('CHAINE' 'Erreur qdm_n ' HORROR ' > ' ERRO);
  599. 'FINSI' ;
  600. LOGI1 = LOGI1 'ET' LOGI2;
  601. *
  602. dRA13T = ('EXTRAIRE' RA13T 'SCAL' PCD) '*' XVOLD ;
  603. gRA13T = ('EXTRAIRE' RA13T 'SCAL' PCG) '*' XVOLG ;
  604. dRA23T = ('EXTRAIRE' RA23T 'SCAL' PCD) '*' XVOLD ;
  605. gRA23T = ('EXTRAIRE' RA23T 'SCAL' PCG) '*' XVOLG ;
  606. HORROR = ('MAXIMUM' ('PROG' dRA13T gRA13T
  607. dRA23T gRA23T) 'ABS') ;
  608. ERRO = 1.0D-8 * fA12gd 'ABS' ;
  609. LOGI2 = HORROR < ERRO ;
  610. 'SI' ('NON' LOGI2) ;
  611. 'MESSAGE' ('CHAINE' 'Erreur qdm_t ' HORROR ' > ' ERRO);
  612. 'FINSI' ;
  613. LOGI1 = LOGI1 'ET' LOGI2;
  614. *
  615. dRA14 = ('EXTRAIRE' RA14 'SCAL' PCD) '*' XVOLD ;
  616. gRA14 = ('EXTRAIRE' RA14 'SCAL' PCG) '*' XVOLG ;
  617. dRA24 = ('EXTRAIRE' RA24 'SCAL' PCD) '*' XVOLD ;
  618. gRA24 = ('EXTRAIRE' RA24 'SCAL' PCG) '*' XVOLG ;
  619. ERRO = 1.0D-7 * fA14gd 'ABS' ;
  620. HORROR = ('MAXIMUM' ('PROG' gRA14 (dRA14 '-' fA14gd)
  621. (gRA24 '+' fA24gd) dRA24) 'ABS') ;
  622. LOGI2 = HORROR < ERRO ;
  623. 'SI' ('NON' LOGI2) ;
  624. 'MESSAGE' ('CHAINE' 'Erreur energy ' HORROR ' > ' ERRO);
  625. 'FINSI' ;
  626. LOGI1 = LOGI1 'ET' LOGI2;
  627. *
  628. 'SI' ('NON' LOGI1);
  629. 'MESSAGE' ;
  630. 'MESSAGE' 'OPERATEUR KONV';
  631. 'MESSAGE' ('CHAINE' METO);
  632. 'MESSAGE' ;
  633. 'ERREUR' ;
  634. 'FINSI' ;
  635. *
  636. 'FIN' BLMETO ;
  637.  
  638. ****************************************************
  639. ****************************************************
  640. ******** Fin boucle sur les angles *********
  641. ****************************************************
  642. ****************************************************
  643.  
  644. 'FIN' BLOC;
  645.  
  646. 'FIN' ;
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  

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