#*--------------------------------------------------------------------- * This file is property of the author and cannot be used, copyed * or modified without permission. * * Copyright (C) 2004-2006 the author * * * Multistream Heat Exchanger * Cocurrent and Counter Flow * *---------------------------------------------------------------------- * Author: Gerson Balbueno Bicca * $Id: Mheatex.mso 1 2006-06-20 17:33:53Z rafael $ *--------------------------------------------------------------------*# using "streams.mso"; Model Parameters #===================================================================== # Heat Exchanger Parameters #===================================================================== PARAMETERS ext PP as CalcObject; ext NComp as Integer (Brief="Number of Components"); ext Ncold as Integer (Brief="Number of Inlet Cold Streams",Lower=1,Default=1); ext Nhot as Integer (Brief="Number of Inlet Hot Streams",Lower=1,Default=1); end Model Inlet_Main_Stream as Parameters #===================================================================== # Inlet Streams #===================================================================== VARIABLES Hot(Nhot) as stream;# Inlet Hot Streams Cold(Ncold) as stream;# Inlet Cold Streams end Model Outlet_Main_Stream as Parameters #===================================================================== # Outlet Streams #===================================================================== 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 HE as CalcObject (Brief="Cold Box Calculations",File="Heatex.dll"); Side as Integer (Brief="Flow Direction",Lower=0,Upper=1); SET Side = HE.FlowDirection(); 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"); 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 Multistream Heat Exchanger #=================================================================== "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 Multistream Heat Exchanger #===================================================================== "Counter Flow LMTD" LMTD = HE.CounterLMTD(max(Inlet.Hot.T),min(Outlet.Hot.T),max(Inlet.Cold.T),min(Outlet.Cold.T)); end end