Ignore:
Timestamp:
Oct 1, 2008, 5:51:36 PM (14 years ago)
Author:
gerson bicca
Message:

updates

File:
1 edited

Legend:

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

    r649 r654  
    357357PARAMETERS
    358358        CondenserVapourFlow             as Switcher     (Valid = ["on", "off"], Default = "on",Hidden=true);
    359        
     359
    360360VARIABLES
    361361        CondenserUnity  as condenser;
     
    499499out             HeatToTopVessel         as power                                (Brief="Heat supplied to Top Vessel",Hidden=true);
    500500
     501out     LiquidDistillate                                as liquid_stream        (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.47);
     502in              ConnectorSplitterTop            as stream                       (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true);
     503
     504out     BottomProduct                                   as liquid_stream        (Brief="Liquid outlet stream From Bottom Splitter", PosX=1, PosY=1);
     505in              ConnectorSplitterBottom         as stream                       (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true);
     506
    501507EQUATIONS
     508
     509# Top Splitter Connector Equations
     510        ConnectorSplitterTop.T = LiquidDistillate.T;
     511        ConnectorSplitterTop.P = LiquidDistillate.P;
     512        ConnectorSplitterTop.F = LiquidDistillate.F;
     513        ConnectorSplitterTop.z = LiquidDistillate.z;
     514
     515# Bottom Splitter Connector Equations
     516        ConnectorSplitterBottom.T = BottomProduct.T;
     517        ConnectorSplitterBottom.P = BottomProduct.P;
     518        ConnectorSplitterBottom.F = BottomProduct.F;
     519        ConnectorSplitterBottom.z = BottomProduct.z;
    502520
    503521switch CondenserVapourFlow
     
    533551HeatToBottomVessel      to BottomVessel.InletQ;
    534552HeatToTopVessel                 to TopVessel.InletQ;
     553TopSplitter.Outlet1             to ConnectorSplitterTop;
     554BottomSplitter.Outlet1  to ConnectorSplitterBottom;
    535555
    536556end
     
    548568*       - a pump in reflux stream.
    549569*
    550 * ------------------------------------------------------------------*
    551 Model Distillation_thermosyphon_condTeste
     570* ------------------------------------------------------------------*#
     571Model Distillation_thermosyphon_cond as Section_ColumnBasic
    552572        ATTRIBUTES
    553573        Pallete         = true;
     
    578598";
    579599
    580         PARAMETERS
    581         outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    582         outer NComp as Integer;
    583         NumberOfTrays as Integer(Brief="Number of trays", Default=2);
    584         topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1);
    585         top as Integer(Brief="Number of top tray");
    586         bot as Integer(Brief="Number of bottom tray");
    587         VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    588 
    589         SET
    590         top = (NumberOfTrays-1)*(1-topdown)/2+1;
    591         bot = NumberOfTrays/top;
    592        
    593         VARIABLES
    594         trays(NumberOfTrays) as trayTeste;
    595         cond as condenser;
    596         reb as reboilerSteady;
    597         tbottom as tank;
    598         spbottom as splitter;
    599         sptop as splitter;
    600         pump1 as pump;
    601         alfaTopo as Real;
    602 
    603         EQUATIONS
    604         switch VapourFlow
     600PARAMETERS
     601        CondenserVapourFlow     as Switcher     (Valid = ["on", "off"], Default = "on",Hidden=true);
     602
     603VARIABLES
     604
     605        CondenserUnity as condenser;
     606        SplitterTop             as splitter;
     607        PumpUnity               as pump;
     608        BottomVessel    as tank;
     609        SplitterBottom  as splitter;
     610        ReboilerUnity   as reboilerSteady;
     611        alfaTopo                        as Real;
     612
     613out             HeatToCondenser         as power                                (Brief="Heat supplied to Condenser",Hidden=true);
     614out             HeatToReboiler                  as power                                (Brief="Heat supplied to Reboiler",Hidden=true);
     615out             HeatToBottomVessel      as power                                (Brief="Heat supplied to Bottom Vessel",Hidden=true);
     616
     617out     VapourDistillate                                as vapour_stream        (Brief="Vapour outlet stream From Top Condenser", PosX=0.73, PosY=0);
     618in              ConnectorCondenserVout  as stream                               (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true);
     619
     620out     LiquidDistillate                                as liquid_stream        (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.45);
     621in              ConnectorSplitterTop    as stream                       (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true);
     622
     623out     BottomProduct                                   as liquid_stream        (Brief="Liquid outlet stream From Bottom Splitter", PosX=1, PosY=1);
     624in              ConnectorSplitterBottom         as stream                       (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true);
     625
     626EQUATIONS
     627
     628# Condenser Connector Equations
     629        ConnectorCondenserVout.T = VapourDistillate.T;
     630        ConnectorCondenserVout.P = VapourDistillate.P;
     631        ConnectorCondenserVout.F = VapourDistillate.F;
     632        ConnectorCondenserVout.z = VapourDistillate.z;
     633
     634# Top Splitter Connector Equations
     635        ConnectorSplitterTop.T = LiquidDistillate.T;
     636        ConnectorSplitterTop.P = LiquidDistillate.P;
     637        ConnectorSplitterTop.F = LiquidDistillate.F;
     638        ConnectorSplitterTop.z = LiquidDistillate.z;
     639
     640# Bottom Splitter Connector Equations
     641        ConnectorSplitterBottom.T = BottomProduct.T;
     642        ConnectorSplitterBottom.P = BottomProduct.P;
     643        ConnectorSplitterBottom.F = BottomProduct.F;
     644        ConnectorSplitterBottom.z = BottomProduct.z;
     645
     646switch CondenserVapourFlow
    605647                case "on":
    606                 cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
    607                 cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    608                 when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
     648                CondenserUnity.InletV.F*trays(1).vV = alfaTopo * Ah * sqrt(2*(trays(1).OutletV.P -
     649                CondenserUnity.OutletL.P + 1e-8 * 'atm') / (alfa*trays(1).rhoV));
     650                when CondenserUnity.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    609651               
    610652                case "off":
    611                 cond.InletV.F = 0 * 'mol/s';
    612                 when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
    613         end     
    614                        
    615         CONNECTIONS
    616         #vapor
    617         reb.OutletV to trays(bot).InletV;
    618         trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV;
    619         trays(top).OutletV to cond.InletV;
    620        
    621         #liquid
    622         cond.OutletL to sptop.Inlet;   
    623         sptop.Outlet2 to pump1.Inlet;
    624         pump1.Outlet to trays(top).InletL;
    625         trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL;
    626         trays(bot).OutletL to tbottom.Inlet;
    627         tbottom.Outlet to spbottom.Inlet;
    628         spbottom.Outlet2 to reb.InletL;
     653                CondenserUnity.InletV.F = 0 * 'mol/s';
     654                when trays(1).OutletV.P > CondenserUnity.OutletL.P + 1e-1 * 'atm' switchto "on";
     655end     
     656
     657CONNECTIONS
     658#vapor
     659        ReboilerUnity.OutletV   to trays(NumberOfTrays).InletV;
     660        trays(1).OutletV                                to CondenserUnity.InletV;
     661
     662#liquid
     663        CondenserUnity.OutletL          to SplitterTop.Inlet;   
     664        SplitterTop.Outlet2                             to PumpUnity.Inlet;
     665        PumpUnity.Outlet                                        to trays(1).InletL;
     666        trays(NumberOfTrays).OutletL    to BottomVessel.Inlet;
     667        BottomVessel.Outlet                             to SplitterBottom.Inlet;
     668        SplitterBottom.Outlet2                  to ReboilerUnity.InletL;
     669
     670#Connectors
     671HeatToCondenser                         to CondenserUnity.InletQ;
     672HeatToReboiler                          to ReboilerUnity.InletQ;
     673HeatToBottomVessel      to BottomVessel.InletQ;
     674CondenserUnity.OutletV to ConnectorCondenserVout;
     675SplitterTop.Outlet1             to ConnectorSplitterTop;
     676SplitterBottom.Outlet1  to ConnectorSplitterBottom;
     677
    629678end
    630679
     
    639688*       - a pump in reflux stream.
    640689*
    641 * ------------------------------------------------------------------*
    642 Model Distillation_kettle_subcoolingTeste
    643         ATTRIBUTES
     690* ------------------------------------------------------------------*#
     691Model Distillation_kettle_subcooling as Section_ColumnBasic
     692
     693ATTRIBUTES
    644694        Pallete         = true;
    645695        Icon            = "icon/DistillationKettleSubcooling";
    646         Brief           = "Model of a distillation column with steady condenser and dynamic reboiler.";
     696        Brief   = "Model of a distillation column with steady condenser and dynamic reboiler.";
    647697        Info            =
    648698"== Specify ==
     
    670720";
    671721       
    672         PARAMETERS
    673         outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
    674         outer NComp as Integer;
    675         NumberOfTrays as Integer(Brief="Number of trays", Default=2);
    676         topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1);
    677         top as Integer(Brief="Number of top tray");
    678         bot as Integer(Brief="Number of bottom tray");
    679         VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    680 
    681         SET
    682         top = (NumberOfTrays-1)*(1-topdown)/2+1;
    683         bot = NumberOfTrays/top;
    684        
    685         VARIABLES
    686         trays(NumberOfTrays) as trayTeste;
    687         cond as condenserSteady;
    688         reb as reboiler;
    689         ttop as tank_cylindrical;
    690         sptop as splitter;
    691         pump1 as pump;
     722PARAMETERS
     723        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on",Hidden=true);
     724
     725VARIABLES
     726        CondenserUnity as condenserSteady;
     727        TopVessel               as tank_cylindrical;
     728        SplitterTop             as splitter;
     729        PumpUnity               as pump;
     730        ReboilerUnity   as reboiler;
    692731        alfaTopo as Real;
    693732
    694         EQUATIONS
     733out             HeatToCondenser         as power                                (Brief="Heat supplied to Condenser",Hidden=true);
     734out             HeatToReboiler                  as power                                (Brief="Heat supplied to Reboiler",Hidden=true);
     735out             HeatToTopVessel         as power                                (Brief="Heat supplied to Top Vessel",Hidden=true);
     736
     737out     LiquidDistillate                                as liquid_stream        (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.47);
     738in              ConnectorSplitterOut    as stream                       (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true);
     739
     740out     BottomProduct                           as liquid_stream        (Brief="Liquid outlet stream From Reboiler", PosX=1, PosY=1);
     741in              ConnectorReboilerLout   as stream                       (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true);
     742
     743RebNoFlow       as sourceNoFlow (Brief="No Inlet Flow to Reboiler",Hidden=true);
     744
     745EQUATIONS
     746
     747# Splitter Connector Equations
     748        ConnectorSplitterOut.T = LiquidDistillate.T;
     749        ConnectorSplitterOut.P = LiquidDistillate.P;
     750        ConnectorSplitterOut.F = LiquidDistillate.F;
     751        ConnectorSplitterOut.z = LiquidDistillate.z;
     752
     753# Reboiler Connector Equations
     754        ConnectorReboilerLout.T = BottomProduct.T;
     755        ConnectorReboilerLout.P = BottomProduct.P;
     756        ConnectorReboilerLout.F = BottomProduct.F;
     757        ConnectorReboilerLout.z = BottomProduct.z;
     758       
    695759        switch VapourFlow
    696760                case "on":
    697                 cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
    698                 cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    699                 when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
     761                CondenserUnity.InletV.F*trays(1).vV = alfaTopo * Ah * sqrt(2*(trays(1).OutletV.P -
     762                CondenserUnity.OutletL.P + 1e-8 * 'atm') / (alfa*trays(1).rhoV));
     763                when CondenserUnity.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    700764               
    701765                case "off":
    702                 cond.InletV.F = 0 * 'mol/s';
    703                 when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
    704         end     
    705        
    706         CONNECTIONS
    707         #vapor
    708         reb.OutletV to trays(bot).InletV;
    709         trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV;
    710         trays(top).OutletV to cond.InletV;
    711        
    712         #liquid
    713         cond.OutletL to ttop.Inlet;     
    714         ttop.Outlet to sptop.Inlet;
    715         sptop.Outlet2 to pump1.Inlet;   
    716         pump1.Outlet to trays(top).InletL;
    717         trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL;
    718         trays(bot).OutletL to reb.InletL;
     766                CondenserUnity.InletV.F = 0 * 'mol/s';
     767                when trays(1).OutletV.P > CondenserUnity.OutletL.P + 1e-1 * 'atm' switchto "on";
     768end     
     769
     770CONNECTIONS
     771#vapor
     772        ReboilerUnity.OutletV to trays(NumberOfTrays).InletV;
     773        trays(1).OutletV to CondenserUnity.InletV;
     774
     775#liquid
     776        CondenserUnity.OutletL          to TopVessel.Inlet;     
     777        TopVessel.Outlet                                        to SplitterTop.Inlet;
     778        SplitterTop.Outlet2                             to PumpUnity.Inlet;     
     779        PumpUnity.Outlet                                        to trays(1).InletL;
     780        trays(NumberOfTrays).OutletL    to ReboilerUnity.InletL;
     781
     782#Connectors
     783HeatToCondenser                         to CondenserUnity.InletQ;
     784HeatToReboiler                          to ReboilerUnity.InletQ;
     785HeatToTopVessel                         to TopVessel.InletQ;
     786RebNoFlow.Outlet                to ReboilerUnity.Inlet;
     787
     788SplitterTop.Outlet1             to ConnectorSplitterOut;
     789ReboilerUnity.OutletL   to ConnectorReboilerLout;
     790
    719791end
    720792
Note: See TracChangeset for help on using the changeset viewer.