#*------------------------------------------------------------------- * 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 448 2008-01-22 17:14:11Z paula $ *--------------------------------------------------------------------*# 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, Symbol="_{in}"); in InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}"); in InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}"); out OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}"); out OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}"); 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"); VapourFlow as Switcher(Valid = ["on", "off"], Default = "on"); LiquidFlow as Switcher(Valid = ["on", "off"], Default = "on"); 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); switch LiquidFlow case "on": "Francis Equation" # OutletL.F*vL = 1.84*'m^0.5/s'*lw*((Level-(beta*hw))/(beta))^1.5; OutletL.F*vL = 1.84*'1/s'*lw*((Level-(beta*hw))/(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.F*vV = sqrt((InletV.P - OutletV.P)/(rhoV*alfa))*Ah; when InletV.F < 1e-6 * 'kmol/h' switchto "off"; case "off": InletV.F = 0 * 'mol/s'; when InletV.P > OutletV.P + Level*g*rhoL + 1e-1 * 'atm' switchto "on"; end end Model packedStage as trayBasic PARAMETERS PPwater as Plugin(Brief="Physical Properties", Type="PP", Components = [ "water" ], LiquidModel = "PR", VapourModel = "PR" ); # PackingType as Switcher(Valid = ["random", "structured"], Default = "randon"); # PressureDropModel as Switcher(Valid = ["Leva", "Prahl"], Default = "Prahl"); a as Real (Brief="Constant used in Leva equation", Default=873.55); b as Real (Brief="Constant used in Leva equation", Default=0.058); # Fp as Real (Brief="Packing factor", Default = 300); e as fraction (Brief="Packing Porosity", Default=0.84); dp as length (Brief="Packing Dimension", Default=0.013); # C as Real (Brief="Prahl method constant", Unit = 'kg^0.2*m^1.8/s^2.2', Default = 2.994); # S as length (Brief="Structured packing parameter", Default=0.009); # teta as Real (Brief="Structured packing parameter", Unit= 'deg', Default=45); # C3 as Real (Brief="Structured packing parameter", Default=3.38); Across as area (Brief="Tower cross section area"); Mw(NComp) as molweight (Brief = "Component Mol Weight"); g as acceleration (Default=9.81); SET Mw = PP.MolecularWeight(); Ap = Across; VARIABLES rhoL as dens_mass (Brief="Liquid density"); rhoV as dens_mass (Brief="Vapor density"); viscL as viscosity (Brief="Liquid Viscosity"); # viscV as viscosity (Brief="Vapor Viscosity"); rhow as dens_mass (Brief="Water density"); visclw as viscosity (Brief="Water viscosity"); L as flux_mass (Brief="Liquid mass flux"); G as flux_mass (Brief="Liquid mass flux"); Llin as flux_mass (Brief="Water contribution on liquid mass flux"); # X as Real (Brief="Term in Prahl correlation"); # Y as Real (Brief="Term in Prahl correlation"); # Reg as Real (Brief="Packing Reynolds"); # Ge as velocity (Brief="Temporay variable"); # Fr as Real (Brief="Froud number"); phiL as Real (Brief="Liquid holdup in packed towers"); # deltaP_z as Real (Unit = 'inH2O/ft'); EQUATIONS # deltaP_z = (InletV.P - OutletV.P) / (V/Across); "If the liquid is not water - mass flux correction" Llin = L * rhow/rhoL; "Base unit conversion (mol -> mass)" L = OutletL.F*sum(Mw*OutletL.z)/Across; G = OutletV.F*sum(Mw*OutletV.z)/Across; # "X in Prahl correlation" # X * G = L * (rhoV/rhoL)^0.5; # "Y in Prahl correlation" # Y = G^2 * Fp * (rhow/rhoL) * viscL^0.2 / (rhoV*rhoL*C) ; "Water Liquid Viscosity" visclw = PPwater.LiquidViscosity(OutletL.T, OutletL.P, 1); "Water Liquid Density" rhow = PPwater.LiquidDensity(OutletL.T, OutletL.P, 1); "Liquid Viscosity" viscL = PP.LiquidViscosity(OutletL.T, OutletL.P, OutletL.z); # "Vapor Viscosity" # viscV = PP.VapourViscosity(OutletV.T, OutletV.P, OutletV.z); "Liquid Density" rhoL = PP.LiquidDensity(OutletL.T, OutletL.P, OutletL.z); "Vapour Density" rhoV = PP.VapourDensity(InletV.T, InletV.P, InletV.z); # "Froud number" # Fr = (L/rhoL)^2 / S/g; # "Reynolds number" # Reg = S*(G/rhoV/(e*sin(teta)))*rhoV/viscV; # "Temporary variable" # Ge = G/rhoV /(e*sin(teta)); "Conversion from ML to phiL" phiL = ML*vL / V; # switch PackingType # case "random": # switch PressureDropModel # case "Leva": (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')); #(InletV.P - OutletV.P) / (V/(Across) ) = a * 10^(b*Llin) * (G)^2/(rhoV); # case "Prahl": # (InletV.P - OutletV.P)/'0.03937*inH2O' = (V/Across)/'m' * Y*(1116*X+500)/(1-Y*(35*X+3)); # end phiL = (1.53e-4 + (2.9e-5*e*(dp*L/(viscL*e))^0.66 * (viscL/visclw)^0.75)) * (dp/'m')^(-1.2); #* case "structured": (InletV.P - OutletV.P)/'Pa'= (V/Across)/'m' * ( (0.171 + 92.7/Reg) * (rhoV/('kg/m^3')*(Ge/('m/s'))^2/(S/'m')) ) * (1/(1-C3 * sqrt(Fr) ))^5; phiL = C3 * sqrt(Fr); 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, Symbol="_{in}"); in InletL as stream (Brief="Inlet liquid stream", PosX=0.5195, PosY=0, Symbol="_{inL}"); in InletV as stream (Brief="Inlet vapour stream", PosX=0.4994, PosY=1, Symbol="_{inV}"); out OutletL as liquid_stream (Brief="Outlet liquid stream", PosX=0.8277, PosY=1, Symbol="_{outL}"); out OutletV as vapour_stream (Brief="Outlet vapour stream", PosX=0.8043, PosY=0, Symbol="_{outV}"); 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