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 100 2007-01-09 14:15:56Z bicca $ |
---|
18 | *--------------------------------------------------------------------*# |
---|
19 | |
---|
20 | using "HEX_Engine"; |
---|
21 | #===================================================================== |
---|
22 | # Basic Models for Simplified Heat Exchangers |
---|
23 | #===================================================================== |
---|
24 | Model HeatExchangerSimplified_Basic |
---|
25 | PARAMETERS |
---|
26 | ext PP as CalcObject (Brief="External Physical Properties"); |
---|
27 | HE as CalcObject (Brief="STHE Calculations",File="heatex"); |
---|
28 | ext NComp as Integer (Brief="Number of Components"); |
---|
29 | M(NComp) as molweight (Brief="Component Mol Weight"); |
---|
30 | |
---|
31 | VARIABLES |
---|
32 | |
---|
33 | in Inlet as Inlet_Main_Stream; # Hot and Cold Inlets |
---|
34 | out Outlet as Outlet_Main_Stream; # Hot and Cold Outlets |
---|
35 | Properties as Main_Properties; # Hot and Cold Properties |
---|
36 | Details as Details_Main; |
---|
37 | PressureDrop as Main_Pdrop; |
---|
38 | |
---|
39 | SET |
---|
40 | |
---|
41 | M = PP.MolecularWeight(); |
---|
42 | |
---|
43 | EQUATIONS |
---|
44 | |
---|
45 | "Hot Stream Average Temperature" |
---|
46 | Properties.Hot.Average.T = 0.5*Inlet.Hot.T + 0.5*Outlet.Hot.T; |
---|
47 | |
---|
48 | "Cold Stream Average Temperature" |
---|
49 | Properties.Cold.Average.T = 0.5*Inlet.Cold.T + 0.5*Outlet.Cold.T; |
---|
50 | |
---|
51 | "Hot Stream Average Pressure" |
---|
52 | Properties.Hot.Average.P = 0.5*Inlet.Hot.P+0.5*Outlet.Hot.P; |
---|
53 | |
---|
54 | "Cold Stream Average Pressure" |
---|
55 | Properties.Cold.Average.P = 0.5*Inlet.Cold.P+0.5*Outlet.Cold.P; |
---|
56 | |
---|
57 | "Cold Stream Wall Temperature" |
---|
58 | Properties.Cold.Wall.Twall = 0.5*Properties.Hot.Average.T + 0.5*Properties.Cold.Average.T; |
---|
59 | |
---|
60 | "Hot Stream Wall Temperature" |
---|
61 | Properties.Hot.Wall.Twall = 0.5*Properties.Hot.Average.T + 0.5*Properties.Cold.Average.T; |
---|
62 | |
---|
63 | "Hot Stream Average Molecular Weight" |
---|
64 | Properties.Hot.Average.Mw = sum(M*Inlet.Hot.z); |
---|
65 | |
---|
66 | "Cold Stream Average Molecular Weight" |
---|
67 | Properties.Cold.Average.Mw = sum(M*Inlet.Cold.z); |
---|
68 | |
---|
69 | |
---|
70 | if Inlet.Cold.v equal 0 |
---|
71 | |
---|
72 | then |
---|
73 | |
---|
74 | "Cold Stream Average Heat Capacity" |
---|
75 | Properties.Cold.Average.Cp = PP.LiquidCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
76 | |
---|
77 | "Cold Stream Inlet Heat Capacity" |
---|
78 | Properties.Cold.Inlet.Cp = PP.LiquidCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
79 | |
---|
80 | "Cold Stream Outlet Heat Capacity" |
---|
81 | Properties.Cold.Outlet.Cp = PP.LiquidCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
82 | |
---|
83 | "Cold Stream Average Mass Density" |
---|
84 | Properties.Cold.Average.rho = PP.LiquidDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
85 | |
---|
86 | "Cold Stream Inlet Mass Density" |
---|
87 | Properties.Cold.Inlet.rho = PP.LiquidDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
88 | |
---|
89 | "Cold Stream Outlet Mass Density" |
---|
90 | Properties.Cold.Outlet.rho = PP.LiquidDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
91 | |
---|
92 | "Cold Stream Average Viscosity" |
---|
93 | Properties.Cold.Average.Mu = PP.LiquidViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
94 | |
---|
95 | "Cold Stream inlet Viscosity" |
---|
96 | Properties.Cold.Inlet.Mu = PP.LiquidViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
97 | |
---|
98 | "Cold Stream Outlet Viscosity" |
---|
99 | Properties.Cold.Outlet.Mu = PP.LiquidViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
100 | |
---|
101 | "Cold Stream Average Conductivity" |
---|
102 | Properties.Cold.Average.K = PP.LiquidThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
103 | |
---|
104 | "Cold Stream Inlet Conductivity" |
---|
105 | Properties.Cold.Inlet.K = PP.LiquidThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
106 | |
---|
107 | "Cold Stream Outlet Conductivity" |
---|
108 | Properties.Cold.Outlet.K = PP.LiquidThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
109 | |
---|
110 | "Cold Stream Heat Capacity at Wall Temperature" |
---|
111 | Properties.Cold.Wall.Cp = PP.LiquidCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
112 | |
---|
113 | "Cold Stream Viscosity at Wall Temperature" |
---|
114 | Properties.Cold.Wall.Mu = PP.LiquidViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
115 | |
---|
116 | "Cold Stream Conductivity at Wall Temperature" |
---|
117 | Properties.Cold.Wall.K = PP.LiquidThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
118 | |
---|
119 | |
---|
120 | else |
---|
121 | |
---|
122 | "Cold Stream Average Heat Capacity" |
---|
123 | Properties.Cold.Average.Cp = PP.VapourCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
124 | |
---|
125 | "Cold Stream Inlet Heat Capacity" |
---|
126 | Properties.Cold.Inlet.Cp = PP.VapourCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
127 | |
---|
128 | "Cold Stream Outlet Heat Capacity" |
---|
129 | Properties.Cold.Outlet.Cp = PP.VapourCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
130 | |
---|
131 | "Cold Stream Average Mass Density" |
---|
132 | Properties.Cold.Average.rho = PP.VapourDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
133 | |
---|
134 | "Cold Stream Inlet Mass Density" |
---|
135 | Properties.Cold.Inlet.rho = PP.VapourDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
136 | |
---|
137 | "Cold Stream Outlet Mass Density" |
---|
138 | Properties.Cold.Outlet.rho = PP.VapourDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
139 | |
---|
140 | "Cold Stream Average Viscosity " |
---|
141 | Properties.Cold.Average.Mu = PP.VapourViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
142 | |
---|
143 | "Cold Stream Inlet Viscosity " |
---|
144 | Properties.Cold.Inlet.Mu = PP.VapourViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
145 | |
---|
146 | "Cold Stream Outlet Viscosity " |
---|
147 | Properties.Cold.Outlet.Mu = PP.VapourViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
148 | |
---|
149 | "Cold Stream Average Conductivity " |
---|
150 | Properties.Cold.Average.K = PP.VapourThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
151 | |
---|
152 | "Cold Stream Inlet Conductivity " |
---|
153 | Properties.Cold.Inlet.K = PP.VapourThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
154 | |
---|
155 | "Cold Stream Outlet Conductivity " |
---|
156 | Properties.Cold.Outlet.K = PP.VapourThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
157 | |
---|
158 | "Cold Stream Heat Capacity at Wall Temperature" |
---|
159 | Properties.Cold.Wall.Cp = PP.VapourCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
160 | |
---|
161 | |
---|
162 | "Cold Stream Viscosity at Wall Temperature" |
---|
163 | Properties.Cold.Wall.Mu = PP.VapourViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
164 | |
---|
165 | "Cold Stream Conductivity at Wall Temperature" |
---|
166 | Properties.Cold.Wall.K = PP.VapourThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
167 | |
---|
168 | |
---|
169 | |
---|
170 | end |
---|
171 | |
---|
172 | if Inlet.Hot.v equal 0 |
---|
173 | |
---|
174 | then |
---|
175 | |
---|
176 | "Hot Stream Average Heat Capacity" |
---|
177 | Properties.Hot.Average.Cp = PP.LiquidCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
178 | |
---|
179 | "Hot Stream Inlet Heat Capacity" |
---|
180 | Properties.Hot.Inlet.Cp = PP.LiquidCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
181 | |
---|
182 | "Hot Stream Outlet Heat Capacity" |
---|
183 | Properties.Hot.Outlet.Cp = PP.LiquidCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
184 | |
---|
185 | "Hot Stream Average Mass Density" |
---|
186 | Properties.Hot.Average.rho = PP.LiquidDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
187 | |
---|
188 | "Hot Stream Inlet Mass Density" |
---|
189 | Properties.Hot.Inlet.rho = PP.LiquidDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
190 | |
---|
191 | "Hot Stream Outlet Mass Density" |
---|
192 | Properties.Hot.Outlet.rho = PP.LiquidDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
193 | |
---|
194 | "Hot Stream Average Viscosity" |
---|
195 | Properties.Hot.Average.Mu = PP.LiquidViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
196 | |
---|
197 | "Hot Stream Inlet Viscosity" |
---|
198 | Properties.Hot.Inlet.Mu = PP.LiquidViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
199 | |
---|
200 | "Hot Stream Outlet Viscosity" |
---|
201 | Properties.Hot.Outlet.Mu = PP.LiquidViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
202 | |
---|
203 | "Hot Stream Average Conductivity" |
---|
204 | Properties.Hot.Average.K = PP.LiquidThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
205 | |
---|
206 | "Hot Stream Inlet Conductivity" |
---|
207 | Properties.Hot.Inlet.K = PP.LiquidThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
208 | |
---|
209 | "Hot Stream Outlet Conductivity" |
---|
210 | Properties.Hot.Outlet.K = PP.LiquidThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
211 | |
---|
212 | "Hot Stream Heat Capacity at Wall Temperature" |
---|
213 | Properties.Hot.Wall.Cp = PP.LiquidCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
214 | |
---|
215 | "Hot Stream Viscosity at Wall Temperature" |
---|
216 | Properties.Hot.Wall.Mu = PP.LiquidViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
217 | |
---|
218 | "Hot Stream Conductivity at Wall Temperature" |
---|
219 | Properties.Hot.Wall.K = PP.LiquidThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
220 | |
---|
221 | |
---|
222 | else |
---|
223 | |
---|
224 | "Hot Stream Average Heat Capacity" |
---|
225 | Properties.Hot.Average.Cp = PP.VapourCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
226 | |
---|
227 | "Hot Stream Inlet Heat Capacity" |
---|
228 | Properties.Hot.Inlet.Cp = PP.VapourCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
229 | |
---|
230 | "Hot Stream Outlet Heat Capacity" |
---|
231 | Properties.Hot.Outlet.Cp = PP.VapourCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
232 | |
---|
233 | "Hot Stream Average Mass Density" |
---|
234 | Properties.Hot.Average.rho = PP.VapourDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
235 | |
---|
236 | "Hot Stream Inlet Mass Density" |
---|
237 | Properties.Hot.Inlet.rho = PP.VapourDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
238 | |
---|
239 | "Hot Stream Outlet Mass Density" |
---|
240 | Properties.Hot.Outlet.rho = PP.VapourDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
241 | |
---|
242 | "Hot Stream Average Viscosity" |
---|
243 | Properties.Hot.Average.Mu = PP.VapourViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
244 | |
---|
245 | "Hot Stream Inlet Viscosity" |
---|
246 | Properties.Hot.Inlet.Mu = PP.VapourViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
247 | |
---|
248 | "Hot Stream Outlet Viscosity" |
---|
249 | Properties.Hot.Outlet.Mu = PP.VapourViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
250 | |
---|
251 | "Hot Stream Average Conductivity" |
---|
252 | Properties.Hot.Average.K = PP.VapourThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
253 | |
---|
254 | "Hot Stream Inlet Conductivity" |
---|
255 | Properties.Hot.Inlet.K = PP.VapourThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
256 | |
---|
257 | "Hot Stream Outlet Conductivity" |
---|
258 | Properties.Hot.Outlet.K = PP.VapourThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
259 | |
---|
260 | "Hot Stream Heat Capacity at Wall Temperature" |
---|
261 | Properties.Hot.Wall.Cp = PP.VapourCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
262 | |
---|
263 | "Hot Stream Viscosity at Wall Temperature" |
---|
264 | Properties.Hot.Wall.Mu = PP.VapourViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
265 | |
---|
266 | "Hot Stream Conductivity at Wall Temperature" |
---|
267 | Properties.Hot.Wall.K = PP.VapourThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
268 | |
---|
269 | |
---|
270 | end |
---|
271 | |
---|
272 | |
---|
273 | #===================================================================== |
---|
274 | # Thermal Details |
---|
275 | #===================================================================== |
---|
276 | "Hot Stream Heat Capacity" |
---|
277 | Details.Ch =Inlet.Hot.F*Properties.Hot.Average.Cp; |
---|
278 | |
---|
279 | "Cold Stream Heat Capacity" |
---|
280 | Details.Cc =Inlet.Cold.F*Properties.Cold.Average.Cp; |
---|
281 | |
---|
282 | "Minimum Heat Capacity" |
---|
283 | Details.Cmin = min([Details.Ch,Details.Cc]); |
---|
284 | |
---|
285 | "Maximum Heat Capacity" |
---|
286 | Details.Cmax = max([Details.Ch,Details.Cc]); |
---|
287 | |
---|
288 | "Heat Capacity Ratio" |
---|
289 | Details.Cr = Details.Cmin/Details.Cmax; |
---|
290 | #===================================================================== |
---|
291 | # Energy Balance |
---|
292 | #===================================================================== |
---|
293 | "Energy Balance Hot Stream" |
---|
294 | Details.Q = Inlet.Hot.F*(Inlet.Hot.h-Outlet.Hot.h); |
---|
295 | |
---|
296 | "Energy Balance Cold Stream" |
---|
297 | Details.Q =-Inlet.Cold.F*(Inlet.Cold.h-Outlet.Cold.h); |
---|
298 | |
---|
299 | #===================================================================== |
---|
300 | # Material Balance |
---|
301 | #===================================================================== |
---|
302 | "Flow Mass Inlet Cold Stream" |
---|
303 | Properties.Cold.Inlet.Fw = sum(M*Inlet.Cold.z)*Inlet.Cold.F; |
---|
304 | |
---|
305 | "Flow Mass Outlet Cold Stream" |
---|
306 | Properties.Cold.Outlet.Fw = sum(M*Outlet.Cold.z)*Outlet.Cold.F; |
---|
307 | |
---|
308 | "Flow Mass Inlet Hot Stream" |
---|
309 | Properties.Hot.Inlet.Fw = sum(M*Inlet.Hot.z)*Inlet.Hot.F; |
---|
310 | |
---|
311 | "Flow Mass Outlet Hot Stream" |
---|
312 | Properties.Hot.Outlet.Fw = sum(M*Outlet.Hot.z)*Outlet.Hot.F; |
---|
313 | |
---|
314 | "Molar Balance Hot Stream" |
---|
315 | Inlet.Hot.F = Outlet.Hot.F; |
---|
316 | |
---|
317 | "Molar Balance Cold Stream" |
---|
318 | Inlet.Cold.F = Outlet.Cold.F; |
---|
319 | |
---|
320 | #====================================== |
---|
321 | # Constraints |
---|
322 | #====================================== |
---|
323 | "Hot Stream Molar Fraction Constraint" |
---|
324 | Outlet.Hot.z=Inlet.Hot.z; |
---|
325 | |
---|
326 | "Cold Stream Molar Fraction Constraint" |
---|
327 | Outlet.Cold.z=Inlet.Cold.z; |
---|
328 | |
---|
329 | "No Phase Change In Cold Stream" |
---|
330 | Inlet.Cold.v=Outlet.Cold.v; |
---|
331 | |
---|
332 | "No Phase Change In Hot Stream" |
---|
333 | Inlet.Hot.v=Outlet.Hot.v; |
---|
334 | |
---|
335 | #====================================== |
---|
336 | # Pressure Drop |
---|
337 | #====================================== |
---|
338 | |
---|
339 | "Pressure Drop Hot Stream" |
---|
340 | Outlet.Hot.P = Inlet.Hot.P - PressureDrop.Hot.Pdrop; |
---|
341 | |
---|
342 | "Pressure Drop Cold Stream" |
---|
343 | Outlet.Cold.P = Inlet.Cold.P - PressureDrop.Cold.Pdrop; |
---|
344 | |
---|
345 | "Fraction of Inlet Pressure : Hot Stream" |
---|
346 | PressureDrop.Hot.Pdrop = Inlet.Hot.P*PressureDrop.Hot.FPdrop; |
---|
347 | |
---|
348 | "Fraction of Inlet Pressure : Cold Stream" |
---|
349 | PressureDrop.Cold.Pdrop = Inlet.Cold.P*PressureDrop.Cold.FPdrop; |
---|
350 | |
---|
351 | end |
---|
352 | |
---|
353 | Model Heatex_Basic_NTU as HeatExchangerSimplified_Basic |
---|
354 | #===================================================================== |
---|
355 | # Basic Model for Heat Exchangers - NTU Method |
---|
356 | #===================================================================== |
---|
357 | VARIABLES |
---|
358 | |
---|
359 | Eft as positive (Brief="Effectiveness",Default=0.05,Lower=1e-8); |
---|
360 | |
---|
361 | EQUATIONS |
---|
362 | |
---|
363 | "Energy Balance" |
---|
364 | Details.Q = Eft*Details.Cmin*(Inlet.Hot.T-Inlet.Cold.T); |
---|
365 | |
---|
366 | |
---|
367 | end |
---|
368 | |
---|
369 | Model Heatex_Basic_LMTD as HeatExchangerSimplified_Basic |
---|
370 | #===================================================================== |
---|
371 | # Basic Model for Heat Exchangers - LMTD Method |
---|
372 | #===================================================================== |
---|
373 | VARIABLES |
---|
374 | |
---|
375 | DT0 as temp_delta (Brief="Temperature Difference at Inlet",Lower=1); |
---|
376 | DTL as temp_delta (Brief="Temperature Difference at Outlet",Lower=1); |
---|
377 | LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=1); |
---|
378 | Fc as positive (Brief="LMTD Correction Factor",Lower=0.5); |
---|
379 | MTD as temp_delta (Brief="Mean Temperature Difference",Lower=1); |
---|
380 | |
---|
381 | EQUATIONS |
---|
382 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
383 | # Log Mean Temperature Difference |
---|
384 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
385 | if abs(DT0 - DTL) > 0.05*max(abs([DT0,DTL])) |
---|
386 | |
---|
387 | then |
---|
388 | "Log Mean Temperature Difference" |
---|
389 | LMTD= (DT0-DTL)/ln(DT0/DTL); |
---|
390 | |
---|
391 | else |
---|
392 | |
---|
393 | if DT0*DTL equal 0 |
---|
394 | |
---|
395 | then |
---|
396 | "Log Mean Temperature Difference" |
---|
397 | LMTD = 0.5*(DT0+DTL); |
---|
398 | |
---|
399 | else |
---|
400 | "Log Mean Temperature Difference" |
---|
401 | LMTD = 0.5*(DT0+DTL)*(1-(DT0-DTL)^2/(DT0*DTL)*(1+(DT0-DTL)^2/(DT0*DTL)/2)/12); |
---|
402 | |
---|
403 | end |
---|
404 | |
---|
405 | end |
---|
406 | |
---|
407 | "Exchange Surface Area" |
---|
408 | Details.Q = Details.Ud*Details.A*MTD; |
---|
409 | |
---|
410 | "Mean Temperature Difference" |
---|
411 | MTD = Fc*LMTD; |
---|
412 | |
---|
413 | end |
---|
414 | |
---|
415 | |
---|
416 | #===================================================================== |
---|
417 | # Concrete Models for Simplified Heat Exchangers |
---|
418 | #===================================================================== |
---|
419 | |
---|
420 | #===================================================================== |
---|
421 | # LMTD Method |
---|
422 | #===================================================================== |
---|
423 | |
---|
424 | Model HeatExchanger_LMTD as Heatex_Basic_LMTD |
---|
425 | |
---|
426 | PARAMETERS |
---|
427 | |
---|
428 | Side as Integer (Brief="Flow Direction",Lower=0,Upper=1); |
---|
429 | |
---|
430 | SET |
---|
431 | |
---|
432 | Side = HE.FlowDir(); # Return Flow Direction |
---|
433 | |
---|
434 | EQUATIONS |
---|
435 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
436 | # Flow Direction |
---|
437 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
438 | if Side equal 0 |
---|
439 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
440 | # Cocurrent Flow |
---|
441 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
442 | then |
---|
443 | "Temperature Difference at Inlet" |
---|
444 | DT0 = Inlet.Hot.T - Inlet.Cold.T; |
---|
445 | |
---|
446 | "Temperature Difference at Outlet" |
---|
447 | DTL = Outlet.Hot.T - Outlet.Cold.T; |
---|
448 | |
---|
449 | else |
---|
450 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
451 | # Counter Flow |
---|
452 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
453 | "Temperature Difference at Inlet" |
---|
454 | DT0 = Inlet.Hot.T - Outlet.Cold.T; |
---|
455 | |
---|
456 | "Temperature Difference at Outlet" |
---|
457 | DTL = Outlet.Hot.T - Inlet.Cold.T; |
---|
458 | end |
---|
459 | |
---|
460 | end |
---|
461 | |
---|
462 | Model E_Shell_LMTD as Heatex_Basic_LMTD |
---|
463 | #===================================================================== |
---|
464 | # Shell and Tubes Heat Exchanger with 1 shell pass - LMTD Method |
---|
465 | #===================================================================== |
---|
466 | EQUATIONS |
---|
467 | "Temperature Difference at Inlet" |
---|
468 | DT0 = Inlet.Hot.T - Outlet.Cold.T; |
---|
469 | |
---|
470 | "Temperature Difference at Outlet" |
---|
471 | DTL = Outlet.Hot.T - Inlet.Cold.T; |
---|
472 | |
---|
473 | "LMTD Correction Factor" |
---|
474 | Fc = HE.EshellCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); |
---|
475 | |
---|
476 | end |
---|
477 | |
---|
478 | Model F_Shell_LMTD as Heatex_Basic_LMTD |
---|
479 | #===================================================================== |
---|
480 | # Shell and Tubes Heat Exchanger with 2 shell passes - LMTD Method |
---|
481 | #===================================================================== |
---|
482 | EQUATIONS |
---|
483 | "Temperature Difference at Inlet" |
---|
484 | DT0 = Inlet.Hot.T - Outlet.Cold.T; |
---|
485 | |
---|
486 | "Temperature Difference at Outlet" |
---|
487 | DTL = Outlet.Hot.T - Inlet.Cold.T; |
---|
488 | |
---|
489 | "LMTD Correction Factor" |
---|
490 | Fc = HE.FshellCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); |
---|
491 | |
---|
492 | end |
---|
493 | |
---|
494 | #===================================================================== |
---|
495 | # NTU Method |
---|
496 | #===================================================================== |
---|
497 | |
---|
498 | Model HeatExchanger_NTU as Heatex_Basic_NTU |
---|
499 | |
---|
500 | PARAMETERS |
---|
501 | |
---|
502 | Side as Integer (Brief="Flow Direction",Lower=0,Upper=1); |
---|
503 | |
---|
504 | SET |
---|
505 | |
---|
506 | Side = HE.FlowDir(); # Return Flow Direction |
---|
507 | |
---|
508 | EQUATIONS |
---|
509 | |
---|
510 | if Details.Cr equal 0 |
---|
511 | |
---|
512 | then |
---|
513 | "Effectiveness" |
---|
514 | Eft = 1-exp(-Details.NTU); |
---|
515 | |
---|
516 | else |
---|
517 | |
---|
518 | if Side equal 0 |
---|
519 | |
---|
520 | then |
---|
521 | "Effectiveness in Cocurrent Flow" |
---|
522 | Eft = (1-exp(-Details.NTU*(1+Details.Cr)))/(1+Details.Cr); |
---|
523 | |
---|
524 | else |
---|
525 | |
---|
526 | if Details.Cr equal 1 |
---|
527 | |
---|
528 | then |
---|
529 | "Effectiveness in Counter Flow" |
---|
530 | Eft = Details.NTU/(1+Details.NTU); |
---|
531 | |
---|
532 | else |
---|
533 | "Effectiveness in Counter Flow" |
---|
534 | Eft*(1-Details.Cr*exp(-Details.NTU*(1-Details.Cr))) = (1-exp(-Details.NTU*(1-Details.Cr))); |
---|
535 | |
---|
536 | end |
---|
537 | |
---|
538 | end |
---|
539 | |
---|
540 | |
---|
541 | end |
---|
542 | |
---|
543 | |
---|
544 | end |
---|
545 | |
---|
546 | Model E_Shell_NTU as Heatex_Basic_NTU |
---|
547 | #===================================================================== |
---|
548 | # Shell and Tubes Heat Exchanger with 1 shell pass - NTU Method |
---|
549 | #===================================================================== |
---|
550 | EQUATIONS |
---|
551 | "TEMA E Shell Effectiveness" |
---|
552 | Eft = 2*(1+Details.Cr+sqrt(1+Details.Cr^2)*((1+exp(-Details.NTU*sqrt(1+Details.Cr^2)))/(1-exp(-Details.NTU*sqrt(1+Details.Cr^2)))) )^-1; |
---|
553 | |
---|
554 | end |
---|
555 | |
---|
556 | Model F_Shell_NTU as Heatex_Basic_NTU |
---|
557 | #===================================================================== |
---|
558 | # Shell and Tubes Heat Exchanger with 2 shell passes - NTU Method |
---|
559 | #===================================================================== |
---|
560 | VARIABLES |
---|
561 | |
---|
562 | Eft1 as positive (Brief="Effectiveness Correction",Lower=0.01,Upper=1,Default=0.5); |
---|
563 | |
---|
564 | EQUATIONS |
---|
565 | |
---|
566 | "Effectiveness Correction" |
---|
567 | Eft1 = 2*(1+Details.Cr+sqrt(1+Details.Cr^2)*((1+exp(-Details.NTU*sqrt(1+Details.Cr^2)))/(1-exp(-Details.NTU*sqrt(1+Details.Cr^2)))) )^-1; |
---|
568 | |
---|
569 | "TEMA F Shell Effectiveness" |
---|
570 | Eft = ( ((1-Eft1*Details.Cr)/(1-Eft1))^2 -1 )*( ((1-Eft1*Details.Cr)/(1-Eft1))^2 - Details.Cr )^-1; |
---|
571 | |
---|
572 | end |
---|