source: trunk/eml/heat_exchangers/Heatex.mso @ 962

Last change on this file since 962 was 733, checked in by gerson bicca, 14 years ago

heatex changed (model/icon)

  • Property svn:keywords set to Id
File size: 10.4 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*--------------------------------------------------------------------
16* Author: Gerson Balbueno Bicca
17* $Id: Heatex.mso 733 2009-02-26 22:25:45Z bicca $
18*--------------------------------------------------------------------*#
19
20using "heat_exchangers/HEX_Engine";
21
22Model Heatex_Basic
23
24ATTRIBUTES
25        Pallete         = false;
26        Brief   = "Basic Model for Simplified Heat Exchangers";
27        Info            =
28"Model of a simplified heat exchanger.
29This model perform only material and heat balance.
30
31== Assumptions ==
32* Steady-State operation;
33* No heat loss to the surroundings.
34
35== Specify ==
36* The Inlet streams: Hot and Cold;
37";
38       
39PARAMETERS
40outer PP                as Plugin       (Brief="External Physical Properties", Type="PP");
41outer NComp     as Integer  (Brief="Number of Components");
42       
43        M(NComp)  as molweight  (Brief="Component Mol Weight",Hidden=true);
44       
45VARIABLES
46
47in  InletHot            as stream                       (Brief="Inlet Hot Stream", PosX=0, PosY=0.508, Symbol="^{inHot}");
48out OutletHot   as streamPH     (Brief="Outlet Hot Stream", PosX=1, PosY=0.508, Symbol="^{outHot}");
49in  InletCold           as stream                       (Brief="Inlet Cold Stream", PosX=0.50, PosY=1, Symbol="^{inCold}");
50out OutletCold  as streamPH     (Brief="Outlet Cold Stream", PosX=0.50, PosY=0, Symbol="^{outCold}");
51
52        A               as area                                         (Brief="Exchange Surface Area");
53        Q               as power                                        (Brief="Duty", Default=7000, Lower=1e-6, Upper=1e10);
54        U               as heat_trans_coeff     (Brief="Overall Heat Transfer Coefficient",Default=1,Lower=1e-6,Upper=1e10);
55       
56        PdropHotSide    as press_delta  (Brief="Pressure Drop Hot Side",Default=0.01, Lower=0,DisplayUnit='kPa' , Symbol ="\Delta P_{hot}");
57        PdropColdSide   as press_delta  (Brief="Pressure Drop Cold Side",Default=0.01, Lower=0,DisplayUnit='kPa' , Symbol ="\Delta P_{cold}");
58
59SET
60
61#"Component Molecular Weight"
62        M   = PP.MolecularWeight();
63
64EQUATIONS
65
66"Energy Balance Hot Stream"
67        Q = InletHot.F*(InletHot.h-OutletHot.h);
68
69"Energy Balance Cold Stream"
70        Q =-InletCold.F*(InletCold.h-OutletCold.h);
71
72"Molar Balance Hot Stream"
73        InletHot.F  = OutletHot.F;
74       
75"Molar Balance Cold Stream"
76        InletCold.F = OutletCold.F;
77
78"Hot Stream Molar Fraction Constraint"
79        OutletHot.z     =       InletHot.z;
80       
81"Cold Stream Molar Fraction Constraint"
82        OutletCold.z    =       InletCold.z;
83       
84"Pressure Drop Hot Stream"
85        OutletHot.P  = InletHot.P - PdropHotSide;
86       
87"Pressure Drop Cold Stream"
88        OutletCold.P  = InletCold.P - PdropColdSide;
89       
90end
91
92Model Heatex_LMTD  as Heatex_Basic
93
94ATTRIBUTES
95        Pallete         = true;
96        Icon            = "icon/Heatex";       
97        Brief   = "Simplified model for Heat Exchangers";
98        Info            =
99"This model perform material and heat balance using the Log Mean Temperature Difference Approach.
100This shortcut calculation does not require exchanger configuration or geometry data.
101
102== Assumptions ==
103* Steady-State operation;
104* No heat loss to the surroundings.
105
106== Specify ==
107* The Inlet streams: Hot and Cold.
108
109== References ==
110[1] E.A.D. Saunders, Heat Exchangers: Selection, Design and
111 Construction, Longman, Harlow, 1988.
112
113[2] Taborek, J., Shell-and-tube heat exchangers, in Heat Exchanger Design Handbook, Vol. 3
114 Hemisphere Publishing Corp., New York, 1988.
115
116[3] Fakheri, A. , Alternative approach for determining log mean temperature difference correction factor
117 and number of shells of shell and tube heat exchangers, Journal of Enhanced Heat Transfer, v. 10, p. 407- 420, 2003.
118";
119       
120PARAMETERS
121
122        ExchangerType           as Switcher     (Brief="Type of Heat Exchanger",Valid=["Counter Flow","Cocurrent Flow", "Shell and Tube"],Default="Cocurrent Flow");
123        LMTDcorrection  as Switcher     (Brief="LMTD Correction Factor Model",Valid=["Bowmann","Fakheri"],Default="Bowmann");
124
125VARIABLES
126
127        Method  as LMTD_Basic           (Brief="LMTD Method of Calculation", Symbol =" ");
128        R                               as positive                     (Brief="Capacity Ratio for LMTD Correction Fator",Lower=1e-6,Hidden=true);
129        P                               as positive                     (Brief="Non - Dimensional Variable for LMTD Correction Fator ",Lower=1e-6,Hidden=true);
130        Rho                     as positive                     (Brief="Non - Dimensional Variable for LMTD Correction Fator in Fakheri Equation",Lower=1e-6,Hidden=true);
131        Phi             as positive                     (Brief="Non - Dimensional Variable for LMTD Correction Fator in Fakheri Equation",Lower=1e-6, Symbol ="\phi",Hidden=true);
132
133EQUATIONS
134
135"Duty"
136        Q = U*A*Method.LMTD*Method.Fc;
137
138switch ExchangerType
139       
140        case "Cocurrent Flow":
141
142"Temperature Difference at Inlet"
143        Method.DT0 = InletHot.T - InletCold.T;
144
145"Temperature Difference at Outlet"
146        Method.DTL = OutletHot.T - OutletCold.T;
147
148"R: Capacity Ratio for LMTD Correction Fator"
149        R=1;
150
151"P: Non - Dimensional Variable for LMTD Correction Fator"
152        P=1;
153
154" Variable useless with this model"
155        Phi  = 1;
156       
157" Variable useless with this model"
158        Rho = 1;
159
160"LMTD Correction Factor in Cocurrent Flow"
161        Method.Fc = 1;
162
163        case "Counter Flow":
164       
165"Temperature Difference at Inlet"
166        Method.DT0 = InletHot.T - OutletCold.T;
167
168"Temperature Difference at Outlet"
169        Method.DTL = OutletHot.T - InletCold.T;
170
171"R: Capacity Ratio for LMTD Correction Fator"
172        R=1;
173
174"P: Non - Dimensional Variable for LMTD Correction Fator"
175        P=1;
176
177" Variable useless with this model"
178        Phi  = 1;
179       
180" Variable useless with this model"
181        Rho = 1;
182
183"LMTD Correction Factor in Counter Flow"
184        Method.Fc = 1;
185
186        case "Shell and Tube":
187
188"Temperature Difference at Inlet"
189        Method.DT0 = InletHot.T - OutletCold.T;
190
191"Temperature Difference at Outlet"
192        Method.DTL = OutletHot.T - InletCold.T;
193
194switch LMTDcorrection
195
196        case "Bowmann":
197
198" Variable not in use with Bowmann equation"
199        Phi  = 1;
200       
201" Variable not in use with Bowmann equation"
202        Rho = 1;
203
204"R: Capacity Ratio for LMTD Correction Fator when Shell and Tube"
205        R*(OutletCold.T - InletCold.T ) = (InletHot.T-OutletHot.T);
206
207"P: Non - Dimensional Variable for LMTD Correction Fator when Shell and Tube"
208        P*(InletHot.T- InletCold.T)= (OutletCold.T-InletCold.T);
209       
210 if R equal 1
211       
212    then
213       
214"LMTD Correction Fator when 1 Pass Shell Side"
215        Method.Fc = (sqrt(2)*P)/((1-P)*ln( abs( ( 2-P*0.585786)/( 2-P*3.414214))));
216
217        else
218       
219"LMTD Correction Fator when 1 Pass Shell Side"
220        Method.Fc = sqrt(R*R+1)*ln(abs((1-P*R)/(1-P)))/((1-R)*ln( abs( ( 2-P*(R+1-sqrt(R*R+1)))/ ( 2-P*(R + 1 + sqrt(R*R+1))))));
221
222end
223
224        case "Fakheri":
225
226"R: Capacity Ratio for LMTD Correction Fator when Shell and Tube"
227        R*(OutletCold.T - InletCold.T ) = (InletHot.T-OutletHot.T);
228
229"P: Non - Dimensional Variable for LMTD Correction Fator when Shell and Tube"
230        P*(InletHot.T- InletCold.T)= (OutletCold.T-InletCold.T);
231       
232"Non Dimensional Variable for LMTD Correction Fator in Fakheri Equation "
233        Phi  = (sqrt(((InletHot.T- OutletHot.T)*(InletHot.T- OutletHot.T))+((OutletCold.T - InletCold.T)*(OutletCold.T - InletCold.T))))/(2*((InletHot.T+ OutletHot.T)-(InletCold.T+ OutletCold.T)));
234
235"Non Dimensional Variable for LMTD Correction Fator in Fakheri Equation"
236        Rho*(1-P*R) = (1-P);
237
238if Rho equal 1
239       
240        then
241       
242"LMTD Correction Fator when 1 Pass Shell Side"
243        Method.Fc = (4*Phi)/(ln(abs((1+2*Phi)/(1-2*Phi))));
244
245        else
246
247"LMTD Correction Fator when 1 Pass Shell Side"
248        Method.Fc = (2*Phi*(Rho+1)*ln(abs(Rho)))/( ln(abs((1+2*Phi)/(1-2*Phi)))*(Rho-1));
249       
250end
251
252end
253
254end
255
256end
257
258Model Heatex_NTU        as Heatex_Basic
259
260ATTRIBUTES
261        Pallete         = true;
262        Icon            = "icon/Heatex";       
263        Brief   = "Simplified model for Heat Exchangers";
264        Info            =
265"This model perform material and heat balance using the NTU-Effectiveness Approach.
266This shortcut calculation does not require exchanger configuration or geometry data.
267
268== Assumptions ==
269* Steady-State operation;
270* No heat loss to the surroundings.
271
272== Specify ==
273* The Inlet streams: Hot and Cold.
274
275== References ==
276[1] E.A.D. Saunders, Heat Exchangers: Selection, Design and
277 Construction, Longman, Harlow, 1988.
278
279";
280       
281PARAMETERS
282
283        ExchangerType           as Switcher     (Brief="Type of Heat Exchanger",Valid=["Counter Flow","Cocurrent Flow", "Shell and Tube"],Default="Cocurrent Flow");
284
285VARIABLES
286
287Method  as NTU_Basic    (Brief="NTU Method of Calculation", Symbol =" ");
288
289        xh(NComp)       as fraction             (Brief = "Liquid Molar Fraction in Hot Side",Hidden=true);
290        yh(NComp)       as fraction             (Brief = "Vapour Molar Fraction in Hot Side",Hidden=true);
291        vh                              as fraction             (Brief = "Vapour Fraction in Hot Side",Hidden=true);
292       
293        xc(NComp)       as fraction             (Brief = "Liquid Molar Fraction in Cold Side",Hidden=true);
294        yc(NComp)       as fraction             (Brief = "Vapour Molar Fraction in Cold Side",Hidden=true);
295        vc                              as fraction             (Brief = "Vapour Fraction in Cold Side",Hidden=true);
296
297EQUATIONS
298
299"Flash Calculation in Hot Side"
300        [vh, xh, yh] = PP.Flash(InletHot.T, InletHot.P, InletHot.z);
301
302"Flash Calculation in Cold Side"
303        [vc, xc, yc] = PP.Flash(InletCold.T, InletCold.P, InletCold.z);
304
305"Number of Units Transference"
306        Method.NTU*Method.Cmin = U*A;
307       
308"Minimum Heat Capacity"
309        Method.Cmin  = min([Method.Ch,Method.Cc]);
310
311"Maximum Heat Capacity"
312        Method.Cmax  = max([Method.Ch,Method.Cc]);
313
314"Thermal Capacity Ratio"
315        Method.Cr    = Method.Cmin/Method.Cmax;
316
317"Duty"
318        Q       = Method.Eft*Method.Cmin*(InletHot.T-InletCold.T);
319
320"Hot Stream Average Heat Capacity"
321        Method.Ch       = InletHot.F*((1-InletHot.v)*PP.LiquidCp(0.5*InletHot.T+0.5*OutletHot.T,0.5*InletHot.P+0.5*OutletHot.P,xh)+
322                InletHot.v*PP.VapourCp(0.5*InletHot.T+0.5*OutletHot.T,0.5*InletHot.P+0.5*OutletHot.P,yh));
323       
324"Cold Stream Average Heat Capacity"
325        Method.Cc       =       InletCold.F*((1-InletCold.v)*PP.LiquidCp(0.5*InletCold.T+0.5*OutletCold.T,0.5*InletCold.P+0.5*OutletCold.P,xc)+
326                InletCold.v*PP.VapourCp(0.5*InletCold.T+0.5*OutletCold.T,0.5*InletCold.P+0.5*OutletCold.P,yc));
327       
328"Effectiveness Correction"
329        Method.Eft1 = 1;
330
331if Method.Cr equal 0
332       
333        then
334       
335"Effectiveness"
336        Method.Eft = 1-exp(-Method.NTU);
337       
338        else
339
340switch  ExchangerType
341
342        case "Cocurrent Flow":
343       
344"Effectiveness in Cocurrent Flow"
345        Method.Eft = (1-exp(-Method.NTU*(1+Method.Cr)))/(1+Method.Cr);
346
347        case "Counter Flow":
348
349if Method.Cr equal 1
350       
351        then
352"Effectiveness in Counter Flow"
353        Method.Eft = Method.NTU/(1+Method.NTU);
354       
355        else
356"Effectiveness in Counter Flow"
357        Method.Eft = (1-exp(-Method.NTU*(1-Method.Cr)))/(1-Method.Cr*exp(-Method.NTU*(1-Method.Cr)));
358       
359end
360
361        case "Shell and Tube":
362       
363"TEMA E Shell Effectiveness"
364        Method.Eft      = 2*(1+Method.Cr+sqrt(1+Method.Cr^2)*((1+exp(-Method.NTU*sqrt(1+Method.Cr^2)))/(1-exp(-Method.NTU*sqrt(1+Method.Cr^2)))) )^(-1);
365
366end
367
368
369end
370
371end
Note: See TracBrowser for help on using the repository browser.