Télécharger injairA.dgibi

Retour à la liste

Numérotation des lignes :

  1. *=======================================================================
  2. *
  3. * fichier : injairA.dgibi
  4. *
  5. * Air injection inside an adiabatic axisymetric cavity
  6. * Comparaison in average with an analytic solution
  7. *
  8. *=======================================================================
  9. * Analytical solution
  10. *
  11. * Mean pressure, temperature and density are computed according to the
  12. * injection at a constant mass flow rate and temperature of a non
  13. * condensable (nc) gas inside a cavity. At the
  14. * initial time t=0, the cavity is filled with the SAME nc gas.
  15. *
  16. * Hypothesis : Laplace coefficient Gama=cp/cv is constant
  17. *
  18. 'DEBP' SOREF Ltps*'LISTREEL' QM*'FLOTTANT'
  19. Vr*'FLOTTANT' Sr*'FLOTTANT' Pnm*'FLOTTANT'
  20. tetai*'FLOTTANT' INCOND*'MOT' COUL1*'MOT' ;
  21. *
  22. * E/ : Ltps : List of time steps (in s)
  23. * E/ : QM : Mas flow rate at the injection (in kg/s)
  24. * E/ : Vr : Volume of the cavity (in m3)
  25. * E/ : Sr : Surface of the wall (in m2)
  26. * E/ : Pnm : Initial pressure (in Pa)
  27. * E/ : TETAI : Initial temperature (in C)
  28. * E/ : INCOND : Name of the nc gas
  29. * E/ : COUL1 : Color of the evolutions
  30. *
  31. * /S : evp1 : EVOLUTION : Mean pressure evolution in time
  32. * /S : evt1 : EVOLUTION : Mean temperature evolution in time
  33. * /S : evrho1 : EVOLUTION : Mean nc qas density evolution in time
  34. *
  35. 'SI' ('EGA' INCOND 'AIR' ) ;
  36. a1 a2 a3 a4 a5 a6 Cp = calcp tetai ;
  37. Rinc = 287.1 ;
  38. 'SINO' ;
  39. 'SI' ('EGA' INCOND 'N2') ;
  40. a1 a2 a3 Cp a5 a6 a7 = calcp tetai ;
  41. Rinc = 296.9 ;
  42. 'SINO' ;
  43. 'MESS' ' Unknown non condensable gas' ' ' incond ;
  44. 'ERRE' 5 ;
  45. 'FINS' ;
  46. 'FINS' ;
  47. 'MESS' 'Reference temperature (C) :' tetai ;
  48. 'MESS' 'Thermal capacity cp (J/kg/K):' cp ;
  49. 'MESS' 'Specific constant r (J/kg/K):' Rinc;
  50. *
  51. ntps = 'DIME' Ltps ;
  52. 'SI' (ntps '>' 1) ;
  53. tpsnm = 'EXTR' ltps 1 ;
  54. 'SINO' ;
  55. 'MESS' ' Bad time list :' ;
  56. 'LIST' ltps ;
  57. 'ERRE' 5 ;
  58. 'FINS' ;
  59. *
  60. * Initial conditions
  61. Rhonm = Pnm '/' Rinc '/' (tetai + 273.15) ;
  62. Lrho = 'PROG' Rhonm ;
  63. Lp = 'PROG' Pnm ;
  64. LT = 'PROG' tetai ;
  65. *
  66. gama = Cp '/' (Cp '-' Rinc) ;
  67. 'REPE' BLOC (ntps '-' 1) ;
  68. tpsn = 'EXTR' ltps (&BLOC '+' 1) ;
  69. DT0 = tpsn '-' tpsnm ;
  70. dpdt = gama '*' Rinc '*' (tetai + 273.15) '*' Qm '/' Vr ;
  71. Pn = DT0 '*' dpdt '+' Pnm ;
  72. Rhon = DT0 '*' Qm '/' Vr '+' Rhonm ;
  73. Tn = Pn '/' Rhon '/' Rinc '-' 273.15 ;
  74. *
  75. * 'SI' ('EGA' INCOND 'AIR' ) ;
  76. * a1 a2 a3 a4 a5 a6 Cp = calcp tn ;
  77. * 'SINO' ;
  78. * a1 a2 a3 Cp a5 a6 a7 = calcp tn ;
  79. * 'FINS' ;
  80. *
  81. Lrho = Lrho 'ET' ('PROG' Rhon) ;
  82. Lp = Lp 'ET' ('PROG' Pn) ;
  83. LT = LT 'ET' ('PROG' Tn) ;
  84. *
  85. tpsnm = tpsn ;
  86. Rhonm = Rhon ;
  87. Pnm = Pn ;
  88. 'FIN' BLOC ;
  89. evp1 = 'EVOL' coul1 'MANU' ltps lp ;
  90. evt1 = 'EVOL' coul1 'MANU' ltps lt ;
  91. evrho1 = 'EVOL' coul1 'MANU' ltps lrho ;
  92. 'FINP' evp1 evt1 evrho1 ;
  93. *=======================================================================
  94. *
  95. 'OPTI' 'DIME' 2 'ELEM' 'QUA4' 'MODE' 'AXIS' 'TRAC' 'PSC' 'EPTR' 10 ;
  96. 'DENS' 1. ;
  97. *
  98. COMPLET = faux ;
  99. GRAPH = faux ;
  100. *
  101. 'SI' COMPLET ;
  102. Tmax = 500. ;
  103. DT0 = 1. ;
  104. n1 = 5 ;
  105. n2 =10 ;
  106. n3 =20 ;
  107. 'SINO' ;
  108. Tmax = 500. ;
  109. DT0 = 2. ;
  110. n1 = 3 ;
  111. n2 = 3 ;
  112. n3 = 3 ;
  113. 'FINS' ;
  114. nbit = 'ENTI' (Tmax / DT0) ;
  115. Qinj = 0.2 ;
  116. PT0 = 1.e5 ;
  117. TF0 = 300. - 273.15 ;
  118. hext = 0. ;
  119. Text = 0. ;
  120. *
  121. *
  122. * Mesh
  123. *
  124. *
  125. * R1 = Radius of the vertical cylinder
  126. * H1 = Half-height of the vertical cylinder
  127. * H2 = Half-height of the cavity
  128. * DB = Radius of the injection
  129. * -HB = Elevation of the injection
  130. *
  131. * episo = Width of the internal thermal insulator
  132. *
  133. epsi0 = 1.e-5 ;
  134. *
  135. EPISO = 0.044 ;
  136. R1 = 1.200 - episo ;
  137. H1 = 1.605 ;
  138. H2 = 2.342 - episo ;
  139. DB = 0.1 ;
  140. HB = 0.835 ;
  141. *
  142. * Points for rotation purposes
  143. CA1 = 0. 0.275 ;
  144. CA2 = (0.33*R1) H1 ;
  145. *
  146. * Points for symetry purposes
  147. P0 = 0. 0. ;
  148. P2 = DB 0. ;
  149. PA0 = R1 0.;
  150. *
  151. * Specific points
  152. PAXb = 0. (-1. '*' HB) ;
  153. P2b = DB (-1. '*' HB) ;
  154. PAb = R1 (-1. '*' HB) ;
  155. PAbm = (R1/2.) (-1. '*' HB) ;
  156. PAX2 = 0. H2 ;
  157. PA20 = PAX2 'TOUR' -5. CA1 ;
  158. PA2 = PA20 'TOUR' -15. CA1 ;
  159. PA1 = R1 H1 ;
  160. PAXM = (PAX2 'PLUS' PAXb) '*' 0.5 ;
  161. *
  162. PbX2 = PAX2 'SYME' 'DROITE' P0 PA0;
  163. Pb1 = R1 (-1. '*' H1) ;
  164. *
  165. * Specific treatment (lips) at the injection
  166. breche = PAXb 'DROI' n1 P2b ;
  167. entb = breche 'PLUS' (0. 0.);
  168. 'DEPL' entb 'TOUR' 15. P2b;
  169. P0b = 'POIN' 1 entb ;
  170. *
  171. * Upper volume
  172. * From the injection elevation to the top
  173. bas = P2b 'DROI' 'DINI' (DB/n1) 'DFIN' (R1/10.) PABM
  174. 'DROI' 'DINI' (R1/10.) 'DFIN' (db/n1) PAB ;
  175. n2 = 'NBEL' bas ;
  176. *
  177. plaf0 = PAX2 'CERC' n1 CA1 PA20 ;
  178. plaf1 = PA20 'CERC' (n2/2) CA1 PA2 ;
  179. plaf2 = PA2 'CERC' (n2/2) CA2 PA1 ;
  180. plaf = 'INVE' (plaf0 'ET' plaf1 'ET' plaf2) ;
  181. *
  182. axeh = PAX2 'DROI' 'DINI' (h2/n3/4.) 'DFIN' (h1/n3) PAXM
  183. 'DROI' 'DINI' (h1/n3) 'DFIN' (h2/n3/4.) PAXB ;
  184. n3n = 'NBEL' axeh ;
  185. *
  186. paroih = PAb 'DROI' n3n PA1 ;
  187. *
  188. mth = 'DALL' (breche 'ET' bas) paroih plaf axeh;
  189. *
  190. * Lower volume
  191. * From the bottom to the injection elevation
  192. *
  193. axeb = PBX2 'DROI' n3 P0b ;
  194. paroib = PAb 'DROI' n3 Pb1 ;
  195. fond = plaf 'SYME' 'DROITE' P0 PA0 ;
  196. 'ELIM' (entb 'ET' bas 'ET' paroib 'ET' fond 'ET' axeb) epsi0 ;
  197. mtb = 'DALL' (entb 'ET' bas) paroib fond axeb ;
  198. *
  199. * Mesh of the cavity and specific boundaries (axis, containment wall)
  200. axe = axeb 'ET' ('INVE' axeh) ;
  201. parext = ('INVE' (plaf 'ET' paroih)) 'ET' paroib 'ET' fond ;
  202. mt = mth 'ET' mtb ;
  203. 'ELIM' mt epsi0 ;
  204. *
  205. * Control
  206. 'SI' GRAPH ;
  207. 'TRAC' (axeh 'ET' breche 'ET' bas 'ET' paroih 'ET' plaf 'ET' ca1) ;
  208. 'TRAC' mt ;
  209. pla = paroih 'ET' plaf ;
  210. pla = pla 'ET' ('SYME' pla 'DROIT' P0 pax2) ;
  211. 'TRAC' (pla 'ET' ca1 'ET' ca2 'ET' PA1) ;
  212. 'TRAC' ('ELIM' (mt 'ET' ('SYME' mt 'DROIT' P0 pax2)) epsi0) ;
  213. 'FINS' ;
  214. *
  215. *
  216. * Data for execrxt.procedur
  217. *
  218. *
  219. rxt = 'TABLE' ;
  220. rxt . 'VERSION' = 'V0' ;
  221. rxt . 'vtf' = mt ;
  222. rxt . 'axe' = axe ;
  223. rxt . 'epsi' = epsi0 ;
  224. rxt . 'pi' = 0.5 0.5 ;
  225.  
  226. rxt . 'DISCR' = 'LINE';
  227. rxt . 'KPRE' = 'MSOMMET' ;
  228. rxt . 'DT0' = DT0 ;
  229.  
  230. rxt . 'MODTURB' = 'LMEL' ;
  231. rxt . 'LMEL' = 0.01 ;
  232.  
  233. *
  234. rxt . 'TF0' = TF0 ;
  235. rxt . 'PT0' = PT0 ;
  236. *
  237. rxt . 'Breches' = 'TABLE' ;
  238. rxt . 'Breches' . 'A' = 'TABLE' ;
  239. rxt . 'Breches' . 'A' . 'Maillage' = breche ;
  240. rxt . 'Breches' . 'A' . 'diru' = (0. 1.) ;
  241. rxt . 'Breches' . 'A' . 'scenario' = 'TABLE' ;
  242. rxt . 'Breches' . 'A' . 'scenario' . 't' = 'PROG' 0.0 1000. ;
  243. rxt . 'Breches' . 'A' . 'scenario' . 'qair' = 'PROG' Qinj Qinj ;
  244. rxt . 'Breches' . 'A' . 'scenario' . 'tinj' = 'PROG' TF0 TF0 ;
  245. *
  246. rxt . 'DETMAT' = vrai ;
  247. rxt . 'RENU' = 'RIEN' ;
  248. rxt . 'GRAPH' = faux ;
  249. execrxt 0 rxt ;
  250. rxt . 'GRAPH' = GRAPH ;
  251. *
  252. 'MESS' ' Volume :' ('SOMT' rxt . 'GEO' . 'Diag') ;
  253. *
  254. * Transient computation
  255. * (the numerical diffusion is set to zero for the equation devoted to fluid temperature)
  256. 'SI' COMPLET ;
  257. rxt . 'TBT' . 'RTF' . '1TSCA' . 'KOPT' . 'CMD' = 0. ;
  258. 'FINS' ;
  259. execrxt nbit rxt ;
  260. *
  261. *
  262. * Plots devoted to inj... cases
  263. *
  264. *
  265. Ltps = rxt . 'TIC' . 'LTPS' ;
  266. Vr = 'MAXI' ('RESU' ('DOMA' rxt . 'GEO' . '$vtf' 'VOLUME')) ;
  267. Sr = 'MAXI' ('RESU' ('DOMA' rxt . 'GEO' . '$menvf' 'VOLUME')) ;
  268. 'MESS' vr ; 'MESS' sr ;
  269. *Vr = 17.4 ; Sr = 35.914 ;
  270. evp1 evt1 evrho1 = SOREF Ltps Qinj Vr Sr PT0 TF0 'AIR' 'ROUG' ;
  271. evm1 = evrho1 * Vr ;
  272.  
  273. evp2 = 'EVOL' 'MANU' Ltps rxt . 'TIC' . 'PT' ;
  274. evt2 = 'EVOL' 'MANU' Ltps rxt . 'TIC' . 'Tfm' ;
  275. evrho2 = 'EVOL' 'MANU' Ltps rxt . 'TIC' . 'Rhomn' ;
  276. evm2 = evrho2 * Vr ;
  277. 'SI' GRAPH ;
  278. TAB1 = 'TABLE' ;
  279. TAB1 . 'TITRE' = 'TABLE' ;
  280. TAB1 . 1 = 'MOT' ' MARQ CROI REGU ';
  281. TAB1 . 2 = 'MOT' ' MARQ CARR REGU TIRC';
  282. TAB1 . 3 = 'MOT' ' MARQ LOSA REGU TIRC';
  283. TAB1 . 4 = 'MOT' ' MARQ TRIU REGU TIRC';
  284. TAB1 . 5 = 'MOT' ' MARQ TRID REGU TIRC';
  285. TAB1 . 'TITRE' . 1 = 'Sol Ref';
  286. TAB1 . 'TITRE' . 2 = 'Nautilus CFD';
  287. *
  288. 'DESS' (evp1 'ET' evp2)
  289. 'TITR' 'Pressure' 'MIMA'
  290. 'GRIL' 'POIN' 'GRIS' 'TITX' 's' 'TITY' ' Pa' 'LEGE' tab1 ;
  291. 'DESS' (evt1 'ET' evt2)
  292. 'TITR' 'Mean gas temperature'
  293. 'GRIL' 'POIN' 'GRIS' 'TITX' 's' 'TITY' ' C' 'LEGE' tab1 ;
  294. 'DESS' (evrho1 'ET' evrho2)
  295. 'TITR' 'Mean gas density'
  296. 'GRIL' 'POIN' 'GRIS' 'TITX' 's' 'TITY' 'kg/m3' 'LEGE' tab1 ;
  297. 'DESS' (evm1 'ET' evm2)
  298. 'TITR' 'Air mass'
  299. 'GRIL' 'POIN' 'GRIS' 'TITX' 's' 'TITY' 'kg' 'LEGE' tab1 ;
  300. 'FINS' ;
  301. *
  302. *
  303. * Tests
  304. *
  305. *
  306. 'SI' ('NON' COMPLET) ;
  307. ERR1 = 0 ;
  308. devp = evp1 - evp2 'ABS' ;
  309. erp = 'MAXI' ('EXTR' devp 'ORDO') ;
  310. 'MESS' ' ERP =' ERP;
  311. devt = evt1 - evt2 'ABS' ;
  312. ert = 'MAXI' ('EXTR' devt 'ORDO') ;
  313. 'MESS' ' ERT =' ERT ;
  314. t_calc = 'IPOL' ('PROG' 50. 250. 500.) evt2 ; 'LIST' t_calc ;
  315. t_calc_ref = 'PROG' 63.032 103.80 116.46 ;
  316. ert_calc = 'MAXI' (t_calc '-' t_calc_ref 'ABS') ;
  317. 'MESS' ' ERT_calc =' ert_calc ;
  318. 'SI' (ERP '>' 0.2D5) ; err1 = err1 '+' 1 ; 'FINS' ;
  319. 'SI' (ERT '>' 10.) ; err1 = err1 '+' 1 ; 'FINS' ;
  320. 'SI' (ert_calc '>' 0.01) ; err1 = err1 '+' 1 ; 'FINS' ;
  321. 'SI' ('NEG' ERR1 0) ;
  322. 'ERRE' 5 ;
  323. 'FINS' ;
  324. 'FINS' ;
  325. *
  326. 'FIN' ;
  327.  
  328.  
  329.  

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