[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 | *-------------------------------------------------------------------- |
---|
| 16 | * Author: Gerson Balbueno Bicca |
---|
| 17 | * $Id: HeatExchangerSimplified.mso 144 2007-01-30 18:01:53Z bicca $ |
---|
| 18 | *--------------------------------------------------------------------*# |
---|
| 19 | |
---|
[1] | 20 | using "HEX_Engine"; |
---|
[139] | 21 | |
---|
[1] | 22 | Model HeatExchangerSimplified_Basic |
---|
[139] | 23 | |
---|
| 24 | ATTRIBUTES |
---|
| 25 | Pallete = false; |
---|
| 26 | Brief = "Basic Models for Simplified Heat Exchangers"; |
---|
| 27 | Info = |
---|
| 28 | "write some information"; |
---|
| 29 | |
---|
[1] | 30 | PARAMETERS |
---|
[139] | 31 | outer PP as Plugin (Brief="External Physical Properties"); |
---|
| 32 | HE as Plugin (Brief="STHE Calculations",File="heatex"); |
---|
| 33 | outer NComp as Integer (Brief="Number of Components"); |
---|
| 34 | M(NComp) as molweight (Brief="Component Mol Weight"); |
---|
[1] | 35 | |
---|
| 36 | VARIABLES |
---|
| 37 | |
---|
[139] | 38 | in Inlet as Inlet_Main_Stream (Brief="Hot and Cold Inlets"); |
---|
| 39 | out Outlet as Outlet_Main_Stream (Brief="Hot and Cold Outlets"); |
---|
| 40 | Properties as Main_Properties (Brief="Hot and Cold Properties"); |
---|
| 41 | Details as Details_Main (Brief="Heat Exchanger Details"); |
---|
| 42 | PressureDrop as Main_Pdrop (Brief="Heat Exchanger Pressure Drop"); |
---|
[1] | 43 | |
---|
| 44 | SET |
---|
| 45 | |
---|
| 46 | M = PP.MolecularWeight(); |
---|
| 47 | |
---|
| 48 | EQUATIONS |
---|
| 49 | |
---|
| 50 | "Hot Stream Average Temperature" |
---|
| 51 | Properties.Hot.Average.T = 0.5*Inlet.Hot.T + 0.5*Outlet.Hot.T; |
---|
| 52 | |
---|
| 53 | "Cold Stream Average Temperature" |
---|
| 54 | Properties.Cold.Average.T = 0.5*Inlet.Cold.T + 0.5*Outlet.Cold.T; |
---|
| 55 | |
---|
| 56 | "Hot Stream Average Pressure" |
---|
| 57 | Properties.Hot.Average.P = 0.5*Inlet.Hot.P+0.5*Outlet.Hot.P; |
---|
| 58 | |
---|
| 59 | "Cold Stream Average Pressure" |
---|
| 60 | Properties.Cold.Average.P = 0.5*Inlet.Cold.P+0.5*Outlet.Cold.P; |
---|
| 61 | |
---|
| 62 | "Cold Stream Wall Temperature" |
---|
| 63 | Properties.Cold.Wall.Twall = 0.5*Properties.Hot.Average.T + 0.5*Properties.Cold.Average.T; |
---|
| 64 | |
---|
| 65 | "Hot Stream Wall Temperature" |
---|
| 66 | Properties.Hot.Wall.Twall = 0.5*Properties.Hot.Average.T + 0.5*Properties.Cold.Average.T; |
---|
| 67 | |
---|
| 68 | "Hot Stream Average Molecular Weight" |
---|
| 69 | Properties.Hot.Average.Mw = sum(M*Inlet.Hot.z); |
---|
| 70 | |
---|
| 71 | "Cold Stream Average Molecular Weight" |
---|
| 72 | Properties.Cold.Average.Mw = sum(M*Inlet.Cold.z); |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | if Inlet.Cold.v equal 0 |
---|
[68] | 76 | |
---|
[1] | 77 | then |
---|
[68] | 78 | |
---|
| 79 | "Cold Stream Average Heat Capacity" |
---|
| 80 | Properties.Cold.Average.Cp = PP.LiquidCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
[1] | 81 | |
---|
[68] | 82 | "Cold Stream Inlet Heat Capacity" |
---|
| 83 | Properties.Cold.Inlet.Cp = PP.LiquidCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
[1] | 84 | |
---|
[68] | 85 | "Cold Stream Outlet Heat Capacity" |
---|
| 86 | Properties.Cold.Outlet.Cp = PP.LiquidCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
[1] | 87 | |
---|
[68] | 88 | "Cold Stream Average Mass Density" |
---|
| 89 | Properties.Cold.Average.rho = PP.LiquidDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
[1] | 90 | |
---|
[68] | 91 | "Cold Stream Inlet Mass Density" |
---|
| 92 | Properties.Cold.Inlet.rho = PP.LiquidDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 93 | |
---|
| 94 | "Cold Stream Outlet Mass Density" |
---|
| 95 | Properties.Cold.Outlet.rho = PP.LiquidDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 96 | |
---|
| 97 | "Cold Stream Average Viscosity" |
---|
| 98 | Properties.Cold.Average.Mu = PP.LiquidViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 99 | |
---|
| 100 | "Cold Stream inlet Viscosity" |
---|
| 101 | Properties.Cold.Inlet.Mu = PP.LiquidViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
[1] | 102 | |
---|
[68] | 103 | "Cold Stream Outlet Viscosity" |
---|
| 104 | Properties.Cold.Outlet.Mu = PP.LiquidViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
[1] | 105 | |
---|
[68] | 106 | "Cold Stream Average Conductivity" |
---|
| 107 | Properties.Cold.Average.K = PP.LiquidThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
[1] | 108 | |
---|
[68] | 109 | "Cold Stream Inlet Conductivity" |
---|
| 110 | Properties.Cold.Inlet.K = PP.LiquidThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
[1] | 111 | |
---|
[68] | 112 | "Cold Stream Outlet Conductivity" |
---|
| 113 | Properties.Cold.Outlet.K = PP.LiquidThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 114 | |
---|
| 115 | "Cold Stream Heat Capacity at Wall Temperature" |
---|
| 116 | Properties.Cold.Wall.Cp = PP.LiquidCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 117 | |
---|
| 118 | "Cold Stream Viscosity at Wall Temperature" |
---|
| 119 | Properties.Cold.Wall.Mu = PP.LiquidViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 120 | |
---|
| 121 | "Cold Stream Conductivity at Wall Temperature" |
---|
| 122 | Properties.Cold.Wall.K = PP.LiquidThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 123 | |
---|
| 124 | |
---|
[1] | 125 | else |
---|
| 126 | |
---|
[68] | 127 | "Cold Stream Average Heat Capacity" |
---|
[1] | 128 | Properties.Cold.Average.Cp = PP.VapourCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
[68] | 129 | |
---|
| 130 | "Cold Stream Inlet Heat Capacity" |
---|
[1] | 131 | Properties.Cold.Inlet.Cp = PP.VapourCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
[68] | 132 | |
---|
| 133 | "Cold Stream Outlet Heat Capacity" |
---|
[1] | 134 | Properties.Cold.Outlet.Cp = PP.VapourCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 135 | |
---|
[68] | 136 | "Cold Stream Average Mass Density" |
---|
| 137 | Properties.Cold.Average.rho = PP.VapourDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
[1] | 138 | |
---|
[68] | 139 | "Cold Stream Inlet Mass Density" |
---|
| 140 | Properties.Cold.Inlet.rho = PP.VapourDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
[1] | 141 | |
---|
[68] | 142 | "Cold Stream Outlet Mass Density" |
---|
| 143 | Properties.Cold.Outlet.rho = PP.VapourDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 144 | |
---|
| 145 | "Cold Stream Average Viscosity " |
---|
| 146 | Properties.Cold.Average.Mu = PP.VapourViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 147 | |
---|
| 148 | "Cold Stream Inlet Viscosity " |
---|
| 149 | Properties.Cold.Inlet.Mu = PP.VapourViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 150 | |
---|
| 151 | "Cold Stream Outlet Viscosity " |
---|
| 152 | Properties.Cold.Outlet.Mu = PP.VapourViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
| 153 | |
---|
| 154 | "Cold Stream Average Conductivity " |
---|
| 155 | Properties.Cold.Average.K = PP.VapourThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
| 156 | |
---|
| 157 | "Cold Stream Inlet Conductivity " |
---|
| 158 | Properties.Cold.Inlet.K = PP.VapourThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); |
---|
| 159 | |
---|
| 160 | "Cold Stream Outlet Conductivity " |
---|
| 161 | Properties.Cold.Outlet.K = PP.VapourThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); |
---|
[1] | 162 | |
---|
[68] | 163 | "Cold Stream Heat Capacity at Wall Temperature" |
---|
| 164 | Properties.Cold.Wall.Cp = PP.VapourCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
[1] | 165 | |
---|
| 166 | |
---|
[68] | 167 | "Cold Stream Viscosity at Wall Temperature" |
---|
| 168 | Properties.Cold.Wall.Mu = PP.VapourViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
[1] | 169 | |
---|
[68] | 170 | "Cold Stream Conductivity at Wall Temperature" |
---|
| 171 | Properties.Cold.Wall.K = PP.VapourThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); |
---|
[1] | 172 | |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | end |
---|
| 176 | |
---|
| 177 | if Inlet.Hot.v equal 0 |
---|
| 178 | |
---|
| 179 | then |
---|
| 180 | |
---|
[68] | 181 | "Hot Stream Average Heat Capacity" |
---|
[1] | 182 | Properties.Hot.Average.Cp = PP.LiquidCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[68] | 183 | |
---|
| 184 | "Hot Stream Inlet Heat Capacity" |
---|
[1] | 185 | Properties.Hot.Inlet.Cp = PP.LiquidCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
[68] | 186 | |
---|
| 187 | "Hot Stream Outlet Heat Capacity" |
---|
[1] | 188 | Properties.Hot.Outlet.Cp = PP.LiquidCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 189 | |
---|
[68] | 190 | "Hot Stream Average Mass Density" |
---|
[1] | 191 | Properties.Hot.Average.rho = PP.LiquidDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[68] | 192 | |
---|
| 193 | "Hot Stream Inlet Mass Density" |
---|
[1] | 194 | Properties.Hot.Inlet.rho = PP.LiquidDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
[68] | 195 | |
---|
| 196 | "Hot Stream Outlet Mass Density" |
---|
[1] | 197 | Properties.Hot.Outlet.rho = PP.LiquidDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 198 | |
---|
[68] | 199 | "Hot Stream Average Viscosity" |
---|
[1] | 200 | Properties.Hot.Average.Mu = PP.LiquidViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[68] | 201 | |
---|
| 202 | "Hot Stream Inlet Viscosity" |
---|
[1] | 203 | Properties.Hot.Inlet.Mu = PP.LiquidViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
[68] | 204 | |
---|
| 205 | "Hot Stream Outlet Viscosity" |
---|
[1] | 206 | Properties.Hot.Outlet.Mu = PP.LiquidViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 207 | |
---|
[68] | 208 | "Hot Stream Average Conductivity" |
---|
[1] | 209 | Properties.Hot.Average.K = PP.LiquidThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[68] | 210 | |
---|
| 211 | "Hot Stream Inlet Conductivity" |
---|
[45] | 212 | Properties.Hot.Inlet.K = PP.LiquidThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
[68] | 213 | |
---|
| 214 | "Hot Stream Outlet Conductivity" |
---|
[1] | 215 | Properties.Hot.Outlet.K = PP.LiquidThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 216 | |
---|
[68] | 217 | "Hot Stream Heat Capacity at Wall Temperature" |
---|
[45] | 218 | Properties.Hot.Wall.Cp = PP.LiquidCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[1] | 219 | |
---|
[68] | 220 | "Hot Stream Viscosity at Wall Temperature" |
---|
[45] | 221 | Properties.Hot.Wall.Mu = PP.LiquidViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[1] | 222 | |
---|
[68] | 223 | "Hot Stream Conductivity at Wall Temperature" |
---|
[45] | 224 | Properties.Hot.Wall.K = PP.LiquidThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[1] | 225 | |
---|
| 226 | |
---|
| 227 | else |
---|
| 228 | |
---|
[68] | 229 | "Hot Stream Average Heat Capacity" |
---|
[1] | 230 | Properties.Hot.Average.Cp = PP.VapourCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[68] | 231 | |
---|
| 232 | "Hot Stream Inlet Heat Capacity" |
---|
[1] | 233 | Properties.Hot.Inlet.Cp = PP.VapourCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
[68] | 234 | |
---|
| 235 | "Hot Stream Outlet Heat Capacity" |
---|
[1] | 236 | Properties.Hot.Outlet.Cp = PP.VapourCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 237 | |
---|
[68] | 238 | "Hot Stream Average Mass Density" |
---|
[1] | 239 | Properties.Hot.Average.rho = PP.VapourDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[68] | 240 | |
---|
| 241 | "Hot Stream Inlet Mass Density" |
---|
[1] | 242 | Properties.Hot.Inlet.rho = PP.VapourDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
[68] | 243 | |
---|
| 244 | "Hot Stream Outlet Mass Density" |
---|
[1] | 245 | Properties.Hot.Outlet.rho = PP.VapourDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 246 | |
---|
[68] | 247 | "Hot Stream Average Viscosity" |
---|
[1] | 248 | Properties.Hot.Average.Mu = PP.VapourViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[68] | 249 | |
---|
| 250 | "Hot Stream Inlet Viscosity" |
---|
[1] | 251 | Properties.Hot.Inlet.Mu = PP.VapourViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
[68] | 252 | |
---|
| 253 | "Hot Stream Outlet Viscosity" |
---|
[1] | 254 | Properties.Hot.Outlet.Mu = PP.VapourViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 255 | |
---|
[68] | 256 | "Hot Stream Average Conductivity" |
---|
[1] | 257 | Properties.Hot.Average.K = PP.VapourThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[68] | 258 | |
---|
| 259 | "Hot Stream Inlet Conductivity" |
---|
[45] | 260 | Properties.Hot.Inlet.K = PP.VapourThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); |
---|
[68] | 261 | |
---|
| 262 | "Hot Stream Outlet Conductivity" |
---|
[1] | 263 | Properties.Hot.Outlet.K = PP.VapourThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); |
---|
| 264 | |
---|
[68] | 265 | "Hot Stream Heat Capacity at Wall Temperature" |
---|
[45] | 266 | Properties.Hot.Wall.Cp = PP.VapourCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[1] | 267 | |
---|
[68] | 268 | "Hot Stream Viscosity at Wall Temperature" |
---|
[45] | 269 | Properties.Hot.Wall.Mu = PP.VapourViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[1] | 270 | |
---|
[68] | 271 | "Hot Stream Conductivity at Wall Temperature" |
---|
[45] | 272 | Properties.Hot.Wall.K = PP.VapourThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); |
---|
[1] | 273 | |
---|
| 274 | |
---|
| 275 | end |
---|
| 276 | |
---|
[68] | 277 | |
---|
[1] | 278 | #===================================================================== |
---|
| 279 | # Thermal Details |
---|
| 280 | #===================================================================== |
---|
| 281 | "Hot Stream Heat Capacity" |
---|
| 282 | Details.Ch =Inlet.Hot.F*Properties.Hot.Average.Cp; |
---|
| 283 | |
---|
| 284 | "Cold Stream Heat Capacity" |
---|
| 285 | Details.Cc =Inlet.Cold.F*Properties.Cold.Average.Cp; |
---|
| 286 | |
---|
[45] | 287 | "Minimum Heat Capacity" |
---|
| 288 | Details.Cmin = min([Details.Ch,Details.Cc]); |
---|
| 289 | |
---|
| 290 | "Maximum Heat Capacity" |
---|
| 291 | Details.Cmax = max([Details.Ch,Details.Cc]); |
---|
| 292 | |
---|
| 293 | "Heat Capacity Ratio" |
---|
| 294 | Details.Cr = Details.Cmin/Details.Cmax; |
---|
[1] | 295 | #===================================================================== |
---|
| 296 | # Energy Balance |
---|
| 297 | #===================================================================== |
---|
| 298 | "Energy Balance Hot Stream" |
---|
| 299 | Details.Q = Inlet.Hot.F*(Inlet.Hot.h-Outlet.Hot.h); |
---|
| 300 | |
---|
| 301 | "Energy Balance Cold Stream" |
---|
| 302 | Details.Q =-Inlet.Cold.F*(Inlet.Cold.h-Outlet.Cold.h); |
---|
| 303 | |
---|
| 304 | #===================================================================== |
---|
| 305 | # Material Balance |
---|
| 306 | #===================================================================== |
---|
| 307 | "Flow Mass Inlet Cold Stream" |
---|
| 308 | Properties.Cold.Inlet.Fw = sum(M*Inlet.Cold.z)*Inlet.Cold.F; |
---|
| 309 | |
---|
| 310 | "Flow Mass Outlet Cold Stream" |
---|
| 311 | Properties.Cold.Outlet.Fw = sum(M*Outlet.Cold.z)*Outlet.Cold.F; |
---|
| 312 | |
---|
| 313 | "Flow Mass Inlet Hot Stream" |
---|
| 314 | Properties.Hot.Inlet.Fw = sum(M*Inlet.Hot.z)*Inlet.Hot.F; |
---|
| 315 | |
---|
| 316 | "Flow Mass Outlet Hot Stream" |
---|
| 317 | Properties.Hot.Outlet.Fw = sum(M*Outlet.Hot.z)*Outlet.Hot.F; |
---|
| 318 | |
---|
| 319 | "Molar Balance Hot Stream" |
---|
| 320 | Inlet.Hot.F = Outlet.Hot.F; |
---|
| 321 | |
---|
| 322 | "Molar Balance Cold Stream" |
---|
| 323 | Inlet.Cold.F = Outlet.Cold.F; |
---|
| 324 | |
---|
| 325 | #====================================== |
---|
| 326 | # Constraints |
---|
| 327 | #====================================== |
---|
| 328 | "Hot Stream Molar Fraction Constraint" |
---|
| 329 | Outlet.Hot.z=Inlet.Hot.z; |
---|
| 330 | |
---|
| 331 | "Cold Stream Molar Fraction Constraint" |
---|
| 332 | Outlet.Cold.z=Inlet.Cold.z; |
---|
| 333 | |
---|
[143] | 334 | #"No Phase Change In Cold Stream" |
---|
| 335 | # Inlet.Cold.v=Outlet.Cold.v; |
---|
[1] | 336 | |
---|
[143] | 337 | #"No Phase Change In Hot Stream" |
---|
| 338 | # Inlet.Hot.v=Outlet.Hot.v; |
---|
[1] | 339 | |
---|
| 340 | #====================================== |
---|
| 341 | # Pressure Drop |
---|
| 342 | #====================================== |
---|
| 343 | |
---|
| 344 | "Pressure Drop Hot Stream" |
---|
| 345 | Outlet.Hot.P = Inlet.Hot.P - PressureDrop.Hot.Pdrop; |
---|
| 346 | |
---|
| 347 | "Pressure Drop Cold Stream" |
---|
| 348 | Outlet.Cold.P = Inlet.Cold.P - PressureDrop.Cold.Pdrop; |
---|
| 349 | |
---|
| 350 | "Fraction of Inlet Pressure : Hot Stream" |
---|
| 351 | PressureDrop.Hot.Pdrop = Inlet.Hot.P*PressureDrop.Hot.FPdrop; |
---|
| 352 | |
---|
| 353 | "Fraction of Inlet Pressure : Cold Stream" |
---|
| 354 | PressureDrop.Cold.Pdrop = Inlet.Cold.P*PressureDrop.Cold.FPdrop; |
---|
| 355 | |
---|
| 356 | end |
---|
| 357 | |
---|
| 358 | Model Heatex_Basic_NTU as HeatExchangerSimplified_Basic |
---|
[139] | 359 | |
---|
| 360 | ATTRIBUTES |
---|
| 361 | Pallete = false; |
---|
| 362 | Brief = "Basic Model for Heat Exchangers - NTU Method"; |
---|
| 363 | Info = |
---|
| 364 | "write some information"; |
---|
| 365 | |
---|
[1] | 366 | VARIABLES |
---|
| 367 | |
---|
| 368 | Eft as positive (Brief="Effectiveness",Default=0.05,Lower=1e-8); |
---|
| 369 | |
---|
| 370 | EQUATIONS |
---|
| 371 | |
---|
| 372 | "Energy Balance" |
---|
| 373 | Details.Q = Eft*Details.Cmin*(Inlet.Hot.T-Inlet.Cold.T); |
---|
| 374 | |
---|
| 375 | |
---|
| 376 | end |
---|
| 377 | |
---|
| 378 | Model Heatex_Basic_LMTD as HeatExchangerSimplified_Basic |
---|
[139] | 379 | |
---|
| 380 | ATTRIBUTES |
---|
| 381 | Pallete = false; |
---|
| 382 | Brief = "Basic Model for Heat Exchangers - LMTD Method"; |
---|
| 383 | Info = |
---|
| 384 | "write some information"; |
---|
| 385 | |
---|
[1] | 386 | VARIABLES |
---|
| 387 | |
---|
[139] | 388 | DT0 as temp_delta (Brief="Temperature Difference at Inlet",Lower=1); |
---|
[45] | 389 | DTL as temp_delta (Brief="Temperature Difference at Outlet",Lower=1); |
---|
[139] | 390 | LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=1); |
---|
| 391 | Fc as positive (Brief="LMTD Correction Factor",Lower=0.5); |
---|
[45] | 392 | MTD as temp_delta (Brief="Mean Temperature Difference",Lower=1); |
---|
[1] | 393 | |
---|
| 394 | EQUATIONS |
---|
[45] | 395 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 396 | # Log Mean Temperature Difference |
---|
| 397 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
| 398 | if abs(DT0 - DTL) > 0.05*max(abs([DT0,DTL])) |
---|
| 399 | |
---|
| 400 | then |
---|
| 401 | "Log Mean Temperature Difference" |
---|
| 402 | LMTD= (DT0-DTL)/ln(DT0/DTL); |
---|
[1] | 403 | |
---|
[45] | 404 | else |
---|
| 405 | |
---|
| 406 | if DT0*DTL equal 0 |
---|
| 407 | |
---|
| 408 | then |
---|
| 409 | "Log Mean Temperature Difference" |
---|
| 410 | LMTD = 0.5*(DT0+DTL); |
---|
| 411 | |
---|
| 412 | else |
---|
| 413 | "Log Mean Temperature Difference" |
---|
| 414 | LMTD = 0.5*(DT0+DTL)*(1-(DT0-DTL)^2/(DT0*DTL)*(1+(DT0-DTL)^2/(DT0*DTL)/2)/12); |
---|
| 415 | |
---|
| 416 | end |
---|
| 417 | |
---|
| 418 | end |
---|
| 419 | |
---|
[1] | 420 | "Exchange Surface Area" |
---|
[100] | 421 | Details.Q = Details.Ud*Details.A*MTD; |
---|
[1] | 422 | |
---|
| 423 | "Mean Temperature Difference" |
---|
| 424 | MTD = Fc*LMTD; |
---|
| 425 | |
---|
| 426 | end |
---|
| 427 | |
---|
| 428 | |
---|
| 429 | #===================================================================== |
---|
| 430 | # Concrete Models for Simplified Heat Exchangers |
---|
| 431 | #===================================================================== |
---|
| 432 | |
---|
| 433 | #===================================================================== |
---|
| 434 | # LMTD Method |
---|
| 435 | #===================================================================== |
---|
| 436 | |
---|
| 437 | Model HeatExchanger_LMTD as Heatex_Basic_LMTD |
---|
| 438 | |
---|
[139] | 439 | ATTRIBUTES |
---|
| 440 | Pallete = true; |
---|
| 441 | Brief = "Heat Exchanger Block - LMTD Method"; |
---|
| 442 | Info = |
---|
| 443 | "write some information"; |
---|
| 444 | |
---|
[45] | 445 | PARAMETERS |
---|
| 446 | |
---|
[143] | 447 | FlowDirection as Switcher(Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent"); |
---|
[45] | 448 | |
---|
[143] | 449 | EQUATIONS |
---|
[45] | 450 | |
---|
[143] | 451 | switch FlowDirection |
---|
| 452 | |
---|
| 453 | case "cocurrent": |
---|
[45] | 454 | |
---|
| 455 | "Temperature Difference at Inlet" |
---|
| 456 | DT0 = Inlet.Hot.T - Inlet.Cold.T; |
---|
[1] | 457 | |
---|
[45] | 458 | "Temperature Difference at Outlet" |
---|
| 459 | DTL = Outlet.Hot.T - Outlet.Cold.T; |
---|
[1] | 460 | |
---|
[143] | 461 | case "counter": |
---|
| 462 | |
---|
[45] | 463 | "Temperature Difference at Inlet" |
---|
| 464 | DT0 = Inlet.Hot.T - Outlet.Cold.T; |
---|
| 465 | |
---|
| 466 | "Temperature Difference at Outlet" |
---|
| 467 | DTL = Outlet.Hot.T - Inlet.Cold.T; |
---|
[1] | 468 | end |
---|
| 469 | |
---|
[45] | 470 | end |
---|
| 471 | |
---|
[1] | 472 | Model E_Shell_LMTD as Heatex_Basic_LMTD |
---|
[139] | 473 | |
---|
| 474 | ATTRIBUTES |
---|
| 475 | Pallete = true; |
---|
| 476 | Brief = "Shell and Tubes Heat Exchanger with 1 shell pass - LMTD Method"; |
---|
| 477 | Info = |
---|
| 478 | "write some information"; |
---|
| 479 | |
---|
[1] | 480 | EQUATIONS |
---|
[45] | 481 | "Temperature Difference at Inlet" |
---|
| 482 | DT0 = Inlet.Hot.T - Outlet.Cold.T; |
---|
[1] | 483 | |
---|
[45] | 484 | "Temperature Difference at Outlet" |
---|
| 485 | DTL = Outlet.Hot.T - Inlet.Cold.T; |
---|
| 486 | |
---|
[1] | 487 | "LMTD Correction Factor" |
---|
| 488 | Fc = HE.EshellCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); |
---|
| 489 | |
---|
| 490 | end |
---|
| 491 | |
---|
| 492 | Model F_Shell_LMTD as Heatex_Basic_LMTD |
---|
[139] | 493 | |
---|
| 494 | ATTRIBUTES |
---|
| 495 | Pallete = true; |
---|
| 496 | Brief = "Shell and Tubes Heat Exchanger with 2 shell pass - LMTD Method"; |
---|
| 497 | Info = |
---|
| 498 | "write some information"; |
---|
| 499 | |
---|
[1] | 500 | EQUATIONS |
---|
[45] | 501 | "Temperature Difference at Inlet" |
---|
| 502 | DT0 = Inlet.Hot.T - Outlet.Cold.T; |
---|
[1] | 503 | |
---|
[45] | 504 | "Temperature Difference at Outlet" |
---|
| 505 | DTL = Outlet.Hot.T - Inlet.Cold.T; |
---|
| 506 | |
---|
[1] | 507 | "LMTD Correction Factor" |
---|
| 508 | Fc = HE.FshellCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); |
---|
| 509 | |
---|
| 510 | end |
---|
| 511 | |
---|
| 512 | #===================================================================== |
---|
| 513 | # NTU Method |
---|
| 514 | #===================================================================== |
---|
| 515 | |
---|
| 516 | Model HeatExchanger_NTU as Heatex_Basic_NTU |
---|
[139] | 517 | |
---|
| 518 | ATTRIBUTES |
---|
| 519 | Pallete = true; |
---|
| 520 | Brief = "Heat Exchanger Block - NTU Method"; |
---|
| 521 | Info = |
---|
| 522 | "write some information"; |
---|
[68] | 523 | |
---|
| 524 | PARAMETERS |
---|
[1] | 525 | |
---|
[143] | 526 | FlowDirection as Switcher(Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent"); |
---|
[68] | 527 | |
---|
[1] | 528 | EQUATIONS |
---|
[68] | 529 | |
---|
| 530 | if Details.Cr equal 0 |
---|
| 531 | |
---|
[144] | 532 | then |
---|
| 533 | |
---|
[68] | 534 | Eft = 1-exp(-Details.NTU); |
---|
[1] | 535 | |
---|
[68] | 536 | else |
---|
| 537 | |
---|
[143] | 538 | switch FlowDirection |
---|
[68] | 539 | |
---|
[143] | 540 | case "cocurrent": |
---|
| 541 | |
---|
[68] | 542 | "Effectiveness in Cocurrent Flow" |
---|
| 543 | Eft = (1-exp(-Details.NTU*(1+Details.Cr)))/(1+Details.Cr); |
---|
| 544 | |
---|
[143] | 545 | case "counter": |
---|
| 546 | |
---|
[68] | 547 | if Details.Cr equal 1 |
---|
| 548 | |
---|
| 549 | then |
---|
| 550 | "Effectiveness in Counter Flow" |
---|
| 551 | Eft = Details.NTU/(1+Details.NTU); |
---|
| 552 | |
---|
| 553 | else |
---|
| 554 | "Effectiveness in Counter Flow" |
---|
| 555 | Eft*(1-Details.Cr*exp(-Details.NTU*(1-Details.Cr))) = (1-exp(-Details.NTU*(1-Details.Cr))); |
---|
| 556 | |
---|
[1] | 557 | end |
---|
| 558 | |
---|
[68] | 559 | end |
---|
| 560 | |
---|
| 561 | |
---|
| 562 | end |
---|
| 563 | |
---|
| 564 | end |
---|
| 565 | |
---|
[1] | 566 | Model E_Shell_NTU as Heatex_Basic_NTU |
---|
[139] | 567 | |
---|
| 568 | ATTRIBUTES |
---|
| 569 | Pallete = true; |
---|
| 570 | Brief = "Shell and Tubes Heat Exchanger with 1 shell pass - NTU Method"; |
---|
| 571 | Info = |
---|
| 572 | "write some information"; |
---|
| 573 | |
---|
[1] | 574 | EQUATIONS |
---|
| 575 | "TEMA E Shell Effectiveness" |
---|
| 576 | Eft = 2*(1+Details.Cr+sqrt(1+Details.Cr^2)*((1+exp(-Details.NTU*sqrt(1+Details.Cr^2)))/(1-exp(-Details.NTU*sqrt(1+Details.Cr^2)))) )^-1; |
---|
| 577 | |
---|
| 578 | end |
---|
| 579 | |
---|
[139] | 580 | Model F_Shell_NTU as Heatex_Basic_NTU |
---|
| 581 | |
---|
| 582 | ATTRIBUTES |
---|
| 583 | Pallete = true; |
---|
| 584 | Brief = "Shell and Tubes Heat Exchanger with 2 shell pass - NTU Method"; |
---|
| 585 | Info = |
---|
| 586 | "write some information"; |
---|
| 587 | |
---|
[1] | 588 | VARIABLES |
---|
| 589 | |
---|
| 590 | Eft1 as positive (Brief="Effectiveness Correction",Lower=0.01,Upper=1,Default=0.5); |
---|
| 591 | |
---|
| 592 | EQUATIONS |
---|
| 593 | |
---|
| 594 | "Effectiveness Correction" |
---|
| 595 | Eft1 = 2*(1+Details.Cr+sqrt(1+Details.Cr^2)*((1+exp(-Details.NTU*sqrt(1+Details.Cr^2)))/(1-exp(-Details.NTU*sqrt(1+Details.Cr^2)))) )^-1; |
---|
| 596 | |
---|
| 597 | "TEMA F Shell Effectiveness" |
---|
| 598 | Eft = ( ((1-Eft1*Details.Cr)/(1-Eft1))^2 -1 )*( ((1-Eft1*Details.Cr)/(1-Eft1))^2 - Details.Cr )^-1; |
---|
| 599 | |
---|
| 600 | end |
---|