source: trunk/eml/heat_exchangers/DoublePipe.mso @ 325

Last change on this file since 325 was 325, checked in by Argimiro Resende Secchi, 15 years ago

Set icons positions for most devices.

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