Télécharger shock2d.dgibi

Retour à la liste

Numérotation des lignes :

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

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