Ignore:
Timestamp:
Mar 7, 2008, 3:46:44 PM (15 years ago)
Author:
Paula Bettio Staudt
Message:

Some modifications

File:
1 edited

Legend:

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

    r470 r477  
    365365        rhoL as dens_mass;
    366366        rhoV as dens_mass;
    367         uL as Real (Brief="volume flow rate of liquid, m^3/m^2/s", Default = 0.007);
    368         uV as Real (Brief="volume flow rate of vapor, m^3/m^2/s", Default = 1.14);
     367        uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower = 0, Default = 0.007);
     368        uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower = 0, Default = 1.14);
    369369        dp as length (Brief="Particle diameter", Default=1e-3);
    370370        invK as Real (Brief="Wall factor");
     
    661661end
    662662
    663 
     663Model packedStage
     664        PARAMETERS
     665outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
     666outer NComp as Integer;
     667        V as volume(Brief="Total Volume of the tray");
     668        Q as heat_rate (Brief="Rate of heat supply");
     669        Ap as area (Brief="Plate area = Atray - Adowncomer");
     670
     671        a as Real (Brief="surface area per packing volume", Unit='m^2/m^3');
     672        g as acceleration;
     673        e as Real (Brief="Void fraction of packing, m^3/m^3");
     674        ds as length (Brief="Column diameter");
     675        Cpo as Real (Brief="Constant for resitance equation"); # Billet and Schultes, 1999.
     676        Mw(NComp)       as molweight    (Brief = "Component Mol Weight");
     677        hs as length (Brief="Height of the packing stage");
     678        Qsio as Real (Brief="Resistance coefficient", Lower = 0);
     679
     680        VARIABLES
     681in      Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}");
     682in      InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}");
     683in      InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}");
     684out     OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}");
     685out     OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}");
     686
     687        M(NComp) as mol (Brief="Molar Holdup in the tray");
     688        ML as mol (Brief="Molar liquid holdup");
     689        MV as mol (Brief="Molar vapour holdup");
     690        E as energy (Brief="Total Energy Holdup on tray");
     691        vL as volume_mol (Brief="Liquid Molar Volume");
     692        vV as volume_mol (Brief="Vapour Molar volume");
     693       
     694        miL as viscosity (Brief="Liquid dynamic viscosity", DisplayUnit='kg/m/s');
     695        miV as viscosity (Brief="Vapor dynamic viscosity", DisplayUnit='kg/m/s');
     696        rhoL as dens_mass;
     697        rhoV as dens_mass;
     698        uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower = -10, Default = 0.007);
     699        uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower = -10, Default = 1.14);
     700        dp as length (Brief="Particle diameter", Default=1e-3);
     701        invK as Real (Brief="Wall factor");
     702#       Rev as Real (Brief="Reynolds number of the vapor stream", Lower = 0, Default=100);
     703#       Qsio as Real (Brief="Resistance coefficient", Lower = 0, Default=100);
     704        Al as area;
     705       
     706        SET
     707        Mw = PP.MolecularWeight();
     708
     709        EQUATIONS
     710        "Component Molar Balance"
     711        diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z
     712                - OutletL.F*OutletL.z - OutletV.F*OutletV.z;
     713#       diff(sum(M))=Inlet.F + InletL.F + InletV.F - OutletL.F - OutletV.F;
     714#       OutletL.z = OutletV.z;
     715
     716        "Energy Balance"
     717        diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h
     718                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q );
     719       
     720        "Molar Holdup"
     721        M = ML*OutletL.z + MV*OutletV.z;
     722       
     723        "Energy Holdup"
     724        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
     725       
     726        "Mol fraction normalisation"
     727        sum(OutletL.z)= 1.0;
     728        sum(OutletL.z)=sum(OutletV.z);
     729       
     730        "Liquid Volume"
     731        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
     732        "Vapour Volume"
     733        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
     734       
     735        "Chemical Equilibrium"
     736#       OutletV.z = OutletL.z;
     737        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
     738                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
     739       
     740        "Thermal Equilibrium"
     741        OutletV.T = OutletL.T;
     742       
     743        "Mechanical Equilibrium"
     744        OutletL.P = OutletV.P;
     745       
     746        "Geometry Constraint"
     747        V*e = ML*vL + MV*vV;
     748       
     749        "Liquid Density"
     750        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
     751        "Vapour Density"
     752        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
     753        "Liquid viscosity"
     754        miL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z);
     755        "Vapour viscosity"
     756        miV = PP.VapourViscosity(InletV.T, InletV.P, InletV.z);
     757       
     758        Al = ML*vL/hs;
     759
     760        "Volume flow rate of liquid, m^3/m^2/s"
     761        uL * Al = OutletL.F * vL;
     762        "Volume flow rate of vapor, m^3/m^2/s"
     763        uV * (Ap*e - Al) = OutletV.F * vV;
     764       
     765        "Liquid holdup and Liquid flow"
     766        vL * ML = (12*miL*a^2*uL/rhoL/g)^1/3 * hs * Ap;
     767       
     768        "Particle diameter"
     769        dp = 6 * (1-e)/a;
     770       
     771        "Wall Factor"
     772        invK = (1 + (2*dp/(3*ds*(1-e))));
     773       
     774#*      "Reynolds number of the vapor stream"
     775        Rev*invK = dp*uV*rhoV / (miV*(1-e));
     776
     777        Qsio = Cpo * (64/Rev + 1.8/Rev^0.08);
     778        if Rev > 1e-4 then
     779                "Resistance Coefficient"       
     780                Qsio = Cpo * (64/Rev + 1.8/Rev^0.08);
     781        else
     782                Qsio = 1;
     783        end
     784*#
     785        "Pressure drop and Vapor flow"
     786        (InletV.P - OutletV.P)/hs  = Qsio*a*uV^2*rhoV*invK / (2*e^3);
     787end
     788
     789# component #1 = nitrogen; #2 = water
     790Model packedStage_AirWater
     791        PARAMETERS
     792outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
     793outer NComp as Integer;
     794        V as volume(Brief="Total Volume of the tray");
     795        Q as heat_rate (Brief="Rate of heat supply");
     796        Ap as area (Brief="Plate area = Atray - Adowncomer");
     797
     798        a as Real (Brief="surface area per packing volume", Unit='m^2/m^3');
     799        g as acceleration;
     800        e as Real (Brief="Void fraction of packing, m^3/m^3");
     801        ds as length (Brief="Column diameter");
     802        Cpo as Real (Brief="Constant for resitance equation"); # Billet and Schultes, 1999.
     803        Ch as Real (Brief="Constant for ah equation"); # Billet and Schultes, 1999.
     804        Mw(NComp)       as molweight    (Brief = "Component Mol Weight");
     805        hs as length (Brief="Height of the packing stage");
     806        #Qsio as Real (Brief="Resistance coefficient", Lower = 0);
     807
     808        VARIABLES
     809in      Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}");
     810in      InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}");
     811in      InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}");
     812out     OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}");
     813out     OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}");
     814
     815        M(NComp) as mol (Brief="Molar Holdup in the tray");
     816        ML as mol (Brief="Molar liquid holdup");
     817        MV as mol (Brief="Molar vapour holdup");
     818        E as energy (Brief="Total Energy Holdup on tray");
     819        vL as volume_mol (Brief="Liquid Molar Volume");
     820        vV as volume_mol (Brief="Vapour Molar volume");
     821       
     822        miL as viscosity (Brief="Liquid dynamic viscosity", DisplayUnit='kg/m/s');
     823        miV as viscosity (Brief="Vapor dynamic viscosity", DisplayUnit='kg/m/s');
     824        rhoL as dens_mass;
     825        rhoV as dens_mass;
     826        uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower = -10, Default = 0.007);
     827        uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower = -10, Default = 1.14);
     828        dp as length (Brief="Particle diameter", Default=1e-3);
     829        invK as Real (Brief="Wall factor");
     830        Rev as Real (Brief="Reynolds number of the vapor stream", Lower = 0, Default=100);
     831#       Rel as Real (Brief="Reynolds number of the liquid stream", Lower = -10, Default=100);
     832#       ah as Real (Brief="Hydraulic surface area", Unit='m^2/m^3');
     833        Qsio as Real (Brief="Resistance coefficient", Lower = 0, Default=100);
     834        Al as area;
     835       
     836        SET
     837        Mw = PP.MolecularWeight();
     838
     839        EQUATIONS
     840        "Component Molar Balance"
     841#       diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z
     842#               - OutletL.F*OutletL.z - OutletV.F*OutletV.z;
     843        diff(sum(M))=Inlet.F + InletL.F + InletV.F - OutletL.F - OutletV.F;
     844
     845        "Energy Balance"
     846        diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h
     847                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q );
     848       
     849        "Molar Holdup"
     850        M = ML*OutletL.z + MV*OutletV.z;
     851       
     852        "Energy Holdup"
     853        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
     854       
     855#       "Mol fraction normalisation"
     856#       sum(OutletL.z)= 1.0;
     857#       sum(OutletL.z)=sum(OutletV.z);
     858       
     859        "Chemical Equilibrium"
     860        OutletV.z = [1 0];
     861        OutletL.z = [0 1];
     862#       PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
     863#               PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
     864       
     865        "Thermal Equilibrium"
     866        OutletV.T = OutletL.T;
     867       
     868        "Mechanical Equilibrium"
     869        OutletL.P = OutletV.P;
     870       
     871        "Geometry Constraint"
     872        V*e = ML*vL + MV*vV;
     873       
     874        "Liquid Density"
     875        rhoL = 999 * 'kg/m^3';#PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
     876        "Vapour Density"
     877        rhoV = 1.19 * 'kg/m^3'; #PP.VapourDensity(InletV.T, InletV.P, InletV.z);
     878        "Liquid viscosity"
     879        miL = 0.001 * 'kg/m/s' ; #PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z);
     880        "Vapour viscosity"
     881        miV = PP.VapourViscosity(InletV.T, InletV.P, InletV.z);
     882        "Liquid Volume"
     883        vL = 18 * 'g/mol' / rhoV; #PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
     884        "Vapour Volume"
     885        vV = 28 * 'g/mol' / rhoL; #PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
     886
     887        "Cross section area ocupied by the liquid"
     888        Al = ML*vL/hs;
     889
     890        "Volume flow rate of liquid, m^3/m^2/s"
     891        uL * Al = OutletL.F * vL;
     892
     893        "Volume flow rate of vapor, m^3/m^2/s"
     894        uV * (Ap*e - Al) = OutletV.F * vV;
     895
     896        "Particle diameter"
     897        dp = 6 * (1-e)/a;
     898       
     899        "Wall Factor"
     900        invK = (1 + (2*dp/(3*ds*(1-e))));
     901       
     902        "Reynolds number of the vapor stream"
     903        Rev*invK = dp*uV*rhoV / (miV*(1-e));
     904#*      "Reynolds number of the liquid stream"
     905        Rel = uL*rhoL / (a*miL);
     906
     907        if Rel < 5 then
     908                if Rel < 1e-4 then
     909                        ah = 0 * '1/m';
     910                else
     911                        "Hydraulic surface area"
     912                        ah = a * Ch * Rel^0.15 * (uL^2*a/g)^0.1; #(Rel^2*a^3*miL^2/rhoL^2/g)^0.1; #
     913                end
     914        else
     915                ah = a * Ch * 0.85 * Rel^0.25 * (uL^2*a/g)^0.1; #(Rel^2*a^3*miL^2/rhoL^2/g)^0.1; #
     916        end
     917*#     
     918#       if ah equal 0 then
     919#               uL = 0 * 'm/s';
     920#       else
     921                "Liquid holdup and Liquid flow"
     922                vL * ML = V * (12*miL*a^2*uL/rhoL/g)^1/3; # * (ah/a)^1;
     923#       end
     924       
     925        "Resistance Coefficient"       
     926        Qsio = Cpo * (64/Rev + 1.8/Rev^0.08);
     927
     928        "Pressure drop and Vapor flow"
     929        (InletV.P - OutletV.P)/hs  = 3*Qsio*a*uV^2*rhoV*invK / (2*e^3);
     930end
Note: See TracChangeset for help on using the changeset viewer.