Changeset 878 for branches/gui/eml/stage_separators/column.mso
- Timestamp:
- Nov 5, 2009, 3:59:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/column.mso
r875 r878 109 109 LiquidSideStreamLocation as Integer (Brief="Liquid Side Stream Location", Default=2); 110 110 VapourSideStreamLocation as Integer (Brief="Vapour Side Stream Location", Default=2); 111 Pi as constant (Brief="Pi Number",Default=3.14159265, Symbol = "\pi",Hidden=true);112 Gconst as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true);113 Mw(NComp) as molweight (Brief="Component Mol Weight",Hidden=true);114 zero_flow as flow_mol (Brief = "Stream Flow closed",Default = 0, Hidden=true);115 low_flow as flow_mol (Brief = "Low stream Flow",Default = 1E-6, Hidden=true);116 111 117 112 VapourFlowModel as Switcher (Valid = ["Reepmeyer", "Feehery_Fv", "Roffel_Fv", "Klingberg", "Wang_Fv", "Elgue"], Default = "Reepmeyer"); … … 128 123 AerationFraction as Real (Brief="Aeration fraction", Default = 1); 129 124 DryPdropCoeff as Real (Brief="Dry pressure drop coefficient", Default= 0.60); 130 131 PlateArea as area (Brief="Plate area = Atray - Adowncomer",Protected=true); 132 TrayVolume as volume (Brief="Total Volume of the tray",Protected=true); 133 HolesArea as area (Brief="Total holes area",Protected=true); 134 135 FeeheryCoeff as Real (Brief="Feeherys correlation coefficient", Unit='1/m^4', Default=1,Hidden=true); 136 ElgueCoeff as Real (Brief="Elgues correlation coefficient", Unit='kg/m/mol^2', Default=1,Hidden=true); 137 OlsenCoeff as Real (Brief="Olsens correlation coefficient", Default=1,Hidden=true); 138 139 VapourFlow as Switcher (Brief="Flag for Vapour Flow condition",Valid = ["on", "off"], Default = "off",Hidden=true); 140 LiquidFlow as Switcher (Brief="Flag for Liquid Flow condition",Valid = ["on", "off"], Default = "off",Hidden=true); 125 MurphreeEff as Real (Brief="Murphree efficiency for All Trays", Default= 1); 126 127 VARIABLES 128 129 INITIALIZATION as InitializeSection (Brief="Column Model Initialization"); 130 CONTROL as ControlSection (Brief="Column Model Control"); 131 132 out TCI as control_signal (Brief="Temperature Indicator", Protected = true, PosX=1, PosY=0.73); 133 out PCI as control_signal (Brief="Pressure Indicator", Protected = true, PosX=0, PosY=0.24); 134 135 in LiquidInlet as stream (Brief="Liquid Inlet in the section", PosX=0.70, PosY=0); 136 out VapourOutlet as vapour_stream (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0); 137 138 out VapourDrawOff as vapour_stream (Brief="Vapour Draw Off Port in the section", PosX=1, PosY=0.35,Protected = true); 139 out LiquidDrawOff as liquid_stream (Brief="Liquid Draw Off Port in the section", PosX=1, PosY=0.65,Protected = true); 140 141 TRAYS(NumberOfTrays) as tray (Brief="Number of trays in the Column Section",Protected=true); 142 VapourDrawOffFlow as flow_mol (Brief="Vapour Draw Off Stream Molar Flow Rate"); 143 LiquidDrawOffFlow as flow_mol (Brief="Vapour Draw Off Stream Molar Flow Rate"); 144 145 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.30, PosY=1); 146 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.70, PosY=1); 147 148 LiquidConnector as stream (Brief="Liquid connection in the middle TRAYS", PosX=0.75, PosY=1,Hidden=true); 149 VapourConnector as stream (Brief="Vapour connection in the middle TRAYS", PosX=0.55, PosY=0,Hidden=true); 141 150 142 151 SET 143 152 VapSideTrayIndex(VapourSideStreamLocation) =1; 144 153 LiqSideTrayIndex(LiquidSideStreamLocation) =1; 145 Mw = PP.MolecularWeight(); 146 zero_flow = 0 * 'kmol/h'; 147 low_flow = 1E-6 * 'kmol/h'; 148 149 PlateArea = 0.25*Pi*(TrayDiameter^2)*(1-Fraction_DowncomerArea); 150 TrayVolume = 0.25*Pi*(TrayDiameter^2)*TraySpacing; 151 HolesArea = 0.25*Pi*(TrayDiameter^2)*Fraction_HoleArea; 152 153 VARIABLES 154 155 INITIALIZATION as InitializeSection (Brief="Column Model Initialization"); 156 CONTROL as ControlSection (Brief="Column Model Control"); 157 158 out TCI as control_signal (Brief="Temperature Indicator", Protected = true, PosX=1, PosY=0.73); 159 out PCI as control_signal (Brief="Pressure Indicator", Protected = true, PosX=0, PosY=0.24); 160 161 in LiquidInlet as stream (Brief="Liquid Inlet in the section", PosX=0.70, PosY=0); 162 out VapourOutlet as vapour_stream (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0); 163 164 out VapourDrawOff as vapour_stream (Brief="Vapour Draw Off Port in the section", PosX=1, PosY=0.35,Protected = true); 165 out LiquidDrawOff as liquid_stream (Brief="Liquid Draw Off Port in the section", PosX=1, PosY=0.65,Protected = true); 166 167 TRAYS(NumberOfTrays) as tray (Brief="Number of trays in the Column Section",Protected=true); 168 VapourDrawOffFlow as flow_mol (Brief="Vapour Draw Off Stream Molar Flow Rate"); 169 LiquidDrawOffFlow as flow_mol (Brief="Vapour Draw Off Stream Molar Flow Rate"); 170 MurphreeEff as Real (Brief="Murphree efficiency for All Trays",Lower=0.01,Upper=1); 171 172 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.30, PosY=1); 173 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.70, PosY=1); 174 175 LiquidConnector as stream (Brief="Liquid connection in the middle TRAYS", PosX=0.75, PosY=1,Hidden=true); 176 VapourConnector as stream (Brief="Vapour connection in the middle TRAYS", PosX=0.55, PosY=0,Hidden=true); 177 154 155 TRAYS.TrayDiameter_ = TrayDiameter; 156 TRAYS.TraySpacing_ = TraySpacing; 157 TRAYS.Fraction_HoleArea_ = Fraction_HoleArea; 158 TRAYS.Fraction_DowncomerArea_ = Fraction_DowncomerArea; 159 TRAYS.WeirLength_ = WeirLength; 160 TRAYS.WeirHeight_ = WeirHeight; 161 TRAYS.TrayLiquidPasses_ = TrayLiquidPasses; 162 TRAYS.HeatSupply_ = HeatSupply; 163 TRAYS.AerationFraction_ = AerationFraction; 164 TRAYS.DryPdropCoeff_ = DryPdropCoeff; 165 TRAYS.MurphreeEff_ = MurphreeEff; 166 178 167 CONNECTIONS 179 168 TRAYS([2:NumberOfTrays]).OutletVapour to TRAYS([1:NumberOfTrays-1]).InletVapour; 180 169 TRAYS([1:NumberOfTrays-1]).OutletLiquid to TRAYS([2:NumberOfTrays]).InletLiquid; 181 170 182 171 LiquidConnector to TRAYS(1).InletLiquid; 183 172 VapourConnector to TRAYS(NumberOfTrays).InletVapour; 184 173 185 174 INITIAL 186 175 … … 214 203 PCI*'atm' = TRAYS(CONTROL.Pindicator_TrayNumber).OutletVapour.P; 215 204 216 for i in [1:NumberOfTrays] do 217 218 "Murphree Efficiency" 219 TRAYS(i).OutletVapour.z = MurphreeEff * (TRAYS(i).yideal - TRAYS(i).InletVapour.z) + TRAYS(i).InletVapour.z; 220 221 "Level of clear liquid over the weir" 222 TRAYS(i).Level = TRAYS(i).ML*TRAYS(i).vL/PlateArea; 223 224 "Geometry Constraint" 225 TrayVolume = TRAYS(i).ML* TRAYS(i).vL + TRAYS(i).MV*TRAYS(i).vV; 226 227 "Energy Holdup" 228 TRAYS(i).E = TRAYS(i).ML*TRAYS(i).OutletLiquid.h + TRAYS(i).MV*TRAYS(i).OutletVapour.h - TRAYS(i).OutletLiquid.P*TrayVolume; 229 230 "Energy Balance" 231 diff(TRAYS(i).E) = ( TRAYS(i).Inlet.F*TRAYS(i).Inlet.h + TRAYS(i).InletLiquid.F*TRAYS(i).InletLiquid.h + TRAYS(i).InletVapour.F*TRAYS(i).InletVapour.h- TRAYS(i).OutletLiquid.F*TRAYS(i).OutletLiquid.h - TRAYS(i).OutletVapour.F*TRAYS(i).OutletVapour.h 232 -TRAYS(i).VapourSideStream.F*TRAYS(i).VapourSideStream.h - TRAYS(i).LiquidSideStream.F*TRAYS(i).LiquidSideStream.h + HeatSupply ); 233 234 switch LiquidFlow 235 case "on": 236 switch LiquidFlowModel 237 case "Francis": 238 "Francis Equation" 239 TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'1/s'*WeirLength*((TRAYS(i).Level-(AerationFraction*WeirHeight))/(AerationFraction))^2; 240 241 case "Wang_Fl": 242 TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'m^0.5/s'*WeirLength*((TRAYS(i).Level-(AerationFraction*WeirHeight))/(AerationFraction))^1.5; 243 244 case "Olsen": 245 TRAYS(i).OutletLiquid.F / 'mol/s'= WeirLength*TrayLiquidPasses*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletVapour.z)/(0.665*OlsenCoeff)^1.5 * ((TRAYS(i).ML*sum(Mw*TRAYS(i).OutletLiquid.z)/TRAYS(i).rhoL/PlateArea)-WeirHeight)^1.5 * 'm^0.5/mol'; 246 247 case "Feehery_Fl": 248 TRAYS(i).OutletLiquid.F = WeirLength*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletLiquid.z) * ((TRAYS(i).Level-WeirHeight)/750/'mm')^1.5 * 'm^2/s'; 249 250 case "Roffel_Fl": 251 TRAYS(i).OutletLiquid.F = 2/3*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletLiquid.z)*WeirLength*(TRAYS(i).ML*sum(Mw*TRAYS(i).OutletLiquid.z)/(PlateArea*1.3)/TRAYS(i).rhoL)^1.5*sqrt(2*Gconst/ 252 (2*(1 - 0.3593/'Pa^0.0888545'*abs(TRAYS(i).OutletVapour.F*sum(Mw*TRAYS(i).OutletVapour.z)/(PlateArea*1.3)/sqrt(TRAYS(i).rhoV))^0.177709)-1)); #/'(kg/m)^0.0888545/s^0.177709'; 253 end 254 when TRAYS(i).Level < (AerationFraction *WeirHeight) switchto "off"; 255 256 case "off": 257 258 "Low level" 259 TRAYS(i).OutletLiquid.F = zero_flow; 260 261 when TRAYS(i).Level > (AerationFraction * WeirHeight) switchto "on"; 262 263 end 264 265 switch VapourFlow 266 case "on": 267 switch VapourFlowModel 268 case "Reepmeyer": 269 TRAYS(i).InletVapour.F*TRAYS(i).vV = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)/(TRAYS(i).rhoV*DryPdropCoeff))*HolesArea; 270 271 case "Feehery_Fv": 272 TRAYS(i).InletVapour.F = TRAYS(i).rhoV/PlateArea/FeeheryCoeff/sum(Mw*TRAYS(i).OutletVapour.z) * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-(TRAYS(i).rhoV*Gconst*TRAYS(i).ML*TRAYS(i).vL/PlateArea))/TRAYS(i).rhoV); 273 274 case "Roffel_Fv": 275 TRAYS(i).InletVapour.F^1.08 * 0.0013 * 'kg/m/mol^1.08/s^0.92*1e5' = (TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)*1e5 - (AerationFraction*sum(TRAYS(i).M*Mw)/(PlateArea*1.3)*Gconst*1e5) * (TRAYS(i).rhoV*HolesArea/sum(Mw*TRAYS(i).OutletVapour.z))^1.08 * 'm^1.08/mol^1.08'; 276 277 case "Klingberg": 278 TRAYS(i).InletVapour.F * TRAYS(i).vV = PlateArea * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-TRAYS(i).rhoL*Gconst*TRAYS(i).Level)/TRAYS(i).rhoV); 279 280 case "Wang_Fv": 281 TRAYS(i).InletVapour.F * TRAYS(i).vV = PlateArea * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-TRAYS(i).rhoL*Gconst*TRAYS(i).Level)/TRAYS(i).rhoV*DryPdropCoeff); 282 283 case "Elgue": 284 TRAYS(i).InletVapour.F = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)/ElgueCoeff); 285 end 286 when TRAYS(i).InletVapour.F < low_flow switchto "off"; 287 288 case "off": 289 TRAYS(i).InletVapour.F = zero_flow; 290 291 when TRAYS(i).InletVapour.P > TRAYS(i).OutletVapour.P switchto "on"; 292 293 end 205 switch LiquidFlowModel 206 207 case "Francis": 208 TRAYS.LFlowModel = 1; 209 case "Wang_Fl": 210 TRAYS.LFlowModel = 2; 211 212 case "Olsen": 213 TRAYS.LFlowModel = 3; 214 215 case "Feehery_Fl": 216 TRAYS.LFlowModel = 4; 217 218 case "Roffel_Fl": 219 TRAYS.LFlowModel = 5; 220 221 end 222 223 switch VapourFlowModel 224 225 case "Reepmeyer": 226 TRAYS.VFlowModel = 1; 227 228 case "Feehery_Fv": 229 TRAYS.VFlowModel = 2; 230 231 case "Roffel_Fv": 232 TRAYS.VFlowModel = 3; 233 234 case "Klingberg": 235 TRAYS.VFlowModel = 4; 236 237 case "Wang_Fv": 238 TRAYS.VFlowModel = 5; 239 240 case "Elgue": 241 TRAYS.VFlowModel = 6; 294 242 295 243 end
Note: See TracChangeset
for help on using the changeset viewer.