Ignore:
Timestamp:
Aug 7, 2009, 3:20:51 PM (13 years ago)
Author:
gerson bicca
Message:

updates

File:
1 edited

Legend:

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

    r818 r819  
    9292
    9393ATTRIBUTES
    94         Pallete         = false;
     94        Pallete = false;
    9595        Brief   = "Model of a basic column section.";
    96         Info            =
     96        Info    =
    9797"Model of a basic column section containing a vetor of TRAYS numbered from the top-down.";
    9898
     
    100100        outer PP                as Plugin               (Brief="External Physical Properties", Type="PP");
    101101        outer NComp     as Integer              (Brief="Number of components");
    102 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    103 # Section Column Feed Tray - Side Streams  Location and Numbering
    104 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     102
    105103        NumberOfFeeds                                           as Integer                      (Brief="Number of Feed Trays",Default=3,Protected=true);
    106104        FeedTrayLocation(NumberOfFeeds)         as Integer                      (Brief="Feed tray Location",Default=2);
     
    114112        g                                                                       as acceleration         (Brief="Gravity Acceleration",Default=9.81,Hidden=true);
    115113        Mw(NComp)                                                       as molweight            (Brief="Component Mol Weight",Hidden=true);
    116 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    117 # Section Column Flow Model for Liquid and Vapour
    118 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     114
    119115        VapourFlowModel         as Switcher     (Valid = ["Reepmeyer", "Feehery_Fv", "Roffel_Fv", "Klingberg", "Wang_Fv", "Elgue"], Default = "Reepmeyer");
    120116        LiquidFlowModel         as Switcher     (Valid = ["default", "Wang_Fl", "Olsen", "Feehery_Fl", "Roffel_Fl"], Default = "default");
    121 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    122 # Section Column Tray Geometry and Auxiliar Parameters
    123 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     117
    124118        TrayDiameter                    as length               (Brief="Tray Diameter",Default=1.600);
    125119        TraySpacing                             as length               (Brief="Tray Spacing",Default=0.600);
     
    130124        TrayLiquidPasses                as Real                 (Brief="Number of liquid passes in the tray", Default=1);
    131125        HeatSupply                              as heat_rate    (Brief="Rate of heat supply");
    132         beta                                    as fraction     (Brief="Aeration fraction");
    133         alfa                                    as fraction     (Brief="Dry pressure drop coefficient");
    134        
    135         PlateArea               as area                 (Brief="Plate area = Atray - Adowncomer",Protected=true);
    136         TrayVolume              as volume               (Brief="Total Volume of the tray",Protected=true);
    137         HolesArea               as area                 (Brief="Total holes area",Protected=true);
    138 
    139         FeeheryCoeff    as Real                 (Brief="Feeherys correlation coefficient", Unit='1/m^4', Default=1,Hidden=true);
    140         ElgueCoeff              as Real                 (Brief="Elgues correlation coefficient", Unit='kg/m/mol^2', Default=1,Hidden=true);
    141         OlsenCoeff              as Real                 (Brief="Olsens correlation coefficient", Default=1,Hidden=true);
    142        
    143 
     126        AerationFraction                as Real                 (Brief="Aeration fraction", Default = 1);
     127        DryPdropCoeff                   as Real                 (Brief="Dry pressure drop coefficient", Default= 0.60);
     128       
     129        PlateArea               as area         (Brief="Plate area = Atray - Adowncomer",Protected=true);
     130        TrayVolume              as volume       (Brief="Total Volume of the tray",Protected=true);
     131        HolesArea               as area         (Brief="Total holes area",Protected=true);
     132
     133        FeeheryCoeff    as Real         (Brief="Feeherys correlation coefficient", Unit='1/m^4', Default=1,Hidden=true);
     134        ElgueCoeff              as Real         (Brief="Elgues correlation coefficient", Unit='kg/m/mol^2', Default=1,Hidden=true);
     135        OlsenCoeff              as Real         (Brief="Olsens correlation coefficient", Default=1,Hidden=true);
     136       
    144137        VapourFlow      as Switcher     (Valid = ["on", "off"], Default = "on",Hidden=true);
    145138        LiquidFlow      as Switcher     (Valid = ["on", "off"], Default = "on",Hidden=true);
     
    150143        Mw = PP.MolecularWeight();
    151144
    152 
    153145        PlateArea = 0.25*Pi*(TrayDiameter^2)*(1-Fraction_DowncomerArea);
    154146        TrayVolume = 0.25*Pi*(TrayDiameter^2)*TraySpacing;
     
    156148
    157149VARIABLES
    158 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    159 # Tray Initialization For the Whole Column Section
    160 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    161         INITIALIZATION as InitializeSection (Brief = "Column Model Initialization");
    162 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    163 # Control Ports
    164 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    165         CONTROL as ControlSection (Brief = "Control");
     150
     151        INITIALIZATION as InitializeSection (Brief="Column Model Initialization");
     152        CONTROL                 as ControlSection (Brief="Column Model Control");
     153       
    166154        out     TCI as control_signal   (Brief="Temperature  Indicator", Protected = true, PosX=1, PosY=0.73);
    167155        out     PCI as control_signal   (Brief="Pressure Indicator", Protected = true, PosX=0, PosY=0.24);
    168 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    169 # Column Feed - Side Stream Flow and Murphree Efficiency
    170 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++             
    171     in      LiquidInlet             as      stream                  (Brief="Liquid Inlet in the section", PosX=0.70, PosY=0);
    172     out     VapourOutlet    as vapour_stream        (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0);
    173 
    174     out     VapourDrawOff   as vapour_stream        (Brief="Vapour Draw Off Port in the section", PosX=1, PosY=0.35,Protected = true);
    175         out     LiquidDrawOff   as liquid_stream        (Brief="Liquid Draw Off Port in the section", PosX=1, PosY=0.65,Protected = true);
    176        
    177         TRAYS(NumberOfTrays)    as tray                 (Brief="Number of trays in the Column Section");
     156       
     157    in  LiquidInlet     as stream         (Brief="Liquid Inlet in the section", PosX=0.70, PosY=0);
     158    out VapourOutlet    as vapour_stream  (Brief="Vapour Outlet in the section", PosX=0.30, PosY=0);
     159
     160    out VapourDrawOff   as vapour_stream  (Brief="Vapour Draw Off Port in the section", PosX=1, PosY=0.35,Protected = true);
     161        out LiquidDrawOff   as liquid_stream  (Brief="Liquid Draw Off Port in the section", PosX=1, PosY=0.65,Protected = true);
     162       
     163        TRAYS(NumberOfTrays)    as tray                 (Brief="Number of trays in the Column Section",Protected=true);
    178164        VapourDrawOffFlow               as flow_mol     (Brief="Vapour Draw Off Stream Molar Flow Rate");
    179165        LiquidDrawOffFlow               as flow_mol     (Brief="Vapour Draw Off Stream Molar Flow Rate");
    180166        MurphreeEff                     as Real                 (Brief="Murphree efficiency for All Trays",Lower=0.01,Upper=1);
    181167
    182 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    183 # Section Inlet Vapour and Outlet Liquid Material Ports
    184 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    185168        in      VapourInlet     as stream             (Brief="Vapour Inlet in the section", PosX=0.30, PosY=1);
    186169        out     LiquidOutlet    as liquid_stream      (Brief="Liquid Outlet in the section", PosX=0.70, PosY=1);
    187170       
    188                 LiquidConnector as stream       (Brief="Liquid connection in the middle TRAYS", PosX=0.75, PosY=1,Hidden=true);
    189             VapourConnector as stream       (Brief="Vapour connection in the middle TRAYS", PosX=0.55, PosY=0,Hidden=true);
     171        LiquidConnector as stream    (Brief="Liquid connection in the middle TRAYS", PosX=0.75, PosY=1,Hidden=true);
     172        VapourConnector as stream    (Brief="Vapour connection in the middle TRAYS", PosX=0.55, PosY=0,Hidden=true);
     173       
    190174CONNECTIONS
    191 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    192 # Connecting Intermediate Trays
    193 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    194175        TRAYS([2:NumberOfTrays]).OutletVapour   to TRAYS([1:NumberOfTrays-1]).InletVapour;
    195         TRAYS([1:NumberOfTrays-1]).OutletLiquid         to TRAYS([2:NumberOfTrays]).InletLiquid;
    196        
    197 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    198 # Connecting Connectors
    199 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     176        TRAYS([1:NumberOfTrays-1]).OutletLiquid to TRAYS([2:NumberOfTrays]).InletLiquid;
     177       
    200178    LiquidConnector to TRAYS(1).InletLiquid;
    201179    VapourConnector to TRAYS(NumberOfTrays).InletVapour;
    202180       
    203181INITIAL
    204 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    205 # Tray Initialization
    206 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     182
    207183for i in 1:NumberOfTrays do
    208184
     
    225201
    226202EQUATIONS
    227 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    228 # Control Ports
    229 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    230203
    231204"Tray Temperature Indicator"   
     
    236209        #PCI*'atm' = TRAYS(min([NumberOfTrays, CONTROL.Pindicator_TrayNumber])).OutletVapour.P;
    237210        PCI*'atm' = TRAYS(CONTROL.Pindicator_TrayNumber).OutletVapour.P;
    238 
    239 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    240 # Trays Equations
    241 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    242211
    243212for i in [1:NumberOfTrays] do
     
    264233                                case "default":
    265234                                "Francis Equation"
    266                                 TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'1/s'*WeirLength*((TRAYS(i).Level-(beta*WeirHeight))/(beta))^2;
     235                                TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'1/s'*WeirLength*((TRAYS(i).Level-(AerationFraction*WeirHeight))/(AerationFraction))^2;
    267236                       
    268237                                case "Wang_Fl":
    269                                 TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'m^0.5/s'*WeirLength*((TRAYS(i).Level-(beta*WeirHeight))/(beta))^1.5;
     238                                TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'m^0.5/s'*WeirLength*((TRAYS(i).Level-(AerationFraction*WeirHeight))/(AerationFraction))^1.5;
    270239                       
    271240                                case "Olsen":
     
    279248                                                        (2*(1 - 0.3593/'Pa^0.0888545'*abs(TRAYS(i).OutletVapour.F*sum(Mw*TRAYS(i).OutletVapour.z)/(PlateArea*1.3)/sqrt(TRAYS(i).rhoV))^0.177709)-1)); #/'(kg/m)^0.0888545/s^0.177709';
    280249                        end
    281                 when TRAYS(i).Level < (beta *WeirHeight) switchto "off";
     250                when TRAYS(i).Level < (AerationFraction *WeirHeight) switchto "off";
    282251               
    283252                case "off":
    284253                "Low level"
    285254                TRAYS(i).OutletLiquid.F = 0 * 'mol/h';
    286                 when TRAYS(i).Level > (beta * WeirHeight) + 1e-6*'m' switchto "on";
     255                when TRAYS(i).Level > (AerationFraction * WeirHeight) + 1e-6*'m' switchto "on";
    287256        end
    288257       
     
    291260                        switch VapourFlowModel
    292261                                case "Reepmeyer":
    293                                 TRAYS(i).InletVapour.F*TRAYS(i).vV = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)/(TRAYS(i).rhoV*alfa))*HolesArea;
     262                                TRAYS(i).InletVapour.F*TRAYS(i).vV = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)/(TRAYS(i).rhoV*DryPdropCoeff))*HolesArea;
    294263                       
    295264                                case "Feehery_Fv":
     
    297266                       
    298267                                case "Roffel_Fv":
    299                                 TRAYS(i).InletVapour.F^1.08 * 0.0013 * 'kg/m/mol^1.08/s^0.92*1e5' = (TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)*1e5 - (beta*sum(TRAYS(i).M*Mw)/(PlateArea*1.3)*g*1e5) * (TRAYS(i).rhoV*HolesArea/sum(Mw*TRAYS(i).OutletVapour.z))^1.08 * 'm^1.08/mol^1.08';
     268                                TRAYS(i).InletVapour.F^1.08 * 0.0013 * 'kg/m/mol^1.08/s^0.92*1e5' = (TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)*1e5 - (AerationFraction*sum(TRAYS(i).M*Mw)/(PlateArea*1.3)*g*1e5) * (TRAYS(i).rhoV*HolesArea/sum(Mw*TRAYS(i).OutletVapour.z))^1.08 * 'm^1.08/mol^1.08';
    300269                       
    301270                                case "Klingberg":
     
    303272                       
    304273                                case "Wang_Fv":
    305                                 TRAYS(i).InletVapour.F * TRAYS(i).vV = PlateArea * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-TRAYS(i).rhoL*g*TRAYS(i).Level)/TRAYS(i).rhoV*alfa);
     274                                TRAYS(i).InletVapour.F * TRAYS(i).vV = PlateArea * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-TRAYS(i).rhoL*g*TRAYS(i).Level)/TRAYS(i).rhoV*DryPdropCoeff);
    306275                               
    307276                                case "Elgue":
     
    317286end
    318287
    319 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    320 # Equating Inlet Liquid Connector Variables
    321 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    322288"Liquid Inlet Flow"     
    323289        LiquidConnector.F = LiquidInlet.F;
     
    337303"Liquid Inlet Enthalpy"         
    338304        LiquidConnector.h = LiquidInlet.h;
    339 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    340 # Equating Inlet Vapour Connector Variables
    341 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     305
    342306"Vapour Inlet Flow"             
    343307        VapourConnector.F = VapourInlet.F;
     
    357321"Vapour Inlet Enthalpy"         
    358322        VapourConnector.h = VapourInlet.h;
    359 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    360 # Equating Outlet Liquid Variables
    361 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     323
    362324"Liquid Outlet Flow"   
    363325        LiquidOutlet.F = TRAYS(NumberOfTrays).OutletLiquid.F;
     
    371333"Liquid Outlet Composition"     
    372334        LiquidOutlet.z = TRAYS(NumberOfTrays).OutletLiquid.z;
    373 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    374 # Equating Outlet Vapour Variables
    375 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     335
    376336"Vapour Outlet Flow"           
    377337        VapourOutlet.F = TRAYS(1).OutletVapour.F;
     
    385345"Vapour Outlet Composition"             
    386346        VapourOutlet.z = TRAYS(1).OutletVapour.z;
    387 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    388 # Equating Outlet Vapour Side Stream Variables
    389 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     347
    390348"Vapour Draw Off Stream - Flow"         
    391349        VapourDrawOff.F*VapSideTrayIndex= TRAYS.VapourSideStream.F;
     
    402360"Vapour Draw Off Stream"       
    403361        VapourDrawOffFlow = VapourDrawOff.F;
    404 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    405 # Equating Outlet Liquid Side Stream Variables
    406 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     362
    407363"Liquid Draw Off Stream - Flow"         
    408364        LiquidDrawOff.F*LiqSideTrayIndex= TRAYS.LiquidSideStream.F;
     
    777733        lw                              as length               (Brief="Weir length",Hidden=true);
    778734        hw                              as length               (Brief="Weir height",Hidden=true);
    779         beta                    as fraction     (Brief="Aeration fraction");
     735        AerationFraction                        as fraction     (Brief="Aeration fraction");
    780736        alfa                    as fraction     (Brief="Dry pressure drop coefficient");
    781737        w                               as Real                 (Brief="Feeherys correlation coefficient", Unit='1/m^4', Default=1,Hidden=true);
     
    892848                                case "default":
    893849                                "Francis Equation"
    894                                 TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'1/s'*lw*((TRAYS(i).Level-(beta*hw))/(beta))^2;
     850                                TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'1/s'*lw*((TRAYS(i).Level-(AerationFraction*hw))/(AerationFraction))^2;
    895851                       
    896852                                case "Wang_Fl":
    897                                 TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'m^0.5/s'*lw*((TRAYS(i).Level-(beta*hw))/(beta))^1.5;
     853                                TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'m^0.5/s'*lw*((TRAYS(i).Level-(AerationFraction*hw))/(AerationFraction))^1.5;
    898854                       
    899855                                case "Olsen":
     
    907863                                                        (2*(1 - 0.3593/'Pa^0.0888545'*abs(TRAYS(i).OutletVapour.F*sum(Mw*TRAYS(i).OutletVapour.z)/(Ap*1.3)/sqrt(TRAYS(i).rhoV))^0.177709)-1)); #/'(kg/m)^0.0888545/s^0.177709';
    908864                        end
    909                 when TRAYS(i).Level < (beta *hw) switchto "off";
     865                when TRAYS(i).Level < (AerationFraction *hw) switchto "off";
    910866               
    911867                case "off":
    912868                "Low level"
    913869                TRAYS(i).OutletLiquid.F = 0 * 'mol/h';
    914                 when TRAYS(i).Level > (beta * hw) + 1e-6*'m' switchto "on";
     870                when TRAYS(i).Level > (AerationFraction * hw) + 1e-6*'m' switchto "on";
    915871        end
    916872       
     
    925881                       
    926882                                case "Roffel_Fv":
    927                                 TRAYS(i).InletVapour.F^1.08 * 0.0013 * 'kg/m/mol^1.08/s^0.92*1e5' = (TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)*1e5 - (beta*sum(TRAYS(i).M*Mw)/(Ap*1.3)*g*1e5) * (TRAYS(i).rhoV*Ah/sum(Mw*TRAYS(i).OutletVapour.z))^1.08 * 'm^1.08/mol^1.08';
     883                                TRAYS(i).InletVapour.F^1.08 * 0.0013 * 'kg/m/mol^1.08/s^0.92*1e5' = (TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)*1e5 - (AerationFraction*sum(TRAYS(i).M*Mw)/(Ap*1.3)*g*1e5) * (TRAYS(i).rhoV*Ah/sum(Mw*TRAYS(i).OutletVapour.z))^1.08 * 'm^1.08/mol^1.08';
    928884                       
    929885                                case "Klingberg":
Note: See TracChangeset for help on using the changeset viewer.