Changeset 398 for trunk/eml


Ignore:
Timestamp:
Oct 26, 2007, 12:44:56 PM (15 years ago)
Author:
Paula Bettio Staudt
Message:

Updated tray and column models and samples

Location:
trunk/eml/stage_separators
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/eml/stage_separators/column.mso

    r363 r398  
    7979        trays(NTrays) as tray;
    8080
    81         EQUATIONS
    82         "Pressure Drop through the tray"
    83         trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 *
    84             (trays([top:topdown:bot]).OutletV.P -
    85             trays([top:topdown:bot]).InletL.P)/'Pa'))/2 *
    86             trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV *
    87             sqrt(2*(trays([top:topdown:bot]).OutletV.P -
    88                 trays([top:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    89             (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV));
    90 
    9181        CONNECTIONS
    9282        trays([top+topdown:topdown:bot]).OutletV to trays([top:topdown:bot-topdown]).InletV;
     
    139129        top as Integer(Brief="Number of top tray");
    140130        bot as Integer(Brief="Number of bottom tray");
    141 
     131        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
     132       
    142133        SET
    143134        top = (NTrays-1)*(1-topdown)/2+1;
     
    150141        sptop as splitter;
    151142        pump1 as pump;
    152 
     143        alfaTopo as Real;
     144       
    153145        EQUATIONS
    154         if (reb.OutletV.P > reb.InletL.P) then
    155                 "Pressure Drop through the reboiler"
    156                 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P)
    157                                 / (trays(bot).beta*reb.rhoV) );
    158         else
    159                 "No flow in reboiler"
    160                 reb.OutletV.F = 0.0 * 'mol/s';
    161         end
    162 
    163         "Pressure Drop through the tray"
    164         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/'Pa'))/2 *
    165                 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
     146        switch VapourFlow
     147                case "on":
     148                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
    166149                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     150                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    167151               
    168         trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    169             (trays([top+topdown:topdown:bot]).OutletV.P -
    170             trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    171             trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    172             sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    173                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    174             (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
     152                case "off":
     153                cond.InletV.F = 0 * 'mol/s';
     154                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
     155        end     
    175156
    176157        CONNECTIONS
     
    239220        top as Integer(Brief="Number of top tray");
    240221        bot as Integer(Brief="Number of bottom tray");
     222        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    241223
    242224        SET
     
    253235        sptop as splitter;
    254236        pump1 as pump;
     237        alfaTopo as Real;
    255238
    256239        EQUATIONS
    257         if (reb.OutletV.P > reb.InletL.P) then
    258                 "Pressure Drop through the reboiler"
    259                 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P)
    260                                 / (trays(bot).alfa*reb.rhoV) );
    261         else
    262                 "No flow in reboiler"
    263                 reb.OutletV.F = 0.0 * 'mol/s';
     240        switch VapourFlow
     241                case "on":
     242                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
     243                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     244                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
     245               
     246                case "off":
     247                cond.InletV.F = 0 * 'mol/s';
     248                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
    264249        end     
    265        
    266         "Pressure Drop through the tray"
    267         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/'Pa'))/2 *
    268                 trays(top).Ah/trays(top).vV /2* sqrt(2*(trays(top).OutletV.P -
    269                 ttop.Outlet.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
    270                
    271         trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    272             (trays([top+topdown:topdown:bot]).OutletV.P -
    273             trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    274             trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV /2*
    275             sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    276                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    277             (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
    278250       
    279251        CONNECTIONS
     
    343315        top as Integer(Brief="Number of top tray");
    344316        bot as Integer(Brief="Number of bottom tray");
     317        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    345318
    346319        SET
     
    356329        sptop as splitter;
    357330        pump1 as pump;
     331        alfaTopo as Real;
    358332
    359333        EQUATIONS
    360         if (reb.OutletV.P > reb.InletL.P) then
    361                 "Pressure Drop through the reboiler"
    362                 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P)
    363                                 / (trays(bot).alfa*reb.rhoV) );
    364         else
    365                 "No flow in reboiler"
    366                 reb.OutletV.F = 0.0 * 'mol/s';
    367         end
    368 
    369         "Pressure Drop through the tray"
    370         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/'Pa'))/2 *
    371                 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
     334        switch VapourFlow
     335                case "on":
     336                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
    372337                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     338                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    373339               
    374         trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    375             (trays([top+topdown:topdown:bot]).OutletV.P -
    376             trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    377             trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    378             sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    379                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    380             (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
     340                case "off":
     341                cond.InletV.F = 0 * 'mol/s';
     342                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
     343        end     
    381344                       
    382345        CONNECTIONS
     
    444407        top as Integer(Brief="Number of top tray");
    445408        bot as Integer(Brief="Number of bottom tray");
     409        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    446410
    447411        SET
     
    456420        sptop as splitter;
    457421        pump1 as pump;
     422        alfaTopo as Real;
    458423
    459424        EQUATIONS
    460         if (reb.OutletV.P > reb.InletL.P) then
    461                 "Pressure Drop through the reboiler"
    462                 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P)
    463                                 / (trays(bot).beta*reb.rhoV) );
    464         else
    465                 "No flow in reboiler"
    466                 reb.OutletV.F = 0.0 * 'mol/s';
    467         end
    468 
    469         "Pressure Drop through the tray"
    470         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/'Pa'))/2 *
    471                 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    472                 ttop.Outlet.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     425        switch VapourFlow
     426                case "on":
     427                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
     428                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     429                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    473430               
    474         trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    475             (trays([top+topdown:topdown:bot]).OutletV.P -
    476             trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    477             trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    478             sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    479                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    480             (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
     431                case "off":
     432                cond.InletV.F = 0 * 'mol/s';
     433                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
     434        end     
    481435       
    482436        CONNECTIONS
     
    512466* the feed stream of each tray (Inlet);
    513467* the Murphree eficiency for each tray Emv;
    514 * the InletV stream of the bottom tray;
     468* the InletV stream of the bottom tray unless its flow;
    515469* the pump pressure difference;
    516470* the heat supllied in the condenser;
     
    535489        top as Integer(Brief="Number of top tray");
    536490        bot as Integer(Brief="Number of bottom tray");
     491        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    537492
    538493        SET
     
    545500        sptop as splitter;
    546501        pump1 as pump;
     502        alfaTopo as Real;
    547503
    548504        EQUATIONS
    549         "Pressure Drop through the tray"
    550         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/'Pa'))/2 *
    551                 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
     505        switch VapourFlow
     506                case "on":
     507                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
    552508                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     509                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    553510               
    554         trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    555             (trays([top+topdown:topdown:bot]).OutletV.P -
    556             trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    557             trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    558             sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    559                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    560             (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
     511                case "off":
     512                cond.InletV.F = 0 * 'mol/s';
     513                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
     514        end     
    561515       
    562516        CONNECTIONS
     
    592546* the feed stream of each tray (Inlet);
    593547* the Murphree eficiency for each tray Emv;
    594 * the InletV stream of the bottom tray;
     548* the InletV stream of the bottom tray unless its flow;
    595549* the pump head;
    596550* the condenser pressure drop;
     
    616570        top as Integer(Brief="Number of top tray");
    617571        bot as Integer(Brief="Number of bottom tray");
     572        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    618573
    619574        SET
     
    627582        sptop as splitter;
    628583        pump1 as pump;
     584        alfaTopo as Real;
    629585
    630586        EQUATIONS
    631         "Pressure Drop through the tray"
    632         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/'Pa'))/2 *
    633                 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    634                 ttop.Outlet.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     587        switch VapourFlow
     588                case "on":
     589                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
     590                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     591                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    635592               
    636         trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    637             (trays([top+topdown:topdown:bot]).OutletV.P -
    638             trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    639             trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    640             sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    641                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    642             (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
     593                case "off":
     594                cond.InletV.F = 0 * 'mol/s';
     595                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
     596        end     
    643597       
    644598        CONNECTIONS
     
    672626* the feed stream of each tray (Inlet);
    673627* the Murphree eficiency for each tray Emv;
    674 * the InletV stream of the bottom tray;
     628* the InletV stream of the bottom tray unless its flow;
    675629* the pump pressure difference;
    676630* the heat supllied in the condenser;
     
    695649        top as Integer(Brief="Number of top tray");
    696650        bot as Integer(Brief="Number of bottom tray");
     651        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    697652
    698653        SET
     
    705660        sptop as splitter;
    706661        pump1 as pump;
     662        alfaTopo as Real;
    707663
    708664        EQUATIONS
    709         "Pressure Drop through the tray"
    710         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/'Pa'))/2 *
    711                 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
     665        switch VapourFlow
     666                case "on":
     667                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
    712668                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     669                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    713670               
    714         trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    715             (trays([top+topdown:topdown:bot]).OutletV.P -
    716             trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    717             trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    718             sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    719                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    720             (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
     671                case "off":
     672                cond.InletV.F = 0 * 'mol/s';
     673                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
     674        end
    721675       
    722676        CONNECTIONS
     
    752706* the feed stream of each tray (Inlet);
    753707* the Murphree eficiency for each tray Emv;
    754 * the InletV stream of the bottom tray;
     708* the InletV stream of the bottom tray unless its flow;
    755709* the pump head;
    756710* the condenser pressure drop;
     
    776730        top as Integer(Brief="Number of top tray");
    777731        bot as Integer(Brief="Number of bottom tray");
     732        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    778733
    779734        SET
     
    787742        sptop as splitter;
    788743        pump1 as pump;
     744        alfaTopo as Real;
    789745
    790746        EQUATIONS
    791         "Pressure Drop through the tray"
    792         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/'Pa'))/2 *
    793                 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    794                 ttop.Outlet.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     747        switch VapourFlow
     748                case "on":
     749                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
     750                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     751                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    795752               
    796         trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    797             (trays([top+topdown:topdown:bot]).OutletV.P -
    798             trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    799             trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    800             sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    801                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    802             (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
     753                case "off":
     754                cond.InletV.F = 0 * 'mol/s';
     755                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
     756        end
    803757       
    804758        CONNECTIONS
     
    832786* the feed stream of each tray (Inlet);
    833787* the Murphree eficiency for each tray Emv;
    834 * the InletV stream of the bottom tray;
     788* the InletV stream of the bottom tray unless its flow;
    835789* the pump pressure difference;
    836790* the heat supllied in the condenser;
     
    855809        top as Integer(Brief="Number of top tray");
    856810        bot as Integer(Brief="Number of bottom tray");
     811        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    857812
    858813        SET
     
    865820        sptop as splitter;
    866821        pump1 as pump;
     822        alfaTopo as Real;
    867823
    868824        EQUATIONS
    869         "Pressure Drop through the tray"
    870         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - cond.OutletL.P)/'Pa'))/2 *
    871                 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
     825        switch VapourFlow
     826                case "on":
     827                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
    872828                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     829                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    873830               
    874         trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    875             (trays([top+topdown:topdown:bot]).OutletV.P -
    876             trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    877             trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    878             sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    879                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    880             (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
     831                case "off":
     832                cond.InletV.F = 0 * 'mol/s';
     833                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
     834        end
    881835       
    882836        CONNECTIONS
     
    913867* the feed stream of each tray (Inlet);
    914868* the Murphree eficiency for each tray Emv;
    915 * the InletV stream of the bottom tray;
     869* the InletV stream of the bottom tray unless its flow;
    916870* the pump head;
    917871* the condenser pressure drop;
     
    937891        top as Integer(Brief="Number of top tray");
    938892        bot as Integer(Brief="Number of bottom tray");
     893        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
    939894
    940895        SET
     
    948903        sptop as splitter;
    949904        pump1 as pump;
     905        alfaTopo as Real;
    950906
    951907        EQUATIONS
    952         "Pressure Drop through the tray"
    953         trays(top).OutletV.F = (1 + tanh(1 * (trays(top).OutletV.P - ttop.Outlet.P)/'Pa'))/2 *
    954                 trays(top).Ah/trays(top).vV * sqrt(2*(trays(top).OutletV.P -
    955                 ttop.Outlet.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     908        switch VapourFlow
     909                case "on":
     910                cond.InletV.F*trays(top).vV = alfaTopo * trays(top).Ah * sqrt(2*(trays(top).OutletV.P -
     911                cond.OutletL.P + 1e-8 * 'atm') / (trays(top).alfa*trays(top).rhoV));
     912                when cond.InletV.F < 1e-6 * 'kmol/h' switchto "off";
    956913               
    957         trays([top+topdown:topdown:bot]).OutletV.F = (1 + tanh(1 *
    958             (trays([top+topdown:topdown:bot]).OutletV.P -
    959             trays([top+topdown:topdown:bot]).InletL.P)/'Pa'))/2 *
    960             trays([top+topdown:topdown:bot]).Ah/trays([top+topdown:topdown:bot]).vV *
    961             sqrt(2*(trays([top+topdown:topdown:bot]).OutletV.P -
    962                 trays([top+topdown:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    963             (trays([top+topdown:topdown:bot]).alfa*trays([top+topdown:topdown:bot]).rhoV));
     914                case "off":
     915                cond.InletV.F = 0 * 'mol/s';
     916                when trays(top).OutletV.P > cond.OutletL.P + 1e-1 * 'atm' switchto "on";
     917        end     
    964918       
    965919        CONNECTIONS
     
    993947* the feed stream of each tray (Inlet);
    994948* the Murphree eficiency for each tray Emv;
     949* the vapour flow leaving the top of the column;
    995950* the InletL stream of the top tray;
    996951* the heat supllied in the reboiler;
     
    1023978        reb as reboiler;
    1024979
    1025         EQUATIONS
    1026         if (reb.OutletV.P > reb.InletL.P) then
    1027                 "Pressure Drop through the tray"
    1028                 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P)
    1029                                 / (trays(bot).beta*reb.rhoV) );
    1030         else
    1031                 "Prato selado"
    1032                 reb.OutletV.F = 0.0 * 'mol/s';
    1033         end
    1034 
    1035         "Pressure Drop through the tray"
    1036         trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 *
    1037             (trays([top:topdown:bot]).OutletV.P -
    1038             trays([top:topdown:bot]).InletL.P)/'Pa'))/2 *
    1039             trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV *
    1040             sqrt(2*(trays([top:topdown:bot]).OutletV.P -
    1041                 trays([top:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    1042             (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV));
    1043        
    1044980        CONNECTIONS
    1045981        #vapor
     
    10711007* the feed stream of each tray (Inlet);
    10721008* the Murphree eficiency for each tray (Emv);
     1009* the vapour flow leaving the top of the column;
    10731010* the InletL stream of the top tray;
    10741011* the heat supllied in bottom tank;
     
    11041041        tbottom as tank;
    11051042
    1106         EQUATIONS
    1107         if (reb.OutletV.P > reb.InletL.P) then
    1108                 "Pressure Drop through the tray"
    1109                 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P)
    1110                                 / (trays(bot).alfa*reb.rhoV) );
    1111         else
    1112                 "Prato selado"
    1113                 reb.OutletV.F = 0.0 * 'mol/s';
    1114         end
    1115 
    1116         "Pressure Drop through the tray"
    1117         trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 *
    1118             (trays([top:topdown:bot]).OutletV.P -
    1119             trays([top:topdown:bot]).InletL.P)/'Pa'))/2 *
    1120             trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV *
    1121             sqrt(2*(trays([top:topdown:bot]).OutletV.P -
    1122                 trays([top:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    1123             (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV));
    1124        
    11251043        CONNECTIONS
    11261044        #vapor
     
    11521070* the feed stream of each tray (Inlet);
    11531071* the Murphree eficiency for each tray Emv;
     1072* the vapour flow leaving the top of the column;
    11541073* the InletL stream of the top tray;
    11551074* the heat supllied in the reboiler;
     
    11821101        reb as reboiler;
    11831102
    1184         EQUATIONS
    1185         if (reb.OutletV.P > reb.InletL.P) then
    1186                 "Pressure Drop through the tray"
    1187                 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P)
    1188                                 / (trays(bot).beta*reb.rhoV) );
    1189         else
    1190                 "Prato selado"
    1191                 reb.OutletV.F = 0.0 * 'mol/s';
    1192         end
    1193 
    1194         "Pressure Drop through the tray"
    1195         trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 *
    1196             (trays([top:topdown:bot]).OutletV.P -
    1197             trays([top:topdown:bot]).InletL.P)/'Pa'))/2 *
    1198             trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV *
    1199             sqrt(2*(trays([top:topdown:bot]).OutletV.P -
    1200                 trays([top:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    1201             (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV));
    1202        
    12031103        CONNECTIONS
    12041104        #vapor
     
    12301130* the feed stream of each tray (Inlet);
    12311131* the Murphree eficiency for each tray (Emv);
     1132* the vapour flow leaving the top of the column;
    12321133* the InletL stream of the top tray;
    12331134* the heat supllied in bottom tank;
     
    12621163        spbottom as splitter;
    12631164        tbottom as tank;
    1264 
    1265         EQUATIONS
    1266         if (reb.OutletV.P > reb.InletL.P) then
    1267                 "Pressure Drop through the tray"
    1268                 reb.OutletV.F = trays(bot).Ah/reb.vV * sqrt((reb.OutletV.P - trays(bot).OutletL.P)
    1269                                 / (trays(bot).alfa*reb.rhoV) );
    1270         else
    1271                 "Prato selado"
    1272                 reb.OutletV.F = 0.0 * 'mol/s';
    1273         end
    1274 
    1275         "Pressure Drop through the tray"
    1276         trays([top:topdown:bot]).OutletV.F = (1 + tanh(1 *
    1277             (trays([top:topdown:bot]).OutletV.P -
    1278             trays([top:topdown:bot]).InletL.P)/'Pa'))/2 *
    1279             trays([top:topdown:bot]).Ah/trays([top:topdown:bot]).vV *
    1280             sqrt(2*(trays([top:topdown:bot]).OutletV.P -
    1281                 trays([top:topdown:bot]).InletL.P + 1e-8 * 'atm') /
    1282             (trays([top:topdown:bot]).alfa*trays([top:topdown:bot]).rhoV));
    12831165       
    12841166        CONNECTIONS
  • trunk/eml/stage_separators/tray.mso

    r353 r398  
    131131        alfa as fraction (Brief="Dry pressure drop coefficient");
    132132       
     133        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
     134        LiquidFlow as Switcher(Valid = ["on", "off"], Default = "on");
     135       
    133136        VARIABLES
    134137        rhoL as dens_mass;
     
    141144        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
    142145
    143         if Level > (beta * hw) then
     146        switch LiquidFlow
     147                case "on":
    144148                "Francis Equation"
    145                 OutletL.F = 1.84*'1/s'*lw*((Level-(beta*hw))/(beta))^2/vL;
    146         else
     149#               OutletL.F*vL = 1.84*'m^0.5/s'*lw*((Level-(beta*hw))/(beta))^1.5;
     150                OutletL.F*vL = 1.84*'1/s'*lw*((Level-(beta*hw))/(beta))^2;
     151                when Level < (beta * hw) switchto "off";
     152               
     153                case "off":
    147154                "Low level"
    148155                OutletL.F = 0 * 'mol/h';
     156                when Level > (beta * hw) + 1e-6*'m' switchto "on";
     157        end
     158
     159        switch VapourFlow
     160                case "on":
     161                InletV.F*vV = sqrt((InletV.P - OutletV.P)/(rhoV*alfa))*Ah;
     162                when InletV.F < 1e-6 * 'kmol/h' switchto "off";
     163               
     164                case "off":
     165                InletV.F = 0 * 'mol/s';
     166                when InletV.P > OutletV.P + Level*g*rhoL + 1e-1 * 'atm' switchto "on";
    149167        end
    150168
Note: See TracChangeset for help on using the changeset viewer.