[105] | 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 | * Author: Gerson Balbueno Bicca |
---|
| 17 | * $Id: DoublePipe.mso 110 2007-01-12 18:44:02Z bicca $ |
---|
| 18 | *------------------------------------------------------------------*# |
---|
| 19 | |
---|
| 20 | using "HEX_Engine"; |
---|
| 21 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 22 | # Basic Models for Double Pipe Heat Exchangers |
---|
| 23 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 24 | |
---|
| 25 | Model DoublePipe_Basic |
---|
| 26 | |
---|
| 27 | PARAMETERS |
---|
| 28 | ext PP as CalcObject (Brief="External Physical Properties"); |
---|
| 29 | ext NComp as Integer (Brief="Number of Components"); |
---|
| 30 | M(NComp) as molweight (Brief="Component Mol Weight"); |
---|
| 31 | |
---|
| 32 | VARIABLES |
---|
| 33 | |
---|
| 34 | in Inlet as Inlet_Main_Stream; # Hot and Cold Inlets |
---|
| 35 | out Outlet as Outlet_Main_Stream; # Hot and Cold Outlets |
---|
| 36 | Properties as Main_Properties; # Hot and Cold Properties |
---|
| 37 | Details as Details_Main; |
---|
| 38 | Inner as Main_DoublePipe; |
---|
| 39 | Outer as Main_DoublePipe; |
---|
| 40 | Resistances as Main_Resistances; |
---|
| 41 | |
---|
| 42 | SET |
---|
| 43 | |
---|
| 44 | M = PP.MolecularWeight(); |
---|
| 45 | |
---|
| 46 | EQUATIONS |
---|
| 47 | |
---|
| 48 | "Hot Stream Average Temperature" |
---|
| 49 | Properties.Hot.Average.T = 0.5*Inlet.Hot.T + 0.5*Outlet.Hot.T; |
---|
| 50 | |
---|
| 51 | "Cold Stream Average Temperature" |
---|
| 52 | Properties.Cold.Average.T = 0.5*Inlet.Cold.T + 0.5*Outlet.Cold.T; |
---|
| 53 | |
---|
| 54 | "Hot Stream Average Pressure" |
---|
| 55 | Properties.Hot.Average.P = 0.5*Inlet.Hot.P+0.5*Outlet.Hot.P; |
---|
| 56 | |
---|
| 57 | "Cold Stream Average Pressure" |
---|
| 58 | Properties.Cold.Average.P = 0.5*Inlet.Cold.P+0.5*Outlet.Cold.P; |
---|
| 59 | |
---|
| 60 | "Cold Stream Wall Temperature" |
---|
| 61 | Properties.Cold.Wall.Twall = 0.5*Properties.Hot.Average.T + 0.5*Properties.Cold.Average.T; |
---|
| 62 | |
---|
| 63 | "Hot Stream Wall Temperature" |
---|
| 64 | Properties.Hot.Wall.Twall = 0.5*Properties.Hot.Average.T + 0.5*Properties.Cold.Average.T; |
---|
| 65 | |
---|
| 66 | "Hot Stream Average Molecular Weight" |
---|
| 67 | Properties.Hot.Average.Mw = sum(M*Inlet.Hot.z); |
---|
| 68 | |
---|
| 69 | "Cold Stream Average Molecular Weight" |
---|
| 70 | Properties.Cold.Average.Mw = sum(M*Inlet.Cold.z); |
---|
| 71 | |
---|
| 72 | if Inlet.Cold.v equal 0 |
---|
| 73 | then |
---|
| 74 | "Heat Capacity Cold Stream" |
---|
| 75 | Properties.Cold.Average.Cp = PP.LiquidCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 76 | Properties.Cold.Inlet.Cp = PP.LiquidCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 77 | Properties.Cold.Outlet.Cp = PP.LiquidCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 78 | |
---|
| 79 | "Mass Density Cold Stream" |
---|
| 80 | Properties.Cold.Average.rho = PP.LiquidDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 81 | Properties.Cold.Inlet.rho = PP.LiquidDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 82 | Properties.Cold.Outlet.rho = PP.LiquidDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 83 | |
---|
| 84 | "Viscosity Cold Stream" |
---|
| 85 | Properties.Cold.Average.Mu = PP.LiquidViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 86 | Properties.Cold.Inlet.Mu = PP.LiquidViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 87 | Properties.Cold.Outlet.Mu = PP.LiquidViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 88 | |
---|
| 89 | "Conductivity Cold Stream" |
---|
| 90 | Properties.Cold.Average.K = PP.LiquidThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 91 | Properties.Cold.Inlet.K = PP.LiquidThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 92 | Properties.Cold.Outlet.K = PP.LiquidThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 93 | |
---|
| 94 | "Heat Capacity Cold Stream" |
---|
| 95 | Properties.Cold.Wall.Cp = PP.LiquidCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 96 | |
---|
| 97 | "Viscosity Cold Stream" |
---|
| 98 | Properties.Cold.Wall.Mu = PP.LiquidViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 99 | |
---|
| 100 | "Conductivity Cold Stream" |
---|
| 101 | Properties.Cold.Wall.K = PP.LiquidThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | else |
---|
| 105 | |
---|
| 106 | "Heat Capacity Cold Stream" |
---|
| 107 | Properties.Cold.Average.Cp = PP.VapourCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 108 | Properties.Cold.Inlet.Cp = PP.VapourCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 109 | Properties.Cold.Outlet.Cp = PP.VapourCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 110 | |
---|
| 111 | "Mass Density Cold Stream" |
---|
| 112 | Properties.Cold.Average.rho = PP.VapourDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 113 | Properties.Cold.Inlet.rho = PP.VapourDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 114 | Properties.Cold.Outlet.rho = PP.VapourDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 115 | |
---|
| 116 | "Viscosity Cold Stream" |
---|
| 117 | Properties.Cold.Average.Mu = PP.VapourViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 118 | Properties.Cold.Inlet.Mu = PP.VapourViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 119 | Properties.Cold.Outlet.Mu = PP.VapourViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 120 | |
---|
| 121 | "Conductivity Cold Stream" |
---|
| 122 | Properties.Cold.Average.K = PP.VapourThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 123 | Properties.Cold.Inlet.K = PP.VapourThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 124 | Properties.Cold.Outlet.K = PP.VapourThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 125 | |
---|
| 126 | "Heat Capacity Cold Stream" |
---|
| 127 | Properties.Cold.Wall.Cp = PP.VapourCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | "Viscosity Cold Stream" |
---|
| 131 | Properties.Cold.Wall.Mu = PP.VapourViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 132 | |
---|
| 133 | "Conductivity Cold Stream" |
---|
| 134 | Properties.Cold.Wall.K = PP.VapourThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 135 | |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | end |
---|
| 139 | |
---|
| 140 | if Inlet.Hot.v equal 0 |
---|
| 141 | |
---|
| 142 | then |
---|
| 143 | |
---|
| 144 | "Heat Capacity Hot Stream" |
---|
| 145 | Properties.Hot.Average.Cp = PP.LiquidCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 146 | Properties.Hot.Inlet.Cp = PP.LiquidCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
| 147 | Properties.Hot.Outlet.Cp = PP.LiquidCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 148 | |
---|
| 149 | "Mass Density Hot Stream" |
---|
| 150 | Properties.Hot.Average.rho = PP.LiquidDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 151 | Properties.Hot.Inlet.rho = PP.LiquidDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
| 152 | Properties.Hot.Outlet.rho = PP.LiquidDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 153 | |
---|
| 154 | "Viscosity Hot Stream" |
---|
| 155 | Properties.Hot.Average.Mu = PP.LiquidViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 156 | Properties.Hot.Inlet.Mu = PP.LiquidViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
| 157 | Properties.Hot.Outlet.Mu = PP.LiquidViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 158 | |
---|
| 159 | "Conductivity Hot Stream" |
---|
| 160 | Properties.Hot.Average.K = PP.LiquidThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 161 | Properties.Hot.Inlet.K = PP.LiquidThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
| 162 | Properties.Hot.Outlet.K = PP.LiquidThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 163 | |
---|
| 164 | "Heat Capacity Hot Stream" |
---|
| 165 | Properties.Hot.Wall.Cp = PP.LiquidCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 166 | |
---|
| 167 | "Viscosity Hot Stream" |
---|
| 168 | Properties.Hot.Wall.Mu = PP.LiquidViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 169 | |
---|
| 170 | "Conductivity Hot Stream" |
---|
| 171 | Properties.Hot.Wall.K = PP.LiquidThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | else |
---|
| 175 | |
---|
| 176 | "Heat Capacity Hot Stream" |
---|
| 177 | Properties.Hot.Average.Cp = PP.VapourCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 178 | Properties.Hot.Inlet.Cp = PP.VapourCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
| 179 | Properties.Hot.Outlet.Cp = PP.VapourCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 180 | |
---|
| 181 | "Mass Density Hot Stream" |
---|
| 182 | Properties.Hot.Average.rho = PP.VapourDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 183 | Properties.Hot.Inlet.rho = PP.VapourDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
| 184 | Properties.Hot.Outlet.rho = PP.VapourDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 185 | |
---|
| 186 | "Viscosity Hot Stream" |
---|
| 187 | Properties.Hot.Average.Mu = PP.VapourViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 188 | Properties.Hot.Inlet.Mu = PP.VapourViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
| 189 | Properties.Hot.Outlet.Mu = PP.VapourViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 190 | |
---|
| 191 | "Conductivity Hot Stream" |
---|
| 192 | Properties.Hot.Average.K = PP.VapourThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 193 | Properties.Hot.Inlet.K = PP.VapourThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
| 194 | Properties.Hot.Outlet.K = PP.VapourThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 195 | |
---|
| 196 | "Heat Capacity Hot Stream" |
---|
| 197 | Properties.Hot.Wall.Cp = PP.VapourCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 198 | |
---|
| 199 | "Viscosity Hot Stream" |
---|
| 200 | Properties.Hot.Wall.Mu = PP.VapourViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 201 | |
---|
| 202 | "Conductivity Hot Stream" |
---|
| 203 | Properties.Hot.Wall.K = PP.VapourThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | end |
---|
| 207 | |
---|
| 208 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 209 | # Thermal Details |
---|
| 210 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 211 | "Hot Stream Heat Capacity" |
---|
| 212 | Details.Ch =Inlet.Hot.F*Properties.Hot.Average.Cp; |
---|
| 213 | |
---|
| 214 | "Cold Stream Heat Capacity" |
---|
| 215 | Details.Cc =Inlet.Cold.F*Properties.Cold.Average.Cp; |
---|
| 216 | |
---|
| 217 | "Minimum Heat Capacity" |
---|
| 218 | Details.Cmin = min([Details.Ch,Details.Cc]); |
---|
| 219 | |
---|
| 220 | "Maximum Heat Capacity" |
---|
| 221 | Details.Cmax = max([Details.Ch,Details.Cc]); |
---|
| 222 | |
---|
| 223 | "Heat Capacity Ratio" |
---|
| 224 | Details.Cr*Details.Cmax = Details.Cmin; |
---|
[110] | 225 | |
---|
| 226 | #-------------------------------------------------------------------- |
---|
[105] | 227 | # Energy Balance |
---|
[110] | 228 | #-------------------------------------------------------------------- |
---|
| 229 | |
---|
[105] | 230 | "Energy Balance Hot Stream" |
---|
| 231 | Details.Q = Inlet.Hot.F*(Inlet.Hot.h-Outlet.Hot.h); |
---|
| 232 | |
---|
| 233 | "Energy Balance Cold Stream" |
---|
| 234 | Details.Q = Inlet.Cold.F*(Outlet.Cold.h - Inlet.Cold.h); |
---|
| 235 | |
---|
| 236 | #-------------------------------------------------------------------- |
---|
| 237 | # Material Balance |
---|
| 238 | #-------------------------------------------------------------------- |
---|
[110] | 239 | |
---|
[105] | 240 | "Flow Mass Inlet Cold Stream" |
---|
| 241 | Properties.Cold.Inlet.Fw = sum(M*Inlet.Cold.z)*Inlet.Cold.F; |
---|
| 242 | |
---|
| 243 | "Flow Mass Outlet Cold Stream" |
---|
| 244 | Properties.Cold.Outlet.Fw = sum(M*Outlet.Cold.z)*Outlet.Cold.F; |
---|
| 245 | |
---|
| 246 | "Flow Mass Inlet Hot Stream" |
---|
| 247 | Properties.Hot.Inlet.Fw = sum(M*Inlet.Hot.z)*Inlet.Hot.F; |
---|
| 248 | |
---|
| 249 | "Flow Mass Outlet Hot Stream" |
---|
| 250 | Properties.Hot.Outlet.Fw = sum(M*Outlet.Hot.z)*Outlet.Hot.F; |
---|
| 251 | |
---|
| 252 | "Molar Balance Hot Stream" |
---|
| 253 | Inlet.Hot.F = Outlet.Hot.F; |
---|
| 254 | |
---|
| 255 | "Molar Balance Cold Stream" |
---|
| 256 | Inlet.Cold.F = Outlet.Cold.F; |
---|
| 257 | |
---|
| 258 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 259 | # Constraints |
---|
| 260 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 261 | "Hot Stream Molar Fraction Constraint" |
---|
| 262 | Outlet.Hot.z=Inlet.Hot.z; |
---|
| 263 | |
---|
| 264 | "Cold Stream Molar Fraction Constraint" |
---|
| 265 | Outlet.Cold.z=Inlet.Cold.z; |
---|
| 266 | |
---|
| 267 | "No Phase Change In Cold Stream" |
---|
| 268 | Inlet.Cold.v=Outlet.Cold.v; |
---|
| 269 | |
---|
| 270 | "No Phase Change In Hot Stream" |
---|
| 271 | Inlet.Hot.v=Outlet.Hot.v; |
---|
| 272 | |
---|
| 273 | if Inner.PressureDrop.Re < 2300 |
---|
| 274 | |
---|
| 275 | then |
---|
| 276 | "Inner Side Friction Factor - laminar Flow" |
---|
| 277 | Inner.PressureDrop.fi*Inner.PressureDrop.Re = 16; |
---|
| 278 | |
---|
| 279 | else |
---|
| 280 | "Inner Side Friction Factor - Turbulent Flow" |
---|
| 281 | (Inner.PressureDrop.fi-0.0035)*(Inner.PressureDrop.Re^0.42) = 0.264; |
---|
| 282 | |
---|
| 283 | end |
---|
| 284 | |
---|
| 285 | |
---|
| 286 | if Outer.PressureDrop.Re < 2300 |
---|
| 287 | |
---|
| 288 | then |
---|
| 289 | "Inner Side Friction Factor - laminar Flow" |
---|
| 290 | Outer.PressureDrop.fi*Outer.PressureDrop.Re = 16; |
---|
| 291 | |
---|
| 292 | else |
---|
| 293 | "Inner Side Friction Factor - Turbulent Flow" |
---|
| 294 | (Outer.PressureDrop.fi - 0.0035)*(Outer.PressureDrop.Re^0.42) = 0.264; |
---|
| 295 | |
---|
| 296 | end |
---|
| 297 | |
---|
| 298 | end |
---|
| 299 | |
---|
| 300 | Model DoublePipe as DoublePipe_Basic |
---|
| 301 | |
---|
| 302 | PARAMETERS |
---|
| 303 | |
---|
| 304 | HE as CalcObject (Brief="STHE Calculations",File="heatex"); |
---|
| 305 | Pi as constant (Brief="Pi Number",Default=3.14159265); |
---|
| 306 | Hside as Integer (Brief="Fluid Alocation Flag-Default:Outer",Lower=0,Upper=1); |
---|
| 307 | Side as Integer (Brief="Flow Direction",Lower=0,Upper=1); |
---|
| 308 | DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e-6); |
---|
| 309 | DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e-10); |
---|
| 310 | DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e-10); |
---|
| 311 | Lpipe as length (Brief="Effective Tube Length",Lower=0.1); |
---|
| 312 | Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0); |
---|
| 313 | |
---|
| 314 | SET |
---|
| 315 | Pi = 3.14159265; |
---|
| 316 | Hside = HE.FluidAlocation(); |
---|
| 317 | Side = HE.FlowDir(); |
---|
| 318 | |
---|
| 319 | #"Inner Pipe Cross Sectional Area for Flow" |
---|
| 320 | Inner.HeatTransfer.As=Pi*DiInner*DiInner/4; |
---|
| 321 | |
---|
| 322 | #"Outer Pipe Cross Sectional Area for Flow" |
---|
| 323 | Outer.HeatTransfer.As=Pi*(DiOuter*DiOuter-DoInner*DoInner)/4; |
---|
| 324 | |
---|
| 325 | #"Inner Pipe Hydraulic Diameter for Heat Transfer" |
---|
| 326 | Inner.HeatTransfer.Dh=DiInner; |
---|
| 327 | |
---|
| 328 | #"Outer Pipe Hydraulic Diameter for Heat Transfer" |
---|
| 329 | Outer.HeatTransfer.Dh=(DiOuter*DiOuter-DoInner*DoInner)/DoInner; |
---|
| 330 | |
---|
| 331 | #"Inner Pipe Hydraulic Diameter for Pressure Drop" |
---|
| 332 | Inner.PressureDrop.Dh=DiInner; |
---|
| 333 | |
---|
| 334 | #"Outer Pipe Hydraulic Diameter for Pressure Drop" |
---|
| 335 | Outer.PressureDrop.Dh=DiOuter-DoInner; |
---|
| 336 | |
---|
| 337 | EQUATIONS |
---|
| 338 | |
---|
| 339 | "Exchange Surface Area" |
---|
| 340 | Details.A=Pi*DoInner*Lpipe; |
---|
| 341 | |
---|
| 342 | if Hside equal 1 |
---|
| 343 | |
---|
| 344 | then |
---|
| 345 | |
---|
| 346 | "Pressure Drop Hot Stream" |
---|
| 347 | Outlet.Hot.P = Inlet.Hot.P - Outer.PressureDrop.Pdrop; |
---|
| 348 | |
---|
| 349 | "Pressure Drop Cold Stream" |
---|
| 350 | Outlet.Cold.P = Inlet.Cold.P - Inner.PressureDrop.Pdrop; |
---|
| 351 | |
---|
| 352 | "Outer Pipe Film Coefficient" |
---|
| 353 | Outer.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Outer.HeatTransfer.Re,Outer.HeatTransfer.PR,Properties.Hot.Average.K,Outer.HeatTransfer.Dh,Lpipe)*Outer.HeatTransfer.Phi; |
---|
| 354 | |
---|
| 355 | "Inner Pipe Film Coefficient" |
---|
| 356 | Inner.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Inner.HeatTransfer.Re,Inner.HeatTransfer.PR,Properties.Cold.Average.K,DiInner,Lpipe)*Inner.HeatTransfer.Phi; |
---|
| 357 | |
---|
| 358 | "Outer Pipe Pressure Drop" |
---|
| 359 | Outer.PressureDrop.Pdrop = (2*Outer.PressureDrop.fi*Lpipe*Properties.Hot.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi); |
---|
| 360 | |
---|
| 361 | "Inner Pipe Pressure Drop" |
---|
| 362 | Inner.PressureDrop.Pdrop = (2*Inner.PressureDrop.fi*Lpipe*Properties.Cold.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi); |
---|
| 363 | |
---|
| 364 | "Outer Pipe Phi correction" |
---|
| 365 | Outer.HeatTransfer.Phi = HE.PhiCorrection(Properties.Hot.Average.Mu,Properties.Hot.Wall.Mu); |
---|
| 366 | |
---|
| 367 | "Inner Pipe Phi correction" |
---|
| 368 | Inner.HeatTransfer.Phi = HE.PhiCorrection(Properties.Cold.Average.Mu,Properties.Cold.Wall.Mu); |
---|
| 369 | |
---|
| 370 | "Outer Pipe Prandtl Number" |
---|
| 371 | Outer.HeatTransfer.PR = ((Properties.Hot.Average.Cp/Properties.Hot.Average.Mw)*Properties.Hot.Average.Mu)/Properties.Hot.Average.K; |
---|
| 372 | |
---|
| 373 | "Inner Pipe Prandtl Number" |
---|
| 374 | Inner.HeatTransfer.PR = ((Properties.Cold.Average.Cp/Properties.Cold.Average.Mw)*Properties.Cold.Average.Mu)/Properties.Cold.Average.K; |
---|
| 375 | |
---|
| 376 | "Outer Pipe Reynolds Number for Heat Transfer" |
---|
| 377 | Outer.HeatTransfer.Re = (Properties.Hot.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Properties.Hot.Average.Mu; |
---|
| 378 | |
---|
| 379 | "Outer Pipe Reynolds Number for Pressure Drop" |
---|
| 380 | Outer.PressureDrop.Re = (Properties.Hot.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Properties.Hot.Average.Mu; |
---|
| 381 | |
---|
| 382 | "Inner Pipe Reynolds Number for Heat Transfer" |
---|
| 383 | Inner.HeatTransfer.Re = (Properties.Cold.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Properties.Cold.Average.Mu; |
---|
| 384 | |
---|
| 385 | "Inner Pipe Reynolds Number for Pressure Drop" |
---|
| 386 | Inner.PressureDrop.Re = Inner.HeatTransfer.Re; |
---|
| 387 | |
---|
| 388 | "Outer Pipe Velocity" |
---|
| 389 | Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Properties.Hot.Average.rho) = Properties.Hot.Inlet.Fw; |
---|
| 390 | |
---|
| 391 | "Inner Pipe Velocity" |
---|
| 392 | Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Properties.Cold.Average.rho) = Properties.Cold.Inlet.Fw; |
---|
| 393 | |
---|
| 394 | else |
---|
| 395 | |
---|
| 396 | "Pressure Drop Hot Stream" |
---|
| 397 | Outlet.Hot.P = Inlet.Hot.P - Inner.PressureDrop.Pdrop; |
---|
| 398 | |
---|
| 399 | "Pressure Drop Cold Stream" |
---|
| 400 | Outlet.Cold.P = Inlet.Cold.P - Outer.PressureDrop.Pdrop; |
---|
| 401 | |
---|
| 402 | "Inner Pipe Film Coefficient" |
---|
| 403 | Inner.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Inner.HeatTransfer.Re,Inner.HeatTransfer.PR,Properties.Hot.Average.K,DiInner,Lpipe)*Inner.HeatTransfer.Phi; |
---|
| 404 | |
---|
| 405 | "Outer Pipe Film Coefficient" |
---|
| 406 | Outer.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Outer.HeatTransfer.Re,Outer.HeatTransfer.PR,Properties.Cold.Average.K,Outer.HeatTransfer.Dh,Lpipe)*Outer.HeatTransfer.Phi; |
---|
| 407 | |
---|
| 408 | "Outer Pipe Pressure Drop" |
---|
| 409 | Outer.PressureDrop.Pdrop = (2*Outer.PressureDrop.fi*Lpipe*Properties.Cold.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi); |
---|
| 410 | |
---|
| 411 | "Inner Pipe Pressure Drop" |
---|
| 412 | Inner.PressureDrop.Pdrop = (2*Inner.PressureDrop.fi*Lpipe*Properties.Hot.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi); |
---|
| 413 | |
---|
| 414 | "Outer Pipe Phi correction" |
---|
| 415 | Outer.HeatTransfer.Phi = HE.PhiCorrection(Properties.Cold.Average.Mu,Properties.Cold.Wall.Mu); |
---|
| 416 | |
---|
| 417 | "Inner Pipe Phi correction" |
---|
| 418 | Inner.HeatTransfer.Phi = HE.PhiCorrection(Properties.Hot.Average.Mu,Properties.Hot.Wall.Mu); |
---|
| 419 | |
---|
| 420 | "Outer Pipe Prandtl Number" |
---|
| 421 | Outer.HeatTransfer.PR = ((Properties.Cold.Average.Cp/Properties.Cold.Average.Mw)*Properties.Cold.Average.Mu)/Properties.Cold.Average.K; |
---|
| 422 | |
---|
| 423 | "Inner Pipe Prandtl Number" |
---|
| 424 | Inner.HeatTransfer.PR = ((Properties.Hot.Average.Cp/Properties.Hot.Average.Mw)*Properties.Hot.Average.Mu)/Properties.Hot.Average.K; |
---|
| 425 | |
---|
| 426 | "Outer Pipe Reynolds Number for Heat Transfer" |
---|
| 427 | Outer.HeatTransfer.Re = (Properties.Cold.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Properties.Cold.Average.Mu; |
---|
| 428 | |
---|
| 429 | "Outer Pipe Reynolds Number for Pressure Drop" |
---|
| 430 | Outer.PressureDrop.Re = (Properties.Cold.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Properties.Cold.Average.Mu; |
---|
| 431 | |
---|
| 432 | "Inner Pipe Reynolds Number for Pressure Drop" |
---|
| 433 | Inner.PressureDrop.Re = Inner.HeatTransfer.Re; |
---|
| 434 | |
---|
| 435 | "Inner Pipe Reynolds Number for Heat Transfer" |
---|
| 436 | Inner.HeatTransfer.Re = (Properties.Hot.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Properties.Hot.Average.Mu; |
---|
| 437 | |
---|
| 438 | "Outer Pipe Velocity" |
---|
| 439 | Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Properties.Cold.Average.rho)= Properties.Cold.Inlet.Fw; |
---|
| 440 | |
---|
| 441 | "Inner Pipe Velocity" |
---|
| 442 | Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Properties.Hot.Average.rho) = Properties.Hot.Inlet.Fw; |
---|
| 443 | |
---|
| 444 | end |
---|
| 445 | |
---|
| 446 | "Inner Pipe Resistance" |
---|
| 447 | Resistances.Rtube*(Inner.HeatTransfer.hcoeff*DiInner) = DoInner; |
---|
| 448 | |
---|
| 449 | "Wall Resistance" |
---|
| 450 | Resistances.Rwall*(2*Kwall) = DoInner*ln(DoInner/DiInner); |
---|
| 451 | |
---|
| 452 | "Outer Pipe Resistance" |
---|
| 453 | Resistances.Rshell*(Outer.HeatTransfer.hcoeff)=1; |
---|
| 454 | |
---|
| 455 | "Overall Heat Transfer Coefficient Clean" |
---|
| 456 | Details.Uc*(Resistances.Rtube+Resistances.Rwall+Resistances.Rshell)=1; |
---|
| 457 | |
---|
| 458 | "Overall Heat Transfer Coefficient Dirty" |
---|
| 459 | Details.Ud*(Resistances.Rfi*(DoInner/DiInner) + Resistances.Rfo + Resistances.Rtube + Resistances.Rwall + Resistances.Rshell)=1; |
---|
| 460 | |
---|
| 461 | end |
---|
| 462 | |
---|
| 463 | Model DoublePipe_Basic_NTU as DoublePipe |
---|
| 464 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 465 | # Basic Model Double Pipe Heat Exchanger - NTU Method |
---|
| 466 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 467 | VARIABLES |
---|
| 468 | |
---|
| 469 | Eft as positive (Brief="Effectiveness",Default=0.5,Lower=1e-12); |
---|
| 470 | |
---|
| 471 | EQUATIONS |
---|
| 472 | |
---|
| 473 | "Energy Balance" |
---|
| 474 | Details.Q = Eft*Details.Cmin*(Inlet.Hot.T-Inlet.Cold.T); |
---|
| 475 | |
---|
| 476 | |
---|
| 477 | end |
---|
| 478 | |
---|
| 479 | Model DoublePipe_Basic_LMTD as DoublePipe |
---|
| 480 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 481 | # Basic Model for Double Pipe Heat Exchanger- LMTD Method |
---|
| 482 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 483 | VARIABLES |
---|
| 484 | |
---|
| 485 | DT0 as temp_delta (Brief="Temperature Difference at Inlet",Lower=1); |
---|
| 486 | DTL as temp_delta (Brief="Temperature Difference at Outlet",Lower=1); |
---|
| 487 | LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=1); |
---|
| 488 | |
---|
| 489 | EQUATIONS |
---|
| 490 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 491 | # Log Mean Temperature Difference |
---|
| 492 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 493 | |
---|
| 494 | if abs(DT0 - DTL) > 0.05*max(abs([DT0,DTL])) |
---|
| 495 | |
---|
| 496 | then |
---|
| 497 | "Log Mean Temperature Difference" |
---|
| 498 | LMTD*ln(DT0/DTL) = (DT0-DTL); |
---|
| 499 | |
---|
| 500 | else |
---|
| 501 | |
---|
| 502 | if DT0*DTL equal 0 |
---|
| 503 | |
---|
| 504 | then |
---|
| 505 | "Log Mean Temperature Difference" |
---|
| 506 | LMTD = 0.5*(DT0+DTL); |
---|
| 507 | |
---|
| 508 | else |
---|
| 509 | "Log Mean Temperature Difference" |
---|
| 510 | LMTD = 0.5*(DT0+DTL)*(1-(DT0-DTL)^2/(DT0*DTL)*(1+(DT0-DTL)^2/(DT0*DTL)/2)/12); |
---|
| 511 | |
---|
| 512 | end |
---|
| 513 | |
---|
| 514 | end |
---|
| 515 | |
---|
| 516 | "Exchange Surface Area" |
---|
| 517 | Details.Q = Details.Ud*Pi*DoInner*Lpipe*LMTD; |
---|
| 518 | |
---|
| 519 | end |
---|
| 520 | |
---|
| 521 | Model DoublePipe_LMTD as DoublePipe_Basic_LMTD |
---|
| 522 | |
---|
| 523 | EQUATIONS |
---|
| 524 | |
---|
| 525 | if Side equal 0 |
---|
| 526 | |
---|
| 527 | then |
---|
| 528 | "Temperature Difference at Inlet - Cocurrent Flow" |
---|
| 529 | DT0 = Inlet.Hot.T - Inlet.Cold.T; |
---|
| 530 | |
---|
| 531 | "Temperature Difference at Outlet - Cocurrent Flow" |
---|
| 532 | DTL = Outlet.Hot.T - Outlet.Cold.T; |
---|
| 533 | |
---|
| 534 | else |
---|
| 535 | "Temperature Difference at Inlet - Counter Flow" |
---|
| 536 | DT0 = Inlet.Hot.T - Outlet.Cold.T; |
---|
| 537 | |
---|
| 538 | "Temperature Difference at Outlet - Counter Flow" |
---|
| 539 | DTL = Outlet.Hot.T - Inlet.Cold.T; |
---|
| 540 | end |
---|
| 541 | |
---|
| 542 | end |
---|
| 543 | |
---|
| 544 | Model DoublePipe_NTU as DoublePipe_Basic_NTU |
---|
| 545 | |
---|
| 546 | EQUATIONS |
---|
| 547 | |
---|
| 548 | if Details.Cr equal 0 |
---|
| 549 | |
---|
| 550 | then |
---|
| 551 | "Effectiveness" |
---|
| 552 | Eft = 1-exp(-Details.NTU); |
---|
| 553 | |
---|
| 554 | else |
---|
| 555 | |
---|
| 556 | if Side equal 0 |
---|
| 557 | |
---|
| 558 | then |
---|
| 559 | "Effectiveness in Cocurrent Flow" |
---|
| 560 | Eft*(1+Details.Cr) = (1-exp(-Details.NTU*(1+Details.Cr))); |
---|
| 561 | |
---|
| 562 | else |
---|
| 563 | |
---|
| 564 | if Details.Cr equal 1 |
---|
| 565 | |
---|
| 566 | then |
---|
| 567 | "Effectiveness in Counter Flow" |
---|
| 568 | Eft*(1+Details.NTU) = Details.NTU; |
---|
| 569 | |
---|
| 570 | else |
---|
| 571 | "Effectiveness in Counter Flow" |
---|
| 572 | Eft*(1-Details.Cr*exp(-Details.NTU*(1-Details.Cr))) = (1-exp(-Details.NTU*(1-Details.Cr))); |
---|
| 573 | |
---|
| 574 | end |
---|
| 575 | |
---|
| 576 | end |
---|
| 577 | |
---|
| 578 | |
---|
| 579 | end |
---|
| 580 | |
---|
| 581 | end |
---|
| 582 | |
---|
| 583 | Model Multitubular_Basic |
---|
| 584 | |
---|
| 585 | PARAMETERS |
---|
| 586 | |
---|
| 587 | Npipe as Integer (Brief="N Pipe in Series",Default=2); |
---|
| 588 | ext PP as CalcObject (Brief="External Physical Properties"); |
---|
| 589 | HE as CalcObject (Brief="STHE Calculations",File="heatex"); |
---|
| 590 | Pi as constant (Brief="Pi Number",Default=3.14159265); |
---|
| 591 | Hside as Integer (Brief="Fluid Alocation Flag-Default:Outer",Lower=0,Upper=1); |
---|
| 592 | DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e-6); |
---|
| 593 | DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e-10); |
---|
| 594 | DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e-10); |
---|
| 595 | Lpipe as length (Brief="Effective Tube Length",Lower=0.1); |
---|
| 596 | Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0); |
---|
| 597 | |
---|
| 598 | VARIABLES |
---|
| 599 | |
---|
| 600 | Unity(Npipe) as DoublePipe_Basic; |
---|
| 601 | |
---|
| 602 | SET |
---|
| 603 | Pi = 3.14159265; |
---|
| 604 | Hside = HE.FluidAlocation(); |
---|
| 605 | |
---|
| 606 | #"Inner Pipe Cross Sectional Area for Flow" |
---|
| 607 | Unity.Inner.HeatTransfer.As=Pi*DiInner*DiInner/4; |
---|
| 608 | |
---|
| 609 | #"Outer Pipe Cross Sectional Area for Flow" |
---|
| 610 | Unity.Outer.HeatTransfer.As=Pi*(DiOuter*DiOuter-DoInner*DoInner)/4; |
---|
| 611 | |
---|
| 612 | #"Inner Pipe Hydraulic Diameter for Heat Transfer" |
---|
| 613 | Unity.Inner.HeatTransfer.Dh=DiInner; |
---|
| 614 | |
---|
| 615 | #"Outer Pipe Hydraulic Diameter for Heat Transfer" |
---|
| 616 | Unity.Outer.HeatTransfer.Dh=(DiOuter*DiOuter-DoInner*DoInner)/DoInner; |
---|
| 617 | |
---|
| 618 | #"Inner Pipe Hydraulic Diameter for Pressure Drop" |
---|
| 619 | Unity.Inner.PressureDrop.Dh=DiInner; |
---|
| 620 | |
---|
| 621 | #"Outer Pipe Hydraulic Diameter for Pressure Drop" |
---|
| 622 | Unity.Outer.PressureDrop.Dh=DiOuter-DoInner; |
---|
| 623 | |
---|
| 624 | EQUATIONS |
---|
| 625 | |
---|
| 626 | for i in [1:Npipe] |
---|
| 627 | |
---|
| 628 | "Overall Heat Transfer Coefficient Clean" |
---|
| 629 | Unity(i).Details.Uc*(Unity(i).Resistances.Rtube+Unity(i).Resistances.Rwall+Unity(i).Resistances.Rshell)=1; |
---|
| 630 | |
---|
| 631 | "Overall Heat Transfer Coefficient Dirty" |
---|
| 632 | Unity(i).Details.Ud*(Unity(i).Resistances.Rfi*(DoInner/DiInner) + Unity(i).Resistances.Rfo + Unity(i).Resistances.Rtube + Unity(i).Resistances.Rwall + Unity(i).Resistances.Rshell)=1; |
---|
| 633 | |
---|
| 634 | "Exchange Surface Area" |
---|
| 635 | Unity(i).Details.A=Pi*DoInner*Lpipe; |
---|
| 636 | |
---|
| 637 | if Hside equal 1 |
---|
| 638 | |
---|
| 639 | then |
---|
| 640 | |
---|
| 641 | "Pressure Drop Hot Stream" |
---|
| 642 | Unity(i).Outlet.Hot.P = Unity(i).Inlet.Hot.P - Unity(i).Outer.PressureDrop.Pdrop; |
---|
| 643 | |
---|
| 644 | "Pressure Drop Cold Stream" |
---|
| 645 | Unity(i).Outlet.Cold.P = Unity(i).Inlet.Cold.P - Unity(i).Inner.PressureDrop.Pdrop; |
---|
| 646 | |
---|
| 647 | "Outer Pipe Film Coefficient" |
---|
| 648 | Unity(i).Outer.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Unity(i).Outer.HeatTransfer.Re,Unity(i).Outer.HeatTransfer.PR,Unity(i).Properties.Hot.Average.K,Unity(i).Outer.HeatTransfer.Dh,Lpipe)*Unity(i).Outer.HeatTransfer.Phi; |
---|
| 649 | |
---|
| 650 | "Inner Pipe Film Coefficient" |
---|
| 651 | Unity(i).Inner.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Unity(i).Inner.HeatTransfer.Re,Unity(i).Inner.HeatTransfer.PR,Unity(i).Properties.Cold.Average.K,DiInner,Lpipe)*Unity(i).Inner.HeatTransfer.Phi; |
---|
| 652 | |
---|
| 653 | "Outer Pipe Pressure Drop" |
---|
| 654 | Unity(i).Outer.PressureDrop.Pdrop = (2*Unity(i).Outer.PressureDrop.fi*Lpipe*Unity(i).Properties.Hot.Average.rho*Unity(i).Outer.HeatTransfer.Vmean^2)/(Unity(i).Outer.PressureDrop.Dh*Unity(i).Outer.HeatTransfer.Phi); |
---|
| 655 | |
---|
| 656 | "Inner Pipe Pressure Drop" |
---|
| 657 | Unity(i).Inner.PressureDrop.Pdrop = (2*Unity(i).Inner.PressureDrop.fi*Lpipe*Unity(i).Properties.Cold.Average.rho*Unity(i).Inner.HeatTransfer.Vmean^2)/(DiInner*Unity(i).Inner.HeatTransfer.Phi); |
---|
| 658 | |
---|
| 659 | "Outer Pipe Phi correction" |
---|
| 660 | Unity(i).Outer.HeatTransfer.Phi = HE.PhiCorrection(Unity(i).Properties.Hot.Average.Mu,Unity(i).Properties.Hot.Wall.Mu); |
---|
| 661 | |
---|
| 662 | "Inner Pipe Phi correction" |
---|
| 663 | Unity(i).Inner.HeatTransfer.Phi = HE.PhiCorrection(Unity(i).Properties.Cold.Average.Mu,Unity(i).Properties.Cold.Wall.Mu); |
---|
| 664 | |
---|
| 665 | "Outer Pipe Prandtl Number" |
---|
| 666 | Unity(i).Outer.HeatTransfer.PR = ((Unity(i).Properties.Hot.Average.Cp/Unity(i).Properties.Hot.Average.Mw)*Unity(i).Properties.Hot.Average.Mu)/Unity(i).Properties.Hot.Average.K; |
---|
| 667 | |
---|
| 668 | "Inner Pipe Prandtl Number" |
---|
| 669 | Unity(i).Inner.HeatTransfer.PR = ((Unity(i).Properties.Cold.Average.Cp/Unity(i).Properties.Cold.Average.Mw)*Unity(i).Properties.Cold.Average.Mu)/Unity(i).Properties.Cold.Average.K; |
---|
| 670 | |
---|
| 671 | "Outer Pipe Reynolds Number for Heat Transfer" |
---|
| 672 | Unity(i).Outer.HeatTransfer.Re = (Unity(i).Properties.Hot.Average.rho*Unity(i).Outer.HeatTransfer.Vmean*Unity(i).Outer.HeatTransfer.Dh)/Unity(i).Properties.Hot.Average.Mu; |
---|
| 673 | |
---|
| 674 | "Outer Pipe Reynolds Number for Pressure Drop" |
---|
| 675 | Unity(i).Outer.PressureDrop.Re = (Unity(i).Properties.Hot.Average.rho*Unity(i).Outer.HeatTransfer.Vmean*Unity(i).Outer.PressureDrop.Dh)/Unity(i).Properties.Hot.Average.Mu; |
---|
| 676 | |
---|
| 677 | "Inner Pipe Reynolds Number for Heat Transfer" |
---|
| 678 | Unity(i).Inner.HeatTransfer.Re = (Unity(i).Properties.Cold.Average.rho*Unity(i).Inner.HeatTransfer.Vmean*Unity(i).Inner.HeatTransfer.Dh)/Unity(i).Properties.Cold.Average.Mu; |
---|
| 679 | |
---|
| 680 | "Inner Pipe Reynolds Number for Pressure Drop" |
---|
| 681 | Unity(i).Inner.PressureDrop.Re = Unity(i).Inner.HeatTransfer.Re; |
---|
| 682 | |
---|
| 683 | "Outer Pipe Velocity" |
---|
| 684 | Unity(i).Outer.HeatTransfer.Vmean = Unity(i).Properties.Hot.Inlet.Fw/(Unity(i).Outer.HeatTransfer.As*Unity(i).Properties.Hot.Average.rho); |
---|
| 685 | |
---|
| 686 | "Inner Pipe Velocity" |
---|
| 687 | Unity(i).Inner.HeatTransfer.Vmean = Unity(i).Properties.Cold.Inlet.Fw/(Unity(i).Inner.HeatTransfer.As*Unity(i).Properties.Cold.Average.rho); |
---|
| 688 | |
---|
| 689 | else |
---|
| 690 | |
---|
| 691 | "Pressure Drop Hot Stream" |
---|
| 692 | Unity(i).Outlet.Hot.P = Unity(i).Inlet.Hot.P - Unity(i).Inner.PressureDrop.Pdrop; |
---|
| 693 | |
---|
| 694 | "Pressure Drop Cold Stream" |
---|
| 695 | Unity(i).Outlet.Cold.P = Unity(i).Inlet.Cold.P - Unity(i).Outer.PressureDrop.Pdrop; |
---|
| 696 | |
---|
| 697 | "Inner Pipe Film Coefficient" |
---|
| 698 | Unity(i).Inner.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Unity(i).Inner.HeatTransfer.Re,Unity(i).Inner.HeatTransfer.PR,Unity(i).Properties.Hot.Average.K,DiInner,Lpipe)*Unity(i).Inner.HeatTransfer.Phi; |
---|
| 699 | |
---|
| 700 | "Outer Pipe Film Coefficient" |
---|
| 701 | Unity(i).Outer.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Unity(i).Outer.HeatTransfer.Re,Unity(i).Outer.HeatTransfer.PR,Unity(i).Properties.Cold.Average.K,Unity(i).Outer.HeatTransfer.Dh,Lpipe)*Unity(i).Outer.HeatTransfer.Phi; |
---|
| 702 | |
---|
| 703 | "Outer Pipe Pressure Drop" |
---|
| 704 | Unity(i).Outer.PressureDrop.Pdrop = (2*Unity(i).Outer.PressureDrop.fi*Lpipe*Unity(i).Properties.Cold.Average.rho*Unity(i).Outer.HeatTransfer.Vmean^2)/(Unity(i).Outer.PressureDrop.Dh*Unity(i).Outer.HeatTransfer.Phi); |
---|
| 705 | |
---|
| 706 | "Inner Pipe Pressure Drop" |
---|
| 707 | Unity(i).Inner.PressureDrop.Pdrop = (2*Unity(i).Inner.PressureDrop.fi*Lpipe*Unity(i).Properties.Hot.Average.rho*Unity(i).Inner.HeatTransfer.Vmean^2)/(DiInner*Unity(i).Inner.HeatTransfer.Phi); |
---|
| 708 | |
---|
| 709 | "Outer Pipe Phi correction" |
---|
| 710 | Unity(i).Outer.HeatTransfer.Phi = HE.PhiCorrection(Unity(i).Properties.Cold.Average.Mu,Unity(i).Properties.Cold.Wall.Mu); |
---|
| 711 | |
---|
| 712 | "Inner Pipe Phi correction" |
---|
| 713 | Unity(i).Inner.HeatTransfer.Phi = HE.PhiCorrection(Unity(i).Properties.Hot.Average.Mu,Unity(i).Properties.Hot.Wall.Mu); |
---|
| 714 | |
---|
| 715 | "Outer Pipe Prandtl Number" |
---|
| 716 | Unity(i).Outer.HeatTransfer.PR = ((Unity(i).Properties.Cold.Average.Cp/Unity(i).Properties.Cold.Average.Mw)*Unity(i).Properties.Cold.Average.Mu)/Unity(i).Properties.Cold.Average.K; |
---|
| 717 | |
---|
| 718 | "Inner Pipe Prandtl Number" |
---|
| 719 | Unity(i).Inner.HeatTransfer.PR = ((Unity(i).Properties.Hot.Average.Cp/Unity(i).Properties.Hot.Average.Mw)*Unity(i).Properties.Hot.Average.Mu)/Unity(i).Properties.Hot.Average.K; |
---|
| 720 | |
---|
| 721 | "Outer Pipe Reynolds Number for Heat Transfer" |
---|
| 722 | Unity(i).Outer.HeatTransfer.Re = (Unity(i).Properties.Cold.Average.rho*Unity(i).Outer.HeatTransfer.Vmean*Unity(i).Outer.HeatTransfer.Dh)/Unity(i).Properties.Cold.Average.Mu; |
---|
| 723 | |
---|
| 724 | "Outer Pipe Reynolds Number for Pressure Drop" |
---|
| 725 | Unity(i).Outer.PressureDrop.Re = (Unity(i).Properties.Cold.Average.rho*Unity(i).Outer.HeatTransfer.Vmean*Unity(i).Outer.PressureDrop.Dh)/Unity(i).Properties.Cold.Average.Mu; |
---|
| 726 | |
---|
| 727 | "Inner Pipe Reynolds Number for Pressure Drop" |
---|
| 728 | Unity(i).Inner.PressureDrop.Re = Unity(i).Inner.HeatTransfer.Re; |
---|
| 729 | |
---|
| 730 | "Inner Pipe Reynolds Number for Heat Transfer" |
---|
| 731 | Unity(i).Inner.HeatTransfer.Re = (Unity(i).Properties.Hot.Average.rho*Unity(i).Inner.HeatTransfer.Vmean*Unity(i).Inner.HeatTransfer.Dh)/Unity(i).Properties.Hot.Average.Mu; |
---|
| 732 | |
---|
| 733 | "Outer Pipe Velocity" |
---|
| 734 | Unity(i).Outer.HeatTransfer.Vmean = Unity(i).Properties.Cold.Inlet.Fw/(Unity(i).Outer.HeatTransfer.As*Unity(i).Properties.Cold.Average.rho); |
---|
| 735 | |
---|
| 736 | "Inner Pipe Velocity" |
---|
| 737 | Unity(i).Inner.HeatTransfer.Vmean = Unity(i).Properties.Hot.Inlet.Fw/(Unity(i).Inner.HeatTransfer.As*Unity(i).Properties.Hot.Average.rho); |
---|
| 738 | |
---|
| 739 | end |
---|
| 740 | |
---|
| 741 | "Inner Pipe Resistance" |
---|
[110] | 742 | Unity(i).Resistances.Rtube*(Unity(i).Inner.HeatTransfer.hcoeff*DiInner) = DoInner; |
---|
[105] | 743 | |
---|
| 744 | "Wall Resistance" |
---|
| 745 | Unity(i).Resistances.Rwall=DoInner*ln(DoInner/DiInner)/(2*Kwall); |
---|
| 746 | |
---|
| 747 | "Outer Pipe Resistance" |
---|
| 748 | Unity(i).Resistances.Rshell*(Unity(i).Outer.HeatTransfer.hcoeff)=1; |
---|
| 749 | |
---|
| 750 | end |
---|
| 751 | |
---|
| 752 | |
---|
| 753 | end |
---|
| 754 | |
---|
| 755 | Model Multitubular_Basic_LMTD as Multitubular_Basic |
---|
| 756 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 757 | # Basic Model for Double Pipe Heat Exchanger- LMTD Method |
---|
| 758 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 759 | VARIABLES |
---|
| 760 | |
---|
| 761 | DT0(Npipe) as temp_delta (Brief="Temperature Difference at Inlet",Lower=1); |
---|
| 762 | DTL(Npipe) as temp_delta (Brief="Temperature Difference at Outlet",Lower=1); |
---|
| 763 | LMTD(Npipe) as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=1); |
---|
| 764 | |
---|
| 765 | EQUATIONS |
---|
| 766 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 767 | # Log Mean Temperature Difference |
---|
| 768 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 769 | for i in [1:Npipe] |
---|
| 770 | |
---|
| 771 | if abs(DT0(i) - DTL(i)) > 0.05*max(abs([DT0(i),DTL(i)])) |
---|
| 772 | |
---|
| 773 | then |
---|
| 774 | "Log Mean Temperature Difference" |
---|
| 775 | LMTD(i)= (DT0(i)-DTL(i))/ln(DT0(i)/DTL(i)); |
---|
| 776 | |
---|
| 777 | else |
---|
| 778 | |
---|
| 779 | if DT0(i)*DTL(i) equal 0 |
---|
| 780 | |
---|
| 781 | then |
---|
| 782 | "Log Mean Temperature Difference" |
---|
| 783 | LMTD(i) = 0.5*(DT0(i)+DTL(i)); |
---|
| 784 | |
---|
| 785 | else |
---|
| 786 | "Log Mean Temperature Difference" |
---|
| 787 | LMTD(i) = 0.5*(DT0(i)+DTL(i))*(1-(DT0(i)-DTL(i))^2/(DT0(i)*DTL(i))*(1+(DT0(i)-DTL(i))^2/(DT0(i)*DTL(i))/2)/12); |
---|
| 788 | |
---|
| 789 | end |
---|
| 790 | |
---|
| 791 | end |
---|
| 792 | |
---|
| 793 | "Exchange Surface Area" |
---|
| 794 | Unity(i).Details.Q = Unity(i).Details.Ud*Unity(i).Details.A*LMTD(i); |
---|
| 795 | |
---|
| 796 | end |
---|
| 797 | |
---|
| 798 | end |
---|
| 799 | |
---|
| 800 | Model Multitubular_Counter_NTU as Multitubular_Basic |
---|
| 801 | |
---|
| 802 | VARIABLES |
---|
| 803 | |
---|
| 804 | Eft(Npipe) as positive (Brief="Effectiveness",Default=0.05,Lower=1e-8); |
---|
| 805 | |
---|
| 806 | CONNECTIONS |
---|
| 807 | |
---|
| 808 | Unity([1:Npipe-1]).Outlet.Hot to Unity([2:Npipe]).Inlet.Hot; |
---|
| 809 | Unity([2:Npipe]).Outlet.Cold to Unity([1:Npipe-1]).Inlet.Cold; |
---|
| 810 | |
---|
| 811 | EQUATIONS |
---|
| 812 | |
---|
| 813 | for i in [1:Npipe] |
---|
| 814 | |
---|
| 815 | if Unity(i).Details.Cr equal 0 |
---|
| 816 | |
---|
| 817 | then |
---|
| 818 | "Effectiveness" |
---|
| 819 | Eft(i) = 1-exp(-Unity(i).Details.NTU); |
---|
| 820 | |
---|
| 821 | else |
---|
| 822 | |
---|
| 823 | if Unity(i).Details.Cr equal 1 |
---|
| 824 | |
---|
| 825 | then |
---|
| 826 | "Effectiveness in Counter Flow" |
---|
| 827 | Eft(i) = Unity(i).Details.NTU/(1+Unity(i).Details.NTU); |
---|
| 828 | |
---|
| 829 | else |
---|
| 830 | "Effectiveness in Counter Flow" |
---|
| 831 | Eft(i)*(1-Unity(i).Details.Cr*exp(-Unity(i).Details.NTU*(1-Unity(i).Details.Cr))) = (1-exp(-Unity(i).Details.NTU*(1-Unity(i).Details.Cr))); |
---|
| 832 | |
---|
| 833 | end |
---|
| 834 | |
---|
| 835 | |
---|
| 836 | end |
---|
| 837 | |
---|
| 838 | "Energy Balance" |
---|
| 839 | Unity(i).Details.Q = Eft(i)*Unity(i).Details.Cmin*(Unity(i).Inlet.Hot.T-Unity(i).Inlet.Cold.T); |
---|
| 840 | |
---|
| 841 | end |
---|
| 842 | |
---|
| 843 | end |
---|
| 844 | |
---|
| 845 | Model Multitubular_Cocurrent_NTU as Multitubular_Basic |
---|
| 846 | |
---|
| 847 | VARIABLES |
---|
| 848 | |
---|
| 849 | Eft(Npipe) as positive (Brief="Effectiveness",Default=0.05,Lower=1e-8); |
---|
| 850 | |
---|
| 851 | CONNECTIONS |
---|
| 852 | |
---|
| 853 | Unity([1:Npipe-1]).Outlet.Hot to Unity([2:Npipe]).Inlet.Hot; |
---|
| 854 | Unity([1:Npipe-1]).Outlet.Cold to Unity([2:Npipe]).Inlet.Cold; |
---|
| 855 | |
---|
| 856 | EQUATIONS |
---|
| 857 | |
---|
| 858 | for i in [1:Npipe] |
---|
| 859 | |
---|
| 860 | if Unity(i).Details.Cr equal 0 |
---|
| 861 | |
---|
| 862 | then |
---|
| 863 | "Effectiveness" |
---|
| 864 | Eft(i) = 1-exp(-Unity(i).Details.NTU); |
---|
| 865 | |
---|
| 866 | else |
---|
| 867 | "Effectiveness in Cocurrent Flow" |
---|
| 868 | Eft(i) = (1-exp(-Unity(i).Details.NTU*(1+Unity(i).Details.Cr)))/(1+Unity(i).Details.Cr); |
---|
| 869 | |
---|
| 870 | end |
---|
| 871 | |
---|
| 872 | "Energy Balance" |
---|
| 873 | Unity(i).Details.Q = Eft(i)*Unity(i).Details.Cmin*(Unity(i).Inlet.Hot.T-Unity(i).Inlet.Cold.T); |
---|
| 874 | |
---|
| 875 | end |
---|
| 876 | |
---|
| 877 | end |
---|
| 878 | |
---|
| 879 | Model Multitubular_Counter_LMTD as Multitubular_Basic_LMTD |
---|
| 880 | |
---|
| 881 | CONNECTIONS |
---|
| 882 | |
---|
| 883 | Unity([1:Npipe-1]).Outlet.Hot to Unity([2:Npipe]).Inlet.Hot; |
---|
| 884 | Unity([2:Npipe]).Outlet.Cold to Unity([1:Npipe-1]).Inlet.Cold; |
---|
| 885 | |
---|
| 886 | EQUATIONS |
---|
| 887 | for i in [1:Npipe] |
---|
| 888 | |
---|
| 889 | "Temperature Difference at Inlet - Counter Flow" |
---|
| 890 | DT0(i) = Unity(i).Inlet.Hot.T - Unity(i).Outlet.Cold.T; |
---|
| 891 | |
---|
| 892 | "Temperature Difference at Outlet - Counter Flow" |
---|
| 893 | DTL(i) = Unity(i).Outlet.Hot.T - Unity(i).Inlet.Cold.T; |
---|
| 894 | |
---|
| 895 | end |
---|
| 896 | |
---|
| 897 | end |
---|
| 898 | |
---|
| 899 | Model Multitubular_Cocurrent_LMTD as Multitubular_Basic_LMTD |
---|
| 900 | |
---|
| 901 | CONNECTIONS |
---|
| 902 | |
---|
| 903 | Unity([1:Npipe-1]).Outlet.Hot to Unity([2:Npipe]).Inlet.Hot; |
---|
| 904 | Unity([1:Npipe-1]).Outlet.Cold to Unity([2:Npipe]).Inlet.Cold; |
---|
| 905 | |
---|
| 906 | EQUATIONS |
---|
| 907 | |
---|
| 908 | for i in [1:Npipe] |
---|
| 909 | |
---|
| 910 | "Temperature Difference at Inlet - Cocurrent Flow" |
---|
| 911 | DT0(i) = Unity(i).Inlet.Hot.T - Unity(i).Inlet.Cold.T; |
---|
| 912 | |
---|
| 913 | "Temperature Difference at Outlet - Cocurrent Flow" |
---|
| 914 | DTL(i) = Unity(i).Outlet.Hot.T - Unity(i).Outlet.Cold.T; |
---|
| 915 | |
---|
| 916 | end |
---|
| 917 | |
---|
| 918 | end |
---|