source: trunk/eml/heat_exchangers/HEX_Engine.mso @ 523

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

improved the plate heat exchanger model

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 14.5 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: HEX_Engine.mso 523 2008-05-23 19:44:08Z bicca $
17*--------------------------------------------------------------------*#
18
19using "streams";
20
21Model Properties_Average
22       
23ATTRIBUTES
24        Pallete = false;
25        Brief = "Average physical properties of the streams.";
26        Info =
27        "to be documented.";
28       
29VARIABLES
30Mw              as molweight            (Brief="Average Mol Weight",Default=75, Lower=1, Upper=1e8);
31T                       as temperature          (Brief="Average  Temperature",Lower=50);
32P                       as pressure                     (Brief="Average  Pressure",Default=1, Lower=1e-10, Upper=2e4, DisplayUnit='kPa');
33rho             as dens_mass            (Brief="Stream Density" ,Default=1000, Lower=1e-3, Upper=5e5, Symbol = "\rho");
34Mu              as viscosity            (Brief="Stream Viscosity",Lower=0.0001, Symbol = "\mu");
35Cp              as cp_mol                       (Brief="Stream Molar Heat Capacity", Upper=1e10);
36K                       as conductivity         (Brief="Stream Thermal Conductivity", Default=1.0, Lower=1e-5, Upper=500);
37
38end
39
40Model Properties_In_Out
41       
42ATTRIBUTES
43        Pallete = false;
44        Brief = "Inlet and outlet physical properties of the streams.";
45        Info =
46        "to be documented.";
47       
48VARIABLES
49Fw              as flow_mass            (Brief="Stream Mass Flow");
50rho             as dens_mass            (Brief="Stream Density" ,Default=1000, Lower=1e-3, Upper=5e5, Symbol = "\rho");
51end
52
53Model Properties_Wall
54       
55ATTRIBUTES
56        Pallete = false;
57        Brief = "Physical properties of the streams at wall temperature.";
58        Info =
59        "to be documented.";
60       
61VARIABLES
62
63Mu              as viscosity            (Brief="Stream Viscosity",Default=1, Lower=1e-5, Upper=1e5, Symbol = "\mu");
64Twall           as temperature  (Brief="Wall Temperature",Lower=50);
65
66end
67
68Model Physical_Properties
69       
70ATTRIBUTES
71        Pallete = false;
72        Brief = "to be documented";
73        Info =
74        "to be documented";
75       
76VARIABLES
77
78Inlet           as Properties_In_Out    (Brief="Properties at Inlet Stream", Symbol = "_{in}");
79Average         as Properties_Average   (Brief="Properties at Average Temperature", Symbol = "_{avg}");
80Outlet          as Properties_In_Out    (Brief="Properties at Outlet Stream", Symbol = "_{out}");
81Wall                    as Properties_Wall              (Brief="Properties at Wall Temperature", Symbol = "_{wall}");
82
83end
84
85Model Tube_Pdrop
86       
87ATTRIBUTES
88        Pallete = false;
89        Brief = "Pressure drop and velocities in the tube side section of a shell and tube heat exchanger.";
90       
91VARIABLES
92TubeFriction    as press_delta  (Brief="Tube Pressure Drop due to friction", Symbol = "\Delta P_{tube}", Default=0.01, Lower=1E-10,DisplayUnit='kPa');
93InletNozzle     as press_delta  (Brief="Inlet Nozzle Pressure Drop", Symbol = "\Delta P_{Nozzle\_In}", Default=0.01, Lower=0,DisplayUnit='kPa');
94OutletNozzle    as press_delta  (Brief="Outlet Nozzle Pressure Drop", Symbol = "\Delta P_{Nozzle\_Out}", Default=0.01, Lower=0,DisplayUnit='kPa');
95Total                           as press_delta  (Brief="Total Pressure Drop", Symbol = "\Delta P_{total}", Default=0.01, Lower=1E-10,DisplayUnit='kPa');
96Vnozzle_in              as velocity             (Brief="Inlet Nozzle Velocity", Symbol = "V_{Nozzle\_In}", Default=1, Upper=1e5, Lower=0);
97Vnozzle_out     as velocity             (Brief="Outlet Nozzle Velocity", Symbol = "V_{Nozzle\_Out}", Default=1, Upper=1E5, Lower=0);
98FricFactor              as fricfactor           (Brief="Friction Factor", Symbol = "f_i", Default=0.05, Lower=1e-10, Upper=2000);
99
100EQUATIONS
101"Total Pressure Drop"
102        Total = TubeFriction + InletNozzle + OutletNozzle;
103
104end
105
106Model Tube_Heat_Transfer
107       
108ATTRIBUTES
109        Pallete = false;
110        Brief = "to be documented";
111        Info =
112        "to be documented";
113       
114VARIABLES
115Re              as positive                             (Brief="Tube Side Reynolds Number",Default=1000,Lower=1);
116Nu              as positive                             (Brief="Nusselt Number",Default=0.5,Lower=1e-8);
117htube   as heat_trans_coeff (Brief="Tube Side Film Coefficient",Default=1,Lower=1e-12, Upper=1e6);
118fi              as fricfactor                   (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
119PR              as positive                             (Brief="Tube Side Prandtl Number",Default=0.5,Lower=1e-8);
120Phi             as positive                             (Brief="Phi Correction",Default=1,Lower=1e-3);
121Vtube   as velocity                             (Brief="Tube Side Velocity",Lower=1e-8);
122
123end
124
125Model Shell_Pdrop
126       
127ATTRIBUTES
128        Pallete = false;
129        Brief = "Pressure drop and velocities in the shell side section of a shell and tube heat exchanger.";
130       
131VARIABLES
132Ideal                           as press_delta          (Brief="Ideal Pressure Drop", Symbol = "\Delta P_{ideal}", Default=0.01, Lower=0,DisplayUnit='kPa');
133CrossFlow                       as press_delta          (Brief="Cross Flow Pressure Drop", Symbol = "\Delta P_{CrossFlow}", Default=0.01, Lower=0,DisplayUnit='kPa');
134EndZones                        as press_delta          (Brief="End Zones Pressure Drop", Symbol = "\Delta P_{EndZones}", Default=0.01, Lower=0,DisplayUnit='kPa');
135Window                                  as press_delta          (Brief="Window Pressure Drop", Symbol = "\Delta P_{Window}", Default=0.01, Lower=1e-10,DisplayUnit='kPa');
136InletNozzle             as press_delta          (Brief="Inlet Nozzle Pressure Drop", Symbol = "\Delta P_{Nozzle\_In}", Default=0.01, Lower=0,DisplayUnit='kPa');
137OutletNozzle            as press_delta          (Brief="Outlet Nozzle Pressure Drop", Symbol = "\Delta P_{Nozzle\_Out}", Default=0.01, Lower=0,DisplayUnit='kPa');
138Total                                   as press_delta          (Brief="Total Pressure Drop", Symbol = "\Delta P_{Total}", Default=0.01, Lower=0,DisplayUnit='kPa');
139FricFactor              as fricfactor                   (Brief="Friction Factor",  Symbol = "f_i", Default=0.05, Lower=1e-10, Upper=2000);
140Vnozzle_in                      as velocity                     (Brief="Inlet Nozzle Velocity", Symbol = "V_{Nozzle\_In}", Default=1, Upper=1e5, Lower=0);
141Vnozzle_out             as velocity                     (Brief="Outlet Nozzle Velocity", Symbol = "V_{Nozzle\_Out}", Default=1, Upper=1e5, Lower=0);
142RVsquare_out            as positive                     (Brief = "Outlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m');
143RVsquare_in             as positive                     (Brief = "Inlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m');
144
145EQUATIONS
146"Shell Side Total Pressure Drop"
147        Total = CrossFlow+ EndZones + InletNozzle + OutletNozzle + Window;
148
149end
150
151Model Shell_Heat_Transfer
152       
153ATTRIBUTES
154        Pallete = false;
155        Brief = "to be documented";
156        Info =
157        "to be documented";
158       
159VARIABLES
160Re              as positive                             (Brief="Shell Side Reynolds Number",Default=100,Lower=1);
161PR              as positive                             (Brief="Shell Side Prandtl Number",Default=0.7,Lower=1e-6);
162hshell          as heat_trans_coeff     (Brief="Shell Side Film Coefficient",Default=1,Lower=1e-12, Upper=1e6);
163Phi     as positive                             (Brief="Phi Correction",Default=1,Lower=1e-3);
164end
165
166Model Baffles_Main
167       
168ATTRIBUTES
169        Pallete = false;
170        Brief = "Main variables in the Baffle section of a shell and tube heat exchanger.";
171
172PARAMETERS
173
174BaffleCut                       as Integer      (Brief="Baffle Cut",Default=25,Lower=25);
175NumberOfBaffles     as Real             (Brief="Number of Baffles", Symbol = "N_{baffles}", Lower=1);
176
177VARIABLES
178
179Inlet_Spacing                   as length               (Brief="Inlet Baffle Spacing",Lower=1e-8, Symbol = "L_{si}", DisplayUnit ='mm' );
180Central_Spacing                 as length               (Brief="Central Baffle Spacing",Lower=1e-8, Symbol = "L_s", DisplayUnit ='mm' );
181Outlet_Spacing          as length               (Brief="Outlet Baffle Spacing",Lower=1e-8, Symbol = "L_{so}", DisplayUnit ='mm' );
182
183end
184
185Model Clearances_Main
186       
187ATTRIBUTES
188        Pallete = false;
189        Brief = "Main parameters for diametral clearances in a shell and tube heat exchanger.";
190
191PARAMETERS
192
193SealStrip                               as Integer      (Brief="Number of Sealing Strips pairs",Lower=1);
194Hinozzle_Shell          as length               (Brief="Height Under Shell Inlet Nozzle",Lower=1E-6);
195Honozzle_Shell          as length               (Brief="Height Under Shell Outlet Nozzle",Lower=1E-6);
196BundleToShell           as length               (Brief="Bundle-to-Shell Clearance", Symbol = "L_{cf}", Lower=1E-8);
197BaffleToShell           as length       (Brief="Baffle-to-Shell Clearance", Symbol = "L_{cd}", Lower=1E-8);
198TubeToBaffle            as length       (Brief="Tube-to-Baffle Clearance", Symbol = "L_{td}", Lower=1E-8);
199
200end
201
202Model NTU_Basic
203
204ATTRIBUTES
205        Pallete = false;
206        Brief = "Number of Units Transference Method.";
207        Info =
208        "to be documented";
209
210VARIABLES
211
212Ch   as positive        (Brief="Hot Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K');
213Cc   as positive        (Brief="Cold Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K');
214Cr      as positive     (Brief="Heat Capacity Ratio",Default=0.5,Lower=1e-6);
215Cmin  as positive       (Brief="Minimum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K');
216Cmax as positive        (Brief="Maximum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K');
217NTU     as positive     (Brief="Number of Units Transference",Default=0.05,Lower=1e-10);
218Eft     as positive  (Brief="Effectiveness",Default=0.5,Lower=1e-8,Upper=1, Symbol ="\varepsilon");
219Eft1    as positive  (Brief="Effectiveness Correction",Lower=1e-8,Default=0.5, Symbol ="\hat {\varepsilon}");
220
221end
222
223Model LMTD_Basic
224
225ATTRIBUTES
226        Pallete = false;
227        Brief = "Log Mean Temperature Difference Method.";
228        Info =
229        "to be documented";
230       
231VARIABLES
232
233DT0             as temp_delta   (Brief="Temperature Difference at Inlet",Lower=1e-6, Symbol ="\Delta T_0");
234DTL             as temp_delta   (Brief="Temperature Difference at Outlet",Lower=1e-6, Symbol ="\Delta T_L");
235LMTD            as temp_delta   (Brief="Logarithmic Mean Temperature Difference",Lower=1e-6);
236Fc                      as positive             (Brief="LMTD Correction Factor",Lower=0.1);
237
238EQUATIONS
239
240if abs(DT0 - DTL) > 0.05*max(abs([DT0,DTL]))
241       
242        then
243"Log Mean Temperature Difference"
244        LMTD= (DT0-DTL)/ln(DT0/DTL);
245
246        else
247       
248if DT0*DTL equal 0
249       
250        then
251"Log Mean Temperature Difference"
252        LMTD = 0.5*(DT0+DTL);
253       
254        else
255"Log Mean Temperature Difference"
256        LMTD = 0.5*(DT0+DTL)*(1-(DT0-DTL)^2/(DT0*DTL)*(1+(DT0-DTL)^2/(DT0*DTL)/2)/12);
257       
258end
259       
260end
261
262end
263
264Model Details_Main
265       
266ATTRIBUTES
267        Pallete = false;
268        Brief = "to be documented";
269        Info =
270        "to be documented";
271       
272VARIABLES
273A               as area                                 (Brief="Exchange Surface Area");
274Q               as power                                (Brief="Heat Transfer", Default=7000, Lower=1e-6, Upper=1e10);
275Uc      as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10);
276Ud      as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient Dirty",Default=1,Lower=1e-6,Upper=1e10);
277
278end
279
280Model Tube_Side_Main
281
282ATTRIBUTES
283        Pallete = false;
284        Brief = "Main variables in the Tube Side section of a shell and tube heat exchanger.";
285
286PARAMETERS
287
288NumberOfTubes           as Integer                      (Brief="Total Number of Tubes in Shell",Default=100,Lower=1);
289Tubepasses                      as Integer                      (Brief="Number of Tube Passes", Lower=1);
290TubeLength                              as length                               (Brief="Effective Tube Length",Lower=0.1);
291TubePitch                               as length                               (Brief="Tube Pitch",Lower=1E-8);
292Kwall                                           as conductivity         (Brief="Tube Wall Material Thermal Conductivity");
293TubeOD                                          as length                               (Brief="Tube Outside Diameter",Lower=1E-6);
294TubeID                                  as length                               (Brief="Tube Inside Diameter",Lower=1E-6);
295Fouling                                 as positive                     (Brief="Tubeside Fouling Resistance",Unit='m^2*K/kW', Symbol = "Rf_{tube}", Default=1E-6 , Lower=0);
296InletNozzleID           as length                               (Brief="Inlet Nozzle Inside Diameter", Lower=1E-6);
297OutletNozzleID                  as length                               (Brief="Outlet Nozzle Inside Diameter", Lower=1E-6);
298
299VARIABLES
300
301PressureDrop    as Tube_Pdrop                           (Brief="Tube Side Pressure Drop", Symbol = " ");
302HeatTransfer    as Tube_Heat_Transfer   (Brief="Tube Side Heat Transfer", Symbol = " ");
303Properties              as Physical_Properties          (Brief="Tube Side Properties", Symbol = " ");
304
305end
306
307Model Shell_Side_Main
308       
309ATTRIBUTES
310        Pallete = false;
311        Brief = "Main variables in the Shell Side section of a shell and tube heat exchanger.";
312
313PARAMETERS
314
315ShellID                         as length               (Brief="Inside Shell Diameter",Lower=1E-6);
316Fouling                         as positive     (Brief="Shellside Fouling Resistance",Unit='m^2*K/kW', Symbol = "Rf_{shell}", Default=1E-6 , Lower=0);
317InletNozzleID   as length               (Brief="Inlet Nozzle Inside Diameter", Lower=1E-6);
318OutletNozzleID          as length               (Brief="Outlet Nozzle Inside Diameter", Lower=1E-6);
319
320VARIABLES
321
322PressureDrop    as Shell_Pdrop                                  (Brief="Shell Side Pressure Drop", Symbol = " ");
323HeatTransfer    as Shell_Heat_Transfer          (Brief= "Shell Side Heat Transfer", Symbol = " ");
324Properties              as Physical_Properties          (Brief="ShellSide Properties", Symbol = " ");
325
326end
327
328Model Basic_Pdrop
329       
330ATTRIBUTES
331        Pallete = false;
332        Brief = "to be documented";
333        Info =
334        "to be documented";
335       
336VARIABLES
337
338Pdrop   as press_delta  (Brief="Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa' , Symbol ="\Delta P");
339FPdrop  as Real                 (Brief="Pressure Drop : Fraction of Inlet",Lower=0,Upper=0.8);
340
341end
342
343Model DoublePipe_HeatTransfer
344       
345ATTRIBUTES
346        Pallete = false;
347        Brief = "to be documented";
348        Info =
349        "to be documented";
350       
351PARAMETERS
352As                      as area                                         (Brief="Cross Sectional Area for Flow",Default=0.05,Lower=1e-8);
353Dh              as length                                       (Brief="Hydraulic Diameter of Pipe for Heat Transfer",Lower=1e-8);
354
355VARIABLES
356Re              as positive                             (Brief="Reynolds Number",Default=100,Lower=1);
357hcoeff  as heat_trans_coeff (Brief="Film Coefficient",Default=1,Lower=1e-12, Upper=1e6);
358fi              as fricfactor                   (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
359Nu              as positive                             (Brief="Nusselt Number",Default=0.5,Lower=1e-8);
360PR              as positive                             (Brief="Prandtl Number",Default=0.5,Lower=1e-8);
361Phi             as positive                             (Brief="Phi Correction",Default=1,Lower=1e-3);
362Vmean   as velocity                             (Brief="Tube Velocity",Lower=1e-8);
363
364end
365
366Model DoublePipe_PressureDrop
367       
368ATTRIBUTES
369        Pallete = false;
370        Brief = "to be documented";
371        Info =
372        "to be documented";
373       
374PARAMETERS
375
376Dh      as length               (Brief="Hydraulic Diameter of Pipe for Pressure Drop",Lower=1e-6);
377
378VARIABLES
379
380Pdrop   as press_delta  (Brief="Total Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P");
381Pd_fric as press_delta  (Brief="Pressure Drop for friction",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P_{fric}");
382Pd_ret  as press_delta  (Brief="Pressure Drop due to return",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P_{return}");
383fi      as fricfactor   (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
384Re      as positive             (Brief="Reynolds Number",Default=100,Lower=1);
385
386end     
387
388Model Main_DoublePipe
389       
390ATTRIBUTES
391        Pallete = false;
392        Brief = "to be documented";
393        Info =
394        "to be documented";
395       
396VARIABLES
397
398HeatTransfer    as DoublePipe_HeatTransfer      (Brief="Double Pipe Heat Transfer",Symbol=" ");
399PressureDrop    as DoublePipe_PressureDrop      (Brief="Double Pipe Pressure Drop", Symbol=" ");
400Properties      as Physical_Properties                  (Brief="Double Pipe Properties",Symbol=" " );
401
402end
403
404Model Main_Simplified
405       
406ATTRIBUTES
407        Pallete = false;
408        Brief = "to be documented";
409        Info =
410        "to be documented";
411       
412VARIABLES
413
414PressureDrop    as Basic_Pdrop                  (Brief="Pressure Drop", Symbol=" ");
415Properties      as Physical_Properties   (Brief="Physical Properties", Symbol=" ");
416
417end
Note: See TracBrowser for help on using the repository browser.