#*------------------------------------------------------------------- * 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. * *--------------------------------------------------------------------- * Model of a Heater and Cooler * * Streams: * * Inlet(Ninlet) streams .... at least one material stream * * Outlet stream .... one material stream * * Purpose: * * Determines thermal and phase conditions of outlet stream * *---------------------------------------------------------------------- * Author: Gerson Balbueno Bicca * \$Id: heater.mso 78 2006-12-08 19:29:10Z paula \$ *--------------------------------------------------------------------*# using "streams.mso"; Model Heater_Cooler_Basic #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# # Heater or Cooler Basic Equations #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# PARAMETERS ext PP as CalcObject(Brief="Physical Properties"); ext NComp as Integer (Brief="Number of Components"); Ninlet as Integer (Brief="Number of Inlet Streams",Lower=1); VARIABLES in Inlet(Ninlet) as stream; #(Brief="Inlet Streams") out Outlet as stream_therm;#(Brief="Outlet Stream") Q as power (Brief = "Heat Transfer"); Vfrac as fraction (Brief = "Vapor fraction Outlet Stream"); Lfrac as fraction (Brief = "Liquid fraction Outlet Stream"); EQUATIONS "Flow" Outlet.F = sum(Inlet.F); for j in [1 : NComp] "Composition" Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j)); end "Outlet Vapourisation Fraction" Outlet.v = PP.VapourFraction(Outlet.T,Outlet.P,Outlet.z); "Vapor fraction Outlet Stream" Vfrac = Outlet.v; "Liquid fraction Outlet Stream" Lfrac = 1-Vfrac; end Model Heater as Heater_Cooler_Basic #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# # Heater #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# EQUATIONS "Heat Duty" Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h); end Model Cooler as Heater_Cooler_Basic #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# # Cooler #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# EQUATIONS "Heat Duty" Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h; end