Ignore:
Timestamp:
Feb 26, 2009, 11:00:39 PM (13 years ago)
Author:
gerson bicca
Message:

updates (some samples are obsoletes)

File:
1 edited

Legend:

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

    r729 r735  
    168168# Connecting Intermediate Trays
    169169#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    170         TRAYS([2:NumberOfTrays]).OutletV        to TRAYS([1:NumberOfTrays-1]).InletV;
    171         TRAYS([1:NumberOfTrays-1]).OutletL      to TRAYS([2:NumberOfTrays]).InletL;
     170        TRAYS([2:NumberOfTrays]).OutletVapour   to TRAYS([1:NumberOfTrays-1]).InletVapour;
     171        TRAYS([1:NumberOfTrays-1]).OutletLiquid         to TRAYS([2:NumberOfTrays]).InletLiquid;
    172172       
    173173INITIAL
     
    178178
    179179"The initial temperature of the TRAYS"
    180         TRAYS(i).OutletL.T = INITIALIZATION.TopTemperature+(INITIALIZATION.BottomTemperature-INITIALIZATION.TopTemperature)*((i-1)/(NumberOfTrays-1));
     180        TRAYS(i).OutletLiquid.T = INITIALIZATION.TopTemperature+(INITIALIZATION.BottomTemperature-INITIALIZATION.TopTemperature)*((i-1)/(NumberOfTrays-1));
    181181
    182182"The initial Level of the TRAYS"
     
    189189
    190190"The initial composition of the TRAYS - Normalized"
    191         TRAYS(j).OutletL.z(i) = INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) +(INITIALIZATION.BottomComposition(i)/sum(INITIALIZATION.BottomComposition)-INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) )*((j-1)/(NumberOfTrays-1));
     191        TRAYS(j).OutletLiquid.z(i) = INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) +(INITIALIZATION.BottomComposition(i)/sum(INITIALIZATION.BottomComposition)-INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) )*((j-1)/(NumberOfTrays-1));
    192192end
    193193
     
    223223
    224224"Murphree Efficiency"
    225         TRAYS(i).OutletV.z =  MurphreeEff * (TRAYS(i).yideal - TRAYS(i).InletV.z) + TRAYS(i).InletV.z;
     225        TRAYS(i).OutletVapour.z =  MurphreeEff * (TRAYS(i).yideal - TRAYS(i).InletVapour.z) + TRAYS(i).InletVapour.z;
    226226
    227227"Level of clear liquid over the weir"
     
    232232
    233233"Energy Holdup"
    234         TRAYS(i).E = TRAYS(i).ML*TRAYS(i).OutletL.h + TRAYS(i).MV*TRAYS(i).OutletV.h - TRAYS(i).OutletL.P*V;
     234        TRAYS(i).E = TRAYS(i).ML*TRAYS(i).OutletLiquid.h + TRAYS(i).MV*TRAYS(i).OutletVapour.h - TRAYS(i).OutletLiquid.P*V;
    235235
    236236"Energy Balance"
    237         diff(TRAYS(i).E) = ( TRAYS(i).Inlet.F*TRAYS(i).Inlet.h + TRAYS(i).InletL.F*TRAYS(i).InletL.h + TRAYS(i).InletV.F*TRAYS(i).InletV.h- TRAYS(i).OutletL.F*TRAYS(i).OutletL.h - TRAYS(i).OutletV.F*TRAYS(i).OutletV.h
     237        diff(TRAYS(i).E) = ( TRAYS(i).Inlet.F*TRAYS(i).Inlet.h + TRAYS(i).InletLiquid.F*TRAYS(i).InletLiquid.h + TRAYS(i).InletVapour.F*TRAYS(i).InletVapour.h- TRAYS(i).OutletLiquid.F*TRAYS(i).OutletLiquid.h - TRAYS(i).OutletVapour.F*TRAYS(i).OutletVapour.h
    238238        -TRAYS(i).VapourSideStream.F*TRAYS(i).VapourSideStream.h - TRAYS(i).LiquidSideStream.F*TRAYS(i).LiquidSideStream.h + Q );
    239239
     
    243243                                case "default":
    244244                                "Francis Equation"
    245                                 TRAYS(i).OutletL.F*TRAYS(i).vL = 1.84*'1/s'*lw*((TRAYS(i).Level-(beta*hw))/(beta))^2;
     245                                TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'1/s'*lw*((TRAYS(i).Level-(beta*hw))/(beta))^2;
    246246                       
    247247                                case "Wang_Fl":
    248                                 TRAYS(i).OutletL.F*TRAYS(i).vL = 1.84*'m^0.5/s'*lw*((TRAYS(i).Level-(beta*hw))/(beta))^1.5;
     248                                TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'m^0.5/s'*lw*((TRAYS(i).Level-(beta*hw))/(beta))^1.5;
    249249                       
    250250                                case "Olsen":
    251                                 TRAYS(i).OutletL.F / 'mol/s'= lw*Np*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletV.z)/(0.665*fw)^1.5 * ((TRAYS(i).ML*sum(Mw*TRAYS(i).OutletL.z)/TRAYS(i).rhoL/Ap)-hw)^1.5 * 'm^0.5/mol';
     251                                TRAYS(i).OutletLiquid.F / 'mol/s'= lw*Np*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletVapour.z)/(0.665*fw)^1.5 * ((TRAYS(i).ML*sum(Mw*TRAYS(i).OutletLiquid.z)/TRAYS(i).rhoL/Ap)-hw)^1.5 * 'm^0.5/mol';
    252252                       
    253253                                case "Feehery_Fl":
    254                                 TRAYS(i).OutletL.F = lw*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletL.z) * ((TRAYS(i).Level-hw)/750/'mm')^1.5 * 'm^2/s';
     254                                TRAYS(i).OutletLiquid.F = lw*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletLiquid.z) * ((TRAYS(i).Level-hw)/750/'mm')^1.5 * 'm^2/s';
    255255                       
    256256                                case "Roffel_Fl":
    257                                 TRAYS(i).OutletL.F = 2/3*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletL.z)*lw*(TRAYS(i).ML*sum(Mw*TRAYS(i).OutletL.z)/(Ap*1.3)/TRAYS(i).rhoL)^1.5*sqrt(2*g/
    258                                                         (2*(1 - 0.3593/'Pa^0.0888545'*abs(TRAYS(i).OutletV.F*sum(Mw*TRAYS(i).OutletV.z)/(Ap*1.3)/sqrt(TRAYS(i).rhoV))^0.177709)-1)); #/'(kg/m)^0.0888545/s^0.177709';
     257                                TRAYS(i).OutletLiquid.F = 2/3*TRAYS(i).rhoL/sum(Mw*TRAYS(i).OutletLiquid.z)*lw*(TRAYS(i).ML*sum(Mw*TRAYS(i).OutletLiquid.z)/(Ap*1.3)/TRAYS(i).rhoL)^1.5*sqrt(2*g/
     258                                                        (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';
    259259                        end
    260260                when TRAYS(i).Level < (beta *hw) switchto "off";
     
    262262                case "off":
    263263                "Low level"
    264                 TRAYS(i).OutletL.F = 0 * 'mol/h';
     264                TRAYS(i).OutletLiquid.F = 0 * 'mol/h';
    265265                when TRAYS(i).Level > (beta * hw) + 1e-6*'m' switchto "on";
    266266        end
     
    270270                        switch VapourFlowModel
    271271                                case "Reepmeyer":
    272                                 TRAYS(i).InletV.F*TRAYS(i).vV = sqrt((TRAYS(i).InletV.P - TRAYS(i).OutletV.P)/(TRAYS(i).rhoV*alfa))*Ah;
     272                                TRAYS(i).InletVapour.F*TRAYS(i).vV = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)/(TRAYS(i).rhoV*alfa))*Ah;
    273273                       
    274274                                case "Feehery_Fv":
    275                                 TRAYS(i).InletV.F = TRAYS(i).rhoV/Ap/w/sum(Mw*TRAYS(i).OutletV.z) * sqrt(((TRAYS(i).InletV.P - TRAYS(i).OutletV.P)-(TRAYS(i).rhoV*g*TRAYS(i).ML*TRAYS(i).vL/Ap))/TRAYS(i).rhoV);
     275                                TRAYS(i).InletVapour.F = TRAYS(i).rhoV/Ap/w/sum(Mw*TRAYS(i).OutletVapour.z) * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-(TRAYS(i).rhoV*g*TRAYS(i).ML*TRAYS(i).vL/Ap))/TRAYS(i).rhoV);
    276276                       
    277277                                case "Roffel_Fv":
    278                                 TRAYS(i).InletV.F^1.08 * 0.0013 * 'kg/m/mol^1.08/s^0.92*1e5' = (TRAYS(i).InletV.P - TRAYS(i).OutletV.P)*1e5 - (beta*sum(TRAYS(i).M*Mw)/(Ap*1.3)*g*1e5) * (TRAYS(i).rhoV*Ah/sum(Mw*TRAYS(i).OutletV.z))^1.08 * 'm^1.08/mol^1.08';
     278                                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';
    279279                       
    280280                                case "Klingberg":
    281                                 TRAYS(i).InletV.F * TRAYS(i).vV = Ap * sqrt(((TRAYS(i).InletV.P - TRAYS(i).OutletV.P)-TRAYS(i).rhoL*g*TRAYS(i).Level)/TRAYS(i).rhoV);
     281                                TRAYS(i).InletVapour.F * TRAYS(i).vV = Ap * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-TRAYS(i).rhoL*g*TRAYS(i).Level)/TRAYS(i).rhoV);
    282282                       
    283283                                case "Wang_Fv":
    284                                 TRAYS(i).InletV.F * TRAYS(i).vV = Ap * sqrt(((TRAYS(i).InletV.P - TRAYS(i).OutletV.P)-TRAYS(i).rhoL*g*TRAYS(i).Level)/TRAYS(i).rhoV*alfa);
     284                                TRAYS(i).InletVapour.F * TRAYS(i).vV = Ap * sqrt(((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)-TRAYS(i).rhoL*g*TRAYS(i).Level)/TRAYS(i).rhoV*alfa);
    285285                               
    286286                                case "Elgue":
    287                                 TRAYS(i).InletV.F  = sqrt((TRAYS(i).InletV.P - TRAYS(i).OutletV.P)/btray);
     287                                TRAYS(i).InletVapour.F  = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P)/btray);
    288288                        end
    289                 when TRAYS(i).InletV.F < 1e-6 * 'kmol/h' switchto "off";
     289                when TRAYS(i).InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
    290290               
    291291                case "off":
    292                 TRAYS(i).InletV.F = 0 * 'mol/s';
    293                 when TRAYS(i).InletV.P > TRAYS(i).OutletV.P + TRAYS(i).Level*g*TRAYS(i).rhoL + 1e-1 * 'atm' switchto "on";
     292                TRAYS(i).InletVapour.F = 0 * 'mol/s';
     293                when TRAYS(i).InletVapour.P > TRAYS(i).OutletVapour.P + TRAYS(i).Level*g*TRAYS(i).rhoL + 1e-1 * 'atm' switchto "on";
    294294        end
    295295
     
    311311* the feed stream of each tray (Inlet);
    312312* the Murphree eficiency for each tray Emv;
    313 * the InletL stream of the top tray;
    314 * the InletV stream of the bottom tray.
     313* the InletLiquid stream of the top tray;
     314* the InletVapour stream of the bottom tray.
    315315       
    316316== Initial Conditions ==
    317 * the TRAYS temperature (OutletL.T);
    318 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL.F);
    319 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray.
     317* the TRAYS temperature (OutletLiquid.T);
     318* the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F);
     319* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray.
    320320";
    321321
     
    338338CONNECTIONS
    339339
    340         LiquidConnector to TRAYS(1).InletL;
    341         VapourConnector to TRAYS(NumberOfTrays).InletV;
     340        LiquidConnector to TRAYS(1).InletLiquid;
     341        VapourConnector to TRAYS(NumberOfTrays).InletVapour;
    342342
    343343EQUATIONS
     
    386386#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    387387"Liquid Outlet Flow"   
    388         LiquidOutlet.F = TRAYS(NumberOfTrays).OutletL.F;
     388        LiquidOutlet.F = TRAYS(NumberOfTrays).OutletLiquid.F;
    389389
    390390"Liquid Outlet Temperature"     
    391         LiquidOutlet.T = TRAYS(NumberOfTrays).OutletL.T;
     391        LiquidOutlet.T = TRAYS(NumberOfTrays).OutletLiquid.T;
    392392
    393393"Liquid Outlet Pressure"       
    394         LiquidOutlet.P = TRAYS(NumberOfTrays).OutletL.P;
     394        LiquidOutlet.P = TRAYS(NumberOfTrays).OutletLiquid.P;
    395395
    396396"Liquid Outlet Composition"     
    397         LiquidOutlet.z = TRAYS(NumberOfTrays).OutletL.z;
     397        LiquidOutlet.z = TRAYS(NumberOfTrays).OutletLiquid.z;
    398398#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    399399# Equating Outlet Vapour Variables
    400400#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    401401"Vapour Outlet Flow"           
    402         VapourOutlet.F = TRAYS(1).OutletV.F;
     402        VapourOutlet.F = TRAYS(1).OutletVapour.F;
    403403
    404404"Vapour Outlet Temperature"             
    405         VapourOutlet.T = TRAYS(1).OutletV.T;
     405        VapourOutlet.T = TRAYS(1).OutletVapour.T;
    406406
    407407"Vapour Outlet Pressure"               
    408         VapourOutlet.P = TRAYS(1).OutletV.P;
     408        VapourOutlet.P = TRAYS(1).OutletVapour.P;
    409409
    410410"Vapour Outlet Composition"             
    411         VapourOutlet.z = TRAYS(1).OutletV.z;
     411        VapourOutlet.z = TRAYS(1).OutletVapour.z;
    412412#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    413413# Equating Outlet Vapour Side Stream Variables
     
    459459* the pump pressure difference;
    460460* the heat supllied in reboiler and condenser;
    461 * the condenser vapor outlet flow (OutletV.F);
    462 * the reboiler liquid outlet flow (OutletL.F);
     461* the condenser vapor outlet flow (OutletVapour.F);
     462* the reboiler liquid outlet flow (OutletLiquid.F);
    463463* both splitter outlet flows OR one of the splitter outlet flows and the splitter frac.
    464464       
    465465== Initial Conditions ==
    466 * the TRAYS temperature (OutletL.T);
    467 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL.F);
    468 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
    469        
    470 * the condenser temperature (OutletL.T);
     466* the TRAYS temperature (OutletLiquid.T);
     467* the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F);
     468* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray;
     469       
     470* the condenser temperature (OutletLiquid.T);
    471471* the condenser liquid level (Level);
    472 * (NoComps - 1) OutletL (OR OutletV) compositions;
    473        
    474 * the reboiler temperature (OutletL.T);
     472* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions;
     473       
     474* the reboiler temperature (OutletLiquid.T);
    475475* the reboiler liquid level (Level);
    476 * (NoComps - 1) OutletL (OR OutletV) compositions.
     476* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.
    477477";
    478478       
     
    516516
    517517        case "on":
    518                 CONDENSER.InletV.F*TRAYS(1).vV = alfaTopo *Ah * sqrt(2*(TRAYS(1).OutletV.P -
    519                 CONDENSER.OutletL.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
    520                 when CONDENSER.InletV.F < 1e-6 * 'kmol/h' switchto "off";
     518                CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo *Ah * sqrt(2*(TRAYS(1).OutletVapour.P -
     519                CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
     520                when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
    521521
    522522        case "off":
    523                 CONDENSER.InletV.F = 0 * 'mol/s';
    524                 when TRAYS(1).OutletV.P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";
     523                CONDENSER.InletVapour.F = 0 * 'mol/s';
     524                when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on";
    525525
    526526end     
     
    562562CONNECTIONS
    563563#vapor
    564         REBOILER.OutletV        to      TRAYS(NumberOfTrays).InletV;
    565         TRAYS(1).OutletV        to      CONDENSER.InletV;
     564        REBOILER.OutletVapour   to      TRAYS(NumberOfTrays).InletVapour;
     565        TRAYS(1).OutletVapour   to      CONDENSER.InletVapour;
    566566
    567567#liquid
    568         CONDENSER.OutletL                               to      SPLITTER.Inlet;
     568        CONDENSER.OutletLiquid                          to      SPLITTER.Inlet;
    569569        SPLITTER.Outlet2                        to      PUMP.Inlet;
    570         PUMP.Outlet                                     to      TRAYS(1).InletL;
    571         TRAYS(NumberOfTrays).OutletL    to      REBOILER.InletL;
     570        PUMP.Outlet                                     to      TRAYS(1).InletLiquid;
     571        TRAYS(NumberOfTrays).OutletLiquid       to      REBOILER.InletLiquid;
    572572
    573573#Connectors
    574         CONDENSER.OutletV       to ConnectorCondenserVout;
     574        CONDENSER.OutletVapour  to ConnectorCondenserVout;
    575575        SPLITTER.Outlet1 to ConnectorSplitterOut;
    576         REBOILER.OutletL        to ConnectorReboilerLout;
     576        REBOILER.OutletLiquid   to ConnectorReboilerLout;
    577577
    578578        ConnectorHeatReboiler   to REBOILER.InletQ;
     
    598598       
    599599== Initial Conditions ==
    600 * the TRAYS temperature (OutletL.T);
    601 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL.F);
    602 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
    603        
    604 * the top tank temperature (OutletL.T);
     600* the TRAYS temperature (OutletLiquid.T);
     601* the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F);
     602* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray;
     603       
     604* the top tank temperature (OutletLiquid.T);
    605605* the top tank liquid level (Level);
    606 * (NoComps - 1) OutletL (OR OutletV) compositions;
    607        
    608 * the bottom tank temperature (OutletL.T);
     606* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions;
     607       
     608* the bottom tank temperature (OutletLiquid.T);
    609609* the bottom tank liquid level (Level);
    610 * (NoComps - 1) OutletL (OR OutletV) compositions.
     610* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.
    611611";
    612612
     
    690690
    691691        case "on":
    692                 CONDENSER.InletV.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletV.P -
    693                 CONDENSER.OutletL.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
    694                 when CONDENSER.InletV.F < 1e-6 * 'kmol/h' switchto "off";
     692                CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletVapour.P -
     693                CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
     694                when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
    695695
    696696        case "off":
    697                 CONDENSER.InletV.F = 0 * 'mol/s';
    698                 when TRAYS(1).OutletV.P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";
     697                CONDENSER.InletVapour.F = 0 * 'mol/s';
     698                when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on";
    699699
    700700end     
     
    702702CONNECTIONS
    703703#vapor
    704         REBOILER.OutletV        to TRAYS(NumberOfTrays).InletV;
    705         TRAYS(1).OutletV        to CONDENSER.InletV;
     704        REBOILER.OutletVapour   to TRAYS(NumberOfTrays).InletVapour;
     705        TRAYS(1).OutletVapour   to CONDENSER.InletVapour;
    706706
    707707#liquid
    708         CONDENSER.OutletL                               to ACCUMULATOR_TOP.Inlet;       
     708        CONDENSER.OutletLiquid                          to ACCUMULATOR_TOP.Inlet;       
    709709        ACCUMULATOR_TOP.Outlet                  to SPLITTER_TOP.Inlet;
    710710        SPLITTER_TOP.Outlet2                    to PUMP.Inlet; 
    711         PUMP.Outlet                                     to TRAYS(1).InletL;
    712         TRAYS(NumberOfTrays).OutletL    to ACCUMULATOR_BOTTOM.Inlet;
     711        PUMP.Outlet                                     to TRAYS(1).InletLiquid;
     712        TRAYS(NumberOfTrays).OutletLiquid       to ACCUMULATOR_BOTTOM.Inlet;
    713713        ACCUMULATOR_BOTTOM.Outlet               to SPLITTER_BOTTOM.Inlet;
    714         SPLITTER_BOTTOM.Outlet2                 to REBOILER.InletL;
     714        SPLITTER_BOTTOM.Outlet2                 to REBOILER.InletLiquid;
    715715
    716716#Connectors
     
    734734* the Murphree eficiency for each tray Emv;
    735735* the pump head;
    736 * the condenser vapor outlet flow (OutletV.F);
     736* the condenser vapor outlet flow (OutletVapour.F);
    737737* the heat supllied in bottom tank;
    738738* the heat supllied in condenser and reboiler;
     
    740740       
    741741== Initial Conditions ==
    742 * the TRAYS temperature (OutletL.T);
    743 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL.F);
    744 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
    745        
    746 * the condenser temperature (OutletL.T);
     742* the TRAYS temperature (OutletLiquid.T);
     743* the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F);
     744* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray;
     745       
     746* the condenser temperature (OutletLiquid.T);
    747747* the condenser liquid level (Level);
    748 * (NoComps - 1) OutletL (OR OutletV) compositions;
    749        
    750 * the bottom tank temperature (OutletL.T);
     748* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions;
     749       
     750* the bottom tank temperature (OutletLiquid.T);
    751751* the bottom tank liquid level (Level);
    752 * (NoComps - 1) OutletL (OR OutletV) compositions.
     752* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.
    753753";
    754754
     
    834834switch CondenserVapourFlow
    835835                case "on":
    836                 CONDENSER.InletV.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletV.P -
    837                 CONDENSER.OutletL.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
    838                 when CONDENSER.InletV.F < 1e-6 * 'kmol/h' switchto "off";
     836                CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletVapour.P -
     837                CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
     838                when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
    839839               
    840840                case "off":
    841                 CONDENSER.InletV.F = 0 * 'mol/s';
    842                 when TRAYS(1).OutletV.P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";
     841                CONDENSER.InletVapour.F = 0 * 'mol/s';
     842                when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on";
    843843end     
    844844
    845845CONNECTIONS
    846846#vapor
    847         REBOILER.OutletV        to TRAYS(NumberOfTrays).InletV;
    848         TRAYS(1).OutletV                                to CONDENSER.InletV;
     847        REBOILER.OutletVapour   to TRAYS(NumberOfTrays).InletVapour;
     848        TRAYS(1).OutletVapour                           to CONDENSER.InletVapour;
    849849
    850850#liquid
    851         CONDENSER.OutletL               to SPLITTER_TOP.Inlet; 
     851        CONDENSER.OutletLiquid          to SPLITTER_TOP.Inlet; 
    852852        SPLITTER_TOP.Outlet2                            to PUMP.Inlet;
    853         PUMP.Outlet                                     to TRAYS(1).InletL;
    854         TRAYS(NumberOfTrays).OutletL    to ACCUMULATOR_BOTTOM.Inlet;
     853        PUMP.Outlet                                     to TRAYS(1).InletLiquid;
     854        TRAYS(NumberOfTrays).OutletLiquid       to ACCUMULATOR_BOTTOM.Inlet;
    855855        ACCUMULATOR_BOTTOM.Outlet                               to SPLITTER_BOTTOM.Inlet;
    856         SPLITTER_BOTTOM.Outlet2                         to REBOILER.InletL;
     856        SPLITTER_BOTTOM.Outlet2                         to REBOILER.InletLiquid;
    857857
    858858#Connectors
     
    860860ConnectorHeatReboiler                   to REBOILER.InletQ;
    861861ConnectorHeatBottomAccumulator  to ACCUMULATOR_BOTTOM.InletQ;
    862 CONDENSER.OutletV                               to ConnectorCondenserVout;
     862CONDENSER.OutletVapour                          to ConnectorCondenserVout;
    863863SPLITTER_TOP.Outlet1                    to ConnectorSplitterTop;
    864864SPLITTER_BOTTOM.Outlet1                 to ConnectorSplitterBottom;
     
    880880* the heat supllied in the top tank;
    881881* the condenser pressure drop;
    882 * the reboiler liquid outlet flow (OutletL.F);
     882* the reboiler liquid outlet flow (OutletLiquid.F);
    883883* both splitter outlet flows OR one of the splitter outlet flows and the splitter frac.
    884884       
    885885== Initial Conditions ==
    886 * the TRAYS temperature (OutletL.T);
    887 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL.F);
    888 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
    889        
    890 * the top tank temperature (OutletL.T);
     886* the TRAYS temperature (OutletLiquid.T);
     887* the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F);
     888* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray;
     889       
     890* the top tank temperature (OutletLiquid.T);
    891891* the top tank liquid level (Level);
    892 * (NoComps - 1) OutletL (OR OutletV) compositions;
    893        
    894 * the reboiler temperature (OutletL.T);
     892* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions;
     893       
     894* the reboiler temperature (OutletLiquid.T);
    895895* the reboiler liquid level (Level);
    896 * (NoComps - 1) OutletL (OR OutletV) compositions.
     896* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.
    897897";
    898898       
     
    969969        switch CondenserVapourFlow
    970970                case "on":
    971                 CONDENSER.InletV.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletV.P -
    972                 CONDENSER.OutletL.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
    973                 when CONDENSER.InletV.F < 1e-6 * 'kmol/h' switchto "off";
     971                CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletVapour.P -
     972                CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
     973                when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
    974974               
    975975                case "off":
    976                 CONDENSER.InletV.F = 0 * 'mol/s';
    977                 when TRAYS(1).OutletV.P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";
     976                CONDENSER.InletVapour.F = 0 * 'mol/s';
     977                when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on";
    978978end     
    979979
    980980CONNECTIONS
    981981#vapor
    982         REBOILER.OutletV to TRAYS(NumberOfTrays).InletV;
    983         TRAYS(1).OutletV to CONDENSER.InletV;
     982        REBOILER.OutletVapour to TRAYS(NumberOfTrays).InletVapour;
     983        TRAYS(1).OutletVapour to CONDENSER.InletVapour;
    984984
    985985#liquid
    986         CONDENSER.OutletL                               to ACCUMULATOR.Inlet;   
     986        CONDENSER.OutletLiquid                          to ACCUMULATOR.Inlet;   
    987987        ACCUMULATOR.Outlet                                      to SPLITTER.Inlet;
    988988        SPLITTER.Outlet2                        to PUMP.Inlet; 
    989         PUMP.Outlet                                     to TRAYS(1).InletL;
    990         TRAYS(NumberOfTrays).OutletL    to REBOILER.InletL;
     989        PUMP.Outlet                                     to TRAYS(1).InletLiquid;
     990        TRAYS(NumberOfTrays).OutletLiquid       to REBOILER.InletLiquid;
    991991
    992992#Connectors
     
    996996
    997997SPLITTER.Outlet1 to ConnectorSplitterOut;
    998 REBOILER.OutletL        to ConnectorReboilerLout;
     998REBOILER.OutletLiquid   to ConnectorReboilerLout;
    999999
    10001000end
     
    10101010* the feed stream of each tray (Inlet);
    10111011* the Murphree eficiency for each tray Emv;
    1012 * the InletV stream of the bottom tray unless its flow;
     1012* the InletVapour stream of the bottom tray unless its flow;
    10131013* the pump pressure difference;
    10141014* the heat supllied in the condenser;
    1015 * the condenser vapor outlet flow (OutletV.F);
     1015* the condenser vapor outlet flow (OutletVapour.F);
    10161016* both splitter outlet flows OR one of the splitter outlet flows and the splitter frac.
    10171017       
    10181018== Initial Conditions ==
    1019 * the TRAYS temperature (OutletL.T);
    1020 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL.F);
    1021 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
    1022        
    1023 * the condenser temperature (OutletL.T);
     1019* the TRAYS temperature (OutletLiquid.T);
     1020* the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F);
     1021* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray;
     1022       
     1023* the condenser temperature (OutletLiquid.T);
    10241024* the condenser liquid level (Level);
    1025 * (NoComps - 1) OutletL (OR OutletV) compositions;
     1025* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions;
    10261026";
    10271027
     
    10691069
    10701070        case "on":
    1071                 CONDENSER.InletV.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletV.P -
    1072                 CONDENSER.OutletL.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
    1073                 when CONDENSER.InletV.F < 1e-6 * 'kmol/h' switchto "off";
     1071                CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo * Ah * sqrt(2*(TRAYS(1).OutletVapour.P -
     1072                CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
     1073                when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
    10741074               
    10751075        case "off":
    1076                 CONDENSER.InletV.F = 0 * 'mol/s';
    1077                 when TRAYS(1).OutletV.P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";
     1076                CONDENSER.InletVapour.F = 0 * 'mol/s';
     1077                when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on";
    10781078
    10791079end     
     
    10931093        ConnectorSplitterOut.z = LiquidDistillate.z;
    10941094       
    1095         LiquidOutlet.F= TRAYS(NumberOfTrays).OutletL.F;
    1096         LiquidOutlet.T = TRAYS(NumberOfTrays).OutletL.T;
    1097         LiquidOutlet.P = TRAYS(NumberOfTrays).OutletL.P;
    1098         LiquidOutlet.z = TRAYS(NumberOfTrays).OutletL.z;
     1095        LiquidOutlet.F= TRAYS(NumberOfTrays).OutletLiquid.F;
     1096        LiquidOutlet.T = TRAYS(NumberOfTrays).OutletLiquid.T;
     1097        LiquidOutlet.P = TRAYS(NumberOfTrays).OutletLiquid.P;
     1098        LiquidOutlet.z = TRAYS(NumberOfTrays).OutletLiquid.z;
    10991099
    11001100        VapourConnector.F= VapourInlet.F;
     
    11201120CONNECTIONS
    11211121#vapor
    1122         TRAYS(1).OutletV to CONDENSER.InletV;
     1122        TRAYS(1).OutletVapour to CONDENSER.InletVapour;
    11231123
    11241124#liquid
    1125         CONDENSER.OutletL       to SPLITTER.Inlet;     
     1125        CONDENSER.OutletLiquid  to SPLITTER.Inlet;     
    11261126        SPLITTER.Outlet2        to PUMP.Inlet; 
    1127         PUMP.Outlet             to TRAYS(1).InletL;
     1127        PUMP.Outlet             to TRAYS(1).InletLiquid;
    11281128
    11291129#Connectors
    11301130ConnectorHeatCondenser  to CONDENSER.InletQ;
    1131 VapourConnector                 to TRAYS(NumberOfTrays).InletV;
     1131VapourConnector                 to TRAYS(NumberOfTrays).InletVapour;
    11321132SPLITTER.Outlet1                to ConnectorSplitterOut;
    1133 CONDENSER.OutletV               to ConnectorCondenserVout;
     1133CONDENSER.OutletVapour          to ConnectorCondenserVout;
    11341134
    11351135end
     
    11451145* the feed stream of each tray (Inlet);
    11461146* the Murphree eficiency for each tray Emv;
    1147 * the InletV stream of the bottom tray unless its flow;
     1147* the InletVapour stream of the bottom tray unless its flow;
    11481148* the pump head;
    11491149* the condenser pressure drop;
     
    11531153       
    11541154== Initial Conditions ==
    1155 * the TRAYS temperature (OutletL.T);
    1156 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL.F);
    1157 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
    1158        
    1159 * the top tank temperature (OutletL.T);
     1155* the TRAYS temperature (OutletLiquid.T);
     1156* the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F);
     1157* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray;
     1158       
     1159* the top tank temperature (OutletLiquid.T);
    11601160* the top tank liquid level (Level);
    1161 * (NoComps - 1) OutletL (OR OutletV) compositions;
     1161* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions;
    11621162";
    11631163       
     
    12061206        HeatToAccumulator       = ConnectorHeatAccumulator;
    12071207       
    1208         LiquidOutlet.F= TRAYS(NumberOfTrays).OutletL.F;
    1209         LiquidOutlet.T = TRAYS(NumberOfTrays).OutletL.T;
    1210         LiquidOutlet.P = TRAYS(NumberOfTrays).OutletL.P;
    1211         LiquidOutlet.z = TRAYS(NumberOfTrays).OutletL.z;
     1208        LiquidOutlet.F= TRAYS(NumberOfTrays).OutletLiquid.F;
     1209        LiquidOutlet.T = TRAYS(NumberOfTrays).OutletLiquid.T;
     1210        LiquidOutlet.P = TRAYS(NumberOfTrays).OutletLiquid.P;
     1211        LiquidOutlet.z = TRAYS(NumberOfTrays).OutletLiquid.z;
    12121212
    12131213        VapourConnector.F= VapourInlet.F;
     
    12401240
    12411241        case "on":
    1242                 CONDENSER.InletV.F*TRAYS(1).vV = alfaTopo *Ah * sqrt(2*(TRAYS(1).OutletV.P -
    1243                 CONDENSER.OutletL.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
    1244         when CONDENSER.InletV.F < 1e-6 * 'kmol/h' switchto "off";
     1242                CONDENSER.InletVapour.F*TRAYS(1).vV = alfaTopo *Ah * sqrt(2*(TRAYS(1).OutletVapour.P -
     1243                CONDENSER.OutletLiquid.P + 1e-8 * 'atm') / (alfa*TRAYS(1).rhoV));
     1244        when CONDENSER.InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
    12451245               
    12461246        case "off":
    1247                 CONDENSER.InletV.F = 0 * 'mol/s';
    1248         when TRAYS(1).OutletV.P > CONDENSER.OutletL.P + 1e-1 * 'atm' switchto "on";
     1247                CONDENSER.InletVapour.F = 0 * 'mol/s';
     1248        when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-1 * 'atm' switchto "on";
    12491249
    12501250end     
     
    12521252CONNECTIONS
    12531253#vapor
    1254         TRAYS(1).OutletV to CONDENSER.InletV;
     1254        TRAYS(1).OutletVapour to CONDENSER.InletVapour;
    12551255
    12561256#liquid
    1257         CONDENSER.OutletL               to ACCUMULATOR.Inlet;   
     1257        CONDENSER.OutletLiquid          to ACCUMULATOR.Inlet;   
    12581258        ACCUMULATOR.Outlet                                      to SPLITTER.Inlet;
    12591259        SPLITTER.Outlet2                to PUMP.Inlet; 
    1260         PUMP.Outlet                                             to TRAYS(1).InletL;
     1260        PUMP.Outlet                                             to TRAYS(1).InletLiquid;
    12611261
    12621262#Connectors
    1263         VapourConnector                         to TRAYS(NumberOfTrays).InletV;
     1263        VapourConnector                         to TRAYS(NumberOfTrays).InletVapour;
    12641264        ConnectorHeatCondenser                  to CONDENSER.InletQ;
    12651265        SPLITTER.Outlet1        to ConnectorSplitterTop;
     
    12791279* the Murphree eficiency for each tray Emv;
    12801280* the vapour flow leaving the top of the column;
    1281 * the InletL stream of the top tray;
     1281* the InletLiquidiquid stream of the top tray;
    12821282* the heat supllied in the reboiler;
    1283 * the reboiler liquid outlet flow (OutletL.F);
     1283* the reboiler liquid outlet flow (OutletLiquid.F);
    12841284       
    12851285== Initial Conditions ==
    1286 * the TRAYS temperature (OutletL.T);
    1287 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL.F);
    1288 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
    1289        
    1290 * the reboiler temperature (OutletL.T);
     1286* the TRAYS temperature (OutletLiquid.T);
     1287* the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F);
     1288* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray;
     1289       
     1290* the reboiler temperature (OutletLiquid.T);
    12911291* the reboiler liquid level (Level);
    1292 * (NoComps - 1) OutletL (OR OutletV) compositions.
     1292* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.
    12931293";
    12941294
     
    13251325CONNECTIONS
    13261326#vapor
    1327         REBOILER.OutletV to TRAYS(NumberOfTrays).InletV;
     1327        REBOILER.OutletVapour to TRAYS(NumberOfTrays).InletVapour;
    13281328       
    13291329#liquid
    1330         TRAYS(NumberOfTrays).OutletL to REBOILER.InletL;
     1330        TRAYS(NumberOfTrays).OutletLiquid to REBOILER.InletLiquid;
    13311331
    13321332#Connectors
    1333 REBOILER.OutletL                to ConnectorReboilerLout;
    1334 LiquidConnector                 to TRAYS(1).InletL;
     1333REBOILER.OutletLiquid           to ConnectorReboilerLout;
     1334LiquidConnector                 to TRAYS(1).InletLiquid;
    13351335ConnectorHeatReboiler   to REBOILER.InletQ;
    13361336
     
    13461346        LiquidConnector.h = LiquidInlet.h;
    13471347       
    1348         VapourOutlet.F= TRAYS(1).OutletV.F;
    1349         VapourOutlet.T = TRAYS(1).OutletV.T;
    1350         VapourOutlet.P = TRAYS(1).OutletV.P;
    1351         VapourOutlet.z = TRAYS(1).OutletV.z;
     1348        VapourOutlet.F= TRAYS(1).OutletVapour.F;
     1349        VapourOutlet.T = TRAYS(1).OutletVapour.T;
     1350        VapourOutlet.P = TRAYS(1).OutletVapour.P;
     1351        VapourOutlet.z = TRAYS(1).OutletVapour.z;
    13521352       
    13531353# Reboiler Connector Equations
     
    13831383* the Murphree eficiency for each tray (Emv);
    13841384* the vapour flow leaving the top of the column;
    1385 * the InletL stream of the top tray;
     1385* the InletLiquidiquid stream of the top tray;
    13861386* the heat supllied in bottom tank;
    13871387* the heat supllied in the reboiler;
     
    13891389       
    13901390== Initial Conditions ==
    1391 * the TRAYS temperature (OutletL.T);
    1392 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL.F);
    1393 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
    1394 
    1395 * the bottom tank temperature (OutletL.T);
     1391* the TRAYS temperature (OutletLiquid.T);
     1392* the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F);
     1393* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray;
     1394
     1395* the bottom tank temperature (OutletLiquid.T);
    13961396* the bottom tank liquid level (Level);
    1397 * (NoComps - 1) OutletL (OR OutletV) compositions.
     1397* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.
    13981398";
    13991399
     
    14341434CONNECTIONS
    14351435#vapor
    1436         REBOILER.OutletV to TRAYS(NumberOfTrays).InletV;
     1436        REBOILER.OutletVapour to TRAYS(NumberOfTrays).InletVapour;
    14371437       
    14381438#liquid
    1439         TRAYS(NumberOfTrays).OutletL    to ACCUMULATOR.Inlet;
     1439        TRAYS(NumberOfTrays).OutletLiquid       to ACCUMULATOR.Inlet;
    14401440        ACCUMULATOR.Outlet                              to SPLITTER.Inlet;
    1441         SPLITTER.Outlet2                                to REBOILER.InletL;
     1441        SPLITTER.Outlet2                                to REBOILER.InletLiquid;
    14421442
    14431443#Connectors
    1444 LiquidConnector                         to TRAYS(1).InletL;
     1444LiquidConnector                         to TRAYS(1).InletLiquid;
    14451445ConnectorHeatReboiler           to REBOILER.InletQ;
    14461446ConnectorHeatAccumulator        to ACCUMULATOR.InletQ;
     
    14641464        LiquidConnector.h = LiquidInlet.h;
    14651465       
    1466         VapourOutlet.F= TRAYS(1).OutletV.F;
    1467         VapourOutlet.T = TRAYS(1).OutletV.T;
    1468         VapourOutlet.P = TRAYS(1).OutletV.P;
    1469         VapourOutlet.z = TRAYS(1).OutletV.z;
     1466        VapourOutlet.F= TRAYS(1).OutletVapour.F;
     1467        VapourOutlet.T = TRAYS(1).OutletVapour.T;
     1468        VapourOutlet.P = TRAYS(1).OutletVapour.P;
     1469        VapourOutlet.z = TRAYS(1).OutletVapour.z;
    14701470       
    14711471        VapourDrawOff.F*VapSideTrayIndex= TRAYS.VapourSideStream.F;
     
    14971497* the pump pressure difference;
    14981498* the heat supllied in reboiler and condenser;
    1499 * the condenser vapor outlet flow (OutletV.F);
    1500 * the reboiler liquid outlet flow (OutletL.F);
     1499* the condenser vapor outlet flow (OutletVapour.F);
     1500* the reboiler liquid outlet flow (OutletLiquid.F);
    15011501* both splitter outlet flows OR one of the splitter outlet flows and the splitter frac.
    15021502       
    15031503== Initial Conditions ==
    1504 * the TRAYS temperature (OutletL.T);
    1505 * the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletL.F);
    1506 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray;
    1507        
    1508 * the condenser temperature (OutletL.T);
     1504* the TRAYS temperature (OutletLiquid.T);
     1505* the TRAYS liquid level (Level) OR the TRAYS liquid flow (OutletLiquid.F);
     1506* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray;
     1507       
     1508* the condenser temperature (OutletLiquid.T);
    15091509* the condenser liquid level (Level);
    1510 * (NoComps - 1) OutletL (OR OutletV) compositions;
    1511        
    1512 * the reboiler temperature (OutletL.T);
     1510* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions;
     1511       
     1512* the reboiler temperature (OutletLiquid.T);
    15131513* the reboiler liquid level (Level);
    1514 * (NoComps - 1) OutletL (OR OutletV) compositions.
     1514* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.
    15151515";
    15161516       
     
    16231623CONNECTIONS
    16241624#vapor
    1625         REBOILER.OutletV                                        to TRAYS(NumberOfTrays).InletV;
    1626         TRAYS(1).OutletV                                        to CONDENSER.InletV;
    1627         TRAYS([2:NumberOfTrays]).OutletV        to TRAYS([1:NumberOfTrays-1]).InletV;
     1625        REBOILER.OutletVapour                                   to TRAYS(NumberOfTrays).InletVapour;
     1626        TRAYS(1).OutletVapour                                   to CONDENSER.InletVapour;
     1627        TRAYS([2:NumberOfTrays]).OutletVapour   to TRAYS([1:NumberOfTrays-1]).InletVapour;
    16281628
    16291629#liquid
    1630         CONDENSER.OutletL                                       to SPLITTER.Inlet;     
     1630        CONDENSER.OutletLiquid                                  to SPLITTER.Inlet;     
    16311631        SPLITTER.Outlet2                                        to PUMP.Inlet;
    1632         PUMP.Outlet                                             to TRAYS(1).InletL;
    1633         TRAYS([1:NumberOfTrays-1]).OutletL      to TRAYS([2:NumberOfTrays]).InletL;
    1634         TRAYS(NumberOfTrays).OutletL            to REBOILER.InletL;
     1632        PUMP.Outlet                                             to TRAYS(1).InletLiquid;
     1633        TRAYS([1:NumberOfTrays-1]).OutletLiquid         to TRAYS([2:NumberOfTrays]).InletLiquid;
     1634        TRAYS(NumberOfTrays).OutletLiquid               to REBOILER.InletLiquid;
    16351635
    16361636#Connectors
    1637         CONDENSER.OutletV       to ConnectorCondenserVout;
     1637        CONDENSER.OutletVapour  to ConnectorCondenserVout;
    16381638        SPLITTER.Outlet1        to ConnectorSplitterOut;
    1639         REBOILER.OutletL        to ConnectorReboilerLout;
     1639        REBOILER.OutletLiquid   to ConnectorReboilerLout;
    16401640
    16411641INITIAL
     
    16461646
    16471647"The initial temperature of the TRAYS"
    1648         TRAYS(i).OutletL.T = INITIALIZATION.TopTemperature+(INITIALIZATION.BottomTemperature-INITIALIZATION.TopTemperature)*((i-1)/(NumberOfTrays-1));
     1648        TRAYS(i).OutletLiquid.T = INITIALIZATION.TopTemperature+(INITIALIZATION.BottomTemperature-INITIALIZATION.TopTemperature)*((i-1)/(NumberOfTrays-1));
    16491649
    16501650"The initial Level of the TRAYS"
     
    16571657
    16581658"The initial composition of the TRAYS - Normalized"
    1659         TRAYS(j).OutletL.z(i) = INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) +(INITIALIZATION.BottomComposition(i)/sum(INITIALIZATION.BottomComposition)-INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) )*((j-1)/(NumberOfTrays-1));
     1659        TRAYS(j).OutletLiquid.z(i) = INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) +(INITIALIZATION.BottomComposition(i)/sum(INITIALIZATION.BottomComposition)-INITIALIZATION.TopComposition(i)/sum(INITIALIZATION.TopComposition) )*((j-1)/(NumberOfTrays-1));
    16601660end
    16611661
     
    16671667
    16681668"Murphree Efficiency"
    1669         TRAYS(i).OutletV.z =  MurphreeEff * (TRAYS(i).yideal - TRAYS(i).InletV.z) + TRAYS(i).InletV.z;
     1669        TRAYS(i).OutletVapour.z =  MurphreeEff * (TRAYS(i).yideal - TRAYS(i).InletVapour.z) + TRAYS(i).InletVapour.z;
    16701670       
    16711671"Energy Holdup"
    1672         TRAYS(i).E = TRAYS(i).ML*TRAYS(i).OutletL.h + TRAYS(i).MV*TRAYS(i).OutletV.h - TRAYS(i).OutletL.P*V;
     1672        TRAYS(i).E = TRAYS(i).ML*TRAYS(i).OutletLiquid.h + TRAYS(i).MV*TRAYS(i).OutletVapour.h - TRAYS(i).OutletLiquid.P*V;
    16731673
    16741674"Component Molar Balance"
    1675         diff(TRAYS(i).M)=TRAYS(i).Inlet.F*TRAYS(i).Inlet.z + TRAYS(i).InletL.F*TRAYS(i).InletL.z + TRAYS(i).InletV.F*TRAYS(i).InletV.z- TRAYS(i).OutletL.F*TRAYS(i).OutletL.z - TRAYS(i).OutletV.F*TRAYS(i).OutletV.z-
     1675        diff(TRAYS(i).M)=TRAYS(i).Inlet.F*TRAYS(i).Inlet.z + TRAYS(i).InletLiquid.F*TRAYS(i).InletLiquid.z + TRAYS(i).InletVapour.F*TRAYS(i).InletVapour.z- TRAYS(i).OutletLiquid.F*TRAYS(i).OutletLiquid.z - TRAYS(i).OutletVapour.F*TRAYS(i).OutletVapour.z-
    16761676        TRAYS(i).LiquidSideStream.F*TRAYS(i).LiquidSideStream.z-TRAYS(i).VapourSideStream.F*TRAYS(i).VapourSideStream.z + stoic*TRAYS(i).r3*TRAYS(i).ML*TRAYS(i).vL;
    16771677       
    16781678"Energy Balance"
    1679         diff(TRAYS(i).E) = ( TRAYS(i).Inlet.F*TRAYS(i).Inlet.h + TRAYS(i).InletL.F*TRAYS(i).InletL.h + TRAYS(i).InletV.F*TRAYS(i).InletV.h- TRAYS(i).OutletL.F*TRAYS(i).OutletL.h - TRAYS(i).OutletV.F*TRAYS(i).OutletV.h
     1679        diff(TRAYS(i).E) = ( TRAYS(i).Inlet.F*TRAYS(i).Inlet.h + TRAYS(i).InletLiquid.F*TRAYS(i).InletLiquid.h + TRAYS(i).InletVapour.F*TRAYS(i).InletVapour.h- TRAYS(i).OutletLiquid.F*TRAYS(i).OutletLiquid.h - TRAYS(i).OutletVapour.F*TRAYS(i).OutletVapour.h
    16801680        -TRAYS(i).VapourSideStream.F*TRAYS(i).VapourSideStream.h - TRAYS(i).LiquidSideStream.F*TRAYS(i).LiquidSideStream.h + Q ) + Hr * TRAYS(i).r3 *TRAYS(i). vL*TRAYS(i).ML;
    16811681
     
    16911691                case "on":
    16921692                "Pressure Drop through the condenser"
    1693                 CONDENSER.InletV.F*TRAYS(1).vV / 'm^2' =
    1694                         sqrt((TRAYS(1).OutletV.P - CONDENSER.OutletL.P + 1e-8 * 'atm')/(TRAYS(1).rhoV*alfacond));
    1695                 when TRAYS(1).OutletV.P < CONDENSER.OutletL.P switchto "off";
     1693                CONDENSER.InletVapour.F*TRAYS(1).vV / 'm^2' =
     1694                        sqrt((TRAYS(1).OutletVapour.P - CONDENSER.OutletLiquid.P + 1e-8 * 'atm')/(TRAYS(1).rhoV*alfacond));
     1695                when TRAYS(1).OutletVapour.P < CONDENSER.OutletLiquid.P switchto "off";
    16961696               
    16971697                case "off":
    16981698                "Prato selado"
    1699                 CONDENSER.InletV.F = 0.0 * 'mol/s';
    1700                 when TRAYS(1).OutletV.P > CONDENSER.OutletL.P + 1e-3 * 'atm' switchto "on";
     1699                CONDENSER.InletVapour.F = 0.0 * 'mol/s';
     1700                when TRAYS(1).OutletVapour.P > CONDENSER.OutletLiquid.P + 1e-3 * 'atm' switchto "on";
    17011701        end
    17021702
     
    17061706                case "on":
    17071707                "Francis Equation"
    1708                 TRAYS(i).OutletL.F*TRAYS(i).vL = 1.84*'1/s'*lw*((TRAYS(i).Level-(beta*hw)+1e-6*'m')/(beta))^2;
     1708                TRAYS(i).OutletLiquid.F*TRAYS(i).vL = 1.84*'1/s'*lw*((TRAYS(i).Level-(beta*hw)+1e-6*'m')/(beta))^2;
    17091709                when TRAYS(i).Level < (beta * hw) switchto "off";
    17101710               
    17111711                case "off":
    17121712                "Low level"
    1713                 TRAYS(i).OutletL.F = 0 * 'mol/h';
     1713                TRAYS(i).OutletLiquid.F = 0 * 'mol/h';
    17141714                when TRAYS(i).Level > (beta * hw) + 1e-6*'m' switchto "on";
    17151715        end
     
    17171717        switch TrayVapourFlow
    17181718                case "on":
    1719                 TRAYS(i).InletV.F*TRAYS(i).vV = sqrt((TRAYS(i).InletV.P - TRAYS(i).OutletV.P - TRAYS(i).Level*g*TRAYS(i).rhoL + 1e-8 * 'atm')/(TRAYS(i).rhoV*alfa))*Ah;
    1720                 when TRAYS(i).InletV.P < TRAYS(i).OutletV.P + TRAYS(i).Level*g*TRAYS(i).rhoL switchto "off";
     1719                TRAYS(i).InletVapour.F*TRAYS(i).vV = sqrt((TRAYS(i).InletVapour.P - TRAYS(i).OutletVapour.P - TRAYS(i).Level*g*TRAYS(i).rhoL + 1e-8 * 'atm')/(TRAYS(i).rhoV*alfa))*Ah;
     1720                when TRAYS(i).InletVapour.P < TRAYS(i).OutletVapour.P + TRAYS(i).Level*g*TRAYS(i).rhoL switchto "off";
    17211721               
    17221722                case "off":
    1723                 TRAYS(i).InletV.F = 0 * 'mol/s';
    1724                 when TRAYS(i).InletV.P > TRAYS(i).OutletV.P + TRAYS(i).Level*g*TRAYS(i).rhoL + 3e-2 * 'atm' switchto "on";
     1723                TRAYS(i).InletVapour.F = 0 * 'mol/s';
     1724                when TRAYS(i).InletVapour.P > TRAYS(i).OutletVapour.P + TRAYS(i).Level*g*TRAYS(i).rhoL + 3e-2 * 'atm' switchto "on";
    17251725        end
    17261726
     
    17391739
    17401740"Reboiler Temperature indicator"
    1741         TRI * 'K' = REBOILER.OutletL.T;
     1741        TRI * 'K' = REBOILER.OutletLiquid.T;
    17421742
    17431743"Reboiler Level indicator"
     
    17451745
    17461746"Condenser Temperature indicator"
    1747         TCI * 'K' = CONDENSER.OutletL.T;
     1747        TCI * 'K' = CONDENSER.OutletLiquid.T;
    17481748
    17491749"Condenser Level indicator"
     
    17941794== Specify ==
    17951795* the feed stream of each tray (Inlet);
    1796 * the InletL stream of the top tray;
    1797 * the InletV stream of the bottom tray;
     1796* the InletLiquid stream of the top tray;
     1797* the InletVapour stream of the bottom tray;
    17981798* the total pressure drop (dP) of the section.
    17991799       
    18001800== Initial Conditions ==
    1801 * the stages temperature (OutletL.T);
     1801* the stages temperature (OutletLiquid.T);
    18021802* the stages liquid holdup;
    1803 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray.
     1803* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray.
    18041804";
    18051805       
     
    18441844CONNECTIONS
    18451845
    1846         STAGES([2:NumberOfStages]).OutletV              to STAGES([1:NumberOfStages-1]).InletV;
    1847         STAGES([1:NumberOfStages-1]).OutletL    to STAGES([2:NumberOfStages]).InletL;
     1846        STAGES([2:NumberOfStages]).OutletVapour                 to STAGES([1:NumberOfStages-1]).InletVapour;
     1847        STAGES([1:NumberOfStages-1]).OutletLiquid       to STAGES([2:NumberOfStages]).InletLiquid;
    18481848
    18491849EQUATIONS
     
    18611861
    18621862"Energy Balance"
    1863         diff(STAGES(i).E) = ( STAGES(i).Inlet.F*STAGES(i).Inlet.h + STAGES(i).InletL.F*STAGES(i).InletL.h + STAGES(i).InletV.F*STAGES(i).InletV.h- STAGES(i).OutletL.F*STAGES(i).OutletL.h
    1864         - STAGES(i).OutletV.F*STAGES(i).OutletV.h + HeatSupply );
     1863        diff(STAGES(i).E) = ( STAGES(i).Inlet.F*STAGES(i).Inlet.h + STAGES(i).InletLiquid.F*STAGES(i).InletLiquid.h + STAGES(i).InletVapour.F*STAGES(i).InletVapour.h- STAGES(i).OutletLiquid.F*STAGES(i).OutletLiquid.h
     1864        - STAGES(i).OutletVapour.F*STAGES(i).OutletVapour.h + HeatSupply );
    18651865       
    18661866"Energy Holdup"
    1867         STAGES(i).E = STAGES(i).ML*STAGES(i).OutletL.h + STAGES(i).MV*STAGES(i).OutletV.h - STAGES(i).OutletL.P*V;
     1867        STAGES(i).E = STAGES(i).ML*STAGES(i).OutletLiquid.h + STAGES(i).MV*STAGES(i).OutletVapour.h - STAGES(i).OutletLiquid.P*V;
    18681868       
    18691869"Geometry Constraint"
     
    18711871       
    18721872"Volume flow rate of vapor, m^3/m^2/s"
    1873         STAGES(i).uV * ((ColumnArea)*VoidFraction - STAGES(i).Al) = STAGES(i).OutletV.F * STAGES(i).vV;
     1873        STAGES(i).uV * ((ColumnArea)*VoidFraction - STAGES(i).Al) = STAGES(i).OutletVapour.F * STAGES(i).vV;
    18741874       
    18751875"Liquid holdup"
     
    19011901
    19021902"The initial temperature of the STAGES"
    1903         STAGES(i).OutletL.T = INITIALIZATION.TopStageTemperature+(INITIALIZATION.BottomStageTemperature-INITIALIZATION.TopStageTemperature)*((i-1)/(NumberOfStages-1));
     1903        STAGES(i).OutletLiquid.T = INITIALIZATION.TopStageTemperature+(INITIALIZATION.BottomStageTemperature-INITIALIZATION.TopStageTemperature)*((i-1)/(NumberOfStages-1));
    19041904
    19051905"The Liquid Holdup of the STAGES"
     
    19131913
    19141914"The initial composition of the TRAYS"
    1915         STAGES(j).OutletL.z(i) = INITIALIZATION.TopStageComposition(i)/sum(INITIALIZATION.TopStageComposition) +(INITIALIZATION.BottomStageComposition(i)/sum(INITIALIZATION.BottomStageComposition)-INITIALIZATION.TopStageComposition(i)/sum(INITIALIZATION.TopStageComposition) )*((j-1)/(NumberOfStages-1));
     1915        STAGES(j).OutletLiquid.z(i) = INITIALIZATION.TopStageComposition(i)/sum(INITIALIZATION.TopStageComposition) +(INITIALIZATION.BottomStageComposition(i)/sum(INITIALIZATION.BottomStageComposition)-INITIALIZATION.TopStageComposition(i)/sum(INITIALIZATION.TopStageComposition) )*((j-1)/(NumberOfStages-1));
    19161916
    19171917end
     
    19331933== Specify ==
    19341934* the feed stream of each tray (Inlet);
    1935 * the InletL stream of the top tray;
    1936 * the InletV stream of the bottom tray;
     1935* the InletLiquid stream of the top tray;
     1936* the InletVapour stream of the bottom tray;
    19371937* the total pressure drop (dP) of the section.
    19381938       
    19391939== Initial Conditions ==
    1940 * the stages temperature (OutletL.T);
     1940* the stages temperature (OutletLiquid.T);
    19411941* the stages liquid holdup;
    1942 * (NoComps - 1) OutletL (OR OutletV) compositions for each tray.
     1942* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray.
    19431943";
    19441944
     
    19561956CONNECTIONS
    19571957
    1958         LiquidConnector to STAGES(1).InletL;
    1959         VapourConnector to STAGES(NumberOfStages).InletV;
     1958        LiquidConnector to STAGES(1).InletLiquid;
     1959        VapourConnector to STAGES(NumberOfStages).InletVapour;
    19601960       
    19611961EQUATIONS
     
    19751975        VapourConnector.h = VapourInlet.h;
    19761976       
    1977         LiquidOutlet.F= STAGES(NumberOfStages).OutletL.F;
    1978         LiquidOutlet.T = STAGES(NumberOfStages).OutletL.T;
    1979         LiquidOutlet.P = STAGES(NumberOfStages).OutletL.P;
    1980         LiquidOutlet.z = STAGES(NumberOfStages).OutletL.z;
    1981        
    1982         VapourOutlet.F= STAGES(1).OutletV.F;
    1983         VapourOutlet.T = STAGES(1).OutletV.T;
    1984         VapourOutlet.P = STAGES(1).OutletV.P;
    1985         VapourOutlet.z = STAGES(1).OutletV.z;
     1977        LiquidOutlet.F= STAGES(NumberOfStages).OutletLiquid.F;
     1978        LiquidOutlet.T = STAGES(NumberOfStages).OutletLiquid.T;
     1979        LiquidOutlet.P = STAGES(NumberOfStages).OutletLiquid.P;
     1980        LiquidOutlet.z = STAGES(NumberOfStages).OutletLiquid.z;
     1981       
     1982        VapourOutlet.F= STAGES(1).OutletVapour.F;
     1983        VapourOutlet.T = STAGES(1).OutletVapour.T;
     1984        VapourOutlet.P = STAGES(1).OutletVapour.P;
     1985        VapourOutlet.z = STAGES(1).OutletVapour.z;
    19861986
    19871987end
     
    19981998* the total pressure drop (dP) of the packing;
    19991999* the heat supllied in reboiler and condenser;
    2000 * the condenser vapor outlet flow (OutletV.F);
    2001 * the reboiler liquid outlet flow (OutletL.F);
     2000* the condenser vapor outlet flow (OutletVapour.F);
     2001* the reboiler liquid outlet flow (OutletLiquid.F);
    20022002* both splitter outlet flows OR one of the splitter outlet flows and the splitter frac.
    20032003       
    20042004== Initial Conditions ==
    2005 * the stages temperature (OutletL.T);
     2005* the stages temperature (OutletLiquid.T);
    20062006* the stages initial molar holdup;
    2007 * (NoComps - 1) OutletL (OR OutletV) compositions for each stage;
    2008        
    2009 * the condenser temperature (OutletL.T);
     2007* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each stage;
     2008       
     2009* the condenser temperature (OutletLiquid.T);
    20102010* the condenser liquid level (Level);
    2011 * (NoComps - 1) OutletL (OR OutletV) compositions;
    2012        
    2013 * the reboiler temperature (OutletL.T);
     2011* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions;
     2012       
     2013* the reboiler temperature (OutletLiquid.T);
    20142014* the reboiler liquid level (Level);
    2015 * (NoComps - 1) OutletL (OR OutletV) compositions.
     2015* (NoComps - 1) OutletLiquid (OR OutletVapour) compositions.
    20162016";
    20172017       
     
    20512051
    20522052#vapor
    2053         REBOILER.OutletV                to STAGES(NumberOfStages).InletV;
    2054         STAGES(1).OutletV               to CONDENSER.InletV;
     2053        REBOILER.OutletVapour           to STAGES(NumberOfStages).InletVapour;
     2054        STAGES(1).OutletVapour          to CONDENSER.InletVapour;
    20552055
    20562056#liquid
    2057         CONDENSER.OutletL                               to SPLITTER.Inlet;     
     2057        CONDENSER.OutletLiquid                          to SPLITTER.Inlet;     
    20582058        SPLITTER.Outlet2                                to PUMP.Inlet;
    2059         PUMP.Outlet                                     to STAGES(1).InletL;
    2060         STAGES(NumberOfStages).OutletL  to REBOILER.InletL;
     2059        PUMP.Outlet                                     to STAGES(1).InletLiquid;
     2060        STAGES(NumberOfStages).OutletLiquid     to REBOILER.InletLiquid;
    20612061
    20622062#Connectors
     
    20642064ConnectorHeatCondenser  to CONDENSER.InletQ;
    20652065
    2066 CONDENSER.OutletV               to ConnectorCondenserVout;
     2066CONDENSER.OutletVapour          to ConnectorCondenserVout;
    20672067SPLITTER.Outlet1                to ConnectorSplitterOut;
    2068 REBOILER.OutletL                to ConnectorReboilerLout;
     2068REBOILER.OutletLiquid           to ConnectorReboilerLout;
    20692069
    20702070EQUATIONS
     
    20922092switch VapourFlow
    20932093        case "on":
    2094                 STAGES(NumberOfStages).InletV.F*STAGES(NumberOfStages).vV = sqrt((REBOILER.OutletV.P - STAGES(NumberOfStages).OutletV.P)/
     2094                STAGES(NumberOfStages).InletVapour.F*STAGES(NumberOfStages).vV = sqrt((REBOILER.OutletVapour.P - STAGES(NumberOfStages).OutletVapour.P)/
    20952095                                        (STAGES(NumberOfStages).rhoV*ResistanceCoeff*20))*(ColumnArea*VoidFraction - STAGES(NumberOfStages).Al);
    2096                 when STAGES(NumberOfStages).InletV.F < 1e-6 * 'kmol/h' switchto "off";
     2096                when STAGES(NumberOfStages).InletVapour.F < 1e-6 * 'kmol/h' switchto "off";
    20972097
    20982098        case "off":
    2099                 STAGES(NumberOfStages).InletV.F = 0 * 'mol/s';
    2100                 when REBOILER.OutletV.P > STAGES(NumberOfStages).OutletV.P + 1e-1 * 'atm' switchto "on";
    2101 end
    2102 
    2103 end
    2104 
     2099                STAGES(NumberOfStages).InletVapour.F = 0 * 'mol/s';
     2100                when REBOILER.OutletVapour.P > STAGES(NumberOfStages).OutletVapour.P + 1e-1 * 'atm' switchto "on";
     2101end
     2102
     2103end
     2104
Note: See TracChangeset for help on using the changeset viewer.