Changeset 649 for branches/gui/eml
- Timestamp:
- Sep 30, 2008, 6:42:41 PM (14 years ago)
- Location:
- branches/gui/eml/stage_separators
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/column.mso
r648 r649 447 447 * - a pump in reflux stream. 448 448 * 449 * ------------------------------------------------------------------ 450 Model Distillation_thermosyphon_subcooling Teste449 * ------------------------------------------------------------------*# 450 Model Distillation_thermosyphon_subcooling as Section_ColumnBasic 451 451 ATTRIBUTES 452 452 Pallete = true; … … 478 478 "; 479 479 480 PARAMETERS 481 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 482 outer NComp as Integer; 483 NumberOfTrays as Integer(Brief="Number of trays", Default=2); 484 topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1); 485 top as Integer(Brief="Number of top tray"); 486 bot as Integer(Brief="Number of bottom tray"); 487 VapourFlow as Switcher(Valid = ["on", "off"], Default = "on"); 488 489 SET 490 top = (NumberOfTrays-1)*(1-topdown)/2+1; 491 bot = NumberOfTrays/top; 492 493 VARIABLES 494 trays(NumberOfTrays) as trayTeste; 495 cond as condenserSteady; 496 reb as reboilerSteady; 497 tbottom as tank; 498 ttop as tank_cylindrical; 499 spbottom as splitter; 500 sptop as splitter; 501 pump1 as pump; 502 alfaTopo as Real; 503 504 EQUATIONS 505 switch VapourFlow 506 case "on": 507 cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P - 508 cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV)); 509 when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off"; 510 511 case "off": 512 cond.InletV.F = 0 * 'mol/s'; 513 when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on"; 514 end 515 516 CONNECTIONS 517 #vapor 518 reb.OutletV to trays(bot).InletV; 519 trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV; 520 trays(top).OutletV to cond.InletV; 521 522 #liquid 523 cond.OutletL to ttop.Inlet; 524 ttop.Outlet to sptop.Inlet; 525 sptop.Outlet2 to pump1.Inlet; 526 pump1.Outlet to trays(top).InletL; 527 trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL; 528 trays(bot).OutletL to tbottom.Inlet; 529 tbottom.Outlet to spbottom.Inlet; 530 spbottom.Outlet2 to reb.InletL; 480 PARAMETERS 481 482 CondenserVapourFlow as Switcher(Valid = ["on", "off"], Hidden=true, Default = "on"); 483 484 VARIABLES 485 CondenserUnity as condenserSteady; 486 TopVessel as tank_cylindrical; 487 TopSplitter as splitter; 488 PumpUnity as pump; 489 ReboilerUnity as reboilerSteady; 490 BottomVessel as tank; 491 BottomSplitter as splitter; 492 493 494 alfaTopo as Real; 495 496 out HeatToCondenser as power (Brief="Heat supplied to Condenser",Hidden=true); 497 out HeatToReboiler as power (Brief="Heat supplied to Reboiler",Hidden=true); 498 out HeatToBottomVessel as power (Brief="Heat supplied to Bottom Vessel",Hidden=true); 499 out HeatToTopVessel as power (Brief="Heat supplied to Top Vessel",Hidden=true); 500 501 EQUATIONS 502 503 switch CondenserVapourFlow 504 505 case "on": 506 CondenserUnity.InletV.F*trays(1).vV = alfaTopo * Ah * sqrt(2*(trays(1).OutletV.P - 507 CondenserUnity.OutletL.P + 1e-8 * 'atm') / (alfa*trays(1).rhoV)); 508 when CondenserUnity.InletV.F < 1e-6 * 'kmol/h' switchto "off"; 509 510 case "off": 511 CondenserUnity.InletV.F = 0 * 'mol/s'; 512 when trays(1).OutletV.P > CondenserUnity.OutletL.P + 1e-1 * 'atm' switchto "on"; 513 514 end 515 516 CONNECTIONS 517 #vapor 518 ReboilerUnity.OutletV to trays(NumberOfTrays).InletV; 519 trays(1).OutletV to CondenserUnity.InletV; 520 521 #liquid 522 CondenserUnity.OutletL to TopVessel.Inlet; 523 TopVessel.Outlet to TopSplitter.Inlet; 524 TopSplitter.Outlet2 to PumpUnity.Inlet; 525 PumpUnity.Outlet to trays(1).InletL; 526 trays(NumberOfTrays).OutletL to BottomVessel.Inlet; 527 BottomVessel.Outlet to BottomSplitter.Inlet; 528 BottomSplitter.Outlet2 to ReboilerUnity.InletL; 529 530 #Connectors 531 HeatToCondenser to CondenserUnity.InletQ; 532 HeatToReboiler to ReboilerUnity.InletQ; 533 HeatToBottomVessel to BottomVessel.InletQ; 534 HeatToTopVessel to TopVessel.InletQ; 535 531 536 end 532 537 -
branches/gui/eml/stage_separators/condenser.mso
r648 r649 122 122 * the heat supply. 123 123 "; 124 125 126 outer PP as Plugin(Brief = "External Physical Properties", Type="PP");124 125 PARAMETERS 126 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 127 127 outer NComp as Integer; 128 128 129 VARIABLES 130 in InletV as stream(Brief="Vapour inlet stream", PosX=0.3431, PosY=0, Symbol="_{inV}"); 131 out OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.34375, PosY=1, Symbol="_{outL}"); 132 in InletQ as power (Brief="Cold supplied", PosX=1, PosY=0.5974, Symbol="_{in}"); 133 DP as press_delta (Brief="Pressure Drop in the condenser"); 134 135 EQUATIONS 136 "Molar Balance" 129 VARIABLES 130 in InletV as stream (Brief="Vapour inlet stream", PosX=0.3431, PosY=0, Symbol="_{inV}"); 131 out OutletL as liquid_stream (Brief="Liquid outlet stream", PosX=0.34375, PosY=1, Symbol="_{outL}"); 132 in InletQ as power (Brief="Cold supplied", PosX=1, PosY=0.5974, Symbol="_{in}"); 133 DP as press_delta (Brief="Pressure Drop in the condenser"); 134 135 EQUATIONS 136 137 "Molar Balance" 137 138 InletV.F = OutletL.F; 138 139 InletV.z = OutletL.z; 139 140 140 141 "Energy Balance" 141 142 InletV.F*InletV.h = OutletL.F*OutletL.h + InletQ; 142 143 143 144 "Pressure" 144 145 DP = InletV.P - OutletL.P; 146 145 147 end 146 148 -
branches/gui/eml/stage_separators/reboiler.mso
r648 r649 130 130 "; 131 131 132 PARAMETERS 133 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 134 outer NComp as Integer; 135 DP as press_delta (Brief="Pressure Drop in the reboiler"); 136 137 VARIABLES 138 in InletL as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}"); 139 out OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}"); 140 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}"); 141 vV as volume_mol (Brief="Vapour Molar volume"); 142 rhoV as dens_mass (Brief="Vapour Density"); 143 144 EQUATIONS 145 "Molar Balance" 132 PARAMETERS 133 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 134 outer NComp as Integer; 135 DP as press_delta (Brief="Pressure Drop in the reboiler"); 136 137 VARIABLES 138 in InletL as stream (Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}"); 139 out OutletV as vapour_stream (Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}"); 140 in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}"); 141 vV as volume_mol (Brief="Vapour Molar volume"); 142 rhoV as dens_mass (Brief="Vapour Density"); 143 144 EQUATIONS 145 146 "Molar Balance" 146 147 InletL.F = OutletV.F; 147 148 InletL.z = OutletV.z; 148 149 149 150 "Vapour Volume" 150 151 vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 151 152 152 153 "Vapour Density" 153 154 rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z); 154 155 155 156 "Energy Balance" 156 157 InletL.F*InletL.h + InletQ = OutletV.F*OutletV.h; 157 158 158 159 "Pressure" 159 160 DP = InletL.P - OutletV.P; 161 160 162 end 161 163 -
branches/gui/eml/stage_separators/tank.mso
r555 r649 53 53 "; 54 54 55 PARAMETERS 56 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 57 outer NComp as Integer; 58 Across as area (Brief="Tank cross section area", Default=2); 59 60 VARIABLES 61 in Inlet as stream (Brief = "Inlet stream", PosX=0.3037, PosY=0, Symbol="_{in}"); 62 out Outlet as liquid_stream (Brief = "Outlet liquid stream", PosX=1, PosY=1, Symbol="_{out}"); 63 in InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7859, Symbol="_{in}"); 64 Level as length(Brief="Tank level"); 65 M(NComp) as mol (Brief="Molar Holdup in the tank"); 66 E as energy (Brief="Total Energy Holdup on tank"); 67 vL as volume_mol (Brief="Liquid Molar Volume"); 68 69 EQUATIONS 70 "Mass balance" 55 PARAMETERS 56 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 57 outer NComp as Integer; 58 Across as area (Brief="Tank cross section area", Default=2); 59 60 VARIABLES 61 in Inlet as stream (Brief = "Inlet stream", PosX=0.3037, PosY=0, Symbol="_{in}"); 62 out Outlet as liquid_stream (Brief = "Outlet liquid stream", PosX=1, PosY=1, Symbol="_{out}"); 63 in InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.7859, Symbol="_{in}"); 64 Level as length (Brief="Tank level"); 65 M(NComp) as mol (Brief="Molar Holdup in the tank"); 66 E as energy (Brief="Total Energy Holdup on tank"); 67 vL as volume_mol (Brief="Liquid Molar Volume"); 68 69 EQUATIONS 70 71 "Mass balance" 71 72 diff(M) = Inlet.F*Inlet.z - Outlet.F*Outlet.z; 72 73 73 74 "Energy balance" 74 75 diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ; 75 76 76 77 "Energy Holdup" 77 78 E = sum(M)*Outlet.h; 78 79 79 80 "Mechanical Equilibrium" 80 81 Inlet.P = Outlet.P; 81 82 82 83 "Liquid Volume" 83 84 vL = PP.LiquidVolume(Outlet.T, Outlet.P, Outlet.z); 84 85 85 86 "Composition" 86 87 M = Outlet.z*sum(M); 87 88 88 89 "Level of liquid phase" 89 90 Level = sum(M)*vL/Across; 91 90 92 end 91 93 … … 112 114 "; 113 115 114 PARAMETERS 115 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 116 outer NComp as Integer; 117 radius as length(Brief="Tank radius"); 118 L as length(Brief="Tank length"); 119 120 VARIABLES 121 in Inlet as stream (Brief = "Inlet stream", PosX=0.1825, PosY=0, Symbol="_{in}"); 122 out Outlet as liquid_stream (Brief = "Outlet liquid stream", PosX=1, PosY=1, Symbol="_{out}"); 123 in InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.6160, Symbol="_{in}"); 124 Level as length(Brief="Tank level"); 125 Across as area (Brief="Tank cross section area", Default=2); 126 M(NComp) as mol (Brief="Molar Holdup in the tank"); 127 E as energy (Brief="Total Energy Holdup on tank"); 128 vL as volume_mol (Brief="Liquid Molar Volume"); 129 130 EQUATIONS 131 "Mass balance" 116 PARAMETERS 117 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 118 outer NComp as Integer; 119 radius as length (Brief="Tank radius"); 120 L as length (Brief="Tank length"); 121 122 VARIABLES 123 in Inlet as stream (Brief = "Inlet stream", PosX=0.1825, PosY=0, Symbol="_{in}"); 124 out Outlet as liquid_stream (Brief = "Outlet liquid stream", PosX=1, PosY=1, Symbol="_{out}"); 125 in InletQ as power (Brief="Rate of heat supply", PosX=1, PosY=0.6160, Symbol="_{in}"); 126 Level as length (Brief="Tank level"); 127 Across as area (Brief="Tank cross section area", Default=2); 128 M(NComp) as mol (Brief="Molar Holdup in the tank"); 129 E as energy (Brief="Total Energy Holdup on tank"); 130 vL as volume_mol (Brief="Liquid Molar Volume"); 131 132 EQUATIONS 133 134 "Mass balance" 132 135 diff(M) = Inlet.F*Inlet.z - Outlet.F*Outlet.z; 133 136 134 137 "Energy balance" 135 138 diff(E) = Inlet.F*Inlet.h - Outlet.F*Outlet.h + InletQ; 136 139 137 140 "Energy Holdup" 138 141 E = sum(M)*Outlet.h; 139 142 140 143 "Mechanical Equilibrium" 141 144 Inlet.P = Outlet.P; 142 145 143 146 "Liquid Volume" 144 147 vL = PP.LiquidVolume(Outlet.T, Outlet.P, Outlet.z); 145 148 146 149 "Composition" 147 150 M = Outlet.z*sum(M); 148 151 149 "Cylindrical Area" 150 Across = radius^2 * (asin(1) - asin((radius-Level)/radius) ) + 151 (Level-radius)*sqrt(Level*(2*radius - Level)); 152 153 "Level of liquid phase" 152 "Cylindrical Area" 153 Across = radius^2 * (asin(1) - asin((radius-Level)/radius) ) + (Level-radius)*sqrt(Level*(2*radius - Level)); 154 155 "Level of liquid phase" 154 156 L*Across = sum(M)*vL; 157 155 158 end 156 159
Note: See TracChangeset
for help on using the changeset viewer.