Télécharger shock3d.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier : shock3d.dgibi
  2. ************************************************************************
  3. * NAME : main3d.dgibi
  4. * DESCRIPTION : file to solve 3D tests:
  5. * 2. shock tube
  6. *
  7. * LANGUAGE : GIBIANE-CAST3M
  8. * AUTHOR : José R. Garcia Cascales
  9. * Universidad Politecnica de Cartagena,
  10. * jr.garcia@upct.es
  11. ************************************************************************
  12. * VERSION : v1, 04/04/2002, version initiale
  13. * HISTORIQUE : vfinal, 22/11/2005
  14. ************************************************************************
  15. *
  16. * MESH DEFINITION
  17. *
  18. ************************************************************************
  19. 'OPTION' 'DIME' 3 'ELEM' 'CUB8' 'ISOV' 'SULI'
  20. 'ECHO' 1 'TRAC' 'X';
  21.  
  22. GRAPH = VRAI ;
  23. GRAPH = FAUX ;
  24. *
  25. ** number of elements in the z axis (after rotation) = NZ
  26. *
  27. NZ = 100 ;
  28.  
  29. NX = 2;
  30. NY = 2;
  31.  
  32. H = 10.D0 ;
  33. DZ = H/NZ ;
  34.  
  35. L = NX*DZ ;
  36. P = NY*DZ ;
  37. xR = 0.5D0*L ;
  38. xL = -1.0D0*xR ;
  39. yR = 0.5D0*P ;
  40. yL = -1.0D0*yR ;
  41.  
  42. P1 = XR YR 0. ;
  43. P2 = XL YR 0. ;
  44. P3 = XL YL 0. ;
  45. P4 = XR YL 0. ;
  46.  
  47. P1P2 = 'DROIT' NX P1 P2 ;
  48. P2P3 = 'DROIT' NY P2 P3 ;
  49. P3P4 = 'DROIT' NX P3 P4 ;
  50. P4P1 = 'DROIT' NY P4 P1 ;
  51.  
  52. BASEJR = 'DALLER' P1P2 P2P3 P3P4 P4P1 ;
  53.  
  54. POSH = H/2. ;
  55. NEGH = (-1.)*POSH ;
  56. MIDDIV = NZ/2 ;
  57.  
  58. V1 = 0. 0. POSH ;
  59. V2 = 0. 0. NEGH ;
  60.  
  61. 'OPTI' 'ELEM' 'CUB8';
  62. DOM1 = BASEJR 'VOLUME' MIDDIV 'TRAN' V1 ;
  63. DOM2 = BASEJR 'VOLUME' MIDDIV 'TRAN' V2 ;
  64. DOMTOT = DOM1 'ET' DOM2 ;
  65.  
  66. MDOMTOT = 'MODELISER' DOMTOT 'EULER';
  67. MDOM1 = 'MODELISER' DOM1 'EULER';
  68. MDOM2 = 'MODELISER' DOM2 'EULER';
  69.  
  70. $DOMTOT = 'DOMA' MDOMTOT 'VF' ;
  71. $DOM1 = 'DOMA' MDOM1 'VF' ;
  72. $DOM2 = 'DOMA' MDOM2 'VF' ;
  73.  
  74. TDOMTOT = $DOMTOT. 'QUAF';
  75. TDOM1 = $DOM1. 'QUAF';
  76. TDOM2 = $DOM2. 'QUAF';
  77. 'ELIMINATION' (TDOMTOT 'ET' TDOM1 'ET' TDOM2) 1D-6;
  78. *
  79. ******* Creation de la ligne Utilisée pour le Post-Traitement
  80. * reliant les points centres
  81. *
  82. XINIT = 0.5D0*DZ ;
  83. YINIT = 0.5D0*DZ ;
  84. ZINIT = NEGH '+' (0.5D0*DZ) ;
  85. XFIN = XINIT ;
  86. YFIN = YINIT ;
  87. ZFIN = POSH '-' (0.5D0*DZ) ;
  88. PINI = XINIT YINIT ZINIT;
  89. PFIN = XFIN YFIN ZFIN;
  90. DIV = NZ '-' 1 ;
  91. COURB = PINI 'DROIT' DIV PFIN;
  92. COURB = COURB 'COULEUR' 'VERT';
  93. 'ELIMINATION' (1.0D-6) COURB $DOMTOT.CENTRE;
  94.  
  95. 'SI' GRAPH ;
  96. 'TRACER' (DOMTOT 'ET' COURB) 'TITRE' 'Domaine total' ;
  97. 'FINSI' ;
  98. ************************************************************************
  99. *
  100. * INITIAL CONDITIONS
  101. *
  102. ************************************************************************
  103. CP = 2.d0 ;
  104. CVM = 0.d0 ;
  105. *
  106. *
  107. VCH1 = ('MANU' 'CHPO' ($DOM1.'CENTRE') 1 'SCAL' 0.1d0 'NATURE'
  108. 'DISCRET') 'ET'
  109. ('MANU' 'CHPO' ($DOM2.'CENTRE') 1 'SCAL' 0.25d0 'NATURE'
  110. 'DISCRET') ;
  111. VCH2 = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 3 'UVX' 0.d0 'UVY' 0.d0
  112. 'UVZ' 0.d0 'NATURE' 'DISCRET') ;
  113. VCH3 = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 3 'ULX' 0.d0 'ULY' 0.d0
  114. 'ULZ' 0.d0 'NATURE' 'DISCRET') ;
  115. VCH4 = ('MANU' 'CHPO' ($DOM1.'CENTRE') 1 'SCAL' 10.d6 'NATURE'
  116. 'DISCRET') 'ET'
  117. ('MANU' 'CHPO' ($DOM2.'CENTRE') 1 'SCAL' 20.d6 'NATURE'
  118. 'DISCRET') ;
  119. VCH5 = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 1 'SCAL' 308.d0 'NATURE'
  120. 'DISCRET') ;
  121. VCH6 = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 1 'SCAL' 308.d0 'NATURE'
  122. 'DISCRET');
  123. GAMV = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 1 'SCAL' 1.4d0 'NATURE'
  124. 'DISCRET');
  125. CPV = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 1 'SCAL' 1008.d0 'NATURE'
  126. 'DISCRET');
  127. GAML = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 1 'SCAL' 2.8d0 'NATURE'
  128. 'DISCRET');
  129. CPL = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 1 'SCAL' 4186.d0 'NATURE'
  130. 'DISCRET');
  131. UNO = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 1 'SCAL' 1.d0 'NATURE'
  132. 'DISCRET');
  133. PIL = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 1 'SCAL' 8.5d8 'NATURE'
  134. 'DISCRET');
  135.  
  136. * vch7 (rhov) = gammav*p/((gammav - 1.D0)*Cpv*T)
  137. * vch8 (rhol) = gammal*(p + pil)/((gammal - 1.D0)*Cpl*T)
  138. * IMPROVE, VCH7 & VCH8 ARE NOT ASSOCIATED TO ANY MESH!!!!!!!!!
  139.  
  140. NUM1 = 'PSCAL' GAMV VCH4 ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  141. NUM2 = 0.4d0 * ('PSCAL' CPV VCH5 ('MOTS' 'SCAL') ('MOTS' 'SCAL')) ;
  142. VCH7 = NUM1 '/' NUM2 ;
  143. VCH7 = 'KCHT' $DOMTOT 'SCAL' 'CENTRE' VCH7 ;
  144. NUM3 = 2.8d0 * (VCH4 '+' 8.5d8) ;
  145. NUM4 = 1.8d0 * ('PSCAL' CPL VCH6 ('MOTS' 'SCAL') ('MOTS' 'SCAL')) ;
  146. VCH8 = NUM3 '/' NUM4 ;
  147. VCH8 = 'KCHT' $DOMTOT 'SCAL' 'CENTRE' VCH8 ;
  148. ***************************************************************
  149. ***** PROCEDURE POUR CALCULER LES VARIABLES CONSERVATIVES *****
  150. ***************************************************************
  151. 'DEBPROC' CONS ;
  152. 'ARGUMENT'VCH1*'CHPOINT' VCH2*'CHPOINT' VCH3*'CHPOINT' VCH4*'CHPOINT'
  153. VCH5*'CHPOINT' VCH6*'CHPOINT' VCH7*'CHPOINT' VCH8*'CHPOINT'
  154. ;
  155.  
  156. WCH1 = 'PSCAL' VCH1 VCH7 ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  157. WCH1 = 'EXCO' 'SCAL' WCH1 'SCAL' 'NATURE' 'DISCRET' ;
  158. AL = VCH1 '-' 1.0 ;
  159. AL = AL * (-1.0) ;
  160. WCH2 = 'PSCAL' AL VCH8 ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  161. WCH2 = 'EXCO' 'SCAL' WCH2 'SCAL' 'NATURE' 'DISCRET' ;
  162. WCH3 = WCH1 '*' VCH2 ('MOTS' 'SCAL' 'SCAL' 'SCAL') ('MOTS' 'UVX'
  163. 'UVY' 'UVZ') ('MOTS' 'UVX' 'UVY' 'UVZ') ;
  164. WCH3 = 'EXCO' ('MOTS' 'UVX' 'UVY' 'UVZ') WCH3 ('MOTS' 'UVX'
  165. 'UVY''UVZ') 'NATURE' 'DISCRET' ;
  166. WCH4 = WCH2 '*' VCH3 ('MOTS' 'SCAL' 'SCAL' 'SCAL') ('MOTS' 'ULX'
  167. 'ULY' 'ULZ') ('MOTS' 'ULX' 'ULY' 'ULZ') ;
  168. WCH4 = 'EXCO' ('MOTS' 'ULX' 'ULY' 'ULZ') WCH4 ('MOTS' 'ULX' 'ULY'
  169. 'ULZ')'NATURE' 'DISCRET' ;
  170. UVX2 = 'PSCAL' VCH2 VCH2 ('MOTS' 'UVX') ('MOTS' 'UVX') ;
  171. UVY2 = 'PSCAL' VCH2 VCH2 ('MOTS' 'UVY') ('MOTS' 'UVY') ;
  172. UVZ2 = 'PSCAL' VCH2 VCH2 ('MOTS' 'UVZ') ('MOTS' 'UVZ') ;
  173. ECV = 0.5d0 * (UVX2 '+' UVY2 '+' UVY2) ;
  174. * ev = Cpv*v(5)/gammav
  175. * IEV = ('PSCAL' CPV VCH5 ('MOTS' 'SCAL') ('MOTS' 'SCAL'))'/' 1.4d0 ;
  176. IEV = (1008.d0 * VCH5)'/' 1.4d0 ;
  177. TIEV = IEV '+' ECV ;
  178. WCH5 = WCH1 * TIEV ;
  179. WCH5 = 'EXCO' 'SCAL' WCH5 'SCAL' 'NATURE' 'DISCRET' ;
  180. ULX2 = 'PSCAL' VCH3 VCH3 ('MOTS' 'ULX') ('MOTS' 'ULX') ;
  181. ULY2 = 'PSCAL' VCH3 VCH3 ('MOTS' 'ULY') ('MOTS' 'ULY') ;
  182. ULZ2 = 'PSCAL' VCH3 VCH3 ('MOTS' 'ULZ') ('MOTS' 'ULZ') ;
  183. ECL = 0.5d0 * (ULX2 '+' ULY2 '+' ULZ2) ;
  184. * el = Cpl*v(6)/gammal + pil/rl
  185. * NUM9 = ('PSCAL' CPL VCH5 ('MOTS' 'SCAL') ('MOTS' 'SCAL'))'/' 2.8d0 ;
  186. NUM9 = (4186.d0 * VCH6)'/' 2.8d0 ;
  187. NUM0 = 8.5d8 '*'(VCH8 '**' -1.) ;
  188. NUM0 = 'NOMC' 'SCAL' NUM0 ;
  189. IEL = NUM9 '+' NUM0 ;
  190. TIEL = IEL '+' ECL ;
  191. WCH6 = WCH2 * TIEL ;
  192. WCH6 = 'EXCO' 'SCAL' WCH6 'SCAL' 'NATURE' 'DISCRET' ;
  193.  
  194. 'RESPRO' WCH1 WCH2 WCH3 WCH4 WCH5 WCH6 ;
  195.  
  196. 'FINPROC' ;
  197. ***************************************************************
  198. WCH1 WCH2 WCH3 WCH4 WCH5 WCH6 = CONS
  199. VCH1 VCH2 VCH3 VCH4 VCH5 VCH6 VCH7 VCH8 ;
  200. *
  201. * We create old alpha, to satisfy the prim operator
  202. * necessities
  203. *
  204. OALP = VCH1 ;
  205. OTV = VCH5 ;
  206. OTL = VCH6 ;
  207.  
  208. PINT RL RV TL TV P UL UV ALP = 'PRIM' 'TWOFLUID'
  209. WCH1 WCH2 WCH3 WCH4 WCH5 WCH6 OALP OTV OTL CP CVM;
  210.  
  211. ERRO = 'MAXIMUM' (VCH4 '-' P) 'ABS' ;
  212.  
  213. 'SI' (ERRO > 1.0D-6) ;
  214. 'MESSAGE' 'Problem in the stic file!!!'
  215. 'ERREUR' 5 ;
  216. 'FINSI' ;
  217. *
  218. **** Plot of IC
  219. *
  220. 'SI' GRAPH ;
  221.  
  222. MOD1 = 'MODELISER' ($DOMTOT . 'MAILLAGE' ) 'THERMIQUE';
  223.  
  224. CHM_V1 = 'KCHA' $DOMTOT 'CHAM' VCH1 ;
  225. CHM_V2 = 'KCHA' $DOMTOT 'CHAM' VCH2 ;
  226. CHM_V3 = 'KCHA' $DOMTOT 'CHAM' VCH3 ;
  227. CHM_V4 = 'KCHA' $DOMTOT 'CHAM' VCH4 ;
  228. CHM_V5 = 'KCHA' $DOMTOT 'CHAM' VCH5 ;
  229. CHM_V6 = 'KCHA' $DOMTOT 'CHAM' VCH6 ;
  230. CHM_V7 = 'KCHA' $DOMTOT 'CHAM' VCH7 ;
  231. CHM_V8 = 'KCHA' $DOMTOT 'CHAM' VCH8 ;
  232.  
  233. 'TRACER' CHM_V1 MOD1
  234. 'TITR' ('CHAINE' 'alpha at t=' 0.0);
  235. 'TRACER' CHM_V2 MOD1
  236. 'TITR' ('CHAINE' 'uv at t=' 0.0);
  237. 'TRACER' CHM_V3 MOD1
  238. 'TITR' ('CHAINE' 'ul at t=' 0.0);
  239. 'TRACER' CHM_V4 MOD1
  240. 'TITR' ('CHAINE' 'p at t=' 0.0);
  241. 'TRACER' CHM_V5 MOD1
  242. 'TITR' ('CHAINE' 'Tv at t=' 0.0);
  243. 'TRACER' CHM_V6 MOD1
  244. 'TITR' ('CHAINE' 'Tl at t=' 0.0);
  245. 'TRACER' CHM_V7 MOD1
  246. 'TITR' ('CHAINE' 'rv at t=' 0.0);
  247. 'TRACER' CHM_V8 MOD1
  248. 'TITR' ('CHAINE' 'rl at t=' 0.0);
  249.  
  250.  
  251. 'FINSI' ;
  252. *************************************************************************
  253. *
  254. * MAIN PROGRAM
  255. *
  256. *************************************************************************
  257. * Different upwind scheme available
  258. * AUSM +
  259. * METO = 'AUSMP1' ;
  260. * Preconditioned AUSM +
  261. METO = 'AUSMP2';
  262. * AUSMDV
  263. * METO = 'AUSMDV1';
  264. * Preconditioned AUSMDV
  265. * METO = 'AUSMDV2';
  266. *
  267. * Iterations
  268. *
  269. NITER = 10000000 ;
  270. *
  271. * Gravity, Final time, CFL-like parameter
  272. *
  273. g = 0.d0 ;
  274. TFINAL = 0.005d0 ;
  275. MCFL = 0.1D0 ;
  276. *
  277. * Order in space, order in time and a useful counter
  278. *
  279. ORDESP = 2;
  280. ORDTEM = 2;
  281. COUNT = 1;
  282. *
  283. * TIME IS RESETED TO 0 seconds
  284. *
  285. TPS = 0. ;
  286. *
  287. * Names of the residuum components
  288. *
  289. LISTINCO = 'MOTS' 'RVN' 'RLN' 'RUVX' 'RUVY' 'RUVZ'
  290. 'RULX' 'RULY' 'RULZ'
  291. 'RETVN' 'RETLN' ;
  292.  
  293. 'MESSAGE' ;
  294. 'MESSAGE' ('CHAINE' 'Methode = ' METO) ;
  295. 'MESSAGE' ;
  296. *
  297. * Some preliminary calculation for the evaluation of gradients
  298. * 1st. for the gradient of void fraction
  299. * 2nd. for the gradients in 2nd order
  300. *
  301. DALP LIMCH GRG = 'PENT' MDOMTOT 'CENTRE'
  302. 'EULESCAL' 'NOLIMITE' ('MOTS' 'SCAL') ALP ;
  303.  
  304. 'SI' (ORDESP 'EGA' 2) ;
  305.  
  306. GRADAL CACA COEFSCAL = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL'
  307. 'NOLIMITE' ('MOTS' 'SCAL') ALP ;
  308. GRADUV CACA COEFVECT = 'PENT' MDOMTOT 'CENTRE' 'EULEVECT'
  309. 'NOLIMITE' ('MOTS' 'UX' 'UY' 'UZ')
  310. ('EXCO' ('MOTS' 'UVX' 'UVY' 'UVZ')
  311. UV ('MOTS' 'UX' 'UY' 'UZ')) ;
  312. 'FINSI' ;
  313.  
  314. *
  315. **** Temporal loop
  316. *
  317. 'REPETER' BL1 NITER ;
  318. *
  319. **** Evaluation of variables at each side of the interface (PRET operator)
  320. *
  321. 'SI' ((ORDESP 'EGA' 1) 'OU' (&BL1 'EGA' 1)) ;
  322.  
  323. RLF RVF TLF TVF PF ULF UVF ALPF = 'PRET'
  324. 'TWOFLUID' 1 1 $DOMTOT
  325. ALP UV UL P TV TL RV RL ;
  326.  
  327. 'SINON' ;
  328.  
  329. GRADAL LIMALP = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  330. ('MOTS' 'SCAL') ALP 'GRADGEO' COEFSCAL ;
  331. GRADUV LIMUV = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  332. ('MOTS' 'UVX' 'UVY' 'UVZ') UV 'GRADGEO' COEFVECT ;
  333. GRADUL LIMUL = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  334. ('MOTS' 'ULX' 'ULY' 'ULZ') UL 'GRADGEO' COEFVECT ;
  335. GRADP LIMP = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  336. ('MOTS' 'SCAL') P 'GRADGEO' COEFSCAL ;
  337. GRADTV LIMTV = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  338. ('MOTS' 'SCAL') TV 'GRADGEO' COEFSCAL ;
  339. GRADTL LIMTL = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  340. ('MOTS' 'SCAL') TL 'GRADGEO' COEFSCAL ;
  341.  
  342. RLF RVF TLF TVF PF ULF UVF ALPF = 'PRET'
  343. 'TWOFLUID' ORDESP ORDTEM $DOMTOT
  344. ALP GRADAL LIMALP
  345. UV GRADUV LIMUV
  346. UL GRADUL LIMUL
  347. P GRADP LIMP
  348. TV GRADTV LIMTV
  349. TL GRADTL LIMTL
  350. RV RL DELTAT ;
  351.  
  352. 'FINSI' ;
  353. *
  354. **** Evaluation of Residual and Dt
  355. *
  356. RESIDU DELTAT = 'KONV' 'VF' 'TWOFLUID' 'RESI' METO
  357. $DOMTOT LISTINCO ALPF UVF ULF PF TVF TLF RVF RLF ;
  358.  
  359. DT = MCFL '*' DELTAT ;
  360.  
  361. 'SI' (COUNT 'EGA' 1 ) ;
  362. COUNT = 0 ;
  363. OALP = ALP ;
  364. OLDDT = DT ;
  365. 'FINSI' ;
  366. *
  367. **** Increment of the variables (convection)
  368. *
  369. RESIDU = DT '*' RESIDU ;
  370.  
  371. DRVN = 'EXCO' 'RVN' RESIDU 'SCAL' ;
  372. DRLN = 'EXCO' 'RLN' RESIDU 'SCAL' ;
  373. DRUVN = 'EXCO' ('MOTS' 'RUVX' 'RUVY' 'RUVZ') RESIDU ('MOTS' 'UVX'
  374. 'UVY' 'UVZ') ;
  375. DRULN = 'EXCO' ('MOTS' 'RULX' 'RULY' 'RULZ') RESIDU ('MOTS' 'ULX'
  376. 'ULY' 'ULZ') ;
  377. DRETVN = 'EXCO' 'RETVN' RESIDU 'SCAL' ;
  378. DRETLN = 'EXCO' 'RETLN' RESIDU 'SCAL' ;
  379. *
  380. * Analizamos la conservacion de la masa
  381. *
  382. MASAV = 'XTY' WCH1 UNO ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  383. MASAL = 'XTY' WCH2 UNO ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  384. MOMV = 'XTY' WCH3 UNO ('MOTS' 'UVY') ('MOTS' 'SCAL') ;
  385. MOML = 'XTY' WCH4 UNO ('MOTS' 'ULY') ('MOTS' 'SCAL') ;
  386. ENERV = 'XTY' WCH5 UNO ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  387. ENERL = 'XTY' WCH6 UNO ('MOTS' 'SCAL') ('MOTS' 'SCAL') ;
  388. *
  389. **** Previous update of conserved variables
  390. *
  391. TPS = TPS '+' DT ;
  392. WCH1 = WCH1 '+' DRVN ;
  393. WCH2 = WCH2 '+' DRLN ;
  394. WCH3 = WCH3 '+' DRUVN ;
  395. WCH4 = WCH4 '+' DRULN ;
  396. WCH5 = WCH5 '+' DRETVN ;
  397. WCH6 = WCH6 '+' DRETLN ;
  398. ************************************************************************
  399. **** Adittion of the source terms, final update of conserved variables
  400. ************************************************************************
  401. DALP1 LIMCH = 'PENT' MDOMTOT 'CENTRE'
  402. 'EULESCAL' 'LIMITEUR' ('MOTS' 'SCAL') ALP 'GRADGEO' GRG ;
  403.  
  404. DADP = DT * PINT * DALP1 ;
  405. *
  406. * Source term corresponding to the vapour momentum equation
  407. *
  408. S31 = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 2 'UVX' 0.d0 'UVY' 0.d0
  409. 'NATURE' 'DISCRET');
  410. S32 = DT * ALP * RV * g ;
  411. S321 = 'EXCO' 'SCAL' S32 'UVZ' 'NATURE' 'DISCRET' ;
  412. S3 = S31 'ET' S321 ;
  413. DADP = 'EXCO' ('MOTS' 'P1DX' 'P1DY' 'P1DZ') DADP ('MOTS' 'UVX' 'UVY'
  414. 'UVZ') 'NATURE' 'DISCRET' ;
  415. SO3 = (S3 '+' DADP) ;
  416. SO3 = 'NOMC' ('MOTS' 'UVX' 'UVY' 'UVZ') SO3 ('MOTS' 'UVX' 'UVY'
  417. 'UVZ') 'NATURE' 'DISCRET' ;
  418. WCH3 = WCH3 '+' SO3 ;
  419.  
  420. * Source term corresponding to the liquid momentum equation
  421.  
  422. S41 = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 2 'ULX' 0.d0 'ULY' 0.d0
  423. 'NATURE' 'DISCRET');
  424. S42 = DT *(ALP '-' 1.d0) * RL * g ;
  425. S42 = S42 * (-1.) ;
  426. S421 = 'EXCO' 'SCAL' S42 'ULZ' 'NATURE' 'DISCRET' ;
  427. S4 = S41 'ET' S421 ;
  428. DADP = 'EXCO' ('MOTS' 'UVX' 'UVY' 'UVZ') DADP ('MOTS' 'ULX' 'ULY'
  429. 'ULZ') 'NATURE' 'DISCRET' ;
  430. SO4 = (S4 '-' DADP) ;
  431. SO4 = 'NOMC' ('MOTS' 'ULX' 'ULY' 'ULZ') SO4 ('MOTS' 'ULX' 'ULY'
  432. 'ULZ') 'NATURE' 'DISCRET' ;
  433. WCH4 = WCH4 '+' SO4 ;
  434.  
  435. * Source term corresponding to the vapour total energy equation
  436.  
  437. VY = 'EXCO' 'UVZ' UV ;
  438. S5 = S32 * VY ;
  439. DADT = DT * PINT * (ALP '-' OALP) '/' OLDDT ;
  440. SO5 = (S5 '-' DADT) ;
  441. SO5 = 'EXCO' 'SCAL' SO5 'SCAL' 'NATURE' 'DISCRET' ;
  442. WCH5 = WCH5 '+' SO5 ;
  443.  
  444. * Source term corresponding to the liquid total equation
  445.  
  446. LY = 'EXCO' 'ULZ' UL ;
  447. S6 = S42 * LY ;
  448. SO6 = (S6 '+' DADT) ;
  449. SO6 = 'EXCO' 'SCAL' SO6 'SCAL' 'NATURE' 'DISCRET' ;
  450. WCH6 = WCH6 '+' SO6 ;
  451.  
  452. OALP = ALP ;
  453. OLDDT = DT ;
  454. OTV = TV ;
  455. OTL = TL ;
  456. ************************************************************************
  457. **** Updating primitive variables
  458. ************************************************************************
  459. PINT RL RV TL TV P UL UV ALP = 'PRIM' 'TWOFLUID'
  460. WCH1 WCH2 WCH3 WCH4 WCH5 WCH6 OALP OTV OTL CP CVM;
  461. * ANADIR CVM TRAS COMPILAR
  462. ************************************************************************
  463. **** Graphical outputs
  464. ************************************************************************
  465. 'SI' (((&BL1 '/' 1000) '*' 1000) 'EGA' &BL1) ;
  466. 'MESSAGE' &BL1 TPS ;
  467. 'FINSI' ;
  468.  
  469. 'SI' (TPS > TFINAL) ;
  470.  
  471. EVALP = 'EVOL' 'CHPO' ALP COURB ;
  472. EVUVX = 'EVOL' 'CHPO' UV 'UVX' COURB ;
  473. EVUVY = 'EVOL' 'CHPO' UV 'UVY' COURB ;
  474. EVUVZ = 'EVOL' 'CHPO' UV 'UVZ' COURB ;
  475. EVULX = 'EVOL' 'CHPO' UL 'ULX' COURB ;
  476. EVULY = 'EVOL' 'CHPO' UL 'ULY' COURB ;
  477. EVULZ = 'EVOL' 'CHPO' UL 'ULZ' COURB ;
  478. EVP = 'EVOL' 'CHPO' P COURB ;
  479. EVTV = 'EVOL' 'CHPO' TV COURB ;
  480. EVTL = 'EVOL' 'CHPO' TL COURB ;
  481. EVRV = 'EVOL' 'CHPO' RV COURB ;
  482. EVRL = 'EVOL' 'CHPO' RL COURB ;
  483.  
  484. 'MESSAGE' &BL1 TPS ;
  485.  
  486. 'SI' GRAPH ;
  487. 'DESSIN' EVALP 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  488. 'alpha' ;
  489. 'DESSIN' EVUVX 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  490. 'uvx (m/s)' ;
  491. 'DESSIN' EVUVY 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  492. 'uvy (m/s)' ;
  493. 'DESSIN' EVUVZ 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  494. 'uvz (m/s)' ;
  495. 'DESSIN' EVULX 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  496. 'ulx (m/s)' ;
  497. 'DESSIN' EVULY 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  498. 'uly (m/s)' ;
  499. 'DESSIN' EVULZ 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  500. 'ulz (m/s)' ;
  501. 'DESSIN' EVP 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  502. 'p (Pa)' ;
  503. 'DESSIN' EVTV 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  504. 'Tv (K)' ;
  505. 'DESSIN' EVTL 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  506. 'Tl (K)' ;
  507. 'DESSIN' EVRV 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  508. 'rv (kg/m3)' ;
  509. 'DESSIN' EVRL 'TITR' 'Shock tube test' 'TITX' 'x (m)' 'TITY'
  510. 'rl (kg/m3)' ;
  511. 'FINSI' ;
  512.  
  513. 'QUITTER' BL1 ;
  514.  
  515. 'FINSI' ;
  516.  
  517.  
  518. 'FIN' BL1 ;
  519. ************************************************************************
  520. **** End of loop
  521. ************************************************************************
  522.  
  523. *
  524. 'SI' GRAPH ;
  525. MOD1 = 'MODELISER' ($DOMTOT . 'MAILLAGE' ) 'THERMIQUE';
  526.  
  527. CHM_V1 = 'KCHA' $DOMTOT 'CHAM' alp ;
  528. CHM_V2 = 'KCHA' $DOMTOT 'CHAM' uv ;
  529. CHM_V3 = 'KCHA' $DOMTOT 'CHAM' ul ;
  530. CHM_V4 = 'KCHA' $DOMTOT 'CHAM' p ;
  531. CHM_V5 = 'KCHA' $DOMTOT 'CHAM' Tv ;
  532. CHM_V6 = 'KCHA' $DOMTOT 'CHAM' TL ;
  533. CHM_V7 = 'KCHA' $DOMTOT 'CHAM' RV ;
  534. CHM_V8 = 'KCHA' $DOMTOT 'CHAM' RL ;
  535.  
  536. 'TRACER' CHM_V1 MOD1
  537. 'TITR' ('CHAINE' 'alpha at t=' TPS);
  538. 'TRACER' CHM_V2 MOD1
  539. 'TITR' ('CHAINE' 'uv at t=' TPS);
  540. 'TRACER' CHM_V3 MOD1
  541. 'TITR' ('CHAINE' 'ul at t=' TPS);
  542. 'TRACER' CHM_V4 MOD1
  543. 'TITR' ('CHAINE' 'p at t=' TPS);
  544. 'TRACER' CHM_V5 MOD1
  545. 'TITR' ('CHAINE' 'Tv at t=' TPS);
  546. 'TRACER' CHM_V6 MOD1
  547. 'TITR' ('CHAINE' 'Tl at t=' TPS);
  548. 'TRACER' CHM_V7 MOD1
  549. 'TITR' ('CHAINE' 'rv at t=' TPS);
  550. 'TRACER' CHM_V8 MOD1
  551. 'TITR' ('CHAINE' 'rl at t=' TPS);
  552.  
  553. 'FINSI' ;
  554. ************************************************************************
  555. *** saving the results in a file
  556. ************************************************************************
  557.  
  558. * 'OPTION' 'SAUVER' ('CHAINE' 'shock3d.sauv') ;
  559. * 'SAUVER' ;
  560.  
  561. 'FIN' ;
  562.  
  563.  
  564.  

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