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