1 | #*--------------------------------------------------------------------- |
---|
2 | * Model of a Multistream Heat Exchanger |
---|
3 | * |
---|
4 | * Streams: |
---|
5 | * * Inlet(Ninlet) streams .... at least one material stream |
---|
6 | * * Outlet stream .... one material stream |
---|
7 | * |
---|
8 | * Purpose: |
---|
9 | * * Determines thermal and phase conditions of outlet stream |
---|
10 | * |
---|
11 | *---------------------------------------------------------------------- |
---|
12 | * Author: Gerson Balbueno Bicca |
---|
13 | * $Id: Mheatex.mso 45 2006-11-07 16:11:10Z bicca $ |
---|
14 | *--------------------------------------------------------------------*# |
---|
15 | |
---|
16 | using "streams.mso"; |
---|
17 | |
---|
18 | Model Inlet_Main_Stream |
---|
19 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
20 | # Inlet Streams |
---|
21 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
22 | PARAMETERS |
---|
23 | |
---|
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 | VARIABLES |
---|
28 | |
---|
29 | Hot (Nhot) as stream;# Inlet Hot Streams |
---|
30 | Cold (Ncold) as stream;# Inlet Cold Streams |
---|
31 | |
---|
32 | end |
---|
33 | |
---|
34 | Model Outlet_Main_Stream |
---|
35 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
36 | # Outlet Streams |
---|
37 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
38 | PARAMETERS |
---|
39 | |
---|
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 | VARIABLES |
---|
44 | |
---|
45 | Hot (Nhot) as stream_therm;# Outlet Hot Streams |
---|
46 | Cold (Ncold) as stream_therm;# Outlet Cold Streams |
---|
47 | |
---|
48 | end |
---|
49 | |
---|
50 | Model Mheatex |
---|
51 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
52 | # Multistream Heat Exchanger Basic Calculation |
---|
53 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
54 | PARAMETERS |
---|
55 | |
---|
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"); |
---|
59 | 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 | VARIABLES |
---|
64 | |
---|
65 | in Inlet as Inlet_Main_Stream; # Inlet Hot Streams |
---|
66 | out Outlet as Outlet_Main_Stream; # Outlet Hot Streams |
---|
67 | |
---|
68 | Q as power (Brief="Heat Transfer"); |
---|
69 | LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference"); |
---|
70 | 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 | |
---|
83 | EQUATIONS |
---|
84 | |
---|
85 | "Hot Flow" |
---|
86 | Outlet.Hot.F = Inlet.Hot.F; |
---|
87 | |
---|
88 | "Cold Flow" |
---|
89 | Outlet.Cold.F = Inlet.Cold.F; |
---|
90 | |
---|
91 | "Hot Composition" |
---|
92 | Outlet.Hot.z = Inlet.Hot.z; |
---|
93 | |
---|
94 | "Cold Composition" |
---|
95 | Outlet.Cold.z = Inlet.Cold.z; |
---|
96 | |
---|
97 | "Vapourisation Fraction Hot Stream" |
---|
98 | Outlet.Hot.v = Inlet.Hot.v; |
---|
99 | |
---|
100 | "Vapourisation Fraction Cold Stream" |
---|
101 | Outlet.Cold.v = Inlet.Cold.v; |
---|
102 | |
---|
103 | "Heat Duty Hot Stream" |
---|
104 | Q = sum(Inlet.Hot.F*(Inlet.Hot.h- Outlet.Hot.h)); |
---|
105 | |
---|
106 | "Heat Duty Cold Stream" |
---|
107 | Q = -sum(Inlet.Cold.F*(Inlet.Cold.h- Outlet.Cold.h)); |
---|
108 | |
---|
109 | "Heat Duty" |
---|
110 | Q=UA*LMTD; |
---|
111 | |
---|
112 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
113 | # Flow Direction |
---|
114 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
115 | |
---|
116 | if Side equal 0 |
---|
117 | |
---|
118 | then |
---|
119 | "Cocurrent Flow LMTD" |
---|
120 | LMTD = HE.CocurrentLMTD(max(Inlet.Hot.T),min(Outlet.Hot.T),min(Inlet.Cold.T),max(Outlet.Cold.T)); |
---|
121 | |
---|
122 | else |
---|
123 | "Counter Flow LMTD" |
---|
124 | LMTD = HE.CounterLMTD(max(Inlet.Hot.T),min(Outlet.Hot.T),max(Inlet.Cold.T),min(Outlet.Cold.T)); |
---|
125 | |
---|
126 | end |
---|
127 | |
---|
128 | end |
---|