Télécharger konv_resi_dem_stationaryshock_12.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier : konv_resi_dem_stationaryshock_12.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 1 ****
  13. **** Right state = phase 2 ****
  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' 0 ;
  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. *
  69. **** Coef with the gas properties
  70. *
  71. PGAS . 'H2 ' = 'TABLE' ;
  72. PGAS . 'H2O ' = 'TABLE' ;
  73. PGAS . 'N2 ' = 'TABLE' ;
  74. PGAS . 'O2 ' = 'TABLE' ;
  75. *
  76. **** Runiv (J/mole/K)
  77. *
  78. PGAS . 'RUNIV' = 8.31441 ;
  79. *
  80. **** W (kg/mole). Gas constant (J/kg/K = Runiv/W)
  81. *
  82. PGAS . 'H2 ' . 'W' = 2. * 1.00797E-3 ;
  83. PGAS . 'O2 ' . 'W' = 2. * 15.9994E-3 ;
  84. PGAS . 'H2O ' . 'W' = (PGAS . 'H2 ' . 'W' ) '+'
  85. (0.5 * (PGAS . 'O2 ' . 'W' )) ;
  86. PGAS . 'N2 ' . 'W' = 2 * 14.0067E-3 ;
  87. *
  88. **** Polynomial coefficients
  89. *
  90. PGAS . 'H2 ' . 'A' = 'PROG' 9834.91866 0.54273926 0.000862203836
  91. -2.37281455E-07 1.84701105E-11 ;
  92. PGAS . 'H2O ' . 'A' = 'PROG' 1155.95625 0.768331151 -5.73129958E-05
  93. -1.82753232E-08 2.44485692E-12 ;
  94. PGAS . 'N2 ' . 'A' = 'PROG' 652.940766 0.288239099 -7.80442298E-05
  95. 8.78233606E-09 -3.05514485E-13 ;
  96. PGAS . 'O2 ' . 'A' = 'PROG' 575.012333 0.350522002 -0.000128294865
  97. 2.33636971E-08 -1.53304905E-12;
  98. *
  99. **** Formation enthalpies (energies) at 0K (J/Kg)
  100. *
  101. PGAS . 'H2 ' . 'H0K' = -4.195D6 ;
  102. PGAS . 'H2O ' . 'H0K' = -1.395D7 ;
  103. PGAS . 'N2 ' . 'H0K' = -2.953D5 ;
  104. PGAS . 'O2 ' . 'H0K' = -2.634D5 ;
  105.  
  106.  
  107. ***************************
  108. ***** DOMAINE SPATIAL ****
  109. ***************************
  110.  
  111. A1 = 0.0D0 0.0D0;
  112. A2 = 1.0D0 0.0D0;
  113. A3 = 3.0D0 0.0D0;
  114. A4 = 3.0D0 1.0D0;
  115. A5 = 1.0D0 1.0D0;
  116. A6 = 0.0D0 1.0D0;
  117.  
  118. L12 = A1 'DROIT' 1 A2;
  119. L23 = A2 'DROIT' 1 A3;
  120. L34 = A3 'DROIT' 1 A4;
  121. L45 = A4 'DROIT' 1 A5;
  122. L56 = A5 'DROIT' 1 A6;
  123. L61 = A6 'DROIT' 1 A1;
  124. L25 = A2 'DROIT' 1 A5;
  125.  
  126. DOM10 = 'DALL' L12 L25 L56 L61
  127. 'PLANE';
  128. DOM20 = 'DALL' L23 L34 L45 ('INVERSE' L25)
  129. 'PLANE';
  130.  
  131. *
  132. *** Point ou on controlle la consistence
  133. *
  134.  
  135. P10 = 1.0 0.5;
  136.  
  137. *
  138. EPS = 1.0D-16 ;
  139. K0 = 45.2 ;
  140. *
  141. *******************************************
  142. *** Etats gauche et droite ****************
  143. *******************************************
  144. *
  145. * Case 1 -> 2
  146. * Reactive stationary shock.
  147. *
  148. epsv = 0.0 ;
  149. tg1 = 327.0 ;
  150. td1 = 327.0 ;
  151. pg1 = 139000.0 ;
  152. pd1 = 139000.0 ;
  153. ung1 = 45.2 '-' epsv ;
  154. und1 = 45.2 '-' epsv ;
  155. utg1 = 0.0 ;
  156. utd1 = 0.0 ;
  157. * utg1 = 0.0 ;
  158. * utd1 = 0.0 ;
  159. tg2 = 2518.582685186033 ;
  160. td2 = 2518.582685186033 ;
  161. pg2 = 125279.9833247705 ;
  162. pd2 = 125279.9833247705 ;
  163. ung2 = 329.121088555842 '-' epsv ;
  164. und2 = 329.121088555842 '-' epsv ;
  165. utg2 = 0.0 ;
  166. utd2 = 0.0 ;
  167.  
  168. TN1 = 'PROG' tg1 td1 ;
  169. TN2 = 'PROG' tg2 td2 ;
  170. PN1 = 'PROG' pg1 pd1 ;
  171. PN2 = 'PROG' pg2 pd2 ;
  172. UN1 = 'PROG' ung1 und1 ;
  173. UN2 = 'PROG' ung2 und2 ;
  174. UT1 = 'PROG' utg1 utd1 ;
  175. UT2 = 'PROG' utg2 utd2 ;
  176. ALPHA1 = 'PROG' 1.0 0.0 ;
  177. ALPHA2 = ('PROG' ('DIME' ALPHA1) '*' 1.0) '-' ALPHA1 ;
  178.  
  179. *
  180. * ETHER = int_0^T cv(T') dT' T < TMAX
  181. * = int_0^TMAX cv(T') dT' '+'
  182. * cv(TMAX) T >= TMAX
  183. *
  184.  
  185. ESP1 = 'EXTRAIRE' (PGAS . 'SPECIES') 1 ;
  186. * DY1 = y_i - y_f for the species 1
  187. DY1 = (('EXTRAIRE' (PGAS . 'MASSFRA') 1) '-'
  188. ('EXTRAIRE' (PGAS . 'MASSFRA') 2)) ;
  189. COEF1 = ('EXTRAIRE' (PGAS . 'CHEMCOEF') 1) '*'
  190. (PGAS . ESP1 . 'W') ;
  191. YFINPH1 = 1.0 ;
  192. YFINPH2 = 1.0 ;
  193. 'SI' (COEF1 > 0) ;
  194. YPH2 = 'EXTRAIRE' (PGAS . 'MASSFRA') 2 ;
  195. YPH1 = YPH2 '+' DY1 ;
  196. 'SINON' ;
  197. YPH1 = 'EXTRAIRE' (PGAS . 'MASSFRA') 2 ;
  198. YPH2 = YPH1 '-' DY1 ;
  199. 'FINSI' ;
  200. YFINPH1 = YFINPH1 '-' YPH1 ;
  201. YFINPH2 = YFINPH2 '-' YPH2 ;
  202. PRYPH1 = 'PROG' YPH1 ;
  203. PRYPH2 = 'PROG' YPH2 ;
  204. 'REPETER' BLESP (('DIME' (PGAS . 'SPECIES')) '-' 2) ;
  205. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') (&BLESP '+' 1) ;
  206. COEF = ('EXTRAIRE' (PGAS . 'CHEMCOEF') (&BLESP '+' 1))
  207. '*' (PGAS . ESP . 'W') ;
  208. DY = (DY1 * (COEF '/' COEF1)) ;
  209. 'SI' (COEF > 0) ;
  210. YPH2 = 'EXTRAIRE' (PGAS . 'MASSFRA') (&BLESP '+' 2) ;
  211. YPH1 = YPH2 '+' DY ;
  212. 'SINON' ;
  213. YPH1 = 'EXTRAIRE' (PGAS . 'MASSFRA') (&BLESP '+' 2) ;
  214. YPH2 = YPH1 '-' DY ;
  215. 'FINSI' ;
  216. PRYPH1 = PRYPH1 'ET' ('PROG' YPH1) ;
  217. PRYPH2 = PRYPH2 'ET' ('PROG' YPH2) ;
  218. YFINPH1 = YFINPH1 '-' YPH1 ;
  219. YFINPH2 = YFINPH2 '-' YPH2 ;
  220. 'FIN' BLESP ;
  221. PRYPH1 = PRYPH1 'ET' ('PROG' YFINPH1) ;
  222. PRYPH2 = PRYPH2 'ET' ('PROG' YFINPH2) ;
  223. 'LISTE' PRYPH1 ;
  224. 'LISTE' PRYPH2 ;
  225. *
  226. TMAX = ('PROG' ('DIME' ALPHA1) '*' (PGAS . 'TMAX')) ;
  227. * TCAL1 = MIN TN1, TMAX
  228. TCAL1 = 0.5D0 '*' ((TMAX '+' TN1) '-' ('ABS' (TN1 '-' TMAX))) ;
  229. DTN1 = TN1 '-' TCAL1 ;
  230. * TCAL1 = MIN TN1, TMAX
  231. TCAL2 = 0.5D0 '*' ((TMAX '+' TN2) '-' ('ABS' (TN2 '-' TMAX))) ;
  232. DTN2 = TN2 '-' TCAL2 ;
  233. *
  234. * Internal energy (J/kg in SI)
  235. *
  236. ETHER1 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  237. CV1 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  238. ETHER2 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  239. CV2 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  240. FUNTN1 = ('PROG' ('DIME' ALPHA1) '*' 1.0) ;
  241. FUNTN2 = ('PROG' ('DIME' ALPHA1) '*' 1.0) ;
  242. 'REPETER' BLPO ((PGAS . 'NORD') '+' 1) ;
  243. 'REPETER' BLESP ('DIME' (PGAS . 'SPECIES')) ;
  244. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') &BLESP ;
  245. YCEL1 = 'EXTRAIRE' PRYPH1 &BLESP ;
  246. YCEL2 = 'EXTRAIRE' PRYPH2 &BLESP ;
  247. AA = 'EXTRAIRE' (PGAS . ESP . 'A') &BLPO ;
  248. DCV1 = (AA * YCEL1 * FUNTN1) ;
  249. DCV2 = (AA * YCEL2 * FUNTN2) ;
  250. CV1 = CV1 '+' DCV1 ;
  251. CV2 = CV2 '+' DCV2 ;
  252. ETHER1 = ETHER1 '+' (DCV1 * TCAL1 '/' (&BLPO)) ;
  253. ETHER2 = ETHER2 '+' (DCV2 * TCAL2 '/' (&BLPO)) ;
  254. 'FIN' BLESP ;
  255. FUNTN1 = FUNTN1 '*' TCAL1 ;
  256. FUNTN2 = FUNTN2 '*' TCAL2 ;
  257. 'FIN' BLPO ;
  258. ETHER1 = ETHER1 '+' (CV1 '*' DTN1) ;
  259. ETHER2 = ETHER2 '+' (CV2 '*' DTN2) ;
  260. *
  261. * Formation energy/enthalpy (J/kg in SI) and gas constant (J/kg/K)
  262. *
  263. EFORM1 = 0.0 ;
  264. EFORM2 = 0.0 ;
  265. RGAS1 = 0.0 ;
  266. RGAS2 = 0.0 ;
  267. 'REPETER' BLESP ('DIME' (PGAS . 'SPECIES')) ;
  268. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') &BLESP ;
  269. YCEL1 = 'EXTRAIRE' PRYPH1 &BLESP ;
  270. YCEL2 = 'EXTRAIRE' PRYPH2 &BLESP ;
  271. EFORM1 = EFORM1 '+' (YCEL1 * (PGAS . ESP . 'H0K')) ;
  272. EFORM2 = EFORM2 '+' (YCEL2 * (PGAS . ESP . 'H0K')) ;
  273. RGAS1 = RGAS1 '+' (YCEL1 * (PGAS . 'RUNIV') '/'
  274. (PGAS . ESP . 'W')) ;
  275. RGAS2 = RGAS2 '+' (YCEL2 * (PGAS . 'RUNIV') '/'
  276. (PGAS . ESP . 'W')) ;
  277. 'FIN' BLESP ;
  278. EFORM1 = 'PROG' ('DIME' ETHER1) '*' EFORM1 ;
  279. EFORM2 = 'PROG' ('DIME' ETHER2) '*' EFORM2 ;
  280. 'LISTE' rgas1 ;
  281. 'LISTE' rgas2 ;
  282.  
  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. 'SI' (ERRO > 1.0D-6) ;
  295. 'MESSAGE' ('CHAINE' 'Erreur R-H, mass ' ERRO);
  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. 'SI' (ERRO > 1.0D-6) ;
  304. 'MESSAGE' ('CHAINE' 'Erreur R-H, momentum' ERRO);
  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. 'SI' (ERRO > 1.0D-6) ;
  319. 'MESSAGE' ('CHAINE' 'Erreur R-H, energy ' ERRO);
  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. **** Redefinition de P1FAC dans $DOMTOT 'FACE'
  383. *
  384. P1FAC = ('DOMA' $DOMTOT 'FACE') 'POIN' 'PROC' P1FAC ;
  385. XSURF = 'EXTRAIRE' ('DOMA' $DOMTOT 'XXSURFAC') P1FAC 'SCAL' ;
  386. NX = 'EXTRAIRE' ('DOMA' $DOMTOT 'XXNORMAF') P1FAC 'UX' ;
  387. NY = 'EXTRAIRE' ('DOMA' $DOMTOT 'XXNORMAF') P1FAC 'UY' ;
  388. TX = -1 * NY ;
  389. TY = NX ;
  390. *
  391. GEOPC = ('DOMA' $DOMTOT 'FACEL') 'ELEM' 'APPUYE' 'LARGEMENT'
  392. P1FAC ;
  393. AA = 'CHANGER' GEOPC 'POI1' ;
  394. PC1 = 'POIN' 1 AA ;
  395. P2 = 'POIN' 1 ('DOMA' $DOMTOT 'CENTRE') ;
  396. PC2 = 'POIN' 3 AA ;
  397. * Si P3 n'existe pas, probleme en FACEL.
  398. 'SI' ('NEG' PC1 P2) ;
  399. ORIENT = -1 ;
  400. PCD = PC1 ;
  401. PCG = PC2 ;
  402. XVOLD = 'MAXIMUM' (TDOM1 . 'XXVOLUM') ;
  403. XVOLG = 'MAXIMUM' (TDOM2 . 'XXVOLUM') ;
  404. 'SINON' ;
  405. ORIENT = 1 ;
  406. PCD = PC2 ;
  407. PCG = PC1 ;
  408. XVOLG = 'MAXIMUM' (TDOM1 . 'XXVOLUM') ;
  409. XVOLD = 'MAXIMUM' (TDOM2 . 'XXVOLUM') ;
  410. 'FINSI' ;
  411. *
  412. uxg1 = ((ung1 '*' NX) '+' (utg1 '*' TX)) '*' ORIENT ;
  413. uyg1 = ((ung1 '*' NY) '+' (utg1 '*' TY)) '*' ORIENT ;
  414. uxg2 = ((ung2 '*' NX) '+' (utg2 '*' TX)) '*' ORIENT ;
  415. uyg2 = ((ung2 '*' NY) '+' (utg2 '*' TY)) '*' ORIENT ;
  416. uxd1 = ((und1 '*' NX) '+' (utd1 '*' TX)) '*' ORIENT ;
  417. uyd1 = ((und1 '*' NY) '+' (utd1 '*' TY)) '*' ORIENT ;
  418. uxd2 = ((und2 '*' NX) '+' (utd2 '*' TX)) '*' ORIENT ;
  419. uyd2 = ((und2 '*' NY) '+' (utd2 '*' TY)) '*' ORIENT ;
  420. *
  421. 'SI' GRAPH;
  422. 'TRACER' (('DOMA' $DOMTOT 'MAILLAGE') 'ET'
  423. ('COULEUR' ('DOMA' $DOMTOT 'FACEL') 'ROUGE') 'ET' P1FAC)
  424. 'TITRE' 'Domaine et FACEL';
  425. 'FINSI' ;
  426.  
  427. MAILIM = 'DIFF' ('DOMA' $DOMTOT 'FACE') ('MANUEL' 'POI1' P1FAC) ;
  428.  
  429. ***********************
  430. **** Les CHPOINTs ****
  431. ***********************
  432.  
  433. CHRN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RN1) ;
  434. CHRN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RN2) ;
  435.  
  436. CHVN1 = ('MANUEL' 'CHPO' (TDOM1 . 'CENTRE') 2 'UX' uxg1
  437. 'UY' uyg1) '+'
  438. ('MANUEL' 'CHPO' (TDOM2 . 'CENTRE') 2 'UX' uxd1
  439. 'UY' uyd1) ;
  440. CHVN2 = ('MANUEL' 'CHPO' (TDOM1 . 'CENTRE') 2 'UX' uxg2
  441. 'UY' uyg2) '+'
  442. ('MANUEL' 'CHPO' (TDOM2 . 'CENTRE') 2 'UX' uxd2
  443. 'UY' uyd2) ;
  444.  
  445. CHGN1 = CHRN1 '*' CHVN1 ;
  446. CHGN2 = CHRN2 '*' CHVN2 ;
  447.  
  448. CHRET1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RETN1) ;
  449. CHRET2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RETN2) ;
  450.  
  451. CHTN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' TN1) ;
  452. CHTN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' TN2) ;
  453.  
  454. CHAL1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' ALPHA1) ;
  455. CHAL2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' ALPHA2) ;
  456.  
  457. R1 R2 V1 V2 P1 P2 T1 T2 = 'PRIM' 'DEM' PGAS CHAL1 CHAL2
  458. (CHAL1 * CHRN1) (CHAL2 * CHRN2) (CHAL1 * CHGN1)
  459. (CHAL2 * CHGN2) (CHAL1 * CHRET1) (CHAL2 * CHRET2)
  460. CHTN1 CHTN2 EPS ;
  461.  
  462. GRADAL1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  463. 'P1DX' 0.0 'P1DY' 0.0 ;
  464. GRADAL2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  465. 'P1DX' 0.0 'P1DY' 0.0 ;
  466. LIMAL1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  467. 'P1' 0.0 ;
  468. LIMAL2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  469. 'P1' 0.0 ;
  470. GRADR1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  471. 'P1DX' 0.0 'P1DY' 0.0 ;
  472. GRADR2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  473. 'P1DX' 0.0 'P1DY' 0.0 ;
  474. LIMR1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  475. 'P1' 0.0 ;
  476. LIMR2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  477. 'P1' 0.0 ;
  478. GRADV1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 4
  479. 'P1DX' 0.0 'P1DY' 0.0 'P2DX' 0.0 'P2DY' 0.0 ;
  480. GRADV2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 4
  481. 'P1DX' 0.0 'P1DY' 0.0 'P2DX' 0.0 'P2DY' 0.0 ;
  482. LIMV1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  483. 'P1' 0.0 'P2' 0.0 ;
  484. LIMV2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  485. 'P1' 0.0 'P2' 0.0 ;
  486. GRADP1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  487. 'P1DX' 0.0 'P1DY' 0.0 ;
  488. GRADP2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  489. 'P1DX' 0.0 'P1DY' 0.0 ;
  490. LIMP1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  491. 'P1' 0.0 ;
  492. LIMP2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  493. 'P1' 0.0 ;
  494.  
  495. *
  496. **** L'operateur 'PRET'
  497. *
  498.  
  499. CHFAL1 CHFAL2 CHFRN1 CHFRN2 CHFVN1 CHFVN2 CHFPN1 CHFPN2 =
  500. 'PRET' 'DEM' $DOMTOT
  501. CHAL1 (0.0 * GRADAL1) LIMAL1
  502. CHAL2 (0.0 * GRADAL2) LIMAL2
  503. R1 (0.0 * GRADR1) LIMR1
  504. R2 (0.0 * GRADR2) LIMR2
  505. V1 (0.0 * GRADV1) LIMV1
  506. V2 (0.0 * GRADV2) LIMV2
  507. P1 (0.0 * GRADP1) LIMP1
  508. P2 (0.0 * GRADP2) LIMP2 ;
  509. *
  510. SI FAUX ;
  511. CHFRO1 = 'REDU' CHFRN1 geopc ;
  512. CHFV1 = 'REDU' CHFVN1 geopc ;
  513. CHFP1 = 'REDU' CHFPN1 geopc ;
  514. CHFRO2 = 'REDU' CHFRN2 geopc ;
  515. CHFV2 = 'REDU' CHFVN2 geopc ;
  516. CHFP2 = 'REDU' CHFPN2 geopc ;
  517. 'LISTE' CHFRO1 ;
  518. 'LISTE' CHFV1 ;
  519. 'LISTE' CHFP1 ;
  520. 'LISTE' CHFRO2 ;
  521. 'LISTE' CHFV2 ;
  522. 'LISTE' CHFP2 ;
  523. 'OPTION' donn 5 ;
  524. 'FINSI' ;
  525. *
  526. **** L'operateur 'KONV'
  527. *
  528.  
  529. 'REPETER' BLMETO 3 ;
  530.  
  531. 'SI' ('EGA' &BLMETO 1) ;
  532. METO = 'SS' ;
  533. 'FINSI' ;
  534. 'SI' ('EGA' &BLMETO 2) ;
  535. METO = 'VLH' ;
  536. 'FINSI' ;
  537. 'SI' ('EGA' &BLMETO 3) ;
  538. METO = 'AUSMPUP' ;
  539. 'FINSI' ;
  540.  
  541. 'MESSAGE' ('CHAINE' 'METO = ' METO) ;
  542. LISTINC1 = ('MOTS' 'ALF1' 'RN1' 'RNX1' 'RUY1' 'RET1'
  543. 'ALF2' 'RN2' 'RUX2' 'RUY2' 'RET2') ;
  544.  
  545. SI ('EGA' METO 'AUSMPUP') ;
  546. CHPRES DT SURF = 'KONV' 'VF' 'DEM' 'RESI' METO 'CONS'
  547. $DOMTOT PGAS LISTINC1 CHAL1 CHAL2 CHFAL1 CHFAL2 CHFRN1 CHFRN2
  548. CHFVN1 CHFVN2 CHFPN1 CHFPN2 K0 GRALP1 EPS MAILIM VINF VINF ;
  549. 'SINON' ;
  550. CHPRES DT SURF = 'KONV' 'VF' 'DEM' 'RESI' METO 'CONS'
  551. $DOMTOT PGAS LISTINC1 CHAL1 CHAL2 CHFAL1 CHFAL2 CHFRN1 CHFRN2
  552. CHFVN1 CHFVN2 CHFPN1 CHFPN2 K0 GRALP1 EPS MAILIM ;
  553. 'FINSI' ;
  554.  
  555. *
  556. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' ETHER1 1)) ;
  557. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' ECIN1 1)) ;
  558. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' EFORM1 1)) ;
  559. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' (pg1)) ;
  560. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' RN1 1)) ;
  561. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' (ung1)) ;
  562. *
  563. * We verify that the residum contribution of P1FAC is the one
  564. * of a reactive stationary shock.
  565. *
  566. RA11 = 'EXCO' ('EXTRAIRE' LISTINC1 1) CHPRES ;
  567. RA12 = 'EXCO' ('EXTRAIRE' LISTINC1 2) CHPRES ;
  568. RA13X = 'EXCO' ('EXTRAIRE' LISTINC1 3) CHPRES ;
  569. RA13Y = 'EXCO' ('EXTRAIRE' LISTINC1 4) CHPRES ;
  570. RA13N = (RA13X '*' NX) '+' (RA13Y * NY) ;
  571. RA13T = (RA13X '*' TX) '+' (RA13Y * TY) ;
  572. RA14 = 'EXCO' ('EXTRAIRE' LISTINC1 5) CHPRES ;
  573. *
  574. RA21 = 'EXCO' ('EXTRAIRE' LISTINC1 6) CHPRES ;
  575. RA22 = 'EXCO' ('EXTRAIRE' LISTINC1 7) CHPRES ;
  576. RA23X = 'EXCO' ('EXTRAIRE' LISTINC1 8) CHPRES ;
  577. RA23Y = 'EXCO' ('EXTRAIRE' LISTINC1 9) CHPRES ;
  578. RA23N = (RA23X '*' NX) '+' (RA23Y * NY);
  579. RA23T = (RA23X '*' TX) '+' (RA23Y * TY);
  580. RA24 = 'EXCO' ('EXTRAIRE' LISTINC1 10) CHPRES ;
  581. *
  582. ERRO = 1D-7 ;
  583. HORROR = 'MAXIMUM' RA11 'ABS' ;
  584. LOGI1 = HORROR < ERRO ;
  585. 'SI' ('NON' LOGI1) ;
  586. 'MESSAGE' ('CHAINE' 'Erreur alpha ' HORROR ' > ' ERRO);
  587. 'FINSI' ;
  588. HORROR = 'MAXIMUM' RA21 'ABS' ;
  589. LOGI2 = HORROR < ERRO ;
  590. 'SI' ('NON' LOGI2) ;
  591. 'MESSAGE' ('CHAINE' 'Erreur alpha ' HORROR ' > ' ERRO);
  592. 'FINSI' ;
  593. LOGI1 = LOGI1 'ET' LOGI2;
  594. *
  595. dRA12 = ('EXTRAIRE' RA12 'SCAL' PCD) '*' XVOLD ;
  596. gRA12 = ('EXTRAIRE' RA12 'SCAL' PCG) '*' XVOLG ;
  597. dRA22 = ('EXTRAIRE' RA22 'SCAL' PCD) '*' XVOLD ;
  598. gRA22 = ('EXTRAIRE' RA22 'SCAL' PCG) '*' XVOLG ;
  599. ERRO = 1.0D-8 * fA11gd 'ABS' ;
  600. HORROR = ('MAXIMUM' ('PROG' dRA12 (gRA12 '+' fA11gd)
  601. (dRA22 '-' fA21gd) gRA22) 'ABS') ;
  602. LOGI2 = HORROR < ERRO ;
  603. 'SI' ('NON' LOGI2) ;
  604. 'MESSAGE' ('CHAINE' 'Erreur density ' HORROR ' > ' ERRO);
  605. 'FINSI' ;
  606. LOGI1 = LOGI1 'ET' LOGI2;
  607. *
  608. dRA13N = ('EXTRAIRE' RA13N 'SCAL' PCD) '*' XVOLD ;
  609. gRA13N = ('EXTRAIRE' RA13N 'SCAL' PCG) '*' XVOLG ;
  610. dRA23N = ('EXTRAIRE' RA23N 'SCAL' PCD) '*' XVOLD ;
  611. gRA23N = ('EXTRAIRE' RA23N 'SCAL' PCG) '*' XVOLG ;
  612. ERRO = 1.0D-8 * fA12gd 'ABS' ;
  613. HORROR = ('MAXIMUM' ('PROG' dRA13N (gRA13N '+' fA12gd)
  614. (dRA23N '-' fA22gd) gRA23N) 'ABS') ;
  615. LOGI2 = HORROR < ERRO ;
  616. 'SI' ('NON' LOGI2) ;
  617. 'MESSAGE' ('CHAINE' 'Erreur qdm_n ' HORROR ' > ' ERRO);
  618. 'FINSI' ;
  619. LOGI1 = LOGI1 'ET' LOGI2;
  620. *
  621. dRA13T = ('EXTRAIRE' RA13T 'SCAL' PCD) '*' XVOLD ;
  622. gRA13T = ('EXTRAIRE' RA13T 'SCAL' PCG) '*' XVOLG ;
  623. dRA23T = ('EXTRAIRE' RA23T 'SCAL' PCD) '*' XVOLD ;
  624. gRA23T = ('EXTRAIRE' RA23T 'SCAL' PCG) '*' XVOLG ;
  625. HORROR = ('MAXIMUM' ('PROG' dRA13T gRA13T
  626. dRA23T gRA23T) 'ABS') ;
  627. ERRO = 1.0D-8 * fA12gd 'ABS' ;
  628. LOGI2 = HORROR < ERRO ;
  629. 'SI' ('NON' LOGI2) ;
  630. 'MESSAGE' ('CHAINE' 'Erreur qdm_t ' HORROR ' > ' ERRO);
  631. 'FINSI' ;
  632. LOGI1 = LOGI1 'ET' LOGI2;
  633. *
  634. dRA14 = ('EXTRAIRE' RA14 'SCAL' PCD) '*' XVOLD ;
  635. gRA14 = ('EXTRAIRE' RA14 'SCAL' PCG) '*' XVOLG ;
  636. dRA24 = ('EXTRAIRE' RA24 'SCAL' PCD) '*' XVOLD ;
  637. gRA24 = ('EXTRAIRE' RA24 'SCAL' PCG) '*' XVOLG ;
  638. ERRO = 1.0D-7 * fA14gd 'ABS' ;
  639. HORROR = ('MAXIMUM' ('PROG' dRA14 (gRA14 '+' fA14gd)
  640. (dRA24 '-' fA24gd) gRA24) 'ABS') ;
  641. LOGI2 = HORROR < ERRO ;
  642. 'SI' ('NON' LOGI2) ;
  643. 'MESSAGE' ('CHAINE' 'Erreur energy ' HORROR ' > ' ERRO);
  644. 'FINSI' ;
  645. LOGI1 = LOGI1 'ET' LOGI2;
  646. *
  647. 'SI' ('NON' LOGI1);
  648. 'MESSAGE' ;
  649. 'MESSAGE' 'OPERATEUR KONV';
  650. 'MESSAGE' ('CHAINE' METO);
  651. 'MESSAGE' ;
  652. 'ERREUR' ;
  653. 'FINSI' ;
  654. *
  655. 'FIN' BLMETO ;
  656.  
  657. ****************************************************
  658. ****************************************************
  659. ******** Fin boucle sur les angles *********
  660. ****************************************************
  661. ****************************************************
  662.  
  663. 'FIN' BLOC;
  664.  
  665. 'FIN' ;
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  

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