Ignore:
Timestamp:
Oct 6, 2009, 4:37:24 PM (13 years ago)
Author:
mamuller
Message:

fixing packed column model

File:
1 edited

Legend:

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

    r735 r849  
    298298";     
    299299       
     300       
    300301PARAMETERS
    301302
    302303outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    303304outer NComp as Integer;
    304 
    305         PPwater as Plugin(Brief="Physical Properties",Type="PP",Components = [ "water" ],
    306                 LiquidModel = "PR",
    307                 VapourModel = "PR"
    308         );
    309        
     305#*     
     306outer ColumnDiameter            as length               (Brief="Column diameter");
     307outer AreaPerPackingVol as Real (Brief="Surface area per packing volume", Unit='m^2/m^3');
     308outer VoidFraction as fraction (Brief="Void fraction of packing, m^3/m^3");
     309outer hs as length (Brief="Height of the packing stage");
     310outer 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);
    310321        Mw(NComp)       as molweight    (Brief = "Component Mol Weight");
     322        VapourFlow as Switcher (Valid=["on", "off"], Default = "on");
     323       
    311324       
    312325VARIABLES
    313326
    314327        Inlet                   as stream                               (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}");
    315 in      InletLiquid                     as stream                               (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}");
    316 in      InletVapour                     as stream                               (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}");
     328
     329in      InletLiquid     as stream                               (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}");
     330in      InletVapour     as stream                               (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}");
    317331out     OutletLiquid    as liquid_stream        (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}");
    318332out     OutletVapour    as vapour_stream        (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}");
     
    326340       
    327341        miL as viscosity (Brief="Liquid dynamic viscosity", DisplayUnit='kg/m/s');
    328         miV as viscosity (Brief="Vapor dynamic viscosity", DisplayUnit='kg/m/s');
     342#       miV as viscosity (Brief="Vapor dynamic viscosity", DisplayUnit='kg/m/s');
    329343        rhoL as dens_mass;
    330344        rhoV as dens_mass;
    331345       
    332         deltaP as pressure;
    333        
    334         uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower=-10, Upper=100);
    335         uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower=-10, Upper=100);
    336         dp as length (Brief="Particle diameter", Default=1e-3, Lower=0, Upper=10);
    337         invK as positive (Brief="Wall factor", Default=1, Upper=10);
    338         Rev as Real (Brief="Reynolds number of the vapor stream", Default=4000);
    339         Al as area (Brief="Area occupied by the liquid", Default=0.001, Upper=1);
    340         hl as positive (Brief="Column holdup", Unit='m^3/m^3', Default=0.01,Upper=10);
     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);
     350        #dp as length (Brief="Particle diameter", Default=1e-3, Lower=0, Upper=10);
     351        #invK as positive (Brief="Wall factor", Default=1, Upper=10);
     352        #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
    341356
    342357SET
    343358        Mw = PP.MolecularWeight();
    344359
     360
    345361EQUATIONS
    346362
     
    348364        diff(M)=Inlet.F*Inlet.z + InletLiquid.F*InletLiquid.z + InletVapour.F*InletVapour.z- OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z;
    349365
     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
    350369"Molar Holdup"
    351370        M = ML*OutletLiquid.z + MV*OutletVapour.z;
    352371       
     372"Energy Holdup"
     373    E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V;       
     374       
    353375"Mol fraction normalisation"
    354376        sum(OutletLiquid.z)= 1.0;
     377        sum(OutletLiquid.z)=sum(OutletVapour.z);
    355378       
    356379"Liquid Volume"
     
    369392        OutletLiquid.P = OutletVapour.P;
    370393       
     394"Geometry Constraint"
     395    V*VoidFraction = ML*vL + MV*vV;
     396
    371397"Liquid Density"
    372398        rhoL = PP.LiquidDensity(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z);
     
    378404        miL = PP.LiquidViscosity(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z);
    379405
    380 "Vapour viscosity"
    381         miV = PP.VapourViscosity(InletVapour.T, InletVapour.P, InletVapour.z);
     406#"Vapour viscosity"
     407#       miV = PP.VapourViscosity(InletVapour.T, InletVapour.P, InletVapour.z);
     408
     409"Area occupied by the liquid"
     410        Al = ML*vL/hs;
    382411
    383412"Volume flow rate of liquid, m^3/m^2/s"
    384413        uL * Al = OutletLiquid.F * vL;
    385414       
    386         deltaP = InletVapour.P - OutletVapour.P;
     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;
    387439       
    388440end
Note: See TracChangeset for help on using the changeset viewer.