Changeset 831 for branches/gui/eml
- Timestamp:
- Aug 14, 2009, 5:20:34 PM (13 years ago)
- Location:
- branches/gui/eml/stage_separators
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/column.mso
r829 r831 110 110 VapourSideStreamLocation as Integer (Brief="Vapour Side Stream Location", Default=2); 111 111 Pi as constant (Brief="Pi Number",Default=3.14159265, Symbol = "\pi",Hidden=true); 112 gas acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true);112 Gconst as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 113 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); 114 116 115 117 VapourFlowModel as Switcher (Valid = ["Reepmeyer", "Feehery_Fv", "Roffel_Fv", "Klingberg", "Wang_Fv", "Elgue"], Default = "Reepmeyer"); 116 LiquidFlowModel as Switcher (Valid = [" default", "Wang_Fl", "Olsen", "Feehery_Fl", "Roffel_Fl"], Default = "default");118 LiquidFlowModel as Switcher (Valid = ["Francis", "Wang_Fl", "Olsen", "Feehery_Fl", "Roffel_Fl"], Default = "Francis"); 117 119 118 120 TrayDiameter as length (Brief="Tray Diameter",Default=1.600); … … 120 122 Fraction_HoleArea as fraction (Brief="Fraction of the active area that is occupied by the holes with respect to the total tray area",Default=0.10); 121 123 Fraction_DowncomerArea as fraction (Brief="Fraction of the downcomer area with respect to the total tray area",Default=0.20); 122 WeirLength as length (Brief="Weir length" );123 WeirHeight as length (Brief="Weir height" );124 TrayLiquidPasses as Real (Brief="Number of liquid passes in the tray",Default=1);125 HeatSupply as heat_rate (Brief="Rate of heat supply" );124 WeirLength as length (Brief="Weir length", Default = 1); 125 WeirHeight as length (Brief="Weir height", Default= 0.05); 126 TrayLiquidPasses as positive (Brief="Number of liquid passes in the tray", Lower = 1,Default=1); 127 HeatSupply as heat_rate (Brief="Rate of heat supply",Default = 0); 126 128 AerationFraction as Real (Brief="Aeration fraction", Default = 1); 127 129 DryPdropCoeff as Real (Brief="Dry pressure drop coefficient", Default= 0.60); … … 135 137 OlsenCoeff as Real (Brief="Olsens correlation coefficient", Default=1,Hidden=true); 136 138 137 VapourFlow as Switcher ( Valid = ["on", "off"], Default = "off",Hidden=true);138 LiquidFlow as Switcher ( Valid = ["on", "off"], Default = "off",Hidden=true);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); 139 141 140 142 SET … … 142 144 LiqSideTrayIndex(LiquidSideStreamLocation) =1; 143 145 Mw = PP.MolecularWeight(); 146 zero_flow = 0 * 'kmol/h'; 147 low_flow = 1E-6 * 'kmol/h'; 144 148 145 149 PlateArea = 0.25*Pi*(TrayDiameter^2)*(1-Fraction_DowncomerArea); … … 231 235 case "on": 232 236 switch LiquidFlowModel 233 case " default":237 case "Francis": 234 238 "Francis Equation" 235 239 TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'1/s'*WeirLength*((TRAYS(i).Level-(AerationFraction*WeirHeight))/(AerationFraction))^2; … … 245 249 246 250 case "Roffel_Fl": 247 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* g/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/ 248 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'; 249 253 end … … 251 255 252 256 case "off": 257 253 258 "Low level" 254 TRAYS(i).OutletLiquid.F = 0 * 'mol/h'; 259 TRAYS(i).OutletLiquid.F = zero_flow; 260 255 261 when TRAYS(i).Level > (AerationFraction * WeirHeight) + 1e-6*'m' switchto "on"; 262 256 263 end 257 264 … … 263 270 264 271 case "Feehery_Fv": 265 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* g*TRAYS(i).ML*TRAYS(i).vL/PlateArea))/TRAYS(i).rhoV);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); 266 273 267 274 case "Roffel_Fv": 268 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)* g*1e5) * (TRAYS(i).rhoV*HolesArea/sum(Mw*TRAYS(i).OutletVapour.z))^1.08 * 'm^1.08/mol^1.08';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'; 269 276 270 277 case "Klingberg": 271 TRAYS(i).InletVapour.F * TRAYS(i).vV = PlateArea * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-TRAYS(i).rhoL* g*TRAYS(i).Level)/TRAYS(i).rhoV);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); 272 279 273 280 case "Wang_Fv": 274 TRAYS(i).InletVapour.F * TRAYS(i).vV = PlateArea * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-TRAYS(i).rhoL* g*TRAYS(i).Level)/TRAYS(i).rhoV*DryPdropCoeff);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); 275 282 276 283 case "Elgue": 277 284 TRAYS(i).InletVapour.F = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)/ElgueCoeff); 278 285 end 279 when TRAYS(i).InletVapour.F < 1e-6 * 'kmol/h'switchto "off";286 when TRAYS(i).InletVapour.F < low_flow switchto "off"; 280 287 281 288 case "off": 282 TRAYS(i).InletVapour.F = 0 * 'mol/s'; 283 when TRAYS(i).InletVapour.P > TRAYS(i).OutletVapour.P + TRAYS(i).Level*g*TRAYS(i).rhoL + 1e-1 * 'atm' switchto "on"; 289 TRAYS(i).InletVapour.F = zero_flow; 290 291 when TRAYS(i).InletVapour.P > TRAYS(i).OutletVapour.P + TRAYS(i).Level*Gconst*TRAYS(i).rhoL + 1e-1 * 'atm' switchto "on"; 292 284 293 end 285 294 -
branches/gui/eml/stage_separators/condenser.mso
r830 r831 49 49 50 50 Mw(NComp) as molweight (Brief = "Component Mol Weight",Hidden=true); 51 low_flow as flow_mol (Brief = "Low Flow",Default = 1E-6, Hidden=true);52 zero_flow as flow_mol (Brief = "No Flow",Default = 0, Hidden=true);53 KfConst as area (Brief="Constant for K factor pressure drop", Default = 1, Hidden=true);54 55 VapourFlow as Switcher (Brief="Vapour Flow", Valid = ["on", "off"], Default = "on",Hidden=true);56 57 Kfactor as positive (Brief="K factor for pressure drop", Lower = 1E-8, Default = 1E-3);58 51 Pdrop as press_delta (Brief="Pressure Drop in the condenser",Default=0, Symbol="\Delta _P"); 59 52 … … 61 54 62 55 Mw = PP.MolecularWeight(); 63 low_flow = 1E-6 * 'kmol/h';64 zero_flow = 0 * 'kmol/h';65 KfConst = 1*'m^2';66 56 67 57 VARIABLES … … 78 68 79 69 EQUATIONS 80 81 switch VapourFlow82 83 case "on":84 InletVapour.F*sum(Mw*InletVapour.z) = Kfactor *sqrt(Pdrop*rho)*KfConst;85 86 when InletVapour.F < low_flow switchto "off";87 88 case "off":89 InletVapour.F = zero_flow;90 91 when InletVapour.P > OutletLiquid.P switchto "on";92 93 end94 70 95 71 "Molar Flow Balance" -
branches/gui/eml/stage_separators/tank.mso
r828 r831 62 62 Mw(NComp) as molweight (Brief="Mol Weight", Hidden=true); 63 63 pi as positive (Brief="Pi value", Default=3.141593,Hidden=true, Symbol="\pi"); 64 g as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 65 64 66 65 67 Orientation as Switcher (Valid=["vertical","horizontal"],Default="vertical"); … … 73 75 radius as length (Brief="Vessel radius",Hidden=true, Symbol="R_{cylinder}"); 74 76 77 low_flow as flow_mol (Brief = "Low Flow",Default = 1E-6, Hidden=true); 78 zero_flow as flow_mol (Brief = "No Flow",Default = 0, Hidden=true); 79 KfConst as Real (Brief="Constant for K factor pressure drop", Unit= 'mol/(s*(Pa^0.5))',Default = 1, Hidden=true); 80 Kfactor as positive (Brief="K factor for pressure drop", Lower = 1E-8, Default = 2); 81 82 NormalFlow as Switcher (Brief="Normal Flow", Valid = ["on", "off"], Default = "on",Hidden=true); 83 75 84 Levelpercent_Initial as positive (Brief="Initial liquid height in Percent", Default = 0.70); 76 85 Temperature_Initial as temperature (Brief="Initial Liquid Temperature", Default = 330); … … 80 89 81 90 Mw=PP.MolecularWeight(); 82 91 g = 9.81 * 'm/(s^2)'; 83 92 Vhead_elliptical = (pi*Diameter^3)/12; 84 93 Vhead_hemispherical = (pi*Diameter^3)/6; 85 94 Vcylinder = 0.25*(pi*Diameter^2)*Lenght; 86 95 radius = 0.5*Diameter; 96 97 low_flow = 1E-6 * 'kmol/h'; 98 zero_flow = 0 * 'kmol/h'; 99 KfConst = 1*'mol/(s*(Pa^0.5))'; 87 100 88 101 VARIABLES … … 105 118 Level as length (Brief="liquid height", Protected=true); 106 119 Across as area (Brief="Vessel cylinder shell Cross section area", Hidden=true, Symbol="A_{cross}"); 107 Pratio as positive (Brief = "Pressure Ratio", Symbol ="P_{ratio}", Protected=true);108 120 Pdrop as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P", Protected=true); 121 Peq as pressure (Brief="Equilibrium pressure on the liquid surface", Protected=true, Symbol="\Delta P_{eq}"); 122 Pstatic as pressure (Brief="Static head at the bottom of the tank", Protected = true, Symbol="P_{static}^{Liquid}"); 109 123 110 124 out TI as control_signal (Brief="Temperature Indicator", PosX=0.525, PosY=0, Protected=true); … … 213 227 end 214 228 229 switch NormalFlow 230 231 case "on": 232 Inlet.F = Kfactor *sqrt(Pdrop)*KfConst; 233 234 when Inlet.F < low_flow switchto "off"; 235 236 case "off": 237 Inlet.F = zero_flow; 238 239 when Inlet.P > OutletVapour.P switchto "on"; 240 241 end 242 215 243 "Component Molar Balance" 216 244 diff(TotalHoldup)=Inlet.F*Inlet.z - OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z; … … 232 260 233 261 "Liquid Volume" 234 vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z);262 vL = PP.LiquidVolume(OutletLiquid.T, Peq, OutletLiquid.z); 235 263 236 264 "Vapour Volume" 237 vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z);265 vV = PP.VapourVolume(OutletVapour.T, Peq, OutletVapour.z); 238 266 239 267 "Chemical Equilibrium" 240 PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z =241 PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z;268 PP.LiquidFugacityCoefficient(OutletLiquid.T, Peq, OutletLiquid.z)*OutletLiquid.z = 269 PP.VapourFugacityCoefficient(OutletVapour.T, Peq, OutletVapour.z)*OutletVapour.z; 242 270 243 271 "Thermal Equilibrium" … … 245 273 246 274 "Mechanical Equilibrium" 247 OutletVapour.P = OutletLiquid.P; 275 OutletVapour.P = Peq; 276 277 "Static Head" 278 Pstatic = PP.LiquidDensity(OutletLiquid.T, Peq, OutletLiquid.z) * g * Level; 279 280 "Mechanical Equilibrium for the Liquid Phase" 281 OutletLiquid.P = Peq + Pstatic; 248 282 249 283 "Pressure Drop" 250 OutletLiquid.P = Inlet.P - Pdrop; 251 252 "Pressure Ratio" 253 OutletLiquid.P = Inlet.P * Pratio; 284 Pdrop = Inlet.P - OutletVapour.P; 254 285 255 286 "Geometry Constraint" … … 323 354 radius as length (Brief="Vessel radius",Hidden=true, Symbol="R_{cylinder}"); 324 355 356 low_flow as flow_mol (Brief = "Low Flow",Default = 1E-6, Hidden=true); 357 zero_flow as flow_mol (Brief = "No Flow",Default = 0, Hidden=true); 358 KfConst as Real (Brief="Constant for K factor pressure drop", Unit= 'mol/(s*(Pa^0.5))',Default = 1, Hidden=true); 359 Kfactor as positive (Brief="K factor for pressure drop", Lower = 1E-8, Default = 2); 360 361 NormalFlow as Switcher (Brief="Normal Flow", Valid = ["on", "off"], Default = "on",Hidden=true); 362 363 325 364 Levelpercent_Initial as positive (Brief="Initial liquid height in Percent", Default = 0.70); 326 365 Temperature_Initial as temperature (Brief="Initial Liquid Temperature", Default = 330); … … 333 372 Vcylinder = 0.25*(pi*Diameter^2)*Lenght; 334 373 radius = 0.5*Diameter; 374 375 low_flow = 1E-6 * 'kmol/h'; 376 zero_flow = 0 * 'kmol/h'; 377 KfConst = 1*'mol/(s*(Pa^0.5))'; 335 378 336 379 VARIABLES … … 457 500 end 458 501 502 #* 503 switch NormalFlow 504 505 case "on": 506 Inlet.F = Kfactor *sqrt(Pstatic)*KfConst; 507 508 when Inlet.F < low_flow switchto "off"; 509 510 case "off": 511 Inlet.F = zero_flow; 512 513 when Inlet.P > OutletLiquid.P switchto "on"; 514 515 end 516 *# 459 517 "Component Molar Balance" 460 518 diff(TotalHoldup)=Inlet.F*Inlet.z - OutletLiquid.F*OutletLiquid.z;
Note: See TracChangeset
for help on using the changeset viewer.