Ignore:
Timestamp:
Oct 23, 2006, 5:26:39 PM (16 years ago)
Author:
Paula Bettio Staudt
Message:

Included reactive distillation column

Location:
mso/eml/stage_separators
Files:
4 edited

Legend:

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

    r37 r38  
    909909        spbottom.Outlet2 to reb.InletL;
    910910end
     911
     912# Reactive Distillation!!
     913Model ReactiveDistillation
     914        PARAMETERS
     915ext PP as CalcObject;
     916ext NComp as Integer;
     917        NTrays as Integer(Brief="Number of trays", Default=2);
     918       
     919        VARIABLES
     920        trays(NTrays) as trayReact;
     921        cond as condenserReact;
     922        reb as reboilerReact;
     923        sp as splitter;
     924        p as pump;
     925       
     926        EQUATIONS
     927        if ( reb.OutletV.P > 1 * "atm" ) then
     928                "Pressure Drop through the tray"
     929                reb.OutletV.F = trays(1).Ah/reb.vV * sqrt((reb.OutletV.P - 1*"atm") / (0.15*reb.rhoV) );
     930        else
     931                "Prato selado"
     932                reb.OutletV.F = 0.0 * "mol/s";
     933        end
     934       
     935        CONNECTIONS
     936        #vapor
     937        reb.OutletV to trays([NTrays]).InletV;
     938        trays([2:NTrays]).OutletV to trays([1:NTrays-1]).InletV;
     939        trays(1).OutletV to cond.InletV;
     940
     941        #liquid
     942        cond.OutletL to sp.Inlet;       
     943        sp.Outlet2 to p.Inlet;
     944        p.Outlet to trays(1).InletL;
     945        trays([1:NTrays-1]).OutletL to trays([2:NTrays]).InletL;
     946        trays(NTrays).OutletL to reb.InletL;
     947end
  • mso/eml/stage_separators/condenser.mso

    r1 r38  
    122122        OutletL.v = 0.0;
    123123end
     124
     125#*-------------------------------------------------------------------
     126* Condenser with reaction in liquid phase
     127*--------------------------------------------------------------------*#
     128Model condenserReact
     129        PARAMETERS
     130ext PP as CalcObject;
     131ext NComp as Integer;
     132        V as volume (Brief="Condenser total volume");
     133        Across as area (Brief="Cross Section Area of reboiler");
     134
     135        stoic(NComp) as Real(Brief="Stoichiometric matrix");
     136        Hr as energy_mol;
     137        Pstartup as pressure;
     138
     139        VARIABLES
     140in      InletV as stream;                       #(Brief="Vapour inlet stream");
     141out     OutletL as stream_therm;        #(Brief="Liquid outlet stream");
     142out     OutletV as stream_therm;        #(Brief="Vapour outlet stream");
     143
     144        M(NComp) as mol (Brief="Molar Holdup in the tray");
     145        ML as mol (Brief="Molar liquid holdup");
     146        MV as mol (Brief="Molar vapour holdup");
     147        E as energy (Brief="Total Energy Holdup on tray");
     148        vL as volume_mol (Brief="Liquid Molar Volume");
     149        vV as volume_mol (Brief="Vapour Molar volume");
     150        Level as length (Brief="Level of liquid phase");
     151        Q as heat_rate (Brief="Heat supplied");
     152        Vol as volume;
     153        r as reaction_mol (Brief = "Reaction rate", Unit = "mol/l/s");
     154        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
     155
     156        EQUATIONS
     157        "Molar Concentration"
     158        OutletL.z = vL * C;
     159       
     160        "Component Molar Balance"
     161        diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z
     162                                - OutletV.F*OutletV.z + stoic*r*ML*vL;
     163
     164        "Energy Balance"
     165        diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h
     166                                - OutletV.F*OutletV.h + Q + Hr * r * ML*vL;
     167
     168        "Molar Holdup"
     169        M = ML*OutletL.z + MV*OutletV.z;
     170       
     171        "Energy Holdup"
     172        E = ML*OutletL.h + MV*OutletV.h - OutletV.P*V;
     173       
     174        "Mol fraction normalisation"
     175        sum(OutletL.z)=1.0;
     176
     177        "Liquid Volume"
     178        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
     179        "Vapour Volume"
     180        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
     181
     182        "Thermal Equilibrium"
     183        OutletL.T = OutletV.T;
     184
     185        "Mechanical Equilibrium"
     186        OutletV.P = OutletL.P;
     187
     188        "Geometry Constraint"
     189        V = ML*vL + MV*vV;
     190
     191        Vol = ML*vL;
     192       
     193        "Level of liquid phase"
     194        Level = ML*vL/Across;
     195       
     196        "Vapourisation Fraction"
     197        OutletL.v = 0.0;
     198        OutletV.v = 1.0;
     199       
     200        "Chemical Equilibrium"
     201        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
     202        PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
     203
     204        sum(OutletL.z)=sum(OutletV.z);
     205
     206end
  • mso/eml/stage_separators/reboiler.mso

    r1 r38  
    141141end
    142142
     143#*-------------------------------------------------------------------
     144* Model of a dynamic reboiler with reaction
     145*-------------------------------------------------------------------*#
     146Model reboilerReact
     147        PARAMETERS
     148ext PP as CalcObject;
     149ext NComp as Integer;
     150        Across as area (Brief="Cross Section Area of reboiler");
     151        V as volume (Brief="Total volume of reboiler");
     152
     153        stoic(NComp) as Real(Brief="Stoichiometric matrix");
     154        Hr as energy_mol;
     155        Pstartup as pressure;
     156
     157        VARIABLES
     158in      Inlet as stream;                        #(Brief="Feed Stream");
     159in      InletL as stream;                       #(Brief="Liquid inlet stream");
     160out     OutletL as stream_therm;        #(Brief="Liquid outlet stream");
     161out     OutletV as stream_therm;        #(Brief="Vapour outlet stream");
     162
     163        Q as heat_rate (Brief="Heat supplied");
     164        M(NComp) as mol (Brief="Molar Holdup in the tray");
     165        ML as mol (Brief="Molar liquid holdup");
     166        MV as mol (Brief="Molar vapour holdup");
     167        E as energy (Brief="Total Energy Holdup on tray");
     168        vL as volume_mol (Brief="Liquid Molar Volume");
     169        vV as volume_mol (Brief="Vapour Molar volume");
     170        Level as length (Brief="Level of liquid phase");
     171        Vol as volume;
     172        startup as Real;
     173        rhoV as dens_mass;
     174        r as reaction_mol (Brief = "Reaction resulting ethyl acetate", Unit = "mol/l/s");
     175        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1);
     176
     177        EQUATIONS
     178        "Molar Concentration"
     179        OutletL.z = vL * C;
     180       
     181        "Component Molar Balance"
     182        diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z
     183                - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r*ML*vL;
     184       
     185        "Energy Balance"
     186        diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h
     187                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q + Hr * r * vL*ML;
     188       
     189        "Molar Holdup"
     190        M = ML*OutletL.z + MV*OutletV.z;
     191       
     192        "Energy Holdup"
     193        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
     194       
     195        "Mol fraction normalisation"
     196        sum(OutletL.z)=1.0;
     197       
     198        "Liquid Volume"
     199        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
     200        "Vapour Volume"
     201        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); 
     202        "Vapour Density"
     203        rhoV = PP.VapourDensity(OutletV.T, OutletV.P, OutletV.z);
     204       
     205        "Level of liquid phase"
     206        Level = ML*vL/Across;
     207
     208        Vol = ML*vL;
     209       
     210        "vaporization fraction "
     211        OutletV.v = 1.0;
     212        OutletL.v = 0.0;
     213       
     214        "Mechanical Equilibrium"
     215        OutletL.P = OutletV.P;
     216       
     217        "Thermal Equilibrium"
     218        OutletL.T = OutletV.T; 
     219       
     220        "Geometry Constraint"
     221        V = ML*vL + MV*vV;             
     222
     223        "Chemical Equilibrium"
     224        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
     225        PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z;
     226
     227        sum(OutletL.z)=sum(OutletV.z);
     228       
     229end
  • mso/eml/stage_separators/tray.mso

    r37 r38  
    142142end
    143143
     144#*-------------------------------------------------------------------
     145* Model of a tray with reaction
     146*-------------------------------------------------------------------*#
     147Model trayReact
     148
     149        PARAMETERS
     150ext PP as CalcObject;
     151ext NComp as Integer;
     152        V as volume(Brief="Total Volume of the tray");
     153        Q as power (Brief="Rate of heat supply");
     154        Ap as area (Brief="Plate area = Atray - Adowncomer");
     155       
     156        Ah as area (Brief="Total holes area");
     157        lw as length (Brief="Weir length");
     158        g as acceleration (Default=9.81);
     159        hw as length (Brief="Weir height");
     160        beta as fraction (Brief="Aeration fraction");
     161        alfa as fraction (Brief="Dry pressure drop coefficient");
     162
     163        stoic(NComp) as Real(Brief="Stoichiometric matrix");
     164        Hr as energy_mol;
     165        Pstartup as pressure;
     166       
     167        VARIABLES
     168in      Inlet as stream;
     169in      InletL as stream;
     170in      InletV as stream;
     171out     OutletL as stream_therm;
     172out     OutletV as stream_therm;
     173
     174        yideal(NComp) as fraction;
     175        Emv as Real (Brief = "Murphree efficiency");
     176
     177        M(NComp) as mol (Brief="Molar Holdup in the tray");
     178        ML as mol (Brief="Molar liquid holdup");
     179        MV as mol (Brief="Molar vapour holdup");
     180        E as energy (Brief="Total Energy Holdup on tray");
     181        vL as volume_mol (Brief="Liquid Molar Volume");
     182        vV as volume_mol (Brief="Vapour Molar volume");
     183        Level as length (Brief="Height of clear liquid on plate");
     184        Vol as volume;
     185       
     186        rhoL as dens_mass;
     187        rhoV as dens_mass;
     188        r as reaction_mol (Brief = "Reaction rate", Unit = "mol/l/s");
     189        C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); #, Unit = "mol/l");
     190       
     191        EQUATIONS
     192        "Molar Concentration"
     193        OutletL.z = vL * C;
     194       
     195        "Component Molar Balance"
     196        diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z
     197                - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r*ML*vL;
     198       
     199        "Energy Balance"
     200        diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h
     201                - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q ) + Hr * r * vL*ML;
     202       
     203        "Molar Holdup"
     204        M = ML*OutletL.z + MV*OutletV.z;
     205       
     206        "Energy Holdup"
     207        E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
     208       
     209        "Mol fraction normalisation"
     210        sum(OutletL.z)= 1.0;
     211       
     212        "Liquid Volume"
     213        vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
     214        "Vapour Volume"
     215        vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
     216
     217        "Thermal Equilibrium"
     218        OutletV.T = OutletL.T;
     219       
     220        "Mechanical Equilibrium"
     221        OutletV.P = OutletL.P;
     222       
     223        "vaporization fraction "
     224        OutletV.v = 1.0;
     225        OutletL.v = 0.0;
     226       
     227        "Level of clear liquid over the weir"
     228        Level = ML*vL/Ap;
     229
     230        Vol = ML*vL;
     231       
     232        "Liquid Density"
     233        rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
     234        "Vapour Density"
     235        rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
     236
     237        if (Level > (beta * hw)) then
     238                "Francis Equation"
     239                OutletL.F = (1.84*"m^0.5/s"*lw*((Level-(beta*hw))/(beta))^1.5/vL);
     240        else
     241                "Low level"
     242                OutletL.F = 0 * "mol/h";
     243        end
     244
     245               
     246        "Pressure Drop through the tray"
     247        OutletV.F = (1 + tanh(1 * (OutletV.P - Pstartup)/"Pa"))/2 *
     248                Ah/vV * sqrt(2*(OutletV.P - InletL.P + 1e-8 * "atm") / (alfa*rhoV) );
     249       
     250
     251        "Chemical Equilibrium"
     252        PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
     253                PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*yideal;
     254       
     255        OutletV.z = Emv * (yideal - InletV.z) + InletV.z;
     256       
     257        sum(OutletL.z)= sum(OutletV.z);
     258       
     259        "Geometry Constraint"
     260        V = ML* vL + MV*vV;
     261end
Note: See TracChangeset for help on using the changeset viewer.