- Timestamp:
- Jun 29, 2006, 5:28:01 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mso/eml/stage_separators/column.mso
r1 r6 21 21 using "condenser"; 22 22 using "mixers_splitters/splitter"; 23 using "mixers_splitters/mixer"; 23 24 using "tank"; 24 25 using "pressure_changers/pump"; … … 34 35 ext NComp as Integer; 35 36 NTrays as Integer(Brief="Number of trays", Default=2); 36 37 VARIABLES 38 trays(NTrays) as tray; 39 40 EQUATIONS 41 "Pressure Drop through the tray" 42 trays([1:NTrays]).OutletV.F = (1 + tanh(1 * (trays([1:NTrays]).OutletV.P - trays([1:NTrays]).InletL.P)))/2 * 43 trays([1:NTrays]).Ah/trays([1:NTrays]).vV * sqrt(2*(trays([1:NTrays]).OutletV.P - 44 trays([1:NTrays]).InletL.P + 1e-8 * "atm") / (trays([1:NTrays]).alfa*trays([1:NTrays]).rhoV)); 45 46 CONNECTIONS 47 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 48 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 37 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 38 top as Integer(Brief="Number of top tray"); 39 bot as Integer(Brief="Number of bottom tray"); 40 41 SET 42 top = (NTrays-1)*(1-topdown)/2+1; 43 bot = NTrays/top; 44 45 VARIABLES 46 trays(NTrays) as tray; 47 48 EQUATIONS 49 "Pressure Drop through the tray" 50 trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * 51 (trays([top:topdown:bot]).OutletV.P - 52 trays([top:topdown:bot]).InletL.P)))/2 * 53 trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * 54 sqrt(2*(trays([top:topdown:bot]).OutletV.P - 55 trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") / 56 (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV)); 57 58 CONNECTIONS 59 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 60 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 49 61 end 50 62 … … 63 75 ext NComp as Integer; 64 76 NTrays as Integer(Brief="Number of trays", Default=2); 77 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 78 top as Integer(Brief="Number of top tray"); 79 bot as Integer(Brief="Number of bottom tray"); 80 81 SET 82 top = (NTrays-1)*(1-topdown)/2+1; 83 bot = NTrays/top; 65 84 66 85 VARIABLES … … 68 87 cond as condenser; 69 88 reb as reboiler; 70 sp as splitter;89 sptop as splitter; 71 90 pump1 as pump; 72 91 73 92 EQUATIONS 74 93 if (reb.OutletV.P > reb.InletL.P) then 75 "Pressure Drop through the tray"76 reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)77 / ( 1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.394 "Pressure Drop through the reboiler" 95 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) 96 / (trays(bot).beta*reb.rhoV) ); 78 97 else 79 " Prato selado"98 "No flow in reboiler" 80 99 reb.OutletV.F = 0.0 * "mol/s"; 81 100 end 82 101 83 102 "Pressure Drop through the tray" 84 trays( 1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - cond.OutletL.P)))/2 *85 trays( 1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -86 cond.OutletL.P + 1e-8 * "atm") / (trays( 1).alfa*trays(1).rhoV));103 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * 104 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 105 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 87 106 88 trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 * 89 trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P - 90 trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV)); 91 92 CONNECTIONS 93 #vapor 94 reb.OutletV to trays([NTrays]).InletV; 95 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 96 trays(1).OutletV to cond.InletV; 97 98 #liquid 99 cond.OutletL to sp.Inlet; 100 sp.Outlet2 to pump1.Inlet; 101 pump1.Outlet to trays(1).InletL; 102 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 103 trays(NTrays).OutletL to reb.InletL; 107 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 108 (trays([top+topdown:topdown:bot]).OutletV.P - 109 trays([top+topdown:topdown:bot]).InletL.P)))/2 * 110 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 111 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 112 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 113 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 114 115 CONNECTIONS 116 #vapor 117 reb.OutletV to trays(bot).InletV; 118 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 119 trays(top).OutletV to cond.InletV; 120 121 #liquid 122 cond.OutletL to sptop.Inlet; 123 sptop.Outlet2 to pump1.Inlet; 124 pump1.Outlet to trays(top).InletL; 125 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 126 trays(bot).OutletL to reb.InletL; 104 127 end 105 128 … … 123 146 ext NComp as Integer; 124 147 NTrays as Integer(Brief="Number of trays", Default=2); 148 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 149 top as Integer(Brief="Number of top tray"); 150 bot as Integer(Brief="Number of bottom tray"); 151 152 SET 153 top = (NTrays-1)*(1-topdown)/2+1; 154 bot = NTrays/top; 125 155 126 156 VARIABLES … … 136 166 EQUATIONS 137 167 if (reb.OutletV.P > reb.InletL.P) then 138 "Pressure Drop through the tray"139 reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)140 / ( 1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3168 "Pressure Drop through the reboiler" 169 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) 170 / (trays(bot).beta*reb.rhoV) ); 141 171 else 142 " Prato selado"172 "No flow in reboiler" 143 173 reb.OutletV.F = 0.0 * "mol/s"; 144 174 end 145 175 146 176 "Pressure Drop through the tray" 147 trays( 1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - ttop.Outlet.P)))/2 *148 trays( 1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -149 ttop.Outlet.P + 1e-8 * "atm") / (trays( 1).alfa*trays(1).rhoV));177 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * 178 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 179 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 150 180 151 trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 * 152 trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P - 153 trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV)); 154 155 CONNECTIONS 156 #vapor 157 reb.OutletV to trays(NTrays).InletV; 158 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 159 trays(1).OutletV to cond.InletV; 160 161 #liquid 162 cond.OutletL to ttop.Inlet; 163 ttop.Outlet to sptop.Inlet; 164 sptop.Outlet2 to pump1.Inlet; 165 pump1.Outlet to trays(1).InletL; 166 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 167 trays(NTrays).OutletL to tbottom.Inlet; 181 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 182 (trays([top+topdown:topdown:bot]).OutletV.P - 183 trays([top+topdown:topdown:bot]).InletL.P)))/2 * 184 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 185 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 186 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 187 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 188 189 CONNECTIONS 190 #vapor 191 reb.OutletV to trays(bot).InletV; 192 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 193 trays(top).OutletV to cond.InletV; 194 195 #liquid 196 cond.OutletL to ttop.Inlet; 197 ttop.Outlet to sptop.Inlet; 198 sptop.Outlet2 to pump1.Inlet; 199 pump1.Outlet to trays(top).InletL; 200 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 201 trays(bot).OutletL to tbottom.Inlet; 168 202 tbottom.Outlet to spbottom.Inlet; 169 203 spbottom.Outlet2 to reb.InletL; … … 188 222 ext NComp as Integer; 189 223 NTrays as Integer(Brief="Number of trays", Default=2); 224 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 225 top as Integer(Brief="Number of top tray"); 226 bot as Integer(Brief="Number of bottom tray"); 227 228 SET 229 top = (NTrays-1)*(1-topdown)/2+1; 230 bot = NTrays/top; 190 231 191 232 VARIABLES … … 200 241 EQUATIONS 201 242 if (reb.OutletV.P > reb.InletL.P) then 202 "Pressure Drop through the tray"203 reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)204 / ( 1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3243 "Pressure Drop through the reboiler" 244 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) 245 / (trays(bot).beta*reb.rhoV) ); 205 246 else 206 " Prato selado"247 "No flow in reboiler" 207 248 reb.OutletV.F = 0.0 * "mol/s"; 208 249 end 209 250 210 251 "Pressure Drop through the tray" 211 trays( 1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - cond.OutletL.P)))/2 *212 trays( 1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -213 cond.OutletL.P + 1e-8 * "atm") / (trays( 1).alfa*trays(1).rhoV));252 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * 253 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 254 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 214 255 215 trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 * 216 trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P - 217 trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV)); 256 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 257 (trays([top+topdown:topdown:bot]).OutletV.P - 258 trays([top+topdown:topdown:bot]).InletL.P)))/2 * 259 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 260 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 261 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 262 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 218 263 219 264 CONNECTIONS 220 265 #vapor 221 reb.OutletV to trays( NTrays).InletV;222 trays([ 2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;223 trays( 1).OutletV to cond.InletV;266 reb.OutletV to trays(bot).InletV; 267 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 268 trays(top).OutletV to cond.InletV; 224 269 225 270 #liquid 226 271 cond.OutletL to sptop.Inlet; 227 272 sptop.Outlet2 to pump1.Inlet; 228 pump1.Outlet to trays(1).InletL; 229 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 230 trays(NTrays).OutletL to tbottom.Inlet; 273 pump1.Outlet to trays(top).InletL; 274 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 275 trays(bot).OutletL to tbottom.Inlet; 276 tbottom.Outlet to spbottom.Inlet; 277 spbottom.Outlet2 to reb.InletL; 278 end 279 280 281 #* ------------------------------------------------------------------- 282 * Distillation Column model with: 283 * 284 * - NTrays like tray; 285 * - a vessel in the bottom of column; 286 * - a splitter who separate the bottom product and the stream to reboiler; 287 * - steady state reboiler (thermosyphon) with partial vaporization; 288 * - a dynamic condenser without subcooling; 289 * - a splitter which separate reflux and distillate; 290 * - a pump in reflux stream. 291 * 292 * ------------------------------------------------------------------*# 293 Model Distillation_thermosyphon_partial_cond 294 PARAMETERS 295 ext PP as CalcObject; 296 ext NComp as Integer; 297 NTrays as Integer(Brief="Number of trays", Default=2); 298 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 299 top as Integer(Brief="Number of top tray"); 300 bot as Integer(Brief="Number of bottom tray"); 301 302 SET 303 top = (NTrays-1)*(1-topdown)/2+1; 304 bot = NTrays/top; 305 306 VARIABLES 307 trays(NTrays) as tray; 308 cond as condenser; 309 reb as reboilerSteady_partial; 310 mix as mixer_phase; 311 tbottom as tank; 312 spbottom as splitter; 313 sptop as splitter; 314 pump1 as pump; 315 316 SET 317 mix.Npres = 1; 318 319 EQUATIONS 320 321 if (reb.OutletV.P > reb.InletL.P) then 322 "Pressure Drop through the reboiler" 323 reb.InletL.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) 324 / (trays(bot).beta*reb.rho) ); 325 else 326 "No flow in reboiler" 327 reb.InletL.F = 0.0 * "mol/s"; 328 end 329 330 if trays(1).vV > 0 then 331 "Pressure Drop through the tray" 332 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * 333 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 334 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 335 else 336 "Pressure Drop through the tray" 337 trays(top).OutletV.F = 0; 338 end 339 340 for i in [top+topdown:topdown:bot] 341 if trays(i).vV > 0 then 342 trays(i).OutletV.F = (1 + tanh(1 * (trays(i).OutletV.P - trays(i).InletL.P)))/2 * 343 trays(i).Ah/trays(i).vV * sqrt(2*(trays(i).OutletV.P - 344 trays(i).InletL.P + 1e-8 * "atm") / (trays(i).alfa*trays(i).rhoV)); 345 else 346 trays(i).OutletV.F = 0; 347 end 348 end 349 350 CONNECTIONS 351 #vapor 352 reb.OutletV to trays(bot).InletV; 353 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 354 trays(top).OutletV to cond.InletV; 355 356 #liquid 357 cond.OutletL to sptop.Inlet; 358 sptop.Outlet2 to pump1.Inlet; 359 pump1.Outlet to trays(top).InletL; 360 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 361 # trays(bot).OutletL to tbottom.Inlet; 362 trays(bot).OutletL to mix.Inlet_mixer(1); 363 reb.OutletL to mix.Inlet_mixer(2); 364 mix.Outlet to tbottom.Inlet; 231 365 tbottom.Outlet to spbottom.Inlet; 232 366 spbottom.Outlet2 to reb.InletL; … … 250 384 ext NComp as Integer; 251 385 NTrays as Integer(Brief="Number of trays", Default=2); 386 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 387 top as Integer(Brief="Number of top tray"); 388 bot as Integer(Brief="Number of bottom tray"); 389 390 SET 391 top = (NTrays-1)*(1-topdown)/2+1; 392 bot = NTrays/top; 252 393 253 394 VARIABLES … … 261 402 EQUATIONS 262 403 if (reb.OutletV.P > reb.InletL.P) then 263 "Pressure Drop through the tray"264 reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)265 / ( 1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3404 "Pressure Drop through the reboiler" 405 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) 406 / (trays(bot).beta*reb.rhoV) ); 266 407 else 267 " Prato selado"408 "No flow in reboiler" 268 409 reb.OutletV.F = 0.0 * "mol/s"; 269 410 end 270 411 271 412 "Pressure Drop through the tray" 272 trays( 1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - ttop.Outlet.P)))/2 *273 trays( 1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -274 ttop.Outlet.P + 1e-8 * "atm") / (trays( 1).alfa*trays(1).rhoV));413 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * 414 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 415 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 275 416 276 trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 * 277 trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P - 278 trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV)); 279 280 CONNECTIONS 281 #vapor 282 reb.OutletV to trays(NTrays).InletV; 283 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 284 trays(1).OutletV to cond.InletV; 285 286 #liquid 287 cond.OutletL to ttop.Inlet; 288 ttop.Outlet to sptop.Inlet; 289 sptop.Outlet2 to pump1.Inlet; 290 pump1.Outlet to trays(1).InletL; 291 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 292 trays(NTrays).OutletL to reb.InletL; 417 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 418 (trays([top+topdown:topdown:bot]).OutletV.P - 419 trays([top+topdown:topdown:bot]).InletL.P)))/2 * 420 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 421 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 422 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 423 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 424 425 CONNECTIONS 426 #vapor 427 reb.OutletV to trays(bot).InletV; 428 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 429 trays(top).OutletV to cond.InletV; 430 431 #liquid 432 cond.OutletL to ttop.Inlet; 433 ttop.Outlet to sptop.Inlet; 434 sptop.Outlet2 to pump1.Inlet; 435 pump1.Outlet to trays(top).InletL; 436 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 437 trays(bot).OutletL to reb.InletL; 293 438 end 294 439 … … 306 451 ext NComp as Integer; 307 452 NTrays as Integer(Brief="Number of trays", Default=2); 453 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 454 top as Integer(Brief="Number of top tray"); 455 bot as Integer(Brief="Number of bottom tray"); 456 457 SET 458 top = (NTrays-1)*(1-topdown)/2+1; 459 bot = NTrays/top; 308 460 309 461 VARIABLES 310 462 trays(NTrays) as tray; 311 463 cond as condenser; 312 sp as splitter;464 sptop as splitter; 313 465 pump1 as pump; 314 466 315 467 EQUATIONS 316 468 "Pressure Drop through the tray" 317 trays( 1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - cond.OutletL.P)))/2 *318 trays( 1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -319 cond.OutletL.P + 1e-8 * "atm") / (trays( 1).alfa*trays(1).rhoV));469 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * 470 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 471 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 320 472 321 trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 * 322 trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P - 323 trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV)); 324 325 CONNECTIONS 326 #vapor 327 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 328 trays(1).OutletV to cond.InletV; 329 330 #liquid 331 cond.OutletL to sp.Inlet; 332 sp.Outlet2 to pump1.Inlet; 333 pump1.Outlet to trays(1).InletL; 334 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 473 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 474 (trays([top+topdown:topdown:bot]).OutletV.P - 475 trays([top+topdown:topdown:bot]).InletL.P)))/2 * 476 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 477 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 478 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 479 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 480 481 CONNECTIONS 482 #vapor 483 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 484 trays(top).OutletV to cond.InletV; 485 486 #liquid 487 cond.OutletL to sptop.Inlet; 488 sptop.Outlet2 to pump1.Inlet; 489 pump1.Outlet to trays(top).InletL; 490 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 335 491 end 336 492 … … 351 507 ext NComp as Integer; 352 508 NTrays as Integer(Brief="Number of trays", Default=2); 509 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 510 top as Integer(Brief="Number of top tray"); 511 bot as Integer(Brief="Number of bottom tray"); 512 513 SET 514 top = (NTrays-1)*(1-topdown)/2+1; 515 bot = NTrays/top; 353 516 354 517 VARIABLES … … 361 524 EQUATIONS 362 525 "Pressure Drop through the tray" 363 trays( 1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - ttop.Outlet.P)))/2 *364 trays( 1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -365 ttop.Outlet.P + 1e-8 * "atm") / (trays( 1).alfa*trays(1).rhoV));526 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * 527 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 528 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 366 529 367 trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 * 368 trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P - 369 trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV)); 370 371 CONNECTIONS 372 #vapor 373 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 374 trays(1).OutletV to cond.InletV; 375 376 #liquid 377 cond.OutletL to ttop.Inlet; 378 ttop.Outlet to sptop.Inlet; 379 sptop.Outlet2 to pump1.Inlet; 380 pump1.Outlet to trays(1).InletL; 381 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 530 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 531 (trays([top+topdown:topdown:bot]).OutletV.P - 532 trays([top+topdown:topdown:bot]).InletL.P)))/2 * 533 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 534 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 535 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 536 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 537 538 CONNECTIONS 539 #vapor 540 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 541 trays(top).OutletV to cond.InletV; 542 543 #liquid 544 cond.OutletL to ttop.Inlet; 545 ttop.Outlet to sptop.Inlet; 546 sptop.Outlet2 to pump1.Inlet; 547 pump1.Outlet to trays(top).InletL; 548 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 382 549 end 383 550 … … 395 562 ext NComp as Integer; 396 563 NTrays as Integer(Brief="Number of trays", Default=2); 564 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 565 top as Integer(Brief="Number of top tray"); 566 bot as Integer(Brief="Number of bottom tray"); 567 568 SET 569 top = (NTrays-1)*(1-topdown)/2+1; 570 bot = NTrays/top; 397 571 398 572 VARIABLES 399 573 trays(NTrays) as tray; 400 574 cond as condenser; 401 sp as splitter;575 sptop as splitter; 402 576 pump1 as pump; 403 577 404 578 EQUATIONS 405 579 "Pressure Drop through the tray" 406 trays( 1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - cond.OutletL.P)))/2 *407 trays( 1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -408 cond.OutletL.P + 1e-8 * "atm") / (trays( 1).alfa*trays(1).rhoV));580 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * 581 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 582 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 409 583 410 trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 * 411 trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P - 412 trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV)); 413 414 CONNECTIONS 415 #vapor 416 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 417 trays(1).OutletV to cond.InletV; 418 419 #liquid 420 cond.OutletL to sp.Inlet; 421 sp.Outlet2 to pump1.Inlet; 422 pump1.Outlet to trays(1).InletL; 423 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 584 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 585 (trays([top+topdown:topdown:bot]).OutletV.P - 586 trays([top+topdown:topdown:bot]).InletL.P)))/2 * 587 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 588 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 589 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 590 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 591 592 CONNECTIONS 593 #vapor 594 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 595 trays(top).OutletV to cond.InletV; 596 597 #liquid 598 cond.OutletL to sptop.Inlet; 599 sptop.Outlet2 to pump1.Inlet; 600 pump1.Outlet to trays(top).InletL; 601 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 424 602 end 425 603 … … 440 618 ext NComp as Integer; 441 619 NTrays as Integer(Brief="Number of trays", Default=2); 620 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 621 top as Integer(Brief="Number of top tray"); 622 bot as Integer(Brief="Number of bottom tray"); 623 624 SET 625 top = (NTrays-1)*(1-topdown)/2+1; 626 bot = NTrays/top; 442 627 443 628 VARIABLES … … 450 635 EQUATIONS 451 636 "Pressure Drop through the tray" 452 trays( 1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - ttop.Outlet.P)))/2 *453 trays( 1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -454 ttop.Outlet.P + 1e-8 * "atm") / (trays( 1).alfa*trays(1).rhoV));637 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * 638 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 639 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 455 640 456 trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 * 457 trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P - 458 trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV)); 459 460 CONNECTIONS 461 #vapor 462 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 463 trays(1).OutletV to cond.InletV; 464 465 #liquid 466 cond.OutletL to ttop.Inlet; 467 ttop.Outlet to sptop.Inlet; 468 sptop.Outlet2 to pump1.Inlet; 469 pump1.Outlet to trays(1).InletL; 470 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 641 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 642 (trays([top+topdown:topdown:bot]).OutletV.P - 643 trays([top+topdown:topdown:bot]).InletL.P)))/2 * 644 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 645 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 646 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 647 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 648 649 CONNECTIONS 650 #vapor 651 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 652 trays(top).OutletV to cond.InletV; 653 654 #liquid 655 cond.OutletL to ttop.Inlet; 656 ttop.Outlet to sptop.Inlet; 657 sptop.Outlet2 to pump1.Inlet; 658 pump1.Outlet to trays(top).InletL; 659 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 471 660 end 472 661 … … 484 673 ext NComp as Integer; 485 674 NTrays as Integer(Brief="Number of trays", Default=2); 675 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 676 top as Integer(Brief="Number of top tray"); 677 bot as Integer(Brief="Number of bottom tray"); 678 679 SET 680 top = (NTrays-1)*(1-topdown)/2+1; 681 bot = NTrays/top; 486 682 487 683 VARIABLES 488 684 trays(NTrays) as tray; 489 685 cond as condenser; 490 sp as splitter;686 sptop as splitter; 491 687 pump1 as pump; 492 688 493 689 EQUATIONS 494 690 "Pressure Drop through the tray" 495 trays( 1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - cond.OutletL.P)))/2 *496 trays( 1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -497 cond.OutletL.P + 1e-8 * "atm") / (trays( 1).alfa*trays(1).rhoV));691 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * 692 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 693 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 498 694 499 trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 * 500 trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P - 501 trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV)); 502 503 CONNECTIONS 504 #vapor 505 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 506 trays(1).OutletV to cond.InletV; 507 508 #liquid 509 cond.OutletL to sp.Inlet; 510 sp.Outlet2 to pump1.Inlet; 511 pump1.Outlet to trays(1).InletL; 512 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 695 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 696 (trays([top+topdown:topdown:bot]).OutletV.P - 697 trays([top+topdown:topdown:bot]).InletL.P)))/2 * 698 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 699 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 700 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 701 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 702 703 CONNECTIONS 704 #vapor 705 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 706 trays(top).OutletV to cond.InletV; 707 708 #liquid 709 cond.OutletL to cond.InletV; 710 cond.OutletL to sptop.Inlet; 711 sptop.Outlet2 to pump1.Inlet; 712 pump1.Outlet to trays(top).InletL; 713 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 513 714 end 514 715 … … 529 730 ext NComp as Integer; 530 731 NTrays as Integer(Brief="Number of trays", Default=2); 732 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 733 top as Integer(Brief="Number of top tray"); 734 bot as Integer(Brief="Number of bottom tray"); 735 736 SET 737 top = (NTrays-1)*(1-topdown)/2+1; 738 bot = NTrays/top; 531 739 532 740 VARIABLES … … 539 747 EQUATIONS 540 748 "Pressure Drop through the tray" 541 trays( 1).OutletV.F = (1 + tanh(1 * (trays(1).OutletV.P - ttop.Outlet.P)))/2 *542 trays( 1).Ah/trays(1).vV * sqrt(2*(trays(1).OutletV.P -543 ttop.Outlet.P + 1e-8 * "atm") / (trays( 1).alfa*trays(1).rhoV));749 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * 750 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 751 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 544 752 545 trays([2:NTrays]).OutletV.F = (1 + tanh(1 * (trays([2:NTrays]).OutletV.P - trays([2:NTrays]).InletL.P)))/2 * 546 trays([2:NTrays]).Ah/trays([2:NTrays]).vV * sqrt(2*(trays([2:NTrays]).OutletV.P - 547 trays([2:NTrays]).InletL.P + 1e-8 * "atm") / (trays([2:NTrays]).alfa*trays([2:NTrays]).rhoV)); 548 549 CONNECTIONS 550 #vapor 551 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 552 trays(1).OutletV to cond.InletV; 553 554 #liquid 555 cond.OutletL to ttop.Inlet; 556 ttop.Outlet to sptop.Inlet; 557 sptop.Outlet2 to pump1.Inlet; 558 pump1.Outlet to trays(1).InletL; 559 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 753 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 754 (trays([top+topdown:topdown:bot]).OutletV.P - 755 trays([top+topdown:topdown:bot]).InletL.P)))/2 * 756 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 757 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 758 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 759 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 760 761 CONNECTIONS 762 #vapor 763 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 764 trays(top).OutletV to cond.InletV; 765 766 #liquid 767 cond.OutletL to ttop.Inlet; 768 ttop.Outlet to sptop.Inlet; 769 sptop.Outlet2 to pump1.Inlet; 770 pump1.Outlet to trays(top).InletL; 771 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 560 772 end 561 773 … … 573 785 ext NComp as Integer; 574 786 NTrays as Integer(Brief="Number of trays", Default=2); 787 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 788 top as Integer(Brief="Number of top tray"); 789 bot as Integer(Brief="Number of bottom tray"); 790 791 SET 792 top = (NTrays-1)*(1-topdown)/2+1; 793 bot = NTrays/top; 575 794 576 795 VARIABLES … … 581 800 if (reb.OutletV.P > reb.InletL.P) then 582 801 "Pressure Drop through the tray" 583 reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)584 / ( 1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3802 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) 803 / (trays(bot).beta*reb.rhoV) ); 585 804 else 586 805 "Prato selado" … … 589 808 590 809 "Pressure Drop through the tray" 591 trays([1:NTrays]).OutletV.F = (1 + tanh(1 * (trays([1:NTrays]).OutletV.P - trays([1:NTrays]).InletL.P)))/2 * 592 trays([1:NTrays]).Ah/trays([1:NTrays]).vV * sqrt(2*(trays([1:NTrays]).OutletV.P - 593 trays([1:NTrays]).InletL.P + 1e-8 * "atm") / (trays([1:NTrays]).alfa*trays([1:NTrays]).rhoV)); 594 595 CONNECTIONS 596 #vapor 597 reb.OutletV to trays(NTrays).InletV; 598 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 599 600 #liquid 601 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 602 trays(NTrays).OutletL to reb.InletL; 810 trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * 811 (trays([top:topdown:bot]).OutletV.P - 812 trays([top:topdown:bot]).InletL.P)))/2 * 813 trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * 814 sqrt(2*(trays([top:topdown:bot]).OutletV.P - 815 trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") / 816 (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV)); 817 818 CONNECTIONS 819 #vapor 820 reb.OutletV to trays(bot).InletV; 821 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 822 823 #liquid 824 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 825 trays(bot).OutletL to reb.InletL; 603 826 end 604 827 … … 618 841 ext NComp as Integer; 619 842 NTrays as Integer(Brief="Number of trays", Default=2); 843 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 844 top as Integer(Brief="Number of top tray"); 845 bot as Integer(Brief="Number of bottom tray"); 846 847 SET 848 top = (NTrays-1)*(1-topdown)/2+1; 849 bot = NTrays/top; 620 850 621 851 VARIABLES … … 628 858 if (reb.OutletV.P > reb.InletL.P) then 629 859 "Pressure Drop through the tray" 630 reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)631 / ( 1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3860 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) 861 / (trays(bot).beta*reb.rhoV) ); 632 862 else 633 863 "Prato selado" … … 636 866 637 867 "Pressure Drop through the tray" 638 trays([1:NTrays]).OutletV.F = (1 + tanh(1 * (trays([1:NTrays]).OutletV.P - trays([1:NTrays]).InletL.P)))/2 * 639 trays([1:NTrays]).Ah/trays([1:NTrays]).vV * sqrt(2*(trays([1:NTrays]).OutletV.P - 640 trays([1:NTrays]).InletL.P + 1e-8 * "atm") / (trays([1:NTrays]).alfa*trays([1:NTrays]).rhoV)); 641 642 CONNECTIONS 643 #vapor 644 reb.OutletV to trays(NTrays).InletV; 645 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 646 647 #liquid 648 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 649 trays(NTrays).OutletL to tbottom.Inlet; 868 trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * 869 (trays([top:topdown:bot]).OutletV.P - 870 trays([top:topdown:bot]).InletL.P)))/2 * 871 trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * 872 sqrt(2*(trays([top:topdown:bot]).OutletV.P - 873 trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") / 874 (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV)); 875 876 CONNECTIONS 877 #vapor 878 reb.OutletV to trays(bot).InletV; 879 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 880 881 #liquid 882 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 883 trays(bot).OutletL to tbottom.Inlet; 650 884 tbottom.Outlet to spbottom.Inlet; 651 885 spbottom.Outlet2 to reb.InletL; … … 665 899 ext NComp as Integer; 666 900 NTrays as Integer(Brief="Number of trays", Default=2); 901 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 902 top as Integer(Brief="Number of top tray"); 903 bot as Integer(Brief="Number of bottom tray"); 904 905 SET 906 top = (NTrays-1)*(1-topdown)/2+1; 907 bot = NTrays/top; 667 908 668 909 VARIABLES … … 673 914 if (reb.OutletV.P > reb.InletL.P) then 674 915 "Pressure Drop through the tray" 675 reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)676 / ( 1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3916 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) 917 / (trays(bot).beta*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3 677 918 else 678 919 "Prato selado" … … 681 922 682 923 "Pressure Drop through the tray" 683 trays([1:NTrays]).OutletV.F = (1 + tanh(1 * (trays([1:NTrays]).OutletV.P - trays([1:NTrays]).InletL.P)))/2 * 684 trays([1:NTrays]).Ah/trays([1:NTrays]).vV * sqrt(2*(trays([1:NTrays]).OutletV.P - 685 trays([1:NTrays]).InletL.P + 1e-8 * "atm") / (trays([1:NTrays]).alfa*trays([1:NTrays]).rhoV)); 686 687 CONNECTIONS 688 #vapor 689 reb.OutletV to trays(NTrays).InletV; 690 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 691 692 #liquid 693 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 694 trays(NTrays).OutletL to reb.InletL; 924 trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * 925 (trays([top:topdown:bot]).OutletV.P - 926 trays([top:topdown:bot]).InletL.P)))/2 * 927 trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * 928 sqrt(2*(trays([top:topdown:bot]).OutletV.P - 929 trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") / 930 (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV)); 931 932 CONNECTIONS 933 #vapor 934 reb.OutletV to trays(bot).InletV; 935 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 936 937 #liquid 938 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 939 trays(bot).OutletL to reb.InletL; 695 940 end 696 941 … … 710 955 ext NComp as Integer; 711 956 NTrays as Integer(Brief="Number of trays", Default=2); 957 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 958 top as Integer(Brief="Number of top tray"); 959 bot as Integer(Brief="Number of bottom tray"); 960 961 SET 962 top = (NTrays-1)*(1-topdown)/2+1; 963 bot = NTrays/top; 712 964 713 965 VARIABLES … … 720 972 if (reb.OutletV.P > reb.InletL.P) then 721 973 "Pressure Drop through the tray" 722 reb.OutletV.F = 34803 * "mm^2"/reb.vV * sqrt((reb.OutletV.P - trays(NTrays).OutletL.P)723 / ( 1.3*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3974 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P) 975 / (trays(bot).beta*reb.rhoV) ); # para o modelo com 25 pratos, o beta do refervedor é 0.8. Para a coluna com 80, o beta é:1.3 724 976 else 725 977 "Prato selado" … … 728 980 729 981 "Pressure Drop through the tray" 730 trays([1:NTrays]).OutletV.F = (1 + tanh(1 * (trays([1:NTrays]).OutletV.P - trays([1:NTrays]).InletL.P)))/2 * 731 trays([1:NTrays]).Ah/trays([1:NTrays]).vV * sqrt(2*(trays([1:NTrays]).OutletV.P - 732 trays([1:NTrays]).InletL.P + 1e-8 * "atm") / (trays([1:NTrays]).alfa*trays([1:NTrays]).rhoV)); 733 734 CONNECTIONS 735 #vapor 736 reb.OutletV to trays(NTrays).InletV; 737 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 738 739 #liquid 740 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 741 trays(NTrays).OutletL to tbottom.Inlet; 982 trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * 983 (trays([top:topdown:bot]).OutletV.P - 984 trays([top:topdown:bot]).InletL.P)))/2 * 985 trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * 986 sqrt(2*(trays([top:topdown:bot]).OutletV.P - 987 trays([top:topdown:bot]).InletL.P + 1e-8 * "atm") / 988 (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV)); 989 990 CONNECTIONS 991 #vapor 992 reb.OutletV to trays(bot).InletV; 993 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 994 995 #liquid 996 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 997 trays(bot).OutletL to tbottom.Inlet; 742 998 tbottom.Outlet to spbottom.Inlet; 743 999 spbottom.Outlet2 to reb.InletL;
Note: See TracChangeset
for help on using the changeset viewer.