Changeset 850 for branches/gui
- Timestamp:
- Oct 8, 2009, 4:38:37 PM (13 years ago)
- Location:
- branches/gui/eml/stage_separators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/eml/stage_separators/column.mso
r849 r850 1745 1745 Model Packed_Section_ColumnBasic 1746 1746 1747 1747 1748 ATTRIBUTES 1748 1749 Pallete = false; … … 1775 1776 1776 1777 PackingHeight as length (Brief="Height of packing"); 1777 #Just one heat supply for the whole column? 1778 HeatSupply as heat_rate (Brief="Rate of heat supply"); 1779 ColumnDiameter as length (Brief="Column diameter"); 1780 VoidFraction as fraction (Brief="Void fraction of packing, (m^3 void space/m^3 packed bed)"); 1778 HeatSupply as heat_rate (Brief="Rate of heat supply"); 1779 ColumnDiameter as length (Brief="Column diameter"); 1780 VoidFraction as Real (Brief="Void fraction of packing, (m^3 void space/m^3 packed bed)"); 1781 1781 ResistanceCoeff as positive (Brief="Resistance coefficient on the liquid load", Default=1); 1782 AreaPerPackingVol as Real (Brief="surface area per packing volume", Unit='m^2/m^3'); 1783 1782 AreaPerPackingVol as Real (Brief="surface area per packing volume", Unit='m^2/m^3'); 1783 1784 V as volume (Brief="Total Volume of the tray",Protected=true); 1785 Pi as constant (Brief="Pi Number",Default=3.14159265, Symbol = "\pi",Hidden=true); 1786 Gconst as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 1784 1787 hs as length (Brief="Height of the packing stage",Protected=true); 1785 1788 ColumnArea as area (Brief="Column Sectional Cross Area",Protected=true); 1789 1790 VapourFlow as Switcher(Valid = ["on", "off"], Default = "on",Hidden=true); 1791 1786 1792 1787 1793 VARIABLES … … 1792 1798 out VapourOutlet as vapour_stream (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0); 1793 1799 1794 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.30, PosY=1);1800 in VapourInlet as stream (Brief="Vapour Inlet in the section", PosX=0.30, PosY=1); 1795 1801 out LiquidOutlet as liquid_stream (Brief="Liquid Outlet in the section", PosX=0.70, PosY=1); 1796 1802 1797 1803 LiquidConnector as stream (Brief="Liquid connection at the middle STAGES", PosX=0.75, PosY=1,Hidden=true); 1798 1804 VapourConnector as stream (Brief="Vapour connection at the middle STAGES", PosX=0.55, PosY=0,Hidden=true); … … 1802 1808 1803 1809 SET 1804 #trays outers 1805 STAGES.ColumnDiameter = ColumnDiameter; 1806 STAGES.AreaPerPackingVol = AreaPerPackingVol; 1807 STAGES.VoidFraction = VoidFraction; 1808 STAGES.hs = hs; 1809 STAGES.ResistanceCoeff = ResistanceCoeff; 1810 1810 1811 ColumnArea = 0.25*Pi*ColumnDiameter^2; 1811 1812 hs =PackingHeight/NumberOfStages; 1812 STAGES.V = hs * ColumnDiameter^2*3.14159/4; 1813 STAGES.HeatSupply = HeatSupply; 1814 1813 V = hs * ColumnArea; 1814 1815 1815 CONNECTIONS 1816 #internals 1816 1817 1817 STAGES([2:NumberOfStages]).OutletVapour to STAGES([1:NumberOfStages-1]).InletVapour; 1818 1818 STAGES([1:NumberOfStages-1]).OutletLiquid to STAGES([2:NumberOfStages]).InletLiquid; 1819 #connectors1820 1819 LiquidConnector to STAGES(1).InletLiquid; 1821 1820 VapourConnector to STAGES(NumberOfStages).InletVapour; … … 1824 1823 1825 1824 "PresureDrop" 1826 # STAGES.deltaP = PressureDrop/NumberOfStages; 1827 PressureDrop = STAGES(1).OutletLiquid.P - STAGES(NumberOfStages).OutletLiquid.P; 1828 1829 #Pressure profile 1830 # for j in [1:NumberOfStages-1] do 1831 # STAGES(j).deltaP = STAGES(j+1).OutletVapour.P - STAGES(j).OutletVapour.P; 1832 # end 1833 1834 1825 PressureDrop = STAGES(NumberOfStages).OutletLiquid.P - STAGES(1).OutletLiquid.P; 1835 1826 1836 1827 LiquidConnector.F= LiquidInlet.F; … … 1858 1849 VapourOutlet.z = STAGES(1).OutletVapour.z; 1859 1850 1860 #for i in [1:NumberOfStages] do 1861 1862 ##"Energy Balance" 1863 ## 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.h 1864 ## - STAGES(i).OutletVapour.F*STAGES(i).OutletVapour.h + HeatSupply ); 1865 1866 ##"Energy Holdup" 1867 ## STAGES(i).E = STAGES(i).ML*STAGES(i).OutletLiquid.h + STAGES(i).MV*STAGES(i).OutletVapour.h - STAGES(i).OutletLiquid.P*V; 1868 1869 ##"Geometry Constraint" 1870 ##V*VoidFraction= STAGES(i).ML*STAGES(i).vL + STAGES(i).MV*STAGES(i).vV; 1871 1872 ##"Volume flow rate of vapor, m^3/m^2/s" 1873 ## #STAGES(i).uV * ((ColumnArea)*VoidFraction - STAGES(i).Al) = STAGES(i).OutletVapour.F * STAGES(i).vV; 1874 ## STAGES(i).uV * ((ColumnArea)*VoidFraction - STAGES(i).Al) = STAGES(i).InletVapour.F * STAGES(i).vV; 1875 1876 ##"Liquid holdup" 1877 ## STAGES(i).hl = STAGES(i).ML*STAGES(i).vL/V/VoidFraction; 1878 1879 ##"Particle diameter" 1880 ## STAGES(i).dp = 6 * (1-VoidFraction)/AreaPerPackingVol; 1881 1882 ##"Wall Factor" 1883 ## STAGES(i).invK = (1 + (2*STAGES(i).dp/(3*ColumnDiameter*(1-VoidFraction)))); 1884 ## 1885 1886 ##"Reynolds number of the vapor stream" 1887 ## STAGES(i).Rev*STAGES(i).invK = STAGES(i).dp*STAGES(i).uV*STAGES(i).rhoV / (STAGES(i).miV*(1-VoidFraction)); 1888 1889 ##"Pressure drop and Vapor flow" 1890 ## STAGES(i).deltaP/hs = ResistanceCoeff*AreaPerPackingVol*STAGES(i).uV^2*STAGES(i).rhoV*STAGES(i).invK / (2*(VoidFraction-STAGES(i).hl)^3); 1891 1892 ##"Liquid holdup" 1893 ## STAGES(i).hl = (12*STAGES(i).miL*AreaPerPackingVol^2*STAGES(i).uL/STAGES(i).rhoL/Gconst)^1/3; 1894 1895 ##"Area occupied by the liquid" 1896 ## STAGES(i).Al = STAGES(i).ML*STAGES(i).vL/hs; 1897 1898 # 1899 #"Vapour Flow" 1900 #STAGES(1).InletVapour.F = STAGES(1).OutletVapour.F + STAGES(1).Inlet.F*STAGES(1).Inlet.v; 1901 1902 #end 1851 for i in [1:NumberOfStages] do 1852 1853 switch VapourFlow 1854 1855 case "on": 1856 "Pressure drop and Vapor flow, Billet (4-58)" 1857 #STAGES(i).deltaP/hs = ResistanceCoeff*AreaPerPackingVol*STAGES(i).uV^2*STAGES(i).rhoV*STAGES(i).invK / (2*(VoidFraction-STAGES(i).hl)^3); 1858 # STAGES(i).invK = (1 + (2*STAGES(i).dp/(3*ColumnDiameter*(1-VoidFraction)))); 1859 1860 STAGES(i).deltaP/hs = ResistanceCoeff *( 0.25*AreaPerPackingVol + 2/ColumnDiameter) * 1/((VoidFraction-STAGES(i).hl)^3) * (STAGES(i).uV^2) * STAGES(i).rhoV; 1861 1862 when STAGES(i).InletVapour.F < 1e-6 * 'kmol/h' switchto "off"; 1863 1864 case "off": 1865 STAGES(i).InletVapour.F = 0 * 'mol/s'; 1866 1867 when STAGES(i).deltaP > 1e-4 * 'atm' switchto "on"; 1868 1869 end 1870 1871 "Energy Balance" 1872 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.h 1873 - STAGES(i).OutletVapour.F*STAGES(i).OutletVapour.h + HeatSupply ); 1874 1875 "Energy Holdup" 1876 STAGES(i).E = STAGES(i).ML*STAGES(i).OutletLiquid.h + STAGES(i).MV*STAGES(i).OutletVapour.h - STAGES(i).OutletLiquid.P*V; 1877 1878 "Geometry Constraint" 1879 V*VoidFraction= STAGES(i).ML*STAGES(i).vL + STAGES(i).MV*STAGES(i).vV; 1880 1881 "Volume flow rate of vapor, m^3/m^2/s" 1882 #STAGES(i).uV * ((ColumnArea)*VoidFraction - STAGES(i).Al) = STAGES(i).OutletVapour.F * STAGES(i).vV; 1883 STAGES(i).uV * ((ColumnArea)*VoidFraction - STAGES(i).Al) = STAGES(i).InletVapour.F * STAGES(i).vV; 1884 1885 "Liquid holdup" 1886 STAGES(i).hl = STAGES(i).ML*STAGES(i).vL/V/VoidFraction; 1887 1888 #"Particle diameter" 1889 # STAGES(i).dp = 6 * (1-VoidFraction)/AreaPerPackingVol; 1890 1891 #"Wall Factor" 1892 # STAGES(i).invK = (1 + (2*STAGES(i).dp/(3*ColumnDiameter*(1-VoidFraction)))); 1893 1894 #"Reynolds number of the vapor stream" 1895 # STAGES(i).Rev*STAGES(i).invK = STAGES(i).dp*STAGES(i).uV*STAGES(i).rhoV / (STAGES(i).miV*(1-VoidFraction)); 1896 1897 #"Pressure drop and Vapor flow" 1898 # STAGES(i).deltaP/hs = ResistanceCoeff*AreaPerPackingVol*STAGES(i).uV^2*STAGES(i).rhoV*STAGES(i).invK / (2*(VoidFraction-STAGES(i).hl)^3); 1899 1900 "Liquid holdup" 1901 STAGES(i).hl = (12*STAGES(i).miL*AreaPerPackingVol^2*STAGES(i).uL/STAGES(i).rhoL/Gconst)^1/3; 1902 1903 "Area occupied by the liquid" 1904 STAGES(i).Al = STAGES(i).ML*STAGES(i).vL/hs; 1905 1906 end 1903 1907 1904 1908 INITIAL 1905 1909 1906 #*for i in 1:NumberOfStages do1910 for i in 1:NumberOfStages do 1907 1911 1908 1912 "The initial temperature of the STAGES" … … 1924 1928 1925 1929 end 1926 *# 1930 1927 1931 end 1928 1932 -
branches/gui/eml/stage_separators/tray.mso
r849 r850 298 298 "; 299 299 300 301 300 PARAMETERS 302 301 303 302 outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); 304 303 outer NComp as Integer; 305 #* 306 outer ColumnDiameter as length (Brief="Column diameter"); 307 outer AreaPerPackingVol as Real (Brief="Surface area per packing volume", Unit='m^2/m^3'); 308 outer VoidFraction as fraction (Brief="Void fraction of packing, m^3/m^3"); 309 outer hs as length (Brief="Height of the packing stage"); 310 outer ResistanceCoeff as positive (Brief="Resistance coefficient on the liquid load", Default = 0.6); 311 *# 312 ColumnDiameter as length (Brief="Column diameter"); 313 AreaPerPackingVol as Real (Brief="Surface area per packing volume", Unit='m^2/m^3'); 314 VoidFraction as fraction (Brief="Void fraction of packing, m^3/m^3"); 315 hs as length (Brief="Height of the packing stage"); 316 ResistanceCoeff as positive (Brief="Resistance coefficient on the liquid load", Default = 0.6); 317 318 V as volume (Brief="Total volume of the tray"); 319 HeatSupply as heat_rate (Brief="Rate of heat supply"); 320 Gconst as acceleration (Brief="Gravity Acceleration",Default=9.81,Hidden=true); 304 321 305 Mw(NComp) as molweight (Brief = "Component Mol Weight"); 322 VapourFlow as Switcher (Valid=["on", "off"], Default = "on");323 324 306 325 307 VARIABLES 326 308 327 309 Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}"); 328 329 in InletLiquid as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}"); 330 in InletVapour as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}"); 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}"); 331 312 out OutletLiquid as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}"); 332 313 out OutletVapour as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}"); … … 344 325 rhoV as dens_mass; 345 326 346 deltaP as pressure (Lower = -10);347 348 uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower= 0, Upper=100);349 uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower=- 0, Upper=100);327 deltaP as pressure; 328 329 uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower=-10, Upper=100); 330 uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower=-10, Upper=100); 350 331 #dp as length (Brief="Particle diameter", Default=1e-3, Lower=0, Upper=10); 351 332 #invK as positive (Brief="Wall factor", Default=1, Upper=10); 352 333 #Rev as Real (Brief="Reynolds number of the vapor stream", Default=4000); 353 Al as area (Brief="Area occupied by the liquid", Default=0.001, Upper=10); 354 hl as positive (Brief="Column holdup", Unit='m^3/m^3', Default=0.04,Upper=1); 355 334 Al as area (Brief="Area occupied by the liquid", Default=0.001, Upper=1); 335 hl as positive (Brief="Column holdup", Unit='m^3/m^3', Default=0.01,Upper=10); 356 336 357 337 SET 358 338 Mw = PP.MolecularWeight(); 359 339 360 361 340 EQUATIONS 362 341 … … 364 343 diff(M)=Inlet.F*Inlet.z + InletLiquid.F*InletLiquid.z + InletVapour.F*InletVapour.z- OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z; 365 344 366 "Energy Balance"367 diff(E) = ( Inlet.F*Inlet.h + InletLiquid.F*InletLiquid.h + InletVapour.F*InletVapour.h - OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + HeatSupply);368 369 345 "Molar Holdup" 370 346 M = ML*OutletLiquid.z + MV*OutletVapour.z; 371 347 372 "Energy Holdup"373 E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V;374 375 348 "Mol fraction normalisation" 376 349 sum(OutletLiquid.z)= 1.0; 377 sum(OutletLiquid.z)= sum(OutletVapour.z);350 sum(OutletLiquid.z)= sum(OutletVapour.z); 378 351 379 352 "Liquid Volume" … … 392 365 OutletLiquid.P = OutletVapour.P; 393 366 394 "Geometry Constraint"395 V*VoidFraction = ML*vL + MV*vV;396 397 367 "Liquid Density" 398 368 rhoL = PP.LiquidDensity(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z); … … 405 375 406 376 #"Vapour viscosity" 407 # miV = PP.VapourViscosity(InletVapour.T, InletVapour.P, InletVapour.z); 408 409 "Area occupied by the liquid" 410 Al = ML*vL/hs; 377 # miV = PP.VapourViscosity(InletVapour.T, InletVapour.P, InletVapour.z); 411 378 412 379 "Volume flow rate of liquid, m^3/m^2/s" 413 380 uL * Al = OutletLiquid.F * vL; 414 381 415 "Volume flow rate of vapour, m^3/m^2/s" 416 uV * (V*VoidFraction/hs - Al) = InletVapour.F * vV; 417 418 "Liquid holdup" 419 hl*V*VoidFraction = ML*vL; 420 421 "Liquid velocity as a function of liquid holdup, Billet (4-27)" 422 hl^3 = (12/Gconst) * AreaPerPackingVol^2 * (miL/rhoL) * uL; 423 424 switch VapourFlow 425 case "on": 426 "Pressure drop and Vapor flow, Billet (4-58)" 427 deltaP/hs = ResistanceCoeff * (AreaPerPackingVol/2 + 2/ColumnDiameter) * 1/((VoidFraction-hl)^3) * (uV^2) * rhoV; 428 429 when InletVapour.F < 1e-6 * 'kmol/h' switchto "off"; 430 431 432 case "off": 433 InletVapour.F = 0 * 'mol/s'; 434 when deltaP > 1e-4 * 'atm' switchto "on"; 435 end 436 437 "Pressure profile" 438 deltaP = InletVapour.P - OutletVapour.P; 382 deltaP = InletVapour.P - OutletVapour.P; 439 383 440 384 end
Note: See TracChangeset
for help on using the changeset viewer.