Changeset 850 for branches/gui


Ignore:
Timestamp:
Oct 8, 2009, 4:38:37 PM (13 years ago)
Author:
gerson bicca
Message:

packed column revised

Location:
branches/gui/eml/stage_separators
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/eml/stage_separators/column.mso

    r849 r850  
    17451745Model Packed_Section_ColumnBasic
    17461746
     1747
    17471748ATTRIBUTES
    17481749        Pallete         = false;
     
    17751776       
    17761777        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)");
    17811781        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);
    17841787        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
    17861792
    17871793VARIABLES
     
    17921798        out     VapourOutlet            as vapour_stream        (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0);
    17931799       
    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);
    17951801        out     LiquidOutlet            as liquid_stream                (Brief="Liquid Outlet in the section", PosX=0.70, PosY=1);
    1796          
     1802       
    17971803        LiquidConnector as stream       (Brief="Liquid connection at the middle STAGES", PosX=0.75, PosY=1,Hidden=true);
    17981804        VapourConnector as stream       (Brief="Vapour connection at the middle STAGES", PosX=0.55, PosY=0,Hidden=true);
     
    18021808       
    18031809SET
    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;
    18111812        hs =PackingHeight/NumberOfStages;       
    1812         STAGES.V = hs * ColumnDiameter^2*3.14159/4;
    1813         STAGES.HeatSupply = HeatSupply;
    1814 
     1813        V = hs * ColumnArea;
     1814       
    18151815CONNECTIONS
    1816         #internals
     1816
    18171817        STAGES([2:NumberOfStages]).OutletVapour                 to STAGES([1:NumberOfStages-1]).InletVapour;
    18181818        STAGES([1:NumberOfStages-1]).OutletLiquid       to STAGES([2:NumberOfStages]).InletLiquid;
    1819         #connectors
    18201819        LiquidConnector to STAGES(1).InletLiquid;
    18211820        VapourConnector to STAGES(NumberOfStages).InletVapour;
     
    18241823
    18251824"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;
    18351826
    18361827        LiquidConnector.F= LiquidInlet.F;
     
    18581849        VapourOutlet.z = STAGES(1).OutletVapour.z;
    18591850
    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
     1851for i in [1:NumberOfStages] do
     1852
     1853switch 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               
     1869end
     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
     1906end
    19031907
    19041908INITIAL
    19051909
    1906 #*for i in 1:NumberOfStages do
     1910for i in 1:NumberOfStages do
    19071911
    19081912"The initial temperature of the STAGES"
     
    19241928
    19251929end
    1926 *#
     1930
    19271931end
    19281932
  • branches/gui/eml/stage_separators/tray.mso

    r849 r850  
    298298";     
    299299       
    300        
    301300PARAMETERS
    302301
    303302outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    304303outer 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
    321305        Mw(NComp)       as molweight    (Brief = "Component Mol Weight");
    322         VapourFlow as Switcher (Valid=["on", "off"], Default = "on");
    323        
    324306       
    325307VARIABLES
    326308
    327309        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}");
     310in      InletLiquid                     as stream                               (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}");
     311in      InletVapour                     as stream                               (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}");
    331312out     OutletLiquid    as liquid_stream        (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}");
    332313out     OutletVapour    as vapour_stream        (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}");
     
    344325        rhoV as dens_mass;
    345326       
    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);
    350331        #dp as length (Brief="Particle diameter", Default=1e-3, Lower=0, Upper=10);
    351332        #invK as positive (Brief="Wall factor", Default=1, Upper=10);
    352333        #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);
    356336
    357337SET
    358338        Mw = PP.MolecularWeight();
    359339
    360 
    361340EQUATIONS
    362341
     
    364343        diff(M)=Inlet.F*Inlet.z + InletLiquid.F*InletLiquid.z + InletVapour.F*InletVapour.z- OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z;
    365344
    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 
    369345"Molar Holdup"
    370346        M = ML*OutletLiquid.z + MV*OutletVapour.z;
    371347       
    372 "Energy Holdup"
    373     E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V;       
    374        
    375348"Mol fraction normalisation"
    376349        sum(OutletLiquid.z)= 1.0;
    377         sum(OutletLiquid.z)=sum(OutletVapour.z);
     350        sum(OutletLiquid.z)= sum(OutletVapour.z);
    378351       
    379352"Liquid Volume"
     
    392365        OutletLiquid.P = OutletVapour.P;
    393366       
    394 "Geometry Constraint"
    395     V*VoidFraction = ML*vL + MV*vV;
    396 
    397367"Liquid Density"
    398368        rhoL = PP.LiquidDensity(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z);
     
    405375
    406376#"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);
    411378
    412379"Volume flow rate of liquid, m^3/m^2/s"
    413380        uL * Al = OutletLiquid.F * vL;
    414381       
    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;
    439383       
    440384end
Note: See TracChangeset for help on using the changeset viewer.