Télécharger konv_resi_dem_contact_discontinuty_22.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier : konv_resi_dem_contact_discontinuity_22.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 contact discontinuity. ****
  12. **** Left state = phase 2 ****
  13. **** Right state = phase 2 ****
  14. **** ****
  15. **** Methodes: SS, VLH ****
  16. **** ****
  17. **** A. BECCANTINI DM2S/SEMT/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.016E-3 ;
  85. PGAS . 'O2 ' . 'W' = 31.999E-3 ;
  86. PGAS . 'H2O ' . 'W' = 18.0155E-3 ;
  87. PGAS . 'N2 ' . 'W' = 28.013E-3 ;
  88. *
  89. **** Polynomial coefficients
  90. *
  91. PGAS . 'H2 ' . 'A' = 'PROG' 9834.91866 0.54273926 0.000862203836
  92. -2.37281455E-07 1.84701105E-11 ;
  93. PGAS . 'H2O ' . 'A' = 'PROG' 1155.95625 0.768331151 -5.73129958E-05
  94. -1.82753232E-08 2.44485692E-12 ;
  95. PGAS . 'N2 ' . 'A' = 'PROG' 652.940766 0.288239099 -7.80442298E-05
  96. 8.78233606E-09 -3.05514485E-13 ;
  97. PGAS . 'O2 ' . 'A' = 'PROG' 575.012333 0.350522002 -0.000128294865
  98. 2.33636971E-08 -1.53304905E-12;
  99. *
  100. **** Formation enthalpies (energies) at 0K (J/Kg)
  101. *
  102. PGAS . 'H2 ' . 'H0K' = -4.195D6 ;
  103. PGAS . 'H2O ' . 'H0K' = -1.395D7 ;
  104. PGAS . 'N2 ' . 'H0K' = -2.953D5 ;
  105. PGAS . 'O2 ' . 'H0K' = -2.634D5 ;
  106.  
  107.  
  108. ***************************
  109. ***** DOMAINE SPATIAL ****
  110. ***************************
  111.  
  112. A1 = 0.0D0 0.01D0;
  113. A2 = 1.011D0 0.21D0;
  114. A3 = 2.12D0 0.021D0;
  115. A4 = 2.11D0 1.09D0;
  116. A5 = 1.023D0 1.132D0;
  117. A6 = 0.098D0 1.199D0;
  118.  
  119. L12 = A1 'DROIT' 1 A2;
  120. L23 = A2 'DROIT' 1 A3;
  121. L34 = A3 'DROIT' 1 A4;
  122. L45 = A4 'DROIT' 1 A5;
  123. L56 = A5 'DROIT' 1 A6;
  124. L61 = A6 'DROIT' 1 A1;
  125. L25 = A2 'DROIT' 1 A5;
  126.  
  127. DOM10 = 'DALL' L12 L25 L56 L61
  128. 'PLANE';
  129. DOM20 = 'DALL' L23 L34 L45 ('INVERSE' L25)
  130. 'PLANE';
  131.  
  132. *
  133. *** Point ou on controlle la consistence
  134. *
  135.  
  136. P10 = 1.0 0.5;
  137.  
  138. *
  139. EPS = 1.0D-16 ;
  140. K0 = 10.0 ;
  141. *
  142. *******************************************
  143. *** Etats gauche et droite ****************
  144. *******************************************
  145. *
  146. * There are 3 fluxes to control :
  147. * 1 -> 2 can be checked by considering an exact reactive shock
  148. * 2 -> 1 can be checked by considering an exact reactive shock
  149. * 1 -> 1 can be checked via consistency (or via an exact non-reactive
  150. * or by comparing the results with a non-reactive one)
  151. * 2 -> 2 can be checked via consistency (or via an exact non-reactive
  152. * or by comparing the results with a non-reactive one)
  153. *
  154. * Case 1 -> 1
  155. * Constant state
  156. *
  157. tg1 = 593.16 ;
  158. td1 = 293.16 ;
  159. pg1 = 1.023e5 ;
  160. pd1 = 1.023e5 ;
  161. ung1 = -122.0 ;
  162. und1 = -122.0 ;
  163. utg1 = 221.0 ;
  164. utd1 = 101.0 ;
  165. * utg1 = 0.0 ;
  166. * utd1 = 0.0 ;
  167. tg2 = 2800.15 ;
  168. td2 = 1800.15 ;
  169. pg2 = 1.023e5 ;
  170. pd2 = 1.023e5 ;
  171. ung2 = -150.0 ;
  172. und2 = -150.0 ;
  173. utg2 = 100.0 ;
  174. utd2 = 160.0 ;
  175.  
  176. TN1 = 'PROG' tg1 td1 ;
  177. TN2 = 'PROG' tg2 td2 ; ;
  178. PN1 = 'PROG' pg1 pd1 ;
  179. PN2 = 'PROG' pg2 pd2 ;
  180. UN1 = 'PROG' ung1 und1 ;
  181. UN2 = 'PROG' ung2 und2 ;
  182. UT1 = 'PROG' utg1 utd1 ;
  183. UT2 = 'PROG' utg2 utd2 ;
  184. ALPHA1 = 'PROG' 0.0 0.0 ;
  185. ALPHA2 = ('PROG' ('DIME' ALPHA1) '*' 1.0) '-' ALPHA1 ;
  186.  
  187. *
  188. * ETHER = int_0^T cv(T') dT' T < TMAX
  189. * = int_0^TMAX cv(T') dT' '+'
  190. * cv(TMAX) T >= TMAX
  191. *
  192.  
  193. ESP1 = 'EXTRAIRE' (PGAS . 'SPECIES') 1 ;
  194. * DY1 = y_i - y_f for the species 1
  195. DY1 = (('EXTRAIRE' (PGAS . 'MASSFRA') 1) '-'
  196. ('EXTRAIRE' (PGAS . 'MASSFRA') 2)) ;
  197. COEF1 = ('EXTRAIRE' (PGAS . 'CHEMCOEF') 1) '*'
  198. (PGAS . ESP1 . 'W') ;
  199. YFINPH1 = 1.0 ;
  200. YFINPH2 = 1.0 ;
  201. 'SI' (COEF1 > 0) ;
  202. YPH2 = 'EXTRAIRE' (PGAS . 'MASSFRA') 2 ;
  203. YPH1 = YPH2 '+' DY1 ;
  204. 'SINON' ;
  205. YPH1 = 'EXTRAIRE' (PGAS . 'MASSFRA') 2 ;
  206. YPH2 = YPH1 '-' DY1 ;
  207. 'FINSI' ;
  208. YFINPH1 = YFINPH1 '-' YPH1 ;
  209. YFINPH2 = YFINPH2 '-' YPH2 ;
  210. PRYPH1 = 'PROG' YPH1 ;
  211. PRYPH2 = 'PROG' YPH2 ;
  212. 'REPETER' BLESP (('DIME' (PGAS . 'SPECIES')) '-' 2) ;
  213. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') (&BLESP '+' 1) ;
  214. COEF = ('EXTRAIRE' (PGAS . 'CHEMCOEF') (&BLESP '+' 1))
  215. '*' (PGAS . ESP . 'W') ;
  216. DY = (DY1 * (COEF '/' COEF1)) ;
  217. 'SI' (COEF > 0) ;
  218. YPH2 = 'EXTRAIRE' (PGAS . 'MASSFRA') (&BLESP '+' 2) ;
  219. YPH1 = YPH2 '+' DY ;
  220. 'SINON' ;
  221. YPH1 = 'EXTRAIRE' (PGAS . 'MASSFRA') (&BLESP '+' 2) ;
  222. YPH2 = YPH1 '-' DY ;
  223. 'FINSI' ;
  224. PRYPH1 = PRYPH1 'ET' ('PROG' YPH1) ;
  225. PRYPH2 = PRYPH2 'ET' ('PROG' YPH2) ;
  226. YFINPH1 = YFINPH1 '-' YPH1 ;
  227. YFINPH2 = YFINPH2 '-' YPH2 ;
  228. 'FIN' BLESP ;
  229. PRYPH1 = PRYPH1 'ET' ('PROG' YFINPH1) ;
  230. PRYPH2 = PRYPH2 'ET' ('PROG' YFINPH2) ;
  231. 'LISTE' PRYPH1 ;
  232. 'LISTE' PRYPH2 ;
  233. *
  234. TMAX = ('PROG' ('DIME' ALPHA1) '*' (PGAS . 'TMAX')) ;
  235. * TCAL1 = MIN TN1, TMAX
  236. TCAL1 = 0.5D0 '*' ((TMAX '+' TN1) '-' ('ABS' (TN1 '-' TMAX))) ;
  237. DTN1 = TN1 '-' TCAL1 ;
  238. * TCAL1 = MIN TN1, TMAX
  239. TCAL2 = 0.5D0 '*' ((TMAX '+' TN2) '-' ('ABS' (TN2 '-' TMAX))) ;
  240. DTN2 = TN2 '-' TCAL2 ;
  241. *
  242. * Internal energy (J/kg in SI)
  243. *
  244. ETHER1 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  245. CV1 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  246. ETHER2 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  247. CV2 = ('PROG' ('DIME' ALPHA1) '*' 0.0) ;
  248. FUNTN1 = ('PROG' ('DIME' ALPHA1) '*' 1.0) ;
  249. FUNTN2 = ('PROG' ('DIME' ALPHA1) '*' 1.0) ;
  250. 'REPETER' BLPO ((PGAS . 'NORD') '+' 1) ;
  251. 'REPETER' BLESP ('DIME' (PGAS . 'SPECIES')) ;
  252. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') &BLESP ;
  253. YCEL1 = 'EXTRAIRE' PRYPH1 &BLESP ;
  254. YCEL2 = 'EXTRAIRE' PRYPH2 &BLESP ;
  255. AA = 'EXTRAIRE' (PGAS . ESP . 'A') &BLPO ;
  256. DCV1 = (AA * YCEL1 * FUNTN1) ;
  257. DCV2 = (AA * YCEL2 * FUNTN2) ;
  258. CV1 = CV1 '+' DCV1 ;
  259. CV2 = CV2 '+' DCV2 ;
  260. ETHER1 = ETHER1 '+' (DCV1 * TCAL1 '/' (&BLPO)) ;
  261. ETHER2 = ETHER2 '+' (DCV2 * TCAL2 '/' (&BLPO)) ;
  262. 'FIN' BLESP ;
  263. FUNTN1 = FUNTN1 '*' TCAL1 ;
  264. FUNTN2 = FUNTN2 '*' TCAL2 ;
  265. 'FIN' BLPO ;
  266. ETHER1 = ETHER1 '+' (CV1 '*' DTN1) ;
  267. ETHER2 = ETHER2 '+' (CV2 '*' DTN2) ;
  268. *
  269. * Formation energy/enthalpy (J/kg in SI) and gas constant (J/kg/K)
  270. *
  271. EFORM1 = 0.0 ;
  272. EFORM2 = 0.0 ;
  273. RGAS1 = 0.0 ;
  274. RGAS2 = 0.0 ;
  275. 'REPETER' BLESP ('DIME' (PGAS . 'SPECIES')) ;
  276. ESP = 'EXTRAIRE' (PGAS . 'SPECIES') &BLESP ;
  277. YCEL1 = 'EXTRAIRE' PRYPH1 &BLESP ;
  278. YCEL2 = 'EXTRAIRE' PRYPH2 &BLESP ;
  279. EFORM1 = EFORM1 '+' (YCEL1 * (PGAS . ESP . 'H0K')) ;
  280. EFORM2 = EFORM2 '+' (YCEL2 * (PGAS . ESP . 'H0K')) ;
  281. RGAS1 = RGAS1 '+' (YCEL1 * (PGAS . 'RUNIV') '/'
  282. (PGAS . ESP . 'W')) ;
  283. RGAS2 = RGAS2 '+' (YCEL2 * (PGAS . 'RUNIV') '/'
  284. (PGAS . ESP . 'W')) ;
  285. 'FIN' BLESP ;
  286. EFORM1 = 'PROG' ('DIME' ETHER1) '*' EFORM1 ;
  287. EFORM2 = 'PROG' ('DIME' ETHER2) '*' EFORM2 ;
  288.  
  289. *
  290. * Computation of the conservative variables
  291. *
  292. RN1 = PN1 '/' (RGAS1 '*' TN1) ;
  293. RN2 = PN2 '/' (RGAS2 '*' TN2) ;
  294. GNX1 = RN1 * UN1 ;
  295. GNY1 = RN1 * UT1 ;
  296. GNX2 = RN2 * UN2 ;
  297. GNY2 = RN2 * UT2 ;
  298. ECIN1 = 0.5D0 '*' ('PROG' ((ung1 * ung1) '+' (utg1 * utg1))
  299. ((und1 * und1) '+' (utd1 * utd1)));
  300. ECIN2 = 0.5D0 '*' ('PROG' ((ung2 * ung2) '+' (utg2 * utg2))
  301. ((und2 * und2) '+' (utd2 * utd2)));
  302. RETN1 = RN1 '*' (ETHER1 '+' ECIN1 '+' EFORM1) ;
  303. RETN2 = RN2 '*' (ETHER2 '+' ECIN2 '+' EFORM2) ;
  304. *
  305. * Computation of the resi contribution in (n,t)
  306. *
  307. 'SI' (ung2 > 0) ;
  308. retg2 = 'EXTRAIRE' RETN2 1 ;
  309. rhog2 = 'EXTRAIRE' RN2 1 ;
  310. f1gd = ung2 '*' rhog2 ;
  311. f2gd = (f1gd '*' ung2) '+' pg2 ;
  312. f3gd = f1gd '*' utg2 ;
  313. f4gd = ung2 '*' (retg2 '+' pg2);
  314. 'SINON' ;
  315. retd2 = 'EXTRAIRE' RETN2 2 ;
  316. rhod2 = 'EXTRAIRE' RN2 2 ;
  317. f1gd = und2 '*' rhod2 ;
  318. f2gd = (f1gd '*' und2) '+' pd2 ;
  319. f3gd = f1gd '*' utd2 ;
  320. f4gd = und2 '*' (retd2 '+' pd2);
  321. 'FINSI' ;
  322.  
  323. ****************************************************
  324. ****************************************************
  325. ******** Boucle sur les angles *********
  326. ****************************************************
  327. ****************************************************
  328.  
  329. DANGLE = 360 '/' 7.15;
  330. ANGLE = 11.3 ;
  331.  
  332. 'REPETER' BLOC 8;
  333.  
  334. *
  335. *** Rotation
  336. *
  337.  
  338. ANGLE = ANGLE '+' DANGLE;
  339. ORIG = 0.0D0 0.0D0;
  340.  
  341. 'MESSAGE' ;
  342. 'MESSAGE' (CHAIN 'Angle de rotation= ' ANGLE);
  343. 'MESSAGE' ;
  344.  
  345. DOM1 = DOM10 'TOURNER' ANGLE ORIG;
  346. DOM2 = DOM20 'TOURNER' ANGLE ORIG;
  347. P1FAC = P10 'TOURNER' ANGLE ORIG;
  348.  
  349. DOMTOT = DOM1 ET DOM2;
  350. 'ELIMINATION' DOMTOT 1D-6;
  351.  
  352. $DOMTOT = 'MODELISER' DOMTOT 'EULER';
  353. $DOM1 = 'MODELISER' DOM1 'EULER';
  354. $DOM2 = 'MODELISER' DOM2 'EULER';
  355. TDOMTOT = 'DOMA' $DOMTOT 'VF';
  356. TDOM1 = 'DOMA' $DOM1 'VF';
  357. TDOM2 = 'DOMA' $DOM2 'VF';
  358. MDOM1 = TDOM1 . 'QUAF' ;
  359. MDOM2 = TDOM2 . 'QUAF' ;
  360. MDOMTOT = TDOMTOT . 'QUAF' ;
  361. GRALP1 = 'NOMC' ('MOTS' 'UX' 'UY') ('DOMA' $DOMTOT 'XXNORMAF')
  362. ('MOTS' 'P1DX' 'P1DY') ;
  363.  
  364. 'ELIM' (MDOMTOT 'ET' MDOM1 'ET' MDOM2) 1.E-6 ;
  365.  
  366. *
  367. VINF = 'MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' 100. ;
  368. *
  369. **** Redefinition de P1FAC dans $DOMTOT 'FACE'
  370. *
  371.  
  372. P1FAC = ('DOMA' $DOMTOT 'FACE') 'POIN' 'PROC' P1FAC ;
  373. XSURF = 'EXTRAIRE' ('DOMA' $DOMTOT 'XXSURFAC') P1FAC 'SCAL' ;
  374. NX = 'EXTRAIRE' ('DOMA' $DOMTOT 'XXNORMAF') P1FAC 'UX' ;
  375. NY = 'EXTRAIRE' ('DOMA' $DOMTOT 'XXNORMAF') P1FAC 'UY' ;
  376. TX = -1 * NY ;
  377. TY = NX ;
  378.  
  379. GEOPC = ('DOMA' $DOMTOT 'FACEL') 'ELEM' 'APPUYE' 'LARGEMENT'
  380. P1FAC ;
  381. AA = 'CHANGER' GEOPC 'POI1' ;
  382. PC1 = 'POIN' 1 AA ;
  383. P2 = 'POIN' 1 ('DOMA' $DOMTOT 'CENTRE') ;
  384. PC2 = 'POIN' 3 AA ;
  385. * Si P3 n'existe pas, probleme en FACEL.
  386. 'SI' ('NEG' PC1 P2) ;
  387. ORIENT = -1 ;
  388. PCD = PC1 ;
  389. PCG = PC2 ;
  390. XVOLD = 'MAXIMUM' (TDOM1 . 'XXVOLUM') ;
  391. XVOLG = 'MAXIMUM' (TDOM2 . 'XXVOLUM') ;
  392. 'SINON' ;
  393. ORIENT = 1 ;
  394. PCD = PC2 ;
  395. PCG = PC1 ;
  396. XVOLG = 'MAXIMUM' (TDOM1 . 'XXVOLUM') ;
  397. XVOLD = 'MAXIMUM' (TDOM2 . 'XXVOLUM') ;
  398. 'FINSI' ;
  399.  
  400. uxg1 = ((ung1 '*' NX) '+' (utg1 '*' TX)) '*' ORIENT ;
  401. uyg1 = ((ung1 '*' NY) '+' (utg1 '*' TY)) '*' ORIENT ;
  402. uxg2 = ((ung2 '*' NX) '+' (utg2 '*' TX)) '*' ORIENT ;
  403. uyg2 = ((ung2 '*' NY) '+' (utg2 '*' TY)) '*' ORIENT ;
  404. uxd1 = ((und1 '*' NX) '+' (utd1 '*' TX)) '*' ORIENT ;
  405. uyd1 = ((und1 '*' NY) '+' (utd1 '*' TY)) '*' ORIENT ;
  406. uxd2 = ((und2 '*' NX) '+' (utd2 '*' TX)) '*' ORIENT ;
  407. uyd2 = ((und2 '*' NY) '+' (utd2 '*' TY)) '*' ORIENT ;
  408.  
  409. 'SI' GRAPH;
  410. 'TRACER' (('DOMA' $DOMTOT 'MAILLAGE') 'ET'
  411. ('COULEUR' ('DOMA' $DOMTOT 'FACEL') 'ROUGE') 'ET' P1FAC)
  412. 'TITRE' 'Domaine et FACEL';
  413. 'FINSI' ;
  414.  
  415. MAILIM = 'DIFF' ('DOMA' $DOMTOT 'FACE') ('MANUEL' 'POI1' P1FAC) ;
  416.  
  417. ***********************
  418. **** Les CHPOINTs ****
  419. ***********************
  420.  
  421. CHRN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RN1) ;
  422. CHRN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RN2) ;
  423.  
  424. CHVN1 = ('MANUEL' 'CHPO' (TDOM1 . 'CENTRE') 2 'UX' uxg1
  425. 'UY' uyg1) '+'
  426. ('MANUEL' 'CHPO' (TDOM2 . 'CENTRE') 2 'UX' uxd1
  427. 'UY' uyd1) ;
  428. CHVN2 = ('MANUEL' 'CHPO' (TDOM1 . 'CENTRE') 2 'UX' uxg2
  429. 'UY' uyg2) '+'
  430. ('MANUEL' 'CHPO' (TDOM2 . 'CENTRE') 2 'UX' uxd2
  431. 'UY' uyd2) ;
  432.  
  433. CHGN1 = CHRN1 '*' CHVN1 ;
  434. CHGN2 = CHRN2 '*' CHVN2 ;
  435.  
  436. CHRET1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RETN1) ;
  437. CHRET2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' RETN2) ;
  438.  
  439. CHTN1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' TN1) ;
  440. CHTN2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' TN2) ;
  441.  
  442. CHAL1 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' ALPHA1) ;
  443. CHAL2 = ('MANUEL' 'CHPO' (TDOMTOT . 'CENTRE') 1 'SCAL' ALPHA2) ;
  444.  
  445. R1 R2 V1 V2 P1 P2 T1 T2 = 'PRIM' 'DEM' PGAS CHAL1 CHAL2
  446. (CHAL1 * CHRN1) (CHAL2 * CHRN2) (CHAL1 * CHGN1)
  447. (CHAL2 * CHGN2) (CHAL1 * CHRET1) (CHAL2 * CHRET2)
  448. CHTN1 CHTN2 EPS ;
  449.  
  450. GRADAL1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  451. 'P1DX' 0.0 'P1DY' 0.0 ;
  452. GRADAL2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  453. 'P1DX' 0.0 'P1DY' 0.0 ;
  454. LIMAL1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  455. 'P1' 0.0 ;
  456. LIMAL2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  457. 'P1' 0.0 ;
  458. GRADR1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  459. 'P1DX' 0.0 'P1DY' 0.0 ;
  460. GRADR2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  461. 'P1DX' 0.0 'P1DY' 0.0 ;
  462. LIMR1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  463. 'P1' 0.0 ;
  464. LIMR2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  465. 'P1' 0.0 ;
  466. GRADV1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 4
  467. 'P1DX' 0.0 'P1DY' 0.0 'P2DX' 0.0 'P2DY' 0.0 ;
  468. GRADV2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 4
  469. 'P1DX' 0.0 'P1DY' 0.0 'P2DX' 0.0 'P2DY' 0.0 ;
  470. LIMV1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  471. 'P1' 0.0 'P2' 0.0 ;
  472. LIMV2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  473. 'P1' 0.0 'P2' 0.0 ;
  474. GRADP1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  475. 'P1DX' 0.0 'P1DY' 0.0 ;
  476. GRADP2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 2
  477. 'P1DX' 0.0 'P1DY' 0.0 ;
  478. LIMP1 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  479. 'P1' 0.0 ;
  480. LIMP2 = 'MANU' 'CHPO' (TDOMTOT . 'CENTRE') 1
  481. 'P1' 0.0 ;
  482.  
  483. *
  484. **** L'operateur 'PRET'
  485. *
  486.  
  487. CHFAL1 CHFAL2 CHFRN1 CHFRN2 CHFVN1 CHFVN2 CHFPN1 CHFPN2 =
  488. 'PRET' 'DEM' $DOMTOT
  489. CHAL1 (0.0 * GRADAL1) LIMAL1
  490. CHAL2 (0.0 * GRADAL2) LIMAL2
  491. R1 (0.0 * GRADR1) LIMR1
  492. R2 (0.0 * GRADR2) LIMR2
  493. V1 (0.0 * GRADV1) LIMV1
  494. V2 (0.0 * GRADV2) LIMV2
  495. P1 (0.0 * GRADP1) LIMP1
  496. P2 (0.0 * GRADP2) LIMP2 ;
  497.  
  498.  
  499. *
  500. **** L'operateur 'KONV'
  501. *
  502.  
  503. 'REPETER' BLMETO 2 ;
  504.  
  505. 'SI' ('EGA' &BLMETO 1) ;
  506. METO = 'SS' ;
  507. 'FINSI' ;
  508. 'SI' ('EGA' &BLMETO 2) ;
  509. METO = 'AUSMPUP' ;
  510. 'FINSI' ;
  511. 'SI' ('EGA' &BLMETO 3) ;
  512. METO = 'VLH' ;
  513. * NB VLH n'est pas exact sur la discontinuité de contact
  514. 'FINSI' ;
  515.  
  516. 'MESSAGE' ('CHAINE' 'METO = ' METO) ;
  517. LISTINC1 = ('MOTS' 'ALF1' 'RN1' 'RNX1' 'RUY1' 'RET1'
  518. 'ALF2' 'RN2' 'RUX2' 'RUY2' 'RET2') ;
  519.  
  520. SI ('EGA' METO 'AUSMPUP') ;
  521. CHPRES DT SURF = 'KONV' 'VF' 'DEM' 'RESI' METO 'CONS'
  522. $DOMTOT PGAS LISTINC1 CHAL1 CHAL2 CHFAL1 CHFAL2 CHFRN1 CHFRN2
  523. CHFVN1 CHFVN2 CHFPN1 CHFPN2 K0 GRALP1 EPS MAILIM VINF VINF ;
  524. 'SINON' ;
  525. CHPRES DT SURF = 'KONV' 'VF' 'DEM' 'RESI' METO 'CONS'
  526. $DOMTOT PGAS LISTINC1 CHAL1 CHAL2 CHFAL1 CHFAL2 CHFRN1 CHFRN2
  527. CHFVN1 CHFVN2 CHFPN1 CHFPN2 K0 GRALP1 EPS MAILIM ;
  528. 'FINSI' ;
  529.  
  530. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' ETHER1 1)) ;
  531. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' ECIN1 1)) ;
  532. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' EFORM1 1)) ;
  533. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' (pg1)) ;
  534. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' ('EXTRAIRE' RN1 1)) ;
  535. * 'LISTE' ('CHAINE' 'FORMAT' '(E16.10)' (ung1)) ;
  536. * 'OPTION' DONN 5 ;
  537.  
  538. RESX1 = 'EXCO' ('EXTRAIRE' LISTINC1 7) CHPRES ;
  539. RESX2X = 'EXCO' ('EXTRAIRE' LISTINC1 8) CHPRES ;
  540. RESX2Y = 'EXCO' ('EXTRAIRE' LISTINC1 9) CHPRES ;
  541. RESX3 = 'EXCO' ('EXTRAIRE' LISTINC1 10) CHPRES ;
  542.  
  543. RESX2N = (RESX2X '*' NX) '+' (RESX2Y * NY);
  544. RESX2T = (RESX2X '*' TX) '+' (RESX2Y * TY);
  545.  
  546. f1 = 'EXTRAIRE' RESX1 'SCAL' PCD ;
  547. f1bis = 'EXTRAIRE' RESX1 'SCAL' PCG ;
  548. ERRO = 1D-8 '*' f1gd 'ABS' ;
  549. LOGI1 = ('ABS' ((f1 * XVOLD) + (f1bis * XVOLG))) < ERRO ;
  550. HORROR = ('ABS' ((f1gd * XSURF) + (f1bis * XVOLG))) ;
  551. LOGI2 = HORROR < ERRO ;
  552. 'MESSAGE' ('CHAINE' 'error = ' 'FORMAT' '(E16.10)' HORROR) ;
  553. 'MESSAGE' ('CHAINE' 'val = ' 'FORMAT' '(E16.10)'
  554. (f1gd 'ABS')) ;
  555. LOGI1 = LOGI1 'ET' LOGI2;
  556.  
  557. f2 = 'EXTRAIRE' RESX2N 'SCAL' PCD ;
  558. f2bis = 'EXTRAIRE' RESX2N 'SCAL' PCG ;
  559. ERRO = 1D-8 '*' f2gd 'ABS' ;
  560. LOGI2 = ('ABS' ((f2 * XVOLD) + (f2bis * XVOLG))) < ERRO ;
  561. LOGI1 = LOGI1 'ET' LOGI2;
  562. HORROR = ('ABS' ((f2gd * XSURF) + (f2bis * XVOLG))) ;
  563. LOGI2 = HORROR < ERRO ;
  564. 'MESSAGE' ('CHAINE' 'error = ' 'FORMAT' '(E16.10)' HORROR) ;
  565. 'MESSAGE' ('CHAINE' 'val = ' 'FORMAT' '(E16.10)'
  566. (f2gd 'ABS')) ;
  567. LOGI1 = LOGI1 'ET' LOGI2;
  568.  
  569. f3 = 'EXTRAIRE' RESX2T 'SCAL' PCD ;
  570. f3bis = 'EXTRAIRE' RESX2T 'SCAL' PCG ;
  571. ERRO = 1D-8 '*' f3gd 'ABS' ;
  572. LOGI2 = ('ABS' ((f3 * XVOLD) + (f3bis * XVOLG))) < ERRO ;
  573. LOGI1 = LOGI1 'ET' LOGI2;
  574. HORROR = ('ABS' ((f3gd * XSURF) + (f3bis * XVOLG))) ;
  575. LOGI2 = HORROR < ERRO ;
  576. 'MESSAGE' ('CHAINE' 'error = ' 'FORMAT' '(E16.10)' HORROR) ;
  577. 'MESSAGE' ('CHAINE' 'val = ' 'FORMAT' '(E16.10)'
  578. (f3gd 'ABS')) ;
  579. LOGI1 = LOGI1 'ET' LOGI2;
  580.  
  581. f4 = 'EXTRAIRE' RESX3 'SCAL' PCD ;
  582. f4bis = 'EXTRAIRE' RESX3 'SCAL' PCG ;
  583. ERRO = 5D-7 '*' f4gd 'ABS' ;
  584. LOGI2 = ('ABS' ((f4 * XVOLD) + (f4bis * XVOLG))) < ERRO ;
  585. LOGI1 = LOGI1 'ET' LOGI2;
  586. HORROR = ('ABS' ((f4gd * XSURF) + (f4bis * XVOLG))) ;
  587. LOGI2 = HORROR < ERRO ;
  588. 'MESSAGE' ('CHAINE' 'error = ' 'FORMAT' '(E16.10)' HORROR) ;
  589. 'MESSAGE' ('CHAINE' 'val = ' 'FORMAT' '(E16.10)'
  590. (f4gd 'ABS')) ;
  591. LOGI1 = LOGI1 'ET' LOGI2;
  592.  
  593. 'SI' ('NON' LOGI1);
  594. 'MESSAGE' ;
  595. 'MESSAGE' 'OPERATEUR KONV';
  596. 'MESSAGE' ('CHAINE' METO);
  597. 'MESSAGE' ;
  598. 'ERREUR' 5 ;
  599. 'FINSI' ;
  600.  
  601. 'FIN' BLMETO ;
  602.  
  603. ****************************************************
  604. ****************************************************
  605. ******** Fin boucle sur les angles *********
  606. ****************************************************
  607. ****************************************************
  608.  
  609. 'FIN' BLOC;
  610.  
  611. 'FIN' ;
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  

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