#*------------------------------------------------------------------- * Model of a Batch Distillation (or Differential Distilation) *-------------------------------------------------------------------- * * Streams: * * a liquid inlet stream * * a vapour outlet stream * * a inlet stream * * Assumptions: * * perfect mixing of both phases * * thermodynamics equilibrium * * no liquid entrainment in the vapour stream * * Specify: * * the inlet stream * * the liquid inlet stream * * the molar flow of the vapour outlet stream * * Initial: * * the distillator temperature (T) * * the distillator liquid level (Ll) * * (NoComps - 1) compositions in the distillator * or in the OutletV * * *---------------------------------------------------------------------- * Author: Maurício Carvalho Maciel * $Id: batch_dist.mso 1 2006-06-20 17:33:53Z rafael $ *--------------------------------------------------------------------*# using "streams"; Model Diff_Dist PARAMETERS ext PP as CalcObject (Brief = "External Physical Properties"); ext NComp as Integer (Brief = "Number of chemical components", Lower = 1); Across as area (Brief="Cross Section Area"); V as volume (Brief="Total volume"); VARIABLES in Inlet as stream; #(Brief="Feed stream"); in InletL as stream; #(Brief="Liquid inlet stream"); out OutletV as stream_therm; #(Brief="Vapour outlet stream"); M(NComp) as mol (Brief="Molar Holdup in the distillator"); ML as mol (Brief="Molar liquid holdup"); MV as mol (Brief="Molar vapour holdup"); E as energy (Brief="Total Energy holdup on distillator"); volL as volume_mol (Brief="Liquid Molar Volume"); volV as volume_mol (Brief="Vapour Molar volume"); Level as length (Brief="Level of liquid phase", Default=1, Lower=0); T as temperature (Brief="Temperature on distillator"); P as pressure (Brief="Pressure on distillator"); x(NComp) as fraction (Brief = "Molar Fraction of the Liquid of the distillator"); h as enth_mol (Brief="Molar Enthalpy of the liquid of the distillator"); Q as heat_rate (Brief="Heat supplied"); EQUATIONS "Component Molar Balance" diff(M)= Inlet.F*Inlet.z + InletL.F*InletL.z - OutletV.F*OutletV.z; "Energy Balance" diff(E) = Inlet.F*Inlet.h + InletL.F*InletL.h - OutletV.F*OutletV.h + Q; "Molar Holdup" M = ML*x + MV*OutletV.z; "Energy Holdup" E = ML*h + MV*OutletV.h - P*V; "Mol fraction normalisation" sum(x)=1.0; sum(x)=sum(OutletV.z); "Liquid Volume" volL = PP.LiquidVolume(T, P, x); "Vapour Volume" volV = PP.VapourVolume(OutletV.T, OutletV.P, OutletV.z); "Chemical Equilibrium" PP.LiquidFugacityCoefficient(T, P, x)*x = PP.VapourFugacityCoefficient(OutletV.T, OutletV.P, OutletV.z)*OutletV.z; "Mechanical Equilibrium" P = OutletV.P; "Thermal Equilibrium" T = OutletV.T; "Geometry Constraint" V = ML*volL + MV*volV; "Level of liquid phase" Level = ML*volL/Across; "vaporization fraction " OutletV.v = 1.0; "Enthalpy" h = PP.LiquidEnthalpy(T, P, x); end