Changeset 522 for trunk


Ignore:
Timestamp:
May 21, 2008, 8:21:12 PM (14 years ago)
Author:
Argimiro Resende Secchi
Message:

merging tray versions.

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/eml/stage_separators/tray.mso

    r513 r522  
    532532        hl = (12*miL*a^2*uL/rhoL/g)^1/3;
    533533end
     534
     535#*-------------------------------------
     536* Nonequilibrium Model
     537-------------------------------------*#
     538Model interface
     539       
     540        ATTRIBUTES
     541        Pallete         = false;
     542        Icon            = "icon/Tray";
     543        Brief           = "Descrition of variables of the equilibrium interface.";
     544        Info            =
     545"This model contains only the variables of the equilibrium interface.";
     546
     547        PARAMETERS
     548outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
     549outer NComp as Integer;
     550outer NC1 as Integer;
     551       
     552        VARIABLES
     553        NL(NComp) as flow_mol_delta     (Brief = "Stream Molar Rate on Liquid Phase");
     554        NV(NComp) as flow_mol_delta     (Brief = "Stream Molar Rate on Vapour Phase");
     555        T as temperature                (Brief = "Stream Temperature");
     556        P as pressure                   (Brief = "Stream Pressure");
     557        x(NComp) as fraction    (Brief = "Stream Molar Fraction on Liquid Phase");
     558        y(NComp) as fraction    (Brief = "Stream Molar Fraction on Vapour Phase");
     559        a as area                           (Brief = "Interface Area");
     560        htL as heat_trans_coeff (Brief = "Heat Transference Coefficient on Liquid Phase");
     561        htV as heat_trans_coeff (Brief = "Heat Transference Coefficient on Vapour Phase");     
     562        E_liq as heat_rate      (Brief = "Liquid Energy Rate at interface");
     563    E_vap as heat_rate      (Brief = "Vapour Energy Rate at interface");       
     564        hL as enth_mol          (Brief = "Liquid Molar Enthalpy");
     565        hV as enth_mol          (Brief = "Vapour Molar Enthalpy");
     566        kL(NC1,NC1) as velocity (Brief = "Mass Transfer Coefficients");
     567        kV(NC1,NC1) as velocity (Brief = "Mass Transfer Coefficients");
     568       
     569        EQUATIONS
     570        "Liquid Enthalpy"
     571        hL = PP.LiquidEnthalpy(T, P, x);
     572       
     573        "Vapour Enthalpy"
     574        hV = PP.VapourEnthalpy(T, P, y);
     575
     576end
     577
     578Model trayRateBasic
     579        ATTRIBUTES
     580        Pallete         = false;
     581        Icon            = "icon/Tray";
     582        Brief           = "Basic equations of a tray rate column model.";
     583        Info            =
     584"This model contains only the main equations of a column tray nonequilibrium model without
     585the hidraulic equations.
     586       
     587== Assumptions ==
     588* both phases (liquid and vapour) exists all the time;
     589* no entrainment of liquid or vapour phase;
     590* no weeping;
     591* the dymanics in the downcomer are neglected.
     592";
     593       
     594        PARAMETERS
     595outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
     596outer NComp as Integer;
     597    NC1 as Integer;
     598        V as volume(Brief="Total Volume of the tray");
     599        Q as heat_rate (Brief="Rate of heat supply");
     600        Ap as area (Brief="Plate area = Atray - Adowncomer");
     601       
     602        VARIABLES
     603in      Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}");
     604in      InletFV as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}");
     605in      InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}");
     606in      InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}");
     607out     OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}");
     608out     OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}");
     609
     610        M_liq(NComp) as mol (Brief="Liquid Molar Holdup in the tray");
     611        M_vap(NComp) as mol (Brief="Vapour Molar Holdup in the tray");
     612        ML as mol (Brief="Molar liquid holdup");
     613        MV as mol (Brief="Molar vapour holdup");
     614        E_liq as energy (Brief="Total Liquid Energy Holdup on tray");
     615        E_vap as energy (Brief="Total Vapour Energy Holdup on tray");
     616        vL as volume_mol (Brief="Liquid Molar Volume");
     617        vV as volume_mol (Brief="Vapour Molar volume");
     618        Level as length (Brief="Height of clear liquid on plate");
     619        interf as interface;   
     620
     621        SET   
     622        NC1=NComp-1;
     623
     624        EQUATIONS
     625        "Component Molar Balance"
     626        diff(M_liq)=Inlet.F*Inlet.z + InletL.F*InletL.z
     627        - OutletL.F*OutletL.z + interf.NL;
     628       
     629        diff(M_vap)=InletFV.F*InletFV.z + InletV.F*InletV.z
     630        - OutletV.F*OutletV.z - interf.NV;
     631       
     632        "Energy Balance"
     633        diff(E_liq) = Inlet.F*Inlet.h + InletL.F*InletL.h
     634                - OutletL.F*OutletL.h  + Q + interf.E_liq;
     635       
     636        diff(E_vap) = InletFV.F*InletFV.h + InletV.F*InletV.h
     637                - OutletV.F*OutletV.h  - interf.E_vap;
     638       
     639        "Molar Holdup"
     640        M_liq = ML*OutletL.z;
     641       
     642        M_vap = MV*OutletV.z;
     643       
     644        "Energy Holdup"
     645        E_liq = ML*(OutletL.h - OutletL.P*vL);
     646       
     647        E_vap = MV*(OutletV.h - OutletV.P*vV);
     648       
     649        "Energy Rate through the interface"
     650        interf.E_liq = interf.htL*interf.a*(interf.T-OutletL.T)+sum(interf.NL)*interf.hL;       
     651       
     652        interf.E_vap = interf.htV*interf.a*(OutletV.T-interf.T)+sum(interf.NV)*interf.hV;
     653       
     654        "Mass Conservation"
     655        interf.NL = interf.NV;
     656       
     657        "Energy Conservation"
     658        interf.E_liq = interf.E_vap;
     659       
     660        "Mol fraction normalisation"
     661        sum(OutletL.z)= 1.0;
     662        sum(OutletL.z)= sum(OutletV.z);
     663        sum(interf.x)=1.0;
     664        sum(interf.x)=sum(interf.y);
     665       
     666        "Liquid Volume"
     667        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
     668        "Vapour Volume"
     669        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
     670       
     671        "Chemical Equilibrium"
     672        PP.LiquidFugacityCoefficient(interf.T, interf.P, interf.x)*interf.x =
     673                PP.VapourFugacityCoefficient(interf.T, interf.P, interf.y)*interf.y;
     674
     675        "Geometry Constraint"
     676        V = ML*vL + MV*vV;
     677       
     678        "Level of clear liquid over the weir"
     679        Level = ML*vL/Ap;
     680
     681        "Total Mass Transfer Rates"
     682        interf.NL(1:NC1)=interf.a*sumt(interf.kL*(interf.x(1:NC1)-OutletL.z(1:NC1)))/vL+
     683                OutletL.z(1:NC1)*sum(interf.NL);
     684
     685#       interf.NL(1:NC1)=0.01*'kmol/s';
     686       
     687        interf.NV(1:NC1)=interf.a*sumt(interf.kV*(OutletV.z(1:NC1)-interf.y(1:NC1)))/vV+
     688                OutletV.z(1:NC1)*sum(interf.NV);
     689
     690        "Mechanical Equilibrium"
     691        OutletV.P = OutletL.P;
     692        interf.P=OutletL.P;
     693end
     694
     695Model trayRate as trayRateBasic
     696        ATTRIBUTES
     697        Pallete         = false;
     698        Icon            = "icon/Tray";
     699        Brief           = "Complete rate model of a column tray.";
     700        Info            =
     701"== Specify ==
     702* the Feed stream
     703* the Liquid inlet stream
     704* the Vapour inlet stream
     705* the Vapour outlet flow (OutletV.F)
     706       
     707== Initial ==
     708* the plate temperature of both phases (OutletL.T and OutletV.T)
     709* the liquid height (Level) OR the liquid flow holdup (ML)
     710* the vapor holdup (MV)
     711* (NoComps - 1) OutletL compositions
     712";
     713
     714        PARAMETERS
     715        Ah as area (Brief="Total holes area");
     716        lw as length (Brief="Weir length");
     717        g as acceleration (Default=9.81);
     718        hw as length (Brief="Weir height");
     719        beta as fraction (Brief="Aeration fraction");
     720        alfa as fraction (Brief="Dry pressure drop coefficient");
     721       
     722        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
     723        LiquidFlow as Switcher(Valid = ["on", "off"], Default = "on");
     724       
     725        VARIABLES
     726        rhoL as dens_mass;
     727        rhoV as dens_mass;
     728
     729        EQUATIONS
     730        "Liquid Density"
     731        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
     732        "Vapour Density"
     733        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
     734
     735        switch LiquidFlow
     736                case "on":
     737                "Francis Equation"
     738#               OutletL.F*vL = 1.84*'m^0.5/s'*lw*((Level-(beta*hw))/(beta))^1.5;
     739                OutletL.F*vL = 1.84*'1/s'*lw*((Level-(beta*hw))/(beta))^2;
     740                when Level < (beta * hw) switchto "off";
     741               
     742                case "off":
     743                "Low level"
     744                OutletL.F = 0 * 'mol/h';
     745                when Level > (beta * hw) + 1e-6*'m' switchto "on";
     746        end
     747
     748        switch VapourFlow
     749                case "on":
     750                InletV.F*vV = sqrt((InletV.P - OutletV.P)/(rhoV*alfa))*Ah;
     751                when InletV.F < 1e-6 * 'kmol/h' switchto "off";
     752               
     753                case "off":
     754                InletV.F = 0 * 'mol/s';
     755                when InletV.P > OutletV.P + Level*g*rhoL + 1e-1 * 'atm' switchto "on";
     756        end     
     757end
  • trunk/sample/stage_separators/sample_tray.mso

    r514 r522  
    220220        TimeEnd = 100;
    221221end
     222
     223FlowSheet trayRate_Test
     224        PARAMETERS
     225        PP      as Plugin(Brief="Physical Properties",
     226                Type="PP",
     227                Components = [ "n-pentane", "benzene"],
     228                LiquidModel = "PR",
     229                VapourModel = "PR"
     230        );
     231        NComp   as Integer;
     232
     233        SET
     234        NComp = PP.NumberOfComponents;
     235       
     236        DEVICES
     237        t1 as trayRate;
     238        feed as source;
     239        feedV as source;
     240        inL as liquid_stream;
     241        inV as vapour_stream;
     242       
     243        CONNECTIONS
     244        feed.Outlet to t1.Inlet;
     245        feedV.Outlet to t1.InletFV;
     246        inL to t1.InletL;
     247        inV to t1.InletV;
     248       
     249        SPECIFY
     250        feed.Outlet.F = 116 * 'kmol/h';
     251        feed.Outlet.T = 280 * 'K';
     252        feed.Outlet.P = 150 * 'kPa';
     253        feed.Outlet.z = [0.5, 0.5];
     254
     255        feedV.Outlet.F = 0 * 'kmol/h';
     256        feedV.Outlet.T = 280 * 'K';
     257        feedV.Outlet.P = 150 * 'atm';
     258        feedV.Outlet.z = [0.5, 0.5];
     259
     260        inL.P = 150 * 'kPa';
     261        inL.T = 290 * 'K';
     262        inL.F = 90 * 'kmol/h';
     263        inL.z = [0.1641, 0.8359];
     264
     265        inV.P = 150 * 'kPa';
     266        inV.T = 500 * 'K';
     267        inV.z = [0.0584, 0.9416];
     268#       inV.F = 62 * 'kmol/h';
     269
     270        t1.OutletV.F = 120 * 'kmol/h';
     271#       t1.OutletL.F = 120 * 'kmol/h';
     272        t1.interf.a = 40 * 'm^2';
     273        t1.interf.htL = 10.01 * 'kW/m^2/K';
     274        t1.interf.htV = 0.025 * 'kW/m^2/K';
     275        t1.interf.kL = 0.00933 * 'm/s';
     276        t1.interf.kV = 0.000236 * 'm/s';
     277
     278        SET
     279        t1.V = 4 * 'ft^3';
     280        t1.Ah = 0.394 * 'ft^2';
     281        t1.lw = 20.94 * 'in';
     282        t1.hw = 0.125 * 'ft';
     283        t1.beta = 0.6;
     284        t1.alfa = 4;
     285        t1.Ap = 3.94 * 'ft^2';
     286        t1.Q = 0 * 'kW';
     287
     288        INITIAL
     289        t1.OutletL.T = 295 *'K';
     290        t1.OutletV.T = 290 *'K';
     291        t1.Level = 0.9 * t1.hw;
     292        t1.OutletL.z(1) = 0.5;
     293        t1.OutletV.z(1) = 0.6;
     294        t1.MV = 1.0*'mol' ;
     295
     296        OPTIONS
     297        TimeStep = 0.1;
     298        TimeEnd = 10;
     299        TimeUnit = 's';
     300        GuessFile = "trayRate_Test.rlt";
     301end
Note: See TracChangeset for help on using the changeset viewer.