Changeset 498 for trunk/eml


Ignore:
Timestamp:
Apr 11, 2008, 3:21:24 PM (15 years ago)
Author:
Paula Bettio Staudt
Message:

First official version of packed stage and packed column with samples

Location:
trunk/eml/stage_separators
Files:
2 edited

Legend:

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

    r398 r498  
    12611261       
    12621262end
     1263
     1264#*----------------------------------------------------------------------
     1265* Model of a  packed column section with:
     1266*       - NStages = theoretical number of equilibrium stages.
     1267*
     1268*---------------------------------------------------------------------*#
     1269Model Packed_Section_Column
     1270        ATTRIBUTES
     1271        Pallete         = true;
     1272        Icon            = "icon/SectionColumn";
     1273        Brief           = "Model of a packed column section.";
     1274        Info            =
     1275"== Model of a packed column section containing ==
     1276* NStages theoretical stages.
     1277       
     1278== Specify ==
     1279* the feed stream of each tray (Inlet);
     1280* the InletL stream of the top tray;
     1281* the InletV stream of the bottom tray;
     1282* the pressure drop (deltaP) of each tray.
     1283       
     1284== Initial Conditions ==
     1285* the stages temperature (OutletL.T);
     1286* the stages liquid holdup;
     1287* (NoComps - 1) OutletL (OR OutletV) compositions for each tray.
     1288";
     1289       
     1290        PARAMETERS
     1291        outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
     1292        outer NComp as Integer;
     1293        NStages as Integer(Brief="Number of trays", Default=2);
     1294        topdown as Integer(Brief="Trays counting (1=top-down, -1=bottom-up)", Default=1);
     1295        top as Integer(Brief="Number of top tray");
     1296        bot as Integer(Brief="Number of bottom tray");
     1297        H as length (Brief="Height of packing");
     1298
     1299        VARIABLES
     1300        stage(NStages) as packedStage;
     1301       
     1302        SET
     1303        top = (NStages-1)*(1-topdown)/2+1;
     1304        bot = NStages/top;
     1305        stage.hs = H/NStages;   
     1306        stage.V = stage.hs * stage.d^2*3.14159/4;
     1307       
     1308        CONNECTIONS
     1309        stage([top+topdown:topdown:bot]).OutletV to stage([top:topdown:bot-topdown]).InletV;
     1310        stage([top:topdown:bot-topdown]).OutletL to stage([top+topdown:topdown:bot]).InletL;
     1311end
     1312
     1313#*----------------------------------------------------------------------
     1314* Model of a  packed distillation column containing:
     1315*       - a section with NStages theoretical stages;
     1316*       - a kettle reboiler;
     1317*       - dymamic condenser;
     1318*       - a splitter which separate reflux and distillate;
     1319*       - a pump in reflux stream;
     1320*---------------------------------------------------------------------*#
     1321Model PackedDistillation_kettle_cond as Packed_Section_Column
     1322        PARAMETERS
     1323        VapourFlow as Switcher(Valid = ["on", "off"], Default = "on");
     1324       
     1325        VARIABLES
     1326        cond as condenser;
     1327        reb as reboiler;
     1328        sptop as splitter;
     1329        pump1 as pump;
     1330       
     1331        CONNECTIONS
     1332        #vapor
     1333        reb.OutletV to stage(bot).InletV;
     1334        stage(top).OutletV to cond.InletV;
     1335       
     1336        #liquid
     1337        cond.OutletL to sptop.Inlet;   
     1338        sptop.Outlet2 to pump1.Inlet;
     1339        pump1.Outlet to stage(top).InletL;
     1340        stage(bot).OutletL to reb.InletL;
     1341       
     1342        EQUATIONS
     1343        switch VapourFlow
     1344                case "on":
     1345                stage(bot).InletV.F*stage(bot).vV = sqrt((reb.OutletV.P - stage(bot).OutletV.P)/
     1346                                        (stage(bot).rhoV*stage(bot).Qsil*20))*(stage(bot).d^2*3.14159/4*stage(bot).e - stage(bot).Al);
     1347                when stage(bot).InletV.F < 1e-6 * 'kmol/h' switchto "off";
     1348               
     1349                case "off":
     1350                stage(bot).InletV.F = 0 * 'mol/s';
     1351                when reb.OutletV.P > stage(bot).OutletV.P + 1e-1 * 'atm' switchto "on";
     1352        end
     1353
     1354end
  • trunk/eml/stage_separators/tray.mso

    r398 r498  
    323323        V = ML* vL + MV*vV;
    324324end
     325
     326#*-------------------------------------
     327* Model of a packed column stage
     328-------------------------------------*#
     329Model packedStage
     330        ATTRIBUTES
     331        Pallete         = false;
     332        Icon            = "icon/Tray";
     333        Brief           = "Complete model of a packed column stage.";
     334        Info            =
     335"== Specify ==
     336* the Feed stream
     337* the Liquid inlet stream
     338* the Vapour inlet stream
     339* the stage pressure drop (deltaP)
     340       
     341== Initial ==
     342* the plate temperature (OutletL.T)
     343* the liquid molar holdup ML
     344* (NoComps - 1) OutletL compositions
     345";     
     346       
     347        PARAMETERS
     348outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
     349outer NComp as Integer;
     350        PPwater as Plugin(Brief="Physical Properties",
     351                Type="PP",
     352                Components = [ "water" ],
     353                LiquidModel = "PR",
     354                VapourModel = "PR"
     355        );
     356
     357        V as volume(Brief="Total Volume of the tray");
     358        Q as heat_rate (Brief="Rate of heat supply");
     359        d as length (Brief="Column diameter"); 
     360
     361        a as Real (Brief="surface area per packing volume", Unit='m^2/m^3');
     362        g as acceleration;
     363        e as Real (Brief="Void fraction of packing, m^3/m^3");
     364        Cpo as Real (Brief="Constant for resitance equation"); # Billet and Schultes, 1999.
     365        Mw(NComp)       as molweight    (Brief = "Component Mol Weight");
     366        hs as length (Brief="Height of the packing stage");
     367        Qsil as positive (Brief="Resistance coefficient on the liquid load", Default=1);
     368
     369        VARIABLES
     370in      Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932, Symbol="_{in}");
     371in      InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}");
     372in      InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}");
     373out     OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}");
     374out     OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}");
     375
     376        M(NComp) as mol (Brief="Molar Holdup in the tray", Default=0.01, Lower=0, Upper=100);
     377        ML as mol (Brief="Molar liquid holdup", Default=0.01, Lower=0, Upper=100);
     378        MV as mol (Brief="Molar vapour holdup", Default=0.01, Lower=0, Upper=100);
     379        E as energy (Brief="Total Energy Holdup on tray", Default=-500);
     380        vL as volume_mol (Brief="Liquid Molar Volume");
     381        vV as volume_mol (Brief="Vapour Molar volume");
     382       
     383        miL as viscosity (Brief="Liquid dynamic viscosity", DisplayUnit='kg/m/s');
     384        miV as viscosity (Brief="Vapor dynamic viscosity", DisplayUnit='kg/m/s');
     385        rhoL as dens_mass;
     386        rhoV as dens_mass;
     387       
     388        deltaP as pressure;
     389       
     390        uL as velocity (Brief="volume flow rate of liquid, m^3/m^2/s", Lower=-10, Upper=100);
     391        uV as velocity (Brief="volume flow rate of vapor, m^3/m^2/s", Lower=-10, Upper=100);
     392        dp as length (Brief="Particle diameter", Default=1e-3, Lower=0, Upper=10);
     393        invK as positive (Brief="Wall factor", Default=1, Upper=10);
     394        Rev as Real (Brief="Reynolds number of the vapor stream", Default=4000);
     395        Al as area (Brief="Area occupied by the liquid", Default=0.001, Upper=1);
     396        hl as positive (Brief="Column holdup", Unit='m^3/m^3', Default=0.01,Upper=10);
     397
     398        SET
     399        Mw = PP.MolecularWeight();
     400
     401        EQUATIONS
     402        "Component Molar Balance"
     403        diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z
     404                - OutletL.F*OutletL.z - OutletV.F*OutletV.z;
     405
     406        "Energy Balance"
     407        diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h
     408                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q );
     409       
     410        "Molar Holdup"
     411        M = ML*OutletL.z + MV*OutletV.z;
     412       
     413        "Energy Holdup"
     414        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
     415       
     416        "Mol fraction normalisation"
     417        sum(OutletL.z)= 1.0;
     418       
     419        "Liquid Volume"
     420        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
     421        "Vapour Volume"
     422        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
     423       
     424        "Chemical Equilibrium"
     425        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
     426                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
     427       
     428        "Thermal Equilibrium"
     429        OutletV.T = OutletL.T;
     430       
     431        "Mechanical Equilibrium"
     432        OutletL.P = OutletV.P;
     433       
     434        "Geometry Constraint"
     435        V*e = ML*vL + MV*vV;
     436       
     437        "Liquid Density"
     438        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
     439        "Vapour Density"
     440        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
     441        "Liquid viscosity"
     442        miL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z);
     443        "Vapour viscosity"
     444        miV = PP.VapourViscosity(InletV.T, InletV.P, InletV.z);
     445
     446        "Area occupied by the liquid"
     447        Al = ML*vL/hs;
     448
     449        "Volume flow rate of liquid, m^3/m^2/s"
     450        uL * Al = OutletL.F * vL;
     451        "Volume flow rate of vapor, m^3/m^2/s"
     452        uV * ((d^2*3.14159/4)*e - Al) = OutletV.F * vV;
     453       
     454        "Liquid holdup"
     455        hl = ML*vL/V/e;
     456       
     457        "Particle diameter"
     458        dp = 6 * (1-e)/a;
     459       
     460        "Wall Factor"
     461        invK = (1 + (2*dp/(3*d*(1-e))));
     462       
     463        "Reynolds number of the vapor stream"
     464        Rev*invK = dp*uV*rhoV / (miV*(1-e));
     465       
     466        deltaP = InletV.P - OutletV.P;
     467       
     468        "Pressure drop and Vapor flow"
     469        deltaP/hs  = Qsil*a*uV^2*rhoV*invK / (2*(e-hl)^3);
     470
     471        "Liquid holdup"
     472        hl = (12*miL*a^2*uL/rhoL/g)^1/3;
     473end
Note: See TracChangeset for help on using the changeset viewer.