Ignore:
Timestamp:
Sep 29, 2008, 7:09:17 PM (14 years ago)
Author:
gerson bicca
Message:

added new type of column distillation

File:
1 edited

Legend:

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

    r643 r644  
    4343*
    4444*---------------------------------------------------------------------*#
    45 Model Section_ColumnTeste
     45Model Section_ColumnTesteBasic
    4646
    4747ATTRIBUTES
    48         Pallete         = true;
     48        Pallete         = false;
    4949        Icon            = "icon/SectionColumn";
    5050        Brief   = "Model of a column section.";
     
    132132        in      FeedTray                                as stream                               (Brief="Feed stream", PosX=0, PosY=0.55);
    133133       
    134         in              LiquidInlet             as      stream                          (Brief="Liquid Inlet in the section", PosX=0.80, PosY=0);
    135         out     VapourOutlet            as vapour_stream        (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0);
    136        
    137134        trays(NumberOfTrays) as trayTeste                       (Brief="Number of trays");
    138135
    139         in              VapourInlet             as stream                               (Brief="Vapour Inlet in the section", PosX=0.30, PosY=1);
    140         out     LiquidOutlet            as liquid_stream                (Brief="Liquid Outlet in the section", PosX=0.80, PosY=1);
    141        
    142         LiquidConnector as stream       (Brief="Liquid connection at the middle trays", PosX=0.75, PosY=1,Hidden=true);
    143         VapourConnector as stream       (Brief="Vapour connection at the middle trays", PosX=0.55, PosY=0,Hidden=true);
    144 
    145         MurphreeEff                                             as Real         (Brief = "Murphree efficiency");
     136        MurphreeEff                             as Real         (Brief = "Murphree efficiency");
    146137
    147138CONNECTIONS
     
    150141        trays([1:NumberOfTrays-1]).OutletL      to trays([2:NumberOfTrays]).InletL;
    151142       
    152         LiquidConnector to trays(1).InletL;
    153         VapourConnector to trays(NumberOfTrays).InletV;
    154143       
    155144EQUATIONS
    156 
    157         LiquidConnector.F= LiquidInlet.F;
    158         LiquidConnector.T = LiquidInlet.T;
    159         LiquidConnector.P = LiquidInlet.P;
    160         LiquidConnector.z = LiquidInlet.z;
    161         LiquidConnector.v = LiquidInlet.v;
    162         LiquidConnector.h = LiquidInlet.h;
    163        
    164         VapourConnector.F= VapourInlet.F;
    165         VapourConnector.T = VapourInlet.T;
    166         VapourConnector.P = VapourInlet.P;
    167         VapourConnector.z = VapourInlet.z;
    168         VapourConnector.v = VapourInlet.v;
    169         VapourConnector.h = VapourInlet.h;
    170        
    171         LiquidOutlet.F= trays(NumberOfTrays).OutletL.F;
    172         LiquidOutlet.T = trays(NumberOfTrays).OutletL.T;
    173         LiquidOutlet.P = trays(NumberOfTrays).OutletL.P;
    174         LiquidOutlet.z = trays(NumberOfTrays).OutletL.z;
    175        
    176         VapourOutlet.F= trays(1).OutletV.F;
    177         VapourOutlet.T = trays(1).OutletV.T;
    178         VapourOutlet.P = trays(1).OutletV.P;
    179         VapourOutlet.z = trays(1).OutletV.z;
    180 
    181145# Connecting Trays
    182146        FeedTray.F*SpecialTrayIndex= trays.Inlet.F;
     
    288252end
    289253
     254Model Section_ColumnTeste as Section_ColumnTesteBasic
     255
     256ATTRIBUTES
     257        Pallete         = true;
     258        Icon            = "icon/SectionColumn";
     259        Brief   = "Model of a column section.";
     260        Info            =
     261"== Model of a column section containing ==
     262* NumberOfTrays trays.
     263       
     264== Specify ==
     265* the feed stream of each tray (Inlet);
     266* the Murphree eficiency for each tray Emv;
     267* the InletL stream of the top tray;
     268* the InletV stream of the bottom tray.
     269       
     270== Initial Conditions ==
     271* the trays temperature (OutletL.T);
     272* the trays liquid level (Level) OR the trays liquid flow (OutletL.F);
     273* (NoComps - 1) OutletL (OR OutletV) compositions for each tray.
     274";
     275
     276VARIABLES
     277
     278        in              LiquidInlet             as      stream                          (Brief="Liquid Inlet in the section", PosX=0.80, PosY=0);
     279        out     VapourOutlet            as vapour_stream        (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0);
     280       
     281        in              VapourInlet             as stream                               (Brief="Vapour Inlet in the section", PosX=0.30, PosY=1);
     282        out     LiquidOutlet            as liquid_stream                (Brief="Liquid Outlet in the section", PosX=0.80, PosY=1);
     283       
     284        LiquidConnector as stream       (Brief="Liquid connection at the middle trays", PosX=0.75, PosY=1,Hidden=true);
     285        VapourConnector as stream       (Brief="Vapour connection at the middle trays", PosX=0.55, PosY=0,Hidden=true);
     286
     287CONNECTIONS
     288
     289        LiquidConnector to trays(1).InletL;
     290        VapourConnector to trays(NumberOfTrays).InletV;
     291       
     292EQUATIONS
     293
     294        LiquidConnector.F= LiquidInlet.F;
     295        LiquidConnector.T = LiquidInlet.T;
     296        LiquidConnector.P = LiquidInlet.P;
     297        LiquidConnector.z = LiquidInlet.z;
     298        LiquidConnector.v = LiquidInlet.v;
     299        LiquidConnector.h = LiquidInlet.h;
     300       
     301        VapourConnector.F= VapourInlet.F;
     302        VapourConnector.T = VapourInlet.T;
     303        VapourConnector.P = VapourInlet.P;
     304        VapourConnector.z = VapourInlet.z;
     305        VapourConnector.v = VapourInlet.v;
     306        VapourConnector.h = VapourInlet.h;
     307       
     308        LiquidOutlet.F= trays(NumberOfTrays).OutletL.F;
     309        LiquidOutlet.T = trays(NumberOfTrays).OutletL.T;
     310        LiquidOutlet.P = trays(NumberOfTrays).OutletL.P;
     311        LiquidOutlet.z = trays(NumberOfTrays).OutletL.z;
     312       
     313        VapourOutlet.F= trays(1).OutletV.F;
     314        VapourOutlet.T = trays(1).OutletV.T;
     315        VapourOutlet.P = trays(1).OutletV.P;
     316        VapourOutlet.z = trays(1).OutletV.z;
     317
     318end
     319
    290320#*----------------------------------------------------------------------
    291321* Model of a  distillation column containing:
     
    295325*       - a splitter which separate reflux and distillate;
    296326*       - a pump in reflux stream;
    297 *---------------------------------------------------------------------
    298 Model Distillation_kettle_condTeste
     327*--------------------------------------------------------------------- *#
     328Model Distillation_kettle_condTeste as Section_ColumnTesteBasic
    299329        ATTRIBUTES
    300330        Pallete         = true;
     
    326356       
    327357PARAMETERS
    328         outer PP                        as Plugin               (Brief = "External Physical Properties", Type="PP");
    329         outer NComp     as Integer;
    330         NumberOfTrays                           as Integer              (Brief="Number of trays", Default=2);
    331         topdown                         as Integer              (Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1);
    332         top                                     as Integer              (Brief="Number of top tray");
    333         bot                                     as Integer              (Brief="Number of bottom tray");
    334         VapourFlow              as Switcher     (Valid = ["on", "off"], Default = "on");
    335        
    336 SET
    337         top = (NumberOfTrays-1)*(1-topdown)/2+1;
    338         bot = NumberOfTrays/top;
     358        CondenserVapourFlow             as Switcher     (Valid = ["on", "off"], Default = "on",Hidden=true);
    339359       
    340360VARIABLES
    341         trays(NumberOfTrays)    as trayTeste;
    342         cond                            as condenser;
    343         reb                                     as reboiler;
    344         sptop                           as splitter;
    345         pump1                           as pump;
    346         alfaTopo                        as Real;
    347        
     361        CondenserUnity  as condenserTeste;
     362        ReboilerUnity           as reboilerTeste;
     363        SplitterTop                     as splitter;
     364        PumpUnity                       as pump;
     365        alfaTopo                                as Real;
     366
     367out             HeatToReboiler          as power                                (Brief="Heat supplied to Reboiler",Hidden=true);
     368out             HeatToCondenser         as power                                (Brief="Heat supplied to Condenser",Hidden=true);
     369
     370RebNoFlow       as sourceNoFlow (Brief="No Inlet Flow to Reboiler",Hidden=true);
     371
    348372EQUATIONS
    349373
    350         switch VapourFlow
    351                 case "on":
    352                 cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
    353                 cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    354                 when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    355                
    356                 case "off":
    357                 cond.InletV.F = 0 * 'mol/s';
    358                 when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
    359         end     
     374switch CondenserVapourFlow
     375
     376        case "on":
     377                CondenserUnity.InletV.F*trays(1).vV = alfaTopo *Ah * sqrt(2*(trays(1).OutletV.P -
     378                CondenserUnity.OutletL.P + 1e-8 * 'atm') / (alfa*trays(1).rhoV));
     379                when CondenserUnity.InletV.F < 1e-6 * 'kmol/h' switchto "off";
     380
     381        case "off":
     382                CondenserUnity.InletV.F = 0 * 'mol/s';
     383                when trays(1).OutletV.P > CondenserUnity.OutletL.P + 1e-1 * 'atm' switchto "on";
     384
     385end     
    360386
    361387CONNECTIONS
    362388#vapor
    363         reb.OutletV to trays(bot).InletV;
    364         trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV;
    365         trays(top).OutletV to cond.InletV;
     389        ReboilerUnity.OutletV   to      trays(NumberOfTrays).InletV;
     390        trays(1).OutletV                                to      CondenserUnity.InletV;
    366391
    367392#liquid
    368         cond.OutletL to sptop.Inlet;   
    369         sptop.Outlet2 to pump1.Inlet;
    370         pump1.Outlet to trays(top).InletL;
    371         trays([top:topdown:bot-topdown]).OutletL to trays([top+topdown:topdown:bot]).InletL;
    372         trays(bot).OutletL to reb.InletL;
     393        CondenserUnity.OutletL          to      SplitterTop.Inlet;     
     394        SplitterTop.Outlet2                             to      PumpUnity.Inlet;
     395        PumpUnity.Outlet                                        to      trays(1).InletL;
     396        trays(NumberOfTrays).OutletL    to      ReboilerUnity.InletL;
     397
     398#Connectors
     399HeatToReboiler  to ReboilerUnity.InletQ;
     400HeatToCondenser         to CondenserUnity.InletQ;
     401RebNoFlow.Outlet  to ReboilerUnity.Inlet;
    373402
    374403end
Note: See TracChangeset for help on using the changeset viewer.