Ignore:
Timestamp:
Aug 5, 2009, 10:36:50 AM (13 years ago)
Author:
gerson bicca
Message:

updates

File:
1 edited

Legend:

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

    r810 r811  
    14631463end
    14641464
    1465 #*
    1466 Model Distillation_kettle_subcooling as Section_ColumnBasicX
     1465Model Distillation_kettle_subcooling            as ColumnBasic
    14671466
    14681467ATTRIBUTES
     
    14941493* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.
    14951494";
    1496        
    1497 PARAMETERS
    1498         CondenserVapourFlow as Switcher(Valid = ["on", "off"], Default = "on",Hidden=true);
     1495
     1496SET
     1497
     1498        NumberOfFeeds = 1;
    14991499
    15001500VARIABLES
    1501 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1502 # Column Vapour and Liquid Draw Sides
    1503 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1504         out     VapourDrawOff   as vapour_stream        (Brief="Vapour Outlet in the section", PosX=1, PosY=0.41,Protected = true);
    1505         out     LiquidDrawOff   as liquid_stream        (Brief="Liquid Outlet in the section", PosX=1, PosY=0.45,Protected = true);
    1506 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1507 # Column Devices
    1508 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     
    15091501        CONDENSER               as condenserSteady      (Brief="steady state condenser with subcooling");
    1510         ACCUMULATOR             as tank_cylindrical     (Brief="vessel drum (layed cilinder)");
    1511         SPLITTER                as splitter2                    (Brief="splitter which separate reflux and distillate");
     1502        REFLUX_DRUM             as TankL                        (Brief="reflux drum");
     1503        SPLITTER                as splitter2            (Brief="splitter to separate reflux and distillate");
    15121504        PUMP                    as pump                         (Brief="pump in reflux stream");
    15131505        REBOILER                as reboiler                     (Brief="kettle reboiler");
    1514         alfaTopo                as Real;
    1515 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1516 # Heat Ports
    1517 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1518 in              HeatToCondenser         as power        (Brief="Heat supplied to Condenser", PosX=1, PosY=0.065, Protected=true);
    1519 in              HeatToReboiler          as power        (Brief="Heat supplied to Reboiler", PosX=1, PosY=0.905, Protected=true);
    1520 in              HeatToAccumulator       as power        (Brief="Heat supplied to Top Vessel", PosX=1, PosY=0.195, Protected=true);
    1521 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1522 # Column Model Connectors
    1523 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     1506
     1507        in      Q_cond  as power        (Brief="Heat supplied to Condenser", PosX=1, PosY=0.065, Protected=true);
     1508        in      Q_reb   as power        (Brief="Heat supplied to Reboiler", PosX=1, PosY=0.905, Protected=true);
     1509        in      Q_drum  as power        (Brief="Heat supplied to Top Vessel", PosX=1, PosY=0.30, Protected=true);
     1510
     1511        in      FeedTray        as stream               (Brief="Feed stream", PosX=0, PosY=0.55);
     1512
     1513        out     TI_reb  as control_signal       (Brief="Temperature Indicator of Reboiler ",Protected = true, PosX=0.515, PosY=1);
     1514        out     LI_reb  as control_signal       (Brief="Level Indicator of Reboiler", Protected = true, PosX=1, PosY=0.935);
     1515        out     PI_reb  as control_signal       (Brief="Pressure Indicator of Reboiler", Protected = true, PosX=0.41, PosY=1);
     1516       
     1517        out     TI_cond as control_signal       (Brief="Temperature Indicator of Condenser ", Protected = true, PosX=0.52, PosY=0);
     1518        out     PI_cond as control_signal       (Brief="Pressure Indicator of Condenser", Protected = true, PosX=0.42, PosY=0);
     1519       
     1520        out     TI_drum as control_signal       (Brief="Temperature Indicator of Reflux Drum ", Protected = true, PosX=1, PosY=0.20);
     1521        out     PI_drum as control_signal       (Brief="Pressure Indicator of Reflux Drum", Protected = true, PosX=1, PosY=0.155);
     1522        out     LI_drum as control_signal       (Brief="Level Indicator of Reflux Drum", Protected = true, PosX=1, PosY=0.24);
     1523       
     1524       
    15241525in      ConnectorSplitterOut            as stream       (Brief="Connector for Liquid outlet stream From Top Splitter", Hidden=true);
    15251526in      ConnectorReboilerLout           as stream       (Brief="Connector for Liquid outlet stream From Reboiler", Hidden=true);
     
    15271528        ConnectorHeatCondenser          as power        (Brief="Connector for Heat supplied to Condenser", Hidden=true);
    15281529        ConnectorHeatAccumulator        as power        (Brief="Connector for Heat supplied to TopVessel", Hidden=true);
    1529 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1530 # Column Top and Bottom product
    1531 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1532 out     LiquidDistillate as liquid_stream       (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.24);
     1530
     1531out     LiquidDistillate as liquid_stream       (Brief="Liquid outlet stream From Top Splitter", PosX=1, PosY=0.33);
    15331532out     BottomProduct    as liquid_stream       (Brief="Liquid outlet stream From Reboiler", PosX=0.67, PosY=1);
    15341533
    15351534EQUATIONS
    15361535
     1536        TI_reb  = REBOILER.TI ;
     1537        PI_reb  = REBOILER.PI;
     1538        LI_reb  = REBOILER.LI;
     1539       
     1540        TI_cond = CONDENSER.TI;
     1541        PI_cond = CONDENSER.PI;
     1542       
     1543        TI_drum = REFLUX_DRUM.TI;
     1544        PI_drum = REFLUX_DRUM.PI;
     1545        LI_drum = REFLUX_DRUM.LI;
     1546       
     1547for i in 1:NumberOfTrays do
     1548
     1549if i equal FeedTrayLocation(1) then   
     1550
     1551"FeedTrayTop Inlet Flow"       
     1552        FeedTray.F= TRAYS(i).Inlet.F;
     1553
     1554"FeedTrayTop Inlet Temperature"
     1555        FeedTray.T = TRAYS(i).Inlet.T;
     1556
     1557"FeedTrayTop Inlet Pressure"
     1558        FeedTray.P = TRAYS(i).Inlet.P;
     1559
     1560"FeedTrayTop Inlet Composition"
     1561        FeedTray.z = TRAYS(i).Inlet.z;
     1562
     1563"FeedTrayTop Inlet Vapour Fraction"
     1564        FeedTray.v = TRAYS(i).Inlet.v;
     1565
     1566"FeedTrayTop Inlet Enthalpy"
     1567        FeedTray.h = TRAYS(i).Inlet.h;
     1568
     1569else
     1570
     1571"Inlet Tray - Flow Sealed"     
     1572        0*'mol/h'= TRAYS(i).Inlet.F;
     1573
     1574"Inlet Tray -  Temperature"
     1575        FeedTray.T = TRAYS(i).Inlet.T;
     1576
     1577"Inlet Tray -  Pressure"
     1578        FeedTray.P = TRAYS(i).Inlet.P;
     1579
     1580"Inlet Tray -  Composition"
     1581        FeedTray.z = TRAYS(i).Inlet.z;
     1582
     1583"Inlet Tray -  Vapour Fraction"
     1584        FeedTray.v = TRAYS(i).Inlet.v;
     1585
     1586"Inlet Tray -  Enthalpy"
     1587        FeedTray.h = TRAYS(i).Inlet.h;
     1588
     1589end
     1590
     1591end
     1592
    15371593#Heat Connectors
    1538 HeatToCondenser         = ConnectorHeatCondenser;
    1539 HeatToReboiler          = ConnectorHeatReboiler;
    1540 HeatToAccumulator       = ConnectorHeatAccumulator;
     1594        Q_cond  = ConnectorHeatCondenser;
     1595        Q_reb   = ConnectorHeatReboiler;
     1596        Q_drum  = ConnectorHeatAccumulator;
    15411597
    15421598# Splitter Connector Equations
     
    15511607        ConnectorReboilerLout.F = BottomProduct.F;
    15521608        ConnectorReboilerLout.z = BottomProduct.z;
    1553        
    1554         VapourDrawOff.F*VapSideTrayIndex= TRAYS.VapourSideStream.F;
    1555         VapourDrawOff.T = TRAYS(VapourSideStreamLocation).VapourSideStream.T;
    1556         VapourDrawOff.P = TRAYS(VapourSideStreamLocation).VapourSideStream.P;
    1557         VapourDrawOff.z = TRAYS(VapourSideStreamLocation).VapourSideStream.z;
    1558 
    1559         LiquidDrawOff.F*LiqSideTrayIndex= TRAYS.LiquidSideStream.F;
    1560         LiquidDrawOff.T = TRAYS(LiquidSideStreamLocation).LiquidSideStream.T;
    1561         LiquidDrawOff.P = TRAYS(LiquidSideStreamLocation).LiquidSideStream.P;
    1562         LiquidDrawOff.z = TRAYS(LiquidSideStreamLocation).LiquidSideStream.z;
    1563 
    1564         VapourDrawOffFlow = VapourDrawOff.F;
    1565         LiquidDrawOffFlow = LiquidDrawOff.F;
    1566        
    1567         switch CondenserVapourFlow
    1568                 case "on":
    1569                 CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletVapour.P -
    1570                 CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
    1571                 when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
    1572                
    1573                 case "off":
    1574                 CONDENSER.InletVapour.F = 0 * 'mol/s';
    1575                 when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on";
    1576 end     
    15771609
    15781610CONNECTIONS
     
    15821614
    15831615#liquid
    1584         CONDENSER.OutletLiquid                          to ACCUMULATOR.Inlet;   
    1585         ACCUMULATOR.Outlet                                      to SPLITTER.Inlet;
    1586         SPLITTER.Outlet2                        to PUMP.Inlet; 
    1587         PUMP.Outlet                                     to TRAYS(1).InletLiquid;
     1616        CONDENSER.OutletLiquid                          to REFLUX_DRUM.Inlet;   
     1617        REFLUX_DRUM.OutletLiquid                        to SPLITTER.Inlet;
     1618        SPLITTER.Outlet2                                        to PUMP.Inlet; 
     1619        PUMP.Outlet                                             to TRAYS(1).InletLiquid;
    15881620        TRAYS(NumberOfTrays).OutletLiquid       to REBOILER.InletLiquid;
    15891621
    15901622#Connectors
    1591 ConnectorHeatCondenser          to CONDENSER.InletQ;
    1592 ConnectorHeatReboiler           to REBOILER.InletQ;
    1593 ConnectorHeatAccumulator        to ACCUMULATOR.InletQ;
    1594 
    1595 SPLITTER.Outlet1 to ConnectorSplitterOut;
    1596 REBOILER.OutletLiquid   to ConnectorReboilerLout;
    1597 
    1598 end
    1599 
     1623        ConnectorHeatCondenser          to CONDENSER.InletQ;
     1624        ConnectorHeatReboiler           to REBOILER.InletQ;
     1625        ConnectorHeatAccumulator        to REFLUX_DRUM.InletQ;
     1626
     1627        SPLITTER.Outlet1                to ConnectorSplitterOut;
     1628        REBOILER.OutletLiquid   to ConnectorReboilerLout;
     1629
     1630end
     1631
     1632#*
    16001633Model Rectifier as Section_ColumnBasicX
    16011634
Note: See TracChangeset for help on using the changeset viewer.