#*-------------------------------------------------------------------
* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
*
* This LIBRARY is free software; you can distribute it and/or modify
* it under the therms of the ALSOC FREE LICENSE as available at
* http://www.enq.ufrgs.br/alsoc.
*
* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
* from http://www.rps.eng.br Copyright (C) 2002-2004.
* All rights reserved.
*
* EMSO is distributed under the therms of the ALSOC LICENSE as
* available at http://www.enq.ufrgs.br/alsoc.
*
*----------------------------------------------------------------------
* Author: Paula B. Staudt
* $Id: tray.mso 325 2007-07-29 00:41:04Z arge $
*--------------------------------------------------------------------*#
using "streams";
Model trayBasic
ATTRIBUTES
Pallete = false;
Icon = "icon/Tray";
Brief = "Basic equations of a tray column model.";
Info =
"This model contains only the main equations of a column tray equilibrium model without
the hidraulic equations.
Assumptions
* both phases (liquid and vapour) exists all the time;
* thermodymanic equilibrium with Murphree plate efficiency;
* no entrainment of liquid or vapour phase;
* no weeping;
* the dymanics in the downcomer are neglected.
";
PARAMETERS
outer PP as Plugin(Brief = "External Physical Properties", Type="PP");
outer NComp as Integer;
V as volume(Brief="Total Volume of the tray");
Q as heat_rate (Brief="Rate of heat supply");
Ap as area (Brief="Plate area = Atray - Adowncomer");
VARIABLES
in Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932);
in InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0);
in InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1);
out OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1);
out OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0);
M(NComp) as mol (Brief="Molar Holdup in the tray");
ML as mol (Brief="Molar liquid holdup");
MV as mol (Brief="Molar vapour holdup");
E as energy (Brief="Total Energy Holdup on tray");
vL as volume_mol (Brief="Liquid Molar Volume");
vV as volume_mol (Brief="Vapour Molar volume");
Level as length (Brief="Height of clear liquid on plate");
yideal(NComp) as fraction;
Emv as Real (Brief = "Murphree efficiency");
EQUATIONS
"Component Molar Balance"
diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z
- OutletL.F*OutletL.z - OutletV.F*OutletV.z;
"Energy Balance"
diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h
- OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q );
"Molar Holdup"
M = ML*OutletL.z + MV*OutletV.z;
"Energy Holdup"
E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
"Mol fraction normalisation"
sum(OutletL.z)= 1.0;
sum(OutletL.z)= sum(OutletV.z);
"Liquid Volume"
vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
"Vapour Volume"
vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
"Chemical Equilibrium"
PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal;
"Murphree Efficiency"
OutletV.z = Emv * (yideal - InletV.z) + InletV.z;
"Thermal Equilibrium"
OutletV.T = OutletL.T;
"Mechanical Equilibrium"
OutletV.P = OutletL.P;
"Geometry Constraint"
V = ML* vL + MV*vV;
"Level of clear liquid over the weir"
Level = ML*vL/Ap;
end
Model tray as trayBasic
ATTRIBUTES
Pallete = false;
Icon = "icon/Tray";
Brief = "Complete model of a column tray.";
Info =
"Specify:
* the Feed stream
* the Liquid inlet stream
* the Vapour inlet stream
* the Vapour outlet flow (OutletV.F)
Initial:
* the plate temperature (OutletL.T)
* the liquid height (Level) OR the liquid flow OutletL.F
* (NoComps - 1) OutletL compositions
";
PARAMETERS
Ah as area (Brief="Total holes area");
lw as length (Brief="Weir length");
g as acceleration (Default=9.81);
hw as length (Brief="Weir height");
beta as fraction (Brief="Aeration fraction");
alfa as fraction (Brief="Dry pressure drop coefficient");
VARIABLES
rhoL as dens_mass;
rhoV as dens_mass;
EQUATIONS
"Liquid Density"
rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
"Vapour Density"
rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
if Level > (beta * hw) then
"Francis Equation"
OutletL.F = 1.84*'1/s'*lw*((Level-(beta*hw))/(beta))^2/vL;
else
"Low level"
OutletL.F = 0 * 'mol/h';
end
end
#*-------------------------------------------------------------------
* Model of a tray with reaction
*-------------------------------------------------------------------*#
Model trayReact
ATTRIBUTES
Pallete = false;
Icon = "icon/Tray";
Brief = "Model of a tray with reaction.";
Info =
"Assumptions
* both phases (liquid and vapour) exists all the time;
* thermodymanic equilibrium with Murphree plate efficiency;
* no entrainment of liquid or vapour phase;
* no weeping;
* the dymanics in the downcomer are neglected.
Specify:
* the Feed stream;
* the Liquid inlet stream;
* the Vapour inlet stream;
* the Vapour outlet flow (OutletV.F);
* the reaction related variables.
Initial:
* the plate temperature (OutletL.T)
* the liquid height (Level) OR the liquid flow OutletL.F
* (NoComps - 1) OutletL compositions
";
PARAMETERS
outer PP as Plugin(Type="PP");
outer NComp as Integer;
V as volume(Brief="Total Volume of the tray");
Q as power (Brief="Rate of heat supply");
Ap as area (Brief="Plate area = Atray - Adowncomer");
Ah as area (Brief="Total holes area");
lw as length (Brief="Weir length");
g as acceleration (Default=9.81);
hw as length (Brief="Weir height");
beta as fraction (Brief="Aeration fraction");
alfa as fraction (Brief="Dry pressure drop coefficient");
stoic(NComp) as Real(Brief="Stoichiometric matrix");
Hr as energy_mol;
Pstartup as pressure;
VapourFlow as Switcher(Valid = ["on", "off"], Default = "off");
LiquidFlow as Switcher(Valid = ["on", "off"], Default = "off");
VARIABLES
in Inlet as stream (Brief="Feed stream", PosX=0, PosY=0.4932);
in InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0);
in InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1);
out OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1);
out OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0);
yideal(NComp) as fraction;
Emv as Real (Brief = "Murphree efficiency");
M(NComp) as mol (Brief="Molar Holdup in the tray");
ML as mol (Brief="Molar liquid holdup");
MV as mol (Brief="Molar vapour holdup");
E as energy (Brief="Total Energy Holdup on tray");
vL as volume_mol (Brief="Liquid Molar Volume");
vV as volume_mol (Brief="Vapour Molar volume");
Level as length (Brief="Height of clear liquid on plate");
Vol as volume;
rhoL as dens_mass;
rhoV as dens_mass;
r3 as reaction_mol (Brief = "Reaction resulting ethyl acetate", DisplayUnit = 'mol/l/s');
C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); #, Unit = "mol/l");
EQUATIONS
"Molar Concentration"
OutletL.z = vL * C;
"Reaction"
r3 = exp(-7150*'K'/OutletL.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4))*'l/mol/s';
"Component Molar Balance"
diff(M)=Inlet.F*Inlet.z + InletL.F*InletL.z + InletV.F*InletV.z
- OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r3*ML*vL;
"Energy Balance"
diff(E) = ( Inlet.F*Inlet.h + InletL.F*InletL.h + InletV.F*InletV.h
- OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q ) + Hr * r3 * vL*ML;
"Molar Holdup"
M = ML*OutletL.z + MV*OutletV.z;
"Energy Holdup"
E = ML*OutletL.h + MV*OutletV.h - OutletL.P*V;
"Mol fraction normalisation"
sum(OutletL.z)= 1.0;
"Liquid Volume"
vL = PP.LiquidVolume(OutletL.T, OutletL.P, OutletL.z);
"Vapour Volume"
vV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z);
"Thermal Equilibrium"
OutletV.T = OutletL.T;
"Mechanical Equilibrium"
OutletV.P = OutletL.P;
"Level of clear liquid over the weir"
Level = ML*vL/Ap;
Vol = ML*vL;
"Liquid Density"
rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z);
"Vapour Density"
rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z);
switch LiquidFlow
case "on":
"Francis Equation"
OutletL.F*vL = 1.84*'1/s'*lw*((Level-(beta*hw)+1e-6*'m')/(beta))^2;
when Level < (beta * hw) switchto "off";
case "off":
"Low level"
OutletL.F = 0 * 'mol/h';
when Level > (beta * hw) + 1e-6*'m' switchto "on";
end
switch VapourFlow
case "on":
#InletV.P = OutletV.P + Level*g*rhoL + rhoV*alfa*(InletV.F*vV/Ah)^2;
InletV.F*vV = sqrt((InletV.P - OutletV.P - Level*g*rhoL + 1e-8 * 'atm')/(rhoV*alfa))*Ah;
when InletV.P < OutletV.P + Level*g*rhoL switchto "off";
case "off":
InletV.F = 0 * 'mol/s';
when InletV.P > OutletV.P + Level*g*rhoL + 3e-2 * 'atm' switchto "on";
#when InletV.P > OutletV.P + Level*beta*g*rhoL + 1e-2 * 'atm' switchto "on";
end
"Chemical Equilibrium"
PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z =
PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, yideal)*yideal;
OutletV.z = Emv * (yideal - InletV.z) + InletV.z;
sum(OutletL.z)= sum(OutletV.z);
"Geometry Constraint"
V = ML* vL + MV*vV;
end