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 | * Author: Gerson Balbueno Bicca |
---|
16 | * $Id: Hairpin.mso Z bicca $ |
---|
17 | *------------------------------------------------------------------*# |
---|
18 | |
---|
19 | using "HEX_Engine"; |
---|
20 | |
---|
21 | Model Hairpin_Basic |
---|
22 | |
---|
23 | ATTRIBUTES |
---|
24 | Pallete = false; |
---|
25 | Brief = "Basic Equations for hairpin heat exchanger model."; |
---|
26 | Info = |
---|
27 | "to be documented."; |
---|
28 | |
---|
29 | PARAMETERS |
---|
30 | |
---|
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",Hidden=true); |
---|
35 | |
---|
36 | HotSide as Switcher (Brief="Flag for Fluid Alocation ",Valid=["outer","inner"],Default="outer",Hidden=true); |
---|
37 | innerFlowRegime as Switcher (Brief="Inner Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar",Hidden=true); |
---|
38 | outerFlowRegime as Switcher (Brief="Outer Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar",Hidden=true); |
---|
39 | |
---|
40 | InnerLaminarCorrelation as Switcher (Brief="Heat Transfer Correlation in Laminar Flow for the Inner Side",Valid=["Hausen","Schlunder"],Default="Hausen"); |
---|
41 | InnerTransitionCorrelation as Switcher (Brief="Heat Transfer Correlation in Transition Flow for the Inner Side",Valid=["Gnielinski","Hausen"],Default="Gnielinski"); |
---|
42 | InnerTurbulentCorrelation as Switcher (Brief="Heat Transfer Correlation in Turbulent Flow for the Inner Side",Valid=["Petukhov","SiederTate"],Default="Petukhov"); |
---|
43 | |
---|
44 | OuterLaminarCorrelation as Switcher (Brief="Heat Transfer Correlation in Laminar Flow for the Outer Side",Valid=["Hausen","Schlunder"],Default="Hausen"); |
---|
45 | OuterTransitionCorrelation as Switcher (Brief="Heat Transfer Correlation in Transition Flow for the OuterSide",Valid=["Gnielinski","Hausen"],Default="Gnielinski"); |
---|
46 | OuterTurbulentCorrelation as Switcher (Brief="Heat Transfer Correlation in Turbulent Flow for the Outer Side",Valid=["Petukhov","SiederTate"],Default="Petukhov"); |
---|
47 | |
---|
48 | CalculationApproach as Switcher (Brief="Options for convergence Calculations ",Valid=["Simplified","Full"],Default="Full"); |
---|
49 | Qestimated as power (Brief="Estimated Duty", Default=70, Lower=1e-6, Upper=1e10); |
---|
50 | |
---|
51 | Pi as constant (Brief="Pi Number",Default=3.14159265, Symbol = "\pi",Hidden=true); |
---|
52 | DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e-6); |
---|
53 | DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e-10); |
---|
54 | DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e-10); |
---|
55 | Lpipe as length (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}"); |
---|
56 | Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}"); |
---|
57 | Rfi as positive (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0); |
---|
58 | Rfo as positive (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0); |
---|
59 | |
---|
60 | VARIABLES |
---|
61 | |
---|
62 | in InletInner as stream (Brief="Inlet Inner Stream", PosX=1, PosY=0.7, Symbol="_{inInner}"); |
---|
63 | in InletOuter as stream (Brief="Inlet Outer Stream", PosX=0.8, PosY=0, Symbol="_{inOuter}"); |
---|
64 | out OutletInner as streamPH (Brief="Outlet Inner Stream", PosX=1, PosY=0.3, Symbol="_{outInner}"); |
---|
65 | out OutletOuter as streamPH (Brief="Outlet Outer Stream", PosX=0.8, PosY=1, Symbol="_{outOuter}"); |
---|
66 | |
---|
67 | Details as Details_Main (Brief="Some Details in the Heat Exchanger", Symbol=" "); |
---|
68 | Inner as Main_DoublePipe (Brief="Inner Side of the Heat Exchanger", Symbol="_{Inner}"); |
---|
69 | Outer as Main_DoublePipe (Brief="Outer Side of the Heat Exchanger", Symbol="_{Outer}"); |
---|
70 | |
---|
71 | SET |
---|
72 | |
---|
73 | #"Component Molecular Weight" |
---|
74 | M = PP.MolecularWeight(); |
---|
75 | |
---|
76 | #"Pi Number" |
---|
77 | Pi = 3.14159265; |
---|
78 | |
---|
79 | #"Inner Pipe Cross Sectional Area for Flow" |
---|
80 | Inner.HeatTransfer.As=Pi*DiInner*DiInner/4; |
---|
81 | |
---|
82 | #"Outer Pipe Cross Sectional Area for Flow" |
---|
83 | Outer.HeatTransfer.As=Pi*(DiOuter*DiOuter - DoInner*DoInner)/4; |
---|
84 | |
---|
85 | #"Inner Pipe Hydraulic Diameter for Heat Transfer" |
---|
86 | Inner.HeatTransfer.Dh=DiInner; |
---|
87 | |
---|
88 | #"Outer Pipe Hydraulic Diameter for Heat Transfer" |
---|
89 | Outer.HeatTransfer.Dh=(DiOuter*DiOuter-DoInner*DoInner)/DoInner; |
---|
90 | |
---|
91 | #"Inner Pipe Hydraulic Diameter for Pressure Drop" |
---|
92 | Inner.PressureDrop.Dh=DiInner; |
---|
93 | |
---|
94 | #"Outer Pipe Hydraulic Diameter for Pressure Drop" |
---|
95 | Outer.PressureDrop.Dh=DiOuter-DoInner; |
---|
96 | |
---|
97 | EQUATIONS |
---|
98 | |
---|
99 | "Outer Stream Average Temperature" |
---|
100 | Outer.Properties.Average.T = 0.5*InletOuter.T + 0.5*OutletOuter.T; |
---|
101 | |
---|
102 | "Inner Stream Average Temperature" |
---|
103 | Inner.Properties.Average.T = 0.5*InletInner.T + 0.5*OutletInner.T; |
---|
104 | |
---|
105 | "Outer Stream Average Pressure" |
---|
106 | Outer.Properties.Average.P = 0.5*InletOuter.P+0.5*OutletOuter.P; |
---|
107 | |
---|
108 | "Inner Stream Average Pressure" |
---|
109 | Inner.Properties.Average.P = 0.5*InletInner.P+0.5*OutletInner.P; |
---|
110 | |
---|
111 | "Inner Stream Wall Temperature" |
---|
112 | Inner.Properties.Wall.Twall = 0.5*Outer.Properties.Average.T + 0.5*Inner.Properties.Average.T; |
---|
113 | |
---|
114 | "Outer Stream Wall Temperature" |
---|
115 | Outer.Properties.Wall.Twall = 0.5*Outer.Properties.Average.T + 0.5*Inner.Properties.Average.T; |
---|
116 | |
---|
117 | "Outer Stream Average Molecular Weight" |
---|
118 | Outer.Properties.Average.Mw = sum(M*InletOuter.z); |
---|
119 | |
---|
120 | "Inner Stream Average Molecular Weight" |
---|
121 | Inner.Properties.Average.Mw = sum(M*InletInner.z); |
---|
122 | |
---|
123 | if InletInner.v equal 0 |
---|
124 | |
---|
125 | then |
---|
126 | |
---|
127 | "Average Heat Capacity Inner Stream" |
---|
128 | Inner.Properties.Average.Cp = PP.LiquidCp(Inner.Properties.Average.T,Inner.Properties.Average.P,InletInner.z); |
---|
129 | |
---|
130 | "Average Mass Density Inner Stream" |
---|
131 | Inner.Properties.Average.rho = PP.LiquidDensity(Inner.Properties.Average.T,Inner.Properties.Average.P,InletInner.z); |
---|
132 | |
---|
133 | "Inlet Mass Density Inner Stream" |
---|
134 | Inner.Properties.Inlet.rho = PP.LiquidDensity(InletInner.T,InletInner.P,InletInner.z); |
---|
135 | |
---|
136 | "Outlet Mass Density Inner Stream" |
---|
137 | Inner.Properties.Outlet.rho = PP.LiquidDensity(OutletInner.T,OutletInner.P,OutletInner.z); |
---|
138 | |
---|
139 | "Average Viscosity Inner Stream" |
---|
140 | Inner.Properties.Average.Mu = PP.LiquidViscosity(Inner.Properties.Average.T,Inner.Properties.Average.P,InletInner.z); |
---|
141 | |
---|
142 | "Average Conductivity Inner Stream" |
---|
143 | Inner.Properties.Average.K = PP.LiquidThermalConductivity(Inner.Properties.Average.T,Inner.Properties.Average.P,InletInner.z); |
---|
144 | |
---|
145 | "Viscosity Inner Stream at wall temperature" |
---|
146 | Inner.Properties.Wall.Mu = PP.LiquidViscosity(Inner.Properties.Wall.Twall,Inner.Properties.Average.P,InletInner.z); |
---|
147 | |
---|
148 | else |
---|
149 | |
---|
150 | "Average Heat Capacity InnerStream" |
---|
151 | Inner.Properties.Average.Cp = PP.VapourCp(Inner.Properties.Average.T,Inner.Properties.Average.P,InletInner.z); |
---|
152 | |
---|
153 | "Average Mass Density Inner Stream" |
---|
154 | Inner.Properties.Average.rho = PP.VapourDensity(Inner.Properties.Average.T,Inner.Properties.Average.P,InletInner.z); |
---|
155 | |
---|
156 | "Inlet Mass Density Inner Stream" |
---|
157 | Inner.Properties.Inlet.rho = PP.VapourDensity(InletInner.T,InletInner.P,InletInner.z); |
---|
158 | |
---|
159 | "Outlet Mass Density Inner Stream" |
---|
160 | Inner.Properties.Outlet.rho = PP.VapourDensity(OutletInner.T,OutletInner.P,OutletInner.z); |
---|
161 | |
---|
162 | "Average Viscosity Inner Stream" |
---|
163 | Inner.Properties.Average.Mu = PP.VapourViscosity(Inner.Properties.Average.T,Inner.Properties.Average.P,InletInner.z); |
---|
164 | |
---|
165 | "Average Conductivity Inner Stream" |
---|
166 | Inner.Properties.Average.K = PP.VapourThermalConductivity(Inner.Properties.Average.T,Inner.Properties.Average.P,InletInner.z); |
---|
167 | |
---|
168 | "Viscosity Inner Stream at wall temperature" |
---|
169 | Inner.Properties.Wall.Mu = PP.VapourViscosity(Inner.Properties.Wall.Twall,Inner.Properties.Average.P,InletInner.z); |
---|
170 | |
---|
171 | end |
---|
172 | |
---|
173 | if InletOuter.v equal 0 |
---|
174 | |
---|
175 | then |
---|
176 | |
---|
177 | "Average Heat Capacity Outer Stream" |
---|
178 | Outer.Properties.Average.Cp = PP.LiquidCp(Outer.Properties.Average.T,Outer.Properties.Average.P,InletOuter.z); |
---|
179 | |
---|
180 | "Average Mass Density Outer Stream" |
---|
181 | Outer.Properties.Average.rho = PP.LiquidDensity(Outer.Properties.Average.T,Outer.Properties.Average.P,InletOuter.z); |
---|
182 | |
---|
183 | "Inlet Mass Density Outer Stream" |
---|
184 | Outer.Properties.Inlet.rho = PP.LiquidDensity(InletOuter.T,InletOuter.P,InletOuter.z); |
---|
185 | |
---|
186 | "Outlet Mass Density Outer Stream" |
---|
187 | Outer.Properties.Outlet.rho = PP.LiquidDensity(OutletOuter.T,OutletOuter.P,OutletOuter.z); |
---|
188 | |
---|
189 | "Average Viscosity Outer Stream" |
---|
190 | Outer.Properties.Average.Mu = PP.LiquidViscosity(Outer.Properties.Average.T,Outer.Properties.Average.P,InletOuter.z); |
---|
191 | |
---|
192 | "Average Conductivity Outer Stream" |
---|
193 | Outer.Properties.Average.K = PP.LiquidThermalConductivity(Outer.Properties.Average.T,Outer.Properties.Average.P,InletOuter.z); |
---|
194 | |
---|
195 | "Viscosity Outer Stream at wall temperature" |
---|
196 | Outer.Properties.Wall.Mu = PP.LiquidViscosity(Outer.Properties.Wall.Twall,Outer.Properties.Average.P,InletOuter.z); |
---|
197 | |
---|
198 | |
---|
199 | else |
---|
200 | |
---|
201 | "Average Heat Capacity Outer Stream" |
---|
202 | Outer.Properties.Average.Cp = PP.VapourCp(Outer.Properties.Average.T,Outer.Properties.Average.P,InletOuter.z); |
---|
203 | |
---|
204 | "Average Mass Density Outer Stream" |
---|
205 | Outer.Properties.Average.rho = PP.VapourDensity(Outer.Properties.Average.T,Outer.Properties.Average.P,InletOuter.z); |
---|
206 | |
---|
207 | "Inlet Mass Density Outer Stream" |
---|
208 | Outer.Properties.Inlet.rho = PP.VapourDensity(InletOuter.T,InletOuter.P,InletOuter.z); |
---|
209 | |
---|
210 | "Outlet Mass Density Outer Stream" |
---|
211 | Outer.Properties.Outlet.rho = PP.VapourDensity(OutletOuter.T,OutletOuter.P,OutletOuter.z); |
---|
212 | |
---|
213 | "Average Viscosity Outer Stream" |
---|
214 | Outer.Properties.Average.Mu = PP.VapourViscosity(Outer.Properties.Average.T,Outer.Properties.Average.P,InletOuter.z); |
---|
215 | |
---|
216 | "Average Conductivity Outer Stream" |
---|
217 | Outer.Properties.Average.K = PP.VapourThermalConductivity(Outer.Properties.Average.T,Outer.Properties.Average.P,InletOuter.z); |
---|
218 | |
---|
219 | "Viscosity Outer Stream at wall temperature" |
---|
220 | Outer.Properties.Wall.Mu = PP.VapourViscosity(Outer.Properties.Wall.Twall,Outer.Properties.Average.P,InletOuter.z); |
---|
221 | |
---|
222 | end |
---|
223 | |
---|
224 | switch HotSide |
---|
225 | |
---|
226 | case "outer": |
---|
227 | |
---|
228 | "Energy Balance Outer Stream" |
---|
229 | Details.Q = InletOuter.F*(InletOuter.h-OutletOuter.h); |
---|
230 | |
---|
231 | "Energy Balance Inner Stream" |
---|
232 | Details.Q = InletInner.F*(OutletInner.h-InletInner.h); |
---|
233 | |
---|
234 | when InletInner.T > InletOuter.T switchto "inner"; |
---|
235 | |
---|
236 | case "inner": |
---|
237 | |
---|
238 | "Energy Balance Hot Stream" |
---|
239 | Details.Q = InletInner.F*(InletInner.h-OutletInner.h); |
---|
240 | |
---|
241 | "Energy Balance Cold Stream" |
---|
242 | Details.Q = InletOuter.F*(OutletOuter.h - InletOuter.h); |
---|
243 | |
---|
244 | when InletInner.T < InletOuter.T switchto "outer"; |
---|
245 | |
---|
246 | end |
---|
247 | |
---|
248 | "Flow Mass Inlet Inner Stream" |
---|
249 | Inner.Properties.Inlet.Fw = sum(M*InletInner.z)*InletInner.F; |
---|
250 | |
---|
251 | "Flow Mass Outlet Inner Stream" |
---|
252 | Inner.Properties.Outlet.Fw = sum(M*OutletInner.z)*OutletInner.F; |
---|
253 | |
---|
254 | "Flow Mass Inlet Outer Stream" |
---|
255 | Outer.Properties.Inlet.Fw = sum(M*InletOuter.z)*InletOuter.F; |
---|
256 | |
---|
257 | "Flow Mass Outlet Outer Stream" |
---|
258 | Outer.Properties.Outlet.Fw = sum(M*OutletOuter.z)*OutletOuter.F; |
---|
259 | |
---|
260 | "Molar Balance Outer Stream" |
---|
261 | OutletOuter.F = InletOuter.F; |
---|
262 | |
---|
263 | "Molar Balance Inner Stream" |
---|
264 | OutletInner.F = InletInner.F; |
---|
265 | |
---|
266 | "Outer Stream Molar Fraction Constraint" |
---|
267 | OutletOuter.z=InletOuter.z; |
---|
268 | |
---|
269 | "InnerStream Molar Fraction Constraint" |
---|
270 | OutletInner.z=InletInner.z; |
---|
271 | |
---|
272 | "Exchange Surface Area for one segment of pipe" |
---|
273 | Details.A=Pi*DoInner*(2*Lpipe); |
---|
274 | |
---|
275 | switch innerFlowRegime |
---|
276 | |
---|
277 | case "laminar": |
---|
278 | |
---|
279 | "Inner Side Friction Factor for Pressure Drop - laminar Flow" |
---|
280 | Inner.PressureDrop.fi*Inner.PressureDrop.Re = 16; |
---|
281 | |
---|
282 | when Inner.PressureDrop.Re > 2300 switchto "transition"; |
---|
283 | |
---|
284 | case "transition": |
---|
285 | |
---|
286 | "using Turbulent Flow - to be implemented" |
---|
287 | (Inner.PressureDrop.fi-0.0035)*(Inner.PressureDrop.Re^0.42) = 0.264; |
---|
288 | |
---|
289 | when Inner.PressureDrop.Re < 2300 switchto "laminar"; |
---|
290 | when Inner.PressureDrop.Re > 10000 switchto "turbulent"; |
---|
291 | |
---|
292 | case "turbulent": |
---|
293 | |
---|
294 | "Inner Side Friction Factor - Turbulent Flow" |
---|
295 | (Inner.PressureDrop.fi-0.0035)*(Inner.PressureDrop.Re^0.42) = 0.264; |
---|
296 | |
---|
297 | when Inner.PressureDrop.Re < 10000 switchto "transition"; |
---|
298 | |
---|
299 | end |
---|
300 | |
---|
301 | switch outerFlowRegime |
---|
302 | |
---|
303 | case "laminar": |
---|
304 | |
---|
305 | "Outer Side Friction Factor - laminar Flow" |
---|
306 | Outer.PressureDrop.fi*Outer.PressureDrop.Re = 16; |
---|
307 | |
---|
308 | when Outer.PressureDrop.Re > 2300 switchto "transition"; |
---|
309 | |
---|
310 | case "transition": |
---|
311 | |
---|
312 | "using Turbulent Flow - Transition Flow must be implemented" |
---|
313 | (Outer.PressureDrop.fi-0.0035)*(Outer.PressureDrop.Re^0.42) = 0.264; |
---|
314 | |
---|
315 | when Outer.PressureDrop.Re < 2300 switchto "laminar"; |
---|
316 | when Outer.PressureDrop.Re > 10000 switchto "turbulent"; |
---|
317 | |
---|
318 | case "turbulent": |
---|
319 | |
---|
320 | "Outer Side Friction Factor - Turbulent Flow" |
---|
321 | (Outer.PressureDrop.fi-0.0035)*(Outer.PressureDrop.Re^0.42) = 0.264; |
---|
322 | |
---|
323 | when Outer.PressureDrop.Re < 10000 switchto "transition"; |
---|
324 | |
---|
325 | end |
---|
326 | |
---|
327 | switch innerFlowRegime |
---|
328 | |
---|
329 | case "laminar": |
---|
330 | |
---|
331 | "Inner Side Friction Factor for Heat Transfer - laminar Flow" |
---|
332 | Inner.HeatTransfer.fi = 1/(0.79*ln(Inner.HeatTransfer.Re)-1.64)^2; |
---|
333 | |
---|
334 | switch InnerLaminarCorrelation |
---|
335 | |
---|
336 | case "Hausen": |
---|
337 | |
---|
338 | "Nusselt Number" |
---|
339 | Inner.HeatTransfer.Nu = 3.665 + ((0.19*((DiInner/Lpipe)*Inner.HeatTransfer.Re*Inner.HeatTransfer.PR)^0.8)/(1+0.117*((DiInner/Lpipe)*Inner.HeatTransfer.Re*Inner.HeatTransfer.PR)^0.467)); |
---|
340 | |
---|
341 | case "Schlunder": |
---|
342 | |
---|
343 | "Nusselt Number" |
---|
344 | Inner.HeatTransfer.Nu = (49.027896+4.173281*Inner.HeatTransfer.Re*Inner.HeatTransfer.PR*(DiInner/Lpipe))^(1/3); |
---|
345 | |
---|
346 | end |
---|
347 | |
---|
348 | when Inner.HeatTransfer.Re > 2300 switchto "transition"; |
---|
349 | |
---|
350 | case "transition": |
---|
351 | |
---|
352 | "Inner Side Friction Factor for Heat Transfer - transition Flow" |
---|
353 | Inner.HeatTransfer.fi = 1/(0.79*ln(Inner.HeatTransfer.Re)-1.64)^2; |
---|
354 | |
---|
355 | switch InnerTransitionCorrelation |
---|
356 | |
---|
357 | case "Gnielinski": |
---|
358 | |
---|
359 | "Nusselt Number" |
---|
360 | Inner.HeatTransfer.Nu*(1+(12.7*sqrt(0.125*Inner.HeatTransfer.fi)*((Inner.HeatTransfer.PR)^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi*(Inner.HeatTransfer.Re-1000)*Inner.HeatTransfer.PR; |
---|
361 | |
---|
362 | case "Hausen": |
---|
363 | |
---|
364 | "Nusselt Number" |
---|
365 | Inner.HeatTransfer.Nu =0.116*(Inner.HeatTransfer.Re^(0.667)-125)*Inner.HeatTransfer.PR^(0.333)*(1+(DiInner/Lpipe)^0.667); |
---|
366 | |
---|
367 | end |
---|
368 | |
---|
369 | when Inner.HeatTransfer.Re < 2300 switchto "laminar"; |
---|
370 | when Inner.HeatTransfer.Re > 10000 switchto "turbulent"; |
---|
371 | |
---|
372 | case "turbulent": |
---|
373 | |
---|
374 | switch InnerTurbulentCorrelation |
---|
375 | |
---|
376 | case "Petukhov": |
---|
377 | |
---|
378 | "Inner Side Friction Factor for Heat Transfer - turbulent Flow" |
---|
379 | Inner.HeatTransfer.fi = 1/(1.82*log(Inner.HeatTransfer.Re)-1.64)^2; |
---|
380 | |
---|
381 | "Nusselt Number" |
---|
382 | Inner.HeatTransfer.Nu*(1.07+(12.7*sqrt(0.125*Inner.HeatTransfer.fi)*((Inner.HeatTransfer.PR)^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi*Inner.HeatTransfer.Re*Inner.HeatTransfer.PR; |
---|
383 | |
---|
384 | case "SiederTate": |
---|
385 | |
---|
386 | "Nusselt Number" |
---|
387 | Inner.HeatTransfer.Nu = 0.027*(Inner.HeatTransfer.PR)^(1/3)*(Inner.HeatTransfer.Re)^(4/5); |
---|
388 | |
---|
389 | "Inner Side Friction Factor for Heat Transfer - turbulent Flow" |
---|
390 | Inner.HeatTransfer.fi = 1/(1.82*log(Inner.HeatTransfer.Re)-1.64)^2; |
---|
391 | |
---|
392 | end |
---|
393 | |
---|
394 | when Inner.HeatTransfer.Re < 10000 switchto "transition"; |
---|
395 | |
---|
396 | end |
---|
397 | |
---|
398 | switch outerFlowRegime |
---|
399 | |
---|
400 | case "laminar": |
---|
401 | |
---|
402 | "Outer Side Friction Factor for Heat Transfer - laminar Flow" |
---|
403 | Outer.HeatTransfer.fi = 1/(0.79*ln(Outer.HeatTransfer.Re)-1.64)^2; |
---|
404 | |
---|
405 | switch OuterLaminarCorrelation |
---|
406 | |
---|
407 | case "Hausen": |
---|
408 | |
---|
409 | "Nusselt Number" |
---|
410 | Outer.HeatTransfer.Nu = 3.665 + ((0.19*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re*Outer.HeatTransfer.PR)^0.8)/(1+0.117*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re*Outer.HeatTransfer.PR)^0.467)); |
---|
411 | |
---|
412 | case "Schlunder": |
---|
413 | |
---|
414 | "Nusselt Number" |
---|
415 | Outer.HeatTransfer.Nu = (49.027896+4.173281*Outer.HeatTransfer.Re*Outer.HeatTransfer.PR*(Outer.HeatTransfer.Dh/Lpipe))^(1/3); |
---|
416 | |
---|
417 | end |
---|
418 | |
---|
419 | when Outer.HeatTransfer.Re > 2300 switchto "transition"; |
---|
420 | |
---|
421 | case "transition": |
---|
422 | |
---|
423 | switch OuterTransitionCorrelation |
---|
424 | |
---|
425 | case "Gnielinski": |
---|
426 | |
---|
427 | "Outer Side Friction Factor for Heat Transfer - transition Flow" |
---|
428 | Outer.HeatTransfer.fi = 1/(0.79*ln(Outer.HeatTransfer.Re)-1.64)^2; |
---|
429 | |
---|
430 | "Nusselt Number" |
---|
431 | Outer.HeatTransfer.Nu*(1+(12.7*sqrt(0.125*Outer.HeatTransfer.fi)*((Outer.HeatTransfer.PR)^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi*(Outer.HeatTransfer.Re-1000)*Outer.HeatTransfer.PR; |
---|
432 | |
---|
433 | case "Hausen": |
---|
434 | |
---|
435 | "Nusselt Number" |
---|
436 | Outer.HeatTransfer.Nu = 0.116*(Outer.HeatTransfer.Re^(0.667)-125)*Outer.HeatTransfer.PR^(0.333)*(1+(Outer.HeatTransfer.Dh/Lpipe)^0.667); |
---|
437 | |
---|
438 | |
---|
439 | "Outer Side Friction Factor for Heat Transfer - transition Flow" |
---|
440 | Outer.HeatTransfer.fi = 1/(0.79*ln(Outer.HeatTransfer.Re)-1.64)^2; |
---|
441 | |
---|
442 | end |
---|
443 | |
---|
444 | when Outer.HeatTransfer.Re < 2300 switchto "laminar"; |
---|
445 | when Outer.HeatTransfer.Re > 10000 switchto "turbulent"; |
---|
446 | |
---|
447 | case "turbulent": |
---|
448 | |
---|
449 | switch OuterTurbulentCorrelation |
---|
450 | |
---|
451 | case "Petukhov": |
---|
452 | |
---|
453 | "Outer Side Friction Factor for Heat Transfer - turbulent Flow" |
---|
454 | Outer.HeatTransfer.fi = 1/(1.82*log(Outer.HeatTransfer.Re)-1.64)^2; |
---|
455 | |
---|
456 | "Nusselt Number" |
---|
457 | Outer.HeatTransfer.Nu*(1.07+(12.7*sqrt(0.125*Outer.HeatTransfer.fi)*((Outer.HeatTransfer.PR)^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi*Outer.HeatTransfer.Re*Outer.HeatTransfer.PR; |
---|
458 | |
---|
459 | case "SiederTate": |
---|
460 | |
---|
461 | "Nusselt Number" |
---|
462 | Outer.HeatTransfer.Nu = 0.027*(Outer.HeatTransfer.PR)^(1/3)*(Outer.HeatTransfer.Re)^(4/5); |
---|
463 | |
---|
464 | "Outer Side Friction Factor for Heat Transfer - turbulent Flow" |
---|
465 | Outer.HeatTransfer.fi = 1/(1.82*log(Outer.HeatTransfer.Re)-1.64)^2; |
---|
466 | |
---|
467 | end |
---|
468 | |
---|
469 | when Outer.HeatTransfer.Re < 10000 switchto "transition"; |
---|
470 | |
---|
471 | end |
---|
472 | |
---|
473 | "Inner Pipe Film Coefficient" |
---|
474 | Inner.HeatTransfer.hcoeff = (Inner.HeatTransfer.Nu*Inner.Properties.Average.K/DiInner)*Inner.HeatTransfer.Phi; |
---|
475 | |
---|
476 | "Outer Pipe Film Coefficient" |
---|
477 | Outer.HeatTransfer.hcoeff= (Outer.HeatTransfer.Nu*Outer.Properties.Average.K/Outer.HeatTransfer.Dh)*Outer.HeatTransfer.Phi; |
---|
478 | |
---|
479 | switch CalculationApproach |
---|
480 | |
---|
481 | case "Full": |
---|
482 | |
---|
483 | "Total Pressure Drop Outer Stream" |
---|
484 | Outer.PressureDrop.Pdrop = Outer.PressureDrop.Pd_fric+Outer.PressureDrop.Pd_ret; |
---|
485 | |
---|
486 | "Total Pressure Drop Inner Stream" |
---|
487 | Inner.PressureDrop.Pdrop = Inner.PressureDrop.Pd_fric+Inner.PressureDrop.Pd_ret; |
---|
488 | |
---|
489 | "Pressure Drop Outer Stream" |
---|
490 | OutletOuter.P = InletOuter.P - Outer.PressureDrop.Pdrop; |
---|
491 | |
---|
492 | "Pressure Drop Inner Stream" |
---|
493 | OutletInner.P = InletInner.P - Inner.PressureDrop.Pdrop; |
---|
494 | |
---|
495 | "Outer Pipe Pressure Drop for friction" |
---|
496 | Outer.PressureDrop.Pd_fric = (2*Outer.PressureDrop.fi*(2*Lpipe)*Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi); |
---|
497 | |
---|
498 | "Inner Pipe Pressure Drop for friction" |
---|
499 | Inner.PressureDrop.Pd_fric = (2*Inner.PressureDrop.fi*(2*Lpipe)*Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi); |
---|
500 | |
---|
501 | "Outer Pipe Pressure Drop due to return" |
---|
502 | Outer.PressureDrop.Pd_ret = 1.5*Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean^2; |
---|
503 | |
---|
504 | "Inner Pipe Pressure Drop due to return" |
---|
505 | Inner.PressureDrop.Pd_ret = 1.5*Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean^2; |
---|
506 | |
---|
507 | "Outer Pipe Phi correction" |
---|
508 | Outer.HeatTransfer.Phi = (Outer.Properties.Average.Mu/Outer.Properties.Wall.Mu)^0.14; |
---|
509 | |
---|
510 | "Inner Pipe Phi correction" |
---|
511 | Inner.HeatTransfer.Phi = (Inner.Properties.Average.Mu/Inner.Properties.Wall.Mu)^0.14; |
---|
512 | |
---|
513 | case "Simplified": |
---|
514 | |
---|
515 | "Total Pressure Drop Outer Stream" |
---|
516 | Outer.PressureDrop.Pdrop = 0*'kPa'; |
---|
517 | |
---|
518 | "Total Pressure Drop Inner Stream" |
---|
519 | Inner.PressureDrop.Pdrop = 0*'kPa'; |
---|
520 | |
---|
521 | "Pressure Drop Outer Stream" |
---|
522 | OutletOuter.P = InletOuter.P; |
---|
523 | |
---|
524 | "Pressure Drop Inner Stream" |
---|
525 | OutletInner.P = InletInner.P; |
---|
526 | |
---|
527 | "Outer Pipe Pressure Drop for friction" |
---|
528 | Outer.PressureDrop.Pd_fric = 0*'kPa'; |
---|
529 | |
---|
530 | "Inner Pipe Pressure Drop for friction" |
---|
531 | Inner.PressureDrop.Pd_fric = 0*'kPa'; |
---|
532 | |
---|
533 | "Outer Pipe Pressure Drop due to return" |
---|
534 | Outer.PressureDrop.Pd_ret = 0*'kPa'; |
---|
535 | |
---|
536 | "Inner Pipe Pressure Drop due to return" |
---|
537 | Inner.PressureDrop.Pd_ret = 0*'kPa'; |
---|
538 | |
---|
539 | "Outer Pipe Phi correction" |
---|
540 | Outer.HeatTransfer.Phi = 1; |
---|
541 | |
---|
542 | "Inner Pipe Phi correction" |
---|
543 | Inner.HeatTransfer.Phi = 1; |
---|
544 | |
---|
545 | end |
---|
546 | |
---|
547 | "Outer Pipe Prandtl Number" |
---|
548 | Outer.HeatTransfer.PR = ((Outer.Properties.Average.Cp/Outer.Properties.Average.Mw)*Outer.Properties.Average.Mu)/Outer.Properties.Average.K; |
---|
549 | |
---|
550 | "Inner Pipe Prandtl Number" |
---|
551 | Inner.HeatTransfer.PR = ((Inner.Properties.Average.Cp/Inner.Properties.Average.Mw)*Inner.Properties.Average.Mu)/Inner.Properties.Average.K; |
---|
552 | |
---|
553 | "Outer Pipe Reynolds Number for Heat Transfer" |
---|
554 | Outer.HeatTransfer.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Outer.Properties.Average.Mu; |
---|
555 | |
---|
556 | "Outer Pipe Reynolds Number for Pressure Drop" |
---|
557 | Outer.PressureDrop.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Outer.Properties.Average.Mu; |
---|
558 | |
---|
559 | "Inner Pipe Reynolds Number for Heat Transfer" |
---|
560 | Inner.HeatTransfer.Re = (Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Inner.Properties.Average.Mu; |
---|
561 | |
---|
562 | "Inner Pipe Reynolds Number for Pressure Drop" |
---|
563 | Inner.PressureDrop.Re = Inner.HeatTransfer.Re; |
---|
564 | |
---|
565 | "Outer Pipe Velocity" |
---|
566 | Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Outer.Properties.Average.rho) = Outer.Properties.Inlet.Fw; |
---|
567 | |
---|
568 | "Inner Pipe Velocity" |
---|
569 | Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Inner.Properties.Average.rho) = Inner.Properties.Inlet.Fw; |
---|
570 | |
---|
571 | "Overall Heat Transfer Coefficient Clean" |
---|
572 | Details.Uc*((DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff)))=1; |
---|
573 | |
---|
574 | "Overall Heat Transfer Coefficient Dirty" |
---|
575 | Details.Ud*(Rfi*(DoInner/DiInner) + Rfo + (DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff)))=1; |
---|
576 | |
---|
577 | end |
---|
578 | |
---|
579 | Model Hairpin_NTU as Hairpin_Basic |
---|
580 | |
---|
581 | ATTRIBUTES |
---|
582 | |
---|
583 | Icon = "icon/hairpin"; |
---|
584 | Pallete = true; |
---|
585 | Brief = "Hairpin Heat Exchanger - NTU Method"; |
---|
586 | Info = |
---|
587 | "to be documented."; |
---|
588 | |
---|
589 | PARAMETERS |
---|
590 | |
---|
591 | FlowDirection as Switcher (Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent"); |
---|
592 | Eftestimated as positive (Brief="Effectiveness estimate",Default=0.5); |
---|
593 | |
---|
594 | VARIABLES |
---|
595 | |
---|
596 | Method as NTU_Basic (Brief="NTU Method of Calculation", Symbol=" "); |
---|
597 | |
---|
598 | EQUATIONS |
---|
599 | |
---|
600 | "Effectiveness Correction" |
---|
601 | Method.Eft1 = 1; |
---|
602 | |
---|
603 | switch CalculationApproach |
---|
604 | |
---|
605 | case "Full": |
---|
606 | |
---|
607 | "Number of Units Transference" |
---|
608 | Method.NTU*Method.Cmin = Details.Ud*Pi*DoInner*(2*Lpipe); |
---|
609 | |
---|
610 | "Minimum Heat Capacity" |
---|
611 | Method.Cmin = min([Method.Ch,Method.Cc]); |
---|
612 | |
---|
613 | "Maximum Heat Capacity" |
---|
614 | Method.Cmax = max([Method.Ch,Method.Cc]); |
---|
615 | |
---|
616 | "Thermal Capacity Ratio" |
---|
617 | Method.Cr = Method.Cmin/Method.Cmax; |
---|
618 | |
---|
619 | if Method.Cr equal 0 |
---|
620 | |
---|
621 | then |
---|
622 | "Effectiveness" |
---|
623 | Method.Eft = 1-exp(-Method.NTU); |
---|
624 | |
---|
625 | else |
---|
626 | |
---|
627 | switch FlowDirection |
---|
628 | |
---|
629 | case "cocurrent": |
---|
630 | |
---|
631 | "Effectiveness in Cocurrent Flow" |
---|
632 | Method.Eft = (1-exp(-Method.NTU*(1+Method.Cr)))/(1+Method.Cr); |
---|
633 | |
---|
634 | case "counter": |
---|
635 | |
---|
636 | if Method.Eft >= 1 |
---|
637 | |
---|
638 | then |
---|
639 | |
---|
640 | "Effectiveness in Counter Flow" |
---|
641 | Method.Eft = 1; |
---|
642 | |
---|
643 | else |
---|
644 | |
---|
645 | "Effectiveness in Counter Flow" |
---|
646 | Method.NTU*(Method.Cr-1.00001) = ln(abs((Method.Eft-1.00001))) - ln(abs((Method.Cr*Method.Eft-1.00001))); |
---|
647 | end |
---|
648 | |
---|
649 | end |
---|
650 | |
---|
651 | end |
---|
652 | |
---|
653 | case "Simplified": |
---|
654 | |
---|
655 | "Number of Units Transference" |
---|
656 | Method.NTU = 1; |
---|
657 | |
---|
658 | "Minimum Heat Capacity" |
---|
659 | Method.Cmin = min([Method.Ch,Method.Cc]); |
---|
660 | |
---|
661 | "Maximum Heat Capacity" |
---|
662 | Method.Cmax = max([Method.Ch,Method.Cc]); |
---|
663 | |
---|
664 | "Thermal Capacity Ratio" |
---|
665 | Method.Cr = 1; |
---|
666 | |
---|
667 | "Effectiveness" |
---|
668 | Method.Eft = Eftestimated; |
---|
669 | |
---|
670 | end |
---|
671 | |
---|
672 | switch HotSide |
---|
673 | |
---|
674 | case "outer": |
---|
675 | |
---|
676 | switch CalculationApproach |
---|
677 | |
---|
678 | case "Full": |
---|
679 | |
---|
680 | "Duty" |
---|
681 | Details.Q = Method.Eft*Method.Cmin*(InletOuter.T-InletInner.T); |
---|
682 | |
---|
683 | case "Simplified": |
---|
684 | |
---|
685 | "Duty" |
---|
686 | Details.Q = Qestimated; |
---|
687 | |
---|
688 | end |
---|
689 | |
---|
690 | "Hot Stream Heat Capacity" |
---|
691 | Method.Ch = InletOuter.F*Outer.Properties.Average.Cp; |
---|
692 | |
---|
693 | "Cold Stream Heat Capacity" |
---|
694 | Method.Cc = InletInner.F*Inner.Properties.Average.Cp; |
---|
695 | |
---|
696 | when InletInner.T > InletOuter.T switchto "inner"; |
---|
697 | |
---|
698 | case "inner": |
---|
699 | |
---|
700 | switch CalculationApproach |
---|
701 | |
---|
702 | case "Full": |
---|
703 | |
---|
704 | "Duty" |
---|
705 | Details.Q = Method.Eft*Method.Cmin*(InletInner.T-InletOuter.T); |
---|
706 | |
---|
707 | case "Simplified": |
---|
708 | |
---|
709 | "Duty" |
---|
710 | Details.Q = Qestimated; |
---|
711 | |
---|
712 | end |
---|
713 | |
---|
714 | "Cold Stream Heat Capacity" |
---|
715 | Method.Cc = InletOuter.F*Outer.Properties.Average.Cp; |
---|
716 | |
---|
717 | "Hot Stream Heat Capacity" |
---|
718 | Method.Ch = InletInner.F*Inner.Properties.Average.Cp; |
---|
719 | |
---|
720 | when InletInner.T < InletOuter.T switchto "outer"; |
---|
721 | |
---|
722 | end |
---|
723 | |
---|
724 | end |
---|
725 | |
---|
726 | Model Hairpin_LMTD as Hairpin_Basic |
---|
727 | |
---|
728 | ATTRIBUTES |
---|
729 | |
---|
730 | Icon = "icon/hairpin"; |
---|
731 | Pallete = true; |
---|
732 | Brief = "Hairpin Heat Exchanger - LMTD Method"; |
---|
733 | Info = |
---|
734 | "to be documented."; |
---|
735 | |
---|
736 | PARAMETERS |
---|
737 | |
---|
738 | FlowDirection as Switcher (Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent"); |
---|
739 | |
---|
740 | VARIABLES |
---|
741 | |
---|
742 | Method as LMTD_Basic (Brief="LMTD Method of Calculation", Symbol=" "); |
---|
743 | |
---|
744 | EQUATIONS |
---|
745 | |
---|
746 | switch CalculationApproach |
---|
747 | |
---|
748 | case "Full": |
---|
749 | |
---|
750 | "Duty" |
---|
751 | Details.Q = Details.Ud*Pi*DoInner*(2*Lpipe)*Method.LMTD; |
---|
752 | |
---|
753 | case "Simplified": |
---|
754 | |
---|
755 | "Duty Estimated" |
---|
756 | Details.Q = Qestimated; |
---|
757 | |
---|
758 | end |
---|
759 | |
---|
760 | "LMTD Correction Factor - True counter ou cocurrent flow" |
---|
761 | Method.Fc = 1; |
---|
762 | |
---|
763 | switch HotSide |
---|
764 | |
---|
765 | case "outer": |
---|
766 | |
---|
767 | switch FlowDirection |
---|
768 | |
---|
769 | case "cocurrent": |
---|
770 | |
---|
771 | "Temperature Difference at Inlet - Cocurrent Flow" |
---|
772 | Method.DT0 = InletOuter.T - InletInner.T; |
---|
773 | |
---|
774 | "Temperature Difference at Outlet - Cocurrent Flow" |
---|
775 | Method.DTL = OutletOuter.T - OutletInner.T; |
---|
776 | |
---|
777 | case "counter": |
---|
778 | |
---|
779 | "Temperature Difference at Inlet - Counter Flow" |
---|
780 | Method.DT0 = InletOuter.T - OutletInner.T; |
---|
781 | |
---|
782 | "Temperature Difference at Outlet - Counter Flow" |
---|
783 | Method.DTL = OutletOuter.T - InletInner.T; |
---|
784 | |
---|
785 | |
---|
786 | end |
---|
787 | |
---|
788 | when InletInner.T > InletOuter.T switchto "inner"; |
---|
789 | |
---|
790 | case "inner": |
---|
791 | |
---|
792 | switch FlowDirection |
---|
793 | |
---|
794 | case "cocurrent": |
---|
795 | |
---|
796 | "Temperature Difference at Inlet - Cocurrent Flow" |
---|
797 | Method.DT0 = InletInner.T - InletOuter.T; |
---|
798 | |
---|
799 | "Temperature Difference at Outlet - Cocurrent Flow" |
---|
800 | Method.DTL = OutletInner.T - OutletOuter.T; |
---|
801 | |
---|
802 | case "counter": |
---|
803 | |
---|
804 | "Temperature Difference at Inlet - Counter Flow" |
---|
805 | Method.DT0 = InletInner.T - OutletOuter.T; |
---|
806 | |
---|
807 | "Temperature Difference at Outlet - Counter Flow" |
---|
808 | Method.DTL = OutletInner.T - InletOuter.T; |
---|
809 | |
---|
810 | end |
---|
811 | |
---|
812 | when InletInner.T < InletOuter.T switchto "outer"; |
---|
813 | |
---|
814 | end |
---|
815 | |
---|
816 | end |
---|