1 | #*------------------------------------------------------------------- |
---|
2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
3 | * |
---|
4 | * This LIBRARY is free software; you can distribute it and/or modify |
---|
5 | * it under the therms of the ALSOC FREE LICENSE as available at |
---|
6 | * http://www.enq.ufrgs.br/alsoc. |
---|
7 | * |
---|
8 | * EMSO Copyright (C) 2004 - 2007 ALSOC, original code |
---|
9 | * from http://www.rps.eng.br Copyright (C) 2002-2004. |
---|
10 | * All rights reserved. |
---|
11 | * |
---|
12 | * EMSO is distributed under the therms of the ALSOC LICENSE as |
---|
13 | * available at http://www.enq.ufrgs.br/alsoc. |
---|
14 | * |
---|
15 | *-------------------------------------------------------------------- |
---|
16 | * Author: Gerson Balbueno Bicca |
---|
17 | * $Id: HeatExchangerSimplified.mso 160 2007-02-08 18:37:44Z bicca $ |
---|
18 | *--------------------------------------------------------------------*# |
---|
19 | |
---|
20 | using "heat_exchangers/HEX_Engine"; |
---|
21 | |
---|
22 | Model HeatExchangerSimplified_Basic |
---|
23 | |
---|
24 | ATTRIBUTES |
---|
25 | Pallete = false; |
---|
26 | Brief = "Basic Models for Simplified Heat Exchangers"; |
---|
27 | Info = |
---|
28 | "to be documented."; |
---|
29 | |
---|
30 | PARAMETERS |
---|
31 | outer PP as Plugin (Brief="External Physical Properties", Type="PP"); |
---|
32 | outer NComp as Integer (Brief="Number of Components"); |
---|
33 | |
---|
34 | M(NComp) as molweight (Brief="Component Mol Weight"); |
---|
35 | |
---|
36 | VARIABLES |
---|
37 | |
---|
38 | in InletHot as streamTherm (Brief="Inlet Hot Stream", PosX=0, PosY=0.4915); |
---|
39 | out OutletHot as streamPH (Brief="Outlet Hot Stream", PosX=1, PosY=0.4915); |
---|
40 | in InletCold as streamTherm (Brief="Inlet Cold Stream", PosX=0.5237, PosY=1); |
---|
41 | out OutletCold as streamPH (Brief="Outlet Cold Stream", PosX=0.5237, PosY=0); |
---|
42 | |
---|
43 | Details as Details_Main (Brief="Heat Exchanger Details"); |
---|
44 | HotSide as Main_Simplified (Brief="Heat Exchanger Hot Side"); |
---|
45 | ColdSide as Main_Simplified (Brief="Heat Exchanger Cold Side"); |
---|
46 | |
---|
47 | SET |
---|
48 | |
---|
49 | #"Component Molecular Weight" |
---|
50 | M = PP.MolecularWeight(); |
---|
51 | |
---|
52 | EQUATIONS |
---|
53 | |
---|
54 | #"Flash Calculation in Hot Side" |
---|
55 | # [vh, xh, yh] = PP.Flash(InletHot.T, InletHot.P, InletHot.z); |
---|
56 | |
---|
57 | #"Flash Calculation in Cold Side" |
---|
58 | # [vc, xc, yc] = PP.Flash(InletCold.T, InletCold.P, InletCold.z); |
---|
59 | |
---|
60 | "Hot Stream Average Temperature" |
---|
61 | HotSide.Properties.Average.T = 0.5*InletHot.T + 0.5*OutletHot.T; |
---|
62 | |
---|
63 | "Cold Stream Average Temperature" |
---|
64 | ColdSide.Properties.Average.T = 0.5*InletCold.T + 0.5*OutletCold.T; |
---|
65 | |
---|
66 | "Hot Stream Average Pressure" |
---|
67 | HotSide.Properties.Average.P = 0.5*InletHot.P+0.5*OutletHot.P; |
---|
68 | |
---|
69 | "Cold Stream Average Pressure" |
---|
70 | ColdSide.Properties.Average.P = 0.5*InletCold.P+0.5*OutletCold.P; |
---|
71 | |
---|
72 | "Cold Stream Wall Temperature" |
---|
73 | ColdSide.Properties.Wall.Twall = 0.5*HotSide.Properties.Average.T + 0.5*ColdSide.Properties.Average.T; |
---|
74 | |
---|
75 | "Hot Stream Wall Temperature" |
---|
76 | HotSide.Properties.Wall.Twall = 0.5*HotSide.Properties.Average.T + 0.5*ColdSide.Properties.Average.T; |
---|
77 | |
---|
78 | "Hot Stream Average Molecular Weight" |
---|
79 | HotSide.Properties.Average.Mw = sum(M*InletHot.z); |
---|
80 | |
---|
81 | "Cold Stream Average Molecular Weight" |
---|
82 | ColdSide.Properties.Average.Mw = sum(M*InletCold.z); |
---|
83 | |
---|
84 | "Cold Stream Average Heat Capacity" |
---|
85 | ColdSide.Properties.Average.Cp = (1-InletCold.v)*PP.LiquidCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.x) + |
---|
86 | InletCold.v*PP.VapourCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.y); |
---|
87 | |
---|
88 | "Cold Stream Inlet Heat Capacity" |
---|
89 | ColdSide.Properties.Inlet.Cp = (1-InletCold.v)*PP.LiquidCp(InletCold.T,InletCold.P,InletCold.x)+ |
---|
90 | InletCold.v*PP.VapourCp(InletCold.T,InletCold.P,InletCold.y); |
---|
91 | |
---|
92 | "Cold Stream Outlet Heat Capacity" |
---|
93 | ColdSide.Properties.Outlet.Cp = (1-OutletCold.v)*PP.LiquidCp(OutletCold.T,OutletCold.P,OutletCold.x)+ |
---|
94 | OutletCold.v*PP.VapourCp(OutletCold.T,OutletCold.P,OutletCold.y); |
---|
95 | |
---|
96 | "Cold Stream Average Mass Density" |
---|
97 | ColdSide.Properties.Average.rho = (1-InletCold.v)*PP.LiquidDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.x)+ |
---|
98 | InletCold.v*PP.VapourDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.y); |
---|
99 | |
---|
100 | "Cold Stream Inlet Mass Density" |
---|
101 | ColdSide.Properties.Inlet.rho = (1-InletCold.v)*PP.LiquidDensity(InletCold.T,InletCold.P,InletCold.x)+ |
---|
102 | InletCold.v*PP.VapourDensity(InletCold.T,InletCold.P,InletCold.y); |
---|
103 | |
---|
104 | "Cold Stream Outlet Mass Density" |
---|
105 | ColdSide.Properties.Outlet.rho = (1-OutletCold.v)*PP.LiquidDensity(OutletCold.T,OutletCold.P,OutletCold.x)+ |
---|
106 | OutletCold.v*PP.VapourDensity(OutletCold.T,OutletCold.P,OutletCold.y); |
---|
107 | |
---|
108 | "Cold Stream Average Viscosity" |
---|
109 | ColdSide.Properties.Average.Mu = (1-InletCold.v)*PP.LiquidViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.x)+ |
---|
110 | InletCold.v*PP.VapourViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.y); |
---|
111 | |
---|
112 | "Cold Stream inlet Viscosity" |
---|
113 | ColdSide.Properties.Inlet.Mu = (1-InletCold.v)*PP.LiquidViscosity(InletCold.T,InletCold.P,InletCold.x)+ |
---|
114 | InletCold.v*PP.VapourViscosity(InletCold.T,InletCold.P,InletCold.y); |
---|
115 | |
---|
116 | "Cold Stream Outlet Viscosity" |
---|
117 | ColdSide.Properties.Outlet.Mu = (1-OutletCold.v)*PP.LiquidViscosity(OutletCold.T,OutletCold.P,OutletCold.x)+ |
---|
118 | OutletCold.v*PP.VapourViscosity(OutletCold.T,OutletCold.P,OutletCold.y); |
---|
119 | |
---|
120 | "Cold Stream Average Conductivity" |
---|
121 | ColdSide.Properties.Average.K = (1-InletCold.v)*PP.LiquidThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.x)+ |
---|
122 | InletCold.v*PP.VapourThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.y); |
---|
123 | |
---|
124 | "Cold Stream Inlet Conductivity" |
---|
125 | ColdSide.Properties.Inlet.K = (1-InletCold.v)*PP.LiquidThermalConductivity(InletCold.T,InletCold.P,InletCold.x)+ |
---|
126 | InletCold.v*PP.VapourThermalConductivity(InletCold.T,InletCold.P,InletCold.y); |
---|
127 | |
---|
128 | "Cold Stream Outlet Conductivity" |
---|
129 | ColdSide.Properties.Outlet.K = (1-OutletCold.v)*PP.LiquidThermalConductivity(OutletCold.T,OutletCold.P,OutletCold.x)+ |
---|
130 | OutletCold.v*PP.VapourThermalConductivity(OutletCold.T,OutletCold.P,OutletCold.y); |
---|
131 | |
---|
132 | "Cold Stream Viscosity at Wall Temperature" |
---|
133 | ColdSide.Properties.Wall.Mu = (1-InletCold.v)*PP.LiquidViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,InletCold.x)+ |
---|
134 | InletCold.v*PP.VapourViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,InletCold.y); |
---|
135 | |
---|
136 | "Hot Stream Average Heat Capacity" |
---|
137 | HotSide.Properties.Average.Cp = (1-InletHot.v)*PP.LiquidCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.x) + |
---|
138 | InletHot.v*PP.VapourCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.y); |
---|
139 | |
---|
140 | "Hot Stream Inlet Heat Capacity" |
---|
141 | HotSide.Properties.Inlet.Cp = (1-InletHot.v)*PP.LiquidCp(InletHot.T,InletHot.P,InletHot.x)+ |
---|
142 | InletHot.v*PP.VapourCp(InletHot.T,InletHot.P,InletHot.y); |
---|
143 | |
---|
144 | "Hot Stream Outlet Heat Capacity" |
---|
145 | HotSide.Properties.Outlet.Cp = (1-OutletHot.v)*PP.LiquidCp(OutletHot.T,OutletHot.P,OutletHot.x)+ |
---|
146 | OutletHot.v*PP.VapourCp(OutletHot.T,OutletHot.P,OutletHot.y); |
---|
147 | |
---|
148 | "Hot Stream Average Mass Density" |
---|
149 | HotSide.Properties.Average.rho = (1-InletHot.v)*PP.LiquidDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.x)+ |
---|
150 | InletHot.v*PP.VapourDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.y); |
---|
151 | |
---|
152 | "Hot Stream Inlet Mass Density" |
---|
153 | HotSide.Properties.Inlet.rho = (1-InletHot.v)*PP.LiquidDensity(InletHot.T,InletHot.P,InletHot.x)+ |
---|
154 | InletHot.v*PP.VapourDensity(InletHot.T,InletHot.P,InletHot.y); |
---|
155 | |
---|
156 | "Hot Stream Outlet Mass Density" |
---|
157 | HotSide.Properties.Outlet.rho = (1-OutletHot.v)*PP.LiquidDensity(OutletHot.T,OutletHot.P,OutletHot.x)+ |
---|
158 | OutletHot.v*PP.VapourDensity(OutletHot.T,OutletHot.P,OutletHot.y); |
---|
159 | |
---|
160 | "Hot Stream Average Viscosity" |
---|
161 | HotSide.Properties.Average.Mu = (1-InletHot.v)*PP.LiquidViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.x)+ |
---|
162 | InletHot.v*PP.VapourViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.y); |
---|
163 | |
---|
164 | "Hot Stream inlet Viscosity" |
---|
165 | HotSide.Properties.Inlet.Mu = (1-InletHot.v)*PP.LiquidViscosity(InletHot.T,InletHot.P,InletHot.x)+ |
---|
166 | InletHot.v*PP.VapourViscosity(InletHot.T,InletHot.P,InletHot.y); |
---|
167 | |
---|
168 | "Hot Stream Outlet Viscosity" |
---|
169 | HotSide.Properties.Outlet.Mu = (1-OutletHot.v)*PP.LiquidViscosity(OutletHot.T,OutletHot.P,OutletHot.x)+ |
---|
170 | OutletHot.v*PP.VapourViscosity(OutletHot.T,OutletHot.P,OutletHot.y); |
---|
171 | |
---|
172 | "Hot Stream Average Conductivity" |
---|
173 | HotSide.Properties.Average.K = (1-InletHot.v)*PP.LiquidThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.x)+ |
---|
174 | InletHot.v*PP.VapourThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.y); |
---|
175 | |
---|
176 | "Hot Stream Inlet Conductivity" |
---|
177 | HotSide.Properties.Inlet.K = (1-InletHot.v)*PP.LiquidThermalConductivity(InletHot.T,InletHot.P,InletHot.x)+ |
---|
178 | InletHot.v*PP.VapourThermalConductivity(InletHot.T,InletHot.P,InletHot.y); |
---|
179 | |
---|
180 | "Hot Stream Outlet Conductivity" |
---|
181 | HotSide.Properties.Outlet.K = (1-OutletHot.v)*PP.LiquidThermalConductivity(OutletHot.T,OutletHot.P,OutletHot.x)+ |
---|
182 | OutletHot.v*PP.VapourThermalConductivity(OutletHot.T,OutletHot.P,OutletHot.y); |
---|
183 | |
---|
184 | "Hot Stream Viscosity at Wall Temperature" |
---|
185 | HotSide.Properties.Wall.Mu = (1-InletHot.v)*PP.LiquidViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,InletHot.x)+ |
---|
186 | InletHot.v*PP.VapourViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,InletHot.y); |
---|
187 | |
---|
188 | "Energy Balance Hot Stream" |
---|
189 | Details.Q = InletHot.F*(InletHot.h-OutletHot.h); |
---|
190 | |
---|
191 | "Energy Balance Cold Stream" |
---|
192 | Details.Q =-InletCold.F*(InletCold.h-OutletCold.h); |
---|
193 | |
---|
194 | "Flow Mass Inlet Cold Stream" |
---|
195 | ColdSide.Properties.Inlet.Fw = sum(M*InletCold.z)*InletCold.F; |
---|
196 | |
---|
197 | "Flow Mass Outlet Cold Stream" |
---|
198 | ColdSide.Properties.Outlet.Fw = sum(M*OutletCold.z)*OutletCold.F; |
---|
199 | |
---|
200 | "Flow Mass Inlet Hot Stream" |
---|
201 | HotSide.Properties.Inlet.Fw = sum(M*InletHot.z)*InletHot.F; |
---|
202 | |
---|
203 | "Flow Mass Outlet Hot Stream" |
---|
204 | HotSide.Properties.Outlet.Fw = sum(M*OutletHot.z)*OutletHot.F; |
---|
205 | |
---|
206 | "Molar Balance Hot Stream" |
---|
207 | InletHot.F = OutletHot.F; |
---|
208 | |
---|
209 | "Molar Balance Cold Stream" |
---|
210 | InletCold.F = OutletCold.F; |
---|
211 | |
---|
212 | "Hot Stream Molar Fraction Constraint" |
---|
213 | OutletHot.z = InletHot.z; |
---|
214 | |
---|
215 | "Cold Stream Molar Fraction Constraint" |
---|
216 | OutletCold.z = InletCold.z; |
---|
217 | |
---|
218 | "Pressure Drop Hot Stream" |
---|
219 | OutletHot.P = InletHot.P - HotSide.PressureDrop.Pdrop; |
---|
220 | |
---|
221 | "Pressure Drop Cold Stream" |
---|
222 | OutletCold.P = InletCold.P - ColdSide.PressureDrop.Pdrop; |
---|
223 | |
---|
224 | "Fraction of Inlet Pressure : Hot Stream" |
---|
225 | HotSide.PressureDrop.Pdrop = InletHot.P*HotSide.PressureDrop.FPdrop; |
---|
226 | |
---|
227 | "Fraction of Inlet Pressure : Cold Stream" |
---|
228 | ColdSide.PressureDrop.Pdrop = InletCold.P*ColdSide.PressureDrop.FPdrop; |
---|
229 | |
---|
230 | end |
---|
231 | |
---|
232 | Model HeatExchanger_LMTD as HeatExchangerSimplified_Basic |
---|
233 | |
---|
234 | ATTRIBUTES |
---|
235 | Pallete = true; |
---|
236 | Icon = "icon/HeatExchanger_LMTD"; |
---|
237 | Brief = "Heat Exchanger Block - LMTD Method"; |
---|
238 | Info = |
---|
239 | "to be documented."; |
---|
240 | |
---|
241 | PARAMETERS |
---|
242 | |
---|
243 | FlowDirection as Switcher (Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent"); |
---|
244 | |
---|
245 | VARIABLES |
---|
246 | |
---|
247 | Method as LMTD_Basic (Brief="LMTD Method of Calculation"); |
---|
248 | |
---|
249 | EQUATIONS |
---|
250 | |
---|
251 | "Exchange Surface Area" |
---|
252 | Details.Q = Details.Ud*Details.A*Method.LMTD*Method.Fc; |
---|
253 | |
---|
254 | switch FlowDirection |
---|
255 | |
---|
256 | case "cocurrent": |
---|
257 | |
---|
258 | "Temperature Difference at Inlet" |
---|
259 | Method.DT0 = InletHot.T - InletCold.T; |
---|
260 | |
---|
261 | "Temperature Difference at Outlet" |
---|
262 | Method.DTL = OutletHot.T - OutletCold.T; |
---|
263 | |
---|
264 | case "counter": |
---|
265 | |
---|
266 | "Temperature Difference at Inlet" |
---|
267 | Method.DT0 = InletHot.T - OutletCold.T; |
---|
268 | |
---|
269 | "Temperature Difference at Outlet" |
---|
270 | Method.DTL = OutletHot.T - InletCold.T; |
---|
271 | |
---|
272 | end |
---|
273 | |
---|
274 | end |
---|
275 | |
---|
276 | Model Shell_and_Tubes_LMTD as HeatExchangerSimplified_Basic |
---|
277 | |
---|
278 | ATTRIBUTES |
---|
279 | Pallete = true; |
---|
280 | Icon = "icon/Shell_and_Tubes_LMTD"; |
---|
281 | Brief = "Shell and Tubes Heat Exchanger with 1 or 2 shell pass - LMTD Method"; |
---|
282 | Info = |
---|
283 | "to be documented."; |
---|
284 | |
---|
285 | PARAMETERS |
---|
286 | |
---|
287 | LMTDcorrection as Switcher(Brief="LMTD Correction Factor Model",Valid=["Bowmann","Fakeri"],Default="Bowmann"); |
---|
288 | ShellType as Switcher(Brief="TEMA Designation for Shell Type",Valid=["Eshell","Fshell"],Default="Eshell"); |
---|
289 | |
---|
290 | VARIABLES |
---|
291 | |
---|
292 | Method as LMTD_Basic (Brief="LMTD Method of Calculation"); |
---|
293 | R as positive (Brief=" Capacity Ratio for LMTD Correction Fator",Lower=1e-6); |
---|
294 | P as positive (Brief="Non - Dimensional Variable for LMTD Correction Fator ",Lower=1e-6); |
---|
295 | Pc as positive (Brief="Non - Dimensional Variable for LMTD Correction Fator when 2 Pass Shell Side",Lower=1e-6); |
---|
296 | Rho as positive (Brief="Non - Dimensional Variable for LMTD Correction Fator in Fakeri Equation",Lower=1e-6); |
---|
297 | Phi as positive (Brief="Non - Dimensional Variable for LMTD Correction Fator in Fakeri Equation",Lower=1e-6); |
---|
298 | lambdaN as Real (Brief="Non - Dimensional Variable for LMTD Correction Fator in Fakeri Equation when 2 Pass Shell Side"); |
---|
299 | lambda1 as Real (Brief="Non - Dimensional Variable for LMTD Correction Fator in Fakeri Equationwhen 2 Pass Shell Side"); |
---|
300 | |
---|
301 | EQUATIONS |
---|
302 | |
---|
303 | "Exchange Surface Area" |
---|
304 | Details.Q = Details.Ud*Details.A*Method.LMTD*Method.Fc; |
---|
305 | |
---|
306 | "R: Capacity Ratio for LMTD Correction Fator" |
---|
307 | R*(OutletCold.T - InletCold.T ) = (InletHot.T-OutletHot.T); |
---|
308 | |
---|
309 | "P: Non - Dimensional Variable for LMTD Correction Fator" |
---|
310 | P*(InletHot.T- InletCold.T)= (OutletCold.T-InletCold.T); |
---|
311 | |
---|
312 | "Temperature Difference at Inlet" |
---|
313 | Method.DT0 = InletHot.T - OutletCold.T; |
---|
314 | |
---|
315 | "Temperature Difference at Outlet" |
---|
316 | Method.DTL = OutletHot.T - InletCold.T; |
---|
317 | |
---|
318 | switch ShellType |
---|
319 | |
---|
320 | case "Fshell": |
---|
321 | |
---|
322 | switch LMTDcorrection |
---|
323 | |
---|
324 | case "Bowmann": |
---|
325 | |
---|
326 | " Variable not in use with Bowmann equation" |
---|
327 | lambdaN =1; |
---|
328 | |
---|
329 | " Variable not in use with Bowmann equation" |
---|
330 | lambda1 =1; |
---|
331 | |
---|
332 | " Variable not in use with Bowmann equation" |
---|
333 | Phi = 1; |
---|
334 | |
---|
335 | " Variable not in use with Bowmann equation" |
---|
336 | Rho =1; |
---|
337 | |
---|
338 | if R equal 1 |
---|
339 | |
---|
340 | then |
---|
341 | |
---|
342 | "Non Dimensional Variable for LMTD Correction Fator when 2 Pass Shell Side" |
---|
343 | Pc*(2-P)= P; |
---|
344 | |
---|
345 | "LMTD Correction Fator when 2 Pass Shell Side" |
---|
346 | Method.Fc= (sqrt(2)*Pc)/((1-Pc)*ln( abs( ( 2-Pc*0.585786)/( 2-Pc*3.414214)))); |
---|
347 | |
---|
348 | else |
---|
349 | |
---|
350 | "Non Dimensional Variable for LMTD Correction Fator when 2 Pass Shell Side" |
---|
351 | Pc = (sqrt(abs(( 1-P*R)/(1-P)))-1)/(sqrt(abs(( 1-P*R)/(1-P)))-R); |
---|
352 | |
---|
353 | "LMTD Correction Fator when 2 Pass Shell Side" |
---|
354 | Method.Fc = sqrt(R*R+1)*ln(abs((1-Pc*R)/(1-Pc)))/((1-R)*ln( abs( ( 2-Pc*(R+1-sqrt(R*R+1)))/ ( 2-Pc*(R + 1 + sqrt(R*R+1)))))); |
---|
355 | |
---|
356 | end |
---|
357 | |
---|
358 | case "Fakeri": |
---|
359 | |
---|
360 | " Variable not in use with Fakeri equation" |
---|
361 | Pc = P; |
---|
362 | |
---|
363 | "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation" |
---|
364 | Rho*(1-P*R) = (1-P); |
---|
365 | |
---|
366 | "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation " |
---|
367 | Phi = (sqrt(((InletHot.T - OutletHot.T)*(InletHot.T- OutletHot.T))+((OutletCold.T - InletCold.T)*(OutletCold.T - InletCold.T))))/(2*((InletHot.T + OutletHot.T)-( InletCold.T + OutletCold.T))); |
---|
368 | |
---|
369 | if Rho equal 1 |
---|
370 | |
---|
371 | then |
---|
372 | |
---|
373 | " Variable not in use when Rho = 1" |
---|
374 | lambdaN = 1; |
---|
375 | |
---|
376 | " Variable not in use when Rho = 1" |
---|
377 | lambda1 = 1; |
---|
378 | |
---|
379 | "LMTD Correction Fator when 2 Pass Shell Side" |
---|
380 | Method.Fc = (2*Phi )/(ln(abs((1+Phi )/(1-Phi )))); |
---|
381 | |
---|
382 | else |
---|
383 | |
---|
384 | "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation" |
---|
385 | lambdaN = (1/ln(sqrt(abs(Rho))))*((2*sqrt(abs(Rho))-2)/(sqrt(abs(Rho))+1)); |
---|
386 | |
---|
387 | "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation" |
---|
388 | lambda1 = (1/ln(abs(Rho)))*((2*Rho-2)/(Rho+1)); |
---|
389 | |
---|
390 | "LMTD Correction Fator when 2 Pass Shell Side" |
---|
391 | Method.Fc = ((2*Phi *(lambdaN/lambda1))/(ln(abs((1+Phi *(lambdaN/lambda1))/(1-Phi *(lambdaN/lambda1))))))*(1/lambdaN); |
---|
392 | |
---|
393 | end |
---|
394 | |
---|
395 | |
---|
396 | end |
---|
397 | |
---|
398 | case "Eshell": |
---|
399 | |
---|
400 | " Variable not in use when 1 Pass Shell Side" |
---|
401 | lambdaN =1; |
---|
402 | |
---|
403 | " Variable not in use when 1 Pass Shell Side" |
---|
404 | lambda1 =1; |
---|
405 | |
---|
406 | " Variable not in use when 1 Pass Shell Side" |
---|
407 | Pc = P; |
---|
408 | |
---|
409 | switch LMTDcorrection |
---|
410 | |
---|
411 | case "Bowmann": |
---|
412 | |
---|
413 | " Variable not in use with Bowmann equation" |
---|
414 | Phi = 1; |
---|
415 | |
---|
416 | " Variable not in use with Bowmann equation" |
---|
417 | Rho = 1; |
---|
418 | |
---|
419 | |
---|
420 | if R equal 1 |
---|
421 | |
---|
422 | then |
---|
423 | |
---|
424 | "LMTD Correction Fator when 1 Pass Shell Side" |
---|
425 | Method.Fc = (sqrt(2)*P)/((1-P)*ln( abs( ( 2-P*0.585786)/( 2-P*3.414214)))); |
---|
426 | |
---|
427 | else |
---|
428 | |
---|
429 | "LMTD Correction Fator when 1 Pass Shell Side" |
---|
430 | Method.Fc = sqrt(R*R+1)*ln(abs((1-P*R)/(1-P)))/((1-R)*ln( abs( ( 2-P*(R+1-sqrt(R*R+1)))/ ( 2-P*(R + 1 + sqrt(R*R+1)))))); |
---|
431 | |
---|
432 | end |
---|
433 | |
---|
434 | case "Fakeri": |
---|
435 | |
---|
436 | "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation " |
---|
437 | Phi = (sqrt(((InletHot.T- OutletHot.T)*(InletHot.T- OutletHot.T))+((OutletCold.T - InletCold.T)*(OutletCold.T - InletCold.T))))/(2*((InletHot.T+ OutletHot.T)-(InletCold.T+ OutletCold.T))); |
---|
438 | |
---|
439 | "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation" |
---|
440 | Rho*(1-P*R) = (1-P); |
---|
441 | |
---|
442 | if Rho equal 1 |
---|
443 | |
---|
444 | then |
---|
445 | |
---|
446 | "LMTD Correction Fator when 1 Pass Shell Side" |
---|
447 | Method.Fc = (4*Phi)/(ln(abs((1+2*Phi)/(1-2*Phi)))); |
---|
448 | |
---|
449 | else |
---|
450 | |
---|
451 | "LMTD Correction Fator when 1 Pass Shell Side" |
---|
452 | Method.Fc = (2*Phi*(Rho+1)*ln(abs(Rho)))/( ln(abs((1+2*Phi)/(1-2*Phi)))*(Rho-1)); |
---|
453 | |
---|
454 | end |
---|
455 | |
---|
456 | end |
---|
457 | |
---|
458 | |
---|
459 | end |
---|
460 | |
---|
461 | end |
---|
462 | |
---|
463 | Model HeatExchanger_NTU as HeatExchangerSimplified_Basic |
---|
464 | |
---|
465 | ATTRIBUTES |
---|
466 | Pallete = true; |
---|
467 | Icon = "icon/HeatExchanger_NTU"; |
---|
468 | Brief = "Heat Exchanger Block - NTU Method"; |
---|
469 | Info = |
---|
470 | "to be documented."; |
---|
471 | |
---|
472 | PARAMETERS |
---|
473 | |
---|
474 | FlowDirection as Switcher (Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent"); |
---|
475 | |
---|
476 | VARIABLES |
---|
477 | |
---|
478 | Method as NTU_Basic (Brief="NTU Method of Calculation"); |
---|
479 | |
---|
480 | EQUATIONS |
---|
481 | |
---|
482 | "Number of Units Transference" |
---|
483 | Method.NTU*Method.Cmin = Details.Ud*Details.A; |
---|
484 | |
---|
485 | "Minimum Heat Capacity" |
---|
486 | Method.Cmin = min([Method.Ch,Method.Cc]); |
---|
487 | |
---|
488 | "Maximum Heat Capacity" |
---|
489 | Method.Cmax = max([Method.Ch,Method.Cc]); |
---|
490 | |
---|
491 | "Thermal Capacity Ratio" |
---|
492 | Method.Cr = Method.Cmin/Method.Cmax; |
---|
493 | |
---|
494 | "Duty" |
---|
495 | Details.Q = Method.Eft*Method.Cmin*(InletHot.T-InletCold.T); |
---|
496 | |
---|
497 | "Hot Stream Heat Capacity" |
---|
498 | Method.Ch = InletHot.F*HotSide.Properties.Average.Cp; |
---|
499 | |
---|
500 | "Cold Stream Heat Capacity" |
---|
501 | Method.Cc = InletCold.F*ColdSide.Properties.Average.Cp; |
---|
502 | |
---|
503 | "Effectiveness Correction" |
---|
504 | Method.Eft1 = 1; |
---|
505 | |
---|
506 | if Method.Cr equal 0 |
---|
507 | |
---|
508 | then |
---|
509 | |
---|
510 | "Effectiveness" |
---|
511 | Method.Eft = 1-exp(-Method.NTU); |
---|
512 | |
---|
513 | else |
---|
514 | |
---|
515 | switch FlowDirection |
---|
516 | |
---|
517 | case "cocurrent": |
---|
518 | |
---|
519 | "Effectiveness in Cocurrent Flow" |
---|
520 | Method.Eft = (1-exp(-Method.NTU*(1+Method.Cr)))/(1+Method.Cr); |
---|
521 | |
---|
522 | case "counter": |
---|
523 | |
---|
524 | if Method.Cr equal 1 |
---|
525 | |
---|
526 | then |
---|
527 | "Effectiveness in Counter Flow" |
---|
528 | Method.Eft = Method.NTU/(1+Method.NTU); |
---|
529 | |
---|
530 | else |
---|
531 | "Effectiveness in Counter Flow" |
---|
532 | Method.Eft = (1-exp(-Method.NTU*(1-Method.Cr)))/(1-Method.Cr*exp(-Method.NTU*(1-Method.Cr))); |
---|
533 | |
---|
534 | end |
---|
535 | |
---|
536 | end |
---|
537 | |
---|
538 | |
---|
539 | end |
---|
540 | |
---|
541 | end |
---|
542 | |
---|
543 | Model Shell_and_Tubes_NTU as HeatExchangerSimplified_Basic |
---|
544 | |
---|
545 | ATTRIBUTES |
---|
546 | Pallete = true; |
---|
547 | Icon = "icon/Shell_and_Tubes_NTU"; |
---|
548 | Brief = "Shell and Tubes Heat Exchanger with 1 or 2 shell pass - NTU Method"; |
---|
549 | Info = |
---|
550 | "to be documented."; |
---|
551 | |
---|
552 | PARAMETERS |
---|
553 | |
---|
554 | ShellType as Switcher (Brief="TEMA Designation",Valid=["Eshell","Fshell"],Default="Eshell"); |
---|
555 | |
---|
556 | VARIABLES |
---|
557 | |
---|
558 | Method as NTU_Basic (Brief="NTU Method of Calculation"); |
---|
559 | |
---|
560 | EQUATIONS |
---|
561 | |
---|
562 | "Number of Units Transference" |
---|
563 | Method.NTU*Method.Cmin = Details.Ud*Details.A; |
---|
564 | |
---|
565 | "Minimum Heat Capacity" |
---|
566 | Method.Cmin = min([Method.Ch,Method.Cc]); |
---|
567 | |
---|
568 | "Maximum Heat Capacity" |
---|
569 | Method.Cmax = max([Method.Ch,Method.Cc]); |
---|
570 | |
---|
571 | "Thermal Capacity Ratio" |
---|
572 | Method.Cr = Method.Cmin/Method.Cmax; |
---|
573 | |
---|
574 | "Duty" |
---|
575 | Details.Q = Method.Eft*Method.Cmin*(InletHot.T-InletCold.T); |
---|
576 | |
---|
577 | "Hot Stream Heat Capacity" |
---|
578 | Method.Ch = InletHot.F*HotSide.Properties.Average.Cp; |
---|
579 | |
---|
580 | "Cold Stream Heat Capacity" |
---|
581 | Method.Cc = InletCold.F*ColdSide.Properties.Average.Cp; |
---|
582 | |
---|
583 | switch ShellType |
---|
584 | |
---|
585 | case "Fshell": |
---|
586 | |
---|
587 | "Effectiveness Correction for 2 pass shell side" |
---|
588 | Method.Eft1 = 2*(1+Method.Cr+sqrt(1+Method.Cr^2)*((1+exp(-Method.NTU*sqrt(1+Method.Cr^2)))/(1-exp(-Method.NTU*sqrt(1+Method.Cr^2)))) )^-1; |
---|
589 | |
---|
590 | "TEMA F Shell Effectiveness" |
---|
591 | Method.Eft = ( ((1-Method.Eft1*Method.Cr)/(1-Method.Eft1))^2 -1 )*( ((1-Method.Eft1*Method.Cr)/(1-Method.Eft1))^2 - Method.Cr )^-1; |
---|
592 | |
---|
593 | case "Eshell": |
---|
594 | |
---|
595 | "TEMA E Shell Effectiveness" |
---|
596 | Method.Eft = 2*(1+Method.Cr+sqrt(1+Method.Cr^2)*((1+exp(-Method.NTU*sqrt(1+Method.Cr^2)))/(1-exp(-Method.NTU*sqrt(1+Method.Cr^2)))) )^-1; |
---|
597 | |
---|
598 | "Variable not in use when 1 Pass Shell Side" |
---|
599 | Method.Eft1 = 1; |
---|
600 | |
---|
601 | end |
---|
602 | |
---|
603 | end |
---|