source: trunk/eml/heat_exchangers/PHE.mso @ 261

Last change on this file since 261 was 261, checked in by gerson bicca, 15 years ago

documenting PHE heat exchanger

File size: 28.3 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*--------------------------------------------------------------------
16* Author: Gerson Balbueno Bicca
17* $Id: PHE.mso 250 2007-04-27 16:32:02Z bicca $
18*------------------------------------------------------------------*#
19using "HEX_Engine";
20
21Model PHE
22
23ATTRIBUTES
24        Pallete         = true;
25        Brief           = "Shortcut model  for plate and Frame heat exchanger.";
26        Info            =
27        "
28        Model of a gasketed plate heat exchanger.
29        The heat transfer and pressure loss calculations are based on Kumar [1] work.
30        The following assumptions are considered in order to derive the mathematical model [2]:
31       
32        A.1 : Steady-State operation;
33        A.2 : No phase changes;
34        A.3 : No heat loss to the surroundings.
35        A.4 : Uniform distribution of flow through the channels of a pass.
36
37        References:
38   
39        [1] E.A.D. Saunders, Heat Exchangers: Selection, Design and
40    Construction, Longman, Harlow, 1988.
41   
42        [2] J.A.W. Gut, J.M. Pinto, Modeling of plate heat exchangers
43    with generalized configurations, Int. J. Heat Mass Transfer
44    46 (14) (2003) 2571\2585.
45        ";
46
47PARAMETERS
48
49outer PP                        as Plugin                       (Brief="External Physical Properties", Type="PP");
50outer NComp             as Integer              (Brief="Number of Chemical Components");
51        Pi                                              as constant             (Brief="Pi Number",Default=3.14159265);
52        Kp1(15)                         as constant             (Brief="First constant in Kumar calculation for Pressure Drop");
53        Kp2(15)                         as constant             (Brief="Second constant in Kumar calculation for Pressure Drop");
54        Kc1(14)                         as constant             (Brief="First constant in Kumar calculation for Heat Transfer");
55        Kc2(14)                         as constant             (Brief="Second constant Kumar calculation for Heat Transfer");
56        M(NComp)                as molweight    (Brief="Component Mol Weight");
57       
58        ChevronAngle    as Switcher                     (Brief="Chevron Corrugation Inclination Angle in Degrees ",Valid=["30","45","50","60","65"],Default="30");
59        Method                          as Switcher                     (Brief="Method of Thermal Calculation",Valid=["NTU","LMTD"],Default="NTU");
60        SideOne                         as Switcher                     (Brief="Fluid Alocation in the Side I - (The odd channels)",Valid=["hot","cold"],Default="hot");
61        Nchannels                       as Integer                              (Brief="Total Number of Channels in The Whole Heat Exchanger");
62        Nplates                         as Integer                              (Brief="Total Number of Plates in The Whole Heat Exchanger",Default=25);
63        NpassHot                        as Integer                              (Brief="Number of Passes for Hot Side");
64        NpassCold                       as Integer                              (Brief="Number of Passes for Cold Side");
65        Dports                                  as length                               (Brief="Ports Diameter",Lower=1e-6);
66        Atotal                                  as area                                 (Brief="Total Effective  Area",Lower=1e-6);
67        Aports                                  as area                                 (Brief="Port Opening  Area of Plate",Lower=1e-6);
68        Achannel                        as area                                 (Brief="Cross-Sectional Area for Channel Flow",Lower=1e-6);
69        Dh                                              as length                               (Brief="Equivalent Diameter of Channel",Lower=1e-6);
70        Depth                           as length                               (Brief="Corrugation Depth",Lower=1e-6);
71        PhiFactor                       as Real                                 (Brief="Enlargement Factor",Lower=1e-6);
72        Lp                                              as length                               (Brief="Plate Vertical Distance between Port Centers",Lower=0.1);
73        Lpack                                   as length                               (Brief="Compact Plate Pack Length",Lower=0.1);
74        Lv                                              as length                               (Brief="Vertical Ports Distance",Lower=0.1);
75        Lh                                              as length                               (Brief="Plate Horizontal Distance between Port Centers",Lower=0.1);
76        Lw                                              as length                               (Brief="Plate Width",Lower=0.1);
77        pitch                                   as length                               (Brief="Plate Pitch",Lower=0.1);
78        pt                                              as length                               (Brief="Plate Thickness",Lower=0.1);
79        Kwall                                   as conductivity         (Brief="Plate Thermal Conductivity",Default=1.0);
80        Rfh                                             as positive                             (Brief="Hot Side Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
81        Rfc                                             as positive                             (Brief="Cold Side Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0);
82
83VARIABLES
84
85in      InletHot                as stream                       (Brief="Inlet Hot Stream");     
86in      InletCold           as stream                   (Brief="Inlet Cold Stream");
87out     OutletHot       as streamPH     (Brief="Outlet Hot Stream");
88out     OutletCold      as streamPH     (Brief="Outlet Cold Stream");
89
90        HotSide                         as Main_PHE                             (Brief="Plate Heat Exchanger Hot Side");
91        ColdSide                        as Main_PHE                             (Brief="Plate Heat Exchanger Cold Side");
92        Thermal                         as Thermal_PHE          (Brief="Thermal Results");
93
94SET
95
96#"First constant for Kumar's calculating Pressure Drop"
97        Kp1 = [50,19.40,2.990,47,18.290,1.441,34,11.250,0.772,24,3.240,0.760,24,2.80,0.639];
98
99#"Second constant for Kumar's calculating Pressure Drop"
100        Kp2 = [1,0.589,0.183,1,0.652,0.206,1,0.631,0.161,1,0.457,0.215,1,0.451,0.213];
101
102#"First constant for Kumar's calculating Heat Transfer"
103        Kc1 = [0.718,0.348,0.718,0.400,0.300,0.630,0.291,0.130,0.562,0.306,0.108,0.562,0.331,0.087];
104
105#"Second constant for Kumar's calculating Heat Transfer"
106        Kc2 = [0.349,0.663,0.349,0.598,0.663,0.333,0.591,0.732,0.326,0.529,0.703,0.326,0.503,0.718];
107       
108#"Component Molecular Weight"
109        M  = PP.MolecularWeight();
110       
111#"Pi Number"
112        Pi      = 3.14159265;
113       
114#"Plate Vertical Distance between Port Centers"
115        Lp = Lv - Dports;
116       
117#"Corrugation Depth"
118        Depth=pitch-pt;
119       
120#"Plate Horizontal Distance between Port Centers"
121        Lh=Lw-Dports;
122       
123#"Hydraulic Diameter"
124        Dh=2*Depth/PhiFactor;
125
126#"Ports Area"
127        Aports=Pi*Dports*Dports/4;
128       
129#"Channel Area"
130        Achannel=Depth*Lw;
131       
132#"Pack Length"
133        Lpack=Depth*(Nplates-1)+Nplates*pt;
134       
135#"Total Number of  Channels"
136        Nchannels = Nplates -1;
137       
138#"Exchange Surface Area"
139        Atotal =(Nplates-2)*Lw*Lp*PhiFactor;
140       
141EQUATIONS
142
143"Hot    Stream Average Temperature"
144        HotSide.Properties.Average.T = 0.5*InletHot.T + 0.5*OutletHot.T;
145
146"Cold Stream Average Temperature"
147        ColdSide.Properties.Average.T = 0.5*InletCold.T + 0.5*OutletCold.T;
148       
149"Hot Stream Average Pressure"
150        HotSide.Properties.Average.P = 0.5*InletHot.P+0.5*OutletHot.P;
151       
152"Cold Stream Average Pressure"
153        ColdSide.Properties.Average.P = 0.5*InletCold.P+0.5*OutletCold.P;
154
155"Cold Stream Wall Temperature"
156        ColdSide.Properties.Wall.Twall =   0.5*HotSide.Properties.Average.T + 0.5*ColdSide.Properties.Average.T;
157
158"Hot Stream Wall Temperature"
159        HotSide.Properties.Wall.Twall =   0.5*HotSide.Properties.Average.T + 0.5*ColdSide.Properties.Average.T;
160
161"Hot Stream Average Molecular Weight"
162        HotSide.Properties.Average.Mw = sum(M*InletHot.z);
163
164"Cold Stream Average Molecular Weight"
165        ColdSide.Properties.Average.Mw = sum(M*InletCold.z);
166
167if InletCold.v equal 0
168       
169        then   
170
171"Average Heat Capacity Cold Stream"
172        ColdSide.Properties.Average.Cp          =       PP.LiquidCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
173
174"Inlet Heat Capacity Cold Stream"
175        ColdSide.Properties.Inlet.Cp                    =       PP.LiquidCp(InletCold.T,InletCold.P,InletCold.z);
176
177"Outlet Heat Capacity Cold Stream"
178        ColdSide.Properties.Outlet.Cp           =       PP.LiquidCp(OutletCold.T,OutletCold.P,OutletCold.z);
179
180"Average Mass Density Cold Stream"
181        ColdSide.Properties.Average.rho         =       PP.LiquidDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
182
183"Inlet Mass Density Cold Stream"
184        ColdSide.Properties.Inlet.rho           =       PP.LiquidDensity(InletCold.T,InletCold.P,InletCold.z);
185
186"Outlet Mass Density Cold Stream"
187        ColdSide.Properties.Outlet.rho  =       PP.LiquidDensity(OutletCold.T,OutletCold.P,OutletCold.z);
188
189"Average Viscosity Cold Stream"
190        ColdSide.Properties.Average.Mu  =       PP.LiquidViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
191
192"Inlet  Viscosity Cold Stream"
193        ColdSide.Properties.Inlet.Mu            =       PP.LiquidViscosity(InletCold.T,InletCold.P,InletCold.z);
194
195"Outlet Viscosity Cold Stream"
196        ColdSide.Properties.Outlet.Mu   =       PP.LiquidViscosity(OutletCold.T,OutletCold.P,OutletCold.z);
197
198"Average        Conductivity Cold Stream"
199        ColdSide.Properties.Average.K           =       PP.LiquidThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
200
201"Inlet  Conductivity Cold Stream"
202        ColdSide.Properties.Inlet.K             =       PP.LiquidThermalConductivity(InletCold.T,InletCold.P,InletCold.z);
203
204"Outlet Conductivity Cold Stream"
205        ColdSide.Properties.Outlet.K            =       PP.LiquidThermalConductivity(OutletCold.T,OutletCold.P,OutletCold.z);
206
207"Viscosity Cold Stream at wall temperature"
208        ColdSide.Properties.Wall.Mu             =       PP.LiquidViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,InletCold.z);
209
210        else
211
212"Average Heat Capacity ColdStream"
213        ColdSide.Properties.Average.Cp  =       PP.VapourCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
214
215"Inlet Heat Capacity Cold Stream"
216        ColdSide.Properties.Inlet.Cp            =       PP.VapourCp(InletCold.T,InletCold.P,InletCold.z);
217
218"Outlet Heat Capacity Cold Stream"
219        ColdSide.Properties.Outlet.Cp   =       PP.VapourCp(OutletCold.T,OutletCold.P,OutletCold.z);
220
221"Average Mass Density Cold Stream"
222        ColdSide.Properties.Average.rho         =       PP.VapourDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
223
224"Inlet Mass Density Cold Stream"
225        ColdSide.Properties.Inlet.rho           =       PP.VapourDensity(InletCold.T,InletCold.P,InletCold.z);
226       
227"Outlet Mass Density Cold Stream"
228        ColdSide.Properties.Outlet.rho  =       PP.VapourDensity(OutletCold.T,OutletCold.P,OutletCold.z);
229
230"Average Viscosity Cold Stream"
231        ColdSide.Properties.Average.Mu  =       PP.VapourViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
232
233"Inlet Viscosity Cold Stream"
234        ColdSide.Properties.Inlet.Mu            =       PP.VapourViscosity(InletCold.T,InletCold.P,InletCold.z);
235
236"Outlet Viscosity Cold Stream"
237        ColdSide.Properties.Outlet.Mu   =       PP.VapourViscosity(OutletCold.T,OutletCold.P,OutletCold.z);
238
239"Average Conductivity Cold Stream"
240        ColdSide.Properties.Average.K           =       PP.VapourThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
241
242"Inlet Conductivity Cold Stream"
243        ColdSide.Properties.Inlet.K             =       PP.VapourThermalConductivity(InletCold.T,InletCold.P,InletCold.z);
244
245"Outlet Conductivity Cold Stream"
246        ColdSide.Properties.Outlet.K            =       PP.VapourThermalConductivity(OutletCold.T,OutletCold.P,OutletCold.z);
247       
248"Viscosity Cold Stream at wall temperature"
249        ColdSide.Properties.Wall.Mu             =       PP.VapourViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,InletCold.z);
250
251end
252
253if InletHot.v equal 0
254
255        then
256
257"Average Heat Capacity Hot Stream"
258        HotSide.Properties.Average.Cp   =               PP.LiquidCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
259
260"Inlet Heat Capacity Hot Stream"
261        HotSide.Properties.Inlet.Cp             =               PP.LiquidCp(InletHot.T,InletHot.P,InletHot.z);
262
263"Outlet Heat Capacity Hot Stream"
264        HotSide.Properties.Outlet.Cp    =               PP.LiquidCp(OutletHot.T,OutletHot.P,OutletHot.z);
265
266"Average Mass Density Hot Stream"
267        HotSide.Properties.Average.rho =                PP.LiquidDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
268
269"Inlet Mass Density Hot Stream"
270        HotSide.Properties.Inlet.rho            =               PP.LiquidDensity(InletHot.T,InletHot.P,InletHot.z);
271
272"Outlet Mass Density Hot Stream"
273        HotSide.Properties.Outlet.rho   =               PP.LiquidDensity(OutletHot.T,OutletHot.P,OutletHot.z);
274
275"Average Viscosity Hot Stream"
276        HotSide.Properties.Average.Mu   =               PP.LiquidViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);       
277
278"Inlet Viscosity Hot Stream"
279        HotSide.Properties.Inlet.Mu     =               PP.LiquidViscosity(InletHot.T,InletHot.P,InletHot.z);   
280
281"Outlet Viscosity Hot Stream"
282        HotSide.Properties.Outlet.Mu    =               PP.LiquidViscosity(OutletHot.T,OutletHot.P,OutletHot.z);       
283
284"Average Conductivity Hot Stream"
285        HotSide.Properties.Average.K    =               PP.LiquidThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);     
286
287"Inlet Conductivity Hot Stream"
288        HotSide.Properties.Inlet.K              =               PP.LiquidThermalConductivity(InletHot.T,InletHot.P,InletHot.z);
289
290"Outlet Conductivity Hot Stream"
291        HotSide.Properties.Outlet.K     =               PP.LiquidThermalConductivity(OutletHot.T,OutletHot.P,OutletHot.z);     
292
293"Viscosity Hot Stream at wall temperature"
294        HotSide.Properties.Wall.Mu              =               PP.LiquidViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,InletHot.z);     
295
296
297        else
298
299"Average Heat Capacity Hot Stream"
300        HotSide.Properties.Average.Cp   =               PP.VapourCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
301
302"Inlet Heat Capacity Hot Stream"
303        HotSide.Properties.Inlet.Cp             =               PP.VapourCp(InletHot.T,InletHot.P,InletHot.z);
304
305"Outlet Heat Capacity Hot Stream"
306        HotSide.Properties.Outlet.Cp    =               PP.VapourCp(OutletHot.T,OutletHot.P,OutletHot.z);
307
308"Average Mass Density Hot Stream"
309        HotSide.Properties.Average.rho =                PP.VapourDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
310
311"Inlet Mass Density Hot Stream"
312        HotSide.Properties.Inlet.rho            =               PP.VapourDensity(InletHot.T,InletHot.P,InletHot.z);
313       
314"Outlet Mass Density Hot Stream"
315        HotSide.Properties.Outlet.rho   =               PP.VapourDensity(OutletHot.T,OutletHot.P,OutletHot.z);
316
317"Average Viscosity Hot Stream"
318        HotSide.Properties.Average.Mu   =               PP.VapourViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
319
320"Inlet Viscosity Hot Stream"
321        HotSide.Properties.Inlet.Mu     =               PP.VapourViscosity(InletHot.T,InletHot.P,InletHot.z);
322
323"Outlet Viscosity Hot Stream"
324        HotSide.Properties.Outlet.Mu    =               PP.VapourViscosity(OutletHot.T,OutletHot.P,OutletHot.z);
325
326"Average Conductivity Hot Stream"
327        HotSide.Properties.Average.K    =               PP.VapourThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);     
328
329"Inlet Conductivity Hot Stream"
330        HotSide.Properties.Inlet.K              =               PP.VapourThermalConductivity(InletHot.T,InletHot.P,InletHot.z);
331
332"Outlet Conductivity Hot Stream"
333        HotSide.Properties.Outlet.K     =               PP.VapourThermalConductivity(OutletHot.T,OutletHot.P,OutletHot.z);     
334
335"Viscosity Hot Stream at wall temperature"
336        HotSide.Properties.Wall.Mu              =               PP.VapourViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,InletHot.z);
337
338end
339
340"Energy Balance Hot Stream"
341        Thermal.Q = InletHot.F*(InletHot.h-OutletHot.h);
342
343"Energy Balance Cold Stream"
344        Thermal.Q = InletCold.F*(OutletCold.h - InletCold.h);
345
346"Flow Mass Inlet Cold Stream"
347        ColdSide.Properties.Inlet.Fw    =  sum(M*InletCold.z)*InletCold.F;
348
349"Flow Mass Outlet Cold Stream"
350        ColdSide.Properties.Outlet.Fw   =  sum(M*OutletCold.z)*OutletCold.F;
351
352"Flow Mass Inlet Hot Stream"
353        HotSide.Properties.Inlet.Fw             =  sum(M*InletHot.z)*InletHot.F;
354
355"Flow Mass Outlet Hot Stream"   
356        HotSide.Properties.Outlet.Fw    =  sum(M*OutletHot.z)*OutletHot.F;
357
358"Molar Balance Hot Stream"
359        OutletHot.F = InletHot.F;
360       
361"Molar Balance Cold Stream"
362        OutletCold.F = InletCold.F;
363
364"Hot Stream Molar Fraction Constraint"
365        OutletHot.z=InletHot.z;
366       
367"Cold Stream Molar Fraction Constraint"
368        OutletCold.z=InletCold.z;
369
370switch SideOne
371       
372        case "cold":
373       
374"Total Number of  Passages Cold Side"
375        ColdSide.PressureDrop.Npassage = (2*Nchannels+1+(-1)^(Nchannels+1))/(4*NpassCold);
376
377"Total Number of  Passages Hot Side"
378        HotSide.PressureDrop.Npassage = (2*Nchannels-1+(-1)^(Nchannels))/(4*NpassHot);
379       
380        case "hot":
381       
382"Total Number of  Passages Cold Side"
383        HotSide.PressureDrop.Npassage = (2*Nchannels+1+(-1)^(Nchannels+1))/(4*NpassHot);
384
385"Total Number of  Passages Hot Side"
386        ColdSide.PressureDrop.Npassage = (2*Nchannels-1+(-1)^(Nchannels))/(4*NpassCold);
387
388end
389
390"Hot Stream Mass Flux in the Channel"
391        HotSide.HeatTransfer.Gchannel=HotSide.Properties.Inlet.Fw/(HotSide.PressureDrop.Npassage*Achannel);
392
393"Hot Stream Mass Flux in the Ports"
394        HotSide.HeatTransfer.Gports=HotSide.Properties.Inlet.Fw/Aports;
395
396"Cold Stream Mass Flux in the Ports"
397        ColdSide.HeatTransfer.Gports=ColdSide.Properties.Inlet.Fw/Aports;
398
399"Cold Stream Mass Flux in the Channel"
400        ColdSide.HeatTransfer.Gchannel=ColdSide.Properties.Inlet.Fw/(ColdSide.PressureDrop.Npassage*Achannel);
401
402"Hot Stream Pressure Drop in Ports"
403        HotSide.PressureDrop.DPports =1.5*NpassHot*HotSide.HeatTransfer.Gports^2/(2*HotSide.Properties.Average.rho);
404
405"Cold Stream Pressure Drop in Ports"
406        ColdSide.PressureDrop.DPports =1.5*NpassCold*ColdSide.HeatTransfer.Gports^2/(2*ColdSide.Properties.Average.rho);
407
408"Hot Stream Pressure Drop in Channels"
409        HotSide.PressureDrop.DPchannel =2*HotSide.PressureDrop.fi*NpassHot*Lv*HotSide.HeatTransfer.Gchannel^2/(HotSide.Properties.Average.rho*Dh*HotSide.HeatTransfer.Phi^0.17);
410
411"Cold Stream Pressure Drop in Channels"
412        ColdSide.PressureDrop.DPchannel =2*ColdSide.PressureDrop.fi*NpassCold*Lv*ColdSide.HeatTransfer.Gchannel^2/(ColdSide.Properties.Average.rho*Dh*ColdSide.HeatTransfer.Phi^0.17);
413
414"Hot Stream Total Pressure Drop"
415        HotSide.PressureDrop.Pdrop =HotSide.PressureDrop.DPchannel+HotSide.PressureDrop.DPports;
416
417"Cold Stream Total Pressure Drop"
418        ColdSide.PressureDrop.Pdrop =ColdSide.PressureDrop.DPchannel+ColdSide.PressureDrop.DPports;
419
420switch ChevronAngle #Pressure Drop Friction Factor According to kumar's (1984)
421       
422        case "30": #    ChevronAngle <= 30
423       
424        if      HotSide.HeatTransfer.Re < 10
425                then
426                                HotSide.PressureDrop.fi                 = Kp1(1)/HotSide.HeatTransfer.Re^Kp2(1);
427                                ColdSide.PressureDrop.fi        =       Kp1(1)/ColdSide.HeatTransfer.Re^Kp2(1);
428                else
429                                if      HotSide.HeatTransfer.Re < 100
430                                        then
431                                                        HotSide.PressureDrop.fi                 = Kp1(2)/HotSide.HeatTransfer.Re^Kp2(2);
432                                                        ColdSide.PressureDrop.fi        =       Kp1(2)/ColdSide.HeatTransfer.Re^Kp2(2);
433                                        else
434                                                        HotSide.PressureDrop.fi                 = Kp1(3)/HotSide.HeatTransfer.Re^Kp2(3);
435                                                        ColdSide.PressureDrop.fi        =       Kp1(3)/ColdSide.HeatTransfer.Re^Kp2(3);
436                                end
437                       
438        end     
439
440        case "45":
441       
442        if      HotSide.HeatTransfer.Re < 15
443                then
444                                HotSide.PressureDrop.fi                 = Kp1(4)/HotSide.HeatTransfer.Re^Kp2(4);
445                                ColdSide.PressureDrop.fi        =       Kp1(4)/ColdSide.HeatTransfer.Re^Kp2(4);
446                else
447                                if      HotSide.HeatTransfer.Re < 300
448                                        then
449                                                        HotSide.PressureDrop.fi                 = Kp1(5)/HotSide.HeatTransfer.Re^Kp2(5);
450                                                        ColdSide.PressureDrop.fi        =       Kp1(5)/ColdSide.HeatTransfer.Re^Kp2(5);
451                                        else
452                                                        HotSide.PressureDrop.fi                 = Kp1(6)/HotSide.HeatTransfer.Re^Kp2(6);
453                                                        ColdSide.PressureDrop.fi        =       Kp1(6)/ColdSide.HeatTransfer.Re^Kp2(6);
454                                end
455                       
456        end     
457
458        case "50":
459       
460        if      HotSide.HeatTransfer.Re < 20
461                then
462                                HotSide.PressureDrop.fi                 = Kp1(7)/HotSide.HeatTransfer.Re^Kp2(7);
463                                ColdSide.PressureDrop.fi        =       Kp1(7)/ColdSide.HeatTransfer.Re^Kp2(7);
464                else
465                                if      HotSide.HeatTransfer.Re < 300
466                                        then
467                                                        HotSide.PressureDrop.fi                 = Kp1(8)/HotSide.HeatTransfer.Re^Kp2(8);
468                                                        ColdSide.PressureDrop.fi        =       Kp1(8)/ColdSide.HeatTransfer.Re^Kp2(8);
469                                        else
470                                                        HotSide.PressureDrop.fi                 = Kp1(9)/HotSide.HeatTransfer.Re^Kp2(9);
471                                                        ColdSide.PressureDrop.fi        =       Kp1(9)/ColdSide.HeatTransfer.Re^Kp2(9);
472                                end
473                       
474        end
475       
476        case "60":
477       
478        if      HotSide.HeatTransfer.Re < 40
479                then
480                                HotSide.PressureDrop.fi                 = Kp1(10)/HotSide.HeatTransfer.Re^Kp2(10);
481                                ColdSide.PressureDrop.fi        =       Kp1(10)/ColdSide.HeatTransfer.Re^Kp2(10);
482                else
483                                if      HotSide.HeatTransfer.Re < 400
484                                        then
485                                                        HotSide.PressureDrop.fi                 = Kp1(11)/HotSide.HeatTransfer.Re^Kp2(11);
486                                                        ColdSide.PressureDrop.fi        =       Kp1(11)/ColdSide.HeatTransfer.Re^Kp2(11);
487                                        else
488                                                        HotSide.PressureDrop.fi                 = Kp1(12)/HotSide.HeatTransfer.Re^Kp2(12);
489                                                        ColdSide.PressureDrop.fi        =       Kp1(12)/ColdSide.HeatTransfer.Re^Kp2(12);
490                                end
491                       
492        end
493       
494        case "65": #    ChevronAngle >= 65
495       
496        if      HotSide.HeatTransfer.Re < 50
497                then
498                                HotSide.PressureDrop.fi                 = Kp1(13)/HotSide.HeatTransfer.Re^Kp2(13);
499                                ColdSide.PressureDrop.fi        =       Kp1(13)/ColdSide.HeatTransfer.Re^Kp2(13);
500                else
501                                if      HotSide.HeatTransfer.Re < 500
502                                        then
503                                                        HotSide.PressureDrop.fi                 = Kp1(14)/HotSide.HeatTransfer.Re^Kp2(14);
504                                                        ColdSide.PressureDrop.fi        =       Kp1(14)/ColdSide.HeatTransfer.Re^Kp2(14);
505                                        else
506                                                        HotSide.PressureDrop.fi                 = Kp1(15)/HotSide.HeatTransfer.Re^Kp2(15);
507                                                        ColdSide.PressureDrop.fi        =       Kp1(15)/ColdSide.HeatTransfer.Re^Kp2(15);
508                                end
509                       
510        end
511
512end
513
514switch ChevronAngle # Heat Transfer Coefficient According to kumar's (1984)
515
516        case "30": #    ChevronAngle <= 30
517       
518        if      HotSide.HeatTransfer.Re < 10
519                then
520                                HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(1)*HotSide.HeatTransfer.Re^Kc2(1))/Dh;
521                                ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(1)*ColdSide.HeatTransfer.Re^Kc2(1))/Dh;
522                else
523                                HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(2)*HotSide.HeatTransfer.Re^Kc2(2))/Dh;
524                                ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(2)*ColdSide.HeatTransfer.Re^Kc2(2))/Dh;
525        end     
526       
527        case "45":
528       
529        if      HotSide.HeatTransfer.Re < 10
530                then
531                                HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(3)*HotSide.HeatTransfer.Re^Kc2(3))/Dh;
532                                ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(3)*ColdSide.HeatTransfer.Re^Kc2(3))/Dh;
533                else
534                                if      HotSide.HeatTransfer.Re < 100
535                                        then
536                                                        HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(4)*HotSide.HeatTransfer.Re^Kc2(4))/Dh;
537                                                        ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(4)*ColdSide.HeatTransfer.Re^Kc2(4))/Dh;
538                                        else
539                                                        HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(5)*HotSide.HeatTransfer.Re^Kc2(5))/Dh;
540                                                        ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(5)*ColdSide.HeatTransfer.Re^Kc2(5))/Dh;
541                                end
542        end
543
544        case "50":
545       
546        if      HotSide.HeatTransfer.Re < 20
547                then
548                                HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(6)*HotSide.HeatTransfer.Re^Kc2(6))/Dh;
549                                ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(6)*ColdSide.HeatTransfer.Re^Kc2(6))/Dh;
550                else
551                                if      HotSide.HeatTransfer.Re < 300
552                                        then
553                                                        HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(7)*HotSide.HeatTransfer.Re^Kc2(7))/Dh;
554                                                        ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(7)*ColdSide.HeatTransfer.Re^Kc2(7))/Dh;
555                                        else
556                                                        HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(8)*HotSide.HeatTransfer.Re^Kc2(8))/Dh;
557                                                        ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(8)*ColdSide.HeatTransfer.Re^Kc2(8))/Dh;
558                                end
559        end
560
561        case "60":
562       
563        if      HotSide.HeatTransfer.Re < 20
564                then
565                                HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(9)*HotSide.HeatTransfer.Re^Kc2(9))/Dh;
566                                ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(9)*ColdSide.HeatTransfer.Re^Kc2(9))/Dh;
567                else
568                                if      HotSide.HeatTransfer.Re < 400
569                                        then
570                                                        HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(10)*HotSide.HeatTransfer.Re^Kc2(10))/Dh;
571                                                        ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(10)*ColdSide.HeatTransfer.Re^Kc2(10))/Dh;
572                                        else
573                                                        HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(11)*HotSide.HeatTransfer.Re^Kc2(11))/Dh;
574                                                        ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(11)*ColdSide.HeatTransfer.Re^Kc2(11))/Dh;
575                                end
576        end
577       
578        case "65": #    ChevronAngle >= 65
579       
580        if      HotSide.HeatTransfer.Re < 20
581                then
582                                HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(12)*HotSide.HeatTransfer.Re^Kc2(12))/Dh;
583                                ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(12)*ColdSide.HeatTransfer.Re^Kc2(12))/Dh;
584                else
585                                if      HotSide.HeatTransfer.Re < 500
586                                        then
587                                                        HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(13)*HotSide.HeatTransfer.Re^Kc2(13))/Dh;
588                                                        ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(13)*ColdSide.HeatTransfer.Re^Kc2(13))/Dh;
589                                        else
590                                                        HotSide.HeatTransfer.hcoeff=(HotSide.Properties.Average.K*HotSide.HeatTransfer.PR^(1/3)*HotSide.HeatTransfer.Phi^0.17*Kc1(14)*HotSide.HeatTransfer.Re^Kc2(14))/Dh;
591                                                        ColdSide.HeatTransfer.hcoeff =(ColdSide.Properties.Average.K*ColdSide.HeatTransfer.PR^(1/3)*ColdSide.HeatTransfer.Phi^0.17*Kc1(14)*ColdSide.HeatTransfer.Re^Kc2(14))/Dh;
592                                end
593        end
594
595end
596
597"Hot Stream Velocity in Channels"
598        HotSide.PressureDrop.Vchannel =HotSide.HeatTransfer.Gchannel/HotSide.Properties.Average.rho;
599
600"Cold Stream Velocity in Channels"
601        ColdSide.PressureDrop.Vchannel =ColdSide.HeatTransfer.Gchannel/ColdSide.Properties.Average.rho;
602
603"Hot Stream Velocity in Ports"
604        HotSide.PressureDrop.Vports =HotSide.Properties.Inlet.Fw/(Aports*HotSide.Properties.Inlet.rho);
605
606"Cold Stream Velocity in Ports"
607        ColdSide.PressureDrop.Vports =ColdSide.Properties.Inlet.Fw/(Aports*ColdSide.Properties.Inlet.rho);
608
609"Hot Stream Reynolds Number"
610        HotSide.HeatTransfer.Re =Dh*HotSide.HeatTransfer.Gchannel/HotSide.Properties.Average.Mu;
611
612"Cold Stream Reynolds Number"
613        ColdSide.HeatTransfer.Re =Dh*ColdSide.HeatTransfer.Gchannel/ColdSide.Properties.Average.Mu;
614
615"Hot Stream Prandtl Number"
616        HotSide.HeatTransfer.PR= ((HotSide.Properties.Average.Cp/HotSide.Properties.Average.Mw)*HotSide.Properties.Average.Mu)/HotSide.Properties.Average.K;
617
618"Cold Stream Prandtl Number"
619        ColdSide.HeatTransfer.PR = ((ColdSide.Properties.Average.Cp/ColdSide.Properties.Average.Mw)*ColdSide.Properties.Average.Mu)/ColdSide.Properties.Average.K;
620
621"Hot Stream Viscosity Correction"
622        HotSide.HeatTransfer.Phi= HotSide.Properties.Average.Mu/HotSide.Properties.Wall.Mu;
623
624"Cold Stream Viscosity Correction"
625        ColdSide.HeatTransfer.Phi= ColdSide.Properties.Average.Mu/ColdSide.Properties.Wall.Mu;
626
627"Hot Stream Outlet Pressure"
628        OutletHot.P  = InletHot.P - HotSide.PressureDrop.Pdrop;
629       
630"Cold Stream Outlet Pressure"
631        OutletCold.P  = InletCold.P - ColdSide.PressureDrop.Pdrop;
632       
633"Overall Heat Transfer Coefficient Clean"
634        Thermal.Uc/HotSide.HeatTransfer.hcoeff +Thermal.Uc*pt/Kwall+Thermal.Uc/ColdSide.HeatTransfer.hcoeff=1;
635
636"Overall Heat Transfer Coefficient Dirty"
637        Thermal.Ud*(1/HotSide.HeatTransfer.hcoeff +pt/Kwall+1/ColdSide.HeatTransfer.hcoeff + Rfc + Rfh)=1;
638
639switch Method
640       
641        case "LMTD":
642       
643"Duty"
644        Thermal.Q = Thermal.Ud*Atotal*Thermal.LMTD*Thermal.Fc;
645       
646        case "NTU":
647
648"Duty"
649        Thermal.Q = Thermal.Eft*Thermal.Cmin*(InletHot.T-InletCold.T);
650
651end
652
653"Temperature Difference at Inlet - Counter Flow"
654        Thermal.DT0 = InletHot.T - OutletCold.T;
655
656"Temperature Difference at Outlet - Counter Flow"
657        Thermal.DTL = OutletHot.T - InletCold.T;
658
659"Heat Capacity Ratio"
660        Thermal.Cr =Thermal.Cmin/Thermal.Cmax;
661
662"Minimum Heat Capacity"
663        Thermal.Cmin  = min([HotSide.HeatTransfer.WCp,ColdSide.HeatTransfer.WCp]);
664
665"Maximum Heat Capacity"
666        Thermal.Cmax  = max([HotSide.HeatTransfer.WCp,ColdSide.HeatTransfer.WCp]);
667
668"Hot Stream Heat Capacity"
669        HotSide.HeatTransfer.WCp  = InletHot.F*HotSide.Properties.Average.Cp;
670
671"Cold Stream Heat Capacity"
672        ColdSide.HeatTransfer.WCp = InletCold.F*ColdSide.Properties.Average.Cp;
673
674"Number of Units Transference for the Whole Heat Exchanger"
675        Thermal.NTU = max([HotSide.HeatTransfer.NTU,ColdSide.HeatTransfer.NTU]);
676
677"Number of Units Transference for Hot Side"
678        HotSide.HeatTransfer.NTU*HotSide.HeatTransfer.WCp = Thermal.Ud*Atotal;
679
680"Number of Units Transference for Cold Side"
681        ColdSide.HeatTransfer.NTU*ColdSide.HeatTransfer.WCp = Thermal.Ud*Atotal;
682
683if Thermal.Cr equal 1 # To be Fixed: Effectiveness in true counter flow !
684       
685        then
686"Effectiveness in Counter Flow"
687        Thermal.Eft = Thermal.NTU/(1+Thermal.NTU);
688       
689"LMTD Correction Factor"
690        Thermal.Fc =Thermal.Eft/(1-Thermal.Eft)/Thermal.NTU;
691       
692        else
693"Effectiveness in Counter Flow"
694        Thermal.Eft = (1-exp(-Thermal.NTU*(1-Thermal.Cr)))/(1-Thermal.Cr*exp(-Thermal.NTU*(1-Thermal.Cr)));
695       
696"LMTD Correction Factor"
697        Thermal.Fc =(ln(abs(1-Thermal.Eft*Thermal.Cr))-ln(abs(1-Thermal.Eft)))/(Thermal.NTU*(1-Thermal.Cr));
698       
699end
700
701
702end
Note: See TracBrowser for help on using the repository browser.