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

Last change on this file since 490 was 490, checked in by gerson bicca, 16 years ago

updated

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 16.7 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 490 2008-04-03 23:38:09Z 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 = "to be documented";
90        Info =
91        "to be documented";
92       
93VARIABLES
94PdTube                  as press_delta  (Brief="Tube Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa');
95Pdtotal                         as press_delta  (Brief="Total Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa');
96Pdnozzle_in     as press_delta  (Brief="Inlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
97Pdnozzle_out    as press_delta  (Brief="Outlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
98Vnozzle_in      as velocity             (Brief="Inlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0);
99Vnozzle_out     as velocity             (Brief="Outlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0);
100fi                              as fricfactor   (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
101
102EQUATIONS
103"Total Pressure Drop"
104        Pdtotal = PdTube + Pdnozzle_in + Pdnozzle_out;
105
106end
107
108Model Tube_Heat_Transfer
109       
110ATTRIBUTES
111        Pallete = false;
112        Brief = "to be documented";
113        Info =
114        "to be documented";
115       
116VARIABLES
117Re              as positive                             (Brief="Tube Side Reynolds Number",Default=1000,Lower=1);
118Nu              as positive                             (Brief="Nusselt Number",Default=0.5,Lower=1e-8);
119htube   as heat_trans_coeff (Brief="Tube Side Film Coefficient",Default=1,Lower=1e-12, Upper=1e6);
120fi              as fricfactor                   (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
121PR              as positive                             (Brief="Tube Side Prandtl Number",Default=0.5,Lower=1e-8);
122Phi             as positive                             (Brief="Phi Correction",Default=1,Lower=1e-3);
123Vtube   as velocity                             (Brief="Tube Side Velocity",Lower=1e-8);
124
125end
126
127Model Shell_Pdrop
128       
129ATTRIBUTES
130        Pallete = false;
131        Brief = "to be documented";
132        Info =
133        "to be documented";
134       
135VARIABLES
136Pideal                      as press_delta              (Brief="Ideal Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
137PdCross                         as press_delta          (Brief="Cross Flow Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
138PdEndZones              as press_delta          (Brief="End Zones Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
139Pdwindow                        as press_delta          (Brief="Window Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa');
140Pdtotal                                 as press_delta          (Brief="Total Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
141Pdnozzle_in             as press_delta          (Brief="Inlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
142Pdnozzle_out            as press_delta          (Brief="Outlet Nozzle Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa');
143fi                                      as fricfactor           (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
144Vnozzle_in              as velocity                     (Brief="Inlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0);
145Vnozzle_out             as velocity                     (Brief="Outlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0);
146RVsquare_out            as positive                     (Brief = "Outlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m');
147RVsquare_in             as positive                     (Brief = "Inlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m');
148
149EQUATIONS
150"Shell Side Total Pressure Drop"
151        Pdtotal = PdCross + PdEndZones + Pdnozzle_in + Pdnozzle_out + Pdwindow;
152
153end
154
155Model Shell_Heat_Transfer
156       
157ATTRIBUTES
158        Pallete = false;
159        Brief = "to be documented";
160        Info =
161        "to be documented";
162       
163VARIABLES
164Re              as positive                             (Brief="Shell Side Reynolds Number",Default=100,Lower=1);
165PR              as positive                             (Brief="Shell Side Prandtl Number",Default=0.7,Lower=1e-6);
166hshell          as heat_trans_coeff     (Brief="Shell Side Film Coefficient",Default=1,Lower=1e-12, Upper=1e6);
167Phi     as positive                             (Brief="Phi Correction",Default=1,Lower=1e-3);
168end
169
170Model Baffles_Main
171       
172ATTRIBUTES
173        Pallete = false;
174        Brief = "Main variables in the Baffle section of a shell and tube heat exchanger.";
175
176PARAMETERS
177
178BaffleCut                       as Integer      (Brief="Baffle Cut",Default=25,Lower=25);
179NumberOfBaffles     as Real             (Brief="Number of Baffles", Symbol = "N_{baffles}", Lower=1);
180
181VARIABLES
182
183Inlet_Spacing                   as length               (Brief="Inlet Baffle Spacing",Lower=1e-8, Symbol = "L_{si}", DisplayUnit ='mm' );
184Central_Spacing                 as length               (Brief="Central Baffle Spacing",Lower=1e-8, Symbol = "L_s", DisplayUnit ='mm' );
185Outlet_Spacing          as length               (Brief="Outlet Baffle Spacing",Lower=1e-8, Symbol = "L_{so}", DisplayUnit ='mm' );
186
187end
188
189Model Clearances_Main
190       
191ATTRIBUTES
192        Pallete = false;
193        Brief = "Main parameters for diametral clearances in a shell and tube heat exchanger.";
194
195PARAMETERS
196
197SealStrip                               as Integer      (Brief="Number of Sealing Strips pairs",Lower=1);
198Hinozzle_Shell          as length               (Brief="Height Under Shell Inlet Nozzle",Lower=1E-6);
199Honozzle_Shell          as length               (Brief="Height Under Shell Outlet Nozzle",Lower=1E-6);
200BundleToShell           as length               (Brief="Bundle-to-Shell Clearance", Symbol = "L_{cf}", Lower=1E-8);
201BaffleToShell           as length       (Brief="Baffle-to-Shell Clearance", Symbol = "L_{cd}", Lower=1E-8);
202TubeToBaffle            as length       (Brief="Tube-to-Baffle Clearance", Symbol = "L_{td}", Lower=1E-8);
203
204end
205
206Model NTU_Basic
207
208ATTRIBUTES
209        Pallete = false;
210        Brief = "Number of Units Transference Method.";
211        Info =
212        "to be documented";
213
214VARIABLES
215
216Ch   as positive        (Brief="Hot Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K');
217Cc   as positive        (Brief="Cold Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K');
218Cr      as positive     (Brief="Heat Capacity Ratio",Default=0.5,Lower=1e-6);
219Cmin  as positive       (Brief="Minimum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K');
220Cmax as positive        (Brief="Maximum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K');
221NTU     as positive     (Brief="Number of Units Transference",Default=0.05,Lower=1e-10);
222Eft     as positive  (Brief="Effectiveness",Default=0.5,Lower=1e-8,Upper=1, Symbol ="\varepsilon");
223Eft1    as positive  (Brief="Effectiveness Correction",Lower=1e-8,Default=0.5, Symbol ="\hat {\varepsilon}");
224
225end
226
227Model LMTD_Basic
228
229ATTRIBUTES
230        Pallete = false;
231        Brief = "Log Mean Temperature Difference Method.";
232        Info =
233        "to be documented";
234       
235VARIABLES
236
237DT0             as temp_delta   (Brief="Temperature Difference at Inlet",Lower=1e-6, Symbol ="\Delta T_0");
238DTL             as temp_delta   (Brief="Temperature Difference at Outlet",Lower=1e-6, Symbol ="\Delta T_L");
239LMTD            as temp_delta   (Brief="Logarithmic Mean Temperature Difference",Lower=1e-6);
240Fc                      as positive             (Brief="LMTD Correction Factor",Lower=0.1);
241
242EQUATIONS
243
244if abs(DT0 - DTL) > 0.05*max(abs([DT0,DTL]))
245       
246        then
247"Log Mean Temperature Difference"
248        LMTD= (DT0-DTL)/ln(DT0/DTL);
249
250        else
251       
252if DT0*DTL equal 0
253       
254        then
255"Log Mean Temperature Difference"
256        LMTD = 0.5*(DT0+DTL);
257       
258        else
259"Log Mean Temperature Difference"
260        LMTD = 0.5*(DT0+DTL)*(1-(DT0-DTL)^2/(DT0*DTL)*(1+(DT0-DTL)^2/(DT0*DTL)/2)/12);
261       
262end
263       
264end
265
266end
267
268Model Details_Main
269       
270ATTRIBUTES
271        Pallete = false;
272        Brief = "to be documented";
273        Info =
274        "to be documented";
275       
276VARIABLES
277A               as area                                 (Brief="Exchange Surface Area");
278Q               as power                                (Brief="Heat Transfer", Default=7000, Lower=1e-6, Upper=1e10);
279Uc      as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10);
280Ud      as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient Dirty",Default=1,Lower=1e-6,Upper=1e10);
281
282end
283
284Model Tube_Side_Main
285
286ATTRIBUTES
287        Pallete = false;
288        Brief = "Main variables in the Tube Side section of a shell and tube heat exchanger.";
289
290PARAMETERS
291
292NumberOfTubes           as Integer                      (Brief="Total Number of Tubes in Shell",Default=100,Lower=1);
293Tubepasses                      as Integer                      (Brief="Number of Tube Passes", Lower=1);
294TubeLength                              as length                               (Brief="Effective Tube Length",Lower=0.1);
295TubePitch                               as length                               (Brief="Tube Pitch",Lower=1E-8);
296Kwall                                           as conductivity         (Brief="Tube Wall Material Thermal Conductivity");
297TubeOD                                          as length                               (Brief="Tube Outside Diameter",Lower=1E-6);
298TubeID                                  as length                               (Brief="Tube Inside Diameter",Lower=1E-6);
299Fouling                                 as positive                     (Brief="Tubeside Fouling Resistance",Unit='m^2*K/kW', Symbol = "Rf_{tube}", Default=1E-6 , Lower=0);
300InletNozzleID           as length                               (Brief="Inlet Nozzle Inside Diameter", Lower=1E-6);
301OutletNozzleID                  as length                               (Brief="Outlet Nozzle Inside Diameter", Lower=1E-6);
302
303VARIABLES
304
305PressureDrop    as Tube_Pdrop                           (Brief="Tube Side Pressure Drop");
306HeatTransfer    as Tube_Heat_Transfer   (Brief="Tube Side Heat Transfer");
307Properties              as Physical_Properties          (Brief="Tube Side Properties");
308
309end
310
311Model Shell_Side_Main
312       
313ATTRIBUTES
314        Pallete = false;
315        Brief = "Main variables in the Shell Side section of a shell and tube heat exchanger.";
316
317PARAMETERS
318
319ShellID                         as length               (Brief="Inside Shell Diameter",Lower=1E-6);
320Fouling                         as positive     (Brief="Shellside Fouling Resistance",Unit='m^2*K/kW', Symbol = "Rf_{shell}", Default=1E-6 , Lower=0);
321InletNozzleID   as length               (Brief="Inlet Nozzle Inside Diameter", Lower=1E-6);
322OutletNozzleID          as length               (Brief="Outlet Nozzle Inside Diameter", Lower=1E-6);
323
324VARIABLES
325
326PressureDrop    as Shell_Pdrop                                  (Brief="Shell Side Pressure Drop");
327HeatTransfer    as Shell_Heat_Transfer          (Brief= "Shell Side Heat Transfer");
328Properties              as Physical_Properties          (Brief="ShellSide Properties");
329
330end
331
332Model Basic_Pdrop
333       
334ATTRIBUTES
335        Pallete = false;
336        Brief = "to be documented";
337        Info =
338        "to be documented";
339       
340VARIABLES
341
342Pdrop   as press_delta  (Brief="Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa' , Symbol ="\Delta P");
343FPdrop  as Real                 (Brief="Pressure Drop : Fraction of Inlet",Lower=0,Upper=0.8);
344
345end
346
347Model DoublePipe_HeatTransfer
348       
349ATTRIBUTES
350        Pallete = false;
351        Brief = "to be documented";
352        Info =
353        "to be documented";
354       
355PARAMETERS
356As                      as area                                         (Brief="Cross Sectional Area for Flow",Default=0.05,Lower=1e-8);
357Dh              as length                                       (Brief="Hydraulic Diameter of Pipe for Heat Transfer",Lower=1e-8);
358
359VARIABLES
360Re              as positive                             (Brief="Reynolds Number",Default=100,Lower=1);
361hcoeff  as heat_trans_coeff (Brief="Film Coefficient",Default=1,Lower=1e-12, Upper=1e6);
362fi              as fricfactor                   (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
363Nu              as positive                             (Brief="Nusselt Number",Default=0.5,Lower=1e-8);
364PR              as positive                             (Brief="Prandtl Number",Default=0.5,Lower=1e-8);
365Phi             as positive                             (Brief="Phi Correction",Default=1,Lower=1e-3);
366Vmean   as velocity                             (Brief="Tube Velocity",Lower=1e-8);
367
368end
369
370Model DoublePipe_PressureDrop
371       
372ATTRIBUTES
373        Pallete = false;
374        Brief = "to be documented";
375        Info =
376        "to be documented";
377       
378PARAMETERS
379
380Dh      as length               (Brief="Hydraulic Diameter of Pipe for Pressure Drop",Lower=1e-6);
381
382VARIABLES
383
384Pdrop   as press_delta  (Brief="Total Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P");
385Pd_fric as press_delta  (Brief="Pressure Drop for friction",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P_{fric}");
386Pd_ret  as press_delta  (Brief="Pressure Drop due to return",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P_{return}");
387fi      as fricfactor   (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
388Re      as positive             (Brief="Reynolds Number",Default=100,Lower=1);
389
390end     
391
392Model Main_DoublePipe
393       
394ATTRIBUTES
395        Pallete = false;
396        Brief = "to be documented";
397        Info =
398        "to be documented";
399       
400VARIABLES
401
402HeatTransfer    as DoublePipe_HeatTransfer      (Brief="Double Pipe Heat Transfer",Symbol=" ");
403PressureDrop    as DoublePipe_PressureDrop      (Brief="Double Pipe Pressure Drop", Symbol=" ");
404Properties      as Physical_Properties                  (Brief="Double Pipe Properties",Symbol=" " );
405
406end
407
408Model Main_Simplified
409       
410ATTRIBUTES
411        Pallete = false;
412        Brief = "to be documented";
413        Info =
414        "to be documented";
415       
416VARIABLES
417
418PressureDrop    as Basic_Pdrop                  (Brief="Pressure Drop", Symbol=" ");
419Properties      as Physical_Properties   (Brief="Physical Properties", Symbol=" ");
420
421end
422
423Model PHE_HeatTransfer
424       
425ATTRIBUTES
426        Pallete = false;
427        Brief = "to be documented";
428        Info =
429        "to be documented";
430       
431VARIABLES
432
433Re                              as positive                                     (Brief="Reynolds Number",Default=100,Lower=1);
434PR                              as positive                                     (Brief="Prandtl Number",Default=0.5,Lower=1e-8);
435NTU                     as positive                                     (Brief="Number of Units Transference",Default=0.05,Lower=1e-10);
436WCp                     as positive                                     (Brief="Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit='W/K');
437hcoeff          as heat_trans_coeff     (Brief="Film Coefficient",Default=1,Lower=1e-12, Upper=1e6);
438Gchannel        as flux_mass                            (Brief ="Channel Mass Flux", Default=1, Lower=1e-6, Symbol ="G^{channel}");
439Gports          as flux_mass                            (Brief ="Ports Mass Flux", Default=1, Lower=1e-6, Symbol ="G^{ports}");
440Phi                     as positive                                     (Brief="Viscosity Correction",Default=1,Lower=1e-6, Symbol="\phi");
441
442end
443
444Model PHE_PressureDrop
445       
446ATTRIBUTES
447        Pallete = false;
448        Brief = "to be documented";
449        Info =
450        "to be documented";
451       
452VARIABLES
453
454DPchannel                       as press_delta  (Brief="Channel Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa', Symbol ="\Delta P^{channel}");
455DPports                         as press_delta  (Brief="Ports Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa', Symbol ="\Delta P^{ports}");
456Pdrop                           as press_delta  (Brief="Total Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa', Symbol ="\Delta P");
457fi                                      as fricfactor           (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);
458Vchannel                        as velocity             (Brief="Stream Velocity in Channel",Lower=1e-8, Symbol ="V^{channel}");
459Vports                          as velocity             (Brief="Stream Velocity in Ports",Lower=1e-8, Symbol ="V^{ports}");
460Npassage                        as Real                                 (Brief="Number of  Channels per Pass", Symbol ="N^{passage}");
461end
462
463Model Main_PHE
464       
465ATTRIBUTES
466        Pallete = false;
467        Brief = "to be documented";
468        Info =
469        "to be documented";
470       
471VARIABLES
472
473HeatTransfer            as PHE_HeatTransfer             (Brief="PHE Heat Transfer", Symbol = " ");
474PressureDrop    as PHE_PressureDrop             (Brief="PHE Pressure Drop", Symbol = " ");
475Properties              as Physical_Properties          (Brief="PHE Properties", Symbol = " ");
476
477end
478
479Model Thermal_PHE
480
481ATTRIBUTES
482        Pallete = false;
483        Brief = "to be documented";
484        Info =
485        "to be documented";
486       
487VARIABLES
488Cr      as positive                                     (Brief="Heat Capacity Ratio",Default=0.5,Lower=1e-6);
489Cmin    as positive                                     (Brief="Minimum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K');
490Cmax    as positive                                     (Brief="Maximum Heat Capacity",Lower=1e-10,Default=1e3,Unit='W/K');
491NTU     as positive                                     (Brief="Number of Units Transference",Default=0.05,Lower=1e-10);
492Eft             as positive                             (Brief="Effectiveness",Default=0.5,Lower=0.4,Upper=1, Symbol = "\varepsilon");
493Q                       as power                                        (Brief="Heat Transfer", Default=7000, Lower=1e-6, Upper=1e10);
494Uc              as heat_trans_coeff     (Brief="Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10);
495Ud              as heat_trans_coeff     (Brief="Overall Heat Transfer Coefficient Dirty",Default=1,Lower=1e-6,Upper=1e10);
496end
Note: See TracBrowser for help on using the repository browser.