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