Changeset 873 for branches


Ignore:
Timestamp:
Oct 29, 2009, 3:47:18 PM (13 years ago)
Author:
gerson bicca
Message:

revised packed column

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

Legend:

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

    r868 r873  
    8484        TopStageComposition(NComp)              as fraction     (Brief = "Component Molar Fraction at Top");
    8585        BottomStageComposition(NComp)   as fraction     (Brief = "Component Molar Fraction at Bottom");
    86         ColumnHoldup                                    as positive (Brief="Column holdup", Default=0.1);
     86        ColumnHoldup                                    as positive (Brief = "Column holdup", Default=0.1);
    8787
    8888end
     
    17451745Model Packed_Section_ColumnBasic
    17461746
    1747 
    17481747ATTRIBUTES
    17491748        Pallete         = false;
     
    17711770        outer NComp     as Integer      (Brief="Number of components");
    17721771       
     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       
    17731776        NumberOfFeeds                                           as Integer      (Brief="Number of Feed Stages",Default=3,Protected=true);
    17741777        NumberOfStages                                          as Integer      (Brief="Number of Stages", Default=3);
     
    17851788        Pi                              as constant             (Brief="Pi Number",Default=3.14159265, Symbol = "\pi",Hidden=true);
    17861789        Gconst                  as acceleration         (Brief="Gravity Acceleration",Default=9.81,Hidden=true);
    1787         hs                              as length                       (Brief="Height of the packing stage",Protected=true);
     1790        HETP                    as length                       (Brief="the Height Equivalent to a Theoretical Plate",Protected=true);
    17881791        ColumnArea              as area                         (Brief="Column Sectional Cross Area",Protected=true);
    17891792       
     
    18051808       
    18061809        STAGES(NumberOfStages) as packedStage;
    1807         PressureDrop               as pressure;
     1810        PressureDrop               as pressure (Brief="Column Pressure Drop", Protected=true);
    18081811       
    18091812SET
    18101813       
    18111814        ColumnArea = 0.25*Pi*ColumnDiameter^2;
    1812         hs =PackingHeight/NumberOfStages;       
    1813         V = hs * ColumnArea;
     1815        HETP =PackingHeight/NumberOfStages;     
     1816        V = HETP * ColumnArea;
     1817       
     1818        low_pressure = 1E-4 * 'atm';
     1819        low_flow = 1E-6 * 'kmol/h';
     1820        zero_flow = 0 * 'kmol/h';
    18141821       
    18151822CONNECTIONS
    18161823
    1817         STAGES([2:NumberOfStages]).OutletVapour                 to STAGES([1:NumberOfStages-1]).InletVapour;
     1824        STAGES([2:NumberOfStages]).OutletVapour         to STAGES([1:NumberOfStages-1]).InletVapour;
    18181825        STAGES([1:NumberOfStages-1]).OutletLiquid       to STAGES([2:NumberOfStages]).InletLiquid;
    1819         LiquidConnector to STAGES(1).InletLiquid;
    1820         VapourConnector to STAGES(NumberOfStages).InletVapour;
     1826        LiquidConnector                                                         to STAGES(1).InletLiquid;
     1827        VapourConnector                                                         to STAGES(NumberOfStages).InletVapour;
    18211828
    18221829EQUATIONS
    1823 
    1824 "PresureDrop"
    1825         PressureDrop = STAGES(NumberOfStages).OutletLiquid.P - STAGES(1).OutletLiquid.P;
    18261830
    18271831        LiquidConnector.F= LiquidInlet.F;
     
    18491853        VapourOutlet.z = STAGES(1).OutletVapour.z;
    18501854
     1855"PressureDrop"
     1856        PressureDrop = STAGES(NumberOfStages).OutletLiquid.P - STAGES(1).OutletLiquid.P;
     1857
    18511858for i in [1:NumberOfStages] do
    18521859
     
    18551862        case "on":
    18561863"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.5*AreaPerPackingVol + 2/ColumnDiameter) * 1/((VoidFraction-STAGES(i).hl)^3) * (STAGES(i).uV^2) * STAGES(i).rhoV;
    1861        
    1862         #deltaP/hs  = ResistanceCoeff * (AreaPerPackingVol/2 + 2/ColumnDiameter) * 1/((VoidFraction-hl)^3) * (uV^2) * rhoV;
    1863 
    1864 
    1865         when STAGES(i).InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
     1864        STAGES(i).deltaP/HETP  = ResistanceCoeff *( 0.5*AreaPerPackingVol + 2/ColumnDiameter) * 1/((VoidFraction-STAGES(i).hl)^3) * (STAGES(i).uV^2) * STAGES(i).rhoV;
     1865       
     1866        when STAGES(i).InletVapour.F < low_flow switchto "off";
    18661867       
    18671868        case "off":
    1868         STAGES(i).InletVapour.F = 0 * 'mol/s';
    1869        
    1870                 when STAGES(i).deltaP > 1e-4 * 'atm' switchto "on";
    1871                
    1872 end
    1873        
     1869"Vapour Flow"
     1870        STAGES(i).InletVapour.F = zero_flow;
     1871       
     1872        when STAGES(i).deltaP > low_pressure switchto "on";
     1873
     1874end
     1875
    18741876"Energy Balance"
    1875         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
     1877        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
    18761878        - STAGES(i).OutletVapour.F*STAGES(i).OutletVapour.h + HeatSupply );
    1877        
     1879
    18781880"Energy Holdup"
    18791881        STAGES(i).E = STAGES(i).ML*STAGES(i).OutletLiquid.h + STAGES(i).MV*STAGES(i).OutletVapour.h - STAGES(i).OutletLiquid.P*V;
     
    18831885       
    18841886"Volume flow rate of vapor, m^3/m^2/s"
    1885         #STAGES(i).uV * ((ColumnArea)*VoidFraction - STAGES(i).Al) = STAGES(i).OutletVapour.F * STAGES(i).vV;
    1886         STAGES(i).uV * ((ColumnArea)*VoidFraction - STAGES(i).Al) = STAGES(i).InletVapour.F * STAGES(i).vV;
    1887        
     1887        STAGES(i).uV * (V*VoidFraction/HETP - STAGES(i).Al) = STAGES(i).InletVapour.F * STAGES(i).vV;
     1888
    18881889"Liquid holdup"
    1889         STAGES(i).hl = STAGES(i).ML*STAGES(i).vL/V/VoidFraction;
    1890        
    1891 #"Particle diameter"
    1892 #       STAGES(i).dp = 6 * (1-VoidFraction)/AreaPerPackingVol;
    1893        
    1894 #"Wall Factor"
    1895 #       STAGES(i).invK = (1 + (2*STAGES(i).dp/(3*ColumnDiameter*(1-VoidFraction))));
    1896        
    1897 #"Reynolds number of the vapor stream"
    1898 #       STAGES(i).Rev*STAGES(i).invK = STAGES(i).dp*STAGES(i).uV*STAGES(i).rhoV / (STAGES(i).miV*(1-VoidFraction));
    1899        
    1900 #"Pressure drop and Vapor flow"
    1901 #       STAGES(i).deltaP/hs  = ResistanceCoeff*AreaPerPackingVol*STAGES(i).uV^2*STAGES(i).rhoV*STAGES(i).invK / (2*(VoidFraction-STAGES(i).hl)^3);
    1902 
    1903 "Liquid holdup"
    1904         STAGES(i).hl = (12*STAGES(i).miL*AreaPerPackingVol^2*STAGES(i).uL/STAGES(i).rhoL/Gconst)^1/3;
     1890        STAGES(i).hl*V*VoidFraction = STAGES(i).ML*STAGES(i).vL;
     1891       
     1892"Liquid velocity as a function of liquid holdup, Billet (4-27)"
     1893        STAGES(i).hl^3 = (12/Gconst) * AreaPerPackingVol^2 * (STAGES(i).miL/STAGES(i).rhoL) * STAGES(i).uL;
     1894        #STAGES(i).hl = (12*STAGES(i).miL*AreaPerPackingVol^2*STAGES(i).uL/STAGES(i).rhoL/Gconst)^1/3;
    19051895
    19061896"Area occupied by the liquid"
    1907         STAGES(i).Al = STAGES(i).ML*STAGES(i).vL/hs;
     1897        STAGES(i).Al = STAGES(i).ML*STAGES(i).vL/HETP;
    19081898
    19091899end
     
    19161906        STAGES(i).OutletLiquid.T = INITIALIZATION.TopStageTemperature+(INITIALIZATION.BottomStageTemperature-INITIALIZATION.TopStageTemperature)*((i-1)/(NumberOfStages-1));
    19171907
    1918 "The Liquid Holdup of the STAGES"
     1908"The Column Holdup of the STAGES"
    19191909        STAGES(i).hl = INITIALIZATION.ColumnHoldup;
    19201910
  • branches/gui/eml/stage_separators/tray.mso

    r866 r873  
    321321       
    322322        miL as viscosity (Brief="Liquid dynamic viscosity", DisplayUnit='kg/m/s');
    323 #       miV as viscosity (Brief="Vapor dynamic viscosity", DisplayUnit='kg/m/s');
    324323        rhoL as dens_mass;
    325324        rhoV as dens_mass;
     
    329328        uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower=-10, Upper=1000);
    330329        uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower=-10, Upper=1000);
    331         #dp as length (Brief="Particle diameter", Default=1e-3, Lower=0, Upper=10);
    332         #invK as positive (Brief="Wall factor", Default=1, Upper=10);
    333         #Rev as Real (Brief="Reynolds number of the vapor stream", Default=4000);
    334330        Al as area (Brief="Area occupied by the liquid", Default=0.001, Upper=10);
    335331        hl as positive (Brief="Column holdup", Unit='m^3/m^3', Default=0.01,Upper=10);
     
    346342        M = ML*OutletLiquid.z + MV*OutletVapour.z;
    347343       
    348 "Mol fraction normalisation"
     344"Mol Fraction Normalisation"
    349345        sum(OutletLiquid.z)= 1.0;
     346
     347"Mol Fraction Constraint"
    350348        sum(OutletLiquid.z)= sum(OutletVapour.z);
    351349       
     
    374372        miL = PP.LiquidViscosity(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z);
    375373
    376 #"Vapour viscosity"
    377  #      miV = PP.VapourViscosity(InletVapour.T, InletVapour.P, InletVapour.z);
    378 
    379374"Volume flow rate of liquid, m^3/m^2/s"
    380375        uL * Al = OutletLiquid.F * vL;
    381376       
     377"Pressure Drop"
    382378        deltaP = InletVapour.P - OutletVapour.P;
    383        
     379
    384380end
    385381
Note: See TracChangeset for help on using the changeset viewer.