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 | * Heat Exchangers Abstract Models |
---|
17 | *-------------------------------------------------------------------- |
---|
18 | * - Inlet_Main_Stream : Inlet Streams |
---|
19 | *-------------------------------------------------------------------- |
---|
20 | * - Hot : Inlet Hot Stream |
---|
21 | * - Cold : Inlet Cold Stream |
---|
22 | *-------------------------------------------------------------------- |
---|
23 | * - Outlet_Main_Stream : Outlet Streams |
---|
24 | *-------------------------------------------------------------------- |
---|
25 | * - Hot : Outlet Hot Stream |
---|
26 | * - Cold : Outlet Cold Stream |
---|
27 | *-------------------------------------------------------------------- |
---|
28 | * - Main_Properties : Physical Properties for Hot and Cold Side |
---|
29 | *-------------------------------------------------------------------- |
---|
30 | * Physical_Properties |
---|
31 | * Properties_In_Out : Inlet/Outlet Physical Properties |
---|
32 | * Properties_Average : Average Physical Properties |
---|
33 | * Properties_Wall : Physical Properties at Wall Temperature |
---|
34 | *-------------------------------------------------------------------- |
---|
35 | * - Tube_Side_Main : Tube Side Main Variables |
---|
36 | *---------------------------------------------------------------------- |
---|
37 | * Tube_Pdrop : Tube Side Pressure Drop |
---|
38 | * Tube_Heat_Transfer : Tube Side Heat Transfer |
---|
39 | *---------------------------------------------------------------------- |
---|
40 | * - Shell_Side_Main : Shell Side Main Variables |
---|
41 | *---------------------------------------------------------------------- |
---|
42 | * Shell_Pdrop : Shell Side Pressure Drop |
---|
43 | * Shell_Heat_Transfer : Shell Side Heat Transfer |
---|
44 | *---------------------------------------------------------------------- |
---|
45 | * - Baffles_Main : Baffles Spacing |
---|
46 | *---------------------------------------------------------------------- |
---|
47 | * - Main_Resistances : Thermal Resistances |
---|
48 | *---------------------------------------------------------------------- |
---|
49 | * - Details_Main : Heat Exchanger Thermal Details |
---|
50 | *---------------------------------------------------------------------- |
---|
51 | * - Main_Pdrop : Heat Exchanger Pressure Drop (Simplified) |
---|
52 | * Basic_Pdrop : Hot and Cold Side Pressure Drop |
---|
53 | *---------------------------------------------------------------------- |
---|
54 | * - Main_DoublePipe : Double Pipe Heat Exchanger Block |
---|
55 | * DoublePipe_HeatTransfer |
---|
56 | * DoublePipe_PressureDrop |
---|
57 | *---------------------------------------------------------------------- |
---|
58 | * Author: Gerson Balbueno Bicca |
---|
59 | * $Id: HEX_Engine.mso 110 2007-01-12 18:44:02Z bicca $ |
---|
60 | *--------------------------------------------------------------------*# |
---|
61 | |
---|
62 | using "streams"; |
---|
63 | |
---|
64 | Model Inlet_Main_Stream |
---|
65 | #===================================================================== |
---|
66 | # Inlet Streams |
---|
67 | #===================================================================== |
---|
68 | VARIABLES |
---|
69 | Hot as stream; # Inlet Hot Stream |
---|
70 | Cold as stream; # Inlet Cold Stream |
---|
71 | |
---|
72 | end |
---|
73 | |
---|
74 | Model Outlet_Main_Stream |
---|
75 | #===================================================================== |
---|
76 | # Outlet Streams |
---|
77 | #===================================================================== |
---|
78 | VARIABLES |
---|
79 | Hot as stream_therm; # Outlet Hot Stream |
---|
80 | Cold as stream_therm; # Outlet Cold Stream |
---|
81 | |
---|
82 | end |
---|
83 | |
---|
84 | #===================================================================== |
---|
85 | # Heat Exchangers Physical Properties |
---|
86 | #===================================================================== |
---|
87 | |
---|
88 | Model Properties_Average |
---|
89 | #===================================================================== |
---|
90 | # Average Physical Properties |
---|
91 | #===================================================================== |
---|
92 | VARIABLES |
---|
93 | Mw as molweight (Brief="Average Mol Weight",Default=75, Lower=1, Upper=1e8); |
---|
94 | T as temperature (Brief="Average Temperature",Lower=50); |
---|
95 | P as pressure (Brief="Average Pressure",Default=1, Lower=1e-10, Upper=30); |
---|
96 | rho as dens_mass (Brief="Stream Density" ,Default=1000, Lower=1e-3, Upper=5e5); |
---|
97 | Mu as viscosity (Brief="Stream Viscosity",Lower=0.0001); |
---|
98 | Cp as cp_mol (Brief="Stream Molar Heat Capacity", Upper=1e10); |
---|
99 | K as conductivity (Brief="Stream Thermal Conductivity", Default=1.0, Lower=1e-5, Upper=500); |
---|
100 | |
---|
101 | end |
---|
102 | |
---|
103 | Model Properties_In_Out |
---|
104 | #===================================================================== |
---|
105 | # Inlet/Outlet Physical Properties |
---|
106 | #===================================================================== |
---|
107 | VARIABLES |
---|
108 | Fw as flow_mass (Brief="Stream Mass Flow"); |
---|
109 | rho as dens_mass (Brief="Stream Density" ,Default=1000, Lower=1e-3, Upper=5e5); |
---|
110 | Mu as viscosity (Brief="Stream Viscosity",Default=1, Lower=1e-5, Upper=1e5); |
---|
111 | Cp as cp_mol (Brief="Stream Molar Heat Capacity", Upper=1e10); |
---|
112 | K as conductivity (Brief="Stream Thermal Conductivity", Default=1.0, Lower=1e-5, Upper=500); |
---|
113 | |
---|
114 | end |
---|
115 | |
---|
116 | Model Properties_Wall |
---|
117 | #===================================================================== |
---|
118 | # Physical Properties at Wall Temperature |
---|
119 | #===================================================================== |
---|
120 | VARIABLES |
---|
121 | Mu as viscosity (Brief="Stream Viscosity",Default=1, Lower=1e-5, Upper=1e5); |
---|
122 | Cp as cp_mol (Brief="Stream Molar Heat Capacity", Upper=1e10); |
---|
123 | K as conductivity (Brief="Stream Thermal Conductivity", Default=1.0, Lower=1e-5, Upper=500); |
---|
124 | Twall as temperature (Brief="Wall Temperature",Lower=50); |
---|
125 | |
---|
126 | end |
---|
127 | |
---|
128 | Model Physical_Properties |
---|
129 | #===================================================================== |
---|
130 | # Physical Properties |
---|
131 | #===================================================================== |
---|
132 | VARIABLES |
---|
133 | Inlet as Properties_In_Out; # Properties at Inlet Stream |
---|
134 | Average as Properties_Average; # Properties at Average Temperature |
---|
135 | Outlet as Properties_In_Out; # Properties at Outlet Stream |
---|
136 | Wall as Properties_Wall; # Properties at Wall Temperature |
---|
137 | |
---|
138 | end |
---|
139 | |
---|
140 | Model Main_Properties |
---|
141 | #===================================================================== |
---|
142 | # Physical Properties for Hot and Cold Side |
---|
143 | #===================================================================== |
---|
144 | VARIABLES |
---|
145 | Hot as Physical_Properties; # Hot Stream |
---|
146 | Cold as Physical_Properties; # Cold Stream |
---|
147 | end |
---|
148 | |
---|
149 | Model Tube_Pdrop |
---|
150 | #===================================================================== |
---|
151 | # Tube Side Pressure Drop block |
---|
152 | #===================================================================== |
---|
153 | VARIABLES |
---|
154 | PdTube as press_delta (Brief="Tube Pressure Drop",Default=0.01, Lower=1e-10); |
---|
155 | Pdtotal as press_delta (Brief="Total Pressure Drop",Default=0.01, Lower=1e-10); |
---|
156 | Pdnozzle_in as press_delta (Brief="Inlet Nozzle Pressure Drop",Default=0.01, Lower=0); |
---|
157 | Pdnozzle_out as press_delta (Brief="Outlet Nozzle Pressure Drop",Default=0.01, Lower=0); |
---|
158 | Vnozzle_in as velocity (Brief="Inlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0); |
---|
159 | Vnozzle_out as velocity (Brief="Outlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0); |
---|
160 | |
---|
161 | EQUATIONS |
---|
162 | "Total Pressure Drop" |
---|
163 | Pdtotal = PdTube + Pdnozzle_in + Pdnozzle_out; |
---|
164 | |
---|
165 | end |
---|
166 | |
---|
167 | Model Tube_Heat_Transfer |
---|
168 | #===================================================================== |
---|
169 | # Tube Side Heat Transfer Block |
---|
170 | #===================================================================== |
---|
171 | VARIABLES |
---|
172 | Re as positive (Brief="Tube Side Reynolds Number",Default=1000,Lower=1); |
---|
173 | htube as heat_trans_coeff (Brief="Tube Side Film Coefficient",Default=1,Lower=1e-12, Upper=1e6); |
---|
174 | PR as positive (Brief="Tube Side Prandtl Number",Default=0.5,Lower=1e-8); |
---|
175 | PRw as positive (Brief="Tube Side Prandtl Number at Wall Temperature",Default=0.5,Lower=1e-8); |
---|
176 | Phi as positive (Brief="Phi Correction",Default=1,Lower=1e-3); |
---|
177 | Vtube as velocity (Brief="Tube Side Velocity",Lower=1e-8); |
---|
178 | |
---|
179 | end |
---|
180 | |
---|
181 | Model Shell_Pdrop |
---|
182 | #===================================================================== |
---|
183 | # Shell Side Pressure Drop block |
---|
184 | #===================================================================== |
---|
185 | VARIABLES |
---|
186 | PdCross as press_delta (Brief="Cross Flow Pressure Drop",Default=0.01, Lower=0); |
---|
187 | PdEndZones as press_delta (Brief="End Zones Pressure Drop",Default=0.01, Lower=0); |
---|
188 | Pdwindow as press_delta (Brief="Window Pressure Drop",Default=0.01, Lower=1e-10); |
---|
189 | Pdtotal as press_delta (Brief="Total Pressure Drop",Default=0.01, Lower=0); |
---|
190 | Pdnozzle_in as press_delta (Brief="Inlet Nozzle Pressure Drop",Default=0.01, Lower=0); |
---|
191 | Pdnozzle_out as press_delta (Brief="Outlet Nozzle Pressure Drop",Default=0.01, Lower=0); |
---|
192 | Vnozzle_in as velocity (Brief="Inlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0); |
---|
193 | Vnozzle_out as velocity (Brief="Outlet Nozzle Velocity",Default=1, Upper=1e5, Lower=0); |
---|
194 | RVsquare_out as positive (Brief = "Outlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = "kg/s^2/m"); |
---|
195 | RVsquare_in as positive (Brief = "Inlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = "kg/s^2/m"); |
---|
196 | |
---|
197 | EQUATIONS |
---|
198 | "Shell Side Total Pressure Drop" |
---|
199 | Pdtotal = PdCross + PdEndZones + Pdnozzle_in + Pdnozzle_out + Pdwindow; |
---|
200 | |
---|
201 | end |
---|
202 | |
---|
203 | Model Shell_Heat_Transfer |
---|
204 | #===================================================================== |
---|
205 | # Shell Side Heat Transfer Block |
---|
206 | #===================================================================== |
---|
207 | VARIABLES |
---|
208 | Re as positive (Brief="Shell Side Reynolds Number",Default=100,Lower=1); |
---|
209 | PR as positive (Brief="Shell Side Prandtl Number",Default=0.7,Lower=1e-6); |
---|
210 | PRw as positive (Brief="Shell Side Prandtl Number",Default=0.5,Lower=1e-8); |
---|
211 | hshell as heat_trans_coeff (Brief="Shell Side Film Coefficient",Default=1,Lower=1e-12, Upper=1e6); |
---|
212 | Phi as positive (Brief="Phi Correction",Default=1,Lower=1e-3); |
---|
213 | Ji as constant (Brief="Shell Side Ji Factor",Default=0.05); |
---|
214 | Jr as positive (Brief="Shell Side Jr Factor",Lower=10e-6); |
---|
215 | Jl as positive (Brief="Shell Side Jl Factor",Lower=10e-6); |
---|
216 | Jb as positive (Brief="Shell Side Jb Factor",Lower=10e-6); |
---|
217 | Jc as positive (Brief="Shell Side Jc Factor",Lower=10e-6); |
---|
218 | Js as positive (Brief="Shell Side Js Factor",Lower=10e-6); |
---|
219 | Jtotal as positive (Brief="Shell Side Jtotal Factor",Lower=10e-6); |
---|
220 | Sm as area (Brief="Shell Side Cross Flow Area",Default=0.05,Lower=10e-6); |
---|
221 | |
---|
222 | end |
---|
223 | |
---|
224 | Model Baffles_Main |
---|
225 | #===================================================================== |
---|
226 | # Baffles Spacing |
---|
227 | #===================================================================== |
---|
228 | VARIABLES |
---|
229 | Ls as length (Brief="Central Baffle Spacing",Lower=1e-8); |
---|
230 | Lsi as length (Brief="Inlet Baffle Spacing",Lower=1e-8); |
---|
231 | Lso as length (Brief="Outlet Baffle Spacing",Lower=1e-8); |
---|
232 | |
---|
233 | end |
---|
234 | |
---|
235 | Model Main_Resistances |
---|
236 | #===================================================================== |
---|
237 | # Resistances |
---|
238 | #===================================================================== |
---|
239 | VARIABLES |
---|
240 | |
---|
241 | Rtube as positive (Brief="Tube Resistance",Unit="m^2*K/kW",Lower=1e-6); |
---|
242 | Rwall as positive (Brief="Wall Resistance",Unit="m^2*K/kW",Lower=1e-6); |
---|
243 | Rshell as positive (Brief="Shell Resistance",Unit="m^2*K/kW",Lower=1e-6); |
---|
244 | Rfi as positive (Brief="Inside Fouling Resistance",Unit="m^2*K/kW",Default=1e-6,Lower=0); |
---|
245 | Rfo as positive (Brief="Outside Fouling Resistance",Unit="m^2*K/kW",Default=1e-6,Lower=0); |
---|
246 | |
---|
247 | end |
---|
248 | |
---|
249 | Model Details_Main |
---|
250 | #===================================================================== |
---|
251 | # Heat Exchanger Thermal Details |
---|
252 | #===================================================================== |
---|
253 | VARIABLES |
---|
254 | A as area (Brief="Exchange Surface Area"); |
---|
255 | Q as power (Brief="Heat Transfer", Default=7000, Lower=1e-6, Upper=1e10); |
---|
256 | Uc as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10); |
---|
257 | Ud as heat_trans_coeff (Brief="Overall Heat Transfer Coefficient Dirty",Default=1,Lower=1e-6,Upper=1e10); |
---|
258 | Ch as positive (Brief="Hot Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit="W/K"); |
---|
259 | Cc as positive (Brief="Cold Stream Heat Capacity",Lower=1e-3,Default=1e3,Unit="W/K"); |
---|
260 | Cr as positive (Brief="Heat Capacity Ratio",Default=0.5,Lower=1e-6); |
---|
261 | Cmin as positive (Brief="Minimum Heat Capacity",Lower=1e-10,Default=1e3,Unit="W/K"); |
---|
262 | Cmax as positive (Brief="Maximum Heat Capacity",Lower=1e-10,Default=1e3,Unit="W/K"); |
---|
263 | NTU as positive (Brief="Number of Units Transference",Default=0.05,Lower=1e-10); |
---|
264 | |
---|
265 | EQUATIONS |
---|
266 | "Number of Units Transference" |
---|
267 | NTU*Cmin = Ud*A; |
---|
268 | |
---|
269 | end |
---|
270 | |
---|
271 | Model Tube_Side_Main |
---|
272 | #===================================================================== |
---|
273 | # Tube Side Main Variables |
---|
274 | #===================================================================== |
---|
275 | VARIABLES |
---|
276 | PressureDrop as Tube_Pdrop; #Tube Side Pressure Drop |
---|
277 | HeatTransfer as Tube_Heat_Transfer; #Tube Side Heat Transfer |
---|
278 | |
---|
279 | end |
---|
280 | |
---|
281 | Model Shell_Side_Main |
---|
282 | #===================================================================== |
---|
283 | # Shell Side Main Variables |
---|
284 | #===================================================================== |
---|
285 | VARIABLES |
---|
286 | PressureDrop as Shell_Pdrop; # Shell Side Pressure Drop |
---|
287 | HeatTransfer as Shell_Heat_Transfer; # Shell Side Heat Transfer |
---|
288 | |
---|
289 | end |
---|
290 | |
---|
291 | Model Basic_Pdrop |
---|
292 | #===================================================================== |
---|
293 | # Pressure Drop |
---|
294 | #===================================================================== |
---|
295 | VARIABLES |
---|
296 | Pdrop as press_delta (Brief="Pressure Drop",Default=0.01, Lower=0); |
---|
297 | FPdrop as Real (Brief="Pressure Drop : Fraction of Inlet",Lower=0,Upper=0.8); |
---|
298 | |
---|
299 | end |
---|
300 | |
---|
301 | Model Main_Pdrop |
---|
302 | #===================================================================== |
---|
303 | # Pressure Drop block |
---|
304 | #===================================================================== |
---|
305 | VARIABLES |
---|
306 | Hot as Basic_Pdrop;# Hot Stream |
---|
307 | Cold as Basic_Pdrop;# Cold Stream |
---|
308 | |
---|
309 | end |
---|
310 | |
---|
311 | Model DoublePipe_HeatTransfer |
---|
312 | #===================================================================== |
---|
313 | # Double Pipe Heat Transfer Block |
---|
314 | #===================================================================== |
---|
315 | PARAMETERS |
---|
316 | As as area (Brief="Cross Sectional Area for Flow",Default=0.05,Lower=1e-8); |
---|
317 | Dh as length (Brief="Hydraulic Diameter of Pipe for Heat Transfer",Lower=1e-8); |
---|
318 | |
---|
319 | VARIABLES |
---|
320 | Re as positive (Brief="Reynolds Number",Default=100,Lower=1); |
---|
321 | hcoeff as heat_trans_coeff (Brief="Film Coefficient",Default=1,Lower=1e-12, Upper=1e6); |
---|
322 | PR as positive (Brief="Prandtl Number",Default=0.5,Lower=1e-8); |
---|
323 | Phi as positive (Brief="Phi Correction",Default=1,Lower=1e-3); |
---|
324 | Vmean as velocity (Brief="Tube Velocity",Lower=1e-8); |
---|
325 | |
---|
326 | end |
---|
327 | |
---|
328 | Model DoublePipe_PressureDrop |
---|
329 | #===================================================================== |
---|
330 | # # Double Pipe Pressure Drop Block |
---|
331 | #===================================================================== |
---|
332 | PARAMETERS |
---|
333 | Dh as length (Brief="Hydraulic Diameter of Pipe for Pressure Drop",Lower=1e-6); |
---|
334 | |
---|
335 | VARIABLES |
---|
336 | Pdrop as press_delta (Brief="Pressure Drop",Default=0.01, Lower=1e-10); |
---|
337 | fi as fricfactor (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000); |
---|
338 | Re as positive (Brief="Reynolds Number",Default=100,Lower=1); |
---|
339 | |
---|
340 | end |
---|
341 | |
---|
342 | Model Main_DoublePipe |
---|
343 | #===================================================================== |
---|
344 | # Double Pipe Main Variables |
---|
345 | #===================================================================== |
---|
346 | VARIABLES |
---|
347 | HeatTransfer as DoublePipe_HeatTransfer; |
---|
348 | PressureDrop as DoublePipe_PressureDrop; |
---|
349 | |
---|
350 | end |
---|