Ignore:
Timestamp:
Aug 4, 2009, 3:59:48 PM (13 years ago)
Author:
gerson bicca
Message:

updated column model

File:
1 edited

Legend:

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

    r809 r810  
    956956end
    957957
    958 Model Distillation_kettle_cond  as ColumnBasic
     958Model Distillation_kettle_cond                          as ColumnBasic
    959959
    960960ATTRIBUTES
     
    12931293end
    12941294
    1295 #*
    1296 Model Distillation_thermosyphon_cond as Section_ColumnBasicX
     1295Model Distillation_thermosyphon_cond            as ColumnBasic
    12971296        ATTRIBUTES
    12981297        Pallete         = true;
     
    13231322";
    13241323
    1325 PARAMETERS
    1326         CondenserVapourFlow     as Switcher     (Valid = ["on", "off"], Default = "on",Hidden=true);
     1324SET
     1325
     1326        NumberOfFeeds = 1;
    13271327
    13281328VARIABLES
    1329 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1330 # Column Vapour and Liquid Draw Sides
    1331 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1332         out     VapourDrawOff   as vapour_stream        (Brief="Vapour Outlet in the section", PosX=1, PosY=0.379,Protected = true);
    1333         out     LiquidDrawOff   as liquid_stream        (Brief="Liquid Outlet in the section", PosX=1, PosY=0.425,Protected = true);
    1334 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1335 # Column Devices
    1336 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    13371329        CONDENSER                       as condenser            (Brief="dynamic condenser without subcooling");
    1338         SPLITTER_TOP            as splitter2                    (Brief="splitter which separate reflux and distillate");
     1330        SPLITTER_TOP            as splitter2            (Brief="splitter which separate reflux and distillate");
    13391331        PUMP                            as pump                         (Brief="pump in reflux stream");
    1340         ACCUMULATOR_BOTTOM      as tank                         (Brief="vessel in the bottom of column");
    1341         SPLITTER_BOTTOM         as splitter2                    (Brief="splitter who separate the bottom product and the stream to reboiler");
     1332        SUMP                            as SumpTank                     (Brief="vessel in the bottom of column");
     1333        SPLITTER_BOTTOM         as splitter2            (Brief="splitter who separate the bottom product and the stream to reboiler");
    13421334        REBOILER                        as reboilerSteady       (Brief="steady state reboiler (thermosyphon)");
    1343         alfaTopo                        as Real;
    1344 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1345 # Heat Ports
    1346 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1347 in      HeatToCondenser                 as power        (Brief="Heat supplied to Condenser",PosX=1, PosY=0.035, Protected=true);
    1348 in      HeatToReboiler                  as power        (Brief="Heat supplied to Reboiler", PosX=1, PosY=0.865,Protected=true);
    1349 in      HeatToBottomAccumulator as power        (Brief="Heat supplied to Bottom Accumulator",PosX=0, PosY=0.92,Protected=true);
    1350 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1351 # Column Top and Bottom product
    1352 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1353 out     VapourDistillate        as vapour_stream        (Brief="Vapour outlet stream From Top Condenser", PosX=0.665, PosY=0);
    1354 out     LiquidDistillate        as liquid_stream        (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.20);
    1355 out     BottomProduct           as liquid_stream        (Brief="Liquid outlet stream From Bottom Splitter", PosX=0.18, PosY=1);
    1356 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1357 # Column Model Connectors
    1358 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     1335
     1336        in      FeedTray        as stream       (Brief="Feed stream", PosX=0, PosY=0.55);
     1337
     1338in              Q_cond  as power        (Brief="Heat supplied to Condenser",PosX=1, PosY=0, Protected=true);
     1339in              Q_reb   as power        (Brief="Heat supplied to Reboiler", PosX=1, PosY=0.96,Protected=true);
     1340
     1341        out     TI_cond as control_signal       (Brief="Temperature Indicator of Condenser ", Protected = true, PosX=0.48, PosY=0);
     1342        out     LI_cond as control_signal       (Brief="Level Indicator of Condenser", Protected = true, PosX=1, PosY=0.084);
     1343        out     PI_cond as control_signal       (Brief="Pressure Indicator of Condenser", Protected = true, PosX=0.40, PosY=0);
     1344       
     1345        out     TI_reb  as control_signal       (Brief="Temperature Indicator of Reboiler ",Protected = true, PosX=1, PosY=0.92);
     1346        out     PI_reb  as control_signal       (Brief="Pressure Indicator of Reboiler", Protected = true, PosX=1, PosY=0.878);
     1347       
     1348        out     LI_sump as control_signal       (Brief="Level Indicator of Column Sump", Protected = true, PosX=1, PosY=0.76);
     1349        out     TI_sump as control_signal       (Brief="Temperature Indicator of Column Sump ",Protected = true, PosX=1, PosY=0.71);
     1350       
     1351out     VapourDistillate as vapour_stream       (Brief="Vapour outlet stream From Top Condenser", PosX=0.62, PosY=0);
     1352out     LiquidDistillate as liquid_stream       (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.185);
     1353out     BottomProduct    as liquid_stream       (Brief="Liquid outlet stream From Bottom Splitter", PosX=0.06, PosY=1);
     1354
    13591355in      ConnectorSplitterBottom as stream       (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true);
    13601356in      ConnectorSplitterTop    as stream       (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true);
    13611357in      ConnectorCondenserVout  as stream       (Brief="Connector for Vapour outlet stream From Top Condenser", Hidden=true);
    13621358
    1363         ConnectorHeatReboiler                   as power        (Brief="Connector for Heat supplied to Reboiler", Hidden=true);
    1364         ConnectorHeatCondenser                  as power        (Brief="Connector for Heat supplied to Condenser", Hidden=true);
    1365         ConnectorHeatBottomAccumulator  as power        (Brief="Connector for Heat supplied to Bottom Accumulator", Hidden=true);
     1359        ConnectorHeatReboiler   as power        (Brief="Connector for Heat supplied to Reboiler", Hidden=true);
     1360        ConnectorHeatCondenser  as power        (Brief="Connector for Heat supplied to Condenser", Hidden=true);
    13661361
    13671362EQUATIONS
     1363
     1364for i in 1:NumberOfTrays do
     1365
     1366if i equal FeedTrayLocation(1) then   
     1367
     1368"FeedTrayTop Inlet Flow"       
     1369        FeedTray.F= TRAYS(i).Inlet.F;
     1370
     1371"FeedTrayTop Inlet Temperature"
     1372        FeedTray.T = TRAYS(i).Inlet.T;
     1373
     1374"FeedTrayTop Inlet Pressure"
     1375        FeedTray.P = TRAYS(i).Inlet.P;
     1376
     1377"FeedTrayTop Inlet Composition"
     1378        FeedTray.z = TRAYS(i).Inlet.z;
     1379
     1380"FeedTrayTop Inlet Vapour Fraction"
     1381        FeedTray.v = TRAYS(i).Inlet.v;
     1382
     1383"FeedTrayTop Inlet Enthalpy"
     1384        FeedTray.h = TRAYS(i).Inlet.h;
     1385
     1386else
     1387
     1388"Inlet Tray - Flow Sealed"     
     1389        0*'mol/h'= TRAYS(i).Inlet.F;
     1390
     1391"Inlet Tray -  Temperature"
     1392        FeedTray.T = TRAYS(i).Inlet.T;
     1393
     1394"Inlet Tray -  Pressure"
     1395        FeedTray.P = TRAYS(i).Inlet.P;
     1396
     1397"Inlet Tray -  Composition"
     1398        FeedTray.z = TRAYS(i).Inlet.z;
     1399
     1400"Inlet Tray -  Vapour Fraction"
     1401        FeedTray.v = TRAYS(i).Inlet.v;
     1402
     1403"Inlet Tray -  Enthalpy"
     1404        FeedTray.h = TRAYS(i).Inlet.h;
     1405
     1406end
     1407
     1408end
     1409
     1410        TI_reb  = REBOILER.TI ;
     1411        PI_reb  = REBOILER.PI;
     1412       
     1413        TI_cond = CONDENSER.TI;
     1414        PI_cond = CONDENSER.PI;
     1415        LI_cond = CONDENSER.LI;
     1416       
     1417        TI_sump = SUMP.TI;
     1418        LI_sump = SUMP.LI;
     1419       
    13681420# Heat Connector Equations
    1369         HeatToCondenser                 =       ConnectorHeatCondenser;
    1370         HeatToReboiler                  =       ConnectorHeatReboiler;
    1371         HeatToBottomAccumulator =       ConnectorHeatBottomAccumulator;
     1421        Q_cond  =       ConnectorHeatCondenser;
     1422        Q_reb   =       ConnectorHeatReboiler;
    13721423
    13731424# Condenser Connector Equations
     
    13891440        ConnectorSplitterBottom.z = BottomProduct.z;
    13901441
    1391         VapourDrawOff.F*VapSideTrayIndex= TRAYS.VapourSideStream.F;
    1392         VapourDrawOff.T = TRAYS(VapourSideStreamLocation).VapourSideStream.T;
    1393         VapourDrawOff.P = TRAYS(VapourSideStreamLocation).VapourSideStream.P;
    1394         VapourDrawOff.z = TRAYS(VapourSideStreamLocation).VapourSideStream.z;
    1395 
    1396         LiquidDrawOff.F*LiqSideTrayIndex= TRAYS.LiquidSideStream.F;
    1397         LiquidDrawOff.T = TRAYS(LiquidSideStreamLocation).LiquidSideStream.T;
    1398         LiquidDrawOff.P = TRAYS(LiquidSideStreamLocation).LiquidSideStream.P;
    1399         LiquidDrawOff.z = TRAYS(LiquidSideStreamLocation).LiquidSideStream.z;
    1400 
    1401         VapourDrawOffFlow = VapourDrawOff.F;
    1402         LiquidDrawOffFlow = LiquidDrawOff.F;
    1403        
    1404 switch CondenserVapourFlow
    1405                 case "on":
    1406                 CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletVapour.P -
    1407                 CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
    1408                 when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
    1409                
    1410                 case "off":
    1411                 CONDENSER.InletVapour.F = 0 * 'mol/s';
    1412                 when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on";
    1413 end     
    1414 
    14151442CONNECTIONS
    14161443#vapor
    1417         REBOILER.OutletVapour   to TRAYS(NumberOfTrays).InletVapour;
    1418         TRAYS(1).OutletVapour                           to CONDENSER.InletVapour;
     1444        SUMP.OutletVapour               to TRAYS(NumberOfTrays).InletVapour;
     1445        REBOILER.OutletVapour   to SUMP.InletVapour;
     1446        TRAYS(1).OutletVapour   to CONDENSER.InletVapour;
    14191447
    14201448#liquid
     
    14221450        SPLITTER_TOP.Outlet2                            to PUMP.Inlet;
    14231451        PUMP.Outlet                                     to TRAYS(1).InletLiquid;
    1424         TRAYS(NumberOfTrays).OutletLiquid       to ACCUMULATOR_BOTTOM.Inlet;
    1425         ACCUMULATOR_BOTTOM.Outlet                               to SPLITTER_BOTTOM.Inlet;
     1452        TRAYS(NumberOfTrays).OutletLiquid       to SUMP.InletLiquid;
     1453        SUMP.OutletLiquid                               to SPLITTER_BOTTOM.Inlet;
    14261454        SPLITTER_BOTTOM.Outlet2                         to REBOILER.InletLiquid;
    14271455
     
    14291457ConnectorHeatCondenser                  to CONDENSER.InletQ;
    14301458ConnectorHeatReboiler                   to REBOILER.InletQ;
    1431 ConnectorHeatBottomAccumulator  to ACCUMULATOR_BOTTOM.InletQ;
    1432 CONDENSER.OutletVapour                          to ConnectorCondenserVout;
     1459CONDENSER.OutletVapour                  to ConnectorCondenserVout;
    14331460SPLITTER_TOP.Outlet1                    to ConnectorSplitterTop;
    14341461SPLITTER_BOTTOM.Outlet1                 to ConnectorSplitterBottom;
     
    14361463end
    14371464
     1465#*
    14381466Model Distillation_kettle_subcooling as Section_ColumnBasicX
    14391467
Note: See TracChangeset for help on using the changeset viewer.