Changeset 875 for branches/gui/eml
- Timestamp:
- Nov 3, 2009, 12:28:44 PM (13 years ago)
- Location:
- branches/gui/eml/stage_separators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/column.mso
r874 r875 1768 1768 1769 1769 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 1770 outer NComp as Integer (Brief="Number of components"); 1771 1772 low_flow as flow_mol (Brief ="Low Flow",Default = 1E-6, Hidden=true); 1773 low_pressure as pressure (Brief ="Low Pressure",Default = 1E-6, Hidden=true); 1774 zero_flow as flow_mol (Brief ="No Flow",Default = 0, Hidden=true); 1775 1770 outer NComp as Integer (Brief="Number of components",Protected=true); 1771 1772 1776 1773 NumberOfFeeds as Integer (Brief="Number of Feed Stages",Default=3,Protected=true); 1777 1774 NumberOfStages as Integer (Brief="Number of Stages", Default=3); … … 1784 1781 ResistanceCoeff as positive (Brief="Resistance coefficient on the liquid load", Default=1); 1785 1782 AreaPerPackingVol as Real (Brief="surface area per packing volume", Unit='m^2/m^3'); 1786 1787 V as volume (Brief="Total Volume of the tray",Protected=true); 1788 Pi as constant (Brief="Pi Number",Default=3.14159265, Symbol = "\pi",Hidden=true); 1789 Gconst as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 1790 HETP as length (Brief="the Height Equivalent to a Theoretical Plate",Protected=true); 1791 ColumnArea as area (Brief="Column Sectional Cross Area",Protected=true); 1792 1793 VapourFlow as Switcher(Valid = ["on", "off"], Default = "on",Hidden=true); 1794 1783 HETP as length (Brief="The Height Equivalent to a Theoretical Plate",Protected=true); 1795 1784 1796 1785 VARIABLES … … 1802 1791 out PCI as control_signal (Brief="Pressure Indicator", Protected = true, PosX=0, PosY=0.24); 1803 1792 1804 in LiquidInlet as stream (Brief="Liquid Inlet in the section", PosX=0.70, PosY=0 );1805 out VapourOutlet as vapour_stream (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0 );1806 1807 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.30, PosY=1 );1808 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.70, PosY=1 );1793 in LiquidInlet as stream (Brief="Liquid Inlet in the section", PosX=0.70, PosY=0,Protected=true); 1794 out VapourOutlet as vapour_stream (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0,Protected=true); 1795 1796 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.30, PosY=1,Protected=true); 1797 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.70, PosY=1,Protected=true); 1809 1798 1810 1799 LiquidConnector as stream (Brief="Liquid connection at the middle STAGES", PosX=0.75, PosY=1,Hidden=true); 1811 1800 VapourConnector as stream (Brief="Vapour connection at the middle STAGES", PosX=0.55, PosY=0,Hidden=true); 1812 1801 1813 STAGES(NumberOfStages) as packedStage ;1802 STAGES(NumberOfStages) as packedStage (Brief="Column Stages",Protected=true); 1814 1803 PressureDrop as pressure (Brief="Column Pressure Drop", Protected=true); 1815 1804 1816 1805 SET 1817 1818 ColumnArea = 0.25*Pi*ColumnDiameter^2; 1819 HETP =PackingHeight/NumberOfStages; 1820 V = HETP * ColumnArea; 1821 1822 low_pressure = 1E-4 * 'atm'; 1823 low_flow = 1E-6 * 'kmol/h'; 1824 zero_flow = 0 * 'kmol/h'; 1825 1806 1807 STAGES.Number_Stages = NumberOfStages; 1808 STAGES.HeightOfPacking = PackingHeight; 1809 STAGES.HeatOnStage = HeatSupply; 1810 STAGES.ColumnInternalDiameter = ColumnDiameter; 1811 STAGES.PackingVoidFraction = VoidFraction; 1812 STAGES.LiquidResistanceCoeff = ResistanceCoeff ; 1813 STAGES.AreaPerPackingVolume = AreaPerPackingVol; 1814 1815 HETP = PackingHeight/NumberOfStages; 1816 1826 1817 CONNECTIONS 1827 1818 … … 1868 1859 PressureDrop = STAGES(NumberOfStages).OutletLiquid.P - STAGES(1).OutletLiquid.P; 1869 1860 1870 for i in [1:NumberOfStages] do1871 1872 switch VapourFlow1873 1874 case "on":1875 "Pressure drop and Vapor flow, Billet (4-58)"1876 STAGES(i).deltaP/HETP = ResistanceCoeff *( 0.5*AreaPerPackingVol + 2/ColumnDiameter) * 1/((VoidFraction-STAGES(i).hl)^3) * (STAGES(i).uV^2) * STAGES(i).rhoV;1877 1878 when STAGES(i).InletVapour.F < low_flow switchto "off";1879 1880 case "off":1881 "Vapour Flow"1882 STAGES(i).InletVapour.F = zero_flow;1883 1884 when STAGES(i).deltaP > low_pressure switchto "on";1885 1886 end1887 1888 "Energy Balance"1889 diff(STAGES(i).E) = (STAGES(i).Inlet.F*STAGES(i).Inlet.h + STAGES(i).InletLiquid.F*STAGES(i).InletLiquid.h + STAGES(i).InletVapour.F*STAGES(i).InletVapour.h- STAGES(i).OutletLiquid.F*STAGES(i).OutletLiquid.h1890 - STAGES(i).OutletVapour.F*STAGES(i).OutletVapour.h + HeatSupply );1891 1892 "Energy Holdup"1893 STAGES(i).E = STAGES(i).ML*STAGES(i).OutletLiquid.h + STAGES(i).MV*STAGES(i).OutletVapour.h - STAGES(i).OutletLiquid.P*V;1894 1895 "Geometry Constraint"1896 V*VoidFraction= STAGES(i).ML*STAGES(i).vL + STAGES(i).MV*STAGES(i).vV;1897 1898 "Volume flow rate of vapor, m^3/m^2/s"1899 STAGES(i).uV * (V*VoidFraction/HETP - STAGES(i).Al) = STAGES(i).InletVapour.F * STAGES(i).vV;1900 1901 "Liquid holdup"1902 STAGES(i).hl*V*VoidFraction = STAGES(i).ML*STAGES(i).vL;1903 1904 "Liquid velocity as a function of liquid holdup, Billet (4-27)"1905 STAGES(i).hl^3 = (12/Gconst) * AreaPerPackingVol^2 * (STAGES(i).miL/STAGES(i).rhoL) * STAGES(i).uL;1906 #STAGES(i).hl = (12*STAGES(i).miL*AreaPerPackingVol^2*STAGES(i).uL/STAGES(i).rhoL/Gconst)^1/3;1907 1908 "Area occupied by the liquid"1909 STAGES(i).Al = STAGES(i).ML*STAGES(i).vL/HETP;1910 1911 end1912 1913 1861 INITIAL 1914 1862 … … 1924 1872 1925 1873 for i in 1:NComp-1 do 1926 1874 1927 1875 for j in 1:NumberOfStages do 1928 1876 -
branches/gui/eml/stage_separators/tray.mso
r873 r875 281 281 -------------------------------------*# 282 282 Model packedStage 283 ATTRIBUTES 283 284 ATTRIBUTES 284 285 Pallete = false; 285 Icon = "icon/PackedStage";286 286 Brief = "Complete model of a packed column stage."; 287 287 Info = … … 296 296 * the liquid molar holdup ML 297 297 * (NoComps - 1) OutletLiquid compositions 298 "; 299 298 "; 299 300 300 PARAMETERS 301 301 302 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 303 outer NComp as Integer; 304 305 Mw(NComp) as molweight (Brief = "Component Mol Weight"); 306 307 VARIABLES 308 309 Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}"); 310 in InletLiquid as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}"); 311 in InletVapour as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}"); 312 out OutletLiquid as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}"); 313 out OutletVapour as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}"); 314 315 M(NComp) as mol (Brief="Molar Holdup in the tray", Default=0.01, Lower=0, Upper=100); 316 ML as mol (Brief="Molar liquid holdup", Default=0.01, Lower=0, Upper=100); 317 MV as mol (Brief="Molar vapour holdup", Default=0.01, Lower=0, Upper=100); 318 E as energy (Brief="Total Energy Holdup on tray", Default=-500); 319 vL as volume_mol (Brief="Liquid Molar Volume"); 320 vV as volume_mol (Brief="Vapour Molar volume"); 321 322 miL as viscosity (Brief="Liquid dynamic viscosity", DisplayUnit='kg/m/s'); 323 rhoL as dens_mass; 324 rhoV as dens_mass; 325 326 deltaP as pressure; 327 328 uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower=-10, Upper=1000); 329 uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower=-10, Upper=1000); 330 Al as area (Brief="Area occupied by the liquid", Default=0.001, Upper=10); 331 hl as positive (Brief="Column holdup", Unit='m^3/m^3', Default=0.01,Upper=10); 302 outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); 303 outer NComp as Integer (Brief = "Number Of Components"); 304 305 LiquidResistanceCoeff as positive (Brief="Resistance coefficient on the liquid load", Default=1,Hidden=true); 306 AreaPerPackingVolume as Real (Brief="surface area per packing volume", Unit='m^2/m^3',Hidden=true); 307 ColumnInternalDiameter as length (Brief="Column diameter",Hidden=true); 308 PackingVoidFraction as Real (Brief="Void fraction of packing, (m^3 void space/m^3 packed bed)",Hidden=true); 309 HeightOfPacking as length (Brief="Height of packing",Hidden=true); 310 Number_Stages as Integer (Brief="Number of Stages", Default=3,Hidden=true); 311 HeatOnStage as heat_rate (Brief="Rate of heat supply",Hidden=true); 312 313 HETP as length (Brief="The Height Equivalent to a Theoretical Plate",Hidden=true); 314 ColumnArea as area (Brief="Column Sectional Cross Area",Hidden=true); 315 V as volume (Brief="Total Volume of the tray",Hidden=true); 316 Pi as constant (Brief="Pi Number",Default=3.14159265, Symbol = "\pi",Hidden=true); 317 Gconst as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 318 319 low_flow as flow_mol (Brief ="Low Flow",Default = 1E-6, Hidden=true); 320 low_pressure as pressure (Brief ="Low Pressure",Default = 1E-6, Hidden=true); 321 zero_flow as flow_mol (Brief ="No Flow",Default = 0, Hidden=true); 322 323 Mw(NComp) as molweight (Brief = "Component Mol Weight",Hidden=true); 324 VapourFlow as Switcher (Brief = "Vapour Flow", Valid = ["on", "off"], Default = "on",Hidden=true); 332 325 333 326 SET 334 327 Mw = PP.MolecularWeight(); 328 329 ColumnArea = 0.25*Pi*ColumnInternalDiameter^2; 330 HETP = HeightOfPacking/Number_Stages; 331 V = HETP * ColumnArea; 332 333 low_pressure = 1E-4 * 'atm'; 334 low_flow = 1E-6 * 'kmol/h'; 335 zero_flow = 0 * 'kmol/h'; 336 337 VARIABLES 338 339 Inlet as stream (Brief="Feed stream", Symbol="_{in}",Protected=true); 340 in InletLiquid as stream (Brief="Inlet liquid stream", Symbol="_{inL}",Protected=true); 341 in InletVapour as stream (Brief="Inlet vapour stream", Symbol="_{inV}",Protected=true); 342 out OutletLiquid as liquid_stream (Brief="Outlet liquid stream", Symbol="_{outL}",Protected=true); 343 out OutletVapour as vapour_stream (Brief="Outlet vapour stream", Symbol="_{outV}",Protected=true); 344 345 M(NComp) as mol (Brief="Molar Holdup in the tray", Default=0.01, Lower=0, Upper=100,Protected=true); 346 ML as mol (Brief="Molar liquid holdup", Default=0.01, Lower=0, Upper=100,Protected=true); 347 MV as mol (Brief="Molar vapour holdup", Default=0.01, Lower=0, Upper=100,Protected=true); 348 E as energy (Brief="Total Energy Holdup on tray", Default=-500,Protected=true); 349 vL as volume_mol (Brief="Liquid Molar Volume",Protected=true); 350 vV as volume_mol (Brief="Vapour Molar volume",Protected=true); 351 miL as viscosity (Brief="Liquid dynamic viscosity", DisplayUnit='kg/m/s',Protected=true); 352 rhoL as dens_mass (Brief="Liquid mass density",Protected=true); 353 rhoV as dens_mass (Brief="Vapour mass density",Protected=true); 354 uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower=-10, Upper=1000,Protected=true); 355 uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower=-10, Upper=1000,Protected=true); 356 Al as area (Brief="Area occupied by the liquid", Default=0.001, Upper=10,Protected=true); 357 hl as positive (Brief="Column holdup", Unit='m^3/m^3', Default=0.01,Upper=10,Protected=true); 358 deltaP as pressure (Brief="Stage Pressure drop",Protected=true); 335 359 336 360 EQUATIONS 361 362 switch VapourFlow 363 364 case "on": 365 "Pressure drop and Vapor flow, Billet (4-58)" 366 deltaP/HETP = LiquidResistanceCoeff *( 0.5*AreaPerPackingVolume + 2/ColumnInternalDiameter) * 1/((PackingVoidFraction-hl)^3) * (uV^2) *rhoV; 367 368 when InletVapour.F < low_flow switchto "off"; 369 370 case "off": 371 "Vapour Flow" 372 InletVapour.F = zero_flow; 373 374 when deltaP > low_pressure switchto "on"; 375 376 end 377 378 "Energy Balance" 379 diff(E) = (Inlet.F*Inlet.h + InletLiquid.F*InletLiquid.h + InletVapour.F*InletVapour.h- OutletLiquid.F*OutletLiquid.h 380 - OutletVapour.F*OutletVapour.h + HeatOnStage ); 381 382 "Energy Holdup" 383 E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V; 384 385 "Geometry Constraint" 386 V*PackingVoidFraction= ML*vL + MV*vV; 387 388 "Volume flow rate of vapor, m^3/m^2/s" 389 uV * (V*PackingVoidFraction/HETP - Al) = InletVapour.F * vV; 390 391 "Liquid holdup" 392 hl*V*PackingVoidFraction = ML*vL; 393 394 "Liquid velocity as a function of liquid holdup, Billet (4-27)" 395 hl^3 = (12/Gconst) * AreaPerPackingVolume^2 * (miL/rhoL) * uL; 396 397 "Area occupied by the liquid" 398 Al = ML*vL/HETP; 337 399 338 400 "Component Molar Balance" … … 341 403 "Molar Holdup" 342 404 M = ML*OutletLiquid.z + MV*OutletVapour.z; 343 405 344 406 "Mol Fraction Normalisation" 345 407 sum(OutletLiquid.z)= 1.0; … … 376 438 377 439 "Pressure Drop" 378 deltaP = InletVapour.P - OutletVapour.P; 440 deltaP = InletVapour.P - OutletVapour.P; 379 441 380 442 end
Note: See TracChangeset
for help on using the changeset viewer.