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