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 = 1000000000 ;
  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'
  285. 'RETVN' 'RETLN' ;
  286.  
  287. 'MESSAGE' ;
  288. 'MESSAGE' ('CHAINE' 'Methode = ' METO) ;
  289. 'MESSAGE' ;
  290.  
  291. DALP LIMCH GRG = 'PENT' MDOMTOT 'CENTRE'
  292. 'EULESCAL' 'NOLIMITE' ('MOTS' 'SCAL') ALP ;
  293.  
  294. 'SI' (ORDESP 'EGA' 2) ;
  295.  
  296. GRADAL CACA COEFSCAL = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL'
  297. 'NOLIMITE' ('MOTS' 'SCAL') ALP ;
  298. GRADUV CACA COEFVECT = 'PENT' MDOMTOT 'CENTRE' 'EULEVECT'
  299. 'NOLIMITE' ('MOTS' 'UX' 'UY')
  300. ('EXCO' ('MOTS' 'UVX' 'UVY') UV
  301. ('MOTS' 'UX' 'UY')) ;
  302. 'FINSI' ;
  303. *
  304. **** Temporal loop
  305. *
  306. 'REPETER' BL1 NITER ;
  307. *
  308. **** Evaluation of variables at each side of the interface (PRET operator)
  309. *
  310. 'SI' ((ORDESP 'EGA' 1) 'OU' (&BL1 'EGA' 1)) ;
  311.  
  312. RLF RVF TLF TVF PF ULF UVF ALPF = 'PRET'
  313. 'TWOFLUID' 1 1 $DOMTOT
  314. ALP UV UL P TV TL RV RL ;
  315.  
  316. 'SINON' ;
  317.  
  318. GRADAL LIMALP = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  319. ('MOTS' 'SCAL') ALP 'GRADGEO' COEFSCAL ;
  320. GRADUV LIMUV = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  321. ('MOTS' 'UVX' 'UVY') UV 'GRADGEO' COEFVECT ;
  322. GRADUL LIMUL = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  323. ('MOTS' 'ULX' 'ULY') UL 'GRADGEO' COEFVECT ;
  324. GRADP LIMP = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  325. ('MOTS' 'SCAL') P 'GRADGEO' COEFSCAL ;
  326. GRADTV LIMTV = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  327. ('MOTS' 'SCAL') TV 'GRADGEO' COEFSCAL ;
  328. GRADTL LIMTL = 'PENT' MDOMTOT 'CENTRE' 'EULESCAL' 'LIMITEUR'
  329. ('MOTS' 'SCAL') TL 'GRADGEO' COEFSCAL ;
  330.  
  331. RLF RVF TLF TVF PF ULF UVF ALPF = 'PRET'
  332. 'TWOFLUID' ORDESP ORDTEM $DOMTOT
  333. ALP GRADAL LIMALP
  334. UV GRADUV LIMUV
  335. UL GRADUL LIMUL
  336. P GRADP LIMP
  337. TV GRADTV LIMTV
  338. TL GRADTL LIMTL
  339. RV RL DELTAT ;
  340.  
  341. 'FINSI' ;
  342.  
  343. RESIDU DELTAT = 'KONV' 'VF' 'TWOFLUID' 'RESI' METO
  344. $DOMTOT LISTINCO ALPF UVF ULF PF TVF TLF RVF RLF ;
  345.  
  346. DT = MCFL '*' DELTAT ;
  347.  
  348. 'SI' (&BL1 'EGA' 1 ) ;
  349. OALP = ALP ;
  350. OLDDT = DT ;
  351. 'FINSI' ;
  352. *
  353. **** Increment of the variables (convection)
  354. *
  355. RESIDU = DT '*' RESIDU ;
  356.  
  357. DRVN = 'EXCO' 'RVN' RESIDU 'SCAL' ;
  358. DRLN = 'EXCO' 'RLN' RESIDU 'SCAL' ;
  359. DRUVN = 'EXCO' ('MOTS' 'RUVX' 'RUVY') RESIDU ('MOTS' 'UVX' 'UVY') ;
  360. DRULN = 'EXCO' ('MOTS' 'RULX' 'RULY') RESIDU ('MOTS' 'ULX' 'ULY') ;
  361. DRETVN = 'EXCO' 'RETVN' RESIDU 'SCAL' ;
  362. DRETLN = 'EXCO' 'RETLN' RESIDU 'SCAL' ;
  363. * To analyse the evolution of the residual, only for the momentum equations
  364. *
  365. RU3N = WCH3 ;
  366. RU4N = WCH4 ;
  367. *
  368. **** Update of conserved variables
  369. *
  370. TPS = TPS '+' DT ;
  371. WCH1 = WCH1 '+' DRVN ;
  372. WCH2 = WCH2 '+' DRLN ;
  373. WCH3 = WCH3 '+' DRUVN ;
  374. WCH4 = WCH4 '+' DRULN ;
  375. WCH5 = WCH5 '+' DRETVN ;
  376. WCH6 = WCH6 '+' DRETLN ;
  377. *
  378. **** Adittion of the source terms
  379. *
  380. *
  381. * Interfacial friction term, drag force
  382. *
  383. FV = 0. ;
  384. FL = 0. ;
  385. *
  386. DALP1 LIMCH = 'PENT' MDOMTOT 'CENTRE'
  387. 'EULESCAL' 'LIMITEUR' ('MOTS' 'SCAL') ALP 'GRADGEO' GRG ;
  388. *
  389. *** Void fraction gradient terms
  390. *
  391. DADP = DT * PINT * DALP1 ;
  392. *
  393. * Source term corresponding to the vapour momentum equation
  394. *
  395. S31 = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 1 'UVX' 0.d0 'NATURE'
  396. 'DISCRET');
  397. S32 = DT * ALP * RV * g ;
  398. S321 = 'EXCO' 'SCAL' S32 'UVY' 'NATURE' 'DISCRET' ;
  399. S3 = S31 'ET' S321 ;
  400. DADP = 'EXCO' ('MOTS' 'P1DX' 'P1DY') DADP ('MOTS' 'UVX' 'UVY')
  401. 'NATURE' 'DISCRET' ;
  402. SO3 = (S3 '+' DADP) ;
  403. SO3 = 'NOMC' ('MOTS' 'UVX' 'UVY') SO3 ('MOTS' 'UVX' 'UVY')
  404. 'NATURE' 'DISCRET' ;
  405. WCH3 = WCH3 '+' SO3 '+' FV;
  406.  
  407. * Source term corresponding to the liquid momentum equation
  408.  
  409. S41 = ('MANU' 'CHPO' ($DOMTOT.'CENTRE') 1 'ULX' 0.d0 'NATURE'
  410. 'DISCRET');
  411. S42 = DT *(ALP '-' 1.d0) * RL * g ;
  412. S42 = S42 * (-1.) ;
  413. S421 = 'EXCO' 'SCAL' S42 'ULY' 'NATURE' 'DISCRET' ;
  414. S4 = S41 'ET' S421 ;
  415. DADP = 'EXCO' ('MOTS' 'UVX' 'UVY') DADP ('MOTS' 'ULX' 'ULY')
  416. 'NATURE' 'DISCRET' ;
  417. SO4 = (S4 '-' DADP) ;
  418. SO4 = 'NOMC' ('MOTS' 'ULX' 'ULY') SO4 ('MOTS' 'ULX' 'ULY')
  419. 'NATURE' 'DISCRET' ;
  420. WCH4 = WCH4 '+' SO4 '+' FL;
  421.  
  422. * Source term corresponding to the vapour total energy equation
  423.  
  424. VY = 'EXCO' 'UVY' UV ;
  425. S5 = S32 * VY ;
  426. DADT = DT * PINT * (ALP '-' OALP) '/' OLDDT ;
  427. SO5 = (S5 '-' DADT) ;
  428. SO5 = 'EXCO' 'SCAL' SO5 'SCAL' 'NATURE' 'DISCRET' ;
  429. WCH5 = WCH5 '+' SO5 ;
  430.  
  431. * Source term corresponding to the liquid total equation
  432.  
  433. LY = 'EXCO' 'ULY' UL ;
  434. S6 = S42 * LY ;
  435. SO6 = (S6 '+' DADT) ;
  436. SO6 = 'EXCO' 'SCAL' SO6 'SCAL' 'NATURE' 'DISCRET' ;
  437. WCH6 = WCH6 '+' SO6 ;
  438.  
  439. OALP = ALP ;
  440. OLDDT = DT ;
  441. OTV = TV ;
  442. OTL = TL ;
  443. ***********************************************************************
  444. *** Updating Primitive variables
  445. ***********************************************************************
  446. PINT RL RV TL TV P UL UV ALP = 'PRIM' 'TWOFLUID'
  447. WCH1 WCH2 WCH3 WCH4 WCH5 WCH6 OALP OTV OTL CP CVM;
  448. ************************************************************************
  449. **** Graphical outputs
  450. ************************************************************************
  451. 'SI' (((&BL1 '/' 1000) '*' 1000) 'EGA' &BL1) ;
  452. 'MESSAGE' &BL1 TPS ;
  453. 'FINSI' ;
  454. 'SI' (TPS > TFINAL) ;
  455.  
  456. LINE = P4P5 ;
  457. TITULO = 'CHAINE' 'Shock tube test' ;
  458.  
  459. EVALP = 'EVOL' 'CHPO' ALP LINE ;
  460. EVUVX = 'EVOL' 'CHPO' UV 'UVX' LINE ;
  461. EVUVY = 'EVOL' 'CHPO' UV 'UVY' LINE ;
  462. EVULX = 'EVOL' 'CHPO' UL 'ULX' LINE ;
  463. EVULY = 'EVOL' 'CHPO' UL 'ULY' LINE ;
  464. EVP = 'EVOL' 'CHPO' P LINE ;
  465. EVTV = 'EVOL' 'CHPO' TV LINE ;
  466. EVTL = 'EVOL' 'CHPO' TL LINE ;
  467. EVRV = 'EVOL' 'CHPO' RV LINE ;
  468. EVRL = 'EVOL' 'CHPO' RL LINE ;
  469.  
  470. 'MESSAGE' &BL1 TPS ;
  471. 'SI' GRAPH ;
  472. 'DESSIN' EVALP 'TITR' TITULO 'TITX' 'x (m)' 'TITY'
  473. 'alpha' ;
  474. 'DESSIN' EVUVX 'TITR' TITULO 'TITX' 'x (m)' 'TITY'
  475. 'uvx (m/s)' ;
  476. 'DESSIN' EVUVY 'TITR' TITULO 'TITX' 'x (m)' 'TITY'
  477. 'uvy (m/s)' ;
  478. 'DESSIN' EVULX 'TITR' TITULO 'TITX' 'x (m)' 'TITY'
  479. 'ulx (m/s)' ;
  480. 'DESSIN' EVULY 'TITR' TITULO 'TITX' 'x (m)' 'TITY'
  481. 'uly (m/s)' ;
  482. 'DESSIN' EVP 'TITR' TITULO 'TITX' 'x (m)' 'TITY'
  483. 'p (Pa)' ;
  484. 'DESSIN' EVTV 'TITR' TITULO 'TITX' 'x (m)' 'TITY'
  485. 'Tv (K)' ;
  486. 'DESSIN' EVTL 'TITR' TITULO 'TITX' 'x (m)' 'TITY'
  487. 'Tl (K)' ;
  488. 'DESSIN' EVRV 'TITR' TITULO 'TITX' 'x (m)' 'TITY'
  489. 'rv (kg/m3)' ;
  490. 'DESSIN' EVRL 'TITR' TITULO 'TITX' 'x (m)' 'TITY'
  491. 'rl (kg/m3)' ;
  492. 'FINSI' ;
  493. 'QUITTER' BL1 ;
  494.  
  495. 'FINSI' ;
  496.  
  497.  
  498.  
  499. 'FIN' BL1 ;
  500. *
  501. 'SI' GRAPH ;
  502. MOD1 = 'MODELISER' ($DOMTOT . 'MAILLAGE' ) 'THERMIQUE';
  503.  
  504. CHM_V1 = 'KCHA' $DOMTOT 'CHAM' alp ;
  505. CHM_V2 = 'KCHA' $DOMTOT 'CHAM' uv ;
  506. CHM_V3 = 'KCHA' $DOMTOT 'CHAM' ul ;
  507. CHM_V4 = 'KCHA' $DOMTOT 'CHAM' p ;
  508. CHM_V5 = 'KCHA' $DOMTOT 'CHAM' Tv ;
  509. CHM_V6 = 'KCHA' $DOMTOT 'CHAM' TL ;
  510. CHM_V7 = 'KCHA' $DOMTOT 'CHAM' RV ;
  511. CHM_V8 = 'KCHA' $DOMTOT 'CHAM' RL ;
  512.  
  513. 'TRACER' CHM_V1 MOD1
  514. 'TITR' ('CHAINE' 'alpha at t=' TPS);
  515. 'TRACER' CHM_V2 MOD1
  516. 'TITR' ('CHAINE' 'uv at t=' TPS);
  517. 'TRACER' CHM_V3 MOD1
  518. 'TITR' ('CHAINE' 'ul at t=' TPS);
  519. 'TRACER' CHM_V4 MOD1
  520. 'TITR' ('CHAINE' 'p at t=' TPS);
  521. 'TRACER' CHM_V5 MOD1
  522. 'TITR' ('CHAINE' 'Tv at t=' TPS);
  523. 'TRACER' CHM_V6 MOD1
  524. 'TITR' ('CHAINE' 'Tl at t=' TPS);
  525. 'TRACER' CHM_V7 MOD1
  526. 'TITR' ('CHAINE' 'rv at t=' TPS);
  527. 'TRACER' CHM_V8 MOD1
  528. 'TITR' ('CHAINE' 'rl at t=' TPS);
  529.  
  530. 'FINSI' ;
  531. *
  532. * Saving the results
  533. * 'OPTION' 'SAUVER' ('CHAINE' 'shock2d.sauv') ;
  534. * 'SAUVER' ;
  535. *
  536. 'FIN' ;
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  

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