Changeset 735 for branches/gui/eml/stage_separators/column.mso
- Timestamp:
- Feb 26, 2009, 11:00:39 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/column.mso
r729 r735 168 168 # Connecting Intermediate Trays 169 169 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 170 TRAYS([2:NumberOfTrays]).OutletV to TRAYS([1:NumberOfTrays-1]).InletV;171 TRAYS([1:NumberOfTrays-1]).OutletL to TRAYS([2:NumberOfTrays]).InletL;170 TRAYS([2:NumberOfTrays]).OutletVapour to TRAYS([1:NumberOfTrays-1]).InletVapour; 171 TRAYS([1:NumberOfTrays-1]).OutletLiquid to TRAYS([2:NumberOfTrays]).InletLiquid; 172 172 173 173 INITIAL … … 178 178 179 179 "The initial temperature of the TRAYS" 180 TRAYS(i).OutletL .T = INITIALIZATION.TopTemperature+(INITIALIZATION.BottomTemperature-INITIALIZATION.TopTemperature)*((i-1)/(NumberOfTrays-1));180 TRAYS(i).OutletLiquid.T = INITIALIZATION.TopTemperature+(INITIALIZATION.BottomTemperature-INITIALIZATION.TopTemperature)*((i-1)/(NumberOfTrays-1)); 181 181 182 182 "The initial Level of the TRAYS" … … 189 189 190 190 "The initial composition of the TRAYS - Normalized" 191 TRAYS(j).OutletL .z(i) = INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) +(INITIALIZATION.BottomComposition(i)/sum(INITIALIZATION.BottomComposition)-INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) )*((j-1)/(NumberOfTrays-1));191 TRAYS(j).OutletLiquid.z(i) = INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) +(INITIALIZATION.BottomComposition(i)/sum(INITIALIZATION.BottomComposition)-INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) )*((j-1)/(NumberOfTrays-1)); 192 192 end 193 193 … … 223 223 224 224 "Murphree Efficiency" 225 TRAYS(i).OutletV .z = MurphreeEff * (TRAYS(i).yideal - TRAYS(i).InletV.z) + TRAYS(i).InletV.z;225 TRAYS(i).OutletVapour.z = MurphreeEff * (TRAYS(i).yideal - TRAYS(i).InletVapour.z) + TRAYS(i).InletVapour.z; 226 226 227 227 "Level of clear liquid over the weir" … … 232 232 233 233 "Energy Holdup" 234 TRAYS(i).E = TRAYS(i).ML*TRAYS(i).OutletL .h + TRAYS(i).MV*TRAYS(i).OutletV.h - TRAYS(i).OutletL.P*V;234 TRAYS(i).E = TRAYS(i).ML*TRAYS(i).OutletLiquid.h + TRAYS(i).MV*TRAYS(i).OutletVapour.h - TRAYS(i).OutletLiquid.P*V; 235 235 236 236 "Energy Balance" 237 diff(TRAYS(i).E) = ( TRAYS(i).Inlet.F*TRAYS(i).Inlet.h + TRAYS(i).InletL .F*TRAYS(i).InletL.h + TRAYS(i).InletV.F*TRAYS(i).InletV.h- TRAYS(i).OutletL.F*TRAYS(i).OutletL.h - TRAYS(i).OutletV.F*TRAYS(i).OutletV.h237 diff(TRAYS(i).E) = ( TRAYS(i).Inlet.F*TRAYS(i).Inlet.h + TRAYS(i).InletLiquid.F*TRAYS(i).InletLiquid.h + TRAYS(i).InletVapour.F*TRAYS(i).InletVapour.h- TRAYS(i).OutletLiquid.F*TRAYS(i).OutletLiquid.h - TRAYS(i).OutletVapour.F*TRAYS(i).OutletVapour.h 238 238 -TRAYS(i).VapourSideStream.F*TRAYS(i).VapourSideStream.h - TRAYS(i).LiquidSideStream.F*TRAYS(i).LiquidSideStream.h + Q ); 239 239 … … 243 243 case "default": 244 244 "Francis Equation" 245 TRAYS(i).OutletL .F*TRAYS(i).vL = 1.84*'1/s'*lw*((TRAYS(i).Level-(beta*hw))/(beta))^2;245 TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'1/s'*lw*((TRAYS(i).Level-(beta*hw))/(beta))^2; 246 246 247 247 case "Wang_Fl": 248 TRAYS(i).OutletL .F*TRAYS(i).vL = 1.84*'m^0.5/s'*lw*((TRAYS(i).Level-(beta*hw))/(beta))^1.5;248 TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'m^0.5/s'*lw*((TRAYS(i).Level-(beta*hw))/(beta))^1.5; 249 249 250 250 case "Olsen": 251 TRAYS(i).OutletL .F / 'mol/s'= lw*Np*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletV.z)/(0.665*fw)^1.5 * ((TRAYS(i).ML*sum(Mw*TRAYS(i).OutletL.z)/TRAYS(i).rhoL/Ap)-hw)^1.5 * 'm^0.5/mol';251 TRAYS(i).OutletLiquid.F / 'mol/s'= lw*Np*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletVapour.z)/(0.665*fw)^1.5 * ((TRAYS(i).ML*sum(Mw*TRAYS(i).OutletLiquid.z)/TRAYS(i).rhoL/Ap)-hw)^1.5 * 'm^0.5/mol'; 252 252 253 253 case "Feehery_Fl": 254 TRAYS(i).OutletL .F = lw*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletL.z) * ((TRAYS(i).Level-hw)/750/'mm')^1.5 * 'm^2/s';254 TRAYS(i).OutletLiquid.F = lw*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletLiquid.z) * ((TRAYS(i).Level-hw)/750/'mm')^1.5 * 'm^2/s'; 255 255 256 256 case "Roffel_Fl": 257 TRAYS(i).OutletL .F = 2/3*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletL.z)*lw*(TRAYS(i).ML*sum(Mw*TRAYS(i).OutletL.z)/(Ap*1.3)/TRAYS(i).rhoL)^1.5*sqrt(2*g/258 (2*(1 - 0.3593/'Pa^0.0888545'*abs(TRAYS(i).OutletV .F*sum(Mw*TRAYS(i).OutletV.z)/(Ap*1.3)/sqrt(TRAYS(i).rhoV))^0.177709)-1)); #/'(kg/m)^0.0888545/s^0.177709';257 TRAYS(i).OutletLiquid.F = 2/3*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletLiquid.z)*lw*(TRAYS(i).ML*sum(Mw*TRAYS(i).OutletLiquid.z)/(Ap*1.3)/TRAYS(i).rhoL)^1.5*sqrt(2*g/ 258 (2*(1 - 0.3593/'Pa^0.0888545'*abs(TRAYS(i).OutletVapour.F*sum(Mw*TRAYS(i).OutletVapour.z)/(Ap*1.3)/sqrt(TRAYS(i).rhoV))^0.177709)-1)); #/'(kg/m)^0.0888545/s^0.177709'; 259 259 end 260 260 when TRAYS(i).Level < (beta *hw) switchto "off"; … … 262 262 case "off": 263 263 "Low level" 264 TRAYS(i).OutletL .F = 0 * 'mol/h';264 TRAYS(i).OutletLiquid.F = 0 * 'mol/h'; 265 265 when TRAYS(i).Level > (beta * hw) + 1e-6*'m' switchto "on"; 266 266 end … … 270 270 switch VapourFlowModel 271 271 case "Reepmeyer": 272 TRAYS(i).InletV .F*TRAYS(i).vV = sqrt((TRAYS(i).InletV.P - TRAYS(i).OutletV.P)/(TRAYS(i).rhoV*alfa))*Ah;272 TRAYS(i).InletVapour.F*TRAYS(i).vV = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)/(TRAYS(i).rhoV*alfa))*Ah; 273 273 274 274 case "Feehery_Fv": 275 TRAYS(i).InletV .F = TRAYS(i).rhoV/Ap/w/sum(Mw*TRAYS(i).OutletV.z) * sqrt(((TRAYS(i).InletV.P - TRAYS(i).OutletV.P)-(TRAYS(i).rhoV*g*TRAYS(i).ML*TRAYS(i).vL/Ap))/TRAYS(i).rhoV);275 TRAYS(i).InletVapour.F = TRAYS(i).rhoV/Ap/w/sum(Mw*TRAYS(i).OutletVapour.z) * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-(TRAYS(i).rhoV*g*TRAYS(i).ML*TRAYS(i).vL/Ap))/TRAYS(i).rhoV); 276 276 277 277 case "Roffel_Fv": 278 TRAYS(i).InletV .F^1.08 * 0.0013 * 'kg/m/mol^1.08/s^0.92*1e5' = (TRAYS(i).InletV.P - TRAYS(i).OutletV.P)*1e5 - (beta*sum(TRAYS(i).M*Mw)/(Ap*1.3)*g*1e5) * (TRAYS(i).rhoV*Ah/sum(Mw*TRAYS(i).OutletV.z))^1.08 * 'm^1.08/mol^1.08';278 TRAYS(i).InletVapour.F^1.08 * 0.0013 * 'kg/m/mol^1.08/s^0.92*1e5' = (TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)*1e5 - (beta*sum(TRAYS(i).M*Mw)/(Ap*1.3)*g*1e5) * (TRAYS(i).rhoV*Ah/sum(Mw*TRAYS(i).OutletVapour.z))^1.08 * 'm^1.08/mol^1.08'; 279 279 280 280 case "Klingberg": 281 TRAYS(i).InletV .F * TRAYS(i).vV = Ap * sqrt(((TRAYS(i).InletV.P - TRAYS(i).OutletV.P)-TRAYS(i).rhoL*g*TRAYS(i).Level)/TRAYS(i).rhoV);281 TRAYS(i).InletVapour.F * TRAYS(i).vV = Ap * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-TRAYS(i).rhoL*g*TRAYS(i).Level)/TRAYS(i).rhoV); 282 282 283 283 case "Wang_Fv": 284 TRAYS(i).InletV .F * TRAYS(i).vV = Ap * sqrt(((TRAYS(i).InletV.P - TRAYS(i).OutletV.P)-TRAYS(i).rhoL*g*TRAYS(i).Level)/TRAYS(i).rhoV*alfa);284 TRAYS(i).InletVapour.F * TRAYS(i).vV = Ap * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-TRAYS(i).rhoL*g*TRAYS(i).Level)/TRAYS(i).rhoV*alfa); 285 285 286 286 case "Elgue": 287 TRAYS(i).InletV .F = sqrt((TRAYS(i).InletV.P - TRAYS(i).OutletV.P)/btray);287 TRAYS(i).InletVapour.F = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)/btray); 288 288 end 289 when TRAYS(i).InletV .F < 1e-6 * 'kmol/h' switchto "off";289 when TRAYS(i).InletVapour.F < 1e-6 * 'kmol/h' switchto "off"; 290 290 291 291 case "off": 292 TRAYS(i).InletV .F = 0 * 'mol/s';293 when TRAYS(i).InletV .P > TRAYS(i).OutletV.P + TRAYS(i).Level*g*TRAYS(i).rhoL + 1e-1 * 'atm' switchto "on";292 TRAYS(i).InletVapour.F = 0 * 'mol/s'; 293 when TRAYS(i).InletVapour.P > TRAYS(i).OutletVapour.P + TRAYS(i).Level*g*TRAYS(i).rhoL + 1e-1 * 'atm' switchto "on"; 294 294 end 295 295 … … 311 311 * the feed stream of each tray (Inlet); 312 312 * the Murphree eficiency for each tray Emv; 313 * the InletL stream of the top tray;314 * the InletV stream of the bottom tray.313 * the InletLiquid stream of the top tray; 314 * the InletVapour stream of the bottom tray. 315 315 316 316 == Initial Conditions == 317 * the TRAYS temperature (OutletL .T);318 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL .F);319 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray.317 * the TRAYS temperature (OutletLiquid.T); 318 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F); 319 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray. 320 320 "; 321 321 … … 338 338 CONNECTIONS 339 339 340 LiquidConnector to TRAYS(1).InletL ;341 VapourConnector to TRAYS(NumberOfTrays).InletV ;340 LiquidConnector to TRAYS(1).InletLiquid; 341 VapourConnector to TRAYS(NumberOfTrays).InletVapour; 342 342 343 343 EQUATIONS … … 386 386 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 387 387 "Liquid Outlet Flow" 388 LiquidOutlet.F = TRAYS(NumberOfTrays).OutletL .F;388 LiquidOutlet.F = TRAYS(NumberOfTrays).OutletLiquid.F; 389 389 390 390 "Liquid Outlet Temperature" 391 LiquidOutlet.T = TRAYS(NumberOfTrays).OutletL .T;391 LiquidOutlet.T = TRAYS(NumberOfTrays).OutletLiquid.T; 392 392 393 393 "Liquid Outlet Pressure" 394 LiquidOutlet.P = TRAYS(NumberOfTrays).OutletL .P;394 LiquidOutlet.P = TRAYS(NumberOfTrays).OutletLiquid.P; 395 395 396 396 "Liquid Outlet Composition" 397 LiquidOutlet.z = TRAYS(NumberOfTrays).OutletL .z;397 LiquidOutlet.z = TRAYS(NumberOfTrays).OutletLiquid.z; 398 398 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 399 399 # Equating Outlet Vapour Variables 400 400 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 401 401 "Vapour Outlet Flow" 402 VapourOutlet.F = TRAYS(1).OutletV .F;402 VapourOutlet.F = TRAYS(1).OutletVapour.F; 403 403 404 404 "Vapour Outlet Temperature" 405 VapourOutlet.T = TRAYS(1).OutletV .T;405 VapourOutlet.T = TRAYS(1).OutletVapour.T; 406 406 407 407 "Vapour Outlet Pressure" 408 VapourOutlet.P = TRAYS(1).OutletV .P;408 VapourOutlet.P = TRAYS(1).OutletVapour.P; 409 409 410 410 "Vapour Outlet Composition" 411 VapourOutlet.z = TRAYS(1).OutletV .z;411 VapourOutlet.z = TRAYS(1).OutletVapour.z; 412 412 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 413 413 # Equating Outlet Vapour Side Stream Variables … … 459 459 * the pump pressure difference; 460 460 * the heat supllied in reboiler and condenser; 461 * the condenser vapor outlet flow (OutletV .F);462 * the reboiler liquid outlet flow (OutletL .F);461 * the condenser vapor outlet flow (OutletVapour.F); 462 * the reboiler liquid outlet flow (OutletLiquid.F); 463 463 * both splitter outlet flows OR one of the splitter outlet flows and the splitter frac. 464 464 465 465 == Initial Conditions == 466 * the TRAYS temperature (OutletL .T);467 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL .F);468 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;469 470 * the condenser temperature (OutletL .T);466 * the TRAYS temperature (OutletLiquid.T); 467 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F); 468 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray; 469 470 * the condenser temperature (OutletLiquid.T); 471 471 * the condenser liquid level (Level); 472 * (NoComps - 1) OutletL (OR OutletV) compositions;473 474 * the reboiler temperature (OutletL .T);472 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions; 473 474 * the reboiler temperature (OutletLiquid.T); 475 475 * the reboiler liquid level (Level); 476 * (NoComps - 1) OutletL (OR OutletV) compositions.476 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. 477 477 "; 478 478 … … 516 516 517 517 case "on": 518 CONDENSER.InletV .F*TRAYS(1).vV = alfaTopo *Ah * sqrt(2*(TRAYS(1).OutletV.P -519 CONDENSER.OutletL .P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));520 when CONDENSER.InletV .F < 1e-6 * 'kmol/h' switchto "off";518 CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo *Ah * sqrt(2*(TRAYS(1).OutletVapour.P - 519 CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV)); 520 when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off"; 521 521 522 522 case "off": 523 CONDENSER.InletV .F = 0 * 'mol/s';524 when TRAYS(1).OutletV .P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";523 CONDENSER.InletVapour.F = 0 * 'mol/s'; 524 when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on"; 525 525 526 526 end … … 562 562 CONNECTIONS 563 563 #vapor 564 REBOILER.OutletV to TRAYS(NumberOfTrays).InletV;565 TRAYS(1).OutletV to CONDENSER.InletV;564 REBOILER.OutletVapour to TRAYS(NumberOfTrays).InletVapour; 565 TRAYS(1).OutletVapour to CONDENSER.InletVapour; 566 566 567 567 #liquid 568 CONDENSER.OutletL to SPLITTER.Inlet;568 CONDENSER.OutletLiquid to SPLITTER.Inlet; 569 569 SPLITTER.Outlet2 to PUMP.Inlet; 570 PUMP.Outlet to TRAYS(1).InletL ;571 TRAYS(NumberOfTrays).OutletL to REBOILER.InletL;570 PUMP.Outlet to TRAYS(1).InletLiquid; 571 TRAYS(NumberOfTrays).OutletLiquid to REBOILER.InletLiquid; 572 572 573 573 #Connectors 574 CONDENSER.OutletV to ConnectorCondenserVout;574 CONDENSER.OutletVapour to ConnectorCondenserVout; 575 575 SPLITTER.Outlet1 to ConnectorSplitterOut; 576 REBOILER.OutletL to ConnectorReboilerLout;576 REBOILER.OutletLiquid to ConnectorReboilerLout; 577 577 578 578 ConnectorHeatReboiler to REBOILER.InletQ; … … 598 598 599 599 == Initial Conditions == 600 * the TRAYS temperature (OutletL .T);601 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL .F);602 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;603 604 * the top tank temperature (OutletL .T);600 * the TRAYS temperature (OutletLiquid.T); 601 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F); 602 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray; 603 604 * the top tank temperature (OutletLiquid.T); 605 605 * the top tank liquid level (Level); 606 * (NoComps - 1) OutletL (OR OutletV) compositions;607 608 * the bottom tank temperature (OutletL .T);606 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions; 607 608 * the bottom tank temperature (OutletLiquid.T); 609 609 * the bottom tank liquid level (Level); 610 * (NoComps - 1) OutletL (OR OutletV) compositions.610 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. 611 611 "; 612 612 … … 690 690 691 691 case "on": 692 CONDENSER.InletV .F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletV.P -693 CONDENSER.OutletL .P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));694 when CONDENSER.InletV .F < 1e-6 * 'kmol/h' switchto "off";692 CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletVapour.P - 693 CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV)); 694 when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off"; 695 695 696 696 case "off": 697 CONDENSER.InletV .F = 0 * 'mol/s';698 when TRAYS(1).OutletV .P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";697 CONDENSER.InletVapour.F = 0 * 'mol/s'; 698 when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on"; 699 699 700 700 end … … 702 702 CONNECTIONS 703 703 #vapor 704 REBOILER.OutletV to TRAYS(NumberOfTrays).InletV;705 TRAYS(1).OutletV to CONDENSER.InletV;704 REBOILER.OutletVapour to TRAYS(NumberOfTrays).InletVapour; 705 TRAYS(1).OutletVapour to CONDENSER.InletVapour; 706 706 707 707 #liquid 708 CONDENSER.OutletL to ACCUMULATOR_TOP.Inlet;708 CONDENSER.OutletLiquid to ACCUMULATOR_TOP.Inlet; 709 709 ACCUMULATOR_TOP.Outlet to SPLITTER_TOP.Inlet; 710 710 SPLITTER_TOP.Outlet2 to PUMP.Inlet; 711 PUMP.Outlet to TRAYS(1).InletL ;712 TRAYS(NumberOfTrays).OutletL to ACCUMULATOR_BOTTOM.Inlet;711 PUMP.Outlet to TRAYS(1).InletLiquid; 712 TRAYS(NumberOfTrays).OutletLiquid to ACCUMULATOR_BOTTOM.Inlet; 713 713 ACCUMULATOR_BOTTOM.Outlet to SPLITTER_BOTTOM.Inlet; 714 SPLITTER_BOTTOM.Outlet2 to REBOILER.InletL ;714 SPLITTER_BOTTOM.Outlet2 to REBOILER.InletLiquid; 715 715 716 716 #Connectors … … 734 734 * the Murphree eficiency for each tray Emv; 735 735 * the pump head; 736 * the condenser vapor outlet flow (OutletV .F);736 * the condenser vapor outlet flow (OutletVapour.F); 737 737 * the heat supllied in bottom tank; 738 738 * the heat supllied in condenser and reboiler; … … 740 740 741 741 == Initial Conditions == 742 * the TRAYS temperature (OutletL .T);743 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL .F);744 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;745 746 * the condenser temperature (OutletL .T);742 * the TRAYS temperature (OutletLiquid.T); 743 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F); 744 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray; 745 746 * the condenser temperature (OutletLiquid.T); 747 747 * the condenser liquid level (Level); 748 * (NoComps - 1) OutletL (OR OutletV) compositions;749 750 * the bottom tank temperature (OutletL .T);748 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions; 749 750 * the bottom tank temperature (OutletLiquid.T); 751 751 * the bottom tank liquid level (Level); 752 * (NoComps - 1) OutletL (OR OutletV) compositions.752 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. 753 753 "; 754 754 … … 834 834 switch CondenserVapourFlow 835 835 case "on": 836 CONDENSER.InletV .F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletV.P -837 CONDENSER.OutletL .P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));838 when CONDENSER.InletV .F < 1e-6 * 'kmol/h' switchto "off";836 CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletVapour.P - 837 CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV)); 838 when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off"; 839 839 840 840 case "off": 841 CONDENSER.InletV .F = 0 * 'mol/s';842 when TRAYS(1).OutletV .P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";841 CONDENSER.InletVapour.F = 0 * 'mol/s'; 842 when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on"; 843 843 end 844 844 845 845 CONNECTIONS 846 846 #vapor 847 REBOILER.OutletV to TRAYS(NumberOfTrays).InletV;848 TRAYS(1).OutletV to CONDENSER.InletV;847 REBOILER.OutletVapour to TRAYS(NumberOfTrays).InletVapour; 848 TRAYS(1).OutletVapour to CONDENSER.InletVapour; 849 849 850 850 #liquid 851 CONDENSER.OutletL to SPLITTER_TOP.Inlet;851 CONDENSER.OutletLiquid to SPLITTER_TOP.Inlet; 852 852 SPLITTER_TOP.Outlet2 to PUMP.Inlet; 853 PUMP.Outlet to TRAYS(1).InletL ;854 TRAYS(NumberOfTrays).OutletL to ACCUMULATOR_BOTTOM.Inlet;853 PUMP.Outlet to TRAYS(1).InletLiquid; 854 TRAYS(NumberOfTrays).OutletLiquid to ACCUMULATOR_BOTTOM.Inlet; 855 855 ACCUMULATOR_BOTTOM.Outlet to SPLITTER_BOTTOM.Inlet; 856 SPLITTER_BOTTOM.Outlet2 to REBOILER.InletL ;856 SPLITTER_BOTTOM.Outlet2 to REBOILER.InletLiquid; 857 857 858 858 #Connectors … … 860 860 ConnectorHeatReboiler to REBOILER.InletQ; 861 861 ConnectorHeatBottomAccumulator to ACCUMULATOR_BOTTOM.InletQ; 862 CONDENSER.OutletV to ConnectorCondenserVout;862 CONDENSER.OutletVapour to ConnectorCondenserVout; 863 863 SPLITTER_TOP.Outlet1 to ConnectorSplitterTop; 864 864 SPLITTER_BOTTOM.Outlet1 to ConnectorSplitterBottom; … … 880 880 * the heat supllied in the top tank; 881 881 * the condenser pressure drop; 882 * the reboiler liquid outlet flow (OutletL .F);882 * the reboiler liquid outlet flow (OutletLiquid.F); 883 883 * both splitter outlet flows OR one of the splitter outlet flows and the splitter frac. 884 884 885 885 == Initial Conditions == 886 * the TRAYS temperature (OutletL .T);887 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL .F);888 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;889 890 * the top tank temperature (OutletL .T);886 * the TRAYS temperature (OutletLiquid.T); 887 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F); 888 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray; 889 890 * the top tank temperature (OutletLiquid.T); 891 891 * the top tank liquid level (Level); 892 * (NoComps - 1) OutletL (OR OutletV) compositions;893 894 * the reboiler temperature (OutletL .T);892 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions; 893 894 * the reboiler temperature (OutletLiquid.T); 895 895 * the reboiler liquid level (Level); 896 * (NoComps - 1) OutletL (OR OutletV) compositions.896 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. 897 897 "; 898 898 … … 969 969 switch CondenserVapourFlow 970 970 case "on": 971 CONDENSER.InletV .F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletV.P -972 CONDENSER.OutletL .P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));973 when CONDENSER.InletV .F < 1e-6 * 'kmol/h' switchto "off";971 CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletVapour.P - 972 CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV)); 973 when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off"; 974 974 975 975 case "off": 976 CONDENSER.InletV .F = 0 * 'mol/s';977 when TRAYS(1).OutletV .P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";976 CONDENSER.InletVapour.F = 0 * 'mol/s'; 977 when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on"; 978 978 end 979 979 980 980 CONNECTIONS 981 981 #vapor 982 REBOILER.OutletV to TRAYS(NumberOfTrays).InletV;983 TRAYS(1).OutletV to CONDENSER.InletV;982 REBOILER.OutletVapour to TRAYS(NumberOfTrays).InletVapour; 983 TRAYS(1).OutletVapour to CONDENSER.InletVapour; 984 984 985 985 #liquid 986 CONDENSER.OutletL to ACCUMULATOR.Inlet;986 CONDENSER.OutletLiquid to ACCUMULATOR.Inlet; 987 987 ACCUMULATOR.Outlet to SPLITTER.Inlet; 988 988 SPLITTER.Outlet2 to PUMP.Inlet; 989 PUMP.Outlet to TRAYS(1).InletL ;990 TRAYS(NumberOfTrays).OutletL to REBOILER.InletL;989 PUMP.Outlet to TRAYS(1).InletLiquid; 990 TRAYS(NumberOfTrays).OutletLiquid to REBOILER.InletLiquid; 991 991 992 992 #Connectors … … 996 996 997 997 SPLITTER.Outlet1 to ConnectorSplitterOut; 998 REBOILER.OutletL to ConnectorReboilerLout;998 REBOILER.OutletLiquid to ConnectorReboilerLout; 999 999 1000 1000 end … … 1010 1010 * the feed stream of each tray (Inlet); 1011 1011 * the Murphree eficiency for each tray Emv; 1012 * the InletV stream of the bottom tray unless its flow;1012 * the InletVapour stream of the bottom tray unless its flow; 1013 1013 * the pump pressure difference; 1014 1014 * the heat supllied in the condenser; 1015 * the condenser vapor outlet flow (OutletV .F);1015 * the condenser vapor outlet flow (OutletVapour.F); 1016 1016 * both splitter outlet flows OR one of the splitter outlet flows and the splitter frac. 1017 1017 1018 1018 == Initial Conditions == 1019 * the TRAYS temperature (OutletL .T);1020 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL .F);1021 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;1022 1023 * the condenser temperature (OutletL .T);1019 * the TRAYS temperature (OutletLiquid.T); 1020 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F); 1021 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray; 1022 1023 * the condenser temperature (OutletLiquid.T); 1024 1024 * the condenser liquid level (Level); 1025 * (NoComps - 1) OutletL (OR OutletV) compositions;1025 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions; 1026 1026 "; 1027 1027 … … 1069 1069 1070 1070 case "on": 1071 CONDENSER.InletV .F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletV.P -1072 CONDENSER.OutletL .P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));1073 when CONDENSER.InletV .F < 1e-6 * 'kmol/h' switchto "off";1071 CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletVapour.P - 1072 CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV)); 1073 when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off"; 1074 1074 1075 1075 case "off": 1076 CONDENSER.InletV .F = 0 * 'mol/s';1077 when TRAYS(1).OutletV .P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";1076 CONDENSER.InletVapour.F = 0 * 'mol/s'; 1077 when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on"; 1078 1078 1079 1079 end … … 1093 1093 ConnectorSplitterOut.z = LiquidDistillate.z; 1094 1094 1095 LiquidOutlet.F= TRAYS(NumberOfTrays).OutletL .F;1096 LiquidOutlet.T = TRAYS(NumberOfTrays).OutletL .T;1097 LiquidOutlet.P = TRAYS(NumberOfTrays).OutletL .P;1098 LiquidOutlet.z = TRAYS(NumberOfTrays).OutletL .z;1095 LiquidOutlet.F= TRAYS(NumberOfTrays).OutletLiquid.F; 1096 LiquidOutlet.T = TRAYS(NumberOfTrays).OutletLiquid.T; 1097 LiquidOutlet.P = TRAYS(NumberOfTrays).OutletLiquid.P; 1098 LiquidOutlet.z = TRAYS(NumberOfTrays).OutletLiquid.z; 1099 1099 1100 1100 VapourConnector.F= VapourInlet.F; … … 1120 1120 CONNECTIONS 1121 1121 #vapor 1122 TRAYS(1).OutletV to CONDENSER.InletV;1122 TRAYS(1).OutletVapour to CONDENSER.InletVapour; 1123 1123 1124 1124 #liquid 1125 CONDENSER.OutletL to SPLITTER.Inlet;1125 CONDENSER.OutletLiquid to SPLITTER.Inlet; 1126 1126 SPLITTER.Outlet2 to PUMP.Inlet; 1127 PUMP.Outlet to TRAYS(1).InletL ;1127 PUMP.Outlet to TRAYS(1).InletLiquid; 1128 1128 1129 1129 #Connectors 1130 1130 ConnectorHeatCondenser to CONDENSER.InletQ; 1131 VapourConnector to TRAYS(NumberOfTrays).InletV ;1131 VapourConnector to TRAYS(NumberOfTrays).InletVapour; 1132 1132 SPLITTER.Outlet1 to ConnectorSplitterOut; 1133 CONDENSER.OutletV to ConnectorCondenserVout;1133 CONDENSER.OutletVapour to ConnectorCondenserVout; 1134 1134 1135 1135 end … … 1145 1145 * the feed stream of each tray (Inlet); 1146 1146 * the Murphree eficiency for each tray Emv; 1147 * the InletV stream of the bottom tray unless its flow;1147 * the InletVapour stream of the bottom tray unless its flow; 1148 1148 * the pump head; 1149 1149 * the condenser pressure drop; … … 1153 1153 1154 1154 == Initial Conditions == 1155 * the TRAYS temperature (OutletL .T);1156 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL .F);1157 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;1158 1159 * the top tank temperature (OutletL .T);1155 * the TRAYS temperature (OutletLiquid.T); 1156 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F); 1157 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray; 1158 1159 * the top tank temperature (OutletLiquid.T); 1160 1160 * the top tank liquid level (Level); 1161 * (NoComps - 1) OutletL (OR OutletV) compositions;1161 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions; 1162 1162 "; 1163 1163 … … 1206 1206 HeatToAccumulator = ConnectorHeatAccumulator; 1207 1207 1208 LiquidOutlet.F= TRAYS(NumberOfTrays).OutletL .F;1209 LiquidOutlet.T = TRAYS(NumberOfTrays).OutletL .T;1210 LiquidOutlet.P = TRAYS(NumberOfTrays).OutletL .P;1211 LiquidOutlet.z = TRAYS(NumberOfTrays).OutletL .z;1208 LiquidOutlet.F= TRAYS(NumberOfTrays).OutletLiquid.F; 1209 LiquidOutlet.T = TRAYS(NumberOfTrays).OutletLiquid.T; 1210 LiquidOutlet.P = TRAYS(NumberOfTrays).OutletLiquid.P; 1211 LiquidOutlet.z = TRAYS(NumberOfTrays).OutletLiquid.z; 1212 1212 1213 1213 VapourConnector.F= VapourInlet.F; … … 1240 1240 1241 1241 case "on": 1242 CONDENSER.InletV .F*TRAYS(1).vV = alfaTopo *Ah * sqrt(2*(TRAYS(1).OutletV.P -1243 CONDENSER.OutletL .P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));1244 when CONDENSER.InletV .F < 1e-6 * 'kmol/h' switchto "off";1242 CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo *Ah * sqrt(2*(TRAYS(1).OutletVapour.P - 1243 CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV)); 1244 when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off"; 1245 1245 1246 1246 case "off": 1247 CONDENSER.InletV .F = 0 * 'mol/s';1248 when TRAYS(1).OutletV .P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";1247 CONDENSER.InletVapour.F = 0 * 'mol/s'; 1248 when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on"; 1249 1249 1250 1250 end … … 1252 1252 CONNECTIONS 1253 1253 #vapor 1254 TRAYS(1).OutletV to CONDENSER.InletV;1254 TRAYS(1).OutletVapour to CONDENSER.InletVapour; 1255 1255 1256 1256 #liquid 1257 CONDENSER.OutletL to ACCUMULATOR.Inlet;1257 CONDENSER.OutletLiquid to ACCUMULATOR.Inlet; 1258 1258 ACCUMULATOR.Outlet to SPLITTER.Inlet; 1259 1259 SPLITTER.Outlet2 to PUMP.Inlet; 1260 PUMP.Outlet to TRAYS(1).InletL ;1260 PUMP.Outlet to TRAYS(1).InletLiquid; 1261 1261 1262 1262 #Connectors 1263 VapourConnector to TRAYS(NumberOfTrays).InletV ;1263 VapourConnector to TRAYS(NumberOfTrays).InletVapour; 1264 1264 ConnectorHeatCondenser to CONDENSER.InletQ; 1265 1265 SPLITTER.Outlet1 to ConnectorSplitterTop; … … 1279 1279 * the Murphree eficiency for each tray Emv; 1280 1280 * the vapour flow leaving the top of the column; 1281 * the InletL stream of the top tray;1281 * the InletLiquidiquid stream of the top tray; 1282 1282 * the heat supllied in the reboiler; 1283 * the reboiler liquid outlet flow (OutletL .F);1283 * the reboiler liquid outlet flow (OutletLiquid.F); 1284 1284 1285 1285 == Initial Conditions == 1286 * the TRAYS temperature (OutletL .T);1287 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL .F);1288 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;1289 1290 * the reboiler temperature (OutletL .T);1286 * the TRAYS temperature (OutletLiquid.T); 1287 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F); 1288 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray; 1289 1290 * the reboiler temperature (OutletLiquid.T); 1291 1291 * the reboiler liquid level (Level); 1292 * (NoComps - 1) OutletL (OR OutletV) compositions.1292 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. 1293 1293 "; 1294 1294 … … 1325 1325 CONNECTIONS 1326 1326 #vapor 1327 REBOILER.OutletV to TRAYS(NumberOfTrays).InletV;1327 REBOILER.OutletVapour to TRAYS(NumberOfTrays).InletVapour; 1328 1328 1329 1329 #liquid 1330 TRAYS(NumberOfTrays).OutletL to REBOILER.InletL;1330 TRAYS(NumberOfTrays).OutletLiquid to REBOILER.InletLiquid; 1331 1331 1332 1332 #Connectors 1333 REBOILER.OutletL to ConnectorReboilerLout;1334 LiquidConnector to TRAYS(1).InletL ;1333 REBOILER.OutletLiquid to ConnectorReboilerLout; 1334 LiquidConnector to TRAYS(1).InletLiquid; 1335 1335 ConnectorHeatReboiler to REBOILER.InletQ; 1336 1336 … … 1346 1346 LiquidConnector.h = LiquidInlet.h; 1347 1347 1348 VapourOutlet.F= TRAYS(1).OutletV .F;1349 VapourOutlet.T = TRAYS(1).OutletV .T;1350 VapourOutlet.P = TRAYS(1).OutletV .P;1351 VapourOutlet.z = TRAYS(1).OutletV .z;1348 VapourOutlet.F= TRAYS(1).OutletVapour.F; 1349 VapourOutlet.T = TRAYS(1).OutletVapour.T; 1350 VapourOutlet.P = TRAYS(1).OutletVapour.P; 1351 VapourOutlet.z = TRAYS(1).OutletVapour.z; 1352 1352 1353 1353 # Reboiler Connector Equations … … 1383 1383 * the Murphree eficiency for each tray (Emv); 1384 1384 * the vapour flow leaving the top of the column; 1385 * the InletL stream of the top tray;1385 * the InletLiquidiquid stream of the top tray; 1386 1386 * the heat supllied in bottom tank; 1387 1387 * the heat supllied in the reboiler; … … 1389 1389 1390 1390 == Initial Conditions == 1391 * the TRAYS temperature (OutletL .T);1392 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL .F);1393 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;1394 1395 * the bottom tank temperature (OutletL .T);1391 * the TRAYS temperature (OutletLiquid.T); 1392 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F); 1393 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray; 1394 1395 * the bottom tank temperature (OutletLiquid.T); 1396 1396 * the bottom tank liquid level (Level); 1397 * (NoComps - 1) OutletL (OR OutletV) compositions.1397 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. 1398 1398 "; 1399 1399 … … 1434 1434 CONNECTIONS 1435 1435 #vapor 1436 REBOILER.OutletV to TRAYS(NumberOfTrays).InletV;1436 REBOILER.OutletVapour to TRAYS(NumberOfTrays).InletVapour; 1437 1437 1438 1438 #liquid 1439 TRAYS(NumberOfTrays).OutletL to ACCUMULATOR.Inlet;1439 TRAYS(NumberOfTrays).OutletLiquid to ACCUMULATOR.Inlet; 1440 1440 ACCUMULATOR.Outlet to SPLITTER.Inlet; 1441 SPLITTER.Outlet2 to REBOILER.InletL ;1441 SPLITTER.Outlet2 to REBOILER.InletLiquid; 1442 1442 1443 1443 #Connectors 1444 LiquidConnector to TRAYS(1).InletL ;1444 LiquidConnector to TRAYS(1).InletLiquid; 1445 1445 ConnectorHeatReboiler to REBOILER.InletQ; 1446 1446 ConnectorHeatAccumulator to ACCUMULATOR.InletQ; … … 1464 1464 LiquidConnector.h = LiquidInlet.h; 1465 1465 1466 VapourOutlet.F= TRAYS(1).OutletV .F;1467 VapourOutlet.T = TRAYS(1).OutletV .T;1468 VapourOutlet.P = TRAYS(1).OutletV .P;1469 VapourOutlet.z = TRAYS(1).OutletV .z;1466 VapourOutlet.F= TRAYS(1).OutletVapour.F; 1467 VapourOutlet.T = TRAYS(1).OutletVapour.T; 1468 VapourOutlet.P = TRAYS(1).OutletVapour.P; 1469 VapourOutlet.z = TRAYS(1).OutletVapour.z; 1470 1470 1471 1471 VapourDrawOff.F*VapSideTrayIndex= TRAYS.VapourSideStream.F; … … 1497 1497 * the pump pressure difference; 1498 1498 * the heat supllied in reboiler and condenser; 1499 * the condenser vapor outlet flow (OutletV .F);1500 * the reboiler liquid outlet flow (OutletL .F);1499 * the condenser vapor outlet flow (OutletVapour.F); 1500 * the reboiler liquid outlet flow (OutletLiquid.F); 1501 1501 * both splitter outlet flows OR one of the splitter outlet flows and the splitter frac. 1502 1502 1503 1503 == Initial Conditions == 1504 * the TRAYS temperature (OutletL .T);1505 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL .F);1506 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;1507 1508 * the condenser temperature (OutletL .T);1504 * the TRAYS temperature (OutletLiquid.T); 1505 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F); 1506 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray; 1507 1508 * the condenser temperature (OutletLiquid.T); 1509 1509 * the condenser liquid level (Level); 1510 * (NoComps - 1) OutletL (OR OutletV) compositions;1511 1512 * the reboiler temperature (OutletL .T);1510 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions; 1511 1512 * the reboiler temperature (OutletLiquid.T); 1513 1513 * the reboiler liquid level (Level); 1514 * (NoComps - 1) OutletL (OR OutletV) compositions.1514 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. 1515 1515 "; 1516 1516 … … 1623 1623 CONNECTIONS 1624 1624 #vapor 1625 REBOILER.OutletV to TRAYS(NumberOfTrays).InletV;1626 TRAYS(1).OutletV to CONDENSER.InletV;1627 TRAYS([2:NumberOfTrays]).OutletV to TRAYS([1:NumberOfTrays-1]).InletV;1625 REBOILER.OutletVapour to TRAYS(NumberOfTrays).InletVapour; 1626 TRAYS(1).OutletVapour to CONDENSER.InletVapour; 1627 TRAYS([2:NumberOfTrays]).OutletVapour to TRAYS([1:NumberOfTrays-1]).InletVapour; 1628 1628 1629 1629 #liquid 1630 CONDENSER.OutletL to SPLITTER.Inlet;1630 CONDENSER.OutletLiquid to SPLITTER.Inlet; 1631 1631 SPLITTER.Outlet2 to PUMP.Inlet; 1632 PUMP.Outlet to TRAYS(1).InletL ;1633 TRAYS([1:NumberOfTrays-1]).OutletL to TRAYS([2:NumberOfTrays]).InletL;1634 TRAYS(NumberOfTrays).OutletL to REBOILER.InletL;1632 PUMP.Outlet to TRAYS(1).InletLiquid; 1633 TRAYS([1:NumberOfTrays-1]).OutletLiquid to TRAYS([2:NumberOfTrays]).InletLiquid; 1634 TRAYS(NumberOfTrays).OutletLiquid to REBOILER.InletLiquid; 1635 1635 1636 1636 #Connectors 1637 CONDENSER.OutletV to ConnectorCondenserVout;1637 CONDENSER.OutletVapour to ConnectorCondenserVout; 1638 1638 SPLITTER.Outlet1 to ConnectorSplitterOut; 1639 REBOILER.OutletL to ConnectorReboilerLout;1639 REBOILER.OutletLiquid to ConnectorReboilerLout; 1640 1640 1641 1641 INITIAL … … 1646 1646 1647 1647 "The initial temperature of the TRAYS" 1648 TRAYS(i).OutletL .T = INITIALIZATION.TopTemperature+(INITIALIZATION.BottomTemperature-INITIALIZATION.TopTemperature)*((i-1)/(NumberOfTrays-1));1648 TRAYS(i).OutletLiquid.T = INITIALIZATION.TopTemperature+(INITIALIZATION.BottomTemperature-INITIALIZATION.TopTemperature)*((i-1)/(NumberOfTrays-1)); 1649 1649 1650 1650 "The initial Level of the TRAYS" … … 1657 1657 1658 1658 "The initial composition of the TRAYS - Normalized" 1659 TRAYS(j).OutletL .z(i) = INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) +(INITIALIZATION.BottomComposition(i)/sum(INITIALIZATION.BottomComposition)-INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) )*((j-1)/(NumberOfTrays-1));1659 TRAYS(j).OutletLiquid.z(i) = INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) +(INITIALIZATION.BottomComposition(i)/sum(INITIALIZATION.BottomComposition)-INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) )*((j-1)/(NumberOfTrays-1)); 1660 1660 end 1661 1661 … … 1667 1667 1668 1668 "Murphree Efficiency" 1669 TRAYS(i).OutletV .z = MurphreeEff * (TRAYS(i).yideal - TRAYS(i).InletV.z) + TRAYS(i).InletV.z;1669 TRAYS(i).OutletVapour.z = MurphreeEff * (TRAYS(i).yideal - TRAYS(i).InletVapour.z) + TRAYS(i).InletVapour.z; 1670 1670 1671 1671 "Energy Holdup" 1672 TRAYS(i).E = TRAYS(i).ML*TRAYS(i).OutletL .h + TRAYS(i).MV*TRAYS(i).OutletV.h - TRAYS(i).OutletL.P*V;1672 TRAYS(i).E = TRAYS(i).ML*TRAYS(i).OutletLiquid.h + TRAYS(i).MV*TRAYS(i).OutletVapour.h - TRAYS(i).OutletLiquid.P*V; 1673 1673 1674 1674 "Component Molar Balance" 1675 diff(TRAYS(i).M)=TRAYS(i).Inlet.F*TRAYS(i).Inlet.z + TRAYS(i).InletL .F*TRAYS(i).InletL.z + TRAYS(i).InletV.F*TRAYS(i).InletV.z- TRAYS(i).OutletL.F*TRAYS(i).OutletL.z - TRAYS(i).OutletV.F*TRAYS(i).OutletV.z-1675 diff(TRAYS(i).M)=TRAYS(i).Inlet.F*TRAYS(i).Inlet.z + TRAYS(i).InletLiquid.F*TRAYS(i).InletLiquid.z + TRAYS(i).InletVapour.F*TRAYS(i).InletVapour.z- TRAYS(i).OutletLiquid.F*TRAYS(i).OutletLiquid.z - TRAYS(i).OutletVapour.F*TRAYS(i).OutletVapour.z- 1676 1676 TRAYS(i).LiquidSideStream.F*TRAYS(i).LiquidSideStream.z-TRAYS(i).VapourSideStream.F*TRAYS(i).VapourSideStream.z + stoic*TRAYS(i).r3*TRAYS(i).ML*TRAYS(i).vL; 1677 1677 1678 1678 "Energy Balance" 1679 diff(TRAYS(i).E) = ( TRAYS(i).Inlet.F*TRAYS(i).Inlet.h + TRAYS(i).InletL .F*TRAYS(i).InletL.h + TRAYS(i).InletV.F*TRAYS(i).InletV.h- TRAYS(i).OutletL.F*TRAYS(i).OutletL.h - TRAYS(i).OutletV.F*TRAYS(i).OutletV.h1679 diff(TRAYS(i).E) = ( TRAYS(i).Inlet.F*TRAYS(i).Inlet.h + TRAYS(i).InletLiquid.F*TRAYS(i).InletLiquid.h + TRAYS(i).InletVapour.F*TRAYS(i).InletVapour.h- TRAYS(i).OutletLiquid.F*TRAYS(i).OutletLiquid.h - TRAYS(i).OutletVapour.F*TRAYS(i).OutletVapour.h 1680 1680 -TRAYS(i).VapourSideStream.F*TRAYS(i).VapourSideStream.h - TRAYS(i).LiquidSideStream.F*TRAYS(i).LiquidSideStream.h + Q ) + Hr * TRAYS(i).r3 *TRAYS(i). vL*TRAYS(i).ML; 1681 1681 … … 1691 1691 case "on": 1692 1692 "Pressure Drop through the condenser" 1693 CONDENSER.InletV .F*TRAYS(1).vV / 'm^2' =1694 sqrt((TRAYS(1).OutletV .P - CONDENSER.OutletL.P + 1e-8 * 'atm')/(TRAYS(1).rhoV*alfacond));1695 when TRAYS(1).OutletV .P < CONDENSER.OutletL.P switchto "off";1693 CONDENSER.InletVapour.F*TRAYS(1).vV / 'm^2' = 1694 sqrt((TRAYS(1).OutletVapour.P - CONDENSER.OutletLiquid.P + 1e-8 * 'atm')/(TRAYS(1).rhoV*alfacond)); 1695 when TRAYS(1).OutletVapour.P < CONDENSER.OutletLiquid.P switchto "off"; 1696 1696 1697 1697 case "off": 1698 1698 "Prato selado" 1699 CONDENSER.InletV .F = 0.0 * 'mol/s';1700 when TRAYS(1).OutletV .P > CONDENSER.OutletL.P + 1e-3 * 'atm' switchto "on";1699 CONDENSER.InletVapour.F = 0.0 * 'mol/s'; 1700 when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-3 * 'atm' switchto "on"; 1701 1701 end 1702 1702 … … 1706 1706 case "on": 1707 1707 "Francis Equation" 1708 TRAYS(i).OutletL .F*TRAYS(i).vL = 1.84*'1/s'*lw*((TRAYS(i).Level-(beta*hw)+1e-6*'m')/(beta))^2;1708 TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'1/s'*lw*((TRAYS(i).Level-(beta*hw)+1e-6*'m')/(beta))^2; 1709 1709 when TRAYS(i).Level < (beta * hw) switchto "off"; 1710 1710 1711 1711 case "off": 1712 1712 "Low level" 1713 TRAYS(i).OutletL .F = 0 * 'mol/h';1713 TRAYS(i).OutletLiquid.F = 0 * 'mol/h'; 1714 1714 when TRAYS(i).Level > (beta * hw) + 1e-6*'m' switchto "on"; 1715 1715 end … … 1717 1717 switch TrayVapourFlow 1718 1718 case "on": 1719 TRAYS(i).InletV .F*TRAYS(i).vV = sqrt((TRAYS(i).InletV.P - TRAYS(i).OutletV.P - TRAYS(i).Level*g*TRAYS(i).rhoL + 1e-8 * 'atm')/(TRAYS(i).rhoV*alfa))*Ah;1720 when TRAYS(i).InletV .P < TRAYS(i).OutletV.P + TRAYS(i).Level*g*TRAYS(i).rhoL switchto "off";1719 TRAYS(i).InletVapour.F*TRAYS(i).vV = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P - TRAYS(i).Level*g*TRAYS(i).rhoL + 1e-8 * 'atm')/(TRAYS(i).rhoV*alfa))*Ah; 1720 when TRAYS(i).InletVapour.P < TRAYS(i).OutletVapour.P + TRAYS(i).Level*g*TRAYS(i).rhoL switchto "off"; 1721 1721 1722 1722 case "off": 1723 TRAYS(i).InletV .F = 0 * 'mol/s';1724 when TRAYS(i).InletV .P > TRAYS(i).OutletV.P + TRAYS(i).Level*g*TRAYS(i).rhoL + 3e-2 * 'atm' switchto "on";1723 TRAYS(i).InletVapour.F = 0 * 'mol/s'; 1724 when TRAYS(i).InletVapour.P > TRAYS(i).OutletVapour.P + TRAYS(i).Level*g*TRAYS(i).rhoL + 3e-2 * 'atm' switchto "on"; 1725 1725 end 1726 1726 … … 1739 1739 1740 1740 "Reboiler Temperature indicator" 1741 TRI * 'K' = REBOILER.OutletL .T;1741 TRI * 'K' = REBOILER.OutletLiquid.T; 1742 1742 1743 1743 "Reboiler Level indicator" … … 1745 1745 1746 1746 "Condenser Temperature indicator" 1747 TCI * 'K' = CONDENSER.OutletL .T;1747 TCI * 'K' = CONDENSER.OutletLiquid.T; 1748 1748 1749 1749 "Condenser Level indicator" … … 1794 1794 == Specify == 1795 1795 * the feed stream of each tray (Inlet); 1796 * the InletL stream of the top tray;1797 * the InletV stream of the bottom tray;1796 * the InletLiquid stream of the top tray; 1797 * the InletVapour stream of the bottom tray; 1798 1798 * the total pressure drop (dP) of the section. 1799 1799 1800 1800 == Initial Conditions == 1801 * the stages temperature (OutletL .T);1801 * the stages temperature (OutletLiquid.T); 1802 1802 * the stages liquid holdup; 1803 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray.1803 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray. 1804 1804 "; 1805 1805 … … 1844 1844 CONNECTIONS 1845 1845 1846 STAGES([2:NumberOfStages]).OutletV to STAGES([1:NumberOfStages-1]).InletV;1847 STAGES([1:NumberOfStages-1]).OutletL to STAGES([2:NumberOfStages]).InletL;1846 STAGES([2:NumberOfStages]).OutletVapour to STAGES([1:NumberOfStages-1]).InletVapour; 1847 STAGES([1:NumberOfStages-1]).OutletLiquid to STAGES([2:NumberOfStages]).InletLiquid; 1848 1848 1849 1849 EQUATIONS … … 1861 1861 1862 1862 "Energy Balance" 1863 diff(STAGES(i).E) = ( STAGES(i).Inlet.F*STAGES(i).Inlet.h + STAGES(i).InletL .F*STAGES(i).InletL.h + STAGES(i).InletV.F*STAGES(i).InletV.h- STAGES(i).OutletL.F*STAGES(i).OutletL.h1864 - STAGES(i).OutletV .F*STAGES(i).OutletV.h + HeatSupply );1863 diff(STAGES(i).E) = ( STAGES(i).Inlet.F*STAGES(i).Inlet.h + STAGES(i).InletLiquid.F*STAGES(i).InletLiquid.h + STAGES(i).InletVapour.F*STAGES(i).InletVapour.h- STAGES(i).OutletLiquid.F*STAGES(i).OutletLiquid.h 1864 - STAGES(i).OutletVapour.F*STAGES(i).OutletVapour.h + HeatSupply ); 1865 1865 1866 1866 "Energy Holdup" 1867 STAGES(i).E = STAGES(i).ML*STAGES(i).OutletL .h + STAGES(i).MV*STAGES(i).OutletV.h - STAGES(i).OutletL.P*V;1867 STAGES(i).E = STAGES(i).ML*STAGES(i).OutletLiquid.h + STAGES(i).MV*STAGES(i).OutletVapour.h - STAGES(i).OutletLiquid.P*V; 1868 1868 1869 1869 "Geometry Constraint" … … 1871 1871 1872 1872 "Volume flow rate of vapor, m^3/m^2/s" 1873 STAGES(i).uV * ((ColumnArea)*VoidFraction - STAGES(i).Al) = STAGES(i).OutletV .F * STAGES(i).vV;1873 STAGES(i).uV * ((ColumnArea)*VoidFraction - STAGES(i).Al) = STAGES(i).OutletVapour.F * STAGES(i).vV; 1874 1874 1875 1875 "Liquid holdup" … … 1901 1901 1902 1902 "The initial temperature of the STAGES" 1903 STAGES(i).OutletL .T = INITIALIZATION.TopStageTemperature+(INITIALIZATION.BottomStageTemperature-INITIALIZATION.TopStageTemperature)*((i-1)/(NumberOfStages-1));1903 STAGES(i).OutletLiquid.T = INITIALIZATION.TopStageTemperature+(INITIALIZATION.BottomStageTemperature-INITIALIZATION.TopStageTemperature)*((i-1)/(NumberOfStages-1)); 1904 1904 1905 1905 "The Liquid Holdup of the STAGES" … … 1913 1913 1914 1914 "The initial composition of the TRAYS" 1915 STAGES(j).OutletL .z(i) = INITIALIZATION.TopStageComposition(i)/sum(INITIALIZATION.TopStageComposition) +(INITIALIZATION.BottomStageComposition(i)/sum(INITIALIZATION.BottomStageComposition)-INITIALIZATION.TopStageComposition(i)/sum(INITIALIZATION.TopStageComposition) )*((j-1)/(NumberOfStages-1));1915 STAGES(j).OutletLiquid.z(i) = INITIALIZATION.TopStageComposition(i)/sum(INITIALIZATION.TopStageComposition) +(INITIALIZATION.BottomStageComposition(i)/sum(INITIALIZATION.BottomStageComposition)-INITIALIZATION.TopStageComposition(i)/sum(INITIALIZATION.TopStageComposition) )*((j-1)/(NumberOfStages-1)); 1916 1916 1917 1917 end … … 1933 1933 == Specify == 1934 1934 * the feed stream of each tray (Inlet); 1935 * the InletL stream of the top tray;1936 * the InletV stream of the bottom tray;1935 * the InletLiquid stream of the top tray; 1936 * the InletVapour stream of the bottom tray; 1937 1937 * the total pressure drop (dP) of the section. 1938 1938 1939 1939 == Initial Conditions == 1940 * the stages temperature (OutletL .T);1940 * the stages temperature (OutletLiquid.T); 1941 1941 * the stages liquid holdup; 1942 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray.1942 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray. 1943 1943 "; 1944 1944 … … 1956 1956 CONNECTIONS 1957 1957 1958 LiquidConnector to STAGES(1).InletL ;1959 VapourConnector to STAGES(NumberOfStages).InletV ;1958 LiquidConnector to STAGES(1).InletLiquid; 1959 VapourConnector to STAGES(NumberOfStages).InletVapour; 1960 1960 1961 1961 EQUATIONS … … 1975 1975 VapourConnector.h = VapourInlet.h; 1976 1976 1977 LiquidOutlet.F= STAGES(NumberOfStages).OutletL .F;1978 LiquidOutlet.T = STAGES(NumberOfStages).OutletL .T;1979 LiquidOutlet.P = STAGES(NumberOfStages).OutletL .P;1980 LiquidOutlet.z = STAGES(NumberOfStages).OutletL .z;1981 1982 VapourOutlet.F= STAGES(1).OutletV .F;1983 VapourOutlet.T = STAGES(1).OutletV .T;1984 VapourOutlet.P = STAGES(1).OutletV .P;1985 VapourOutlet.z = STAGES(1).OutletV .z;1977 LiquidOutlet.F= STAGES(NumberOfStages).OutletLiquid.F; 1978 LiquidOutlet.T = STAGES(NumberOfStages).OutletLiquid.T; 1979 LiquidOutlet.P = STAGES(NumberOfStages).OutletLiquid.P; 1980 LiquidOutlet.z = STAGES(NumberOfStages).OutletLiquid.z; 1981 1982 VapourOutlet.F= STAGES(1).OutletVapour.F; 1983 VapourOutlet.T = STAGES(1).OutletVapour.T; 1984 VapourOutlet.P = STAGES(1).OutletVapour.P; 1985 VapourOutlet.z = STAGES(1).OutletVapour.z; 1986 1986 1987 1987 end … … 1998 1998 * the total pressure drop (dP) of the packing; 1999 1999 * the heat supllied in reboiler and condenser; 2000 * the condenser vapor outlet flow (OutletV .F);2001 * the reboiler liquid outlet flow (OutletL .F);2000 * the condenser vapor outlet flow (OutletVapour.F); 2001 * the reboiler liquid outlet flow (OutletLiquid.F); 2002 2002 * both splitter outlet flows OR one of the splitter outlet flows and the splitter frac. 2003 2003 2004 2004 == Initial Conditions == 2005 * the stages temperature (OutletL .T);2005 * the stages temperature (OutletLiquid.T); 2006 2006 * the stages initial molar holdup; 2007 * (NoComps - 1) OutletL (OR OutletV) compositions for each stage;2008 2009 * the condenser temperature (OutletL .T);2007 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each stage; 2008 2009 * the condenser temperature (OutletLiquid.T); 2010 2010 * the condenser liquid level (Level); 2011 * (NoComps - 1) OutletL (OR OutletV) compositions;2012 2013 * the reboiler temperature (OutletL .T);2011 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions; 2012 2013 * the reboiler temperature (OutletLiquid.T); 2014 2014 * the reboiler liquid level (Level); 2015 * (NoComps - 1) OutletL (OR OutletV) compositions.2015 * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. 2016 2016 "; 2017 2017 … … 2051 2051 2052 2052 #vapor 2053 REBOILER.OutletV to STAGES(NumberOfStages).InletV;2054 STAGES(1).OutletV to CONDENSER.InletV;2053 REBOILER.OutletVapour to STAGES(NumberOfStages).InletVapour; 2054 STAGES(1).OutletVapour to CONDENSER.InletVapour; 2055 2055 2056 2056 #liquid 2057 CONDENSER.OutletL to SPLITTER.Inlet;2057 CONDENSER.OutletLiquid to SPLITTER.Inlet; 2058 2058 SPLITTER.Outlet2 to PUMP.Inlet; 2059 PUMP.Outlet to STAGES(1).InletL ;2060 STAGES(NumberOfStages).OutletL to REBOILER.InletL;2059 PUMP.Outlet to STAGES(1).InletLiquid; 2060 STAGES(NumberOfStages).OutletLiquid to REBOILER.InletLiquid; 2061 2061 2062 2062 #Connectors … … 2064 2064 ConnectorHeatCondenser to CONDENSER.InletQ; 2065 2065 2066 CONDENSER.OutletV to ConnectorCondenserVout;2066 CONDENSER.OutletVapour to ConnectorCondenserVout; 2067 2067 SPLITTER.Outlet1 to ConnectorSplitterOut; 2068 REBOILER.OutletL to ConnectorReboilerLout;2068 REBOILER.OutletLiquid to ConnectorReboilerLout; 2069 2069 2070 2070 EQUATIONS … … 2092 2092 switch VapourFlow 2093 2093 case "on": 2094 STAGES(NumberOfStages).InletV .F*STAGES(NumberOfStages).vV = sqrt((REBOILER.OutletV.P - STAGES(NumberOfStages).OutletV.P)/2094 STAGES(NumberOfStages).InletVapour.F*STAGES(NumberOfStages).vV = sqrt((REBOILER.OutletVapour.P - STAGES(NumberOfStages).OutletVapour.P)/ 2095 2095 (STAGES(NumberOfStages).rhoV*ResistanceCoeff*20))*(ColumnArea*VoidFraction - STAGES(NumberOfStages).Al); 2096 when STAGES(NumberOfStages).InletV .F < 1e-6 * 'kmol/h' switchto "off";2096 when STAGES(NumberOfStages).InletVapour.F < 1e-6 * 'kmol/h' switchto "off"; 2097 2097 2098 2098 case "off": 2099 STAGES(NumberOfStages).InletV .F = 0 * 'mol/s';2100 when REBOILER.OutletV .P > STAGES(NumberOfStages).OutletV.P + 1e-1 * 'atm' switchto "on";2101 end 2102 2103 end 2104 2099 STAGES(NumberOfStages).InletVapour.F = 0 * 'mol/s'; 2100 when REBOILER.OutletVapour.P > STAGES(NumberOfStages).OutletVapour.P + 1e-1 * 'atm' switchto "on"; 2101 end 2102 2103 end 2104
Note: See TracChangeset
for help on using the changeset viewer.