#*------------------------------------------------------------------- * 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: reboiler.mso 555 2008-07-18 19:01:13Z rafael $ *--------------------------------------------------------------------*# using "streams"; Model reboiler ATTRIBUTES Pallete = true; Icon = "icon/Reboiler"; Brief = "Model of a dynamic reboiler - kettle."; Info = "== Assumptions == * perfect mixing of both phases; * thermodynamics equilibrium; * no liquid entrainment in the vapour stream. == Specify == * the inlet stream; * the liquid inlet stream; * the outlet flows: OutletVapour.F and OutletLiquid.F; * the heat supply. == Initial Conditions == * the reboiler temperature (OutletLiquid.T); * the reboiler liquid level (Level); * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. "; PARAMETERS outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); outer NComp as Integer; Across as area (Brief="Cross Section Area of reboiler"); V as volume (Brief="Total volume of reboiler"); Initial_Level as length (Brief="Initial Level of liquid phase"); Initial_Temperature as temperature (Brief="Initial Temperature of Reboiler"); Initial_Composition(NComp) as fraction (Brief="Initial Liquid Composition"); VARIABLES in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.15, PosY=1, Symbol="_{inL}"); out OutletLiquid as liquid_stream (Brief="Liquid outlet stream", PosX=0.40, PosY=1, Symbol="_{outL}"); out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.40, PosY=0, Symbol="_{outV}"); in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0, Symbol="_{in}"); 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="Level of liquid phase"); rhoV as dens_mass (Brief="Vapour Density"); INITIAL Level = Initial_Level; OutletLiquid.T = Initial_Temperature; OutletLiquid.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); EQUATIONS "Component Molar Balance" diff(M)= InletLiquid.F*InletLiquid.z - OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z; "Energy Balance" diff(E) = InletLiquid.F*InletLiquid.h - OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + InletQ; "Molar Holdup" M = ML*OutletLiquid.z + MV*OutletVapour.z; "Energy Holdup" E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V; "Mol fraction normalisation" sum(OutletLiquid.z)=1.0; sum(OutletLiquid.z)=sum(OutletVapour.z); "Vapour Density" rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z); "Liquid Volume" vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z); "Vapour Volume" vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); "Chemical Equilibrium" PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z = PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z; "Mechanical Equilibrium" OutletLiquid.P = OutletVapour.P; "Thermal Equilibrium" OutletLiquid.T = OutletVapour.T; "Geometry Constraint" V = ML*vL + MV*vV; "Level of liquid phase" Level = ML*vL/Across; end #*---------------------------------------------------------------------- * Model of a Steady State reboiler with no thermodynamics equilibrium *---------------------------------------------------------------------*# Model reboilerSteady ATTRIBUTES Pallete = true; Icon = "icon/ReboilerSteady"; Brief = "Model of a Steady State reboiler with no thermodynamics equilibrium - thermosyphon."; Info = "== Assumptions == * perfect mixing of both phases; * no thermodynamics equilibrium; * no liquid entrainment in the vapour stream. == Specify == * the InletLiquid stream; * the heat supply OR the outlet temperature (OutletVapour.T); "; PARAMETERS outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); outer NComp as Integer; DP as press_delta (Brief="Pressure Drop in the reboiler"); VARIABLES in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}"); out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}"); in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}"); vV as volume_mol (Brief="Vapour Molar volume"); rhoV as dens_mass (Brief="Vapour Density"); EQUATIONS "Molar Balance" InletLiquid.F = OutletVapour.F; InletLiquid.z = OutletVapour.z; "Vapour Volume" vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); "Vapour Density" rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z); "Energy Balance" InletLiquid.F*InletLiquid.h + InletQ = OutletVapour.F*OutletVapour.h; "Pressure" DP = InletLiquid.P - OutletVapour.P; end #*---------------------------------------------------------------------- * Model of a Steady State reboiler with fake calculation of * vaporisation fraction and output temperature, but with a real * calculation of the output stream enthalpy *---------------------------------------------------------------------*# Model reboilerSteady_fakeH ATTRIBUTES Pallete = true; Icon = "icon/ReboilerSteady"; Brief = "Model of a Steady State reboiler with fake calculation of outlet conditions."; Info = "Model of a Steady State reboiler with fake calculation of vaporisation fraction and output temperature, but with a real calculation of the output stream enthalpy. "; PARAMETERS outer PP as Plugin(Brief = "External Physical Properties", Type="PP"); outer NComp as Integer; DP as press_delta (Brief="Pressure Drop in the reboiler"); k as Real (Brief = "Flow Constant", Unit='mol/J'); VARIABLES in InletLiquid as stream(Brief="Liquid inlet stream", PosX=0.3345, PosY=1, Symbol="_{inL}"); out OutletVapour as vapour_stream(Brief="Vapour outlet stream", PosX=0.3369, PosY=0, Symbol="_{outV}"); in InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6111, Symbol="_{in}"); EQUATIONS "Molar Balance" InletLiquid.F = OutletVapour.F; InletLiquid.z = OutletVapour.z; "Energy Balance" InletLiquid.F*InletLiquid.h + InletQ = OutletVapour.F*OutletVapour.h; "Pressure" DP = InletLiquid.P - OutletVapour.P; "Fake Vapourisation Fraction" OutletVapour.v = 1.0; "Fake output temperature" OutletVapour.T = 300*'K'; "Pressure Drop through the reboiler" OutletVapour.F = k*InletQ; end #*------------------------------------------------------------------- * Model of a dynamic reboiler with reaction *-------------------------------------------------------------------*# Model reboilerReact ATTRIBUTES Pallete = false; Icon = "icon/Reboiler"; Brief = "Model of a dynamic reboiler with reaction."; Info = "== Assumptions == * perfect mixing of both phases; * thermodynamics equilibrium; * no liquid entrainment in the vapour stream; * the reaction takes place only in the liquid phase. == Specify == * the kinetics variables; * the inlet stream; * the liquid inlet stream; * the outlet flows: OutletVapour.F and OutletLiquid.F; * the heat supply. == Initial Conditions == * the reboiler temperature (OutletLiquid.T); * the reboiler liquid level (Level); * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions. "; PARAMETERS outer PP as Plugin(Type="PP"); outer NComp as Integer; Across as area (Brief="Cross Section Area of reboiler"); V as volume (Brief="Total volume of reboiler"); stoic(NComp) as Real(Brief="Stoichiometric matrix"); Hr as energy_mol; Initial_Level as length (Brief="Initial Level of liquid phase"); Initial_Temperature as temperature (Brief="Initial Temperature of Reboiler"); Initial_Composition(NComp) as fraction (Brief="Initial Liquid Composition"); VARIABLES in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0, PosY=0.5254, Symbol="_{inL}"); out OutletLiquid as liquid_stream (Brief="Liquid outlet stream", PosX=0.2413, PosY=1, Symbol="_{outL}"); out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.5079, PosY=0, Symbol="_{outV}"); InletQ as power (Brief="Heat supplied", PosX=1, PosY=0.6123, Symbol="_{in}"); 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="Level of liquid phase"); Vol as volume; 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); INITIAL Level = Initial_Level; OutletLiquid.T = Initial_Temperature; OutletLiquid.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); EQUATIONS "Molar Concentration" OutletLiquid.z = vL * C; "Reaction" r3 = exp(-7150*'K'/OutletLiquid.T)*(4.85e4*C(1)*C(2) - 1.23e4*C(3)*C(4)) * 'l/mol/s'; "Component Molar Balance" diff(M)= InletLiquid.F*InletLiquid.z- OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z + stoic*r3*ML*vL; "Energy Balance" diff(E) = InletLiquid.F*InletLiquid.h- OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + InletQ + Hr * r3 * vL*ML; "Molar Holdup" M = ML*OutletLiquid.z + MV*OutletVapour.z; "Energy Holdup" E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V; "Mol fraction normalisation" sum(OutletLiquid.z)=1.0; "Liquid Volume" vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z); "Vapour Volume" vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); "Vapour Density" rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z); "Level of liquid phase" Level = ML*vL/Across; Vol = ML*vL; "Mechanical Equilibrium" OutletLiquid.P = OutletVapour.P; "Thermal Equilibrium" OutletLiquid.T = OutletVapour.T; "Geometry Constraint" V = ML*vL + MV*vV; "Chemical Equilibrium" PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z = PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z; sum(OutletLiquid.z)=sum(OutletVapour.z); end Model reboiler_column ATTRIBUTES Pallete = true; Icon = "icon/reboiler_column"; Brief = "Model of a dynamic reboiler - kettle with control."; Info = "== Assumptions == * perfect mixing of both phases; * thermodynamics equilibrium; * no liquid entrainment in the vapour stream. == Specify == * the inlet stream; * the liquid inlet stream; * the outlet flows: OutletVapour.F and OutletLiquid.F; * the heat supply. == Initial Conditions == * Initial_Temperature : the reboiler temperature (OutletLiquid.T); * Initial_Level : the reboiler liquid level (Level); * Initial_Composition : (NoComps) OutletLiquid compositions. "; PARAMETERS outer PP as Plugin (Brief = "External Physical Properties", Type="PP"); outer NComp as Integer (Brief="Number of Components"); Across as area (Brief="Cross Section Area of reboiler"); V as volume (Brief="Total volume of reboiler"); Initial_Level as length (Brief="Initial Level of liquid phase"); Initial_Temperature as temperature (Brief="Initial Temperature of Reboiler"); Initial_Composition(NComp) as fraction (Brief="Initial Liquid Composition"); VARIABLES in InletLiquid as stream (Brief="Liquid inlet stream", PosX=0, PosY=0.80, Symbol="_{inL}"); out OutletLiquid as liquid_stream (Brief="Liquid outlet stream", PosX=0.50, PosY=1, Symbol="_{outL}"); out OutletVapour as vapour_stream (Brief="Vapour outlet stream", PosX=0.50, PosY=0, Symbol="_{outV}"); in InletQ as power (Brief="Heat supplied", Protected = true, PosX=1, PosY=0.55, Symbol="_{in}"); out TCI as control_signal (Brief="Temperature Indicator of Reboiler", Protected = true, PosX=1, PosY=0.40); out LCI as control_signal (Brief="Level Indicator of Reboiler", Protected = true, PosX=1, PosY=0.25); 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="Level of liquid phase"); rhoV as dens_mass (Brief="Vapour Density"); INITIAL Level = Initial_Level; OutletLiquid.T = Initial_Temperature; OutletLiquid.z(1:NComp-1) = Initial_Composition(1:NComp-1)/sum(Initial_Composition); EQUATIONS "Component Molar Balance" diff(M)= InletLiquid.F*InletLiquid.z - OutletLiquid.F*OutletLiquid.z - OutletVapour.F*OutletVapour.z; "Energy Balance" diff(E) = InletLiquid.F*InletLiquid.h - OutletLiquid.F*OutletLiquid.h - OutletVapour.F*OutletVapour.h + InletQ; "Molar Holdup" M = ML*OutletLiquid.z + MV*OutletVapour.z; "Energy Holdup" E = ML*OutletLiquid.h + MV*OutletVapour.h - OutletLiquid.P*V; "Mol fraction normalisation" sum(OutletLiquid.z)=1.0; sum(OutletLiquid.z)=sum(OutletVapour.z); "Vapour Density" rhoV = PP.VapourDensity(OutletVapour.T, OutletVapour.P, OutletVapour.z); "Liquid Volume" vL = PP.LiquidVolume(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z); "Vapour Volume" vV = PP.VapourVolume(OutletVapour.T, OutletVapour.P, OutletVapour.z); "Chemical Equilibrium" PP.LiquidFugacityCoefficient(OutletLiquid.T, OutletLiquid.P, OutletLiquid.z)*OutletLiquid.z = PP.VapourFugacityCoefficient(OutletVapour.T, OutletVapour.P, OutletVapour.z)*OutletVapour.z; "Mechanical Equilibrium" OutletLiquid.P = OutletVapour.P; "Thermal Equilibrium" OutletLiquid.T = OutletVapour.T; "Geometry Constraint" V = ML*vL + MV*vV; "Level of liquid phase" Level = ML*vL/Across; "Temperature indicator" TCI * 'K' = OutletLiquid.T; "Level indicator" LCI*V = Level*Across; end