#*------------------------------------------------------------------- * Model of a dynamic flash *-------------------------------------------------------------------- * - Streams * * a liquid outlet stream * * a vapour outlet stream * * a feed stream * * - Assumptions * * both phases are perfectly mixed * * - Specify: * * the feed stream; * * the outlet flows: OutletV.F and OutletL.F * * - Initial: * * the flash initial temperature (OutletL.T) * * the flash initial liquid level (Ll) * * (NoComps - 1) OutletL (OR OutletV) compositions *---------------------------------------------------------------------- * Author: Paula B. Staudt * $Id: flash.mso 55 2006-11-12 20:27:35Z arge $ *--------------------------------------------------------------------*# using "streams"; Model flash PARAMETERS ext PP as CalcObject; ext NComp as Integer; V as volume(Brief="Total Volume of the flash"); Mw(NComp) as molweight; Across as area (Brief="Flash Cross section area"); SET Mw=PP.MolecularWeight(); VARIABLES in Inlet as stream; #(Brief="Feed 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="Rate of heat supply"); 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="liquid height"); EQUATIONS "Component Molar Balance" diff(M)=Inlet.F*Inlet.z - OutletL.F*OutletL.z - OutletV.F*OutletV.z; "Energy Balance" diff(E) = Inlet.F*Inlet.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; "Mol fraction normalisation" 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" OutletV.T = OutletL.T; "Mechanical Equilibrium" OutletV.P = OutletL.P; "Geometry Constraint" V = ML* vL + MV*vV; "Liquid Level" ML* vL = Across * Level; "vaporization fraction " OutletV.v = 1.0; "vaporization fraction " OutletL.v = 0.0; end #*---------------------------------------------------------------------- * Model of a Steady State flash *---------------------------------------------------------------------*# Model flash_Steady PARAMETERS ext PP as CalcObject; ext NComp as Integer; VARIABLES in Inlet as stream; #(Brief="Feed 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="Rate of heat supply"); vfrac as fraction; EQUATIONS "The flash calculation" [vfrac, OutletL.z, OutletV.z] = PP.Flash(OutletV.T, OutletV.P, Inlet.z); "Global Molar Balance" Inlet.F = OutletV.F + OutletL.F; OutletV.F = Inlet.F * vfrac; "Energy Balance" Inlet.F*Inlet.h + Q = OutletL.F*OutletL.h + OutletV.F*OutletV.h; "Thermal Equilibrium" OutletV.T = OutletL.T; "Mechanical Equilibrium" OutletV.P = OutletL.P; "vaporization fraction " OutletV.v = 1.0; "vaporization fraction " OutletL.v = 0.0; end