Ignore:
Timestamp:
Nov 13, 2009, 5:04:29 PM (13 years ago)
Author:
gerson bicca
Message:

added more folders

File:
1 edited

Legend:

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

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