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

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

updated PHE model

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