Changeset 448


Ignore:
Timestamp:
Jan 22, 2008, 3:14:11 PM (16 years ago)
Author:
Paula Bettio Staudt
Message:

Temporary tray files

Location:
branches/packed
Files:
4 edited

Legend:

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

    r398 r448  
    12611261       
    12621262end
     1263
     1264
     1265Model Section_Column_Packed
     1266        ATTRIBUTES
     1267        Pallete         = true;
     1268        Icon            = "icon/SectionColumn";
     1269        Brief           = "Model of a column section.";
     1270        Info            =
     1271"== Model of a column section containing ==
     1272* NTrays trays.
     1273       
     1274== Specify ==
     1275* the feed stream of each tray (Inlet);
     1276* the Murphree eficiency for each tray Emv;
     1277* the InletL stream of the top tray;
     1278* the InletV stream of the bottom tray.
     1279       
     1280== Initial Conditions ==
     1281* the trays temperature (OutletL.T);
     1282* the trays liquid level (Level) OR the trays liquid flow (OutletL.F);
     1283* (NoComps - 1) OutletL (OR OutletV) compositions for each tray.
     1284";
     1285       
     1286        PARAMETERS
     1287        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
     1288        outer NComp as Integer;
     1289        NTrays as Integer(Brief="Number of trays", Default=2);
     1290        topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1);
     1291        top as Integer(Brief="Number of top tray");
     1292        bot as Integer(Brief="Number of bottom tray");
     1293
     1294        SET
     1295        top = (NTrays-1)*(1-topdown)/2+1;
     1296        bot = NTrays/top;
     1297       
     1298        VARIABLES
     1299        stage(NTrays) as packedStage;
     1300
     1301        CONNECTIONS
     1302        stage([top+topdown:topdown:bot]).OutletV to stage([top:topdown:bot-topdown]).InletV;
     1303        stage([top:topdown:bot-topdown]).OutletL to stage([top+topdown:topdown:bot]).InletL;
     1304end
     1305
  • branches/packed/eml/stage_separators/tray.mso

    r436 r448  
    169169end
    170170
     171Model packedStage as trayBasic
     172        PARAMETERS
     173        PPwater as Plugin(Brief="Physical Properties",
     174                Type="PP",
     175                Components = [ "water" ],
     176                LiquidModel = "PR",
     177                VapourModel = "PR"
     178        );
     179       
     180#       PackingType as Switcher(Valid = ["random", "structured"], Default = "randon");
     181#       PressureDropModel as Switcher(Valid = ["Leva", "Prahl"], Default = "Prahl");
     182
     183        a as Real (Brief="Constant used in Leva equation", Default=873.55);
     184        b as Real (Brief="Constant used in Leva equation", Default=0.058);
     185#       Fp as Real (Brief="Packing factor", Default = 300);
     186        e as fraction (Brief="Packing Porosity", Default=0.84);
     187        dp as length (Brief="Packing Dimension", Default=0.013);
     188#       C as Real (Brief="Prahl method constant", Unit = 'kg^0.2*m^1.8/s^2.2', Default = 2.994);
     189
     190#       S as length (Brief="Structured packing parameter", Default=0.009);
     191#       teta as Real (Brief="Structured packing parameter", Unit= 'deg', Default=45);
     192#       C3 as Real (Brief="Structured packing parameter", Default=3.38);
     193
     194        Across as area (Brief="Tower cross section area");
     195        Mw(NComp)       as molweight    (Brief = "Component Mol Weight");
     196        g as acceleration (Default=9.81);
     197
     198        SET
     199        Mw = PP.MolecularWeight();
     200        Ap = Across;
     201       
     202        VARIABLES
     203        rhoL as dens_mass (Brief="Liquid density");
     204        rhoV as dens_mass (Brief="Vapor density");
     205        viscL as viscosity (Brief="Liquid Viscosity");
     206#       viscV as viscosity (Brief="Vapor Viscosity");
     207        rhow as dens_mass (Brief="Water density");
     208        visclw as viscosity (Brief="Water viscosity");
     209       
     210        L as flux_mass (Brief="Liquid mass flux");
     211        G as flux_mass (Brief="Liquid mass flux");
     212        Llin as flux_mass (Brief="Water contribution on liquid mass flux");
     213#       X as Real (Brief="Term in Prahl correlation");
     214#       Y as Real (Brief="Term in Prahl correlation");
     215#       Reg as Real (Brief="Packing Reynolds");
     216#       Ge as velocity (Brief="Temporay variable");
     217#       Fr as Real (Brief="Froud number");
     218        phiL as Real (Brief="Liquid holdup in packed towers");
     219       
     220#       deltaP_z as Real (Unit = 'inH2O/ft');
     221       
     222        EQUATIONS
     223#       deltaP_z = (InletV.P - OutletV.P) / (V/Across);
     224       
     225        "If the liquid is not water - mass flux correction"
     226        Llin = L * rhow/rhoL;
     227       
     228        "Base unit conversion (mol -> mass)"
     229        L = OutletL.F*sum(Mw*OutletL.z)/Across;
     230        G = OutletV.F*sum(Mw*OutletV.z)/Across;
     231       
     232#       "X in Prahl correlation"
     233#       X * G = L * (rhoV/rhoL)^0.5;
     234       
     235#       "Y in Prahl correlation"
     236#       Y = G^2 * Fp * (rhow/rhoL) * viscL^0.2 / (rhoV*rhoL*C) ;
     237       
     238        "Water Liquid Viscosity"
     239        visclw = PPwater.LiquidViscosity(OutletL.T, OutletL.P, 1);
     240        "Water Liquid Density"
     241        rhow = PPwater.LiquidDensity(OutletL.T, OutletL.P, 1);
     242        "Liquid Viscosity"
     243        viscL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z);
     244#       "Vapor Viscosity"
     245#       viscV = PP.VapourViscosity(OutletV.T, OutletV.P, OutletV.z);
     246        "Liquid Density"
     247        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
     248        "Vapour Density"
     249        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
     250       
     251#       "Froud number"
     252#       Fr = (L/rhoL)^2 / S/g;
     253#       "Reynolds number"
     254#       Reg = S*(G/rhoV/(e*sin(teta)))*rhoV/viscV;
     255#       "Temporary variable"
     256#       Ge = G/rhoV /(e*sin(teta));
     257        "Conversion from ML to phiL"
     258        phiL = ML*vL / V;
     259
     260#       switch PackingType
     261#               case "random":
     262#                       switch PressureDropModel
     263#                               case "Leva":
     264                                        (InletV.P - OutletV.P)/'Pa' / (V/'m^3'/(Across/'m^2') ) = a * 10^(b*Llin/'kg/m^2/s') * (G/('kg/m^2/s'))^2/(rhoV/('kg/m^3'));
     265                                        #(InletV.P - OutletV.P) / (V/(Across) ) =  a * 10^(b*Llin) * (G)^2/(rhoV);
     266#                               case "Prahl":
     267#                                       (InletV.P - OutletV.P)/'0.03937*inH2O' = (V/Across)/'m' * Y*(1116*X+500)/(1-Y*(35*X+3));
     268#                       end
     269                        phiL = (1.53e-4 + (2.9e-5*e*(dp*L/(viscL*e))^0.66 * (viscL/visclw)^0.75)) * (dp/'m')^(-1.2);
     270#*              case "structured":
     271                        (InletV.P - OutletV.P)/'Pa'= (V/Across)/'m' * ( (0.171 + 92.7/Reg) * (rhoV/('kg/m^3')*(Ge/('m/s'))^2/(S/'m')) )
     272                                                   * (1/(1-C3 * sqrt(Fr) ))^5;
     273               
     274                        phiL = C3 * sqrt(Fr);
     275        end
     276*#
     277end
     278
    171279#*-------------------------------------------------------------------
    172280* Model of a tray with reaction
     
    323431        V = ML* vL + MV*vV;
    324432end
    325 
    326 Model packedStage1 as trayBasic
    327 #it's not working....initialization problems.
    328         PARAMETERS
    329         PPwater as Plugin(Brief="Physical Properties",
    330                 Type="PP",
    331                 Components = [ "water" ],
    332                 LiquidModel = "PR",
    333                 VapourModel = "PR"
    334         );
    335        
    336         PackingType as Switcher(Valid = ["random", "structured"], Default = "randon");
    337         PressureDropModel as Switcher(Valid = ["Leva", "Prahl"], Default = "Prahl");
    338 
    339         a as Real (Brief="Constant used in Leva equation", Unit='1/m', Default=873.55);
    340         b as Real (Brief="Constant used in Leva equation", Unit='m^2*s/kg', Default=0.058);
    341         Fp as Real (Brief="Packing factor", Default = 300);
    342         e as fraction (Brief="Packing Porosity", Default=0.84);
    343         dp as length (Brief="Packing Dimension", Default=0.013);
    344         C as Real (Brief="Prahl method constant", Unit = 'kg^0.2*m^1.8/s^2.2', Default = 2.994);
    345 
    346         S as length (Brief="Structured packing parameter", Default=0.009);
    347         teta as Real (Brief="Structured packing parameter", Unit= 'deg', Default=45);
    348         C3 as Real (Brief="Structured packing parameter", Default=3.38);
    349 
    350         Across as area (Brief="Tower cross section area");
    351         Mw(NComp)       as molweight    (Brief = "Component Mol Weight");
    352         g as acceleration (Default=9.81);
    353 
    354         SET
    355         Mw = PP.MolecularWeight();
    356 
    357         VARIABLES
    358         rhoL as dens_mass (Brief="Liquid density");
    359         rhoV as dens_mass (Brief="Vapor density");
    360         viscL as viscosity (Brief="Liquid Viscosity");
    361         viscV as viscosity (Brief="Vapor Viscosity");
    362         rhow as dens_mass (Brief="Water density");
    363         visclw as viscosity (Brief="Water viscosity");
    364        
    365         L as flux_mass (Brief="Liquid mass flux");
    366         G as flux_mass (Brief="Liquid mass flux");
    367         Llin as flux_mass (Brief="Water contribution on liquid mass flux");
    368         X as Real (Brief="Term in Prahl correlation");
    369         Y as Real (Brief="Term in Prahl correlation");
    370         Reg as Real (Brief="Packing Reynolds");
    371         Ge as velocity (Brief="Temporay variable");
    372         Fr as Real (Brief="Froud number");
    373         phiL as Real (Brief="Liquid holdup in packed towers");
    374 
    375         EQUATIONS
    376         "If the liquid is not water - mass flux correction"
    377         Llin = L * rhow/rhoL;
    378        
    379         "Base unit conversion"
    380         L = OutletL.F*sum(Mw)/Across;
    381         G = OutletV.F*sum(Mw)/Across;
    382        
    383         "X in Prahl correlation"
    384         X * G = L * (rhoV/rhoL)^0.5;
    385        
    386         "Y in Prahl correlation"
    387         Y = G^2 * Fp * (rhow/rhoL) * viscL^0.2 / (rhoV*rhoL*C) ;
    388        
    389         "Water Liquid Viscosity"
    390         visclw = PPwater.LiquidViscosity(OutletL.T, OutletL.P, 1);
    391         "Water Liquid Density"
    392         rhow = PPwater.LiquidDensity(OutletL.T, OutletL.P, 1);
    393         "Liquid Viscosity"
    394         viscL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z);
    395         "Vapor Viscosity"
    396         viscV = PP.VapourViscosity(OutletV.T, OutletV.P, OutletV.z);
    397         "Liquid Density"
    398         rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
    399         "Vapour Density"
    400         rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
    401        
    402         "Froud number"
    403         Fr = (L/rhoL)^2 / S/g;
    404         "Reynolds number"
    405         Reg = S*(G/rhoV/(e*sin(teta)))*rhoV/viscV;
    406         "Temporary variable"
    407         Ge = G/rhoV /(e*sin(teta));
    408         "Conversion from ML to phiL"
    409         phiL = ML*vL / V;
    410 
    411         switch PackingType
    412                 case "random":
    413                         switch PressureDropModel
    414                                 case "Leva":
    415                                         (InletV.P - OutletV.P) = (V/Across) * a * 10^(b*Llin) * G^2/rhoV;
    416                                 case "Prahl":
    417                                         (InletV.P - OutletV.P)/'0.101972*Pa' = (V/Across)/'m' * Y*(1116*X+500)/(1-Y*(35*X+3));
    418                         end
    419                         phiL = (1.53e-4 + 2.9e-5 * e * (dp * L/viscL/e)^0.66 * (viscL/visclw)^0.75) * (dp/'m')^(-1.2);
    420                
    421                 case "structured":
    422                         (InletV.P - OutletV.P) = (V/Across) * (0.171 + 92.7/Reg)*(rhoV*(Ge)^2 / S)
    423                                                    * (1/(1-C3 * Fr^0.5))^5;
    424                
    425                         phiL = C3 * Fr^0.5;
    426         end
    427 
    428 #       OutletL.F = 220 * 'kmol/h';
    429 #       OutletV.F = 150 * 'kmol/h';
    430 end
    431 
    432 Model packedStage2 as trayBasic
    433         PARAMETERS
    434         PPwater as Plugin(Brief="Physical Properties",
    435                 Type="PP",
    436                 Components = [ "water" ],
    437                 LiquidModel = "PR",
    438                 VapourModel = "PR"
    439         );
    440        
    441         PackingType as Switcher(Valid = ["random", "structured"], Default = "randon");
    442         PressureDropModel as Switcher(Valid = ["Leva", "Prahl"], Default = "Prahl");
    443 
    444         a as Real (Brief="Constant used in Leva equation", Default=873.55);
    445         b as Real (Brief="Constant used in Leva equation", Default=0.058);
    446         Fp as Real (Brief="Packing factor", Default = 300);
    447         e as fraction (Brief="Packing Porosity", Default=0.84);
    448         dp as length (Brief="Packing Dimension", Default=0.013);
    449         C as Real (Brief="Prahl method constant", Unit = 'kg^0.2*m^1.8/s^2.2', Default = 2.994);
    450 
    451         S as length (Brief="Structured packing parameter", Default=0.009);
    452         teta as Real (Brief="Structured packing parameter", Unit= 'deg', Default=45);
    453         C3 as Real (Brief="Structured packing parameter", Default=3.38);
    454 
    455         Across as area (Brief="Tower cross section area");
    456         Mw(NComp)       as molweight    (Brief = "Component Mol Weight");
    457         g as acceleration (Default=9.81);
    458 
    459         SET
    460         Mw = PP.MolecularWeight();
    461 
    462         VARIABLES
    463         rhoL as dens_mass (Brief="Liquid density");
    464         rhoV as dens_mass (Brief="Vapor density");
    465         viscL as viscosity (Brief="Liquid Viscosity");
    466         viscV as viscosity (Brief="Vapor Viscosity");
    467         rhow as dens_mass (Brief="Water density");
    468         visclw as viscosity (Brief="Water viscosity");
    469        
    470         L as flux_mass (Brief="Liquid mass flux");
    471         G as flux_mass (Brief="Liquid mass flux");
    472         Llin as flux_mass (Brief="Water contribution on liquid mass flux");
    473         X as Real (Brief="Term in Prahl correlation");
    474         Y as Real (Brief="Term in Prahl correlation");
    475         Reg as Real (Brief="Packing Reynolds");
    476         Ge as velocity (Brief="Temporay variable");
    477         Fr as Real (Brief="Froud number");
    478         phiL as Real (Brief="Liquid holdup in packed towers");
    479        
    480         deltaP_z as Real (Unit = 'inH2O/ft');
    481        
    482         EQUATIONS
    483         deltaP_z = (InletV.P - OutletV.P) / (V/Across);
    484        
    485         "If the liquid is not water - mass flux correction"
    486         Llin = L * rhow/rhoL;
    487        
    488         "Base unit conversion (mol -> mass)"
    489         L = OutletL.F*sum(Mw*OutletL.z)/Across;
    490         G = OutletV.F*sum(Mw*OutletV.z)/Across;
    491        
    492         "X in Prahl correlation"
    493         X * G = L * (rhoV/rhoL)^0.5;
    494        
    495         "Y in Prahl correlation"
    496         Y = G^2 * Fp * (rhow/rhoL) * viscL^0.2 / (rhoV*rhoL*C) ;
    497        
    498         "Water Liquid Viscosity"
    499         visclw = PPwater.LiquidViscosity(OutletL.T, OutletL.P, 1);
    500         "Water Liquid Density"
    501         rhow = PPwater.LiquidDensity(OutletL.T, OutletL.P, 1);
    502         "Liquid Viscosity"
    503         viscL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z);
    504         "Vapor Viscosity"
    505         viscV = PP.VapourViscosity(OutletV.T, OutletV.P, OutletV.z);
    506         "Liquid Density"
    507         rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
    508         "Vapour Density"
    509         rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
    510        
    511         "Froud number"
    512         Fr = (L/rhoL)^2 / S/g;
    513         "Reynolds number"
    514         Reg = S*(G/rhoV/(e*sin(teta)))*rhoV/viscV;
    515         "Temporary variable"
    516         Ge = G/rhoV /(e*sin(teta));
    517         "Conversion from ML to phiL"
    518         phiL = ML*vL / V;
    519 
    520         switch PackingType
    521                 case "random":
    522                         switch PressureDropModel
    523                                 case "Leva":
    524                                         #(InletV.P - OutletV.P)/'Pa' / (V/'m^3'/(Across/'m^2') ) = a * 10^(b*Llin/'kg/m^2/s') * (G/('kg/m^2/s'))^2/(rhoV/('kg/m^3'));
    525                                         (InletV.P - OutletV.P) / (V/(Across) ) =  a * 10^(b*Llin) * (G)^2/(rhoV);
    526                                 case "Prahl":
    527                                         (InletV.P - OutletV.P)/'0.03937*inH2O' = (V/Across)/'m' * Y*(1116*X+500)/(1-Y*(35*X+3));
    528                         end
    529                         phiL = (1.53e-4 + (2.9e-5*e*(dp*L/(viscL*e))^0.66 * (viscL/visclw)^0.75)) * (dp/'m')^(-1.2);
    530                
    531                 case "structured":
    532                         (InletV.P - OutletV.P)/'Pa'= (V/Across)/'m' * ( (0.171 + 92.7/Reg) * (rhoV/('kg/m^3')*(Ge/('m/s'))^2/(S/'m')) )
    533                                                    * (1/(1-C3 * sqrt(Fr) ))^5;
    534                
    535                         phiL = C3 * sqrt(Fr);
    536         end
    537        
    538 
    539 end
  • branches/packed/sample/stage_separators/sample_column.mso

    r398 r448  
    183183       
    184184        OPTIONS
    185         TimeStep = 1;
     185        TimeStep = 10;
    186186        TimeEnd = 100;
    187187        #GuessFile="SectionColumn_Test_with8tray.rlt";
     
    504504
    505505
     506FlowSheet SectionColumnPacked
     507        PARAMETERS
     508        PP      as Plugin(Brief="Physical Properties",
     509                Type="PP",
     510                Components = [ "isobutane", "benzene"],
     511                LiquidModel = "PR",
     512                VapourModel = "PR"
     513        );
     514        NComp   as Integer;
     515
     516        SET
     517        NComp = PP.NumberOfComponents;
     518       
     519        DEVICES
     520        sec as Section_Column_Packed;
     521        feed as source;
     522        reb as vapour_stream;
     523        cond as liquid_stream;
     524        zero as stream;
     525       
     526        CONNECTIONS
     527        feed.Outlet to sec.stage(15).Inlet;
     528       
     529        zero to sec.stage([1:14]).Inlet;
     530        zero to sec.stage([16:24]).Inlet;
     531       
     532        reb to sec.stage(24).InletV;
     533        cond to sec.stage(1).InletL;
     534       
     535        SPECIFY
     536        feed.Outlet.F = 113.4 * 'kmol/h';
     537        feed.Outlet.T = 291 * 'K';
     538        feed.Outlet.P = 168.3 * 'kPa';
     539        feed.Outlet.z = [0.5, 0.5];
     540
     541        zero.F = 0 * 'kmol/h';
     542        zero.T = 300 * 'K';
     543        zero.P = 1 * 'atm';
     544        zero.z = [0.5, 0.5];
     545        zero.v = 0;
     546        zero.h = 0 * 'J/mol';
     547       
     548        cond.F = 68 * 'kmol/h';
     549        cond.P = 150 * 'kPa';
     550        cond.T = 281.75 * 'K';
     551        cond.z = [0.6664, 0.3336];
     552
     553        reb.F = 153 * 'kmol/h';
     554        reb.P = 185 * 'kPa';
     555        reb.T = 328.12 * 'K';
     556        reb.z = [0.001848, 0.9982];
     557       
     558        sec.stage.Emv = 1;
     559#       sec.stage(1).OutletV.F = 150 * 'kmol/h';
     560
     561        SET
     562        sec.NTrays = 24;
     563       
     564#       sec.stage.PressureDropModel = "Leva";
     565#       sec.stage.PackingType = "random";
     566
     567        sec.stage.V = 4 * 'ft^3';
     568        sec.stage.Q = 0 * 'kW';
     569        sec.stage.Ap = 3.94 * 'ft^2';
     570
     571        INITIAL
     572        sec.stage.OutletL.T = [290:(330-290)/(sec.NTrays-1):330] *'K';
     573        sec.stage.Level = 0.5 * 'ft';
     574        sec.stage.OutletL.z(1) = 0.5;
     575       
     576        OPTIONS
     577        InitialFile = "/home/paula/SectionColumn_Test_with8tray.rlt";
     578        TimeStep = 1;
     579        TimeEnd = 100;
     580        #GuessFile="SectionColumn_Test_with8tray.rlt";
     581        #Dynamic = false;
     582end
     583
  • branches/packed/sample/stage_separators/sample_tray.mso

    r436 r448  
    110110
    111111        VARIABLES
    112         deltaP as pressure;
     112        deltaP as Real (Unit='Pa/m');
    113113       
    114114        DEVICES
    115         t1 as packedStage2;
     115        t1 as packedStage;
    116116        feed as source;
    117117        inL as liquid_stream;
     
    124124
    125125        EQUATIONS
    126         deltaP = t1.InletV.P - t1.OutletV.P;
     126        deltaP = (t1.InletV.P - t1.OutletV.P)/ (t1.V/t1.Across);
    127127
    128128        SPECIFY
     
    137137        inL.z = [0.1641, 0.8359];
    138138
    139         inV.F = 201.25 * 'kmol/h';
    140         #inV.F = 240 * 'kmol/h';
     139        #inV.F = 201.25 * 'kmol/h';
     140        inV.F = 240 * 'kmol/h';
    141141        inV.P = 1.48 * 'atm';
    142142        inV.T = 321 * 'K';
     
    146146       
    147147        SET
    148         t1.PressureDropModel = "Leva";
    149         t1.PackingType = "random";
    150         t1.V = 4.1 * 'ft^3';
     148#       t1.PressureDropModel = "Leva";
     149#       t1.PackingType = "random";
     150        t1.V = 4 * 'ft^3';
    151151        t1.Q = 0 * 'kW';
    152         t1.Across = 3.94 * 'ft^2';#3.94 * 'ft^2';
    153         t1.Ap = 3.94 * 'ft^2';
     152        t1.Across = 3.94 * 'ft^2';
    154153
    155154        INITIAL
     
    160159        OPTIONS
    161160        InitialFile = "/home/paula/tray_Test.rlt";
    162         TimeStep = 0.5;
     161        TimeStep = 0.1;
    163162        TimeEnd = 10;
    164163end
Note: See TracChangeset for help on using the changeset viewer.