Changes in mso/eml/stage_separators/column.mso [6:46]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mso/eml/stage_separators/column.mso
r6 r46 50 50 trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * 51 51 (trays([top:topdown:bot]).OutletV.P - 52 trays([top:topdown:bot]).InletL.P) ))/2 *52 trays([top:topdown:bot]).InletL.P)/"Pa"))/2 * 53 53 trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * 54 54 sqrt(2*(trays([top:topdown:bot]).OutletV.P - … … 101 101 102 102 "Pressure Drop through the tray" 103 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P) ))/2 *103 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/"Pa"))/2 * 104 104 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 105 105 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); … … 107 107 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 108 108 (trays([top+topdown:topdown:bot]).OutletV.P - 109 trays([top+topdown:topdown:bot]).InletL.P) ))/2 *109 trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 * 110 110 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 111 111 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - … … 160 160 tbottom as tank; 161 161 ttop as tank_cylindrical; 162 spbottom as splitter; 163 sptop as splitter; 164 pump1 as pump; 165 166 EQUATIONS 167 "Pressure Drop through the tray" 168 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/"Pa"))/2 * 169 trays(top).Ah/trays(top).vV /2* sqrt(2*(trays(top).OutletV.P - 170 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 171 172 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 173 (trays([top+topdown:topdown:bot]).OutletV.P - 174 trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 * 175 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV /2* 176 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 177 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 178 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 179 180 CONNECTIONS 181 #vapor 182 reb.OutletV to trays(bot).InletV; 183 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 184 trays(top).OutletV to cond.InletV; 185 186 #liquid 187 cond.OutletL to ttop.Inlet; 188 ttop.Outlet to sptop.Inlet; 189 sptop.Outlet2 to pump1.Inlet; 190 pump1.Outlet to trays(top).InletL; 191 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 192 trays(bot).OutletL to tbottom.Inlet; 193 tbottom.Outlet to spbottom.Inlet; 194 spbottom.Outlet2 to reb.InletL; 195 end 196 197 198 #* ------------------------------------------------------------------- 199 * Distillation Column model with: 200 * 201 * - NTrays like tray; 202 * - a vessel in the bottom of column; 203 * - a splitter who separate the bottom product and the stream to reboiler; 204 * - steady state reboiler (thermosyphon); 205 * - a dynamic condenser without subcooling; 206 * - a splitter which separate reflux and distillate; 207 * - a pump in reflux stream. 208 * 209 * ------------------------------------------------------------------*# 210 Model Distillation_thermosyphon_cond 211 PARAMETERS 212 ext PP as CalcObject; 213 ext NComp as Integer; 214 NTrays as Integer(Brief="Number of trays", Default=2); 215 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 216 top as Integer(Brief="Number of top tray"); 217 bot as Integer(Brief="Number of bottom tray"); 218 219 SET 220 top = (NTrays-1)*(1-topdown)/2+1; 221 bot = NTrays/top; 222 223 VARIABLES 224 trays(NTrays) as tray; 225 cond as condenser; 226 reb as reboilerSteady; 227 tbottom as tank; 162 228 spbottom as splitter; 163 229 sptop as splitter; … … 175 241 176 242 "Pressure Drop through the tray" 177 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 *243 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/"Pa"))/2 * 178 244 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));245 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 180 246 181 247 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 182 248 (trays([top+topdown:topdown:bot]).OutletV.P - 183 trays([top+topdown:topdown:bot]).InletL.P) ))/2 *249 trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 * 184 250 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 185 251 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 186 252 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 187 253 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 188 254 189 255 CONNECTIONS 190 256 #vapor … … 194 260 195 261 #liquid 196 cond.OutletL to ttop.Inlet; 197 ttop.Outlet to sptop.Inlet; 198 sptop.Outlet2 to pump1.Inlet; 262 cond.OutletL to sptop.Inlet; 263 sptop.Outlet2 to pump1.Inlet; 199 264 pump1.Outlet to trays(top).InletL; 200 265 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; … … 204 269 end 205 270 206 207 271 #* ------------------------------------------------------------------- 208 272 * Distillation Column model with: 209 273 * 210 274 * - NTrays like tray; 211 * - a vessel in the bottom of column; 212 * - a splitter who separate the bottom product and the stream to reboiler; 213 * - steady state reboiler (thermosyphon); 214 * - a dynamic condenser without subcooling; 275 * - a kettle reboiler; 276 * - a steady state condenser with subcooling; 277 * - a vessel drum (layed cilinder); 215 278 * - a splitter which separate reflux and distillate; 216 279 * - a pump in reflux stream. 217 280 * 218 281 * ------------------------------------------------------------------*# 219 Model Distillation_thermosyphon_cond 220 PARAMETERS 221 ext PP as CalcObject; 222 ext NComp as Integer; 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; 231 232 VARIABLES 233 trays(NTrays) as tray; 234 cond as condenser; 235 reb as reboilerSteady; 236 tbottom as tank; 237 spbottom as splitter; 282 Model Distillation_kettle_subcooling 283 PARAMETERS 284 ext PP as CalcObject; 285 ext NComp as Integer; 286 NTrays as Integer(Brief="Number of trays", Default=2); 287 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 288 top as Integer(Brief="Number of top tray"); 289 bot as Integer(Brief="Number of bottom tray"); 290 291 SET 292 top = (NTrays-1)*(1-topdown)/2+1; 293 bot = NTrays/top; 294 295 VARIABLES 296 trays(NTrays) as tray; 297 cond as condenserSteady; 298 reb as reboiler; 299 ttop as tank_cylindrical; 238 300 sptop as splitter; 239 301 pump1 as pump; … … 250 312 251 313 "Pressure Drop through the tray" 252 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)))/2 * 314 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/"Pa"))/2 * 315 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 316 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); 317 318 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 319 (trays([top+topdown:topdown:bot]).OutletV.P - 320 trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 * 321 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 322 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 323 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 324 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 325 326 CONNECTIONS 327 #vapor 328 reb.OutletV to trays(bot).InletV; 329 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 330 trays(top).OutletV to cond.InletV; 331 332 #liquid 333 cond.OutletL to ttop.Inlet; 334 ttop.Outlet to sptop.Inlet; 335 sptop.Outlet2 to pump1.Inlet; 336 pump1.Outlet to trays(top).InletL; 337 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 338 trays(bot).OutletL to reb.InletL; 339 end 340 341 342 #*---------------------------------------------------------------------- 343 * Model of a rectifier containing: 344 * - NTrays like tray; 345 * - dymamic condenser without subcooling; 346 * - a splitter which separate reflux and distillate; 347 * - a pump in reflux stream; 348 *---------------------------------------------------------------------*# 349 Model Rectifier 350 PARAMETERS 351 ext PP as CalcObject; 352 ext NComp as Integer; 353 NTrays as Integer(Brief="Number of trays", Default=2); 354 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 355 top as Integer(Brief="Number of top tray"); 356 bot as Integer(Brief="Number of bottom tray"); 357 358 SET 359 top = (NTrays-1)*(1-topdown)/2+1; 360 bot = NTrays/top; 361 362 VARIABLES 363 trays(NTrays) as tray; 364 cond as condenser; 365 sptop as splitter; 366 pump1 as pump; 367 368 EQUATIONS 369 "Pressure Drop through the tray" 370 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/"Pa"))/2 * 253 371 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 254 372 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); … … 256 374 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 257 375 (trays([top+topdown:topdown:bot]).OutletV.P - 258 trays([top+topdown:topdown:bot]).InletL.P) ))/2 *376 trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 * 259 377 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 260 378 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - 261 379 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * "atm") / 262 380 (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV)); 263 264 CONNECTIONS 265 #vapor 266 reb.OutletV to trays(bot).InletV; 381 382 CONNECTIONS 383 #vapor 267 384 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 268 385 trays(top).OutletV to cond.InletV; … … 270 387 #liquid 271 388 cond.OutletL to sptop.Inlet; 272 sptop.Outlet2 to pump1.Inlet; 389 sptop.Outlet2 to pump1.Inlet; 273 390 pump1.Outlet to trays(top).InletL; 274 391 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 392 end 279 393 280 394 281 395 #* ------------------------------------------------------------------- 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; 365 tbottom.Outlet to spbottom.Inlet; 366 spbottom.Outlet2 to reb.InletL; 367 end 368 369 370 #* ------------------------------------------------------------------- 371 * Distillation Column model with: 372 * 373 * - NTrays like tray; 374 * - a kettle reboiler; 396 * Rectifier Column with: 397 * 398 * - NTrays like tray; 375 399 * - a steady state condenser with subcooling; 376 400 * - a vessel drum (layed cilinder); … … 379 403 * 380 404 * ------------------------------------------------------------------*# 381 Model Distillation_kettle_subcooling405 Model Rectifier_subcooling 382 406 PARAMETERS 383 407 ext PP as CalcObject; … … 395 419 trays(NTrays) as tray; 396 420 cond as condenserSteady; 397 reb as reboiler;398 421 ttop as tank_cylindrical; 399 422 sptop as splitter; … … 401 424 402 425 EQUATIONS 403 if (reb.OutletV.P > reb.InletL.P) then 404 "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) ); 407 else 408 "No flow in reboiler" 409 reb.OutletV.F = 0.0 * "mol/s"; 410 end 411 412 "Pressure Drop through the tray" 413 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)))/2 * 426 "Pressure Drop through the tray" 427 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/"Pa"))/2 * 414 428 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 415 429 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); … … 417 431 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 418 432 (trays([top+topdown:topdown:bot]).OutletV.P - 419 trays([top+topdown:topdown:bot]).InletL.P) ))/2 *433 trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 * 420 434 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 421 435 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - … … 425 439 CONNECTIONS 426 440 #vapor 427 reb.OutletV to trays(bot).InletV;428 441 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 429 442 trays(top).OutletV to cond.InletV; … … 435 448 pump1.Outlet to trays(top).InletL; 436 449 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 437 trays(bot).OutletL to reb.InletL;438 450 end 439 451 440 452 441 453 #*---------------------------------------------------------------------- 442 * Model of a rectifiercontaining:454 * Model of a Refluxed Stripping column containing: 443 455 * - NTrays like tray; 444 456 * - dymamic condenser without subcooling; … … 446 458 * - a pump in reflux stream; 447 459 *---------------------------------------------------------------------*# 448 Model Re ctifier460 Model Refluxed_Stripping 449 461 PARAMETERS 450 462 ext PP as CalcObject; … … 467 479 EQUATIONS 468 480 "Pressure Drop through the tray" 469 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P) ))/2 *481 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/"Pa"))/2 * 470 482 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 471 483 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); … … 473 485 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 474 486 (trays([top+topdown:topdown:bot]).OutletV.P - 475 trays([top+topdown:topdown:bot]).InletL.P) ))/2 *487 trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 * 476 488 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 477 489 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - … … 493 505 494 506 #* ------------------------------------------------------------------- 495 * Re ctifierColumn with:496 * 497 * - NTrays like tray; 498 * - a steady state condenser with subcooling;507 * Refluxed Stripping Column with: 508 * 509 * - NTrays like tray; 510 * - a steady state condenser (with subcooling); 499 511 * - a vessel drum (layed cilinder); 500 512 * - a splitter which separate reflux and distillate; … … 502 514 * 503 515 * ------------------------------------------------------------------*# 504 Model Re ctifier_subcooling516 Model Refluxed_Stripping_subcooling 505 517 PARAMETERS 506 518 ext PP as CalcObject; … … 524 536 EQUATIONS 525 537 "Pressure Drop through the tray" 526 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P) ))/2 *538 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/"Pa"))/2 * 527 539 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 528 540 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); … … 530 542 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 531 543 (trays([top+topdown:topdown:bot]).OutletV.P - 532 trays([top+topdown:topdown:bot]).InletL.P) ))/2 *544 trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 * 533 545 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 534 546 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - … … 551 563 552 564 #*---------------------------------------------------------------------- 553 * Model of a Refluxed Strippingcolumn containing:565 * Model of a Refluxed Absorption column containing: 554 566 * - NTrays like tray; 555 567 * - dymamic condenser without subcooling; … … 557 569 * - a pump in reflux stream; 558 570 *---------------------------------------------------------------------*# 559 Model Refluxed_ Stripping571 Model Refluxed_Absorption 560 572 PARAMETERS 561 573 ext PP as CalcObject; … … 578 590 EQUATIONS 579 591 "Pressure Drop through the tray" 580 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P) ))/2 *592 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/"Pa"))/2 * 581 593 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 582 594 cond.OutletL.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); … … 584 596 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 585 597 (trays([top+topdown:topdown:bot]).OutletV.P - 586 trays([top+topdown:topdown:bot]).InletL.P) ))/2 *598 trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 * 587 599 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 588 600 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - … … 596 608 597 609 #liquid 598 cond.OutletL to sptop.Inlet; 610 cond.OutletL to cond.InletV; 611 cond.OutletL to sptop.Inlet; 599 612 sptop.Outlet2 to pump1.Inlet; 600 613 pump1.Outlet to trays(top).InletL; … … 604 617 605 618 #* ------------------------------------------------------------------- 606 * Refluxed StrippingColumn with:619 * Refluxed Absorption Column with: 607 620 * 608 621 * - NTrays like tray; … … 613 626 * 614 627 * ------------------------------------------------------------------*# 615 Model Refluxed_ Stripping_subcooling628 Model Refluxed_Absorption_subcooling 616 629 PARAMETERS 617 630 ext PP as CalcObject; … … 635 648 EQUATIONS 636 649 "Pressure Drop through the tray" 637 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P) ))/2 *650 trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/"Pa"))/2 * 638 651 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P - 639 652 ttop.Outlet.P + 1e-8 * "atm") / (trays(top).alfa*trays(top).rhoV)); … … 641 654 trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 * 642 655 (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; 660 end 661 662 663 #*---------------------------------------------------------------------- 664 * Model of a Refluxed Absorption column containing: 665 * - NTrays like tray; 666 * - dymamic condenser without subcooling; 667 * - a splitter which separate reflux and distillate; 668 * - a pump in reflux stream; 669 *---------------------------------------------------------------------*# 670 Model Refluxed_Absorption 671 PARAMETERS 672 ext PP as CalcObject; 673 ext NComp as Integer; 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; 682 683 VARIABLES 684 trays(NTrays) as tray; 685 cond as condenser; 686 sptop as splitter; 687 pump1 as pump; 688 689 EQUATIONS 690 "Pressure Drop through the tray" 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)); 694 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; 714 end 715 716 717 #* ------------------------------------------------------------------- 718 * Refluxed Absorption Column with: 719 * 720 * - NTrays like tray; 721 * - a steady state condenser (with subcooling); 722 * - a vessel drum (layed cilinder); 723 * - a splitter which separate reflux and distillate; 724 * - a pump in reflux stream. 725 * 726 * ------------------------------------------------------------------*# 727 Model Refluxed_Absorption_subcooling 728 PARAMETERS 729 ext PP as CalcObject; 730 ext NComp as Integer; 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; 739 740 VARIABLES 741 trays(NTrays) as tray; 742 cond as condenserSteady; 743 ttop as tank_cylindrical; 744 sptop as splitter; 745 pump1 as pump; 746 747 EQUATIONS 748 "Pressure Drop through the tray" 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)); 752 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 * 656 trays([top+topdown:topdown:bot]).InletL.P)/"Pa"))/2 * 756 657 trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV * 757 658 sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P - … … 810 711 trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * 811 712 (trays([top:topdown:bot]).OutletV.P - 812 trays([top:topdown:bot]).InletL.P) ))/2 *713 trays([top:topdown:bot]).InletL.P)/"Pa"))/2 * 813 714 trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * 814 715 sqrt(2*(trays([top:topdown:bot]).OutletV.P - … … 868 769 trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * 869 770 (trays([top:topdown:bot]).OutletV.P - 870 trays([top:topdown:bot]).InletL.P) ))/2 *771 trays([top:topdown:bot]).InletL.P)/"Pa"))/2 * 871 772 trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * 872 773 sqrt(2*(trays([top:topdown:bot]).OutletV.P - … … 915 816 "Pressure Drop through the tray" 916 817 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.3818 / (trays(bot).beta*reb.rhoV) ); 918 819 else 919 820 "Prato selado" … … 924 825 trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * 925 826 (trays([top:topdown:bot]).OutletV.P - 926 trays([top:topdown:bot]).InletL.P) ))/2 *827 trays([top:topdown:bot]).InletL.P)/"Pa"))/2 * 927 828 trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * 928 829 sqrt(2*(trays([top:topdown:bot]).OutletV.P - … … 973 874 "Pressure Drop through the tray" 974 875 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.3876 / (trays(bot).beta*reb.rhoV) ); 976 877 else 977 878 "Prato selado" … … 982 883 trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 * 983 884 (trays([top:topdown:bot]).OutletV.P - 984 trays([top:topdown:bot]).InletL.P) ))/2 *885 trays([top:topdown:bot]).InletL.P)/"Pa"))/2 * 985 886 trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV * 986 887 sqrt(2*(trays([top:topdown:bot]).OutletV.P - … … 999 900 spbottom.Outlet2 to reb.InletL; 1000 901 end 902 903 # Reactive Distillation!! 904 Model ReactiveDistillation 905 PARAMETERS 906 ext PP as CalcObject; 907 ext NComp as Integer; 908 NTrays as Integer(Brief="Number of trays", Default=2); 909 910 VARIABLES 911 trays(NTrays) as trayReact; 912 cond as condenserReact; 913 reb as reboilerReact; 914 sp as splitter; 915 p as pump; 916 917 EQUATIONS 918 if ( reb.OutletV.P > 1 * "atm" ) then 919 "Pressure Drop through the tray" 920 reb.OutletV.F = trays(1).Ah/reb.vV * sqrt((reb.OutletV.P - 1*"atm") / (0.15*reb.rhoV) ); 921 else 922 "Prato selado" 923 reb.OutletV.F = 0.0 * "mol/s"; 924 end 925 926 CONNECTIONS 927 #vapor 928 reb.OutletV to trays([NTrays]).InletV; 929 trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV; 930 trays(1).OutletV to cond.InletV; 931 932 #liquid 933 cond.OutletL to sp.Inlet; 934 sp.Outlet2 to p.Inlet; 935 p.Outlet to trays(1).InletL; 936 trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL; 937 trays(NTrays).OutletL to reb.InletL; 938 end
Note: See TracChangeset
for help on using the changeset viewer.