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