source: branches/gui/eml/heat_exchangers/HEX_Engine.mso @ 615

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

some modifications on heat exchangers models (new gui)

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