[452] | 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 | * Author: Gerson Balbueno Bicca |
---|
| 16 | * $Id: HairpinIncr.mso $ |
---|
| 17 | *------------------------------------------------------------------*# |
---|
| 18 | |
---|
| 19 | using "streams"; |
---|
| 20 | |
---|
| 21 | Model Properties_Average |
---|
| 22 | |
---|
| 23 | ATTRIBUTES |
---|
| 24 | Pallete = false; |
---|
| 25 | Brief = "Average incremental physical properties of the streams."; |
---|
| 26 | Info = |
---|
| 27 | "to be documented."; |
---|
| 28 | |
---|
| 29 | PARAMETERS |
---|
| 30 | |
---|
| 31 | outer N as Integer (Brief="Number of zones", Default = 2); |
---|
| 32 | |
---|
| 33 | VARIABLES |
---|
| 34 | Mw as molweight (Brief="Average Mol Weight",Default=75, Lower=1, Upper=1e8); |
---|
| 35 | T(N) as temperature (Brief="Average Incremental Temperature",Lower=50); |
---|
| 36 | P(N) as pressure (Brief="Average Incremental Pressure",Default=1, Lower=1e-10, Upper=2e4, DisplayUnit='kPa'); |
---|
| 37 | rho(N) as dens_mass (Brief="Stream Incremental Density" ,Default=1000, Lower=1e-3, Upper=5e5, Symbol = "\rho"); |
---|
| 38 | Mu(N) as viscosity (Brief="Stream Incremental Viscosity",Lower=0.0001, Symbol = "\mu"); |
---|
| 39 | Cp(N) as cp_mol (Brief="Stream Incremental Molar Heat Capacity", Upper=1e10); |
---|
| 40 | K(N) as conductivity (Brief="Stream Incremental Thermal Conductivity", Default=1.0, Lower=1e-5, Upper=500); |
---|
| 41 | |
---|
| 42 | end |
---|
| 43 | |
---|
| 44 | Model Properties_In_Out |
---|
| 45 | |
---|
| 46 | ATTRIBUTES |
---|
| 47 | Pallete = false; |
---|
| 48 | Brief = "Inlet and outlet physical properties of the streams."; |
---|
| 49 | Info = |
---|
| 50 | "to be documented."; |
---|
| 51 | |
---|
| 52 | VARIABLES |
---|
| 53 | |
---|
| 54 | Fw as flow_mass (Brief="Stream Mass Flow"); |
---|
| 55 | rho as dens_mass (Brief="Stream Density" ,Default=1000, Lower=1e-3, Upper=5e5, Symbol = "\rho"); |
---|
| 56 | |
---|
| 57 | end |
---|
| 58 | |
---|
| 59 | Model Properties_Wall |
---|
| 60 | |
---|
| 61 | ATTRIBUTES |
---|
| 62 | Pallete = false; |
---|
| 63 | Brief = "Incremental Physical properties of the streams at wall temperature."; |
---|
| 64 | Info = |
---|
| 65 | "to be documented."; |
---|
| 66 | |
---|
| 67 | PARAMETERS |
---|
| 68 | |
---|
| 69 | outer N as Integer (Brief="Number of zones", Default = 2); |
---|
| 70 | |
---|
| 71 | VARIABLES |
---|
| 72 | |
---|
| 73 | Mu(N) as viscosity (Brief="Stream Incremental Viscosity",Default=1, Lower=1e-5, Upper=1e5, Symbol = "\mu"); |
---|
| 74 | Twall(N) as temperature (Brief="Incremental Wall Temperature",Lower=50); |
---|
| 75 | |
---|
| 76 | end |
---|
| 77 | |
---|
| 78 | Model Physical_Properties |
---|
| 79 | |
---|
| 80 | ATTRIBUTES |
---|
| 81 | Pallete = false; |
---|
| 82 | Brief = "to be documented"; |
---|
| 83 | Info = |
---|
| 84 | "to be documented"; |
---|
| 85 | |
---|
| 86 | VARIABLES |
---|
| 87 | Inlet as Properties_In_Out (Brief="Properties at Inlet Stream", Symbol = "^{in}"); |
---|
| 88 | Average as Properties_Average (Brief="Properties at Average Temperature", Symbol = "^{avg}"); |
---|
| 89 | Outlet as Properties_In_Out (Brief="Properties at Outlet Stream", Symbol = "^{out}"); |
---|
| 90 | Wall as Properties_Wall (Brief="Properties at Wall Temperature", Symbol = "^{wall}"); |
---|
| 91 | |
---|
| 92 | end |
---|
| 93 | |
---|
| 94 | Model Details_Main |
---|
| 95 | |
---|
| 96 | ATTRIBUTES |
---|
| 97 | Pallete = false; |
---|
| 98 | Brief = "to be documented"; |
---|
| 99 | Info = |
---|
| 100 | "to be documented"; |
---|
| 101 | |
---|
| 102 | PARAMETERS |
---|
| 103 | |
---|
| 104 | outer N as Integer (Brief="Number of zones", Default = 2); |
---|
| 105 | |
---|
| 106 | VARIABLES |
---|
| 107 | A as area (Brief="Total Exchange Surface Area"); |
---|
| 108 | Q(N) as power (Brief="Incremental Duty", Default=7000, Lower=1e-8, Upper=1e10); |
---|
| 109 | Qtotal as power (Brief="Total Duty", Default=7000, Lower=1e-8, Upper=1e10); |
---|
| 110 | Uc as heat_trans_coeff (Brief="Average Overall Heat Transfer Coefficient Clean",Default=1,Lower=1e-6,Upper=1e10); |
---|
| 111 | Ud(N) as heat_trans_coeff (Brief="Incremental Overall Heat Transfer Coefficient Dirty",Default=1,Lower=1e-6,Upper=1e10); |
---|
| 112 | |
---|
| 113 | end |
---|
| 114 | |
---|
| 115 | Model Hairpin_HeatTransfer |
---|
| 116 | |
---|
| 117 | ATTRIBUTES |
---|
| 118 | Pallete = false; |
---|
| 119 | Brief = "to be documented"; |
---|
| 120 | Info = |
---|
| 121 | "to be documented"; |
---|
| 122 | |
---|
| 123 | PARAMETERS |
---|
| 124 | |
---|
| 125 | As as area (Brief="Cross Sectional Area for Flow",Default=0.05,Lower=1e-8); |
---|
| 126 | Dh as length (Brief="Hydraulic Diameter of Pipe for Heat Transfer",Lower=1e-8); |
---|
| 127 | outer N as Integer (Brief="Number of zones", Default = 2); |
---|
| 128 | outer Npoints as Integer (Brief="Number of incremental points", Default = 3); |
---|
| 129 | |
---|
| 130 | VARIABLES |
---|
| 131 | |
---|
| 132 | Tlocal(Npoints) as temperature (Brief="Incremental Local Temperature",Lower=50); |
---|
| 133 | Re(N) as positive (Brief="Incremental Reynolds Number",Default=100,Lower=1); |
---|
| 134 | hcoeff(N) as heat_trans_coeff (Brief="Incremental Film Coefficient",Default=1,Lower=1e-12, Upper=1e6, DisplayUnit = 'W/m^2/K'); |
---|
| 135 | fi(N) as fricfactor (Brief="Incremental Friction Factor", Default=0.05, Lower=1e-10, Upper=2000); |
---|
| 136 | Nu(N) as positive (Brief="Incremental Nusselt Number",Default=0.5,Lower=1e-8); |
---|
| 137 | PR(N) as positive (Brief="Incremental Prandtl Number",Default=0.5,Lower=1e-8); |
---|
| 138 | Phi(N) as positive (Brief="Incremental Phi Correction",Default=1,Lower=1e-3); |
---|
| 139 | Vmean(N) as velocity (Brief="Incremental Tube Velocity",Lower=1e-8); |
---|
| 140 | Enth(Npoints) as enth_mol (Brief="Incremental Stream Enthalpy"); |
---|
| 141 | |
---|
| 142 | end |
---|
| 143 | |
---|
| 144 | Model Hairpin_PressureDrop |
---|
| 145 | |
---|
| 146 | ATTRIBUTES |
---|
| 147 | Pallete = false; |
---|
| 148 | Brief = "to be documented"; |
---|
| 149 | Info = |
---|
| 150 | "to be documented"; |
---|
| 151 | |
---|
| 152 | PARAMETERS |
---|
| 153 | |
---|
| 154 | Dh as length (Brief="Hydraulic Diameter of Pipe for Pressure Drop",Lower=1e-6); |
---|
| 155 | outer N as Integer (Brief="Number of zones", Default = 2); |
---|
| 156 | outer Npoints as Integer (Brief="Number of incremental points", Default = 3); |
---|
| 157 | |
---|
| 158 | VARIABLES |
---|
| 159 | |
---|
| 160 | Plocal(Npoints) as pressure (Brief="Incremental Local Pressure",Default=1, Lower=1e-10, Upper=2e4, DisplayUnit='kPa'); |
---|
| 161 | Pd_fric(Npoints) as press_delta (Brief="Incremental Pressure Drop for friction",Default=1e-3, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P_{fric}"); |
---|
| 162 | fi(N) as fricfactor (Brief="Incremental Friction Factor", Default=0.05, Lower=1e-10, Upper=2000); |
---|
| 163 | Re(N) as positive (Brief="Incremental Reynolds Number",Default=100,Lower=1); |
---|
| 164 | |
---|
| 165 | end |
---|
| 166 | |
---|
| 167 | Model Main_Hairpin |
---|
| 168 | |
---|
| 169 | ATTRIBUTES |
---|
| 170 | Pallete = false; |
---|
| 171 | Brief = "to be documented"; |
---|
| 172 | Info = |
---|
| 173 | "to be documented"; |
---|
| 174 | |
---|
| 175 | VARIABLES |
---|
| 176 | |
---|
| 177 | HeatTransfer as Hairpin_HeatTransfer (Brief="Double Pipe Heat Transfer"); |
---|
| 178 | PressureDrop as Hairpin_PressureDrop (Brief="Double Pipe Pressure Drop"); |
---|
| 179 | Properties as Physical_Properties (Brief="Double Pipe Properties"); |
---|
| 180 | |
---|
| 181 | end |
---|
| 182 | |
---|
| 183 | Model Results_Hairpin |
---|
| 184 | |
---|
| 185 | ATTRIBUTES |
---|
| 186 | Pallete = false; |
---|
| 187 | Brief = "to be documented"; |
---|
| 188 | Info = |
---|
| 189 | "to be documented"; |
---|
| 190 | |
---|
| 191 | VARIABLES |
---|
| 192 | Pdnozzle_in as press_delta (Brief="Inlet Nozzle Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa'); |
---|
| 193 | Pdnozzle_out as press_delta (Brief="Outlet Nozzle Pressure Drop",Default=0.01, Lower=1e-10,DisplayUnit='kPa'); |
---|
| 194 | Pdrop as press_delta (Brief="Total Pressure Drop",Default=0.01, Lower=0,DisplayUnit='kPa', Symbol ="\Delta P"); |
---|
| 195 | Vnozzle_in as velocity (Brief="Inlet Nozzle Velocity",Default=1, Upper=1e5); |
---|
| 196 | Vnozzle_out as velocity (Brief="Outlet Nozzle Velocity",Default=1, Upper=1e5); |
---|
| 197 | RVsquare_in as positive (Brief ="Inlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m'); |
---|
| 198 | RVsquare_out as positive (Brief ="Outlet Nozzle rho-V^2", Default=1, Upper=1e6, Unit = 'kg/s^2/m'); |
---|
| 199 | hcoeff as heat_trans_coeff (Brief="Average Film Coefficient",Default=1,Lower=1e-12, Upper=1e6, DisplayUnit = 'W/m^2/K'); |
---|
| 200 | |
---|
| 201 | end |
---|
| 202 | |
---|
| 203 | Model Summary_Hairpin |
---|
| 204 | |
---|
| 205 | ATTRIBUTES |
---|
| 206 | Pallete = false; |
---|
| 207 | Brief = "to be documented"; |
---|
| 208 | Info = |
---|
| 209 | "to be documented"; |
---|
| 210 | |
---|
| 211 | VARIABLES |
---|
| 212 | A as area (Brief="Total Exchange Surface Area"); |
---|
| 213 | Qtotal as power (Brief="Total Duty", Default=7000, Lower=1e-8, Upper=1e10); |
---|
| 214 | Inner as Results_Hairpin (Brief="Inner Side Summary"); |
---|
| 215 | Outer as Results_Hairpin (Brief="Outer Side Summary"); |
---|
| 216 | |
---|
| 217 | end |
---|
| 218 | |
---|
| 219 | Model HairpinIncr_basic |
---|
| 220 | |
---|
| 221 | ATTRIBUTES |
---|
| 222 | Pallete = false; |
---|
| 223 | Brief = "Incremental Hairpin Heat Exchanger. "; |
---|
| 224 | Info = |
---|
| 225 | "Incremental approach for Hairpin heat exchanger. "; |
---|
| 226 | |
---|
| 227 | PARAMETERS |
---|
| 228 | |
---|
| 229 | outer PP as Plugin (Brief="External Physical Properties", Type="PP"); |
---|
| 230 | outer NComp as Integer (Brief="Number of Components"); |
---|
| 231 | outer N as Integer (Brief="Number of zones", Default = 2); |
---|
| 232 | outer Npoints as Integer (Brief="Number of incremental points", Default = 3); |
---|
| 233 | |
---|
| 234 | M(NComp) as molweight (Brief="Component Mol Weight"); |
---|
| 235 | |
---|
| 236 | HotSide as Switcher (Brief="Flag for Fluid Alocation ",Valid=["outer","inner"],Default="outer"); |
---|
| 237 | innerFlowRegime as Switcher (Brief="Inner Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar"); |
---|
| 238 | outerFlowRegime as Switcher (Brief="Outer Flow Regime ",Valid=["laminar","transition","turbulent"],Default="laminar"); |
---|
| 239 | |
---|
| 240 | InnerLaminarCorrelation as Switcher (Brief="Heat Transfer Correlation in Laminar Flow for the Inner Side",Valid=["Hausen","Schlunder"],Default="Hausen"); |
---|
| 241 | InnerTransitionCorrelation as Switcher (Brief="Heat Transfer Correlation in Transition Flow for the Inner Side",Valid=["Gnielinski","Hausen"],Default="Gnielinski"); |
---|
| 242 | InnerTurbulentCorrelation as Switcher (Brief="Heat Transfer Correlation in Turbulent Flow for the Inner Side",Valid=["Petukhov","SiederTate"],Default="Petukhov"); |
---|
| 243 | |
---|
| 244 | OuterLaminarCorrelation as Switcher (Brief="Heat Transfer Correlation in Laminar Flow for the Outer Side",Valid=["Hausen","Schlunder"],Default="Hausen"); |
---|
| 245 | OuterTransitionCorrelation as Switcher (Brief="Heat Transfer Correlation in Transition Flow for the OuterSide",Valid=["Gnielinski","Hausen"],Default="Gnielinski"); |
---|
| 246 | OuterTurbulentCorrelation as Switcher (Brief="Heat Transfer Correlation in Turbulent Flow for the Outer Side",Valid=["Petukhov","SiederTate"],Default="Petukhov"); |
---|
| 247 | |
---|
| 248 | outer Pi as constant (Brief="Pi Number",Default=3.14159265, Symbol = "\pi"); |
---|
| 249 | outer DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e-6); |
---|
| 250 | outer DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e-10); |
---|
| 251 | outer DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e-10); |
---|
| 252 | outer Lpipe as length (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}"); |
---|
| 253 | outer Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}"); |
---|
| 254 | outer Rfi as positive (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0); |
---|
| 255 | outer Rfo as positive (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0); |
---|
| 256 | |
---|
| 257 | VARIABLES |
---|
| 258 | |
---|
| 259 | in InletInner as stream (Brief="Inlet Inner Stream", PosX=0, PosY=0.5225, Symbol="_{inInner}"); |
---|
| 260 | in InletOuter as stream (Brief="Inlet Outer Stream", PosX=0.2805, PosY=0, Symbol="_{inOuter}"); |
---|
| 261 | |
---|
| 262 | out OutletInner as streamPH (Brief="Outlet Inner Stream", PosX=1, PosY=0.5225, Symbol="_{outInner}"); |
---|
| 263 | out OutletOuter as streamPH (Brief="Outlet Outer Stream", PosX=0.7264, PosY=1, Symbol="_{outOuter}"); |
---|
| 264 | |
---|
| 265 | Details as Details_Main (Brief="Some Details in the Heat Exchanger", Symbol=" "); |
---|
| 266 | Inner as Main_Hairpin (Brief="Inner Side of the Heat Exchanger", Symbol="_{Inner}"); |
---|
| 267 | Outer as Main_Hairpin (Brief="Outer Side of the Heat Exchanger", Symbol="_{Outer}"); |
---|
| 268 | |
---|
| 269 | Lincr(Npoints) as length (Brief = "Incremental Tube Length", Symbol = "L_{incr}"); |
---|
| 270 | |
---|
| 271 | SET |
---|
| 272 | |
---|
| 273 | #"Component Molecular Weight" |
---|
| 274 | M = PP.MolecularWeight(); |
---|
| 275 | |
---|
| 276 | #"Inner Pipe Cross Sectional Area for Flow" |
---|
| 277 | Inner.HeatTransfer.As=0.25*Pi*DiInner*DiInner; |
---|
| 278 | |
---|
| 279 | #"Outer Pipe Cross Sectional Area for Flow" |
---|
| 280 | Outer.HeatTransfer.As=0.25*Pi*(DiOuter*DiOuter - DoInner*DoInner); |
---|
| 281 | |
---|
| 282 | #"Inner Pipe Hydraulic Diameter for Heat Transfer" |
---|
| 283 | Inner.HeatTransfer.Dh=DiInner; |
---|
| 284 | |
---|
| 285 | #"Outer Pipe Hydraulic Diameter for Heat Transfer" |
---|
| 286 | Outer.HeatTransfer.Dh=(DiOuter*DiOuter-DoInner*DoInner)/DoInner; |
---|
| 287 | |
---|
| 288 | #"Inner Pipe Hydraulic Diameter for Pressure Drop" |
---|
| 289 | Inner.PressureDrop.Dh=DiInner; |
---|
| 290 | |
---|
| 291 | #"Outer Pipe Hydraulic Diameter for Pressure Drop" |
---|
| 292 | Outer.PressureDrop.Dh=DiOuter-DoInner; |
---|
| 293 | |
---|
| 294 | EQUATIONS |
---|
| 295 | |
---|
| 296 | "Outer Stream Average Temperature" |
---|
| 297 | Outer.Properties.Average.T(1:N) = 0.5*Outer.HeatTransfer.Tlocal(1:N) + 0.5*Outer.HeatTransfer.Tlocal(2:Npoints); |
---|
| 298 | |
---|
| 299 | "Inner Stream Average Temperature" |
---|
| 300 | Inner.Properties.Average.T(1:N) = 0.5*Inner.HeatTransfer.Tlocal(1:N) + 0.5*Inner.HeatTransfer.Tlocal(2:Npoints); |
---|
| 301 | |
---|
| 302 | "Outer Stream Average Pressure" |
---|
| 303 | Outer.Properties.Average.P(1:N) = 0.5*Outer.PressureDrop.Plocal(1:N) + 0.5*Outer.PressureDrop.Plocal(2:Npoints); |
---|
| 304 | |
---|
| 305 | "Inner Stream Average Pressure" |
---|
| 306 | Inner.Properties.Average.P(1:N) = 0.5*Inner.PressureDrop.Plocal(1:N) + 0.5*Inner.PressureDrop.Plocal(2:Npoints); |
---|
| 307 | |
---|
| 308 | "Inner Stream Wall Temperature" |
---|
| 309 | Inner.Properties.Wall.Twall = 0.5*Outer.Properties.Average.T + 0.5*Inner.Properties.Average.T; |
---|
| 310 | |
---|
| 311 | "Outer Stream Wall Temperature" |
---|
| 312 | Outer.Properties.Wall.Twall = 0.5*Outer.Properties.Average.T + 0.5*Inner.Properties.Average.T; |
---|
| 313 | |
---|
| 314 | "Outer Stream Average Molecular Weight" |
---|
| 315 | Outer.Properties.Average.Mw = sum(M*InletOuter.z); |
---|
| 316 | |
---|
| 317 | "Inner Stream Average Molecular Weight" |
---|
| 318 | Inner.Properties.Average.Mw = sum(M*InletInner.z); |
---|
| 319 | |
---|
| 320 | if InletInner.v equal 0 |
---|
| 321 | |
---|
| 322 | then |
---|
| 323 | "Inlet Mass Density Inner Stream" |
---|
| 324 | Inner.Properties.Inlet.rho = PP.LiquidDensity(InletInner.T,InletInner.P,InletInner.z); |
---|
| 325 | |
---|
| 326 | "Outlet Mass Density Inner Stream" |
---|
| 327 | Inner.Properties.Outlet.rho = PP.LiquidDensity(OutletInner.T,OutletInner.P,OutletInner.z); |
---|
| 328 | |
---|
| 329 | else |
---|
| 330 | "Inlet Mass Density Inner Stream" |
---|
| 331 | Inner.Properties.Inlet.rho = PP.VapourDensity(InletInner.T,InletInner.P,InletInner.z); |
---|
| 332 | |
---|
| 333 | "Outlet Mass Density Inner Stream" |
---|
| 334 | Inner.Properties.Outlet.rho = PP.VapourDensity(OutletInner.T,OutletInner.P,OutletInner.z); |
---|
| 335 | |
---|
| 336 | end |
---|
| 337 | |
---|
| 338 | if InletOuter.v equal 0 |
---|
| 339 | |
---|
| 340 | then |
---|
| 341 | "Inlet Mass Density Outer Stream" |
---|
| 342 | Outer.Properties.Inlet.rho = PP.LiquidDensity(InletOuter.T,InletOuter.P,InletOuter.z); |
---|
| 343 | |
---|
| 344 | "Outlet Mass Density Outer Stream" |
---|
| 345 | Outer.Properties.Outlet.rho = PP.LiquidDensity(OutletOuter.T,OutletOuter.P,OutletOuter.z); |
---|
| 346 | |
---|
| 347 | else |
---|
| 348 | "Inlet Mass Density Outer Stream" |
---|
| 349 | Outer.Properties.Inlet.rho = PP.VapourDensity(InletOuter.T,InletOuter.P,InletOuter.z); |
---|
| 350 | |
---|
| 351 | "Outlet Mass Density Outer Stream" |
---|
| 352 | Outer.Properties.Outlet.rho = PP.VapourDensity(OutletOuter.T,OutletOuter.P,OutletOuter.z); |
---|
| 353 | |
---|
| 354 | end |
---|
| 355 | |
---|
[574] | 356 | for i in [1:N] do |
---|
[452] | 357 | |
---|
| 358 | if InletInner.v equal 0 |
---|
| 359 | |
---|
| 360 | then |
---|
| 361 | |
---|
| 362 | "Average Heat Capacity Inner Stream" |
---|
| 363 | Inner.Properties.Average.Cp(i) = PP.LiquidCp(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z); |
---|
| 364 | |
---|
| 365 | "Average Mass Density Inner Stream" |
---|
| 366 | Inner.Properties.Average.rho(i) = PP.LiquidDensity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z); |
---|
| 367 | |
---|
| 368 | "Average Viscosity Inner Stream" |
---|
| 369 | Inner.Properties.Average.Mu(i) = PP.LiquidViscosity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z); |
---|
| 370 | |
---|
| 371 | "Average Conductivity Inner Stream" |
---|
| 372 | Inner.Properties.Average.K(i) = PP.LiquidThermalConductivity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z); |
---|
| 373 | |
---|
| 374 | "Viscosity Inner Stream at wall temperature" |
---|
| 375 | Inner.Properties.Wall.Mu(i) = PP.LiquidViscosity(Inner.Properties.Wall.Twall(i),Inner.Properties.Average.P(i),InletInner.z); |
---|
| 376 | |
---|
| 377 | else |
---|
| 378 | |
---|
| 379 | "Average Heat Capacity InnerStream" |
---|
| 380 | Inner.Properties.Average.Cp(i) = PP.VapourCp(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z); |
---|
| 381 | |
---|
| 382 | "Average Mass Density Inner Stream" |
---|
| 383 | Inner.Properties.Average.rho(i) = PP.VapourDensity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z); |
---|
| 384 | |
---|
| 385 | "Average Viscosity Inner Stream" |
---|
| 386 | Inner.Properties.Average.Mu(i) = PP.VapourViscosity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z); |
---|
| 387 | |
---|
| 388 | "Average Conductivity Inner Stream" |
---|
| 389 | Inner.Properties.Average.K(i) = PP.VapourThermalConductivity(Inner.Properties.Average.T(i),Inner.Properties.Average.P(i),InletInner.z); |
---|
| 390 | |
---|
| 391 | "Viscosity Inner Stream at wall temperature" |
---|
| 392 | Inner.Properties.Wall.Mu(i) = PP.VapourViscosity(Inner.Properties.Wall.Twall(i),Inner.Properties.Average.P(i),InletInner.z); |
---|
| 393 | |
---|
| 394 | end |
---|
| 395 | |
---|
| 396 | if InletOuter.v equal 0 |
---|
| 397 | |
---|
| 398 | then |
---|
| 399 | |
---|
| 400 | "Average Heat Capacity Outer Stream" |
---|
| 401 | Outer.Properties.Average.Cp(i) = PP.LiquidCp(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z); |
---|
| 402 | |
---|
| 403 | "Average Mass Density Outer Stream" |
---|
| 404 | Outer.Properties.Average.rho(i) = PP.LiquidDensity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z); |
---|
| 405 | |
---|
| 406 | "Average Viscosity Outer Stream" |
---|
| 407 | Outer.Properties.Average.Mu(i) = PP.LiquidViscosity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z); |
---|
| 408 | |
---|
| 409 | "Average Conductivity Outer Stream" |
---|
| 410 | Outer.Properties.Average.K(i) = PP.LiquidThermalConductivity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z); |
---|
| 411 | |
---|
| 412 | "Viscosity Outer Stream at wall temperature" |
---|
| 413 | Outer.Properties.Wall.Mu(i) = PP.LiquidViscosity(Outer.Properties.Wall.Twall(i),Outer.Properties.Average.P(i),InletOuter.z); |
---|
| 414 | |
---|
| 415 | |
---|
| 416 | else |
---|
| 417 | |
---|
| 418 | "Average Heat Capacity Outer Stream" |
---|
| 419 | Outer.Properties.Average.Cp(i) = PP.VapourCp(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z); |
---|
| 420 | |
---|
| 421 | "Average Mass Density Outer Stream" |
---|
| 422 | Outer.Properties.Average.rho(i) = PP.VapourDensity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z); |
---|
| 423 | |
---|
| 424 | "Average Viscosity Outer Stream" |
---|
| 425 | Outer.Properties.Average.Mu(i) = PP.VapourViscosity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z); |
---|
| 426 | |
---|
| 427 | "Average Conductivity Outer Stream" |
---|
| 428 | Outer.Properties.Average.K(i) = PP.VapourThermalConductivity(Outer.Properties.Average.T(i),Outer.Properties.Average.P(i),InletOuter.z); |
---|
| 429 | |
---|
| 430 | "Viscosity Outer Stream at wall temperature" |
---|
| 431 | Outer.Properties.Wall.Mu(i) = PP.VapourViscosity(Outer.Properties.Wall.Twall(i),Outer.Properties.Average.P(i),InletOuter.z); |
---|
| 432 | |
---|
| 433 | end |
---|
| 434 | |
---|
| 435 | end |
---|
| 436 | |
---|
| 437 | "Flow Mass Inlet Inner Stream" |
---|
| 438 | Inner.Properties.Inlet.Fw = sum(M*InletInner.z)*InletInner.F; |
---|
| 439 | |
---|
| 440 | "Flow Mass Outlet Inner Stream" |
---|
| 441 | Inner.Properties.Outlet.Fw = sum(M*OutletInner.z)*OutletInner.F; |
---|
| 442 | |
---|
| 443 | "Flow Mass Inlet Outer Stream" |
---|
| 444 | Outer.Properties.Inlet.Fw = sum(M*InletOuter.z)*InletOuter.F; |
---|
| 445 | |
---|
| 446 | "Flow Mass Outlet Outer Stream" |
---|
| 447 | Outer.Properties.Outlet.Fw = sum(M*OutletOuter.z)*OutletOuter.F; |
---|
| 448 | |
---|
| 449 | "Molar Balance Outer Stream" |
---|
| 450 | OutletOuter.F = InletOuter.F; |
---|
| 451 | |
---|
| 452 | "Molar Balance Inner Stream" |
---|
| 453 | OutletInner.F = InletInner.F; |
---|
| 454 | |
---|
| 455 | "Outer Stream Molar Fraction Constraint" |
---|
| 456 | OutletOuter.z=InletOuter.z; |
---|
| 457 | |
---|
| 458 | "InnerStream Molar Fraction Constraint" |
---|
| 459 | OutletInner.z=InletInner.z; |
---|
| 460 | |
---|
| 461 | "Total Exchange Surface Area for one segment of pipe" |
---|
| 462 | Details.A=Pi*DoInner*Lpipe; |
---|
| 463 | |
---|
| 464 | "Pipe Initial Length from Left to Right" |
---|
| 465 | Lincr(1) = 0*'m'; |
---|
| 466 | |
---|
[574] | 467 | for i in [1:N] do |
---|
[452] | 468 | |
---|
| 469 | "Incremental Length" |
---|
| 470 | Lincr(i+1) = i*abs(Lpipe)/N; |
---|
| 471 | |
---|
| 472 | end |
---|
| 473 | |
---|
[574] | 474 | for i in [1:N] do |
---|
[452] | 475 | |
---|
| 476 | switch innerFlowRegime |
---|
| 477 | |
---|
| 478 | case "laminar": |
---|
| 479 | |
---|
| 480 | "Inner Side Friction Factor for Pressure Drop - laminar Flow" |
---|
| 481 | Inner.PressureDrop.fi(i)*Inner.PressureDrop.Re(i) = 16; |
---|
| 482 | |
---|
| 483 | when Inner.PressureDrop.Re(i) > 2300 switchto "transition"; |
---|
| 484 | |
---|
| 485 | case "transition": |
---|
| 486 | |
---|
| 487 | "using Turbulent Flow - to be implemented" |
---|
| 488 | (Inner.PressureDrop.fi(i)-0.0035)*(Inner.PressureDrop.Re(i)^0.42) = 0.264; |
---|
| 489 | |
---|
| 490 | when Inner.PressureDrop.Re(i) < 2300 switchto "laminar"; |
---|
| 491 | when Inner.PressureDrop.Re(i) > 10000 switchto "turbulent"; |
---|
| 492 | |
---|
| 493 | case "turbulent": |
---|
| 494 | |
---|
| 495 | "Inner Side Friction Factor - Turbulent Flow" |
---|
| 496 | (Inner.PressureDrop.fi(i)-0.0035)*(Inner.PressureDrop.Re(i)^0.42) = 0.264; |
---|
| 497 | |
---|
| 498 | when Inner.PressureDrop.Re(i) < 10000 switchto "transition"; |
---|
| 499 | |
---|
| 500 | end |
---|
| 501 | |
---|
| 502 | end |
---|
| 503 | |
---|
[574] | 504 | for i in [1:N] do |
---|
[452] | 505 | |
---|
| 506 | switch outerFlowRegime |
---|
| 507 | |
---|
| 508 | case "laminar": |
---|
| 509 | |
---|
| 510 | "Outer Side Friction Factor - laminar Flow" |
---|
| 511 | Outer.PressureDrop.fi(i)*Outer.PressureDrop.Re(i) = 16; |
---|
| 512 | |
---|
| 513 | when Outer.PressureDrop.Re(i) > 2300 switchto "transition"; |
---|
| 514 | |
---|
| 515 | case "transition": |
---|
| 516 | |
---|
| 517 | "using Turbulent Flow - Transition Flow must be implemented" |
---|
| 518 | (Outer.PressureDrop.fi(i)-0.0035)*(Outer.PressureDrop.Re(i)^0.42) = 0.264; |
---|
| 519 | |
---|
| 520 | when Outer.PressureDrop.Re(i) < 2300 switchto "laminar"; |
---|
| 521 | when Outer.PressureDrop.Re(i) > 10000 switchto "turbulent"; |
---|
| 522 | |
---|
| 523 | case "turbulent": |
---|
| 524 | |
---|
| 525 | "Outer Side Friction Factor - Turbulent Flow" |
---|
| 526 | (Outer.PressureDrop.fi(i)-0.0035)*(Outer.PressureDrop.Re(i)^0.42) = 0.264; |
---|
| 527 | |
---|
| 528 | when Outer.PressureDrop.Re(i) < 10000 switchto "transition"; |
---|
| 529 | |
---|
| 530 | end |
---|
| 531 | |
---|
| 532 | end |
---|
| 533 | |
---|
[574] | 534 | for i in [1:N] do |
---|
[452] | 535 | |
---|
| 536 | switch innerFlowRegime |
---|
| 537 | |
---|
| 538 | case "laminar": |
---|
| 539 | |
---|
| 540 | "Inner Side Friction Factor for Heat Transfer - laminar Flow" |
---|
| 541 | Inner.HeatTransfer.fi(i) = 1/(0.79*ln(Inner.HeatTransfer.Re(i))-1.64)^2; |
---|
| 542 | |
---|
| 543 | switch InnerLaminarCorrelation |
---|
| 544 | |
---|
| 545 | case "Hausen": |
---|
| 546 | |
---|
| 547 | "Nusselt Number" |
---|
| 548 | Inner.HeatTransfer.Nu(i) = 3.665 + ((0.19*((DiInner/Lpipe)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i))^0.8)/(1+0.117*((DiInner/Lpipe)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i))^0.467)); |
---|
| 549 | |
---|
| 550 | case "Schlunder": |
---|
| 551 | |
---|
| 552 | "Nusselt Number" |
---|
| 553 | Inner.HeatTransfer.Nu(i) = (49.027896+4.173281*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i)*(DiInner/Lpipe))^(1/3); |
---|
| 554 | |
---|
| 555 | end |
---|
| 556 | |
---|
| 557 | when Inner.HeatTransfer.Re(i) > 2300 switchto "transition"; |
---|
| 558 | |
---|
| 559 | case "transition": |
---|
| 560 | |
---|
| 561 | "Inner Side Friction Factor for Heat Transfer - transition Flow" |
---|
| 562 | Inner.HeatTransfer.fi(i) = 1/(0.79*ln(Inner.HeatTransfer.Re(i))-1.64)^2; |
---|
| 563 | |
---|
| 564 | switch InnerTransitionCorrelation |
---|
| 565 | |
---|
| 566 | case "Gnielinski": |
---|
| 567 | |
---|
| 568 | "Nusselt Number" |
---|
| 569 | Inner.HeatTransfer.Nu(i)*(1+(12.7*sqrt(0.125*Inner.HeatTransfer.fi(i))*((Inner.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi(i)*(Inner.HeatTransfer.Re(i)-1000)*Inner.HeatTransfer.PR(i); |
---|
| 570 | |
---|
| 571 | case "Hausen": |
---|
| 572 | |
---|
| 573 | "Nusselt Number" |
---|
| 574 | Inner.HeatTransfer.Nu(i) =0.116*(Inner.HeatTransfer.Re(i)^(0.667)-125)*Inner.HeatTransfer.PR(i)^(0.333)*(1+(DiInner/Lpipe)^0.667); |
---|
| 575 | |
---|
| 576 | end |
---|
| 577 | |
---|
| 578 | when Inner.HeatTransfer.Re(i) < 2300 switchto "laminar"; |
---|
| 579 | when Inner.HeatTransfer.Re(i) > 10000 switchto "turbulent"; |
---|
| 580 | |
---|
| 581 | case "turbulent": |
---|
| 582 | |
---|
| 583 | switch InnerTurbulentCorrelation |
---|
| 584 | |
---|
| 585 | case "Petukhov": |
---|
| 586 | |
---|
| 587 | "Inner Side Friction Factor for Heat Transfer - turbulent Flow" |
---|
| 588 | Inner.HeatTransfer.fi(i) = 1/(1.82*log(Inner.HeatTransfer.Re(i))-1.64)^2; |
---|
| 589 | |
---|
| 590 | "Nusselt Number" |
---|
| 591 | Inner.HeatTransfer.Nu(i)*(1.07+(12.7*sqrt(0.125*Inner.HeatTransfer.fi(i))*((Inner.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Inner.HeatTransfer.fi(i)*Inner.HeatTransfer.Re(i)*Inner.HeatTransfer.PR(i); |
---|
| 592 | |
---|
| 593 | case "SiederTate": |
---|
| 594 | |
---|
| 595 | "Nusselt Number" |
---|
| 596 | Inner.HeatTransfer.Nu(i) = 0.027*(Inner.HeatTransfer.PR(i))^(1/3)*(Inner.HeatTransfer.Re(i))^(4/5); |
---|
| 597 | |
---|
| 598 | "Inner Side Friction Factor for Heat Transfer - turbulent Flow" |
---|
| 599 | Inner.HeatTransfer.fi(i) = 1/(1.82*log(Inner.HeatTransfer.Re(i))-1.64)^2; |
---|
| 600 | |
---|
| 601 | end |
---|
| 602 | |
---|
| 603 | when Inner.HeatTransfer.Re(i) < 10000 switchto "transition"; |
---|
| 604 | |
---|
| 605 | end |
---|
| 606 | |
---|
| 607 | end |
---|
| 608 | |
---|
[574] | 609 | for i in [1:N] do |
---|
[452] | 610 | |
---|
| 611 | switch outerFlowRegime |
---|
| 612 | |
---|
| 613 | case "laminar": |
---|
| 614 | |
---|
| 615 | "Outer Side Friction Factor for Heat Transfer - laminar Flow" |
---|
| 616 | Outer.HeatTransfer.fi(i) = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2; |
---|
| 617 | |
---|
| 618 | switch OuterLaminarCorrelation |
---|
| 619 | |
---|
| 620 | case "Hausen": |
---|
| 621 | |
---|
| 622 | "Nusselt Number" |
---|
| 623 | Outer.HeatTransfer.Nu(i) = 3.665 + ((0.19*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i))^0.8)/(1+0.117*((Outer.HeatTransfer.Dh/Lpipe)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i))^0.467)); |
---|
| 624 | |
---|
| 625 | case "Schlunder": |
---|
| 626 | |
---|
| 627 | "Nusselt Number" |
---|
| 628 | Outer.HeatTransfer.Nu(i) = (49.027896+4.173281*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i)*(Outer.HeatTransfer.Dh/Lpipe))^(1/3); |
---|
| 629 | |
---|
| 630 | end |
---|
| 631 | |
---|
| 632 | when Outer.HeatTransfer.Re(i) > 2300 switchto "transition"; |
---|
| 633 | |
---|
| 634 | case "transition": |
---|
| 635 | |
---|
| 636 | switch OuterTransitionCorrelation |
---|
| 637 | |
---|
| 638 | case "Gnielinski": |
---|
| 639 | |
---|
| 640 | "Outer Side Friction Factor for Heat Transfer - transition Flow" |
---|
| 641 | Outer.HeatTransfer.fi(i) = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2; |
---|
| 642 | |
---|
| 643 | "Nusselt Number" |
---|
| 644 | Outer.HeatTransfer.Nu(i)*(1+(12.7*sqrt(0.125*Outer.HeatTransfer.fi(i))*((Outer.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi(i)*(Outer.HeatTransfer.Re(i)-1000)*Outer.HeatTransfer.PR(i); |
---|
| 645 | |
---|
| 646 | case "Hausen": |
---|
| 647 | |
---|
| 648 | "Nusselt Number" |
---|
| 649 | Outer.HeatTransfer.Nu(i) = 0.116*(Outer.HeatTransfer.Re(i)^(0.667)-125)*Outer.HeatTransfer.PR(i)^(0.333)*(1+(Outer.HeatTransfer.Dh/Lpipe)^0.667); |
---|
| 650 | |
---|
| 651 | "Outer Side Friction Factor for Heat Transfer - transition Flow" |
---|
| 652 | Outer.HeatTransfer.fi(i) = 1/(0.79*ln(Outer.HeatTransfer.Re(i))-1.64)^2; |
---|
| 653 | |
---|
| 654 | end |
---|
| 655 | |
---|
| 656 | when Outer.HeatTransfer.Re(i) < 2300 switchto "laminar"; |
---|
| 657 | when Outer.HeatTransfer.Re(i) > 10000 switchto "turbulent"; |
---|
| 658 | |
---|
| 659 | case "turbulent": |
---|
| 660 | |
---|
| 661 | switch OuterTurbulentCorrelation |
---|
| 662 | |
---|
| 663 | case "Petukhov": |
---|
| 664 | |
---|
| 665 | "Outer Side Friction Factor for Heat Transfer - turbulent Flow" |
---|
| 666 | Outer.HeatTransfer.fi(i) = 1/(1.82*log(Outer.HeatTransfer.Re(i))-1.64)^2; |
---|
| 667 | |
---|
| 668 | "Nusselt Number" |
---|
| 669 | Outer.HeatTransfer.Nu(i)*(1.07+(12.7*sqrt(0.125*Outer.HeatTransfer.fi(i))*((Outer.HeatTransfer.PR(i))^(2/3) -1))) = 0.125*Outer.HeatTransfer.fi(i)*Outer.HeatTransfer.Re(i)*Outer.HeatTransfer.PR(i); |
---|
| 670 | |
---|
| 671 | case "SiederTate": |
---|
| 672 | |
---|
| 673 | "Nusselt Number" |
---|
| 674 | Outer.HeatTransfer.Nu(i) = 0.027*(Outer.HeatTransfer.PR(i))^(1/3)*(Outer.HeatTransfer.Re(i))^(4/5); |
---|
| 675 | |
---|
| 676 | "Outer Side Friction Factor for Heat Transfer - turbulent Flow" |
---|
| 677 | Outer.HeatTransfer.fi(i) = 1/(1.82*log(Outer.HeatTransfer.Re(i))-1.64)^2; |
---|
| 678 | |
---|
| 679 | end |
---|
| 680 | |
---|
| 681 | when Outer.HeatTransfer.Re(i) < 10000 switchto "transition"; |
---|
| 682 | |
---|
| 683 | end |
---|
| 684 | |
---|
| 685 | end |
---|
| 686 | |
---|
[574] | 687 | for i in [2:N] do |
---|
[452] | 688 | |
---|
| 689 | "Incremental Enthalpy Inner Stream" |
---|
| 690 | Inner.HeatTransfer.Enth(i) = (1-InletInner.v)*PP.LiquidEnthalpy(Inner.HeatTransfer.Tlocal(i), Inner.PressureDrop.Plocal(i), InletInner.z) + InletInner.v*PP.VapourEnthalpy(Inner.HeatTransfer.Tlocal(i), Inner.PressureDrop.Plocal(i), InletInner.z); |
---|
| 691 | |
---|
| 692 | "Incremental Enthalpy Outer Stream" |
---|
| 693 | Outer.HeatTransfer.Enth(i) = (1-InletOuter.v)*PP.LiquidEnthalpy(Outer.HeatTransfer.Tlocal(i), Outer.PressureDrop.Plocal(i), InletOuter.z) + InletOuter.v*PP.VapourEnthalpy(Outer.HeatTransfer.Tlocal(i), Outer.PressureDrop.Plocal(i), InletOuter.z); |
---|
| 694 | |
---|
| 695 | end |
---|
| 696 | |
---|
| 697 | "Inner Pipe Film Coefficient" |
---|
| 698 | Inner.HeatTransfer.hcoeff = (Inner.HeatTransfer.Nu*Inner.Properties.Average.K/DiInner)*Inner.HeatTransfer.Phi; |
---|
| 699 | |
---|
| 700 | "Outer Pipe Film Coefficient" |
---|
| 701 | Outer.HeatTransfer.hcoeff= (Outer.HeatTransfer.Nu*Outer.Properties.Average.K/Outer.HeatTransfer.Dh)*Outer.HeatTransfer.Phi; |
---|
| 702 | |
---|
| 703 | "Outer Pipe Phi correction" |
---|
| 704 | Outer.HeatTransfer.Phi = (Outer.Properties.Average.Mu/Outer.Properties.Wall.Mu)^0.14; |
---|
| 705 | |
---|
| 706 | "Inner Pipe Phi correction" |
---|
| 707 | Inner.HeatTransfer.Phi = (Inner.Properties.Average.Mu/Inner.Properties.Wall.Mu)^0.14; |
---|
| 708 | |
---|
| 709 | "Outer Pipe Prandtl Number" |
---|
| 710 | Outer.HeatTransfer.PR = ((Outer.Properties.Average.Cp/Outer.Properties.Average.Mw)*Outer.Properties.Average.Mu)/Outer.Properties.Average.K; |
---|
| 711 | |
---|
| 712 | "Inner Pipe Prandtl Number" |
---|
| 713 | Inner.HeatTransfer.PR = ((Inner.Properties.Average.Cp/Inner.Properties.Average.Mw)*Inner.Properties.Average.Mu)/Inner.Properties.Average.K; |
---|
| 714 | |
---|
| 715 | "Outer Pipe Reynolds Number for Heat Transfer" |
---|
| 716 | Outer.HeatTransfer.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Outer.Properties.Average.Mu; |
---|
| 717 | |
---|
| 718 | "Outer Pipe Reynolds Number for Pressure Drop" |
---|
| 719 | Outer.PressureDrop.Re = (Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Outer.Properties.Average.Mu; |
---|
| 720 | |
---|
| 721 | "Inner Pipe Reynolds Number for Heat Transfer" |
---|
| 722 | Inner.HeatTransfer.Re = (Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Inner.Properties.Average.Mu; |
---|
| 723 | |
---|
| 724 | "Inner Pipe Reynolds Number for Pressure Drop" |
---|
| 725 | Inner.PressureDrop.Re = Inner.HeatTransfer.Re; |
---|
| 726 | |
---|
| 727 | "Outer Pipe Velocity" |
---|
| 728 | Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Outer.Properties.Average.rho) = Outer.Properties.Inlet.Fw; |
---|
| 729 | |
---|
| 730 | "Inner Pipe Velocity" |
---|
| 731 | Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Inner.Properties.Average.rho) = Inner.Properties.Inlet.Fw; |
---|
| 732 | |
---|
| 733 | "Average Overall Heat Transfer Coefficient Clean" |
---|
| 734 | Details.Uc*((DoInner/(sum(Inner.HeatTransfer.hcoeff)/N*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(sum(Outer.HeatTransfer.hcoeff)/N)))=1; |
---|
| 735 | |
---|
| 736 | "Overall Heat Transfer Coefficient Dirty" |
---|
| 737 | Details.Ud=1/(Rfi*(DoInner/DiInner) + Rfo + (DoInner/(Inner.HeatTransfer.hcoeff*DiInner) )+(DoInner*ln(DoInner/DiInner)/(2*Kwall))+(1/(Outer.HeatTransfer.hcoeff))); |
---|
| 738 | |
---|
| 739 | "Total Duty" |
---|
| 740 | Details.Qtotal = sum(Details.Q); |
---|
| 741 | |
---|
| 742 | end |
---|
| 743 | |
---|
| 744 | Model UpperPipe_basic as HairpinIncr_basic |
---|
| 745 | |
---|
| 746 | ATTRIBUTES |
---|
| 747 | Pallete = false; |
---|
| 748 | Brief = "Incremental Hairpin Heat Exchanger. "; |
---|
| 749 | Info = |
---|
| 750 | "Incremental approach for Hairpin heat exchanger. "; |
---|
| 751 | |
---|
| 752 | PARAMETERS |
---|
| 753 | |
---|
| 754 | outer PP as Plugin (Brief="External Physical Properties", Type="PP"); |
---|
| 755 | outer NComp as Integer (Brief="Number of Components"); |
---|
| 756 | |
---|
| 757 | outer Pi as constant (Brief="Pi Number",Default=3.14159265, Symbol = "\pi"); |
---|
| 758 | outer N as Integer (Brief="Number of zones", Default = 2); |
---|
| 759 | outer Npoints as Integer (Brief="Number of incremental points", Default = 3); |
---|
| 760 | |
---|
| 761 | outer DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e-6); |
---|
| 762 | outer DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e-10); |
---|
| 763 | outer DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e-10); |
---|
| 764 | outer Lpipe as length (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}"); |
---|
| 765 | outer Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}"); |
---|
| 766 | outer Rfi as positive (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0); |
---|
| 767 | outer Rfo as positive (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0); |
---|
| 768 | |
---|
| 769 | EQUATIONS |
---|
| 770 | |
---|
| 771 | switch HotSide |
---|
| 772 | |
---|
| 773 | case "outer": |
---|
| 774 | |
---|
| 775 | "Energy Balance Outer Stream" |
---|
| 776 | Details.Q(1:N) = InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N)); |
---|
| 777 | |
---|
| 778 | "Energy Balance Inner Stream" |
---|
| 779 | Details.Q(1:N) = -InletInner.F*(Inner.HeatTransfer.Enth(1:N) - Inner.HeatTransfer.Enth(2:Npoints)); |
---|
| 780 | |
---|
| 781 | "Incremental Duty" |
---|
| 782 | Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Outer.Properties.Average.T - Inner.Properties.Average.T); |
---|
| 783 | |
---|
| 784 | when InletInner.T > InletOuter.T switchto "inner"; |
---|
| 785 | |
---|
| 786 | case "inner": |
---|
| 787 | |
---|
| 788 | "Energy Balance Hot Stream" |
---|
| 789 | Details.Q(1:N) = InletInner.F*(Inner.HeatTransfer.Enth(1:N)-Inner.HeatTransfer.Enth(2:Npoints)); |
---|
| 790 | |
---|
| 791 | "Energy Balance Cold Stream" |
---|
| 792 | Details.Q(1:N) = -InletOuter.F*(Outer.HeatTransfer.Enth(2:Npoints) - Outer.HeatTransfer.Enth(1:N)); |
---|
| 793 | |
---|
| 794 | "Incremental Duty" |
---|
| 795 | Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Inner.Properties.Average.T - Outer.Properties.Average.T); |
---|
| 796 | |
---|
| 797 | when InletInner.T < InletOuter.T switchto "outer"; |
---|
| 798 | |
---|
| 799 | end |
---|
| 800 | |
---|
| 801 | "Enthalpy of Inner Side - Inlet Boundary" |
---|
| 802 | Inner.HeatTransfer.Enth(1) = InletInner.h; |
---|
| 803 | |
---|
| 804 | "Enthalpy of inner Side - Outlet Boundary" |
---|
| 805 | Inner.HeatTransfer.Enth(Npoints) = OutletInner.h; |
---|
| 806 | |
---|
| 807 | "Temperature of Inner Side - Inlet Boundary" |
---|
| 808 | Inner.HeatTransfer.Tlocal(1) = InletInner.T; |
---|
| 809 | |
---|
| 810 | "Temperature of Inner Side - Outlet Boundary" |
---|
| 811 | Inner.HeatTransfer.Tlocal(Npoints) = OutletInner.T; |
---|
| 812 | |
---|
| 813 | "Pressure of Inner Side - Inlet Boundary" |
---|
| 814 | Inner.PressureDrop.Plocal(1) = InletInner.P; |
---|
| 815 | |
---|
| 816 | "Pressure of Inner Side - Outlet Boundary" |
---|
| 817 | Inner.PressureDrop.Plocal(Npoints) = OutletInner.P; |
---|
| 818 | |
---|
| 819 | "Enthalpy of Outer Side - Inlet Boundary" |
---|
| 820 | Outer.HeatTransfer.Enth(Npoints) = InletOuter.h; |
---|
| 821 | |
---|
| 822 | "Enthalpy of Outer Side - Outlet Boundary" |
---|
| 823 | Outer.HeatTransfer.Enth(1) = OutletOuter.h; |
---|
| 824 | |
---|
| 825 | "Temperature of Outer Side - Inlet Boundary" |
---|
| 826 | Outer.HeatTransfer.Tlocal(Npoints) = InletOuter.T; |
---|
| 827 | |
---|
| 828 | "Temperature of Outer Side - Outlet Boundary" |
---|
| 829 | Outer.HeatTransfer.Tlocal(1) = OutletOuter.T; |
---|
| 830 | |
---|
| 831 | "Pressure of Outer Side - Inlet Boundary" |
---|
| 832 | Outer.PressureDrop.Plocal(Npoints) = InletOuter.P; |
---|
| 833 | |
---|
| 834 | "Pressure of Outer Side - Outlet Boundary" |
---|
| 835 | Outer.PressureDrop.Plocal(1) = OutletOuter.P; |
---|
| 836 | |
---|
[574] | 837 | for i in [1:N] do |
---|
[452] | 838 | |
---|
| 839 | "Outer Pipe Pressure Drop for friction" |
---|
| 840 | Outer.PressureDrop.Pd_fric(i) = (2*Outer.PressureDrop.fi(i)*Lincr(1+Npoints-i)*Outer.Properties.Average.rho(i)*Outer.HeatTransfer.Vmean(i)^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi(i)); |
---|
| 841 | |
---|
| 842 | end |
---|
| 843 | |
---|
| 844 | "Outer Pipe Pressure Drop for friction" |
---|
| 845 | Outer.PressureDrop.Pd_fric(Npoints) = 0*'kPa'; |
---|
| 846 | |
---|
| 847 | "Inner Pipe Pressure Drop for friction" |
---|
| 848 | Inner.PressureDrop.Pd_fric(2:Npoints) = (2*Inner.PressureDrop.fi*Lincr(2:Npoints)*Inner.Properties.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi); |
---|
| 849 | |
---|
| 850 | "Inner Pipe Pressure Drop for friction" |
---|
| 851 | Inner.PressureDrop.Pd_fric(1) = 0*'kPa'; |
---|
| 852 | |
---|
| 853 | end |
---|
| 854 | |
---|
| 855 | Model LowerPipe_basic as HairpinIncr_basic |
---|
| 856 | |
---|
| 857 | ATTRIBUTES |
---|
| 858 | Pallete = false; |
---|
| 859 | Brief = "Incremental Hairpin Heat Exchanger. "; |
---|
| 860 | Info = |
---|
| 861 | "Incremental approach for Hairpin heat exchanger. "; |
---|
| 862 | |
---|
| 863 | PARAMETERS |
---|
| 864 | |
---|
| 865 | outer PP as Plugin (Brief="External Physical Properties", Type="PP"); |
---|
| 866 | outer NComp as Integer (Brief="Number of Components"); |
---|
| 867 | |
---|
| 868 | outer Pi as constant (Brief="Pi Number",Default=3.14159265, Symbol = "\pi"); |
---|
| 869 | outer N as Integer (Brief="Number of zones", Default = 2); |
---|
| 870 | outer Npoints as Integer (Brief="Number of incremental points", Default = 3); |
---|
| 871 | |
---|
| 872 | |
---|
| 873 | outer DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e-6); |
---|
| 874 | outer DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e-10); |
---|
| 875 | outer DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e-10); |
---|
| 876 | outer Lpipe as length (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}"); |
---|
| 877 | outer Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}"); |
---|
| 878 | outer Rfi as positive (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0); |
---|
| 879 | outer Rfo as positive (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0); |
---|
| 880 | |
---|
| 881 | EQUATIONS |
---|
| 882 | |
---|
| 883 | switch HotSide |
---|
| 884 | |
---|
| 885 | case "outer": |
---|
| 886 | |
---|
| 887 | "Energy Balance Outer Stream in counter flow" |
---|
| 888 | Details.Q(1:N) = InletOuter.F*(Outer.HeatTransfer.Enth(1:N) - Outer.HeatTransfer.Enth(2:Npoints)); |
---|
| 889 | |
---|
| 890 | "Energy Balance Inner Stream" |
---|
| 891 | Details.Q(1:N) = -InletInner.F*(Inner.HeatTransfer.Enth(2:Npoints) - Inner.HeatTransfer.Enth(1:N)); |
---|
| 892 | |
---|
| 893 | "Incremental Duty" |
---|
| 894 | Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Outer.Properties.Average.T - Inner.Properties.Average.T); |
---|
| 895 | #Details.Q = 0.6; |
---|
| 896 | |
---|
| 897 | when InletInner.T > InletOuter.T switchto "inner"; |
---|
| 898 | |
---|
| 899 | case "inner": |
---|
| 900 | |
---|
| 901 | "Energy Balance Hot Stream" |
---|
| 902 | Details.Q(1:N) = InletInner.F*(Inner.HeatTransfer.Enth(2:Npoints)-Inner.HeatTransfer.Enth(1:N)); |
---|
| 903 | |
---|
| 904 | "Energy Balance Cold Stream in counter flow" |
---|
| 905 | Details.Q(1:N) = -InletOuter.F*(Outer.HeatTransfer.Enth(1:N) - Outer.HeatTransfer.Enth(2:Npoints)); |
---|
| 906 | |
---|
| 907 | "Incremental Duty" |
---|
| 908 | Details.Q = Details.Ud*Pi*DoInner*(Lpipe/N)*(Inner.Properties.Average.T - Outer.Properties.Average.T); |
---|
| 909 | |
---|
| 910 | when InletInner.T < InletOuter.T switchto "outer"; |
---|
| 911 | |
---|
| 912 | end |
---|
| 913 | |
---|
| 914 | "Enthalpy of Outer Side - Inlet Boundary" |
---|
| 915 | Outer.HeatTransfer.Enth(1) = InletOuter.h; |
---|
| 916 | |
---|
| 917 | "Enthalpy of Outer Side - Outlet Boundary" |
---|
| 918 | Outer.HeatTransfer.Enth(Npoints) = OutletOuter.h; |
---|
| 919 | |
---|
| 920 | "Temperature of OuterSide - Inlet Boundary" |
---|
| 921 | Outer.HeatTransfer.Tlocal(1) = InletOuter.T; |
---|
| 922 | |
---|
| 923 | "Temperature of Outer Side - Outlet Boundary" |
---|
| 924 | Outer.HeatTransfer.Tlocal(Npoints) = OutletOuter.T; |
---|
| 925 | |
---|
| 926 | "Pressure of Outer Side - Inlet Boundary" |
---|
| 927 | Outer.PressureDrop.Plocal(1) = InletOuter.P; |
---|
| 928 | |
---|
| 929 | "Pressure of Outer Side - Outlet Boundary" |
---|
| 930 | Outer.PressureDrop.Plocal(Npoints) = OutletOuter.P; |
---|
| 931 | |
---|
| 932 | "Enthalpy of Inner Side - Inlet Boundary" |
---|
| 933 | Inner.HeatTransfer.Enth(Npoints) = InletInner.h; |
---|
| 934 | |
---|
| 935 | "Enthalpy of Inner Side - Outlet Boundary" |
---|
| 936 | Inner.HeatTransfer.Enth(1) = OutletInner.h; |
---|
| 937 | |
---|
| 938 | "Temperature of Inner Side - Inlet Boundary" |
---|
| 939 | Inner.HeatTransfer.Tlocal(Npoints) = InletInner.T; |
---|
| 940 | |
---|
| 941 | "Temperature of Inner Side - Outlet Boundary" |
---|
| 942 | Inner.HeatTransfer.Tlocal(1) = OutletInner.T; |
---|
| 943 | |
---|
| 944 | "Pressure of Inner Side - Inlet Boundary" |
---|
| 945 | Inner.PressureDrop.Plocal(Npoints) = InletInner.P; |
---|
| 946 | |
---|
| 947 | "Pressure of Inner Side - Outlet Boundary" |
---|
| 948 | Inner.PressureDrop.Plocal(1) = OutletInner.P; |
---|
| 949 | |
---|
[574] | 950 | for i in [1:N] do |
---|
[452] | 951 | |
---|
| 952 | "Inner Pipe Pressure Drop for friction" |
---|
| 953 | Inner.PressureDrop.Pd_fric(i) = (2*Inner.PressureDrop.fi(i)*Lincr(1+Npoints-i)*Inner.Properties.Average.rho(i)*Inner.HeatTransfer.Vmean(i)^2)/(DiInner*Inner.HeatTransfer.Phi(i)); |
---|
| 954 | |
---|
| 955 | end |
---|
| 956 | |
---|
| 957 | "Inner Pipe Pressure Drop for friction" |
---|
| 958 | Inner.PressureDrop.Pd_fric(Npoints) = 0*'kPa'; |
---|
| 959 | |
---|
| 960 | "Outer Pipe Pressure Drop for friction" |
---|
| 961 | Outer.PressureDrop.Pd_fric(2:Npoints) = (2*Outer.PressureDrop.fi*Lincr(2:Npoints)*Outer.Properties.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi); |
---|
| 962 | |
---|
| 963 | "Outer Pipe Pressure Drop for friction" |
---|
| 964 | Outer.PressureDrop.Pd_fric(1) = 0*'kPa'; |
---|
| 965 | |
---|
| 966 | end |
---|
| 967 | |
---|
| 968 | Model HairpinIncr |
---|
| 969 | |
---|
| 970 | ATTRIBUTES |
---|
| 971 | Pallete = true; |
---|
| 972 | Icon = "icon/hairpin"; |
---|
| 973 | Brief = "Incremental Hairpin Heat Exchanger. "; |
---|
| 974 | Info = |
---|
| 975 | "Incremental approach for Hairpin heat exchanger. |
---|
| 976 | OBS: LEFT = 0 e N = N, RIGTH= L e N=1 |
---|
| 977 | "; |
---|
| 978 | |
---|
| 979 | PARAMETERS |
---|
| 980 | |
---|
| 981 | outer PP as Plugin (Brief="External Physical Properties", Type="PP"); |
---|
| 982 | outer NComp as Integer (Brief="Number of Components"); |
---|
| 983 | Pi as constant (Brief="Pi Number",Default=3.14159265, Symbol = "\pi"); |
---|
| 984 | N as Integer (Brief="Number of zones", Default = 2); |
---|
| 985 | Npoints as Integer (Brief="Number of incremental points", Default = 3); |
---|
| 986 | |
---|
| 987 | DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e-6); |
---|
| 988 | DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e-10); |
---|
| 989 | DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e-10); |
---|
| 990 | Lpipe as length (Brief="Effective Tube Length of one segment of Pipe",Lower=0.1, Symbol = "L_{pipe}"); |
---|
| 991 | Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0, Symbol = "K_{wall}"); |
---|
| 992 | Rfi as positive (Brief="Inside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0); |
---|
| 993 | Rfo as positive (Brief="Outside Fouling Resistance",Unit='m^2*K/kW',Default=1e-6,Lower=0); |
---|
| 994 | |
---|
| 995 | Donozzle_Inner as length (Brief="Inner Side Outlet Nozzle Diameter",Default = 0.036,Lower=1e-6); |
---|
| 996 | Dinozzle_Inner as length (Brief="Inner Side Inlet Nozzle Diameter",Default = 0.036,Lower=1e-6); |
---|
| 997 | |
---|
| 998 | Donozzle_Outer as length (Brief="Outer Side Outlet Nozzle Diameter",Default = 0.036,Lower=1e-6); |
---|
| 999 | Dinozzle_Outer as length (Brief="Outer Side Inlet Nozzle Diameter",Default = 0.036,Lower=1e-6); |
---|
| 1000 | |
---|
| 1001 | InnerKinlet as positive (Brief="Inner Side Inlet Nozzle Pressure Loss Coeff",Default=1.1); |
---|
| 1002 | InnerKoutlet as positive (Brief="Inner Side Outlet Nozzle Pressure Loss Coeff",Default=0.7); |
---|
| 1003 | OuterKinlet as positive (Brief="Outer Side Inlet Nozzle Pressure Loss Coeff",Default=1.1); |
---|
| 1004 | OuterKoutlet as positive (Brief="Outer Side Outlet Nozzle Pressure Loss Coeff",Default=0.7); |
---|
| 1005 | |
---|
| 1006 | SET |
---|
| 1007 | |
---|
| 1008 | #"Pi Number" |
---|
| 1009 | Pi = 3.14159265; |
---|
| 1010 | |
---|
| 1011 | #"Number of incremental points" |
---|
| 1012 | Npoints = N+1; |
---|
| 1013 | |
---|
| 1014 | VARIABLES |
---|
| 1015 | |
---|
| 1016 | Summary as Summary_Hairpin (Brief="Results for The Whole Heat Exchanger"); |
---|
| 1017 | |
---|
| 1018 | UpperPipe as UpperPipe_basic (Brief="Upper Pipe Results"); |
---|
| 1019 | LowerPipe as LowerPipe_basic (Brief="Lower Pipe Results"); |
---|
| 1020 | |
---|
| 1021 | CONNECTIONS |
---|
| 1022 | |
---|
| 1023 | LowerPipe.OutletInner to UpperPipe.InletInner; |
---|
| 1024 | UpperPipe.OutletOuter to LowerPipe.InletOuter; |
---|
| 1025 | |
---|
| 1026 | EQUATIONS |
---|
| 1027 | |
---|
| 1028 | "Total Exchange Surface Area" |
---|
| 1029 | Summary.A = LowerPipe.Details.A+UpperPipe.Details.A; |
---|
| 1030 | |
---|
| 1031 | "Total Duty" |
---|
| 1032 | Summary.Qtotal = LowerPipe.Details.Qtotal+UpperPipe.Details.Qtotal; |
---|
| 1033 | |
---|
| 1034 | "Total Pressure Drop Inner Side" |
---|
| 1035 | Summary.Inner.Pdrop = Summary.Inner.Pdnozzle_in+Summary.Inner.Pdnozzle_out+LowerPipe.Inner.PressureDrop.Pd_fric(1) |
---|
| 1036 | +UpperPipe.Inner.PressureDrop.Pd_fric(Npoints); |
---|
| 1037 | |
---|
| 1038 | "Total Pressure Drop Outer Side" |
---|
| 1039 | Summary.Outer.Pdrop = Summary.Outer.Pdnozzle_in+Summary.Outer.Pdnozzle_out+LowerPipe.Outer.PressureDrop.Pd_fric(Npoints) |
---|
| 1040 | +UpperPipe.Outer.PressureDrop.Pd_fric(1); |
---|
| 1041 | |
---|
[574] | 1042 | for i in [1:N] do |
---|
[452] | 1043 | |
---|
| 1044 | "Outer Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED |
---|
| 1045 | UpperPipe.Outer.PressureDrop.Plocal(i) = UpperPipe.Outer.PressureDrop.Plocal(Npoints) - UpperPipe.Outer.PressureDrop.Pd_fric(i); |
---|
| 1046 | |
---|
| 1047 | "Inner Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED |
---|
| 1048 | UpperPipe.Inner.PressureDrop.Plocal(i+1) = UpperPipe.Inner.PressureDrop.Plocal(1) - UpperPipe.Inner.PressureDrop.Pd_fric(i+1); |
---|
| 1049 | |
---|
| 1050 | "Inner Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED |
---|
| 1051 | LowerPipe.Inner.PressureDrop.Plocal(i) = LowerPipe.Inner.PressureDrop.Plocal(Npoints) - LowerPipe.Inner.PressureDrop.Pd_fric(i); |
---|
| 1052 | |
---|
| 1053 | "Outer Pipe Local Pressure"# FIXME: NOZZLE PRESSURE DROP MUST BE ADDED |
---|
| 1054 | LowerPipe.Outer.PressureDrop.Plocal(i+1) = LowerPipe.Outer.PressureDrop.Plocal(1) - LowerPipe.Outer.PressureDrop.Pd_fric(i+1); |
---|
| 1055 | |
---|
| 1056 | end |
---|
| 1057 | |
---|
| 1058 | "Velocity Inner Side Inlet Nozzle" |
---|
| 1059 | Summary.Inner.Vnozzle_in = UpperPipe.Inner.Properties.Inlet.Fw/(UpperPipe.Inner.Properties.Inlet.rho*(0.25*Pi*Dinozzle_Inner^2)); |
---|
| 1060 | |
---|
| 1061 | "Velocity Inner Side Outlet Nozzle" |
---|
| 1062 | Summary.Inner.Vnozzle_out = LowerPipe.Inner.Properties.Outlet.Fw/(LowerPipe.Inner.Properties.Outlet.rho*(0.25*Pi*Donozzle_Inner^2)); |
---|
| 1063 | |
---|
| 1064 | "Velocity Outer Side Inlet Nozzle" |
---|
| 1065 | Summary.Outer.Vnozzle_in = LowerPipe.Outer.Properties.Inlet.Fw/(LowerPipe.Outer.Properties.Inlet.rho*(0.25*Pi*Dinozzle_Outer^2)); |
---|
| 1066 | |
---|
| 1067 | "Velocity Outer Side Outlet Nozzle" |
---|
| 1068 | Summary.Outer.Vnozzle_out = UpperPipe.Outer.Properties.Outlet.Fw/(UpperPipe.Outer.Properties.Outlet.rho*(0.25*Pi*Donozzle_Outer^2)); |
---|
| 1069 | |
---|
| 1070 | "Pressure Drop Inner Side Inlet Nozzle" |
---|
| 1071 | Summary.Inner.Pdnozzle_in = 0.5*InnerKinlet*UpperPipe.Inner.Properties.Inlet.rho*Summary.Inner.Vnozzle_in^2; |
---|
| 1072 | |
---|
| 1073 | "Pressure Drop Inner Side Outlet Nozzle" |
---|
| 1074 | Summary.Inner.Pdnozzle_out = 0.5*InnerKoutlet*LowerPipe.Inner.Properties.Outlet.rho*Summary.Inner.Vnozzle_out^2; |
---|
| 1075 | |
---|
| 1076 | "Pressure Drop Outer Side Inlet Nozzle" |
---|
| 1077 | Summary.Outer.Pdnozzle_in = 0.5*OuterKinlet*LowerPipe.Outer.Properties.Inlet.rho*Summary.Outer.Vnozzle_in^2; |
---|
| 1078 | |
---|
| 1079 | "Pressure Drop Outer Side Outlet Nozzle" |
---|
| 1080 | Summary.Outer.Pdnozzle_out = 0.5*OuterKoutlet*UpperPipe.Outer.Properties.Outlet.rho*Summary.Outer.Vnozzle_out^2; |
---|
| 1081 | |
---|
| 1082 | "Inner Side Inlet Nozzle rho-V^2" |
---|
| 1083 | Summary.Inner.RVsquare_in = UpperPipe.Inner.Properties.Inlet.rho*(Summary.Inner.Vnozzle_in)^2; |
---|
| 1084 | |
---|
| 1085 | "Inner Side Outlet Nozzle rho-V^2" |
---|
| 1086 | Summary.Inner.RVsquare_out = LowerPipe.Inner.Properties.Outlet.rho*(Summary.Inner.Vnozzle_out)^2; |
---|
| 1087 | |
---|
| 1088 | "Outer Side Inlet Nozzle rho-V^2" |
---|
| 1089 | Summary.Outer.RVsquare_in = LowerPipe.Outer.Properties.Inlet.rho*(Summary.Outer.Vnozzle_in)^2; |
---|
| 1090 | |
---|
| 1091 | "Outer Side Outlet Nozzle rho-V^2" |
---|
| 1092 | Summary.Outer.RVsquare_out = UpperPipe.Outer.Properties.Outlet.rho*(Summary.Outer.Vnozzle_out)^2; |
---|
| 1093 | |
---|
| 1094 | "Average Film Coefficient Outer Side" |
---|
| 1095 | Summary.Outer.hcoeff = sum(UpperPipe.Outer.HeatTransfer.hcoeff+LowerPipe.Outer.HeatTransfer.hcoeff)/(2*N); |
---|
| 1096 | |
---|
| 1097 | "Average Film Coefficient Inner Side" |
---|
| 1098 | Summary.Inner.hcoeff = sum(UpperPipe.Inner.HeatTransfer.hcoeff+LowerPipe.Inner.HeatTransfer.hcoeff)/(2*N); |
---|
| 1099 | |
---|
| 1100 | end |
---|