Ignore:
Timestamp:
Jul 15, 2009, 3:53:47 PM (13 years ago)
Author:
gerson bicca
Message:

updates

File:
1 edited

Legend:

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

    r792 r793  
    2020using "streams";
    2121
    22 Model condenser
     22Model condenser2
    2323        ATTRIBUTES
    2424        Pallete         = true;
     
    285285end
    286286
    287 Model condenser_column
    288         ATTRIBUTES
     287Model condenser
     288
     289ATTRIBUTES
    289290        Pallete         = true;
    290         Icon            = "icon/Condenser_column2";
     291        Icon            = "icon/Condenser";
    291292        Brief           = "Model of a  dynamic condenser with control.";
    292293        Info            =
    293 "== Assumptions ==
     294"== ASSUMPTIONS ==
    294295* perfect mixing of both phases;
    295296* thermodynamics equilibrium.
    296297       
    297 == Specify ==
    298 * the inlet stream;
     298== SPECIFY ==
     299* the InletVapour stream;
    299300* the outlet flows: OutletVapour.F and OutletLiquid.F;
    300 * the InletQ (the model requires an energy stream).
    301        
    302 == Initial Conditions ==
     301* the InletQ (the model requires an energy stream, also you can use a controller for setting the heat duty using the heat_flow model).
     302
     303== OPTIONAL ==
     304* the condenser model has three control ports
     305** TI OutletLiquid Temperature Indicator;
     306** PI OutletLiquid Pressure Indicator;
     307** LI Level Indicator of Condenser;
     308
     309== INITIAL CONDITIONS ==
    303310* Initial_Temperature :  the condenser temperature (OutletLiquid.T);
    304311* Initial_Level : the condenser liquid level (Level);
     
    307314       
    308315PARAMETERS
    309         outer PP                        as Plugin       (Brief = "External Physical Properties", Type="PP");
     316        outer PP                as Plugin       (Brief = "External Physical Properties", Type="PP");
    310317        outer NComp     as Integer (Brief="Number of Components");
    311318       
    312319        Mw(NComp)       as molweight    (Brief = "Component Mol Weight",Hidden=true);
    313 
    314        
    315         VapourFlow              as Switcher     (Brief="Vapour Flow", Valid = ["on", "off"], Default = "on",Hidden=true);
    316 
    317         V                       as volume       (Brief="Condenser total volume");
    318         Across  as area                 (Brief="Cross Section Area of condenser");
    319         Kfactor as positive     (Brief="K factor for pressure drop", Lower = 1E-8, Default = 1E-3);
    320        
    321         Initial_Level                                                           as length                               (Brief="Initial Level of liquid phase");
    322         Initial_Temperature                                     as temperature  (Brief="Initial Temperature of Condenser");
    323         Initial_Composition(NComp)      as positive                     (Brief="Initial Liquid Composition", Lower=1E-6);
     320        low_flow        as flow_mol     (Brief = "Low Flow",Default = 1E-6, Hidden=true);
     321        zero_flow       as flow_mol     (Brief = "No Flow",Default = 0, Hidden=true);
     322        KfConst         as area                 (Brief="Constant for K factor pressure drop", Default = 1, Hidden=true);
     323       
     324        VapourFlow      as Switcher     (Brief="Vapour Flow", Valid = ["on", "off"], Default = "on",Hidden=true);
     325
     326        V               as volume       (Brief="Condenser total volume");
     327        Across  as area         (Brief="Cross Section Area of condenser");
     328        Kfactor as positive (Brief="K factor for pressure drop", Lower = 1E-8, Default = 1E-3);
     329       
     330        Initial_Level                           as length               (Brief="Initial Level of liquid phase");
     331        Initial_Temperature                     as temperature  (Brief="Initial Temperature of Condenser");
     332        Initial_Composition(NComp)      as positive     (Brief="Initial Liquid Composition", Lower=1E-6);
    324333       
    325334VARIABLES
    326335
    327 in              InletVapour             as stream                                       (Brief="Vapour inlet stream", PosX=0, PosY=0.5, Symbol="_{inV}");
    328 out     OutletLiquid    as liquid_stream                (Brief="Liquid outlet stream", PosX=0.5, PosY=1, Symbol="_{outL}");
    329 out     OutletVapour    as vapour_stream                (Brief="Vapour outlet stream", PosX=0.5, PosY=0, Symbol="_{outV}");
    330 in              InletQ                          as power                                        (Brief="Heat supplied", Protected = true, PosX=1, PosY=0.6, Symbol="_{in}");
    331 
    332         out     TCI as control_signal   (Brief="Temperature  Indicator of Condenser", Protected = true, PosX=1, PosY=0.40);
    333         out     LCI as control_signal   (Brief="Level  Indicator of Condenser", Protected = true, PosX=1, PosY=0.25);
    334         out     PCI as control_signal   (Brief="Pressure  Indicator of Condenser", Protected = true, PosX=1, PosY=0.10);
    335 
    336         M(NComp)        as mol                                  (Brief="Molar Holdup in the tray", Protected = true);
    337         ML                              as mol                                  (Brief="Molar liquid holdup", Protected = true);
    338         MV                              as mol                                  (Brief="Molar vapour holdup", Protected = true);
    339         E                                       as energy                       (Brief="Total Energy Holdup on tray", Protected = true);
    340         vL                              as volume_mol   (Brief="Liquid Molar Volume", Protected = true);
    341         vV                              as volume_mol   (Brief="Vapour Molar volume", Protected = true);
    342         rho                             as dens_mass            (Brief ="Inlet Vapour Mass Density",Hidden=true);
    343         Level                   as length                               (Brief="Level of liquid phase", Protected = true);
    344         Pdrop                   as press_delta          (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P", Protected=true);
     336in      InletVapour     as stream                       (Brief="Vapour inlet stream", PosX=0.13, PosY=0, Symbol="_{in}^{Vapour}");
     337out     OutletLiquid    as liquid_stream        (Brief="Liquid outlet stream", PosX=0.35, PosY=1, Symbol="_{out}^{Liquid}");
     338out     OutletVapour    as vapour_stream        (Brief="Vapour outlet stream", PosX=0.54, PosY=0, Symbol="_{out}^{Vapour}");
     339in      InletQ                  as power                        (Brief="Heat supplied", Protected = true, PosX=1, PosY=0.08, Symbol="Q_{in}");
     340
     341        out     TI as control_signal    (Brief="Temperature  Indicator of Condenser", Protected = true, PosX=0.33, PosY=0);
     342        out     LI as control_signal    (Brief="Level  Indicator of Condenser", Protected = true, PosX=0.43, PosY=0);
     343        out     PI as control_signal    (Brief="Pressure  Indicator of Condenser", Protected = true, PosX=0.25, PosY=0);
     344
     345        M(NComp)        as mol                  (Brief="Molar Holdup in the tray", Protected = true);
     346        ML                      as mol                  (Brief="Molar liquid holdup", Protected = true);
     347        MV                      as mol                  (Brief="Molar vapour holdup", Protected = true);
     348        E                       as energy               (Brief="Total Energy Holdup on tray", Protected = true);
     349        vL                      as volume_mol   (Brief="Liquid Molar Volume", Protected = true);
     350        vV                      as volume_mol   (Brief="Vapour Molar volume", Protected = true);
     351        rho                     as dens_mass    (Brief ="Inlet Vapour Mass Density",Hidden=true, Symbol ="\rho");
     352        Level           as length               (Brief="Level of liquid phase", Protected = true);
     353        Pdrop           as press_delta (Brief = "Pressure Drop", DisplayUnit = 'kPa', Symbol ="\Delta P", Protected=true);
    345354
    346355SET
    347356
    348357        Mw   = PP.MolecularWeight();
     358        low_flow = 1E-6 * 'kmol/h';
     359        zero_flow = 0 * 'kmol/h';
     360        KfConst = 1*'m^2';
    349361       
    350362INITIAL
    351363
    352364"Initial Level"
    353         Level                                                                   = Initial_Level;
     365        Level   = Initial_Level;
    354366
    355367"Initial Temperature"
    356         OutletLiquid.T                                          = Initial_Temperature;
     368        OutletLiquid.T  = Initial_Temperature;
    357369
    358370"Initial Composition"
    359         OutletLiquid.z(1:NComp-1)   = Initial_Composition(1:NComp-1)/sum(Initial_Composition);
     371        OutletLiquid.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition);
    360372
    361373EQUATIONS
     
    363375switch VapourFlow
    364376
    365         case "on":
    366         InletVapour.F*sum(Mw*InletVapour.z) = Kfactor *sqrt(Pdrop*rho)*'m^2';
    367 
    368         when InletVapour.F < 1E-6 * 'kmol/h' switchto "off";
    369 
    370         case "off":
    371         InletVapour.F = 0 * 'mol/s';
     377case "on":
     378        InletVapour.F*sum(Mw*InletVapour.z) = Kfactor *sqrt(Pdrop*rho)*KfConst;
     379
     380        when InletVapour.F < low_flow switchto "off";
     381
     382case "off":
     383        InletVapour.F = zero_flow;
    372384
    373385        when InletVapour.P > OutletLiquid.P switchto "on";
     
    422434
    423435"Temperature indicator"
    424         TCI * 'K' = OutletLiquid.T;
     436        TI * 'K' = OutletLiquid.T;
    425437
    426438"Pressure indicator"
    427         PCI * 'atm' = OutletLiquid.P;
     439        PI * 'atm' = OutletLiquid.P;
    428440
    429441"Level indicator"
    430         LCI*V = Level*Across;
     442        LI*V = Level*Across;
    431443       
    432444end
Note: See TracChangeset for help on using the changeset viewer.