Changes in mso/eml/heat_exchangers/Mheatex.mso [45:1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mso/eml/heat_exchangers/Mheatex.mso
r45 r1 1 1 #*--------------------------------------------------------------------- 2 * Model of a Multistream Heat Exchanger 2 * This file is property of the author and cannot be used, copyed 3 * or modified without permission. 3 4 * 4 * Streams: 5 * * Inlet(Ninlet) streams .... at least one material stream 6 * * Outlet stream .... one material stream 5 * Copyright (C) 2004-2006 the author 7 6 * 8 * Purpose:9 * * Determines thermal and phase conditions of outlet stream10 7 * 8 * Multistream Heat Exchanger 9 * Cocurrent and Counter Flow 10 * 11 11 *---------------------------------------------------------------------- 12 12 * Author: Gerson Balbueno Bicca … … 16 16 using "streams.mso"; 17 17 18 Model Inlet_Main_Stream 19 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 18 Model Parameters 19 #===================================================================== 20 # Heat Exchanger Parameters 21 #===================================================================== 22 PARAMETERS 23 24 ext PP as CalcObject; 25 ext NComp as Integer (Brief="Number of Components"); 26 ext Ncold as Integer (Brief="Number of Inlet Cold Streams",Lower=1,Default=1); 27 ext Nhot as Integer (Brief="Number of Inlet Hot Streams",Lower=1,Default=1); 28 29 end 30 31 Model Inlet_Main_Stream as Parameters 32 #===================================================================== 20 33 # Inlet Streams 21 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 22 PARAMETERS 34 #===================================================================== 23 35 24 Ncold as Integer (Brief="Number of Inlet Cold Streams",Lower=1);25 Nhot as Integer (Brief="Number of Inlet Hot Streams",Lower=1);26 27 36 VARIABLES 28 37 29 Hot (Nhot)as stream;# Inlet Hot Streams30 Cold(Ncold) as stream;# Inlet Cold Streams38 Hot(Nhot) as stream;# Inlet Hot Streams 39 Cold(Ncold) as stream;# Inlet Cold Streams 31 40 32 41 end 33 42 34 Model Outlet_Main_Stream 35 # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#43 Model Outlet_Main_Stream as Parameters 44 #===================================================================== 36 45 # Outlet Streams 37 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 38 PARAMETERS 46 #===================================================================== 39 47 40 Ncold as Integer (Brief="Number of Inlet Cold Streams",Lower=1);41 Nhot as Integer (Brief="Number of Inlet Hot Streams",Lower=1);42 43 48 VARIABLES 44 49 45 Hot (Nhot)as stream_therm;# Outlet Hot Streams46 Cold(Ncold) as stream_therm;# Outlet Cold Streams50 Hot(Nhot) as stream_therm;# Outlet Hot Streams 51 Cold(Ncold) as stream_therm;# Outlet Cold Streams 47 52 48 53 end 49 54 50 55 Model Mheatex 51 # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#56 #===================================================================== 52 57 # Multistream Heat Exchanger Basic Calculation 53 # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#58 #===================================================================== 54 59 PARAMETERS 55 60 56 ext PP as CalcObject (Brief="Physical Properties"); 57 ext NComp as Integer (Brief="Number of Components"); 58 HE as CalcObject (Brief="Cold Box Calculations",File="heatex"); 61 ext HE as CalcObject (Brief="Cold Box Calculations",File="Heatex.dll"); 59 62 Side as Integer (Brief="Flow Direction",Lower=0,Upper=1); 60 Ncold as Integer (Brief="Number of Inlet Cold Streams",Lower=1); 61 Nhot as Integer (Brief="Number of Inlet Hot Streams",Lower=1); 62 63 64 SET 65 66 Side = HE.FlowDirection(); 67 63 68 VARIABLES 64 69 … … 69 74 LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference"); 70 75 UA as positive (Unit="W/K"); 71 72 SET 73 74 Side = HE.FlowDir(); 75 76 Inlet.Ncold = Ncold; 77 Outlet.Ncold = Ncold; 78 79 Inlet.Nhot = Nhot ; 80 Outlet.Nhot = Nhot ; 81 82 76 83 77 EQUATIONS 84 78 … … 110 104 Q=UA*LMTD; 111 105 112 # +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#106 #=================================================================== 113 107 # Flow Direction 114 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 115 108 #=================================================================== 116 109 if Side equal 0 117 110 118 111 then 112 #===================================================================== 113 # Cocurrent Flow Multistream Heat Exchanger 114 #=================================================================== 119 115 "Cocurrent Flow LMTD" 120 116 LMTD = HE.CocurrentLMTD(max(Inlet.Hot.T),min(Outlet.Hot.T),min(Inlet.Cold.T),max(Outlet.Cold.T)); 121 117 122 118 else 119 #===================================================================== 120 # Counter Flow Multistream Heat Exchanger 121 #===================================================================== 123 122 "Counter Flow LMTD" 124 123 LMTD = HE.CounterLMTD(max(Inlet.Hot.T),min(Outlet.Hot.T),max(Inlet.Cold.T),min(Outlet.Cold.T));
Note: See TracChangeset
for help on using the changeset viewer.