#*------------------------------------------------------------------- * 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 Multistream Heat Exchanger * * 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: Mheatex.mso 78 2006-12-08 19:29:10Z paula $ *--------------------------------------------------------------------*# using "streams.mso"; Model Inlet_Main_Stream #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# # Inlet Streams #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# PARAMETERS Ncold as Integer (Brief="Number of Inlet Cold Streams",Lower=1); Nhot as Integer (Brief="Number of Inlet Hot Streams",Lower=1); VARIABLES Hot (Nhot) as stream;# Inlet Hot Streams Cold (Ncold) as stream;# Inlet Cold Streams end Model Outlet_Main_Stream #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# # Outlet Streams #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# PARAMETERS Ncold as Integer (Brief="Number of Inlet Cold Streams",Lower=1); Nhot as Integer (Brief="Number of Inlet Hot Streams",Lower=1); VARIABLES Hot (Nhot) as stream_therm;# Outlet Hot Streams Cold (Ncold) as stream_therm;# Outlet Cold Streams end Model Mheatex #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# # Multistream Heat Exchanger Basic Calculation #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# PARAMETERS ext PP as CalcObject (Brief="Physical Properties"); ext NComp as Integer (Brief="Number of Components"); HE as CalcObject (Brief="Cold Box Calculations",File="heatex"); Side as Integer (Brief="Flow Direction",Lower=0,Upper=1); Ncold as Integer (Brief="Number of Inlet Cold Streams",Lower=1); Nhot as Integer (Brief="Number of Inlet Hot Streams",Lower=1); VARIABLES in Inlet as Inlet_Main_Stream; # Inlet Hot Streams out Outlet as Outlet_Main_Stream; # Outlet Hot Streams Q as power (Brief="Heat Transfer"); LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference"); UA as positive (Unit="W/K"); SET Side = HE.FlowDir(); Inlet.Ncold = Ncold; Outlet.Ncold = Ncold; Inlet.Nhot = Nhot ; Outlet.Nhot = Nhot ; EQUATIONS "Hot Flow" Outlet.Hot.F = Inlet.Hot.F; "Cold Flow" Outlet.Cold.F = Inlet.Cold.F; "Hot Composition" Outlet.Hot.z = Inlet.Hot.z; "Cold Composition" Outlet.Cold.z = Inlet.Cold.z; "Vapourisation Fraction Hot Stream" Outlet.Hot.v = Inlet.Hot.v; "Vapourisation Fraction Cold Stream" Outlet.Cold.v = Inlet.Cold.v; "Heat Duty Hot Stream" Q = sum(Inlet.Hot.F*(Inlet.Hot.h- Outlet.Hot.h)); "Heat Duty Cold Stream" Q = -sum(Inlet.Cold.F*(Inlet.Cold.h- Outlet.Cold.h)); "Heat Duty" Q=UA*LMTD; #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# # Flow Direction #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# if Side equal 0 then "Cocurrent Flow LMTD" LMTD = HE.CocurrentLMTD(max(Inlet.Hot.T),min(Outlet.Hot.T),min(Inlet.Cold.T),max(Outlet.Cold.T)); else "Counter Flow LMTD" LMTD = HE.CounterLMTD(max(Inlet.Hot.T),min(Outlet.Hot.T),max(Inlet.Cold.T),min(Outlet.Cold.T)); end end