Ignore:
Timestamp:
Feb 25, 2009, 7:51:53 PM (13 years ago)
Author:
gerson bicca
Message:

updates (tank/reboiler/condenser/column)

File:
1 edited

Legend:

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

    r715 r721  
    225225Model reboilerReact
    226226        ATTRIBUTES
    227         Pallete         = true;
     227        Pallete         = false;
    228228        Icon            = "icon/Reboiler";
    229229        Brief           = "Model of a dynamic reboiler with reaction.";
     
    248248";
    249249       
    250         PARAMETERS
     250PARAMETERS
    251251        outer PP as Plugin(Type="PP");
    252252        outer NComp as Integer;
     
    257257        Hr as energy_mol;
    258258
    259         VARIABLES
    260 in      Inlet as stream(Brief="Feed Stream", PosX=0.8127, PosY=0, Symbol="_{in}");
    261 in      InletL as stream(Brief="Liquid inlet stream", PosX=0, PosY=0.5254, Symbol="_{inL}");
    262 out     OutletL as liquid_stream(Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}");
    263 out     OutletV as vapour_stream(Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}");
    264         InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}");
    265 
    266         M(NComp) as mol (Brief="Molar Holdup in the tray");
    267         ML as mol (Brief="Molar liquid holdup");
    268         MV as mol (Brief="Molar vapour holdup");
    269         E as energy (Brief="Total Energy Holdup on tray");
    270         vL as volume_mol (Brief="Liquid Molar Volume");
    271         vV as volume_mol (Brief="Vapour Molar volume");
    272         Level as length (Brief="Level of liquid phase");
    273         Vol as volume;
    274         startup as Real;
    275         rhoV as dens_mass;
    276         r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
    277         C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
    278 
    279         EQUATIONS
    280         "Molar Concentration"
     259        Initial_Level                           as length               (Brief="Initial Level of liquid phase");
     260        Initial_Temperature                     as temperature  (Brief="Initial Temperature of Reboiler");
     261        Initial_Composition(NComp)      as fraction     (Brief="Initial Liquid Composition");
     262       
     263VARIABLES
     264in      InletL  as stream                       (Brief="Liquid inlet stream", PosX=0, PosY=0.5254, Symbol="_{inL}");
     265out     OutletL as liquid_stream        (Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}");
     266out     OutletV as vapour_stream        (Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}");
     267        InletQ  as power                        (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}");
     268
     269        M(NComp)        as mol                  (Brief="Molar Holdup in the tray");
     270        ML                      as mol                  (Brief="Molar liquid holdup");
     271        MV                      as mol                  (Brief="Molar vapour holdup");
     272        E                       as energy               (Brief="Total Energy Holdup on tray");
     273        vL                      as volume_mol   (Brief="Liquid Molar Volume");
     274        vV                      as volume_mol   (Brief="Vapour Molar volume");
     275        Level           as length               (Brief="Level of liquid phase");
     276        Vol             as volume;
     277        rhoV            as dens_mass;
     278        r3                      as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
     279        C(NComp)        as conc_mol     (Brief = "Molar concentration", Lower = -1);
     280
     281INITIAL
     282
     283        Level                                   = Initial_Level;
     284        OutletL.T                               = Initial_Temperature;
     285        OutletL.z(1:NComp-1)    = Initial_Composition(1:NComp-1)/sum(Initial_Composition);
     286
     287EQUATIONS
     288"Molar Concentration"
    281289        OutletL.z = vL * C;
    282290       
    283         "Reaction"
     291"Reaction"
    284292        r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s';
    285293
    286         "Component Molar Balance"
    287         diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z
    288                 - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL;
    289        
    290         "Energy Balance"
    291         diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
    292                 - OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ + Hr * r3 * vL*ML;
    293        
    294         "Molar Holdup"
     294"Component Molar Balance"
     295        diff(M)= InletL.F*InletL.z- OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL;
     296       
     297"Energy Balance"
     298        diff(E) = InletL.F*InletL.h- OutletL.F*OutletL.h - OutletV.F*OutletV.h + InletQ + Hr * r3 * vL*ML;
     299       
     300"Molar Holdup"
    295301        M = ML*OutletL.z + MV*OutletV.z;
    296302       
    297         "Energy Holdup"
     303"Energy Holdup"
    298304        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
    299305       
    300         "Mol fraction normalisation"
     306"Mol fraction normalisation"
    301307        sum(OutletL.z)=1.0;
    302308       
    303         "Liquid Volume"
     309"Liquid Volume"
    304310        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
    305         "Vapour Volume"
     311
     312"Vapour Volume"
    306313        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 
    307         "Vapour Density"
     314
     315"Vapour Density"
    308316        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
    309317       
    310         "Level of liquid phase"
     318"Level of liquid phase"
    311319        Level = ML*vL/Across;
    312320
    313321        Vol = ML*vL;
    314322       
    315         "Mechanical Equilibrium"
     323"Mechanical Equilibrium"
    316324        OutletL.P = OutletV.P;
    317325       
    318         "Thermal Equilibrium"
     326"Thermal Equilibrium"
    319327        OutletL.T = OutletV.T; 
    320328       
    321         "Geometry Constraint"
     329"Geometry Constraint"
    322330        V = ML*vL + MV*vV;             
    323331
    324         "Chemical Equilibrium"
     332"Chemical Equilibrium"
    325333        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
    326334        PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
Note: See TracChangeset for help on using the changeset viewer.