Changeset 721 for branches/gui/eml
- Timestamp:
- Feb 25, 2009, 7:51:53 PM (15 years ago)
- Location:
- branches/gui/eml/stage_separators
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/column.mso
r719 r721 49 49 TopTemperature as temperature (Brief = "Tray Temperature at Column Top", Default = 300); 50 50 BottomTemperature as temperature (Brief = "Tray Temperature at Column Bottom", Default = 330); 51 LevelFraction as fraction (Brief = " Level Fraction");51 LevelFraction as fraction (Brief = "Tray Level Fraction", Default = 0.5); 52 52 53 53 TopComposition(NComp) as fraction (Brief = "Component Molar Fraction at Column Top", Default = 0.30); 54 54 BottomComposition(NComp) as fraction (Brief = "Component Molar Fraction at Column Bottom", Default = 0.30); 55 56 end 57 58 Model InitializeStage 59 60 ATTRIBUTES 61 Pallete = false; 62 Brief = "Initial conditions for Packed column section."; 63 64 PARAMETERS 65 outer NComp as Integer (Brief="Number of components"); 66 67 TopStageTemperature as temperature (Brief = "Tray Temperature at Column Top", Default = 300); 68 BottomStageTemperature as temperature (Brief = "Tray Temperature at Column Bottom", Default = 300); 69 70 TopStageComposition(NComp) as fraction (Brief = "Component Molar Fraction at Top"); 71 BottomStageComposition(NComp) as fraction (Brief = "Component Molar Fraction at Bottom"); 72 LiquidMolarHoldup as mol (Brief="Molar liquid holdup", Default=0.01); 55 73 56 74 end … … 63 81 Brief = "Model of a column section."; 64 82 Info = 65 "Model of a basic column section containing a vetor of TRAYS numbered from the top todown.";83 "Model of a basic column section containing a vetor of TRAYS numbered from the top-down."; 66 84 67 85 PARAMETERS 68 86 outer PP as Plugin (Brief="External Physical Properties", Type="PP"); 69 87 outer NComp as Integer (Brief="Number of components"); 88 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 89 # Section Column Feed Tray - Side Streams Location and Numbering 90 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 70 91 NumberOfTrays as Integer (Brief="Number of trays", Default=8); 71 92 FeedTrayIndex(NumberOfTrays) as Integer (Brief="Feed Tray Index", Default=0,Hidden=true); … … 77 98 g as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 78 99 Mw(NComp) as molweight (Brief="Component Mol Weight",Hidden=true); 79 100 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 101 # Section Column Flow Model for Liquid and Vapour 102 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 80 103 VapourFlowModel as Switcher (Valid = ["Reepmeyer", "Feehery_Fv", "Roffel_Fv", "Klingberg", "Wang_Fv", "Elgue"], Default = "Reepmeyer"); 81 104 LiquidFlowModel as Switcher (Valid = ["default", "Wang_Fl", "Olsen", "Feehery_Fl", "Roffel_Fl"], Default = "default"); 82 105 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 106 # Section Column Tray Geometry and Auxiliar Parameters 107 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 83 108 VolumeOfTray as volume (Brief="Total Volume of the tray"); 84 109 HeatSupply as heat_rate (Brief="Rate of heat supply"); 85 110 PlateArea as area (Brief="Plate area = Atray - Adowncomer"); 86 87 HolesArea as area (Brief="Total holes area"); 88 WeirLength as length (Brief="Weir length"); 89 WeirHeight as length (Brief="Weir height"); 90 FeeheryCoeff as Real (Brief="Feeherys correlation coefficient", Unit='1/m^4', Default=1); 91 ElgueCoeff as Real (Brief="Elgues correlation coefficient", Unit='kg/m/mol^2', Default=1); 92 OlsenCoeff as Real (Brief="Olsens correlation coefficient", Default=1); 93 TrayLiquidPasses as Real (Brief="Number of liquid passes in the tray", Default=1); 111 HolesArea as area (Brief="Total holes area"); 112 WeirLength as length (Brief="Weir length"); 113 WeirHeight as length (Brief="Weir height"); 114 FeeheryCoeff as Real (Brief="Feeherys correlation coefficient", Unit='1/m^4', Default=1); 115 ElgueCoeff as Real (Brief="Elgues correlation coefficient", Unit='kg/m/mol^2', Default=1); 116 OlsenCoeff as Real (Brief="Olsens correlation coefficient", Default=1); 117 TrayLiquidPasses as Real (Brief="Number of liquid passes in the tray", Default=1); 94 118 95 119 V as volume (Brief="Total Volume of the tray",Hidden=true); 96 120 Q as heat_rate (Brief="Rate of heat supply",Hidden=true); 97 Ap as area (Brief="Plate area = Atray - Adowncomer",Hidden=true); 98 99 Ah as area (Brief="Total holes area",Hidden=true); 100 lw as length (Brief="Weir length",Hidden=true); 101 hw as length (Brief="Weir height",Hidden=true); 102 beta as fraction (Brief="Aeration fraction"); 103 alfa as fraction (Brief="Dry pressure drop coefficient"); 104 w as Real (Brief="Feeherys correlation coefficient", Unit='1/m^4', Default=1,Hidden=true); 105 btray as Real (Brief="Elgues correlation coefficient", Unit='kg/m/mol^2', Default=1,Hidden=true); 106 fw as Real (Brief="Olsens correlation coefficient", Default=1,Hidden=true); 107 Np as Real (Brief="Number of liquid passes in the tray", Default=1,Hidden=true); 121 Ap as area (Brief="Plate area = Atray - Adowncomer",Hidden=true); 122 Ah as area (Brief="Total holes area",Hidden=true); 123 lw as length (Brief="Weir length",Hidden=true); 124 hw as length (Brief="Weir height",Hidden=true); 125 beta as fraction (Brief="Aeration fraction"); 126 alfa as fraction (Brief="Dry pressure drop coefficient"); 127 w as Real (Brief="Feeherys correlation coefficient", Unit='1/m^4', Default=1,Hidden=true); 128 btray as Real (Brief="Elgues correlation coefficient", Unit='kg/m/mol^2', Default=1,Hidden=true); 129 fw as Real (Brief="Olsens correlation coefficient", Default=1,Hidden=true); 130 Np as Real (Brief="Number of liquid passes in the tray", Default=1,Hidden=true); 108 131 109 132 VapourFlow as Switcher (Valid = ["on", "off"], Default = "on",Hidden=true); … … 128 151 129 152 VARIABLES 130 131 INITIALIZATION as InitializeSection; 132 133 in FeedTray as stream (Brief="Feed stream", PosX=0, PosY=0.55); 134 135 TRAYS(NumberOfTrays) as tray (Brief="Number of trays in the Column Section"); 136 137 VapourDrawOffFlow as flow_mol (Brief = "Stream Molar Flow Rate"); 138 LiquidDrawOffFlow as flow_mol (Brief = "Stream Molar Flow Rate"); 139 140 MurphreeEff as Real (Brief = "Murphree efficiency"); 141 153 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 154 # Tray Initialization For the Whole Column Section 155 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 156 INITIALIZATION as InitializeSection (Brief = "Column Model Initialization"); 157 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 158 # Column Feed - Side Stream Flow and Murphree Efficiency 159 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 160 in FeedTray as stream (Brief="Feed stream", PosX=0, PosY=0.55); 161 TRAYS(NumberOfTrays) as tray (Brief="Number of trays in the Column Section"); 162 VapourDrawOffFlow as flow_mol (Brief="Stream Molar Flow Rate"); 163 LiquidDrawOffFlow as flow_mol (Brief="Stream Molar Flow Rate"); 164 MurphreeEff as Real (Brief="Murphree efficiency for All Trays"); 165 142 166 CONNECTIONS 143 167 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 168 # Connecting Intermediate Trays 169 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 144 170 TRAYS([2:NumberOfTrays]).OutletV to TRAYS([1:NumberOfTrays-1]).InletV; 145 171 TRAYS([1:NumberOfTrays-1]).OutletL to TRAYS([2:NumberOfTrays]).InletL; 146 172 147 173 INITIAL 148 174 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 175 # Tray Initialization 176 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 149 177 for i in 1:NumberOfTrays do 150 178 151 179 "The initial temperature of the TRAYS" 152 180 TRAYS(i).OutletL.T = INITIALIZATION.TopTemperature+(INITIALIZATION.BottomTemperature-INITIALIZATION.TopTemperature)*((i-1)/(NumberOfTrays-1)); … … 154 182 "The initial Level of the TRAYS" 155 183 TRAYS(i).Level = INITIALIZATION.LevelFraction*hw; 156 157 184 end 158 185 159 186 for i in 1:NComp-1 do 160 187 161 188 for j in 1:NumberOfTrays do 162 189 163 190 "The initial composition of the TRAYS - Normalized" 164 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)); 165 166 192 end 167 193 … … 169 195 170 196 EQUATIONS 171 # Connecting Trays 197 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 198 # Equating Feed Tray Variables to Trays Variables 199 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 200 "Feed Tray Inlet Flow" 172 201 FeedTray.F*FeedTrayIndex= TRAYS.Inlet.F; 202 203 "Feed Tray Inlet Temperature" 173 204 FeedTray.T = TRAYS.Inlet.T; 205 206 "Feed Tray Inlet Pressure" 174 207 FeedTray.P = TRAYS.Inlet.P; 208 209 "Feed Tray Inlet Composition" 175 210 FeedTray.z = TRAYS.Inlet.z; 211 212 "Feed Tray Inlet Vapour Fraction" 176 213 FeedTray.v = TRAYS.Inlet.v; 214 215 "Feed Tray Inlet Enthalpy" 177 216 FeedTray.h = TRAYS.Inlet.h; 178 217 218 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 219 # Trays Equations 220 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 221 179 222 for i in [1:NumberOfTrays] do 180 223 … … 255 298 end 256 299 257 #*----------------------------------------------------------------------258 * Model of a column section with:259 * - NumberOfTrays = number of trays.260 *261 *---------------------------------------------------------------------*#262 300 Model Section_Column as Section_ColumnBasic 263 301 … … 283 321 284 322 VARIABLES 285 286 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.35,Protected = true); 287 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.65,Protected = true); 323 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 324 # Section Inlet and Outlet Material Ports 325 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 326 out VapourDrawOff as vapour_stream (Brief="Vapour Draw Off Port in the section", PosX=1, PosY=0.35,Protected = true); 327 out LiquidDrawOff as liquid_stream (Brief="Liquid Draw Off Port in the section", PosX=1, PosY=0.65,Protected = true); 288 328 289 329 in LiquidInlet as stream (Brief="Liquid Inlet in the section", PosX=0.70, PosY=0); 290 330 out VapourOutlet as vapour_stream (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0); 291 331 292 in VapourInlet as stream 293 out LiquidOutlet as liquid_stream 294 295 LiquidConnector as stream (Brief="Liquid connection atthe middle TRAYS", PosX=0.75, PosY=1,Hidden=true);296 VapourConnector as stream (Brief="Vapour connection atthe middle TRAYS", PosX=0.55, PosY=0,Hidden=true);332 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.30, PosY=1); 333 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.70, PosY=1); 334 335 LiquidConnector as stream (Brief="Liquid connection in the middle TRAYS", PosX=0.75, PosY=1,Hidden=true); 336 VapourConnector as stream (Brief="Vapour connection in the middle TRAYS", PosX=0.55, PosY=0,Hidden=true); 297 337 298 338 CONNECTIONS … … 302 342 303 343 EQUATIONS 304 305 LiquidConnector.F= LiquidInlet.F; 344 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 345 # Equating Inlet Liquid Connector Variables 346 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 347 "Liquid Inlet Flow" 348 LiquidConnector.F = LiquidInlet.F; 349 350 "Liquid Inlet Temperature" 306 351 LiquidConnector.T = LiquidInlet.T; 352 353 "Liquid Inlet Pressure" 307 354 LiquidConnector.P = LiquidInlet.P; 355 356 "Liquid Inlet Composition" 308 357 LiquidConnector.z = LiquidInlet.z; 358 359 "Liquid Inlet Vapour Fraction" 309 360 LiquidConnector.v = LiquidInlet.v; 361 362 "Liquid Inlet Enthalpy" 310 363 LiquidConnector.h = LiquidInlet.h; 311 312 VapourConnector.F= VapourInlet.F; 364 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 365 # Equating Inlet Vapour Connector Variables 366 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 367 "Vapour Inlet Flow" 368 VapourConnector.F = VapourInlet.F; 369 370 "Vapour Inlet Temperature" 313 371 VapourConnector.T = VapourInlet.T; 372 373 "Vapour Inlet Pressure" 314 374 VapourConnector.P = VapourInlet.P; 375 376 "Vapour Inlet Composition" 315 377 VapourConnector.z = VapourInlet.z; 378 379 "Vapour Inlet Vapour Fraction" 316 380 VapourConnector.v = VapourInlet.v; 381 382 "Vapour Inlet Enthalpy" 317 383 VapourConnector.h = VapourInlet.h; 318 319 LiquidOutlet.F= TRAYS(NumberOfTrays).OutletL.F; 384 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 385 # Equating Outlet Liquid Variables 386 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 387 "Liquid Outlet Flow" 388 LiquidOutlet.F = TRAYS(NumberOfTrays).OutletL.F; 389 390 "Liquid Outlet Temperature" 320 391 LiquidOutlet.T = TRAYS(NumberOfTrays).OutletL.T; 392 393 "Liquid Outlet Pressure" 321 394 LiquidOutlet.P = TRAYS(NumberOfTrays).OutletL.P; 395 396 "Liquid Outlet Composition" 322 397 LiquidOutlet.z = TRAYS(NumberOfTrays).OutletL.z; 323 324 VapourOutlet.F= TRAYS(1).OutletV.F; 398 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 399 # Equating Outlet Vapour Variables 400 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 401 "Vapour Outlet Flow" 402 VapourOutlet.F = TRAYS(1).OutletV.F; 403 404 "Vapour Outlet Temperature" 325 405 VapourOutlet.T = TRAYS(1).OutletV.T; 406 407 "Vapour Outlet Pressure" 326 408 VapourOutlet.P = TRAYS(1).OutletV.P; 409 410 "Vapour Outlet Composition" 327 411 VapourOutlet.z = TRAYS(1).OutletV.z; 328 412 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 413 # Equating Outlet Vapour Side Stream Variables 414 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 415 "Vapour Draw Off Stream - Flow" 329 416 VapourDrawOff.F*VapSideTrayIndex= TRAYS.VapourSideStream.F; 417 418 "Vapour Draw Off Stream - Temperature" 330 419 VapourDrawOff.T = TRAYS(VapourSideStreamLocation).VapourSideStream.T; 420 421 "Vapour Draw Off Stream - Pressure" 331 422 VapourDrawOff.P = TRAYS(VapourSideStreamLocation).VapourSideStream.P; 423 424 "Vapour Draw Off Stream - Composition" 332 425 VapourDrawOff.z = TRAYS(VapourSideStreamLocation).VapourSideStream.z; 333 426 427 "Vapour Draw Off Stream" 428 VapourDrawOffFlow = VapourDrawOff.F; 429 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 430 # Equating Outlet Liquid Side Stream Variables 431 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 432 "Liquid Draw Off Stream - Flow" 334 433 LiquidDrawOff.F*LiqSideTrayIndex= TRAYS.LiquidSideStream.F; 434 435 "Liquid Draw Off Stream - Temperature" 335 436 LiquidDrawOff.T = TRAYS(LiquidSideStreamLocation).LiquidSideStream.T; 437 438 "Liquid Draw Off Stream - Pressure" 336 439 LiquidDrawOff.P = TRAYS(LiquidSideStreamLocation).LiquidSideStream.P; 440 441 "Liquid Draw Off Stream - Composition" 337 442 LiquidDrawOff.z = TRAYS(LiquidSideStreamLocation).LiquidSideStream.z; 338 443 339 VapourDrawOffFlow = VapourDrawOff.F; 444 "Liquid Draw Off Stream" 340 445 LiquidDrawOffFlow = LiquidDrawOff.F; 341 446 342 447 end 343 448 344 #*---------------------------------------------------------------------- 345 * Model of a distillation column containing: 346 * - NumberOfTrays like tray; 347 * - a kettle reboiler; 348 * - dynamic condenser; 349 * - a splitter which separate reflux and distillate; 350 * - a pump in reflux stream; 351 *--------------------------------------------------------------------- *# 352 Model Distillation_kettle_cond as Section_ColumnBasic 449 Model Distillation_kettle_cond as Section_ColumnBasic 353 450 354 451 ATTRIBUTES … … 384 481 385 482 VARIABLES 386 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.46,Protected = true); 387 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.58,Protected = true); 388 389 CONDENSER as condenser; 483 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.375,Protected = true); 484 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.42,Protected = true); 485 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 486 # Column Devices 487 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 488 CONDENSER as condenser; 390 489 REBOILER as reboiler; 391 490 SPLITTERtop as splitter; 392 PUMP as pump; 393 alfaTopo as Real; 394 395 in HeatToReboiler as power (Brief="Heat supplied to Reboiler", PosX=1, PosY=0.94); 396 in HeatToCondenser as power (Brief="Heat supplied to Condenser", PosX=1, PosY=0.10); 397 398 ConnectorHeatReboiler as power (Brief="Heat supplied to Reboiler", Hidden=true); 399 ConnectorHeatCondenser as power (Brief="Heat supplied to Condenser", Hidden=true); 400 401 out VapourDistillate as vapour_stream (Brief="Vapour outlet stream From Top Condenser", PosX=0.67, PosY=0); 402 in ConnectorCondenserVout as stream (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true); 403 404 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.33); 405 in ConnectorSplitterOut as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 406 407 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=1, PosY=0.99); 408 in ConnectorReboilerLout as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 409 491 PUMP as pump; 492 alfaTopo as Real; 493 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 494 # Heat Ports 495 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 496 in HeatToReboiler as power (Brief="Heat supplied to Reboiler",Protected = true, PosX=1, PosY=0.90); 497 in HeatToCondenser as power (Brief="Heat supplied to Condenser", Protected = true, PosX=1, PosY=0.034); 498 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 499 # Column Connectors 500 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 501 ConnectorHeatReboiler as power (Brief="Heat supplied to Reboiler", Hidden=true); 502 ConnectorHeatCondenser as power (Brief="Heat supplied to Condenser", Hidden=true); 503 in ConnectorCondenserVout as stream (Brief="Connector for Vapour outlet stream From Condenser", Hidden=true); 504 in ConnectorReboilerLout as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 505 in ConnectorSplitterOut as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 506 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 507 # Column products 508 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 509 out VapourDistillate as vapour_stream (Brief="Vapour outlet stream From Condenser", PosX=0.66, PosY=0); 510 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.20); 511 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=0.67, PosY=1); 410 512 411 513 EQUATIONS … … 479 581 end 480 582 481 482 #* ------------------------------------------------------------------- 483 * Distillation Column model with: 484 * 485 * - NumberOfTrays like tray; 486 * - a vessel in the bottom of column; 487 * - a splitter who separate the bottom product and the stream to reboiler; 488 * - steady state reboiler (thermosyphon); 489 * - a steady state condenser with subcooling; 490 * - a vessel drum (layed cilinder); 491 * - a splitter which separate reflux and distillate; 492 * - a pump in reflux stream. 493 * 494 * ------------------------------------------------------------------*# 495 Model Distillation_thermosyphon_subcooling as Section_ColumnBasic 583 Model Distillation_thermosyphon_subcooling as Section_ColumnBasic 496 584 ATTRIBUTES 497 585 Pallete = true; … … 528 616 529 617 VARIABLES 530 618 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 619 # Column Vapour and Liquid Draw Sides 620 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 531 621 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.41,Protected = true); 532 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.515,Protected = true); 533 534 CONDENSER as condenserSteady; 535 TANKtop as tank_cylindrical; 536 SPLITTERtop as splitter; 537 PUMP as pump; 538 REBOILER as reboilerSteady; 539 TANKbottom as tank; 540 SPLITTERbottom as splitter; 541 alfaTopo as Real; 542 543 out HeatToCondenser as power (Brief="Heat supplied to Condenser",Hidden=true); 544 out HeatToReboiler as power (Brief="Heat supplied to Reboiler",Hidden=true); 545 out HeatToBottomVessel as power (Brief="Heat supplied to Bottom Vessel",Hidden=true); 546 out HeatToTopVessel as power (Brief="Heat supplied to Top Vessel",Hidden=true); 547 548 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.30); 549 in ConnectorSplitterTop as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 550 551 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Bottom Splitter", PosX=1, PosY=0.99); 552 in ConnectorSplitterBottom as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 553 622 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.45,Protected = true); 623 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 624 # Column Devices 625 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 626 CONDENSER as condenserSteady (Brief="steady state condenser with subcooling"); 627 ACCUMULATOR_TOP as tank_cylindrical (Brief="vessel drum (layed cilinder)"); 628 SPLITTER_TOP as splitter (Brief="splitter which separate reflux and distillate"); 629 PUMP as pump (Brief="pump in reflux stream"); 630 REBOILER as reboilerSteady (Brief="steady state reboiler (thermosyphon)"); 631 ACCUMULATOR_BOTTOM as tank (Brief="vessel in the bottom of column"); 632 SPLITTER_BOTTOM as splitter (Brief="splitter who separate the bottom product and the stream to reboiler"); 633 alfaTopo as Real; 634 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 635 # Heat Ports 636 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 637 in HeatToCondenser as power (Brief="Heat supplied to Condenser",PosX=1, PosY=0.065, Protected=true); 638 in HeatToReboiler as power (Brief="Heat supplied to Reboiler", PosX=1, PosY=0.87,Protected=true); 639 in HeatToBottomAccumulator as power (Brief="Heat supplied to Bottom Accumulator",PosX=0, PosY=0.925,Protected=true); 640 in HeatToTopAccumulator as power (Brief="Heat supplied to Top Accumulator", PosX=1, PosY=0.19,Protected=true); 641 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 642 # Column Top and Bottom product 643 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 644 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.24); 645 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Bottom Splitter", PosX=0.18, PosY=1); 646 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 647 # Column Model Connectors 648 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 649 in ConnectorSplitterBottom as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 650 in ConnectorSplitterTop as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 651 652 ConnectorHeatReboiler as power (Brief="Connector for Heat supplied to Reboiler", Hidden=true); 653 ConnectorHeatCondenser as power (Brief="Connector for Heat supplied to Condenser", Hidden=true); 654 ConnectorHeatTopAccumulator as power (Brief="Connector for Heat supplied to Top Accumulator", Hidden=true); 655 ConnectorHeatBottomAccumulator as power (Brief="Connector for Heat supplied to Bottom Accumulator", Hidden=true); 656 554 657 EQUATIONS 658 # Heat Connector Equations 659 HeatToCondenser = ConnectorHeatCondenser; 660 HeatToReboiler = ConnectorHeatReboiler; 661 HeatToBottomAccumulator = ConnectorHeatBottomAccumulator; 662 HeatToTopAccumulator = ConnectorHeatTopAccumulator; 555 663 556 664 # Top Splitter Connector Equations … … 595 703 #vapor 596 704 REBOILER.OutletV to TRAYS(NumberOfTrays).InletV; 597 TRAYS(1).OutletV 705 TRAYS(1).OutletV to CONDENSER.InletV; 598 706 599 707 #liquid 600 CONDENSER.OutletL to TANKtop.Inlet;601 TANKtop.Outlet to SPLITTERtop.Inlet;602 SPLITTER top.Outlet2to PUMP.Inlet;603 PUMP.Outlet 604 TRAYS(NumberOfTrays).OutletL to TANKbottom.Inlet;605 TANKbottom.Outlet to SPLITTERbottom.Inlet;606 SPLITTER bottom.Outlet2to REBOILER.InletL;708 CONDENSER.OutletL to ACCUMULATOR_TOP.Inlet; 709 ACCUMULATOR_TOP.Outlet to SPLITTER_TOP.Inlet; 710 SPLITTER_TOP.Outlet2 to PUMP.Inlet; 711 PUMP.Outlet to TRAYS(1).InletL; 712 TRAYS(NumberOfTrays).OutletL to ACCUMULATOR_BOTTOM.Inlet; 713 ACCUMULATOR_BOTTOM.Outlet to SPLITTER_BOTTOM.Inlet; 714 SPLITTER_BOTTOM.Outlet2 to REBOILER.InletL; 607 715 608 716 #Connectors 609 HeatToCondenser to CONDENSER.InletQ; 610 HeatToReboiler to REBOILER.InletQ; 611 HeatToBottomVessel to TANKbottom.InletQ; 612 HeatToTopVessel to TANKtop.InletQ; 613 SPLITTERtop.Outlet1 to ConnectorSplitterTop; 614 SPLITTERbottom.Outlet1 to ConnectorSplitterBottom; 615 616 end 617 618 619 #* ------------------------------------------------------------------- 620 * Distillation Column model with: 621 * 622 * - NumberOfTrays like tray; 623 * - a vessel in the bottom of column; 624 * - a splitter who separate the bottom product and the stream to reboiler; 625 * - steady state reboiler (thermosyphon); 626 * - a dynamic condenser without subcooling; 627 * - a splitter which separate reflux and distillate; 628 * - a pump in reflux stream. 629 * 630 * ------------------------------------------------------------------*# 717 ConnectorHeatCondenser to CONDENSER.InletQ; 718 ConnectorHeatReboiler to REBOILER.InletQ; 719 ConnectorHeatBottomAccumulator to ACCUMULATOR_BOTTOM.InletQ; 720 ConnectorHeatTopAccumulator to ACCUMULATOR_TOP.InletQ; 721 SPLITTER_TOP.Outlet1 to ConnectorSplitterTop; 722 SPLITTER_BOTTOM.Outlet1 to ConnectorSplitterBottom; 723 724 end 725 631 726 Model Distillation_thermosyphon_cond as Section_ColumnBasic 632 727 ATTRIBUTES … … 662 757 663 758 VARIABLES 664 665 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.41,Protected = true); 666 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.515,Protected = true); 667 668 CONDENSER as condenser; 669 SPLITTERtop as splitter; 670 PUMP as pump; 671 TANKbottom as tank; 672 SPLITTERbottom as splitter; 673 REBOILER as reboilerSteady; 759 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 760 # Column Vapour and Liquid Draw Sides 761 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 762 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.379,Protected = true); 763 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.425,Protected = true); 764 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 765 # Column Devices 766 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 767 CONDENSER as condenser (Brief="dynamic condenser without subcooling"); 768 SPLITTER_TOP as splitter (Brief="splitter which separate reflux and distillate"); 769 PUMP as pump (Brief="pump in reflux stream"); 770 ACCUMULATOR_BOTTOM as tank (Brief="vessel in the bottom of column"); 771 SPLITTER_BOTTOM as splitter (Brief="splitter who separate the bottom product and the stream to reboiler"); 772 REBOILER as reboilerSteady (Brief="steady state reboiler (thermosyphon)"); 674 773 alfaTopo as Real; 675 676 out HeatToCondenser as power (Brief="Heat supplied to Condenser",Hidden=true); 677 out HeatToReboiler as power (Brief="Heat supplied to Reboiler",Hidden=true); 678 out HeatToBottomVessel as power (Brief="Heat supplied to Bottom Vessel",Hidden=true); 679 680 out VapourDistillate as vapour_stream (Brief="Vapour outlet stream From Top Condenser", PosX=0.74, PosY=0); 681 in ConnectorCondenserVout as stream (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true); 682 683 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.30); 684 in ConnectorSplitterTop as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 685 686 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Bottom Splitter", PosX=1, PosY=0.999); 687 in ConnectorSplitterBottom as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 774 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 775 # Heat Ports 776 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 777 in HeatToCondenser as power (Brief="Heat supplied to Condenser",PosX=1, PosY=0.035, Protected=true); 778 in HeatToReboiler as power (Brief="Heat supplied to Reboiler", PosX=1, PosY=0.865,Protected=true); 779 in HeatToBottomAccumulator as power (Brief="Heat supplied to Bottom Accumulator",PosX=0, PosY=0.92,Protected=true); 780 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 781 # Column Top and Bottom product 782 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 783 out VapourDistillate as vapour_stream (Brief="Vapour outlet stream From Top Condenser", PosX=0.665, PosY=0); 784 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.20); 785 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Bottom Splitter", PosX=0.18, PosY=1); 786 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 787 # Column Model Connectors 788 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 789 in ConnectorSplitterBottom as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 790 in ConnectorSplitterTop as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 791 in ConnectorCondenserVout as stream (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true); 792 793 ConnectorHeatReboiler as power (Brief="Connector for Heat supplied to Reboiler", Hidden=true); 794 ConnectorHeatCondenser as power (Brief="Connector for Heat supplied to Condenser", Hidden=true); 795 ConnectorHeatBottomAccumulator as power (Brief="Connector for Heat supplied to Bottom Accumulator", Hidden=true); 688 796 689 797 EQUATIONS 798 # Heat Connector Equations 799 HeatToCondenser = ConnectorHeatCondenser; 800 HeatToReboiler = ConnectorHeatReboiler; 801 HeatToBottomAccumulator = ConnectorHeatBottomAccumulator; 690 802 691 803 # Condenser Connector Equations … … 737 849 738 850 #liquid 739 CONDENSER.OutletL to SPLITTER top.Inlet;740 SPLITTER top.Outlet2 to PUMP.Inlet;851 CONDENSER.OutletL to SPLITTER_TOP.Inlet; 852 SPLITTER_TOP.Outlet2 to PUMP.Inlet; 741 853 PUMP.Outlet to TRAYS(1).InletL; 742 TRAYS(NumberOfTrays).OutletL to TANKbottom.Inlet;743 TANKbottom.Outlet to SPLITTERbottom.Inlet;744 SPLITTER bottom.Outlet2 to REBOILER.InletL;854 TRAYS(NumberOfTrays).OutletL to ACCUMULATOR_BOTTOM.Inlet; 855 ACCUMULATOR_BOTTOM.Outlet to SPLITTER_BOTTOM.Inlet; 856 SPLITTER_BOTTOM.Outlet2 to REBOILER.InletL; 745 857 746 858 #Connectors 747 HeatToCondenser to CONDENSER.InletQ; 748 HeatToReboiler to REBOILER.InletQ; 749 HeatToBottomVessel to TANKbottom.InletQ; 750 CONDENSER.OutletV to ConnectorCondenserVout; 751 SPLITTERtop.Outlet1 to ConnectorSplitterTop; 752 SPLITTERbottom.Outlet1 to ConnectorSplitterBottom; 753 754 end 755 756 #* ------------------------------------------------------------------- 757 * Distillation Column model with: 758 * 759 * - NumberOfTrays like tray; 760 * - a kettle reboiler; 761 * - a steady state condenser with subcooling; 762 * - a vessel drum (layed cilinder); 763 * - a splitter which separate reflux and distillate; 764 * - a pump in reflux stream. 765 * 766 * ------------------------------------------------------------------*# 859 ConnectorHeatCondenser to CONDENSER.InletQ; 860 ConnectorHeatReboiler to REBOILER.InletQ; 861 ConnectorHeatBottomAccumulator to ACCUMULATOR_BOTTOM.InletQ; 862 CONDENSER.OutletV to ConnectorCondenserVout; 863 SPLITTER_TOP.Outlet1 to ConnectorSplitterTop; 864 SPLITTER_BOTTOM.Outlet1 to ConnectorSplitterBottom; 865 866 end 867 767 868 Model Distillation_kettle_subcooling as Section_ColumnBasic 768 869 … … 800 901 801 902 VARIABLES 802 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.46,Protected = true); 803 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.58,Protected = true); 804 805 CONDENSER as condenserSteady; 806 TANKtop as tank_cylindrical; 807 SPLITTERtop as splitter; 808 PUMP as pump; 809 REBOILER as reboiler; 810 alfaTopo as Real; 811 812 out HeatToCondenser as power (Brief="Heat supplied to Condenser",Hidden=true); 813 out HeatToReboiler as power (Brief="Heat supplied to Reboiler",Hidden=true); 814 out HeatToTopVessel as power (Brief="Heat supplied to Top Vessel",Hidden=true); 815 816 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.33); 817 in ConnectorSplitterOut as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 818 819 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=1, PosY=1); 820 in ConnectorReboilerLout as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 821 822 RebNoFlow as sourceNoFlow (Brief="No Inlet Flow to Reboiler",Hidden=true); 903 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 904 # Column Vapour and Liquid Draw Sides 905 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 906 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.41,Protected = true); 907 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.45,Protected = true); 908 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 909 # Column Devices 910 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 911 CONDENSER as condenserSteady (Brief="steady state condenser with subcooling"); 912 ACCUMULATOR as tank_cylindrical (Brief="vessel drum (layed cilinder)"); 913 SPLITTER as splitter (Brief="splitter which separate reflux and distillate"); 914 PUMP as pump (Brief="pump in reflux stream"); 915 REBOILER as reboiler (Brief="kettle reboiler"); 916 alfaTopo as Real; 917 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 918 # Heat Ports 919 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 920 in HeatToCondenser as power (Brief="Heat supplied to Condenser", PosX=1, PosY=0.065, Protected=true); 921 in HeatToReboiler as power (Brief="Heat supplied to Reboiler", PosX=1, PosY=0.905, Protected=true); 922 in HeatToAccumulator as power (Brief="Heat supplied to Top Vessel", PosX=1, PosY=0.195, Protected=true); 923 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 924 # Column Model Connectors 925 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 926 in ConnectorSplitterOut as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 927 in ConnectorReboilerLout as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 928 ConnectorHeatReboiler as power (Brief="Connector for Heat supplied to Reboiler", Hidden=true); 929 ConnectorHeatCondenser as power (Brief="Connector for Heat supplied to Condenser", Hidden=true); 930 ConnectorHeatAccumulator as power (Brief="Connector for Heat supplied to TopVessel", Hidden=true); 931 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 932 # Column Top and Bottom product 933 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 934 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.24); 935 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=0.67, PosY=1); 823 936 824 937 EQUATIONS 938 939 #Heat Connectors 940 HeatToCondenser = ConnectorHeatCondenser; 941 HeatToReboiler = ConnectorHeatReboiler; 942 HeatToAccumulator = ConnectorHeatAccumulator; 825 943 826 944 # Splitter Connector Equations … … 866 984 867 985 #liquid 868 CONDENSER.OutletL to TANKtop.Inlet;869 TANKtop.Outlet to SPLITTERtop.Inlet;870 SPLITTER top.Outlet2to PUMP.Inlet;986 CONDENSER.OutletL to ACCUMULATOR.Inlet; 987 ACCUMULATOR.Outlet to SPLITTER.Inlet; 988 SPLITTER.Outlet2 to PUMP.Inlet; 871 989 PUMP.Outlet to TRAYS(1).InletL; 872 990 TRAYS(NumberOfTrays).OutletL to REBOILER.InletL; 873 991 874 992 #Connectors 875 HeatToCondenserto CONDENSER.InletQ;876 HeatToReboilerto REBOILER.InletQ;877 HeatToTopVessel to TANKtop.InletQ;878 879 SPLITTER top.Outlet1to ConnectorSplitterOut;993 ConnectorHeatCondenser to CONDENSER.InletQ; 994 ConnectorHeatReboiler to REBOILER.InletQ; 995 ConnectorHeatAccumulator to ACCUMULATOR.InletQ; 996 997 SPLITTER.Outlet1 to ConnectorSplitterOut; 880 998 REBOILER.OutletL to ConnectorReboilerLout; 881 999 882 1000 end 883 1001 884 885 #*----------------------------------------------------------------------886 * Model of a rectifier containing:887 * - NumberOfTrays like tray;888 * - dymamic condenser without subcooling;889 * - a splitter which separate reflux and distillate;890 * - a pump in reflux stream;891 *---------------------------------------------------------------------*#892 1002 Model Rectifier as Section_ColumnBasic 893 1003 … … 920 1030 921 1031 VARIABLES 922 923 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.46,Protected = true); 924 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.58,Protected = true); 925 926 CONDENSER as condenser; 927 SPLITTERtop as splitter; 928 PUMP as pump; 929 alfaTopo as Real; 930 931 out VapourDistillate as vapour_stream (Brief="Vapour outlet stream From Top Condenser", PosX=0.67, PosY=0); 932 in ConnectorCondenserVout as stream (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true); 933 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.07, PosY=1); 934 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.20, PosY=1); 935 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.33); 936 937 out HeatToCondenser as power (Brief="Heat supplied to Condenser",Hidden=true); 938 in ConnectorSplitterOut as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 939 VapourConnector as stream (Brief="Vapour connection at the middle TRAYS", PosX=0.55, PosY=0,Hidden=true); 1032 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1033 # Column Vapour and Liquid Draw Sides 1034 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1035 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.45,Protected = true); 1036 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.50,Protected = true); 1037 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1038 # Column Devices 1039 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1040 CONDENSER as condenser (Brief="dymamic condenser without subcooling"); 1041 SPLITTER as splitter (Brief="splitter which separate reflux and distillate"); 1042 PUMP as pump (Brief="pump in reflux stream"); 1043 alfaTopo as Real; 1044 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1045 # Column Top product 1046 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1047 out VapourDistillate as vapour_stream (Brief="Vapour outlet stream From Top Condenser", PosX=0.66, PosY=0); 1048 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.24); 1049 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1050 # Heat Port 1051 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1052 in HeatToCondenser as power (Brief="Heat supplied to Condenser",PosX=1, PosY=0.04, Protected = true); 1053 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1054 # Column Bottom Outlets 1055 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1056 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.07, PosY=1); 1057 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.32, PosY=1); 1058 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1059 # Column Model Connectors 1060 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1061 in ConnectorSplitterOut as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 1062 in ConnectorCondenserVout as stream (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true); 1063 VapourConnector as stream (Brief="Vapour connection at the middle TRAYS", PosX=0.55, PosY=0,Hidden=true); 1064 ConnectorHeatCondenser as power (Brief="Connector for Heat supplied to Condenser", Hidden=true); 940 1065 941 1066 EQUATIONS … … 954 1079 end 955 1080 1081 HeatToCondenser = ConnectorHeatCondenser; 1082 956 1083 # Condenser Connector Equations 957 1084 ConnectorCondenserVout.T = VapourDistillate.T; … … 996 1123 997 1124 #liquid 998 CONDENSER.OutletL to SPLITTERtop.Inlet;999 SPLITTER top.Outlet2to PUMP.Inlet;1000 PUMP.Outlet to TRAYS(1).InletL;1125 CONDENSER.OutletL to SPLITTER.Inlet; 1126 SPLITTER.Outlet2 to PUMP.Inlet; 1127 PUMP.Outlet to TRAYS(1).InletL; 1001 1128 1002 1129 #Connectors 1003 HeatToCondenser to CONDENSER.InletQ; 1004 VapourConnector to TRAYS(NumberOfTrays).InletV; 1005 SPLITTERtop.Outlet1 to ConnectorSplitterOut; 1006 CONDENSER.OutletV to ConnectorCondenserVout; 1007 1008 end 1009 1010 1011 #* ------------------------------------------------------------------- 1012 * Rectifier Column with: 1013 * 1014 * - NumberOfTrays like tray; 1015 * - a steady state condenser with subcooling; 1016 * - a vessel drum (layed cilinder); 1017 * - a splitter which separate reflux and distillate; 1018 * - a pump in reflux stream. 1019 * 1020 * ------------------------------------------------------------------*# 1130 ConnectorHeatCondenser to CONDENSER.InletQ; 1131 VapourConnector to TRAYS(NumberOfTrays).InletV; 1132 SPLITTER.Outlet1 to ConnectorSplitterOut; 1133 CONDENSER.OutletV to ConnectorCondenserVout; 1134 1135 end 1021 1136 1022 1137 Model Rectifier_subcooling as Section_ColumnBasic … … 1051 1166 1052 1167 VARIABLES 1053 CONDENSER as condenserSteady; 1054 TANKtop as tank_cylindrical; 1055 SPLITTERtop as splitter; 1056 PUMP as pump; 1057 alfaTopo as Real; 1058 1059 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.18, PosY=1); 1060 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.25, PosY=1); 1061 1062 out HeatToCondenser as power (Brief="Heat supplied to Condenser",Hidden=true); 1063 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.47); 1064 in ConnectorSplitterTop as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 1065 out HeatToTopVessel as power (Brief="Heat supplied to Top Vessel",Hidden=true); 1066 1067 VapourConnector as stream (Brief="Vapour connection at the middle TRAYS", PosX=0.55, PosY=0,Hidden=true); 1168 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1169 # Column Vapour and Liquid Draw Sides 1170 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1171 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.485,Protected = true); 1172 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.535,Protected = true); 1173 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1174 # Column Devices 1175 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1176 CONDENSER as condenserSteady (Brief="steady state condenser with subcooling"); 1177 ACCUMULATOR as tank_cylindrical (Brief="vessel drum (layed cilinder)"); 1178 SPLITTER as splitter (Brief="plitter which separate reflux and distillate"); 1179 PUMP as pump (Brief="pump in reflux stream"); 1180 alfaTopo as Real; 1181 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1182 # Column Bottom outlets 1183 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1184 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.07, PosY=1); 1185 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.32, PosY=1); 1186 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1187 # Heat Ports 1188 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1189 in HeatToCondenser as power (Brief="Heat supplied to Condenser", PosX=1, PosY=0.070, Protected=true); 1190 in HeatToAccumulator as power (Brief="Heat supplied to Top Accumulator", PosX=1, PosY=0.23, Protected=true); 1191 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1192 # Column Top Product 1193 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1194 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.285); 1195 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1196 # Column Connectors 1197 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1198 in ConnectorSplitterTop as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 1199 VapourConnector as stream (Brief="Vapour connection at the middle TRAYS", PosX=0.55, PosY=0,Hidden=true); 1200 ConnectorHeatCondenser as power (Brief="Connector for Heat supplied to Condenser", Hidden=true); 1201 ConnectorHeatAccumulator as power (Brief="Connector for Heat supplied to Top Accumulator", Hidden=true); 1068 1202 1069 1203 EQUATIONS 1070 1204 #Heat Connectors 1205 HeatToCondenser = ConnectorHeatCondenser; 1206 HeatToAccumulator = ConnectorHeatAccumulator; 1207 1071 1208 LiquidOutlet.F= TRAYS(NumberOfTrays).OutletL.F; 1072 1209 LiquidOutlet.T = TRAYS(NumberOfTrays).OutletL.T; … … 1105 1242 1106 1243 #liquid 1107 CONDENSER.OutletL to TANKtop.Inlet;1108 TANKtop.Outlet to SPLITTERtop.Inlet;1109 SPLITTER top.Outlet2 to PUMP.Inlet;1244 CONDENSER.OutletL to ACCUMULATOR.Inlet; 1245 ACCUMULATOR.Outlet to SPLITTER.Inlet; 1246 SPLITTER.Outlet2 to PUMP.Inlet; 1110 1247 PUMP.Outlet to TRAYS(1).InletL; 1111 1248 1112 1249 #Connectors 1113 1250 VapourConnector to TRAYS(NumberOfTrays).InletV; 1114 HeatToCondenser to CONDENSER.InletQ; 1115 SPLITTERtop.Outlet1 to ConnectorSplitterTop; 1116 HeatToTopVessel to TANKtop.InletQ; 1117 1118 end 1119 1120 1121 #* ------------------------------------------------------------------- 1122 * Reboiled Stripping Column model with: 1123 * 1124 * - NumberOfTrays like tray; 1125 * - a kettle reboiler; 1126 * 1127 * ------------------------------------------------------------------*# 1251 ConnectorHeatCondenser to CONDENSER.InletQ; 1252 SPLITTER.Outlet1 to ConnectorSplitterTop; 1253 ConnectorHeatAccumulator to ACCUMULATOR.InletQ; 1254 1255 end 1256 1128 1257 Model Reboiled_Stripping_kettle as Section_ColumnBasic 1129 1258 … … 1152 1281 1153 1282 VARIABLES 1154 1155 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.34,Protected = true); 1156 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.49,Protected = true); 1157 1158 in LiquidInlet as stream (Brief="Liquid Inlet in the section", PosX=0.20, PosY=0); 1159 out VapourOutlet as vapour_stream (Brief="Vapour Outlet in the section", PosX=0.05, PosY=0); 1160 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=1, PosY=1); 1161 in ConnectorReboilerLout as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 1162 out HeatToReboiler as power (Brief="Heat supplied to Reboiler",Hidden=true); 1163 1164 LiquidConnector as stream (Brief="Liquid connection at the middle TRAYS", PosX=0.75, PosY=1,Hidden=true); 1165 RebNoFlow as sourceNoFlow (Brief="No Inlet Flow to Reboiler",Hidden=true); 1166 1167 REBOILER as reboiler; 1283 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1284 # Column Vapour and Liquid Draw Sides 1285 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1286 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.28,Protected = true); 1287 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.33,Protected = true); 1288 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1289 # Column Devices 1290 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1291 REBOILER as reboiler (Brief="Kettle Reboiler"); 1292 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1293 # Heat Port 1294 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1295 in HeatToReboiler as power (Brief="Heat supplied to Reboiler",PosX=1, PosY=0.865,Protected=true); 1296 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1297 # Column Top Outlets 1298 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1299 in LiquidInlet as stream (Brief="Liquid Inlet in the section", PosX=0.30, PosY=0); 1300 out VapourOutlet as vapour_stream (Brief="Vapour Outlet in the section", PosX=0.07, PosY=0); 1301 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1302 # Column Bottom Product 1303 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1304 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=0.68, PosY=1); 1305 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1306 # Column Connectors 1307 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1308 in ConnectorReboilerLout as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 1309 LiquidConnector as stream (Brief="Liquid connection at the middle TRAYS", PosX=0.75, PosY=1,Hidden=true); 1310 ConnectorHeatReboiler as power (Brief="Connector for Heat supplied to Reboiler", Hidden=true); 1168 1311 1169 1312 CONNECTIONS … … 1175 1318 1176 1319 #Connectors 1177 REBOILER.OutletL to ConnectorReboilerLout;1320 REBOILER.OutletL to ConnectorReboilerLout; 1178 1321 LiquidConnector to TRAYS(1).InletL; 1179 HeatToReboilerto REBOILER.InletQ;1322 ConnectorHeatReboiler to REBOILER.InletQ; 1180 1323 1181 1324 EQUATIONS 1182 1325 #Heat Connectors 1326 HeatToReboiler = ConnectorHeatReboiler; 1327 1183 1328 LiquidConnector.F= LiquidInlet.F; 1184 1329 LiquidConnector.T = LiquidInlet.T; … … 1214 1359 end 1215 1360 1216 1217 #* -------------------------------------------------------------------1218 * Reboiled Stripping Column model with:1219 *1220 * - NumberOfTrays like tray;1221 * - a vessel in the bottom of column;1222 * - a splitter which separate the bottom product and the stream to reboiler;1223 * - steady state reboiler (thermosyphon);1224 *1225 * ------------------------------------------------------------------*#1226 1361 Model Reboiled_Stripping_thermosyphon as Section_ColumnBasic 1227 1362 … … 1249 1384 * (NoComps - 1) OutletL (OR OutletV) compositions. 1250 1385 "; 1251 1386 1252 1387 VARIABLES 1253 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.32,Protected = true); 1254 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.44,Protected = true); 1255 1256 in LiquidInlet as stream (Brief="Liquid Inlet in the section", PosX=0.32, PosY=0); 1257 out VapourOutlet as vapour_stream (Brief="Vapour Outlet in the section", PosX=0.20, PosY=0); 1258 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=1, PosY=1); 1259 LiquidConnector as stream (Brief="Liquid connection at the middle TRAYS", PosX=0.75, PosY=1,Hidden=true); 1260 out HeatToReboiler as power (Brief="Heat supplied to Reboiler",Hidden=true); 1261 out HeatToTANKbottom as power (Brief="Heat supplied to Bottom Vessel",Hidden=true); 1262 in ConnectorSplitterBottom as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 1263 1264 REBOILER as reboilerSteady; 1265 SPLITTERbottom as splitter; 1266 TANKbottom as tank; 1388 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1389 # Column Vapour and Liquid Draw Sides 1390 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1391 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.28,Protected = true); 1392 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.33,Protected = true); 1393 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1394 # Column Devices 1395 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1396 REBOILER as reboilerSteady (Brief="steady state reboiler (thermosyphon)"); 1397 SPLITTER as splitter (Brief="splitter which separate the bottom product and the stream to reboiler"); 1398 ACCUMULATOR as tank (Brief="vessel in the bottom of column"); 1399 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1400 # Heat Ports 1401 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1402 in HeatToReboiler as power (Brief="Heat supplied to Reboiler",PosX=1, PosY=0.84,Protected=true); 1403 in HeatToAccumulator as power (Brief="Heat supplied to Bottom Vessel",PosX=0, PosY=0.91,Protected=true); 1404 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1405 # Column Top Outlets 1406 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1407 in LiquidInlet as stream (Brief="Liquid Inlet in the section", PosX=0.32, PosY=0); 1408 out VapourOutlet as vapour_stream (Brief="Vapour Outlet in the section", PosX=0.07, PosY=0); 1409 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1410 # Column Bottom Product 1411 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1412 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=0.19, PosY=1); 1413 LiquidConnector as stream (Brief="Liquid connection at the middle TRAYS", PosX=0.75, PosY=1,Hidden=true); 1414 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1415 # Column Connectors 1416 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1417 in ConnectorSplitterBottom as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 1418 ConnectorHeatReboiler as power (Brief="Connector for Heat supplied to Reboiler", Hidden=true); 1419 ConnectorHeatAccumulator as power (Brief="Connector for Heat supplied to Bottom Accumulator", Hidden=true); 1267 1420 1268 1421 CONNECTIONS … … 1271 1424 1272 1425 #liquid 1273 TRAYS(NumberOfTrays).OutletL to TANKbottom.Inlet;1274 TANKbottom.Outlet to SPLITTERbottom.Inlet;1275 SPLITTER bottom.Outlet2to REBOILER.InletL;1426 TRAYS(NumberOfTrays).OutletL to ACCUMULATOR.Inlet; 1427 ACCUMULATOR.Outlet to SPLITTER.Inlet; 1428 SPLITTER.Outlet2 to REBOILER.InletL; 1276 1429 1277 1430 #Connectors 1278 LiquidConnector 1279 HeatToReboilerto REBOILER.InletQ;1280 HeatToTANKbottom to TANKbottom.InletQ;1281 SPLITTER bottom.Outlet1to ConnectorSplitterBottom;1431 LiquidConnector to TRAYS(1).InletL; 1432 ConnectorHeatReboiler to REBOILER.InletQ; 1433 ConnectorHeatAccumulator to ACCUMULATOR.InletQ; 1434 SPLITTER.Outlet1 to ConnectorSplitterBottom; 1282 1435 1283 1436 EQUATIONS 1284 1437 #Heat Connectors 1438 HeatToReboiler = ConnectorHeatReboiler; 1439 HeatToAccumulator = ConnectorHeatAccumulator; 1440 1285 1441 ConnectorSplitterBottom.T = BottomProduct.T; 1286 1442 ConnectorSplitterBottom.P = BottomProduct.P; … … 1312 1468 VapourDrawOffFlow = VapourDrawOff.F; 1313 1469 LiquidDrawOffFlow = LiquidDrawOff.F; 1314 1315 end 1316 1317 #* ------------------------------------------------------------------- 1318 * Reactive Distillation Column 1319 * 1320 * ------------------------------------------------------------------*# 1470 1471 end 1472 1321 1473 Model ReactiveDistillation 1322 1474 … … 1351 1503 1352 1504 PARAMETERS 1353 1354 outer PP as Plugin(Type="PP");1355 outer NComp as Integer; 1356 1357 NumberOfTrays as Integer(Brief="Number of TRAYS", Default=2); 1358 1359 FeedTrayIndex(NumberOfTrays) as Integer (Brief="Number of trays", Default=0,Hidden=true);1360 LiqSideTrayIndex(NumberOfTrays) as Integer (Brief="Number of trays", Default=0,Hidden=true);1361 VapSideTrayIndex(NumberOfTrays) as Integer (Brief="Number of trays", Default=0,Hidden=true);1362 FeedTrayLocation as Integer(Brief="Feed tray Location", Default=2);1363 LiquidSideStreamLocation as Integer(Brief="Liquid Side Stream Location", Default=2);1364 VapourSideStreamLocation as Integer(Brief="Vapour Side Stream Location", Default=2);1365 1366 alfacond as Real; 1367 1368 VapourFlow 1505 outer PP as Plugin (Type="PP"); 1506 outer NComp as Integer (Brief="Number of Components"); 1507 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1508 # Section Column Feed Tray - Side Streams Location and Numbering 1509 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1510 NumberOfTrays as Integer (Brief="Number of TRAYS", Default=2); 1511 FeedTrayIndex(NumberOfTrays) as Integer (Brief="Feed Tray Index", Default=0,Hidden=true); 1512 LiqSideTrayIndex(NumberOfTrays) as Integer (Brief="Liquid Side Tray Index", Default=0,Hidden=true); 1513 VapSideTrayIndex(NumberOfTrays) as Integer (Brief="Vapour Side Tray Index", Default=0,Hidden=true); 1514 FeedTrayLocation as Integer (Brief="Feed tray Location", Default=2); 1515 LiquidSideStreamLocation as Integer (Brief="Liquid Side Stream Location", Default=2); 1516 VapourSideStreamLocation as Integer (Brief="Vapour Side Stream Location", Default=2); 1517 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1518 # Section Column Flow Model for Liquid and Vapour 1519 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1520 VapourFlow as Switcher (Valid = ["on", "off"], Default = "off",Hidden=true); 1369 1521 TrayVapourFlow as Switcher (Valid = ["on", "off"], Default = "off",Hidden=true); 1370 TrayLiquidFlow as Switcher (Valid = ["on", "off"], Default = "off",Hidden=true); 1371 1372 V as volume (Brief="Total Volume of the tray",Hidden=true); 1373 Q as power (Brief="Rate of heat supply",Hidden=true); 1374 Ap as area (Brief="Plate area = Atray - Adowncomer",Hidden=true); 1375 Ah as area (Brief="Total holes area",Hidden=true); 1376 lw as length (Brief="Weir length",Hidden=true); 1377 g as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 1378 hw as length (Brief="Weir height",Hidden=true); 1379 beta as fraction (Brief="Aeration fraction"); 1380 alfa as fraction (Brief="Dry pressure drop coefficient"); 1522 TrayLiquidFlow as Switcher (Valid = ["on", "off"], Default = "off",Hidden=true); 1523 alfacond as Real; 1524 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1525 # Section Column Tray Geometry and Auxiliar Parameters 1526 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1527 V as volume (Brief="Total Volume of the tray",Hidden=true); 1528 Q as power (Brief="Rate of heat supply",Hidden=true); 1529 Ap as area (Brief="Plate area = Atray - Adowncomer",Hidden=true); 1530 Ah as area (Brief="Total holes area",Hidden=true); 1531 lw as length (Brief="Weir length",Hidden=true); 1532 g as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 1533 hw as length (Brief="Weir height",Hidden=true); 1534 beta as fraction (Brief="Aeration fraction"); 1535 alfa as fraction (Brief="Dry pressure drop coefficient"); 1381 1536 1382 1537 VolumeOfTray as volume (Brief="Total Volume of the tray"); 1383 1538 HeatSupply as heat_rate (Brief="Rate of heat supply"); 1384 PlateArea as area(Brief="Plate area = Atray - Adowncomer");1385 HolesArea as area(Brief="Total holes area");1386 WeirLength 1387 WeirHeight 1539 PlateArea as area (Brief="Plate area = Atray - Adowncomer"); 1540 HolesArea as area (Brief="Total holes area"); 1541 WeirLength as length (Brief="Weir length"); 1542 WeirHeight as length (Brief="Weir height"); 1388 1543 1389 1544 stoic(NComp) as Real(Brief="Stoichiometric matrix"); 1390 1545 Hr as energy_mol; 1391 1546 1392 TopTemperature as temperature;1393 TbottomTemperature as temperature;1394 LevelFraction as fraction (Brief = "Level Fraction");1395 1396 TopComposition(NComp) as fraction (Brief = "Component Molar Fraction at Top");1397 BottomComposition(NComp) as fraction (Brief = "Component Molar Fraction at Bottom");1398 1399 1547 SET 1400 1548 1401 FeedTrayIndex(FeedTrayLocation) 1549 FeedTrayIndex(FeedTrayLocation) =1; 1402 1550 VapSideTrayIndex(FeedTrayLocation) =1; 1403 1551 LiqSideTrayIndex(FeedTrayLocation) =1; … … 1411 1559 1412 1560 VARIABLES 1413 1414 in FeedTray as stream (Brief="Feed stream", PosX=0, PosY=0.55); 1415 1416 VapourDrawOffFlow as flow_mol (Brief = "Stream Molar Flow Rate"); 1417 LiquidDrawOffFlow as flow_mol (Brief = "Stream Molar Flow Rate"); 1418 MurphreeEff as Real (Brief = "Murphree efficiency"); 1419 1420 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.50,Protected = true); 1421 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.61,Protected = true); 1422 1423 RebNoFlow as sourceNoFlow (Brief="No Inlet Flow to Reboiler",Hidden=true); 1424 1425 in HeatToReboiler as power (Brief="Heat supplied to Reboiler", PosX=1, PosY=0.94); 1426 in HeatToCondenser as power (Brief="Heat supplied to Condenser", PosX=1, PosY=0.19); 1427 1561 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1562 # Tray Initialization For the Whole Column Section 1563 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1564 INITIALIZATION as InitializeSection (Brief = "Column Model Initialization"); 1565 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1566 # Column Feed - Side Stream Flow and Murphree Efficiency 1567 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1568 in FeedTray as stream (Brief="Feed stream", PosX=0, PosY=0.55); 1569 VapourDrawOffFlow as flow_mol (Brief = "Stream Molar Flow Rate"); 1570 LiquidDrawOffFlow as flow_mol (Brief = "Stream Molar Flow Rate"); 1571 MurphreeEff as Real (Brief = "Murphree efficiency"); 1572 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1573 # Column Vapour and Liquid Draw Sides 1574 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1575 out VapourDrawOff as vapour_stream (Brief="Vapour Outlet in the section", PosX=1, PosY=0.395,Protected = true); 1576 out LiquidDrawOff as liquid_stream (Brief="Liquid Outlet in the section", PosX=1, PosY=0.44,Protected = true); 1577 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1578 # Heat Ports 1579 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1580 in HeatToReboiler as power (Brief="Heat supplied to Reboiler", PosX=1, PosY=0.89); 1581 in HeatToCondenser as power (Brief="Heat supplied to Condenser", PosX=1, PosY=0.07); 1582 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1583 # Column Devices 1584 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1428 1585 TRAYS(NumberOfTrays) as trayReac; 1429 CONDENSER as condenserReact; 1430 REBOILER as reboilerReact; 1431 SPLITTER as splitter; 1432 PUMP as pump; 1433 1434 out VapourDistillate as vapour_stream (Brief="Vapour outlet stream From Top Condenser", PosX=0.57, PosY=0); 1435 in ConnectorCondenserVout as stream (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true); 1436 1437 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.39); 1438 in ConnectorSplitterOut as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 1439 1440 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=0.57, PosY=1); 1441 in ConnectorReboilerLout as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 1442 1443 1444 # Control 1445 out TRI as control_signal (Brief="Temperature of Reboiler Indicator", PosX=1, PosY=0.78); 1446 out LRI as control_signal (Brief="Level of Reboiler Indicator", PosX=1, PosY=0.85); 1447 1448 out TCI as control_signal (Brief="Temperature of Condenser Indicator", PosX=1, PosY=0.01); 1449 out LCI as control_signal (Brief="Level of Condenser Indicator", PosX=1, PosY=0.09); 1586 CONDENSER as condenserReact; 1587 REBOILER as reboilerReact; 1588 SPLITTER as splitter; 1589 PUMP as pump; 1590 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1591 # Column Outlets 1592 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1593 out VapourDistillate as vapour_stream (Brief="Vapour outlet stream From Condenser", PosX=0.59, PosY=0); 1594 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Splitter", PosX=1, PosY=0.23); 1595 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=0.67, PosY=1); 1596 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1597 # Column Connectors 1598 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1599 in ConnectorCondenserVout as stream (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true); 1600 in ConnectorSplitterOut as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 1601 in ConnectorReboilerLout as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 1602 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1603 # Column Control Ports 1604 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1605 out TRI as control_signal (Brief="Temperature of Reboiler Indicator", PosX=1, PosY=0.83); 1606 out LRI as control_signal (Brief="Level of Reboiler Indicator", PosX=1, PosY=0.855); 1607 out TCI as control_signal (Brief="Temperature of Condenser Indicator", PosX=1, PosY=0.01); 1608 out LCI as control_signal (Brief="Level of Condenser Indicator", PosX=1, PosY=0.04); 1450 1609 1451 1610 CONNECTIONS 1452 1611 #vapor 1453 REBOILER.OutletV 1454 TRAYS(1).OutletV 1612 REBOILER.OutletV to TRAYS(NumberOfTrays).InletV; 1613 TRAYS(1).OutletV to CONDENSER.InletV; 1455 1614 TRAYS([2:NumberOfTrays]).OutletV to TRAYS([1:NumberOfTrays-1]).InletV; 1456 1615 1457 1616 #liquid 1458 CONDENSER.OutletL 1459 SPLITTER.Outlet2 1460 PUMP.Outlet 1617 CONDENSER.OutletL to SPLITTER.Inlet; 1618 SPLITTER.Outlet2 to PUMP.Inlet; 1619 PUMP.Outlet to TRAYS(1).InletL; 1461 1620 TRAYS([1:NumberOfTrays-1]).OutletL to TRAYS([2:NumberOfTrays]).InletL; 1462 TRAYS(NumberOfTrays).OutletL 1621 TRAYS(NumberOfTrays).OutletL to REBOILER.InletL; 1463 1622 1464 1623 #Connectors 1465 RebNoFlow.Outlet to REBOILER.Inlet; 1466 1467 CONDENSER.OutletV to ConnectorCondenserVout; 1468 SPLITTER.Outlet1 to ConnectorSplitterOut; 1469 REBOILER.OutletL to ConnectorReboilerLout; 1624 CONDENSER.OutletV to ConnectorCondenserVout; 1625 SPLITTER.Outlet1 to ConnectorSplitterOut; 1626 REBOILER.OutletL to ConnectorReboilerLout; 1627 1628 INITIAL 1629 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1630 # Tray Initialization 1631 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1632 for i in 1:NumberOfTrays do 1633 1634 "The initial temperature of the TRAYS" 1635 TRAYS(i).OutletL.T = INITIALIZATION.TopTemperature+(INITIALIZATION.BottomTemperature-INITIALIZATION.TopTemperature)*((i-1)/(NumberOfTrays-1)); 1636 1637 "The initial Level of the TRAYS" 1638 TRAYS(i).Level = INITIALIZATION.LevelFraction*hw; 1639 end 1640 1641 for i in 1:NComp-1 do 1642 1643 for j in 1:NumberOfTrays do 1644 1645 "The initial composition of the TRAYS - Normalized" 1646 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)); 1647 end 1648 1649 end 1470 1650 1471 1651 EQUATIONS … … 1542 1722 FeedTray.h = TRAYS.Inlet.h; 1543 1723 1544 HeatToReboiler = REBOILER.InletQ;1545 HeatToCondenser 1724 HeatToReboiler = REBOILER.InletQ; 1725 HeatToCondenser = CONDENSER.InletQ; 1546 1726 1547 1727 "Reboiler Temperature indicator" … … 1588 1768 LiquidDrawOffFlow = LiquidDrawOff.F; 1589 1769 1590 INITIAL 1591 1592 for i in 1:NumberOfTrays do 1593 1594 "The initial temperature of the TRAYS" 1595 TRAYS(i).OutletL.T = TopTemperature+(TbottomTemperature-TopTemperature)*((i-1)/(NumberOfTrays-1)); 1596 1597 "The initial Level of the TRAYS" 1598 TRAYS(i).Level = LevelFraction*hw; 1599 1600 end 1601 1602 for i in 1:NComp-1 do 1603 1604 for j in 1:NumberOfTrays do 1605 1606 "The initial composition of the TRAYS" 1607 TRAYS(j).OutletL.z(i) = TopComposition(i) +(BottomComposition(i)-TopComposition(i) )*((j-1)/(NumberOfTrays-1)); 1608 1609 end 1610 1611 end 1612 1613 end 1614 1615 #*---------------------------------------------------------------------- 1616 * Model of a packed column section with: 1617 * - NStages = theoretical number of equilibrium stages. 1618 * 1619 *---------------------------------------------------------------------*# 1770 end 1771 1620 1772 Model Packed_Section_ColumnBasic 1621 1773 ATTRIBUTES … … 1641 1793 PARAMETERS 1642 1794 1643 outer PP 1795 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 1644 1796 outer NComp as Integer; 1645 1797 1646 NumberOfStages as Integer(Brief="Number of Stages", Default=3);1647 FeedStageIndex(NumberOfStages) as Integer 1648 FeedStageLocation as Integer(Brief="Feed Stage Location", Default=2);1649 1650 PackingHeight 1651 HeatSupply 1798 NumberOfStages as Integer (Brief="Number of Stages", Default=3); 1799 FeedStageIndex(NumberOfStages) as Integer (Brief="Number of Stages", Default=0,Hidden=true); 1800 FeedStageLocation as Integer (Brief="Feed Stage Location", Default=2); 1801 1802 PackingHeight as length (Brief="Height of packing"); 1803 HeatSupply as heat_rate (Brief="Rate of heat supply"); 1652 1804 ColumnDiameter as length (Brief="Column diameter"); 1653 VoidFraction as Real (Brief="Void fraction of packing, m^3/m^3"); 1654 ResistanceCoeff as positive (Brief="Resistance coefficient on the liquid load", Default=1); 1655 AreaPerPackingVol as Real (Brief="surface area per packing volume", Unit='m^2/m^3'); 1656 1657 TopStageTemperature as temperature; 1658 BottomStageTemperature as temperature; 1659 1660 TopStageComposition(NComp) as fraction (Brief = "Component Molar Fraction at Top"); 1661 BottomStageComposition(NComp) as fraction (Brief = "Component Molar Fraction at Bottom"); 1662 LiquidMolarHoldup as mol (Brief="Molar liquid holdup", Default=0.01); 1663 1664 V as volume (Brief="Total Volume of the tray",Hidden=true); 1665 g as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 1666 hs as length (Brief="Height of the packing stage",Hidden=true); 1667 ColumnArea as area (Brief="Column Sectional Cross Area",Hidden=true); 1805 VoidFraction as Real (Brief="Void fraction of packing, m^3/m^3"); 1806 ResistanceCoeff as positive (Brief="Resistance coefficient on the liquid load", Default=1); 1807 AreaPerPackingVol as Real (Brief="surface area per packing volume", Unit='m^2/m^3'); 1808 1809 V as volume (Brief="Total Volume of the tray",Hidden=true); 1810 g as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 1811 hs as length (Brief="Height of the packing stage",Hidden=true); 1812 ColumnArea as area (Brief="Column Sectional Cross Area",Hidden=true); 1668 1813 1669 1814 VARIABLES 1815 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1816 # Stages Initialization For the Whole Column Section 1817 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1818 INITIALIZATION as InitializeStage (Brief = "Column Model Initialization"); 1670 1819 in FeedStage as stream (Brief="Feed stream", PosX=0, PosY=0.55); 1671 1820 1672 1821 STAGES(NumberOfStages) as packedStage; 1673 PressureDrop 1822 PressureDrop as pressure; 1674 1823 1675 1824 SET … … 1739 1888 1740 1889 "The initial temperature of the STAGES" 1741 STAGES(i).OutletL.T = TopStageTemperature+(BottomStageTemperature-TopStageTemperature)*((i-1)/(NumberOfStages-1));1890 STAGES(i).OutletL.T = INITIALIZATION.TopStageTemperature+(INITIALIZATION.BottomStageTemperature-INITIALIZATION.TopStageTemperature)*((i-1)/(NumberOfStages-1)); 1742 1891 1743 1892 "The Liquid Holdup of the STAGES" 1744 STAGES(i).ML = LiquidMolarHoldup;1893 STAGES(i).ML = INITIALIZATION.LiquidMolarHoldup; 1745 1894 1746 1895 end … … 1751 1900 1752 1901 "The initial composition of the TRAYS" 1753 STAGES(j).OutletL.z(i) = TopStageComposition(i) +(BottomStageComposition(i)-TopStageComposition(i) )*((j-1)/(NumberOfStages-1));1902 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)); 1754 1903 1755 1904 end … … 1825 1974 end 1826 1975 1827 #*----------------------------------------------------------------------1828 * Model of a packed distillation column containing:1829 * - a section with NStages theoretical stages;1830 * - a kettle reboiler;1831 * - dymamic condenser;1832 * - a splitter which separate reflux and distillate;1833 * - a pump in reflux stream;1834 *---------------------------------------------------------------------*#1835 1976 Model PackedDistillation_kettle_cond as Packed_Section_ColumnBasic 1836 1977 ATTRIBUTES … … 1864 2005 PARAMETERS 1865 2006 1866 VapourFlow as Switcher (Valid = ["on", "off"], Default = "on");2007 VapourFlow as Switcher (Valid = ["on", "off"], Hidden = true ,Default = "on"); 1867 2008 1868 2009 VARIABLES 1869 1870 CONDENSER as condenser; 1871 REBOILER as reboiler; 1872 SPLITTER as splitter; 1873 PUMP as pump; 1874 1875 out HeatToReboiler as power (Brief="Heat supplied to Reboiler",Hidden=true); 1876 out HeatToCondenser as power (Brief="Heat supplied to Condenser",Hidden=true); 1877 1878 RebNoFlow as sourceNoFlow (Brief="No Inlet Flow to Reboiler",Hidden=true); 1879 1880 out VapourDistillate as vapour_stream (Brief="Vapour outlet stream From Top Condenser", PosX=0.57, PosY=0); 1881 in ConnectorCondenserVout as stream (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true); 1882 1883 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.225); 1884 in ConnectorSplitterOut as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 1885 1886 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=0.625, PosY=1); 1887 in ConnectorReboilerLout as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 2010 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2011 # Column Devices 2012 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2013 CONDENSER as condenser (Brief="dymamic condenser"); 2014 REBOILER as reboiler (Brief="kettle reboiler"); 2015 SPLITTER as splitter (Brief="splitter which separate reflux and distillate"); 2016 PUMP as pump (Brief="pump in reflux stream"); 2017 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2018 # Heat Ports 2019 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2020 in HeatToReboiler as power (Brief="Heat supplied to Reboiler",Protected = true, PosX=1, PosY=0.885); 2021 in HeatToCondenser as power (Brief="Heat supplied to Condenser", Protected = true, PosX=1, PosY=0.034); 2022 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2023 # Column Products 2024 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2025 out VapourDistillate as vapour_stream (Brief="Vapour outlet stream From Top Condenser", PosX=0.66, PosY=0); 2026 out LiquidDistillate as liquid_stream (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.20); 2027 out BottomProduct as liquid_stream (Brief="Liquid outlet stream From Reboiler", PosX=0.68, PosY=1); 2028 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2029 # Column Connectors 2030 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2031 in ConnectorCondenserVout as stream (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true); 2032 in ConnectorSplitterOut as stream (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true); 2033 in ConnectorReboilerLout as stream (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true); 2034 ConnectorHeatReboiler as power (Brief="Heat supplied to Reboiler", Hidden=true); 2035 ConnectorHeatCondenser as power (Brief="Heat supplied to Condenser", Hidden=true); 1888 2036 1889 2037 CONNECTIONS … … 1894 2042 1895 2043 #liquid 1896 CONDENSER.OutletL 1897 SPLITTER.Outlet2 1898 PUMP.Outlet 2044 CONDENSER.OutletL to SPLITTER.Inlet; 2045 SPLITTER.Outlet2 to PUMP.Inlet; 2046 PUMP.Outlet to STAGES(1).InletL; 1899 2047 STAGES(NumberOfStages).OutletL to REBOILER.InletL; 1900 2048 1901 2049 #Connectors 1902 HeatToReboilerto REBOILER.InletQ;1903 HeatToCondenser to CONDENSER.InletQ;2050 ConnectorHeatReboiler to REBOILER.InletQ; 2051 ConnectorHeatCondenser to CONDENSER.InletQ; 1904 2052 1905 2053 CONDENSER.OutletV to ConnectorCondenserVout; 1906 SPLITTER.Outlet1 1907 REBOILER.OutletL 2054 SPLITTER.Outlet1 to ConnectorSplitterOut; 2055 REBOILER.OutletL to ConnectorReboilerLout; 1908 2056 1909 2057 EQUATIONS 1910 2058 HeatToReboiler = ConnectorHeatReboiler; 2059 HeatToCondenser = ConnectorHeatCondenser; 2060 1911 2061 # Condenser Connector Equations 1912 2062 ConnectorCondenserVout.T = VapourDistillate.T; … … 1936 2086 STAGES(NumberOfStages).InletV.F = 0 * 'mol/s'; 1937 2087 when REBOILER.OutletV.P > STAGES(NumberOfStages).OutletV.P + 1e-1 * 'atm' switchto "on"; 1938 1939 end 1940 1941 end 1942 2088 end 2089 2090 end 2091 -
branches/gui/eml/stage_separators/condenser.mso
r719 r721 162 162 Model condenserReact 163 163 ATTRIBUTES 164 Pallete = true;164 Pallete = false; 165 165 Icon = "icon/Condenser"; 166 166 Brief = "Model of a Condenser with reaction in liquid phase."; … … 183 183 "; 184 184 185 186 outer PP as Plugin(Type="PP");185 PARAMETERS 186 outer PP as Plugin(Type="PP"); 187 187 outer NComp as Integer; 188 V as volume (Brief="Condenser total volume"); 189 Across as area (Brief="Cross Section Area of reboiler"); 190 191 stoic(NComp) as Real(Brief="Stoichiometric matrix"); 192 Hr as energy_mol; 193 194 VARIABLES 195 in InletV as stream(Brief="Vapour inlet stream", PosX=0.1164, PosY=0, Symbol="_{inV}"); 196 out OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.4513, PosY=1, Symbol="_{outL}"); 197 out OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.4723, PosY=0, Symbol="_{outV}"); 198 InletQ as power (Brief="Cold supplied", PosX=1, PosY=0.6311, Symbol="_{in}"); 199 200 M(NComp) as mol (Brief="Molar Holdup in the tray"); 201 ML as mol (Brief="Molar liquid holdup"); 202 MV as mol (Brief="Molar vapour holdup"); 203 E as energy (Brief="Total Energy Holdup on tray"); 204 vL as volume_mol (Brief="Liquid Molar Volume"); 205 vV as volume_mol (Brief="Vapour Molar volume"); 206 Level as length (Brief="Level of liquid phase"); 207 Vol as volume; 208 r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s'); 209 C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); 210 211 EQUATIONS 212 "Molar Concentration" 188 189 V as volume (Brief="Condenser total volume"); 190 Across as area (Brief="Cross Section Area of reboiler"); 191 192 stoic(NComp) as Real (Brief="Stoichiometric matrix"); 193 Hr as energy_mol; 194 Initial_Level as length (Brief="Initial Level of liquid phase"); 195 Initial_Temperature as temperature (Brief="Initial Temperature of Condenser"); 196 Initial_Composition(NComp) as fraction (Brief="Initial Liquid Composition"); 197 198 VARIABLES 199 200 in InletV as stream (Brief="Vapour inlet stream", PosX=0.1164, PosY=0, Symbol="_{inV}"); 201 out OutletL as liquid_stream (Brief="Liquid outlet stream", PosX=0.4513, PosY=1, Symbol="_{outL}"); 202 out OutletV as vapour_stream (Brief="Vapour outlet stream", PosX=0.4723, PosY=0, Symbol="_{outV}"); 203 InletQ as power (Brief="Cold supplied", PosX=1, PosY=0.6311, Symbol="_{in}"); 204 205 M(NComp) as mol (Brief="Molar Holdup in the tray"); 206 ML as mol (Brief="Molar liquid holdup"); 207 MV as mol (Brief="Molar vapour holdup"); 208 E as energy (Brief="Total Energy Holdup on tray"); 209 vL as volume_mol (Brief="Liquid Molar Volume"); 210 vV as volume_mol (Brief="Vapour Molar volume"); 211 Level as length (Brief="Level of liquid phase"); 212 Vol as volume; 213 r3 as reaction_mol (Brief="Reaction Rates", DisplayUnit = 'mol/l/s'); 214 C(NComp) as conc_mol (Brief="Molar concentration", Lower = -1); 215 216 INITIAL 217 218 Level = Initial_Level; 219 OutletL.T = Initial_Temperature; 220 OutletL.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); 221 222 EQUATIONS 223 "Molar Concentration" 213 224 OutletL.z = vL * C; 214 225 215 226 "Reaction" 216 227 r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s'; 217 228 218 "Component Molar Balance" 219 diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z 220 - OutletV.F*OutletV.z + stoic*r3*ML*vL; 221 222 "Energy Balance" 223 diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h 224 - OutletV.F*OutletV.h + InletQ + Hr * r3 * ML*vL; 225 226 "Molar Holdup" 229 "Component Molar Balance" 230 diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL; 231 232 "Energy Balance" 233 diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h- OutletV.F*OutletV.h + InletQ + Hr * r3 * ML*vL; 234 235 "Molar Holdup" 227 236 M = ML*OutletL.z + MV*OutletV.z; 228 237 229 238 "Energy Holdup" 230 239 E = ML*OutletL.h + MV*OutletV.h - OutletV.P*V; 231 240 232 241 "Mol fraction normalisation" 233 242 sum(OutletL.z)=1.0; 234 243 235 244 "Liquid Volume" 236 245 vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z); 237 "Vapour Volume" 246 247 "Vapour Volume" 238 248 vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 239 249 240 250 "Thermal Equilibrium" 241 251 OutletL.T = OutletV.T; 242 252 243 253 "Mechanical Equilibrium" 244 254 OutletV.P = OutletL.P; 245 255 246 256 "Geometry Constraint" 247 257 V = ML*vL + MV*vV; 248 258 249 259 Vol = ML*vL; 250 260 251 261 "Level of liquid phase" 252 262 Level = ML*vL/Across; 253 263 254 264 "Chemical Equilibrium" 255 265 PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z = 256 266 PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z; -
branches/gui/eml/stage_separators/reboiler.mso
r715 r721 225 225 Model reboilerReact 226 226 ATTRIBUTES 227 Pallete = true;227 Pallete = false; 228 228 Icon = "icon/Reboiler"; 229 229 Brief = "Model of a dynamic reboiler with reaction."; … … 248 248 "; 249 249 250 250 PARAMETERS 251 251 outer PP as Plugin(Type="PP"); 252 252 outer NComp as Integer; … … 257 257 Hr as energy_mol; 258 258 259 VARIABLES 260 in Inlet as stream(Brief="Feed Stream", PosX=0.8127, PosY=0, Symbol="_{in}"); 261 in InletL as stream(Brief="Liquid inlet stream", PosX=0, PosY=0.5254, Symbol="_{inL}"); 262 out OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}"); 263 out OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}"); 264 InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}"); 265 266 M(NComp) as mol (Brief="Molar Holdup in the tray"); 267 ML as mol (Brief="Molar liquid holdup"); 268 MV as mol (Brief="Molar vapour holdup"); 269 E as energy (Brief="Total Energy Holdup on tray"); 270 vL as volume_mol (Brief="Liquid Molar Volume"); 271 vV as volume_mol (Brief="Vapour Molar volume"); 272 Level as length (Brief="Level of liquid phase"); 273 Vol as volume; 274 startup as Real; 275 rhoV as dens_mass; 276 r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s'); 277 C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); 278 279 EQUATIONS 280 "Molar Concentration" 259 Initial_Level as length (Brief="Initial Level of liquid phase"); 260 Initial_Temperature as temperature (Brief="Initial Temperature of Reboiler"); 261 Initial_Composition(NComp) as fraction (Brief="Initial Liquid Composition"); 262 263 VARIABLES 264 in InletL as stream (Brief="Liquid inlet stream", PosX=0, PosY=0.5254, Symbol="_{inL}"); 265 out OutletL as liquid_stream (Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}"); 266 out OutletV as vapour_stream (Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}"); 267 InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}"); 268 269 M(NComp) as mol (Brief="Molar Holdup in the tray"); 270 ML as mol (Brief="Molar liquid holdup"); 271 MV as mol (Brief="Molar vapour holdup"); 272 E as energy (Brief="Total Energy Holdup on tray"); 273 vL as volume_mol (Brief="Liquid Molar Volume"); 274 vV as volume_mol (Brief="Vapour Molar volume"); 275 Level as length (Brief="Level of liquid phase"); 276 Vol as volume; 277 rhoV as dens_mass; 278 r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s'); 279 C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); 280 281 INITIAL 282 283 Level = Initial_Level; 284 OutletL.T = Initial_Temperature; 285 OutletL.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); 286 287 EQUATIONS 288 "Molar Concentration" 281 289 OutletL.z = vL * C; 282 290 283 291 "Reaction" 284 292 r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s'; 285 293 286 "Component Molar Balance" 287 diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z 288 - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL; 289 290 "Energy Balance" 291 diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h 292 - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ + Hr * r3 * vL*ML; 293 294 "Molar Holdup" 294 "Component Molar Balance" 295 diff(M)= InletL.F*InletL.z- OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL; 296 297 "Energy Balance" 298 diff(E) = InletL.F*InletL.h- OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ + Hr * r3 * vL*ML; 299 300 "Molar Holdup" 295 301 M = ML*OutletL.z + MV*OutletV.z; 296 302 297 303 "Energy Holdup" 298 304 E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V; 299 305 300 306 "Mol fraction normalisation" 301 307 sum(OutletL.z)=1.0; 302 308 303 309 "Liquid Volume" 304 310 vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z); 305 "Vapour Volume" 311 312 "Vapour Volume" 306 313 vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 307 "Vapour Density" 314 315 "Vapour Density" 308 316 rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z); 309 317 310 318 "Level of liquid phase" 311 319 Level = ML*vL/Across; 312 320 313 321 Vol = ML*vL; 314 322 315 323 "Mechanical Equilibrium" 316 324 OutletL.P = OutletV.P; 317 325 318 326 "Thermal Equilibrium" 319 327 OutletL.T = OutletV.T; 320 328 321 329 "Geometry Constraint" 322 330 V = ML*vL + MV*vV; 323 331 324 332 "Chemical Equilibrium" 325 333 PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z = 326 334 PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z; -
branches/gui/eml/stage_separators/tank.mso
r649 r721 58 58 Across as area (Brief="Tank cross section area", Default=2); 59 59 60 Initial_Level as length (Brief="Initial Level of the Tank"); 61 Initial_Temperature as temperature (Brief="Initial Temperature of Liquid"); 62 Initial_Composition(NComp) as fraction (Brief="Initial Liquid Composition"); 63 60 64 VARIABLES 61 65 in Inlet as stream (Brief = "Inlet stream", PosX=0.3037, PosY=0, Symbol="_{in}"); … … 67 71 vL as volume_mol (Brief="Liquid Molar Volume"); 68 72 73 INITIAL 74 75 Level = Initial_Level; 76 Outlet.T = Initial_Temperature; 77 Outlet.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); 78 69 79 EQUATIONS 70 80 … … 119 129 radius as length (Brief="Tank radius"); 120 130 L as length (Brief="Tank length"); 131 132 Initial_Level as length (Brief="Initial Level of the Tank"); 133 Initial_Temperature as temperature (Brief="Initial Temperature of Liquid"); 134 Initial_Composition(NComp) as fraction (Brief="Initial Liquid Composition"); 121 135 122 136 VARIABLES … … 130 144 vL as volume_mol (Brief="Liquid Molar Volume"); 131 145 146 INITIAL 147 148 Level = Initial_Level; 149 Outlet.T = Initial_Temperature; 150 Outlet.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); 151 132 152 EQUATIONS 133 153
Note: See TracChangeset
for help on using the changeset viewer.