Télécharger cavitefmm.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier : cavitefmm.dgibi
  2. ************************************************************************
  3. ************************************************************************
  4. *************************************************************************
  5. * CAVITE CARRE A PAROI DEFILANTE *
  6. * Methode implicite sans matrice pour les equations de *
  7. * Navier-Stokes (bas Mach) *
  8. * *
  9. * BECCANTINI A., SFME/LTMF, DEC 2003 *
  10. * *
  11. *************************************************************************
  12. *
  13. * The real file starts after the procedure PNSSM
  14. *
  15. *************************************************************************
  16. *************************************************************************
  17. *********** SOLUTION OF THE NAVIER-STOKES EQUATIONS ********************
  18. *********** FMM ********************
  19. *************************************************************************
  20. *************************************************************************
  21. *
  22. * RVX . 'RESULTS' : table containing the results
  23. *
  24. * RVX . 'FREQI' : frequency of presenting the results
  25. *
  26. * RVX . 'MODEL' : model object
  27. * RVX . 'RN0' : density
  28. * RVX . 'GN0' : qdm
  29. * RVX . 'RET0' : total energy
  30. *
  31. * RVX . 'PGAS' : table containing the gas model
  32. * RVX . 'PGAS' . 'GAMN' : gamma
  33. * RVX . 'PGAS' . 'MU' : dynamic viscosity (kg/m^3 x m^2/s)
  34. * RVX . 'PGAS' . 'LAMBDA' : heat diffusion (W/K/m)
  35. *
  36. *
  37. * RVX . 'GRAVITY' : gravity
  38. *
  39. * RVX . 'LISTCONS' : name of the conservative variables
  40. * RVX . 'LISTPRIM' : name of the primitive variables
  41. *
  42. * RVX . 'LISTERR' : name of the error variables
  43. *
  44. * RVX . 'METHOD' : numerical scheme
  45. * RVX . 'CUTOFF' : cut off speed
  46. *
  47. * RVX . 'SPACEA' : space accuracy
  48. * RVX . 'LIMITER' : limiter type
  49. * RVX . 'TIMEA' : time accuracy
  50. *
  51. * RVX . 'T0' : initial time
  52. * RVX . 'TFINAL' : final time
  53. * RVX . 'DTPS' ('CFL') : time step or CFL number
  54. *
  55. * RVX . 'DCFL' : CFL number for dual time
  56. *
  57. * Error criteria for dual time loop:
  58. * RVX . 'NDTITER' : number of iterations
  59. * RVX . 'RELERR' : Logical (Relative error or absolute error)
  60. * RVX . 'EPSDT' : error at which dual time iterations are stopped
  61. *
  62. * RVX . 'NJAC' : Jacobi iterations
  63. *
  64. * RVX . 'PROLIM' : table called by the procedure PROLIM,
  65. * procedure to compute boundary conditions
  66. *
  67. * RVX . 'DIFTIMP' : boundary condition on temperature
  68. * RVX . 'DIFGTIMP' : boundary condition on gradient of temperature
  69. * RVX . 'DIFVIMP' : boundary condition on speed
  70. * RVX . 'DIFGVIMP' : boundary condition on gradient of speed
  71. * RVX . 'DIFTAUI' : boundary condition on constraint tensor
  72. * RVX . 'DIFQIMP' : boundary condition on heat flux
  73. *
  74. *
  75.  
  76. 'DEBPROC' PNSSM ;
  77. 'ARGUMENT' RVX*TABLE ;
  78. *
  79. *
  80. 'SI' ('EXISTE' RVX 'RESULTS') ;
  81. 'MESS' 'Table RESULTS already exists' ;
  82. 'SINON' ;
  83. RVX . 'RESULTS' = 'TABLE' ;
  84. RVX . 'RESULTS' . 'TPS' = RVX . 'T0' ;
  85. RVX . 'RESULTS' . 'RN' = 'COPIER' (RVX . 'RN0') ;
  86. RVX . 'RESULTS' . 'GN' = 'COPIER' (RVX . 'GN0') ;
  87. RVX . 'RESULTS' . 'RET' = 'COPIER' (RVX . 'RET0') ;
  88. RVX . 'RESULTS' . 'LISTLINF' = 'PROG' ;
  89. RVX . 'RESULTS' . 'LISTITDT' = 'LECT' ;
  90. RVX . 'RESULTS' . 'LISTITER' = 'LECT' ;
  91. RVX . 'RESULTS' . 'NITER' = 0 ;
  92. 'FINSI' ;
  93.  
  94. MDOMINT = RVX . 'MODEL' ;
  95. NELT = 'NBEL' ('DOMA' MDOMINT 'CENTRE') ;
  96. *
  97. ***** Physical properties
  98. *
  99. GAMN = RVX . 'PGAS' . 'GAMN' ;
  100. GAMSCA1 = 'MAXIMUM' GAMN ;
  101. GAMSCA2 = 'MINIMUM' GAMN ;
  102. 'SI' ('EGA' GAMSCA2 GAMSCA1 0.0001) ;
  103. GAMSCAL = GAMSCA1 ;
  104. 'SINON' ;
  105. 'MESSAGE' ;
  106. 'MESSAGE' 'Gamma is not constant' ;
  107. 'ERREUR' 21 ;
  108. 'FINSI' ;
  109. *
  110. MU = (RVX . 'PGAS' . 'MU') ;
  111. LAMBDA = (RVX . 'PGAS' . 'LAMBDA') ;
  112. R = (RVX . 'PGAS' . 'R') ;
  113. CV = R '/' (gamscal '-' 1.) ;
  114.  
  115. *
  116. LISTINCO = RVX . 'LISTCONS' ;
  117. LISTPRIM = RVX . 'LISTPRIM' ;
  118. LISTERR = RVX . 'LISTERR' ;
  119. * Names of the gradient of temperature
  120. LMGTEMP = 'MOTS' 'P1DX' 'P1DY' ;
  121. * Names of the gradient of speed
  122. LMGVIT = 'MOTS' 'P1DX' 'P1DY' 'P2DX' 'P2DY' ;
  123.  
  124. *
  125. * Upwind scheme
  126. *
  127. METO = RVX . 'METHOD' ;
  128.  
  129. * Space accuracy (1 or 2) and limiter
  130. * Time accuracy (1 or 2)
  131.  
  132. ORDESP = RVX . 'SPACEA' ;
  133. TYPELIM = RVX . 'LIMITER' ;
  134. ORDTPS = RVX . 'TIMEA' ;
  135.  
  136. * Initial/final time
  137. * Deltat or CFL
  138. TPS = RVX . 'RESULTS' . 'TPS' ;
  139. TFINAL = RVX . 'TFINAL' ;
  140. 'SI' ('EXISTE' RVX 'DTPS') ;
  141. 'SI' ('EXISTE' RVX 'CFL') ;
  142. 'MESSAGE' 'DTPS or CFL ???' ;
  143. 'ERREUR' 21 ;
  144. 'FINSI' ;
  145. DTPS = RVX . 'DTPS' ;
  146. 'SINON' ;
  147. CFL = RVX . 'CFL' ;
  148. 'FINSI' ;
  149.  
  150. * Dual time iterations
  151. NDT = RVX . 'NDTITER' ;
  152. * Relative error
  153. EPSDT = RVX . 'EPSDT' ;
  154. * Jacobi iterations
  155. * NJAC = RVX . 'NJAC' ;
  156. * Cut off speed
  157. ICO = RVX . 'CUTOFF' ;
  158. * To compute the diffusive cut-off
  159. DELTAX = 'DOMA' MDOMINT 'XXDIEMIN' ;
  160. USDELTAX = 'INVERSE' DELTAX ;
  161. *
  162. **** Conservative variables
  163. *
  164. *
  165. MOT1 = 'EXTRAIRE' LISTINCO 1 ;
  166. 'SI' ('EGA' ('VALE' 'DIME') 2) ;
  167. NOMMOM = 'EXTRAIRE' LISTINCO
  168. ('LECT' 2 3 ) ;
  169. NOMVEL = 'MOTS' 'UX' 'UY' ;
  170. MOT2 = 'EXTRAIRE' LISTINCO 4 ;
  171. 'SINON' ;
  172. NOMMOM = 'EXTRAIRE' LISTINCO
  173. ('LECT' 2 3 4) ;
  174. NOMVEL = 'MOTS' 'UX' 'UY' 'UZ' ;
  175. MOT2 = 'EXTRAIRE' LISTINCO 5 ;
  176. 'FINSI' ;
  177.  
  178. RN0 = 'REDU' (RVX . 'RESULTS' . 'RN') ('DOMA' MDOMINT 'CENTRE') ;
  179. GN0 = 'REDU' (RVX . 'RESULTS' . 'GN') ('DOMA' MDOMINT 'CENTRE') ;
  180. RET0 = 'REDU' (RVX . 'RESULTS' . 'RET') ('DOMA' MDOMINT 'CENTRE') ;
  181. *
  182. **** Primitive variables
  183. *
  184. VN0 PN0 = 'PRIM' 'PERFMONO' RN0 GN0 RET0 GAMN ;
  185. TN0 = PN0 '/' (R '*' RN0) ;
  186.  
  187. MOTRN = 'EXTRAIRE' LISTPRIM 1 ;
  188. 'SI' ('EGA' ('VALE' 'DIME') 2) ;
  189. MOTVN = 'EXTRAIRE' LISTPRIM
  190. ('LECT' 2 3 ) ;
  191. MOTPN = 'EXTRAIRE' LISTPRIM 4 ;
  192. 'SINON' ;
  193. MOTVN = 'EXTRAIRE' LISTPRIM
  194. ('LECT' 2 3 4) ;
  195. MOTPN = 'EXTRAIRE' LISTPRIM 5 ;
  196. 'FINSI' ;
  197. *
  198. **** Coeff to compute gradients for convective term (MCHSCA, MCHVEC)
  199. * Boundary conditions have to be taken into account
  200. *
  201. RCHLIM RESLIM = PROLIM (RVX . 'PROLIM') MDOMINT LISTINCO LISTPRIM
  202. RN0 VN0 PN0 GAMN ;
  203.  
  204. MAILLIM = 'EXTRAIRE' RCHLIM 'MAILLAGE' ;
  205.  
  206. 'SI' (MAILLIM 'EGA' 0) ;
  207. CHPVID PIPI = 'KOPS' 'MATRIK' ;
  208. MAILLIM = 'DIFF' ('DOMA' MDOMINT 'CENTRE')
  209. ('DOMA' MDOMINT 'CENTRE') ;
  210. GRADRN ALRN MCHSCA = 'PENT' MDOMINT 'CENTRE' 'EULESCAL' 'NOLIMITE'
  211. ('MOTS' 'SCAL') RN0 ;
  212. GRADVN ALVN MCHVEC = 'PENT' MDOMINT 'CENTRE' 'EULEVECT' 'NOLIMITE'
  213. NOMVEL GN0 'CLIM' (RVX . 'DIFVIMP') ;
  214. 'SINON' ;
  215. SCALBC = 'MANUEL' 'CHPO' MAILLIM 1 'SCAL' 1.0 ;
  216. 'SI' (('VALEUR' 'DIME') 'EGA' 2) ;
  217. VECTBC = 'MANUEL' 'CHPO' MAILLIM
  218. 'NATURE' 'DISCRET' 2 'UX' 0.0 'UY' 0.0 ;
  219. * Same name as NOMVEL
  220. 'SINON' ;
  221. VECTBC = 'MANUEL' 'CHPO' MAILLIM
  222. 'NATURE' 'DISCRET' 3 'UX' 0.0 'UY' 0.0 'UZ' ;
  223. 'FINSI' ;
  224. VECTBC = VECTBC 'ET' (RVX . 'DIFVIMP') ;
  225. *
  226. GRADRN ALRN MCHSCA = 'PENT' MDOMINT 'CENTRE' 'EULESCAL' 'NOLIMITE'
  227. ('MOTS' 'SCAL') RN0 'CLIM' SCALBC ;
  228.  
  229. GRADVN ALVN MCHVEC = 'PENT' MDOMINT 'CENTRE' 'EULEVECT' 'NOLIMITE'
  230. NOMVEL VN0 'CLIM' VECTBC ;
  231.  
  232. 'FINSI' ;
  233.  
  234. *
  235. *** Coeff to compute gradient for diffusive flux
  236. *
  237.  
  238. GRADTN MCHDIT = 'PENT' MDOMINT 'FACE' 'DIAMAN2' ('MOTS' 'SCAL')
  239. LMGTEMP TN0 (RVX . 'DIFTIMP') (RVX . 'DIFGTIMP') ;
  240. GRADVN MCHDIV = 'PENT' MDOMINT 'FACE' 'DIAMAN2' NOMVEL LMGVIT
  241. VN0 (RVX . 'DIFVIMP') (RVX . 'DIFGVIMP') ;
  242. NOMVEL = 'MOTS' 'UX' 'UY' ;
  243. *
  244. *
  245. *** After each dual time loop, we could display
  246. * the evolution of the error in the dual time loop
  247. * the evolution of the dual time step (the safety factor)
  248. *
  249.  
  250. LISTLINF = RVX . 'RESULTS' . 'LISTLINF' ;
  251. LISTITDT = RVX . 'RESULTS' . 'LISTITDT' ;
  252. LISTITER = RVX . 'RESULTS' . 'LISTITER' ;
  253.  
  254. *
  255.  
  256. 'MESSAGE' ;
  257. 'MESSAGE' ('CHAINE' 'Methode = ' METO) ;
  258. 'MESSAGE' ;
  259.  
  260. 'TEMPS' 'ZERO' ;
  261.  
  262. ************************************************************************
  263. ************************************************************************
  264. **** Temporal loop *****************************************************
  265. ************************************************************************
  266. ************************************************************************
  267.  
  268. RN_N1M1 = 'COPIER' RN0 ;
  269. GN_N1M1 = 'COPIER' GN0 ;
  270. RET_N1M1 = 'COPIER' RET0 ;
  271.  
  272. AA = 'DIME' LISTITER ;
  273. 'SI' (AA > 0) ;
  274. PTITER = 'EXTRAIRE' LISTITER AA ;
  275. 'SINON' ;
  276. PTITER = 0 ;
  277. 'FINSI' ;
  278.  
  279. DUSDT = 0.0D0 ;
  280.  
  281. 'REPETER' BLITER -1 ;
  282.  
  283. PTITER = PTITER '+' 1 ;
  284. *
  285. **** Personal procedure
  286. *
  287. PROCPT RVX ;
  288. *
  289. *
  290. **** _N1M = (t^n,\tau^m)
  291. * _N1M1 = (t^n,\tau^{m+1})
  292. *
  293. *
  294. ************************************************************************
  295. ****** Loop on dual time***********************************************
  296. ************************************************************************
  297. *
  298. *
  299. *** DUSDT0 is the increment of DUSDT in the previous (physical) time
  300. * iteration.
  301. *
  302. DUSDT0 = DUSDT ;
  303. DUSDT = 0.0D0 ;
  304.  
  305. 'REPETER' BLDT NDT ;
  306.  
  307. RN_N1M = RN_N1M1 ;
  308. GN_N1M = GN_N1M1 ;
  309. RET_N1M = RET_N1M1 ;
  310. *
  311. **** Primitive variables
  312. *
  313.  
  314. VN_N1M PN_N1M = 'PRIM' 'PERFMONO' RN_N1M GN_N1M RET_N1M GAMN ;
  315. *
  316. *** Boundary conditions
  317. *
  318.  
  319. RCHLIM RESLIM = PROLIM (RVX . 'PROLIM') MDOMINT LISTINCO LISTPRIM
  320. RN_N1M VN_N1M PN_N1M GAMN ;
  321.  
  322. *
  323. ****** First/second order reconstruction
  324. *
  325. 'SI' (ORDESP 'EGA' 2) ;
  326. *
  327. NNLIM = 'NBNO' MAILLIM ;
  328. 'SI' (NNLIM 'EGA' 0) ;
  329. RNLIM = CHPVID ;
  330. PNLIM = CHPVID ;
  331. VNLIM = RVX . 'DIFVIMP' ;
  332. 'SINON' ;
  333. RNLIM = ('EXCO' MOTRN RCHLIM 'SCAL') ;
  334. PNLIM = ('EXCO' MOTPN RCHLIM 'SCAL') ;
  335. VNLIM = ('EXCO' MOTVN RCHLIM MOTVN)
  336. 'ET' (RVX . 'DIFVIMP') ;
  337. 'FINSI' ;
  338. GRADRN ALRN0 = 'PENT' MDOMINT 'CENTRE' 'EULESCAL' TYPELIM
  339. ('MOTS' 'SCAL') RN_N1M
  340. 'CLIM' RNLIM 'GRADGEO' MCHSCA ;
  341. GRADPN ALPN0 = 'PENT' MDOMINT 'CENTRE' 'EULESCAL' TYPELIM
  342. ('MOTS' 'SCAL') PN_N1M
  343. 'CLIM' PNLIM 'GRADGEO' MCHSCA ;
  344. GRADVN ALVN0 = 'PENT' MDOMINT 'CENTRE' 'EULEVECT' TYPELIM
  345. ('MOTS' 'UX' 'UY') VN_N1M
  346. 'CLIM' VNLIM 'GRADGEO' MCHVEC ;
  347.  
  348. * 'SI' (&BLDT < NLCB) ;
  349. * ALRN0 = 'COPIER' ALRN ;
  350. * ALPN0 = 'COPIER' ALPN ;
  351. * ALVN0 = 'COPIER' ALVN ;
  352. * 'SINON' ;
  353. * 'SI' (&BLDT 'EGA' NLCB) ;
  354. * 'MESSAGE' ;
  355. * 'MESSAGE' 'On gele les limiteurs!!!' ;
  356. * 'MESSAGE' ;
  357. * 'FINSI' ;
  358. * 'FINSI' ;
  359.  
  360. ROF VITF PF GAMF = 'PRET' 'PERFMONO' 2 1
  361. MDOMINT
  362. RN_N1M GRADRN ALRN0
  363. VN_N1M GRADVN ALVN0
  364. PN_N1M GRADPN ALPN0
  365. GAMN ;
  366. 'SINON' ;
  367. ROF VITF PF GAMF = 'PRET' 'PERFMONO' 1 1
  368. MDOMINT
  369. RN_N1M VN_N1M PN_N1M GAMN ;
  370. 'FINSI' ;
  371.  
  372. RESIDU DELTAT = 'KONV' 'VF' 'PERFMONO' 'RESI' METO
  373. MDOMINT LISTINCO ROF VITF PF GAMF MAILLIM
  374. ICO (MU '*' ('INVERSE' RN_N1M) '*' USDELTAX) ;
  375. * ICO ICO ;
  376. RESIDU = RESIDU '+' RESLIM ;
  377.  
  378. *
  379. **** La gravite
  380. *
  381.  
  382. RESGRA = 'FIMP' 'VF' 'GRAVMONO' 'RESI' LISTINCO
  383. RN_N1M GN_N1M1 (RVX . 'GRAVITY') ;
  384.  
  385. RESIDU = RESIDU '+' RESGRA ;
  386. *
  387. **************************************
  388. **** Diffusive terms *****************
  389. **************************************
  390. *
  391. TN_N1M = PN_N1M '/' (R '*' RN_N1M) ;
  392. *
  393. GRADTN = 'PENT' MDOMINT 'FACE' 'DIAMAN2' ('MOTS' 'SCAL')
  394. LMGTEMP TN_N1M (RVX . 'DIFTIMP') (RVX . 'DIFGTIMP')
  395. 'GRADGEO' MCHDIT ;
  396.  
  397. GRADVN = 'PENT' MDOMINT 'FACE' 'DIAMAN2' NOMVEL LMGVIT
  398. VN_N1M (RVX . 'DIFVIMP') (RVX . 'DIFGVIMP')
  399. 'GRADGEO' MCHDIV ;
  400. NOMVEL = 'MOTS' 'UX' 'UY' ;
  401.  
  402. *
  403. ICACCA RESIDI DTCACCA = 'LAPN' 'VF' 'PROPCOST' 'RESI' 'EXPL'
  404. MDOMINT MU LAMBDA CV RN_N1M VN_N1M TN_N1M GRADVN GRADTN
  405. LISTINCO 'VIMP' (RVX . 'DIFVIMP') 'TAUI' (RVX . 'DIFTAUI')
  406. 'QIMP' (RVX . 'DIFQIMP') ;
  407.  
  408. RESIDU = RESIDU '+' RESIDI ;
  409. COEFV = (0.0 '*' RN_N1M) '+' 1.0 ;
  410. COEFV = COEFV '*' (lambda '*' (gamscal '-' 1.)) ;
  411. COEFV = COEFV '/' (R '*' RN_N1M) ;
  412. * 'MESSAGE' ;
  413. * 'MESSAGE' 'Je fais n importe' ;
  414. * COEFV = COEFV '*' 0.25 ;
  415. *
  416. ****** Residuum for dual tims stepping also involved the
  417. * variation of the conserved variables with respect
  418. * to time
  419.  
  420. 'SI' ((&BLITER 'EGA' 1) 'OU' (ORDTPS 'EGA' 1)) ;
  421. RESIDU = RESIDU '-' DUSDT ;
  422. 'SINON' ;
  423. RESIDU = RESIDU '-' ((1.5 '*' DUSDT) '-' (0.5 '*' DUSDT0)) ;
  424. 'FINSI' ;
  425.  
  426. *
  427. *** Time step at the first iteration/jacobi iteration
  428. *
  429.  
  430. 'SI' (&BLDT 'EGA' 1) ;
  431. 'SI' ('EXISTE' RVX 'CFL') ;
  432. DTPS = (RVX . 'CFL') '*' 2.0D0 '*' DELTAT ;
  433. 'SINON' ;
  434. DTPS = RVX . 'DTPS' ;
  435. 'FINSI' ;
  436. DTPS = 'MINIMUM' ('PROG' DTPS ((TFINAL '-' TPS) '*' 1.001)) ;
  437. TPS = TPS '+' DTPS ;
  438. *
  439. NJAC = 'ENTIER' ('MINIMUM' (RVX . 'NJACITER')) ;
  440. NJAC0 = NJAC ;
  441. 'SINON' ;
  442. NJAC = 'IPOL' (('LOG' ERRINF) '/' ('LOG' 10))
  443. (RVX . 'NJACLERR') (RVX . 'NJACITER') ;
  444. NJAC = 'MAXIMUM' ('PROG' NJAC0 NJAC) ;
  445. NJAC = 'ENTIER' NJAC ;
  446. NJAC0 = NJAC ;
  447. 'FINSI' ;
  448.  
  449. *
  450. *** JACOBI
  451. *
  452.  
  453. *
  454. **** CFL dual
  455. *
  456. 'SI' (&BLDT 'EGA' 1) ;
  457. SAFFACD = ('MINIMUM' (RVX . 'DCFL')) '*' 2 ;
  458. 'SINON' ;
  459. SAFFACD = ('IPOL' (('LOG' ERRINF) '/' ('LOG' 10))
  460. (RVX . 'DCFLERR') (RVX . 'DCFL')) '*' 2 ;
  461. 'FINSI' ;
  462.  
  463. 'SI' ((&BLITER 'EGA' 1) 'OU' (ORDTPS 'EGA' 1)) ;
  464. * DUN IPRO = 'DETO' (RVX . 'TYPEJAC')
  465. DUN IPRO = 'KONV' 'VF' 'PMON1FMM' (RVX . 'TYPEJAC')
  466. LISTINCO MDOMINT RESIDU RN_N1M GN_N1M RET_N1M GAMN ICO
  467. DTPS SAFFACD
  468. NJAC 'CLIM' LISTPRIM RCHLIM COEFV ;
  469. 'SINON' ;
  470. * DUN IPRO = 'DETO' (RVX . 'TYPEJAC')
  471. DUN IPRO = 'KONV' 'VF' 'PMON1FMM' (RVX . 'TYPEJAC')
  472. LISTINCO MDOMINT RESIDU RN_N1M GN_N1M RET_N1M GAMN ICO
  473. (DTPS '/' 1.5)
  474. SAFFACD NJAC 'CLIM' LISTPRIM RCHLIM COEFV ;
  475. 'FINSI' ;
  476. * 'FINSI' ;
  477.  
  478. 'SI' (IPRO 'NEG' 0) ;
  479. 'MESSAGE' ;
  480. 'MESSAGE' 'Probleme dans FMM' ;
  481. 'MESSAGE' ;
  482. 'ERREUR' 21 ;
  483. 'FINSI' ;
  484.  
  485. *
  486. **** We compute DUSDT for the future loop
  487. *
  488.  
  489. DUSDT = DUSDT '+' (DUN '/' DTPS) ;
  490.  
  491. *
  492. **** We evaluate the conservative variables at t^{n+1}, \tau^{m+1}
  493. *
  494.  
  495. DRN = 'EXCO' MOT1 DUN 'SCAL' ;
  496. DGN = 'EXCO' NOMMOM DUN NOMVEL ;
  497. DRET = 'EXCO' MOT2 DUN 'SCAL' ;
  498.  
  499. RN_N1M1 = RN_N1M '+' DRN ;
  500. GN_N1M1 = GN_N1M '+' DGN ;
  501. RET_N1M1 = RET_N1M '+' DRET ;
  502.  
  503. ERRINF = 'MAXIMUM' DUN 'ABS' LISTERR ;
  504. LISTLINF = LISTLINF 'ET' ('PROG' ERRINF) ;
  505. LISTITDT = LISTITDT 'ET' ('LECT' &BLDT) ;
  506. LISTITER = LISTITER 'ET' ('LECT' PTITER) ;
  507.  
  508. 'SI' ((&BLDT 'EGA' 1) 'OU'
  509. (((&BLDT '/' (RVX . 'FREQI')) '*' (RVX . 'FREQI'))
  510. 'EGA' &BLDT)) ;
  511. 'MESSAGE' ;
  512. 'MESSAGE'
  513. ('CHAINE' 'ITER =' PTITER ' TPS =' TPS
  514. ' DTITER =' &BLDT ' LINF =' ERRINF
  515. ' DCFL =' SAFFACD ' NJAC =' NJAC) ;
  516. 'MESSAGE' ;
  517. 'FINSI' ;
  518. *
  519. *
  520. *** Update of RVX . 'RESULTS'
  521. *
  522. RVX . 'RESULTS' . 'RN' = RN_N1M1 ;
  523. RVX . 'RESULTS' . 'GN' = GN_N1M1 ;
  524. RVX . 'RESULTS' . 'RET' = RET_N1M1 ;
  525. RVX . 'RESULTS' . 'LISTLINF' = LISTLINF ;
  526. RVX . 'RESULTS' . 'LISTITDT' = LISTITDT ;
  527. RVX . 'RESULTS' . 'LISTITER' = LISTITER ;
  528. *
  529. 'SI' (RVX . 'RELERR') ;
  530. * Relative error
  531. 'SI' (&BLDT 'EGA' 1) ;
  532. ERRINF0 = ERRINF ;
  533. 'SINON' ;
  534. 'SI' (ERRINF < (EPSDT '*' ERRINF0)) ;
  535. 'QUITTER' BLDT ;
  536. 'FINSI' ;
  537. 'FINSI' ;
  538. 'SINON' ;
  539. 'SI' (ERRINF < EPSDT) ;
  540. 'QUITTER' BLDT ;
  541. 'FINSI' ;
  542. 'FINSI' ;
  543.  
  544.  
  545. 'FIN' BLDT ;
  546.  
  547. ************************************************************************
  548. ****** End of the loop on dual time*************************************
  549. ************************************************************************
  550. *
  551. *** Update of RVX . 'RESULTS'
  552. *
  553. RVX . 'RESULTS' . 'TPS' = TPS ;
  554. RVX . 'RESULTS' . 'NITER' = (RVX . 'RESULTS' . 'NITER') '+' 1 ;
  555. *
  556. 'SI' (TPS '>EG' TFINAL) ;
  557. 'QUITTER' BLITER ;
  558. 'FINSI' ;
  559.  
  560. 'FIN' BLITER ;
  561.  
  562. TCPU = 'TEMPS' 'NOEC' ;
  563. RVX . 'RESULTS' . 'TCPU' = TCPU ;
  564.  
  565. 'FINPROC' ;
  566.  
  567. *************************************************************************
  568. *************************************************************************
  569. *************************************************************************
  570. *************************************************************************
  571.  
  572. 'OPTION' 'DIME' 2
  573. 'ELEM' 'QUA4'
  574. 'ISOV' 'LIGN'
  575. 'TRAC' 'PSC'
  576. 'ECHO' 1
  577. ;
  578.  
  579. LOGTRI = VRAI ;
  580. * GRAPH = VRAI ;
  581. GRAPH = FAUX ;
  582.  
  583. *******************************
  584. **** MESH *****************
  585. *******************************
  586.  
  587. RAF = 8 ;
  588.  
  589. L = 1 ;
  590. H = L ;
  591.  
  592. DENINI = (L '/' (8. '*' RAF)) ;
  593. DENCEN = 8 '*' DENINI ;
  594.  
  595. A1 = 0.0 0.0 ;
  596. A12 = (L '/' 2.) 0.0 ;
  597. A2 = L 0.0 ;
  598. A23 = L (H '/' 2.0) ;
  599. A3 = L H ;
  600. A34 = (L '/' 2.0) H ;
  601. A4 = 0.0 H ;
  602. A41 = 0.0 (H '/' 2.0) ;
  603.  
  604. A1A2 = (A1 'DROIT' A12 'DINI' DENINI 'DFIN' DENCEN) 'ET'
  605. (A12 'DROIT' A2 'DINI' DENCEN 'DFIN' DENINI);
  606. A2A3 = (A2 'DROIT' A23 'DINI' DENINI 'DFIN' DENCEN) 'ET'
  607. (A23 'DROIT' A3 'DINI' DENCEN 'DFIN' DENINI);
  608. A3A4 = (A3 'DROIT' A34 'DINI' DENINI 'DFIN' DENCEN) 'ET'
  609. (A34 'DROIT' A4 'DINI' DENCEN 'DFIN' DENINI);
  610. A4A1 = (A4 'DROIT' A41 'DINI' DENINI 'DFIN' DENCEN) 'ET'
  611. (A41 'DROIT' A1 'DINI' DENCEN 'DFIN' DENINI);
  612.  
  613. DOMINT = 'DALLER' A1A2 A2A3 A3A4 A4A1 'PLAN' ;
  614.  
  615. 'SI' LOGTRI ;
  616. 'OPTION' 'ELEM' 'TRI3' ;
  617. DOMINT = 'SURFACE' ( A1A2 'ET' A2A3 'ET' A3A4 'ET' A4A1 ) 'PLAN' ;
  618. 'FINSI' ;
  619.  
  620. MDOMINT = 'MODELISER' DOMINT 'EULER' ;
  621. MA1A2 = 'MODELISER' A1A2 'EULER' ;
  622. MA2A3 = 'MODELISER' A2A3 'EULER' ;
  623. MA3A4 = 'MODELISER' A3A4 'EULER' ;
  624. MA4A1 = 'MODELISER' A4A1 'EULER' ;
  625.  
  626. $DOMINT = 'DOMA' MDOMINT 'VF' ;
  627. $A1A2 = 'DOMA' MA1A2 'VF' ;
  628. $A2A3 = 'DOMA' MA2A3 'VF' ;
  629. $A3A4 = 'DOMA' MA3A4 'VF' ;
  630. $A4A1 = 'DOMA' MA4A1 'VF' ;
  631.  
  632. QDOMINT = 'DOMA' MDOMINT 'QUAF' ;
  633. QA1A2 = 'DOMA' MA1A2 'QUAF' ;
  634. QA2A3 = 'DOMA' MA2A3 'QUAF' ;
  635. QA3A4 = 'DOMA' MA3A4 'QUAF' ;
  636. QA4A1 = 'DOMA' MA4A1 'QUAF' ;
  637.  
  638. 'ELIMINATION' QDOMINT (DENINI '/' 100) QA1A2 ;
  639. 'ELIMINATION' QDOMINT (DENINI '/' 100) QA2A3 ;
  640. 'ELIMINATION' QDOMINT (DENINI '/' 100) QA3A4 ;
  641. 'ELIMINATION' QDOMINT (DENINI '/' 100) QA4A1 ;
  642.  
  643. 'SI' GRAPH ;
  644. 'TRACER' DOMINT 'TITRE' ('CHAINE' 'NBEL =' ('NBEL' DOMINT)) ;
  645. 'FINSI' ;
  646.  
  647. ***************************************
  648. ******** PHYSICAL PARAMETERS *********
  649. ***************************************
  650.  
  651. gamscal = 1.4 ;
  652. RAIR = 288. ;
  653. *
  654. ro_0 = 1.0 ;
  655. p_0 = 1.0D5 ;
  656. ret_0 = (1. '/' (gamscal '-' 1.)) '*' p_0 ;
  657. CSON = (gamscal * p_0 '/' ro_0) '**' 0.5 ;
  658. *
  659. VParois = 0.01 '*' cson ;
  660. *
  661. Rey = 1000 ;
  662. mu = (ro_0 '*' L '*' VParois) '/' Rey ;
  663. *
  664. Pr = 0.72 ;
  665. * lambda = mu * cp '/' pr ;
  666. lambda = mu '*' (gamscal '*' RAIR '/' (gamscal '-' 1.0))
  667. '/' Pr ;
  668.  
  669. ***************************************
  670. **** INITIAL CONDITIONS ***************
  671. ***************************************
  672.  
  673. *
  674. * A4 -> A3
  675. *
  676. *
  677. *
  678. *
  679. * A1 A2
  680. *
  681.  
  682. GAMN = 'KCHT' $DOMINT 'SCAL' 'CENTRE' gamscal ;
  683.  
  684.  
  685. RN0 = 'KCHT' $DOMINT 'SCAL' 'CENTRE' ro_0 ;
  686. GN0 = 'KCHT' $DOMINT 'VECT' 'CENTRE' ((ro_0 '*' 0) 0.0) ;
  687. RETN0 = 'KCHT' $DOMINT 'SCAL' 'CENTRE' (ret_0) ;
  688.  
  689. VN0 PN0 = 'PRIM' 'PERFMONO'
  690. RN0 GN0 RETN0 GAMN ;
  691.  
  692. TN0 = PN0 '/' (Rair '*' RN0) ;
  693.  
  694. CHPVID CACCA = 'KOPS' MATRIK ;
  695. * Conditions aux bords
  696.  
  697. VLIM = ('MANUEL' 'CHPO' ($A3A4 . 'CENTRE') 2 'UX' Vparois 'UY' 0.0
  698. 'NATU' 'DISCRET' ) 'ET'
  699. ('MANUEL' 'CHPO' (($A4A1 . 'CENTRE') 'ET'
  700. ($A1A2 . 'CENTRE') 'ET' ($A2A3 . 'CENTRE'))
  701. 2 'UX' 0.0 'UY' 0.0 'NATU' 'DISCRET') ;
  702. GRADVLIM = CHPVID ;
  703. TAULIM = 'COPIER' CHPVID ;
  704. *
  705. TLIM = CHPVID ;
  706. GRADTLIM = 'MANUEL' 'CHPO' (($A3A4 . 'CENTRE') 'ET' ($A4A1 . 'CENTRE')
  707. 'ET' ($A1A2 . 'CENTRE') 'ET' ($A2A3 . 'CENTRE'))
  708. 2 'P1DX' 0.0 'P1DY' 0.0 'NATU' 'DISCRET' ;
  709.  
  710. QLIM = 'MANUEL' 'CHPO' (($A3A4 . 'CENTRE') 'ET' ($A4A1 . 'CENTRE')
  711. 'ET' ($A1A2 . 'CENTRE') 'ET' ($A2A3 . 'CENTRE'))
  712. 2 'UX' 0.0 'UY' 0.0 'NATU' 'DISCRET' ;
  713.  
  714. *
  715. ***** Pictures of the initial conditions
  716. *
  717. MOD1 = 'MODELISER' ($DOMINT . 'MAILLAGE') 'THERMIQUE' ;
  718. 'SI' GRAPH ;
  719. CELL = 'VALEUR' 'ISOV' ;
  720. 'OPTION' 'ISOV' 'SULI' ;
  721. *
  722. CHM_RN = 'KCHA' MDOMINT 'CHAM' RN0 ;
  723. CHM_PN = 'KCHA' MDOMINT 'CHAM' PN0 ;
  724. CHM_TN = 'KCHA' MDOMINT 'CHAM' TN0 ;
  725. CHM_VN = 'KCHA' MDOMINT 'CHAM' VN0 ;
  726. TRAC CHM_RN MOD1 'TITR' ('CHAINE' 'RO at t=' 0.0);
  727. TRAC CHM_PN MOD1 'TITR' ('CHAINE' 'P at t=' 0.0);
  728. TRAC CHM_TN MOD1 'TITR' ('CHAINE' 'T at t=' 0.0);
  729. TRAC CHM_VN MOD1 'TITR' ('CHAINE' 'VN at t=' 0.0);
  730. *
  731. 'OPTION' 'ISOV' CELL ;
  732. 'FINSI' ;
  733.  
  734. * Names of conserved variables
  735.  
  736. NOMDEN = 'MOTS' 'RN' ;
  737. NOMMOM = 'MOTS' 'RUX' 'RUY' ;
  738. NOMRET = 'MOTS' 'RETN' ;
  739. NOMVEL = 'MOTS' 'UX' 'UY' ;
  740. NOMPRE = 'MOTS' 'NOMPRE' ;
  741. LISTCONS = NOMDEN 'ET' NOMMOM 'ET' NOMRET ;
  742. LISTP = NOMDEN 'ET' NOMVEL 'ET' NOMPRE ;
  743.  
  744. UNCONS = ('NOMC' ('MOTS' 'SCAL') NOMDEN RN0 'NATU' 'DISCRET') 'ET'
  745. ('NOMC' NOMVEL GN0 NOMMOM 'NATU' 'DISCRET') 'ET'
  746. ('NOMC' ('MOTS' 'SCAL') RETN0 NOMRET 'NATU' 'DISCRET') ;
  747.  
  748. *************************************************************************
  749. *************************************************************************
  750. *************************************************************************
  751. *************************************************************************
  752. ************ COMPUTATION OF THE SOLUTION *****************************
  753. *************************************************************************
  754. *************************************************************************
  755. *************************************************************************
  756. *************************************************************************
  757.  
  758. *************************************************************************
  759. ******PROCEDURE PROCPT **************************************************
  760. *************************************************************************
  761. *
  762. *
  763. 'DEBPROC' PROCPT ;
  764. 'FINPROC' ;
  765. *
  766.  
  767. *************************************************************************
  768. ******PROCEDURE PROLIM **************************************************
  769. *************************************************************************
  770. *
  771. 'DEBPROC' PROLIM ;
  772. 'ARGUMENT' RVX*'TABLE' MDOMINT*'MMODEL' LISTINCO*'LISTMOTS'
  773. LISTPRIM*'LISTMOTS'
  774. RN*'CHPOINT' VN*'CHPOINT' PN*'CHPOINT' GAMN*'CHPOINT' ;
  775. *
  776. *** Boundary conditions
  777. *
  778. CHPVID PIPI = 'KOPS' MATRIK ;
  779. * 'RESPRO' RCHLIM RESLIM ;
  780. 'RESPRO' CHPVID CHPVID ;
  781. 'FINPROC' ;
  782.  
  783. *************************************************************************
  784. ****** FIN PROCEDURE PROLIM *********************************************
  785. *************************************************************************
  786. *
  787. RV = 'TABLE' ;
  788. RV . 'FREQI' = 1 ;
  789. RV . 'MODEL' = MDOMINT ;
  790. *
  791. **** Conservative variables / primitive variables
  792. *
  793. *
  794. RV . 'LISTCONS' = LISTCONS ;
  795. RV . 'LISTPRIM' = LISTP ;
  796. *
  797. RV . 'RN0' = RN0 ;
  798. RV . 'GN0' = GN0 ;
  799. RV . 'RET0' = RETN0 ;
  800. *
  801. **** Gas property/gravity
  802. *
  803. RV . 'PGAS' = 'TABLE' ;
  804. RV . 'PGAS' . 'GAMN' = GAMN ;
  805. RV . 'PGAS' . 'MU' = mu ;
  806. RV . 'PGAS' . 'R' = Rair ;
  807. RV . 'PGAS' . 'LAMBDA' = lambda ;
  808. *
  809. RV . 'GRAVITY' = 'MANUEL' 'CHPO' ('DOMA' MDOMINT 'CENTRE') 2 'UX' 0.0
  810. 'UY' 0.0 ;
  811. *
  812. * Table for BC (convective flux)
  813. *
  814. RV . 'PROLIM' = 'TABLE' ;
  815. *
  816. * BC (diffusive flux)
  817. *
  818. * RVX . 'DIFTIMP' : boundary condition on temperature
  819. * RVX . 'DIFGTIMP' : boundary condition on gradient of temperature
  820. * RVX . 'DIFVIMP' : boundary condition on speed
  821. * RVX . 'DIFGVIMP' : boundary condition on gradient of speed
  822. * RVX . 'DIFTAUI' : boundary condition on constraint tensor
  823. * RVX . 'DIFQIMP' : boundary condition on heat flux
  824. *
  825. *
  826. RV . 'DIFTIMP' = TLIM ;
  827. RV . 'DIFGTIMP' = GRADTLIM ;
  828. RV . 'DIFQIMP' = QLIM ;
  829. RV . 'DIFVIMP' = VLIM ;
  830. RV . 'DIFGVIMP' = GRADVLIM ;
  831. RV . 'DIFTAUI' = TAULIM ;
  832.  
  833. * GRADTF MCHTNF = 'PENT' MDOMINT 'FACE' 'DIAMAN2' ('MOTS' 'SCAL')
  834. * ('MOTS' 'P1DX' 'P1DY') TN0 TLIM GRADTLIM ;
  835. * GRADVF MCHVNF = 'PENT' MDOMINT 'FACE' 'DIAMAN2' ('MOTS' 'UX' 'UY')
  836. * ('MOTS' 'P1DX' 'P1DY' 'P2DX' 'P2DY') VN0 VLIM TAULIM ;
  837. *
  838. * ICACCA RESIDI DTCACCA = 'LAPN' 'VF' 'PROPCOST' 'RESI' 'EXPL'
  839. * MDOMINT MU LAMBDA CV RN0 VN0 TN0 GRADVF GRADTF
  840. * (RV . 'LISTCONS') 'VIMP' (RV . 'DIFVIMP') 'TAUI' (RV . 'DIFTAUI')
  841. * 'QIMP' (RV . 'DIFQIMP') ;
  842.  
  843.  
  844. *
  845. **** Numerical parameters
  846. *
  847. *
  848. * Variable to compute Linf error
  849. *
  850. RV . 'LISTERR' = NOMMOM ;
  851. * RV . 'LISTERR' = NOMDEN ;
  852. * RV . 'LISTERR' = NOMRET ;
  853. *
  854. * Upwind scheme
  855. *
  856. RV . 'METHOD' = 'RUSANOLM' ;
  857. * RV . 'METHOD' = 'AUSMPLM' ;
  858.  
  859. *
  860. **** Cut off
  861. * We take a constant cutoff
  862. *
  863. RV . 'CUTOFF' = 'MANUEL' 'CHPO' ('DOMA' MDOMINT 'CENTRE') 1
  864. 'SCAL' Vparois ;
  865.  
  866. * Reconstruction/limiter
  867. * Time accuracy (1 or 2)
  868. * Iterations
  869. * Final time
  870. RV . 'SPACEA' = 2 ;
  871. RV . 'LIMITER' = 'NOLIMITE' ;
  872. * RV . 'LIMITER' = 'LIMITEUR' ;
  873. RV . 'TIMEA' = 1 ;
  874. *
  875. **** Phisical time
  876. *
  877. RV . 'T0' = 0 ;
  878. RV . 'TFINAL' = 1.0D6 ;
  879. RV . 'CFL' = 1.0D16 ;
  880. * RV . 'DTPS' = 1.0D16 ;
  881. *
  882. **** Dual time
  883. *
  884. * Safety factor for the dual time step
  885. * Max. Dual time iterations
  886. * Absolute/relative error
  887. *
  888. RV . 'DCFLERR' = 'PROG' 16. -32. ;
  889. RV . 'DCFL' = 'PROG' 1.0D1 1.0D1 ;
  890. RV . 'NDTITER' = 1000 ;
  891. RV . 'RELERR' = FAUX ;
  892. RV . 'EPSDT' = 1.0D-5 ;
  893. **** Jacobi iterations
  894. RV . 'TYPEJAC' = 'PJACO' ;
  895. * RV . 'TYPEJAC' = 'LJACOF' ;
  896. * RV . 'TYPEJAC' = 'LJACOB' ;
  897. * RV . 'TYPEJAC' = 'LJACOFB' ;
  898. RV . 'NJACITER' = 'PROG' 15 15 ;
  899. RV . 'NJACLERR' = 'PROG' 16. -16 ;
  900. *
  901. **** Parameters for PROCPT
  902. *
  903. 'TEMPS' 'ZERO' ;
  904. PNSSM RV ;
  905. * 'TEMPS' 'IMPR' ;
  906.  
  907. **********************************************************
  908. **********************************************************
  909. **********************************************************
  910. ************** PLOTS *************************************
  911. **********************************************************
  912. **********************************************************
  913. **********************************************************
  914. **********************************************************
  915.  
  916. RN = RV . 'RESULTS' . 'RN' ;
  917. GN = RV . 'RESULTS' . 'GN' ;
  918. RET = RV . 'RESULTS' . 'RET' ;
  919.  
  920. LISTITER = RV . 'RESULTS' . 'LISTITER' ;
  921. LISTITDT = RV . 'RESULTS' . 'LISTITDT' ;
  922. LISTLINF = RV . 'RESULTS' . 'LISTLINF' ;
  923.  
  924. *
  925. *** Convergence evolution inside of each iteration
  926. *
  927.  
  928. NITERE = 'DIME' LISTITER ;
  929. I1 = 1 ;
  930. AA = 'PROG' ;
  931. BB = 'PROG' ;
  932. CC = 'PROG' ;
  933. 'REPETER' BLITER NITERE ;
  934. I0 = I1 ;
  935. I1 = 'EXTRAIRE' LISTITER &BLITER ;
  936. 'SI' (I1 'EGA' I0) ;
  937. AA = AA 'ET' ('PROG' ('EXTRAIRE' LISTITDT &BLITER)) ;
  938. BB = BB 'ET' ('PROG' ('EXTRAIRE' LISTLINF &BLITER)) ;
  939. 'SINON' ;
  940. everr = 'EVOL' 'MANU' 'niter' AA 'Log(Linf)'
  941. (('LOG' (BB '+' ('PROG' ('DIME' BB) '*' 1.0D-20))) '/'
  942. ('LOG' 10.)) ;
  943. 'SI' GRAPH ;
  944. 'DESSIN' everr 'TITRE' ('CHAINE' 'Convergence at iter '
  945. (I1 '-' 1)) ;
  946. 'FINSI' ;
  947. AA = 'PROG' ;
  948. BB = 'PROG' ;
  949. 'FINSI' ;
  950. 'FIN' BLITER ;
  951. everr = 'EVOL' 'MANU' 'niter' AA 'Log(Linf)'
  952. (('LOG' (BB '+' ('PROG' ('DIME' BB) '*' 1.0D-20))) '/'
  953. ('LOG' 10.)) ;
  954. 'SI' GRAPH ;
  955. 'DESSIN' everr 'TITRE' ('CHAINE' 'Convergence at iter '
  956. (I1)) ;
  957. 'FINSI' ;
  958. 'FINSI' ;
  959.  
  960.  
  961.  
  962. VN PN = 'PRIM' 'PERFMONO' RN GN RET GAMN 'TRICHE' ;
  963. CN2 = GAMN '*' (PN '/' RN) ;
  964. VN2 = 'PSCAL' VN VN NOMVEL NOMVEL ;
  965. MACHN2 = VN2 '/' CN2 ;
  966. MACHN = MACHN2 '**' 0.5 ;
  967.  
  968. HTN = (GAMN '/' (GAMN '-' 1.0)) '*' (PN '/' RN) ;
  969. ECIN = 0.5 '*' ('PSCAL' VN VN NOMVEL NOMVEL) ;
  970. HTN = HTN '+' ECIN ;
  971.  
  972. SN = PN '/' (RN '**' GAMSCAL) ;
  973.  
  974. tps = RV . 'RESULTS' . 'TPS' ;
  975.  
  976. 'SI' GRAPH ;
  977.  
  978. 'OPTION' 'ISOV' 'SURF' ;
  979.  
  980. CHM_RN = 'KCHA' MDOMINT 'CHAM' RN ;
  981. CHM_VN = 'KCHA' MDOMINT 'CHAM' VN ;
  982. CHM_PN = 'KCHA' MDOMINT 'CHAM' PN ;
  983. CHM_MN = 'KCHA' MDOMINT 'CHAM' MACHN ;
  984. CHM_HTN = 'KCHA' MDOMINT 'CHAM' HTN ;
  985. CHM_SN = 'KCHA' MDOMINT 'CHAM' SN ;
  986.  
  987. 'TRAC' CHM_RN MDOMINT ('CONTOUR' DOMINT)
  988. 'TITR' ('CHAINE' 'rho at t=' TPS) ;
  989. 'TRAC' CHM_VN MDOMINT ('CONTOUR' DOMINT)
  990. 'TITR' ('CHAINE' 'v at t= ' TPS) ;
  991. 'TRAC' CHM_PN MDOMINT ('CONTOUR' DOMINT)
  992. 'TITR' ('CHAINE' 'p at t= ' TPS) ;
  993. 'TRAC' CHM_MN MDOMINT ('CONTOUR' DOMINT)
  994. 'TITR' ('CHAINE' 'Mach at t= ' TPS) ;
  995. 'TRAC' CHM_HTN MDOMINT ('CONTOUR' DOMINT)
  996. 'TITR' ('CHAINE' 'ht at t= ' TPS ' hl =' HTL) ;
  997. 'TRAC' CHM_SN MDOMINT ('CONTOUR' DOMINT)
  998. 'TITR' ('CHAINE' 'sn at t= ' TPS ' hl =' SL) ;
  999.  
  1000. * 'OPTION' 'ISOV' 'LIGN' ;
  1001. * RNV = 'ELNO' $DOMINT ('KCHT' $DOMINT 'SCAL' 'CENTRE' RN) ;
  1002. * 'TRACER' DOMINT RNV ('CONTOUR' DOMINT) 15 'TITRE' 'ro';
  1003. * PNV = 'ELNO' $DOMINT ('KCHT' $DOMINT 'SCAL' 'CENTRE' PN) ;
  1004. * 'TRACER' DOMINT PNV ('CONTOUR' DOMINT) 15 'TITRE' 'p' ;
  1005. * MNV = 'ELNO' $DOMINT ('KCHT' $DOMINT 'SCAL' 'CENTRE' MACHN) ;
  1006. * 'TRACER' DOMINT MNV ('CONTOUR' DOMINT) 15 'TITRE' 'Mach' ;
  1007. * RUX = 'EXCO' GN 'UX' ;
  1008. * RUXV = 'ELNO' $DOMINT ('REDU' RUX $DOMINT . 'CENTRE') ;
  1009. * 'TRACER' DOMINT RUXV ('CONTOUR' DOMINT) 15
  1010. * 'TITRE' 'rux' ;
  1011.  
  1012. VECN = 'VECTEUR' VN ;
  1013. 'TRACER' VECN DOMINT ;
  1014.  
  1015. MODVN = 'PSCAL' VN VN NOMVEL NOMVEL ;
  1016. MODVN = MODVN '**' 0.5 ;
  1017. MODVN = MODVN '+' (('MAXIMUM' MODVN) '*' 0.000001) ;
  1018. VN1 = VN '/' MODVN ;
  1019. VECN1 = 'VECTEUR' 0.01 VN1 'JAUNE' ;
  1020. 'TRACER' DOMINT VECN1 ('CONTOUR' DOMINT)
  1021. 'TITRE' ('CHAINE' 'Normalized VN : ' TITOLO) ;
  1022. 'FINSI' ;
  1023.  
  1024. *
  1025. **** Evolution objects
  1026. *
  1027. TAB1 = 'TABLE' ;
  1028. TAB1 . 'TITRE'= 'TABLE' ;
  1029. TAB1 . 1 = 'MARQ CROI NOLI';
  1030. TAB1 . 'TITRE' . 1 = 'Reference (Su)' ;
  1031. TAB1 . 2 = 'REGU' ;
  1032. TAB1 . 'TITRE' . 2 = 'Numerical res.' ;
  1033.  
  1034. LXSU = 'PROG' 0 0.0625 0.0703 0.0781 0.0938 0.1563 0.2266
  1035. 0.2344 0.5 0.8047 0.8594 0.9063 0.9453 0.9531 0.9609
  1036. 0.9688 1 ;
  1037. LUY_X_SU = 'PROG' 0 0.2763 0.2918 0.3053 0.3282 0.3711 0.3279
  1038. 0.3193 0.0243 -0.317 -0.4245 -0.5182 -0.3972 -0.3421 -0.2816
  1039. -0.2175 0 ;
  1040. EV_UYX = 'EVOL' 'MANU' 'x' LXSU 'uy' LUY_X_SU ;
  1041.  
  1042. LYSU = 'PROG' 0. 0.0547 0.0625 0.0703 0.1016 0.1719 0.2812 0.4531
  1043. 0.5 0.6172 0.7344 0.8516 0.9531 0.9609 0.9688 0.9766 1 ;
  1044. LUX_Y_SU = 'PROG' 0 -0.1788 -0.1999 -0.2204 -0.2972 -0.3834 -0.2759
  1045. -0.1058 -0.0605 0.0564 0.1857 0.3316 0.466 0.5109 0.5743 0.6582 1 ;
  1046. EV_UXY = 'EVOL' 'MANU' 'ux' LUX_Y_SU 'y' LYSU ;
  1047.  
  1048. 'OPTION' 'ELEM' 'QUA4' ;
  1049. LISTX = 'PROG' 0.5 ;
  1050. 'REPETER' BL1 ('DIME' LISTX) ;
  1051. XL = 'EXTRAIRE' LISTX &BL1 ;
  1052. YMIN = 'MINIMUM' ('COORDONNEE' 2 DOMINT) ;
  1053. YMAX = 'MAXIMUM' ('COORDONNEE' 2 DOMINT) ;
  1054. DELTAY = YMAX '-' YMIN ;
  1055. PL1 = XL (YMIN '+' (1.0D-10 '*' DELTAY)) ;
  1056. PL2 = XL 0.0 ;
  1057. PL3 = XL (YMAX '-' (1.0D-10 '*' DELTAY)) ;
  1058. LIG1 = (PL1 'DROIT' PL2 'DINI' DENINI 'DFIN' DENCEN)
  1059. 'ET' (PL2 'DROIT' PL3 'DINI' DENCEN 'DFIN' DENINI) ;
  1060. 'SI' GRAPH ;
  1061. 'TRACER' (DOMINT 'ET' (LIG1 'COULEUR' 'ROUG')) 'TITR' 'lig1' ;
  1062. 'FINSI' ;
  1063. UX = ('EXCO' 'UX' VN) '/' Vparois;
  1064. UXV = 'ELNO' UX $DOMINT ;
  1065. CH_UX = 'CHANGER' 'CHAM' UXV ('DOMA' MDOMINT 'MAILLAGE') ;
  1066. UXLIG1 = 'PROI' CH_UX LIG1 ;
  1067. EVUX = 'EVOL' 'CHPO' UXLIG1 LIG1 ;
  1068. EVUX1 = 'EVOL' 'MANU' 'ux' ('EXTRAIRE' EVUX 'ORDO') 'y'
  1069. ('EXTRAIRE' EVUX 'ABSC') ;
  1070. 'SI' GRAPH ;
  1071. 'DESSIN' (EV_UXY 'ET' EVUX1) 'TITRE'
  1072. ('CHAINE' 'Nondimensional ux at x = ' XL) 'LEGE'
  1073. TAB1 ;
  1074. 'FINSI' ;
  1075. 'FIN' BL1 ;
  1076.  
  1077. 'OPTION' 'ELEM' 'QUA4' ;
  1078. LISTY = 'PROG' 0.5 ;
  1079. 'REPETER' BL1 ('DIME' LISTY) ;
  1080. YL = 'EXTRAIRE' LISTY &BL1 ;
  1081. XMIN = 'MINIMUM' ('COORDONNEE' 2 DOMINT) ;
  1082. XMAX = 'MAXIMUM' ('COORDONNEE' 2 DOMINT) ;
  1083. DELTAX = XMAX '-' XMIN ;
  1084. PL1 = (XMIN '+' (1.0D-10 '*' DELTAX)) YL;
  1085. PL2 = 0.0 YL ;
  1086. PL3 = (XMAX '-' (1.0D-10 '*' DELTAX)) YL ;
  1087. LIG1 = (PL1 'DROIT' PL2 'DINI' DENINI 'DFIN' DENCEN)
  1088. 'ET' (PL2 'DROIT' PL3 'DINI' DENCEN 'DFIN' DENINI) ;
  1089. 'SI' GRAPH ;
  1090. 'TRACER' (DOMINT 'ET' (LIG1 'COULEUR' 'ROUG')) 'TITR' 'lig1' ;
  1091. 'FINSI' ;
  1092. UY = ('EXCO' 'UY' VN) '/' Vparois;
  1093. UYV = 'ELNO' UY $DOMINT ;
  1094. CH_UY = 'CHANGER' 'CHAM' UYV ('DOMA' MDOMINT 'MAILLAGE') ;
  1095. UYLIG1 = 'PROI' CH_UY LIG1 ;
  1096. EVUY = 'EVOL' 'CHPO' UYLIG1 LIG1 ;
  1097. 'SI' GRAPH ;
  1098. 'DESSIN' (EV_UYX 'ET' EVUY)
  1099. 'TITRE' ('CHAINE' 'Nondimensional uy at y = ' YL)
  1100. 'LEGE' TAB1 ;
  1101. 'FINSI' ;
  1102. 'FIN' BL1 ;
  1103.  
  1104. * TEST
  1105.  
  1106. LERR = 'EXTRAIRE' EVERR 'ORDO' ;
  1107. AA = 10. '**' ('EXTRAIRE' LERR 1) ;
  1108. BB = 10. '**' ('EXTRAIRE' LERR ('DIME' LERR)) ;
  1109. 'SI' ((BB '/' AA) '>' 1.0D-5) ;
  1110. 'ERREUR' 'Probleme de convergence' ;
  1111. 'FINSI' ;
  1112. 'FIN' ;
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  

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