Télécharger injair.dgibi

Retour à la liste

Numérotation des lignes :

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

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