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

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

REMOVED SOME VARIABLES

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