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

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

updated PHE model

File size: 28.6 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");
74        N2                      as Integer      (Brief="Auxiliar Constant");
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=["30 Deg","45 Deg","50 Deg","60 Deg","65 Deg"],Default="30 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.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#"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"Inlet Heat Capacity Cold Stream"
202        ColdSide.Properties.Inlet.Cp                    =       PP.LiquidCp(InletCold.T,InletCold.P,InletCold.z);
203
204"Outlet Heat Capacity Cold Stream"
205        ColdSide.Properties.Outlet.Cp           =       PP.LiquidCp(OutletCold.T,OutletCold.P,OutletCold.z);
206
207"Average Mass Density Cold Stream"
208        ColdSide.Properties.Average.rho         =       PP.LiquidDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
209
210"Inlet Mass Density Cold Stream"
211        ColdSide.Properties.Inlet.rho           =       PP.LiquidDensity(InletCold.T,InletCold.P,InletCold.z);
212
213"Outlet Mass Density Cold Stream"
214        ColdSide.Properties.Outlet.rho  =       PP.LiquidDensity(OutletCold.T,OutletCold.P,OutletCold.z);
215
216"Average Viscosity Cold Stream"
217        ColdSide.Properties.Average.Mu  =       PP.LiquidViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
218
219"Inlet  Viscosity Cold Stream"
220        ColdSide.Properties.Inlet.Mu            =       PP.LiquidViscosity(InletCold.T,InletCold.P,InletCold.z);
221
222"Outlet Viscosity Cold Stream"
223        ColdSide.Properties.Outlet.Mu   =       PP.LiquidViscosity(OutletCold.T,OutletCold.P,OutletCold.z);
224
225"Average        Conductivity Cold Stream"
226        ColdSide.Properties.Average.K           =       PP.LiquidThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
227
228"Inlet  Conductivity Cold Stream"
229        ColdSide.Properties.Inlet.K             =       PP.LiquidThermalConductivity(InletCold.T,InletCold.P,InletCold.z);
230
231"Outlet Conductivity Cold Stream"
232        ColdSide.Properties.Outlet.K            =       PP.LiquidThermalConductivity(OutletCold.T,OutletCold.P,OutletCold.z);
233
234"Viscosity Cold Stream at wall temperature"
235        ColdSide.Properties.Wall.Mu             =       PP.LiquidViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,InletCold.z);
236
237        else
238
239"Average Heat Capacity ColdStream"
240        ColdSide.Properties.Average.Cp  =       PP.VapourCp(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
241
242"Inlet Heat Capacity Cold Stream"
243        ColdSide.Properties.Inlet.Cp            =       PP.VapourCp(InletCold.T,InletCold.P,InletCold.z);
244
245"Outlet Heat Capacity Cold Stream"
246        ColdSide.Properties.Outlet.Cp   =       PP.VapourCp(OutletCold.T,OutletCold.P,OutletCold.z);
247
248"Average Mass Density Cold Stream"
249        ColdSide.Properties.Average.rho         =       PP.VapourDensity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
250
251"Inlet Mass Density Cold Stream"
252        ColdSide.Properties.Inlet.rho           =       PP.VapourDensity(InletCold.T,InletCold.P,InletCold.z);
253       
254"Outlet Mass Density Cold Stream"
255        ColdSide.Properties.Outlet.rho  =       PP.VapourDensity(OutletCold.T,OutletCold.P,OutletCold.z);
256
257"Average Viscosity Cold Stream"
258        ColdSide.Properties.Average.Mu  =       PP.VapourViscosity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
259
260"Inlet Viscosity Cold Stream"
261        ColdSide.Properties.Inlet.Mu            =       PP.VapourViscosity(InletCold.T,InletCold.P,InletCold.z);
262
263"Outlet Viscosity Cold Stream"
264        ColdSide.Properties.Outlet.Mu   =       PP.VapourViscosity(OutletCold.T,OutletCold.P,OutletCold.z);
265
266"Average Conductivity Cold Stream"
267        ColdSide.Properties.Average.K           =       PP.VapourThermalConductivity(ColdSide.Properties.Average.T,ColdSide.Properties.Average.P,InletCold.z);
268
269"Inlet Conductivity Cold Stream"
270        ColdSide.Properties.Inlet.K             =       PP.VapourThermalConductivity(InletCold.T,InletCold.P,InletCold.z);
271
272"Outlet Conductivity Cold Stream"
273        ColdSide.Properties.Outlet.K            =       PP.VapourThermalConductivity(OutletCold.T,OutletCold.P,OutletCold.z);
274       
275"Viscosity Cold Stream at wall temperature"
276        ColdSide.Properties.Wall.Mu             =       PP.VapourViscosity(ColdSide.Properties.Wall.Twall,ColdSide.Properties.Average.P,InletCold.z);
277
278 end
279
280 if InletHot.v equal 0
281
282        then
283
284"Average Heat Capacity Hot Stream"
285        HotSide.Properties.Average.Cp   =               PP.LiquidCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
286
287"Inlet Heat Capacity Hot Stream"
288        HotSide.Properties.Inlet.Cp             =               PP.LiquidCp(InletHot.T,InletHot.P,InletHot.z);
289
290"Outlet Heat Capacity Hot Stream"
291        HotSide.Properties.Outlet.Cp    =               PP.LiquidCp(OutletHot.T,OutletHot.P,OutletHot.z);
292
293"Average Mass Density Hot Stream"
294        HotSide.Properties.Average.rho =                PP.LiquidDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
295
296"Inlet Mass Density Hot Stream"
297        HotSide.Properties.Inlet.rho            =               PP.LiquidDensity(InletHot.T,InletHot.P,InletHot.z);
298
299"Outlet Mass Density Hot Stream"
300        HotSide.Properties.Outlet.rho   =               PP.LiquidDensity(OutletHot.T,OutletHot.P,OutletHot.z);
301
302"Average Viscosity Hot Stream"
303        HotSide.Properties.Average.Mu   =               PP.LiquidViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);       
304
305"Inlet Viscosity Hot Stream"
306        HotSide.Properties.Inlet.Mu     =               PP.LiquidViscosity(InletHot.T,InletHot.P,InletHot.z);   
307
308"Outlet Viscosity Hot Stream"
309        HotSide.Properties.Outlet.Mu    =               PP.LiquidViscosity(OutletHot.T,OutletHot.P,OutletHot.z);       
310
311"Average Conductivity Hot Stream"
312        HotSide.Properties.Average.K    =               PP.LiquidThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);     
313
314"Inlet Conductivity Hot Stream"
315        HotSide.Properties.Inlet.K              =               PP.LiquidThermalConductivity(InletHot.T,InletHot.P,InletHot.z);
316
317"Outlet Conductivity Hot Stream"
318        HotSide.Properties.Outlet.K     =               PP.LiquidThermalConductivity(OutletHot.T,OutletHot.P,OutletHot.z);     
319
320"Viscosity Hot Stream at wall temperature"
321        HotSide.Properties.Wall.Mu              =               PP.LiquidViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,InletHot.z);     
322
323
324        else
325
326"Average Heat Capacity Hot Stream"
327        HotSide.Properties.Average.Cp   =               PP.VapourCp(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
328
329"Inlet Heat Capacity Hot Stream"
330        HotSide.Properties.Inlet.Cp             =               PP.VapourCp(InletHot.T,InletHot.P,InletHot.z);
331
332"Outlet Heat Capacity Hot Stream"
333        HotSide.Properties.Outlet.Cp    =               PP.VapourCp(OutletHot.T,OutletHot.P,OutletHot.z);
334
335"Average Mass Density Hot Stream"
336        HotSide.Properties.Average.rho =                PP.VapourDensity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
337
338"Inlet Mass Density Hot Stream"
339        HotSide.Properties.Inlet.rho            =               PP.VapourDensity(InletHot.T,InletHot.P,InletHot.z);
340       
341"Outlet Mass Density Hot Stream"
342        HotSide.Properties.Outlet.rho   =               PP.VapourDensity(OutletHot.T,OutletHot.P,OutletHot.z);
343
344"Average Viscosity Hot Stream"
345        HotSide.Properties.Average.Mu   =               PP.VapourViscosity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);
346
347"Inlet Viscosity Hot Stream"
348        HotSide.Properties.Inlet.Mu     =               PP.VapourViscosity(InletHot.T,InletHot.P,InletHot.z);
349
350"Outlet Viscosity Hot Stream"
351        HotSide.Properties.Outlet.Mu    =               PP.VapourViscosity(OutletHot.T,OutletHot.P,OutletHot.z);
352
353"Average Conductivity Hot Stream"
354        HotSide.Properties.Average.K    =               PP.VapourThermalConductivity(HotSide.Properties.Average.T,HotSide.Properties.Average.P,InletHot.z);     
355
356"Inlet Conductivity Hot Stream"
357        HotSide.Properties.Inlet.K              =               PP.VapourThermalConductivity(InletHot.T,InletHot.P,InletHot.z);
358
359"Outlet Conductivity Hot Stream"
360        HotSide.Properties.Outlet.K     =               PP.VapourThermalConductivity(OutletHot.T,OutletHot.P,OutletHot.z);     
361
362"Viscosity Hot Stream at wall temperature"
363        HotSide.Properties.Wall.Mu              =               PP.VapourViscosity(HotSide.Properties.Wall.Twall,HotSide.Properties.Average.P,InletHot.z);
364
365 end
366
367"Energy Balance Hot Stream"
368        Thermal.Q = InletHot.F*(InletHot.h-OutletHot.h);
369
370"Energy Balance Cold Stream"
371        Thermal.Q = InletCold.F*(OutletCold.h - InletCold.h);
372
373"Flow Mass Inlet Cold Stream"
374        ColdSide.Properties.Inlet.Fw    =  sum(M*InletCold.z)*InletCold.F;
375
376"Flow Mass Outlet Cold Stream"
377        ColdSide.Properties.Outlet.Fw   =  sum(M*OutletCold.z)*OutletCold.F;
378
379"Flow Mass Inlet Hot Stream"
380        HotSide.Properties.Inlet.Fw             =  sum(M*InletHot.z)*InletHot.F;
381
382"Flow Mass Outlet Hot Stream"   
383        HotSide.Properties.Outlet.Fw    =  sum(M*OutletHot.z)*OutletHot.F;
384
385"Molar Balance Hot Stream"
386        OutletHot.F = InletHot.F;
387       
388"Molar Balance Cold Stream"
389        OutletCold.F = InletCold.F;
390
391"Hot Stream Molar Fraction Constraint"
392        OutletHot.z=InletHot.z;
393       
394"Cold Stream Molar Fraction Constraint"
395        OutletCold.z=InletCold.z;
396
397 switch SideOne
398       
399        case "cold":
400       
401"Total Number of  Passages Cold Side"
402        ColdSide.PressureDrop.Npassage = (2*Nchannels+1+(-1)^(Nchannels+1))/(4*NpassCold);
403
404"Total Number of  Passages Hot Side"
405        HotSide.PressureDrop.Npassage = (2*Nchannels-1+(-1)^(Nchannels))/(4*NpassHot);
406       
407        case "hot":
408       
409"Total Number of  Passages Cold Side"
410        HotSide.PressureDrop.Npassage = (2*Nchannels+1+(-1)^(Nchannels+1))/(4*NpassHot);
411
412"Total Number of  Passages Hot Side"
413        ColdSide.PressureDrop.Npassage = (2*Nchannels-1+(-1)^(Nchannels))/(4*NpassCold);
414
415 end
416
417"Hot Stream Mass Flux in the Channel"
418        HotSide.HeatTransfer.Gchannel=HotSide.Properties.Inlet.Fw/(HotSide.PressureDrop.Npassage*Achannel);
419
420"Hot Stream Mass Flux in the Ports"
421        HotSide.HeatTransfer.Gports=HotSide.Properties.Inlet.Fw/Aports;
422
423"Cold Stream Mass Flux in the Ports"
424        ColdSide.HeatTransfer.Gports=ColdSide.Properties.Inlet.Fw/Aports;
425
426"Cold Stream Mass Flux in the Channel"
427        ColdSide.HeatTransfer.Gchannel=ColdSide.Properties.Inlet.Fw/(ColdSide.PressureDrop.Npassage*Achannel);
428
429"Hot Stream Pressure Drop in Ports"
430        HotSide.PressureDrop.DPports =1.5*NpassHot*HotSide.HeatTransfer.Gports^2/(2*HotSide.Properties.Average.rho);
431
432"Cold Stream Pressure Drop in Ports"
433        ColdSide.PressureDrop.DPports =1.5*NpassCold*ColdSide.HeatTransfer.Gports^2/(2*ColdSide.Properties.Average.rho);
434
435"Hot Stream Pressure Drop in Channels"
436        HotSide.PressureDrop.DPchannel =2*HotSide.PressureDrop.fi*NpassHot*Lv*HotSide.HeatTransfer.Gchannel^2/(HotSide.Properties.Average.rho*Dh*HotSide.HeatTransfer.Phi^0.17);
437
438"Cold Stream Pressure Drop in Channels"
439        ColdSide.PressureDrop.DPchannel =2*ColdSide.PressureDrop.fi*NpassCold*Lv*ColdSide.HeatTransfer.Gchannel^2/(ColdSide.Properties.Average.rho*Dh*ColdSide.HeatTransfer.Phi^0.17);
440
441"Hot Stream Total Pressure Drop"
442        HotSide.PressureDrop.Pdrop =HotSide.PressureDrop.DPchannel+HotSide.PressureDrop.DPports;
443
444"Cold Stream Total Pressure Drop"
445        ColdSide.PressureDrop.Pdrop =ColdSide.PressureDrop.DPchannel+ColdSide.PressureDrop.DPports;
446
447 switch ChevronAngle #Pressure Drop Friction Factor According to kumar's (1984)
448       
449        case "30 Deg": #        ChevronAngle <= 30
450       
451        if      HotSide.HeatTransfer.Re < 10
452                then
453                                HotSide.PressureDrop.fi                 = Kp1(1)/HotSide.HeatTransfer.Re^Kp2(1);
454                                ColdSide.PressureDrop.fi        =       Kp1(1)/ColdSide.HeatTransfer.Re^Kp2(1);
455                else
456                                if      HotSide.HeatTransfer.Re < 100
457                                        then
458                                                        HotSide.PressureDrop.fi                 = Kp1(2)/HotSide.HeatTransfer.Re^Kp2(2);
459                                                        ColdSide.PressureDrop.fi        =       Kp1(2)/ColdSide.HeatTransfer.Re^Kp2(2);
460                                        else
461                                                        HotSide.PressureDrop.fi                 = Kp1(3)/HotSide.HeatTransfer.Re^Kp2(3);
462                                                        ColdSide.PressureDrop.fi        =       Kp1(3)/ColdSide.HeatTransfer.Re^Kp2(3);
463                                end
464                       
465        end     
466
467        case "45 Deg":
468       
469        if      HotSide.HeatTransfer.Re < 15
470                then
471                                HotSide.PressureDrop.fi                 = Kp1(4)/HotSide.HeatTransfer.Re^Kp2(4);
472                                ColdSide.PressureDrop.fi        =       Kp1(4)/ColdSide.HeatTransfer.Re^Kp2(4);
473                else
474                                if      HotSide.HeatTransfer.Re < 300
475                                        then
476                                                        HotSide.PressureDrop.fi                 = Kp1(5)/HotSide.HeatTransfer.Re^Kp2(5);
477                                                        ColdSide.PressureDrop.fi        =       Kp1(5)/ColdSide.HeatTransfer.Re^Kp2(5);
478                                        else
479                                                        HotSide.PressureDrop.fi                 = Kp1(6)/HotSide.HeatTransfer.Re^Kp2(6);
480                                                        ColdSide.PressureDrop.fi        =       Kp1(6)/ColdSide.HeatTransfer.Re^Kp2(6);
481                                end
482                       
483        end     
484
485        case "50 Deg":
486       
487        if      HotSide.HeatTransfer.Re < 20
488                then
489                                HotSide.PressureDrop.fi                 = Kp1(7)/HotSide.HeatTransfer.Re^Kp2(7);
490                                ColdSide.PressureDrop.fi        =       Kp1(7)/ColdSide.HeatTransfer.Re^Kp2(7);
491                else
492                                if      HotSide.HeatTransfer.Re < 300
493                                        then
494                                                        HotSide.PressureDrop.fi                 = Kp1(8)/HotSide.HeatTransfer.Re^Kp2(8);
495                                                        ColdSide.PressureDrop.fi        =       Kp1(8)/ColdSide.HeatTransfer.Re^Kp2(8);
496                                        else
497                                                        HotSide.PressureDrop.fi                 = Kp1(9)/HotSide.HeatTransfer.Re^Kp2(9);
498                                                        ColdSide.PressureDrop.fi        =       Kp1(9)/ColdSide.HeatTransfer.Re^Kp2(9);
499                                end
500                       
501        end
502       
503        case "60 Deg":
504       
505        if      HotSide.HeatTransfer.Re < 40
506                then
507                                HotSide.PressureDrop.fi                 = Kp1(10)/HotSide.HeatTransfer.Re^Kp2(10);
508                                ColdSide.PressureDrop.fi        =       Kp1(10)/ColdSide.HeatTransfer.Re^Kp2(10);
509                else
510                                if      HotSide.HeatTransfer.Re < 400
511                                        then
512                                                        HotSide.PressureDrop.fi                 = Kp1(11)/HotSide.HeatTransfer.Re^Kp2(11);
513                                                        ColdSide.PressureDrop.fi        =       Kp1(11)/ColdSide.HeatTransfer.Re^Kp2(11);
514                                        else
515                                                        HotSide.PressureDrop.fi                 = Kp1(12)/HotSide.HeatTransfer.Re^Kp2(12);
516                                                        ColdSide.PressureDrop.fi        =       Kp1(12)/ColdSide.HeatTransfer.Re^Kp2(12);
517                                end
518                       
519        end
520       
521        case "65 Deg": #        ChevronAngle >= 65
522       
523        if      HotSide.HeatTransfer.Re < 50
524                then
525                                HotSide.PressureDrop.fi                 = Kp1(13)/HotSide.HeatTransfer.Re^Kp2(13);
526                                ColdSide.PressureDrop.fi        =       Kp1(13)/ColdSide.HeatTransfer.Re^Kp2(13);
527                else
528                                if      HotSide.HeatTransfer.Re < 500
529                                        then
530                                                        HotSide.PressureDrop.fi                 = Kp1(14)/HotSide.HeatTransfer.Re^Kp2(14);
531                                                        ColdSide.PressureDrop.fi        =       Kp1(14)/ColdSide.HeatTransfer.Re^Kp2(14);
532                                        else
533                                                        HotSide.PressureDrop.fi                 = Kp1(15)/HotSide.HeatTransfer.Re^Kp2(15);
534                                                        ColdSide.PressureDrop.fi        =       Kp1(15)/ColdSide.HeatTransfer.Re^Kp2(15);
535                                end
536                       
537        end
538
539 end
540
541 switch ChevronAngle # Heat Transfer Coefficient According to kumar's (1984)
542
543        case "30 Deg": #        ChevronAngle <= 30
544       
545        if      HotSide.HeatTransfer.Re < 10
546                then
547                                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;
548                                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;
549                else
550                                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;
551                                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;
552        end     
553       
554        case "45 Deg":
555       
556        if      HotSide.HeatTransfer.Re < 10
557                then
558                                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;
559                                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;
560                else
561                                if      HotSide.HeatTransfer.Re < 100
562                                        then
563                                                        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;
564                                                        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;
565                                        else
566                                                        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;
567                                                        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;
568                                end
569        end
570
571        case "50 Deg":
572       
573        if      HotSide.HeatTransfer.Re < 20
574                then
575                                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;
576                                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;
577                else
578                                if      HotSide.HeatTransfer.Re < 300
579                                        then
580                                                        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;
581                                                        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;
582                                        else
583                                                        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;
584                                                        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;
585                                end
586        end
587
588        case "60 Deg":
589       
590        if      HotSide.HeatTransfer.Re < 20
591                then
592                                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;
593                                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;
594                else
595                                if      HotSide.HeatTransfer.Re < 400
596                                        then
597                                                        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;
598                                                        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;
599                                        else
600                                                        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;
601                                                        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;
602                                end
603        end
604       
605        case "65 Deg": #        ChevronAngle >= 65
606       
607        if      HotSide.HeatTransfer.Re < 20
608                then
609                                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;
610                                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;
611                else
612                                if      HotSide.HeatTransfer.Re < 500
613                                        then
614                                                        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;
615                                                        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;
616                                        else
617                                                        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;
618                                                        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;
619                                end
620        end
621
622 end
623
624"Hot Stream Velocity in Channels"
625        HotSide.PressureDrop.Vchannel =HotSide.HeatTransfer.Gchannel/HotSide.Properties.Average.rho;
626
627"Cold Stream Velocity in Channels"
628        ColdSide.PressureDrop.Vchannel =ColdSide.HeatTransfer.Gchannel/ColdSide.Properties.Average.rho;
629
630"Hot Stream Velocity in Ports"
631        HotSide.PressureDrop.Vports =HotSide.Properties.Inlet.Fw/(Aports*HotSide.Properties.Inlet.rho);
632
633"Cold Stream Velocity in Ports"
634        ColdSide.PressureDrop.Vports =ColdSide.Properties.Inlet.Fw/(Aports*ColdSide.Properties.Inlet.rho);
635
636"Hot Stream Reynolds Number"
637        HotSide.HeatTransfer.Re =Dh*HotSide.HeatTransfer.Gchannel/HotSide.Properties.Average.Mu;
638
639"Cold Stream Reynolds Number"
640        ColdSide.HeatTransfer.Re =Dh*ColdSide.HeatTransfer.Gchannel/ColdSide.Properties.Average.Mu;
641
642"Hot Stream Prandtl Number"
643        HotSide.HeatTransfer.PR= ((HotSide.Properties.Average.Cp/HotSide.Properties.Average.Mw)*HotSide.Properties.Average.Mu)/HotSide.Properties.Average.K;
644
645"Cold Stream Prandtl Number"
646        ColdSide.HeatTransfer.PR = ((ColdSide.Properties.Average.Cp/ColdSide.Properties.Average.Mw)*ColdSide.Properties.Average.Mu)/ColdSide.Properties.Average.K;
647
648"Hot Stream Viscosity Correction"
649        HotSide.HeatTransfer.Phi= HotSide.Properties.Average.Mu/HotSide.Properties.Wall.Mu;
650
651"Cold Stream Viscosity Correction"
652        ColdSide.HeatTransfer.Phi= ColdSide.Properties.Average.Mu/ColdSide.Properties.Wall.Mu;
653
654"Hot Stream Outlet Pressure"
655        OutletHot.P  = InletHot.P - HotSide.PressureDrop.Pdrop;
656       
657"Cold Stream Outlet Pressure"
658        OutletCold.P  = InletCold.P - ColdSide.PressureDrop.Pdrop;
659       
660"Overall Heat Transfer Coefficient Clean"
661        Thermal.Uc/HotSide.HeatTransfer.hcoeff +Thermal.Uc*pt/Kwall+Thermal.Uc/ColdSide.HeatTransfer.hcoeff=1;
662
663"Overall Heat Transfer Coefficient Dirty"
664        Thermal.Ud*(1/HotSide.HeatTransfer.hcoeff +pt/Kwall+1/ColdSide.HeatTransfer.hcoeff + Rfc + Rfh)=1;
665
666 "Duty"
667        Thermal.Q = Thermal.Eft*Thermal.Cmin*(InletHot.T-InletCold.T);
668
669 "Heat Capacity Ratio"
670        Thermal.Cr =Thermal.Cmin/Thermal.Cmax;
671
672"Minimum Heat Capacity"
673        Thermal.Cmin  = min([HotSide.HeatTransfer.WCp,ColdSide.HeatTransfer.WCp]);
674
675"Maximum Heat Capacity"
676        Thermal.Cmax  = max([HotSide.HeatTransfer.WCp,ColdSide.HeatTransfer.WCp]);
677
678"Hot Stream Heat Capacity"
679        HotSide.HeatTransfer.WCp  = InletHot.F*HotSide.Properties.Average.Cp;
680
681"Cold Stream Heat Capacity"
682        ColdSide.HeatTransfer.WCp = InletCold.F*ColdSide.Properties.Average.Cp;
683
684"Number of Units Transference for the Whole Heat Exchanger"
685        Thermal.NTU = max([HotSide.HeatTransfer.NTU,ColdSide.HeatTransfer.NTU]);
686
687"Number of Units Transference for Hot Side"
688        HotSide.HeatTransfer.NTU*HotSide.HeatTransfer.WCp = Thermal.Ud*Atotal;
689
690"Number of Units Transference for Cold Side"
691        ColdSide.HeatTransfer.NTU*ColdSide.HeatTransfer.WCp = Thermal.Ud*Atotal;
692
693if Thermal.Cr equal 1 # To be Fixed: Effectiveness in true counter flow !
694       
695        then
696"Effectiveness in Counter Flow"
697        Thermal.Eft*(1+Thermal.NTU) = Thermal.NTU;
698       
699        else
700"Effectiveness in Counter Flow"
701        Thermal.NTU = (1/(Thermal.Cr-1))*ln(abs((Thermal.Eft-1)/(Thermal.Cr*Thermal.Eft-1)));
702
703end
704
705end
Note: See TracBrowser for help on using the repository browser.