#*------------------------------------------------------------------- * Model of a dynamic condenser *-------------------------------------------------------------------- * * Streams: * * a vapour inlet stream * * a liquid outlet stream * * Assumptions: * * perfect mixing of both phases * * thermodynamics equilibrium * * Specify: * * the Inlet stream * * the Outlet flows * * Initial: * * the condenser temperature (OutletL.T) * * the condenser level (Ll) * * (NoComps - 1) Outlet compositions * *---------------------------------------------------------------------- * Author: Paula B. Staudt * $Id: condenser.mso 65 2006-11-24 03:22:15Z arge $ *--------------------------------------------------------------------*# using "streams"; Model condenser PARAMETERS ext PP as CalcObject; ext NComp as Integer; V as volume (Brief="Condenser total volume"); Across as area (Brief="Cross Section Area of reboiler"); VARIABLES in InletV as stream; #(Brief="Vapour inlet stream"); out OutletL as stream_therm; #(Brief="Liquid outlet stream"); out OutletV as stream_therm; #(Brief="Vapour outlet stream"); in Q as heat_rate (Brief="Heat supplied"); 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"); EQUATIONS "Component Molar Balance" diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z - OutletV.F*OutletV.z; "Energy Balance" diff(E) = 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 - OutletV.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, OutletV.z)*OutletV.z; "Thermal Equilibrium" OutletL.T = OutletV.T; "Mechanical Equilibrium" OutletV.P = OutletL.P; "Geometry Constraint" V = ML*vL + MV*vV; "Level of liquid phase" Level = ML*vL/Across; "Vapourisation Fraction" OutletL.v = 0.0; OutletV.v = 1.0; end #*---------------------------------------------------------------------- * Model of a Steady State condenser with no thermodynamics equilibrium *---------------------------------------------------------------------*# Model condenserSteady PARAMETERS ext PP as CalcObject; ext NComp as Integer; VARIABLES in InletV as stream; #(Brief="Vapour inlet stream"); out OutletL as stream_therm; #(Brief="Liquid outlet stream"); in Q as heat_rate (Brief="Heat supplied"); DP as press_delta (Brief="Pressure Drop in the condenser"); EQUATIONS "Molar Balance" InletV.F = OutletL.F; InletV.z = OutletL.z; "Energy Balance" InletV.F*InletV.h = OutletL.F*OutletL.h + Q; "Pressure" DP = InletV.P - OutletL.P; "Vapourisation Fraction" OutletL.v = 0.0; end #*------------------------------------------------------------------- * Condenser with reaction in liquid phase *--------------------------------------------------------------------*# Model condenserReact PARAMETERS ext PP as CalcObject; ext NComp as Integer; V as volume (Brief="Condenser total volume"); Across as area (Brief="Cross Section Area of reboiler"); stoic(NComp) as Real(Brief="Stoichiometric matrix"); Hr as energy_mol; Pstartup as pressure; VARIABLES in InletV as stream; #(Brief="Vapour inlet stream"); out OutletL as stream_therm; #(Brief="Liquid outlet stream"); out OutletV as stream_therm; #(Brief="Vapour outlet stream"); 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"); Q as heat_rate (Brief="Heat supplied"); Vol as volume; r as reaction_mol (Brief = "Reaction rate", Unit = "mol/l/s"); C(NComp) as conc_mol (Brief = "Molar concentration", Lower = -1); EQUATIONS "Molar Concentration" OutletL.z = vL * C; "Component Molar Balance" diff(M) = InletV.F*InletV.z - OutletL.F*OutletL.z - OutletV.F*OutletV.z + stoic*r*ML*vL; "Energy Balance" diff(E) = InletV.F*InletV.h - OutletL.F*OutletL.h - OutletV.F*OutletV.h + Q + Hr * r * ML*vL; "Molar Holdup" M = ML*OutletL.z + MV*OutletV.z; "Energy Holdup" E = ML*OutletL.h + MV*OutletV.h - OutletV.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" OutletL.T = OutletV.T; "Mechanical Equilibrium" OutletV.P = OutletL.P; "Geometry Constraint" V = ML*vL + MV*vV; Vol = ML*vL; "Level of liquid phase" Level = ML*vL/Across; "Vapourisation Fraction" OutletL.v = 0.0; OutletV.v = 1.0; "Chemical Equilibrium" PP.LiquidFugacityCoefficient(OutletL.T, OutletL.P, OutletL.z)*OutletL.z = PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z; sum(OutletL.z)=sum(OutletV.z); end