- Location:
- /mso
- Files:
-
- 4 deleted
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
/mso/eml/heat_exchangers
- Property svn:ignore deleted
-
/mso/eml/heat_exchangers/HEX_Engine.mso
r71 r63 38 38 * Basic_Pdrop : Hot and Cold Side Pressure Drop 39 39 *---------------------------------------------------------------------- 40 * - Main_DoublePipe : Double Pipe Heat Exchanger Block41 * DoublePipe_HeatTransfer42 * DoublePipe_PressureDrop43 *----------------------------------------------------------------------44 40 * Author: Gerson Balbueno Bicca 45 41 * $Id$ … … 281 277 Cold as Basic_Pdrop;# Cold Stream 282 278 end 283 284 Model DoublePipe_HeatTransfer285 #=====================================================================286 # Heat Transfer287 #=====================================================================288 PARAMETERS289 As as area (Brief="Cross Sectional Area for Flow",Default=0.05,Lower=1e-8);290 Dh as length (Brief="Hydraulic Diameter of Pipe for Heat Transfer",Lower=1e-8);291 292 VARIABLES293 Re as positive (Brief="Reynolds Number",Default=100,Lower=1);294 hcoeff as heat_trans_coeff (Brief="Film Coefficient",Default=1,Lower=1e-12, Upper=1e6);295 PR as positive (Brief="Prandtl Number",Default=0.5,Lower=1e-8);296 Phi as positive (Brief="Phi Correction",Default=1,Lower=1e-3);297 Vmean as velocity (Brief="Tube Velocity",Lower=1e-8);298 end299 300 Model DoublePipe_PressureDrop301 #=====================================================================302 # Pressure Drop303 #=====================================================================304 PARAMETERS305 Dh as length (Brief="Hydraulic Diameter of Pipe for Pressure Drop",Lower=1e-6);306 307 VARIABLES308 Pdrop as press_delta (Brief="Pressure Drop",Default=0.01, Lower=1e-10);309 fi as fricfactor (Brief="Friction Factor", Default=0.05, Lower=1e-10, Upper=2000);310 Re as positive (Brief="Reynolds Number",Default=100,Lower=1);311 end312 313 Model Main_DoublePipe314 VARIABLES315 HeatTransfer as DoublePipe_HeatTransfer;316 PressureDrop as DoublePipe_PressureDrop;317 end -
/mso/eml/heat_exchangers/HeatExchangerDetailed.mso
r71 r63 165 165 then 166 166 167 "H ot Stream Average Heat Capacity"167 "Heat Capacity Hot Stream" 168 168 Properties.Hot.Average.Cp = PP.LiquidCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 169 170 "Hot Stream Inlet Heat Capacity"171 169 Properties.Hot.Inlet.Cp = PP.LiquidCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 172 173 "Hot Stream Outlet Heat Capacity"174 170 Properties.Hot.Outlet.Cp = PP.LiquidCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 175 171 176 " Hot Stream Average Mass Density"172 "Mass Density Hot Stream" 177 173 Properties.Hot.Average.rho = PP.LiquidDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 178 179 "Hot Stream Inlet Mass Density"180 174 Properties.Hot.Inlet.rho = PP.LiquidDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 181 182 "Hot Stream Outlet Mass Density"183 175 Properties.Hot.Outlet.rho = PP.LiquidDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 184 176 185 " Hot Stream Average Viscosity"177 "Viscosity Hot Stream" 186 178 Properties.Hot.Average.Mu = PP.LiquidViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 187 188 "Hot Stream Inlet Viscosity"189 179 Properties.Hot.Inlet.Mu = PP.LiquidViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 190 191 "Hot Stream Outlet Viscosity"192 180 Properties.Hot.Outlet.Mu = PP.LiquidViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 193 181 194 "Hot Stream Average Conductivity" 195 Properties.Hot.Average.K = PP.LiquidThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 196 197 "Hot Stream Inlet Conductivity" 198 Properties.Hot.Inlet.K = PP.LiquidThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 199 200 "Hot Stream Outlet Conductivity" 201 Properties.Hot.Outlet.K = PP.LiquidThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 202 203 "Hot Stream Heat Capacity at Wall Temperature" 204 Properties.Hot.Wall.Cp = PP.LiquidCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 205 206 "Hot Stream Viscosity at Wall Temperature" 207 Properties.Hot.Wall.Mu = PP.LiquidViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 208 209 "Hot Stream Conductivity at Wall Temperature" 210 Properties.Hot.Wall.K = PP.LiquidThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 211 212 213 else 214 215 "Hot Stream Average Heat Capacity" 182 "Conductivity Hot Stream" 183 Properties.Hot.Average.K = PP.LiquidThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 184 Properties.Hot.Inlet.K = PP.LiquidThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 185 Properties.Hot.Outlet.K = PP.LiquidThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 186 187 "Heat Capacity Hot Stream" 188 Properties.Hot.Wall.Cp = PP.LiquidCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 189 190 "Viscosity Hot Stream" 191 Properties.Hot.Wall.Mu = PP.LiquidViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 192 193 "Conductivity Hot Stream" 194 Properties.Hot.Wall.K = PP.LiquidThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 195 196 197 else 198 199 "Heat Capacity Hot Stream" 216 200 Properties.Hot.Average.Cp = PP.VapourCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 217 218 "Hot Stream Inlet Heat Capacity"219 201 Properties.Hot.Inlet.Cp = PP.VapourCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 220 221 "Hot Stream Outlet Heat Capacity"222 202 Properties.Hot.Outlet.Cp = PP.VapourCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 223 203 224 " Hot Stream Average Mass Density"204 "Mass Density Hot Stream" 225 205 Properties.Hot.Average.rho = PP.VapourDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 226 227 "Hot Stream Inlet Mass Density"228 206 Properties.Hot.Inlet.rho = PP.VapourDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 229 230 "Hot Stream Outlet Mass Density"231 207 Properties.Hot.Outlet.rho = PP.VapourDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 232 208 233 " Hot Stream Average Viscosity"209 "Viscosity Hot Stream" 234 210 Properties.Hot.Average.Mu = PP.VapourViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 235 236 "Hot Stream Inlet Viscosity"237 211 Properties.Hot.Inlet.Mu = PP.VapourViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 238 239 "Hot Stream Outlet Viscosity"240 212 Properties.Hot.Outlet.Mu = PP.VapourViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 241 213 242 "Hot Stream Average Conductivity" 243 Properties.Hot.Average.K = PP.VapourThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 244 245 "Hot Stream Inlet Conductivity" 246 Properties.Hot.Inlet.K = PP.VapourThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 247 248 "Hot Stream Outlet Conductivity" 249 Properties.Hot.Outlet.K = PP.VapourThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 250 251 "Hot Stream Heat Capacity at Wall Temperature" 252 Properties.Hot.Wall.Cp = PP.VapourCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 253 254 "Hot Stream Viscosity at Wall Temperature" 255 Properties.Hot.Wall.Mu = PP.VapourViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 256 257 "Hot Stream Conductivity at Wall Temperature" 258 Properties.Hot.Wall.K = PP.VapourThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 214 "Conductivity Hot Stream" 215 Properties.Hot.Average.K = PP.VapourThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 216 Properties.Hot.Inlet.K = PP.VapourThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 217 Properties.Hot.Outlet.K = PP.VapourThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 218 219 "Heat Capacity Hot Stream" 220 Properties.Hot.Wall.Cp = PP.VapourCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 221 222 "Viscosity Hot Stream" 223 Properties.Hot.Wall.Mu = PP.VapourViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 224 225 "Conductivity Hot Stream" 226 Properties.Hot.Wall.K = PP.VapourThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 259 227 260 228 … … 455 423 456 424 "Shell Side Phi correction" 457 Shell.HeatTransfer.Phi 425 Shell.HeatTransfer.Phi = HE.PhiCorrection(Properties.Hot.Average.Mu,Properties.Hot.Wall.Mu); 458 426 459 427 "Tube Side Phi correction" … … 463 431 464 432 "Shell Side Phi correction" 465 Shell.HeatTransfer.Phi 433 Shell.HeatTransfer.Phi = HE.PhiCorrection(Properties.Cold.Average.Mu,Properties.Cold.Wall.Mu); 466 434 467 435 "Tube Side Phi correction" … … 481 449 482 450 "Hot Wall Temperature" 483 Properties.Hot.Wall.Twall 451 Properties.Hot.Wall.Twall = (Properties.Hot.Average.T+Properties.Cold.Average.T)/2; 484 452 485 453 "ColdWall Temperature" … … 487 455 488 456 "Tube Side Velocity" 489 Tubes.HeatTransfer.Vtube 457 Tubes.HeatTransfer.Vtube = Properties.Cold.Inlet.Fw*Tpass/((Pi*Ditube*Ditube/4)*Properties.Cold.Average.rho*Ntt); 490 458 491 459 "Tube Side Reynolds Number" 492 Tubes.HeatTransfer.Re =(Properties.Cold.Average.rho*Tubes.HeatTransfer.Vtube*Ditube)/Properties.Cold.Average.Mu;460 Tubes.HeatTransfer.Re = (Properties.Cold.Average.rho*Tubes.HeatTransfer.Vtube*Ditube)/Properties.Cold.Average.Mu; 493 461 494 462 "Tube Side Prandtl Number" 495 Tubes.HeatTransfer.PR 463 Tubes.HeatTransfer.PR = ((Properties.Cold.Average.Cp/Properties.Cold.Average.Mw)*Properties.Cold.Average.Mu)/Properties.Cold.Average.K; 496 464 497 465 "Tube Side Prandtl Number at Wall Temperature" 498 Tubes.HeatTransfer.PRw 466 Tubes.HeatTransfer.PRw = ((Properties.Cold.Wall.Cp/Properties.Cold.Average.Mw)*Properties.Cold.Wall.Mu)/Properties.Cold.Wall.K; 499 467 500 468 "Tube Side Film Coefficient" 501 Tubes.HeatTransfer.htube 469 Tubes.HeatTransfer.htube= HE.TubeFilmCoeff(Tubes.HeatTransfer.Re,Tubes.HeatTransfer.PR,Properties.Cold.Average.K)*Tubes.HeatTransfer.Phi; 502 470 503 471 "Shell Side Prandtl Number" 504 Shell.HeatTransfer.PR 472 Shell.HeatTransfer.PR = ((Properties.Hot.Average.Cp/Properties.Hot.Average.Mw)*Properties.Hot.Average.Mu)/Properties.Hot.Average.K; 505 473 506 474 "Shell Side Prandtl Number at Wall Temperature" 507 Shell.HeatTransfer.PRw 475 Shell.HeatTransfer.PRw = ((Properties.Hot.Wall.Cp/Properties.Hot.Average.Mw)*Properties.Hot.Wall.Mu)/Properties.Hot.Wall.K; 508 476 509 477 "Tube Side Pressure Drop" … … 529 497 530 498 "Shell Pressure Drop Outlet Nozzle" 531 Shell.PressureDrop.Pdnozzle_out = 499 Shell.PressureDrop.Pdnozzle_out =HE.DeltaPshellNozzleOut(Properties.Hot.Outlet.rho,Properties.Hot.Inlet.Fw); 532 500 533 501 "Velocity Shell Side Outlet Nozzle" … … 653 621 654 622 VARIABLES 655 656 623 DT0 as temp_delta (Brief="Temperature Difference at Inlet",Lower=1); 657 624 DTL as temp_delta (Brief="Temperature Difference at Outlet",Lower=1); … … 1328 1295 VARIABLES 1329 1296 1330 LMTD(Nshell) as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower= 5);1331 Fc(Nshell) as positive (Brief="LMTD Correction Factor",Lower=0. 5);1332 MTD(Nshell) as temp_delta (Brief="Mean Temperature Difference" ,Lower=5);1297 LMTD(Nshell) as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=10); 1298 Fc(Nshell) as positive (Brief="LMTD Correction Factor",Lower=0.75); 1299 MTD(Nshell) as temp_delta (Brief="Mean Temperature Difference"); 1333 1300 Unity(Nshell) as HeatExchangerDetailed_Basic; 1334 1301 … … 1548 1515 1549 1516 "Overall Heat Transfer Coefficient" 1550 Unity(i).Details.U *(Dotube/(Unity(i).Tubes.HeatTransfer.htube*Ditube)+(Dotube*ln(Dotube/Ditube)/(2*Kwall))+(1/(Unity(i).Shell.HeatTransfer.hshell)))=1;1517 Unity(i).Details.U=1/(Dotube/(Unity(i).Tubes.HeatTransfer.htube*Ditube)+(Dotube*ln(Dotube/Ditube)/(2*Kwall))+(1/(Unity(i).Shell.HeatTransfer.hshell))); 1551 1518 1552 1519 "Exchange Surface Area" … … 1606 1573 1607 1574 "Exchange Surface Area" 1608 # Unity(i).Details.Q = Unity(i).Details.U*Unity(i).Details.A*Fc(i)*LMTD(i); 1609 Unity(i).Details.Q = Unity(i).Details.U*Pi*Dotube*Ntt*Ltube*Fc(i)*LMTD(i); 1575 Unity(i).Details.Q = Unity(i).Details.U*Unity(i).Details.A*Fc(i)*LMTD(i); 1610 1576 1611 1577 "Mean Temperature Difference" -
/mso/eml/heat_exchangers/HeatExchangerDiscretized.mso
r71 r63 60 60 then 61 61 62 " Cold Stream Average Heat Capacity"62 "Heat Capacity Cold Stream" 63 63 Properties.Cold.Average.Cp = PP.LiquidCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 64 65 "Cold Stream Inlet Heat Capacity"66 64 Properties.Cold.Inlet.Cp = PP.LiquidCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 67 68 "Cold Stream Outlet Heat Capacity"69 65 Properties.Cold.Outlet.Cp = PP.LiquidCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 70 66 71 " Cold Stream Average Mass Density"67 "Mass Density Cold Stream" 72 68 Properties.Cold.Average.rho = PP.LiquidDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 73 74 "Cold Stream Inlet Mass Density"75 69 Properties.Cold.Inlet.rho = PP.LiquidDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 76 77 "Cold Stream Outlet Mass Density"78 70 Properties.Cold.Outlet.rho = PP.LiquidDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 79 71 80 "Cold Stream Average Viscosity" 81 Properties.Cold.Average.Mu = PP.LiquidViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 82 83 "Cold Stream inlet Viscosity" 84 Properties.Cold.Inlet.Mu = PP.LiquidViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 85 86 "Cold Stream Outlet Viscosity" 87 Properties.Cold.Outlet.Mu = PP.LiquidViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 88 89 "Cold Stream Average Conductivity" 90 Properties.Cold.Average.K = PP.LiquidThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 91 92 "Cold Stream Inlet Conductivity" 93 Properties.Cold.Inlet.K = PP.LiquidThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 94 95 "Cold Stream Outlet Conductivity" 96 Properties.Cold.Outlet.K = PP.LiquidThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 97 98 "Cold Stream Heat Capacity at Wall Temperature" 72 "Viscosity Cold Stream" 73 Properties.Cold.Average.Mu = PP.LiquidViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 74 Properties.Cold.Inlet.Mu = PP.LiquidViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 75 Properties.Cold.Outlet.Mu = PP.LiquidViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 76 77 "Conductivity Cold Stream" 78 Properties.Cold.Average.K = PP.LiquidThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 79 Properties.Cold.Inlet.K = PP.LiquidThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 80 Properties.Cold.Outlet.K = PP.LiquidThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 81 82 "Heat Capacity Cold Stream" 99 83 Properties.Cold.Wall.Cp = PP.LiquidCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 100 84 101 " Cold Stream Viscosity at Wall Temperature"102 Properties.Cold.Wall.Mu 103 104 "Co ld Stream Conductivity at Wall Temperature"105 Properties.Cold.Wall.K 85 "Viscosity Cold Stream" 86 Properties.Cold.Wall.Mu = PP.LiquidViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 87 88 "Conductivity Cold Stream" 89 Properties.Cold.Wall.K = PP.LiquidThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 106 90 107 91 108 92 else 109 93 110 " Cold Stream Average Heat Capacity"94 "Heat Capacity Cold Stream" 111 95 Properties.Cold.Average.Cp = PP.VapourCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 112 113 "Cold Stream Inlet Heat Capacity"114 96 Properties.Cold.Inlet.Cp = PP.VapourCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 115 116 "Cold Stream Outlet Heat Capacity"117 97 Properties.Cold.Outlet.Cp = PP.VapourCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 118 98 119 "Cold Stream Average Mass Density" 120 Properties.Cold.Average.rho = PP.VapourDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 121 122 "Cold Stream Inlet Mass Density" 99 "Mass Density Cold Stream" 100 Properties.Cold.Average.rho = PP.VapourDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 123 101 Properties.Cold.Inlet.rho = PP.VapourDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 124 125 "Cold Stream Outlet Mass Density"126 102 Properties.Cold.Outlet.rho = PP.VapourDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 127 103 128 "Cold Stream Average Viscosity " 129 Properties.Cold.Average.Mu = PP.VapourViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 130 131 "Cold Stream Inlet Viscosity " 132 Properties.Cold.Inlet.Mu = PP.VapourViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 133 134 "Cold Stream Outlet Viscosity " 135 Properties.Cold.Outlet.Mu = PP.VapourViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 136 137 "Cold Stream Average Conductivity " 138 Properties.Cold.Average.K = PP.VapourThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 139 140 "Cold Stream Inlet Conductivity " 141 Properties.Cold.Inlet.K = PP.VapourThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 142 143 "Cold Stream Outlet Conductivity " 144 Properties.Cold.Outlet.K = PP.VapourThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 145 146 "Cold Stream Heat Capacity at Wall Temperature" 104 "Viscosity Cold Stream" 105 Properties.Cold.Average.Mu = PP.VapourViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 106 Properties.Cold.Inlet.Mu = PP.VapourViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 107 Properties.Cold.Outlet.Mu = PP.VapourViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 108 109 "Conductivity Cold Stream" 110 Properties.Cold.Average.K = PP.VapourThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 111 Properties.Cold.Inlet.K = PP.VapourThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 112 Properties.Cold.Outlet.K = PP.VapourThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 113 114 "Heat Capacity Cold Stream" 147 115 Properties.Cold.Wall.Cp = PP.VapourCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 148 116 149 117 150 "Cold Stream Viscosity at Wall Temperature" 151 Properties.Cold.Wall.Mu = PP.VapourViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 152 153 "Cold Stream Conductivity at Wall Temperature" 154 Properties.Cold.Wall.K = PP.VapourThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 155 156 157 158 end 159 118 "Viscosity Cold Stream" 119 Properties.Cold.Wall.Mu = PP.VapourViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 120 121 "Conductivity Cold Stream" 122 Properties.Cold.Wall.K = PP.VapourThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 123 124 125 126 end 160 127 161 128 if Inlet.Hot.v equal 0 … … 163 130 then 164 131 165 "H ot Stream Average Heat Capacity"132 "Heat Capacity Hot Stream" 166 133 Properties.Hot.Average.Cp = PP.LiquidCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 167 168 "Hot Stream Inlet Heat Capacity"169 134 Properties.Hot.Inlet.Cp = PP.LiquidCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 170 171 "Hot Stream Outlet Heat Capacity"172 135 Properties.Hot.Outlet.Cp = PP.LiquidCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 173 136 174 " Hot Stream Average Mass Density"137 "Mass Density Hot Stream" 175 138 Properties.Hot.Average.rho = PP.LiquidDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 176 177 "Hot Stream Inlet Mass Density"178 139 Properties.Hot.Inlet.rho = PP.LiquidDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 179 180 "Hot Stream Outlet Mass Density"181 140 Properties.Hot.Outlet.rho = PP.LiquidDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 182 141 183 " Hot Stream Average Viscosity"142 "Viscosity Hot Stream" 184 143 Properties.Hot.Average.Mu = PP.LiquidViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 185 186 "Hot Stream Inlet Viscosity"187 144 Properties.Hot.Inlet.Mu = PP.LiquidViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 188 189 "Hot Stream Outlet Viscosity"190 145 Properties.Hot.Outlet.Mu = PP.LiquidViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 191 146 192 " Hot Stream Average Conductivity"147 "Conductivity Hot Stream" 193 148 Properties.Hot.Average.K = PP.LiquidThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 194 195 "Hot Stream Inlet Conductivity" 196 Properties.Hot.Inlet.K = PP.LiquidThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 197 198 "Hot Stream Outlet Conductivity" 149 Properties.Hot.Inlet.K = PP.LiquidThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 199 150 Properties.Hot.Outlet.K = PP.LiquidThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 200 151 201 "H ot Stream Heat Capacity at Wall Temperature"202 Properties.Hot.Wall.Cp 203 204 " Hot Stream Viscosity at Wall Temperature"205 Properties.Hot.Wall.Mu 206 207 " Hot Stream Conductivity at Wall Temperature"208 Properties.Hot.Wall.K 152 "Heat Capacity Hot Stream" 153 Properties.Hot.Wall.Cp = PP.LiquidCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 154 155 "Viscosity Hot Stream" 156 Properties.Hot.Wall.Mu = PP.LiquidViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 157 158 "Conductivity Hot Stream" 159 Properties.Hot.Wall.K = PP.LiquidThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 209 160 210 161 211 162 else 212 163 213 "H ot Stream Average Heat Capacity"164 "Heat Capacity Hot Stream" 214 165 Properties.Hot.Average.Cp = PP.VapourCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 215 216 "Hot Stream Inlet Heat Capacity"217 166 Properties.Hot.Inlet.Cp = PP.VapourCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 218 219 "Hot Stream Outlet Heat Capacity"220 167 Properties.Hot.Outlet.Cp = PP.VapourCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 221 168 222 " Hot Stream Average Mass Density"169 "Mass Density Hot Stream" 223 170 Properties.Hot.Average.rho = PP.VapourDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 224 225 "Hot Stream Inlet Mass Density"226 171 Properties.Hot.Inlet.rho = PP.VapourDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 227 228 "Hot Stream Outlet Mass Density"229 172 Properties.Hot.Outlet.rho = PP.VapourDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 230 173 231 " Hot Stream Average Viscosity"174 "Viscosity Hot Stream" 232 175 Properties.Hot.Average.Mu = PP.VapourViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 233 234 "Hot Stream Inlet Viscosity"235 176 Properties.Hot.Inlet.Mu = PP.VapourViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 236 237 "Hot Stream Outlet Viscosity"238 177 Properties.Hot.Outlet.Mu = PP.VapourViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 239 178 240 " Hot Stream Average Conductivity"179 "Conductivity Hot Stream" 241 180 Properties.Hot.Average.K = PP.VapourThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 242 243 "Hot Stream Inlet Conductivity" 244 Properties.Hot.Inlet.K = PP.VapourThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 245 246 "Hot Stream Outlet Conductivity" 181 Properties.Hot.Inlet.K = PP.VapourThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 247 182 Properties.Hot.Outlet.K = PP.VapourThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 248 183 249 "H ot Stream Heat Capacity at Wall Temperature"250 Properties.Hot.Wall.Cp 251 252 " Hot Stream Viscosity at Wall Temperature"253 Properties.Hot.Wall.Mu 254 255 " Hot Stream Conductivity at Wall Temperature"256 Properties.Hot.Wall.K 184 "Heat Capacity Hot Stream" 185 Properties.Hot.Wall.Cp = PP.VapourCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 186 187 "Viscosity Hot Stream" 188 Properties.Hot.Wall.Mu = PP.VapourViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 189 190 "Conductivity Hot Stream" 191 Properties.Hot.Wall.K = PP.VapourThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 257 192 258 193 … … 338 273 "TEMA E Shell Effectiveness" 339 274 Eft = HE.EshellEffectiveness(Details.Cr,Details.NTU); 340 275 341 276 end 342 277 … … 357 292 MTD = Fc*LMTD; 358 293 359 "LMTD Correction Factor"360 Fc = HE.EshellCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T);294 #"LMTD Correction Factor" 295 # Fc = HE.EshellCorrectionFactor(Inlet.Hot.T,Outlet.Hot.T,Inlet.Cold.T,Outlet.Cold.T); 361 296 362 297 "Temperature Difference at Inlet" … … 810 745 811 746 "Overall Heat Transfer Coefficient" 812 Unity(i).Details.U *(Dotube/(Unity(i).Tubes.HeatTransfer.htube*Ditube)+(Dotube*ln(Dotube/Ditube)/(2*Kwall))+(1/(Unity(i).Shell.HeatTransfer.hshell)))=1;747 Unity(i).Details.U = 1/(Dotube/(Unity(i).Tubes.HeatTransfer.htube*Ditube)+(Dotube*ln(Dotube/Ditube)/(2*Kwall))+(1/(Unity(i).Shell.HeatTransfer.hshell))); 813 748 814 749 "Exchange Surface Area" … … 1020 955 Unity(Nb+1).Shell.HeatTransfer.Sm = HE.CrossFlowArea(Unity(Nb+1).Baffles.Lso); 1021 956 1022 #"LMTD Correction Factor"1023 #Unity.Fc = HE.EshellCorrectionFactor(Unity(1).Inlet.Hot.T,Unity(Nb+1).Outlet.Hot.T,Unity(Nb+1).Inlet.Cold.T,Unity(1).Outlet.Cold.T);957 "LMTD Correction Factor" 958 Unity.Fc = HE.EshellCorrectionFactor(Unity(1).Inlet.Hot.T,Unity(Nb+1).Outlet.Hot.T,Unity(Nb+1).Inlet.Cold.T,Unity(1).Outlet.Cold.T); 1024 959 1025 960 if side equal 1 … … 1299 1234 1300 1235 "Overall Heat Transfer Coefficient" 1301 Unity(i).Details.U *(Dotube/(Unity(i).Tubes.HeatTransfer.htube*Ditube)+(Dotube*ln(Dotube/Ditube)/(2*Kwall))+(1/(Unity(i).Shell.HeatTransfer.hshell)))=1;1236 Unity(i).Details.U = 1/(Dotube/(Unity(i).Tubes.HeatTransfer.htube*Ditube)+(Dotube*ln(Dotube/Ditube)/(2*Kwall))+(1/(Unity(i).Shell.HeatTransfer.hshell))); 1302 1237 1303 1238 "Exchange Surface Area" -
/mso/eml/heat_exchangers/HeatExchangerSimplified.mso
r71 r63 53 53 54 54 55 55 56 if Inlet.Cold.v equal 0 56 57 57 then 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); 61 62 "Cold Stream Inlet Heat Capacity" 63 Properties.Cold.Inlet.Cp = PP.LiquidCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 64 65 "Cold Stream Outlet Heat Capacity" 66 Properties.Cold.Outlet.Cp = PP.LiquidCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 67 68 "Cold Stream Average Mass Density" 69 Properties.Cold.Average.rho = PP.LiquidDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 70 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); 82 83 "Cold Stream Outlet Viscosity" 84 Properties.Cold.Outlet.Mu = PP.LiquidViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 85 86 "Cold Stream Average Conductivity" 87 Properties.Cold.Average.K = PP.LiquidThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 88 89 "Cold Stream Inlet Conductivity" 90 Properties.Cold.Inlet.K = PP.LiquidThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 91 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); 58 "Heat Capacity Cold Stream" 59 Properties.Cold.Average.Cp = PP.LiquidCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 60 Properties.Cold.Inlet.Cp = PP.LiquidCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 61 Properties.Cold.Outlet.Cp = PP.LiquidCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 62 63 "Mass Density Cold Stream" 64 Properties.Cold.Average.rho = PP.LiquidDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 65 Properties.Cold.Inlet.rho = PP.LiquidDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 66 Properties.Cold.Outlet.rho = PP.LiquidDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 67 68 "Viscosity Cold Stream" 69 Properties.Cold.Average.Mu = PP.LiquidViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 70 Properties.Cold.Inlet.Mu = PP.LiquidViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 71 Properties.Cold.Outlet.Mu = PP.LiquidViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 72 73 "Conductivity Cold Stream" 74 Properties.Cold.Average.K = PP.LiquidThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 75 Properties.Cold.Inlet.K = PP.LiquidThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 76 Properties.Cold.Outlet.K = PP.LiquidThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 77 78 "Heat Capacity Cold Stream" 79 Properties.Cold.Wall.Cp = PP.LiquidCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 80 81 "Viscosity Cold Stream" 82 Properties.Cold.Wall.Mu = PP.LiquidViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 83 84 "Conductivity Cold Stream" 85 Properties.Cold.Wall.K = PP.LiquidThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 103 86 104 87 105 88 else 106 89 107 " Cold Stream Average Heat Capacity"90 "Heat Capacity Cold Stream" 108 91 Properties.Cold.Average.Cp = PP.VapourCp(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 109 110 "Cold Stream Inlet Heat Capacity"111 92 Properties.Cold.Inlet.Cp = PP.VapourCp(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 112 113 "Cold Stream Outlet Heat Capacity"114 93 Properties.Cold.Outlet.Cp = PP.VapourCp(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 115 94 116 "Cold Stream Average Mass Density" 117 Properties.Cold.Average.rho = PP.VapourDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 118 119 "Cold Stream Inlet Mass Density" 120 Properties.Cold.Inlet.rho = PP.VapourDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 121 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); 142 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); 145 146 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); 149 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); 95 "Mass Density Cold Stream" 96 Properties.Cold.Average.rho = PP.VapourDensity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 97 Properties.Cold.Inlet.rho = PP.VapourDensity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 98 Properties.Cold.Outlet.rho = PP.VapourDensity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 99 100 "Viscosity Cold Stream" 101 Properties.Cold.Average.Mu = PP.VapourViscosity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 102 Properties.Cold.Inlet.Mu = PP.VapourViscosity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 103 Properties.Cold.Outlet.Mu = PP.VapourViscosity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 104 105 "Conductivity Cold Stream" 106 Properties.Cold.Average.K = PP.VapourThermalConductivity(Properties.Cold.Average.T,Properties.Cold.Average.P,Inlet.Cold.z); 107 Properties.Cold.Inlet.K = PP.VapourThermalConductivity(Inlet.Cold.T,Inlet.Cold.P,Inlet.Cold.z); 108 Properties.Cold.Outlet.K = PP.VapourThermalConductivity(Outlet.Cold.T,Outlet.Cold.P,Outlet.Cold.z); 109 110 "Heat Capacity Cold Stream" 111 Properties.Cold.Wall.Cp = PP.VapourCp(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 112 113 114 "Viscosity Cold Stream" 115 Properties.Cold.Wall.Mu = PP.VapourViscosity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 116 117 "Conductivity Cold Stream" 118 Properties.Cold.Wall.K = PP.VapourThermalConductivity(Properties.Cold.Wall.Twall,Properties.Cold.Average.P,Inlet.Cold.z); 152 119 153 120 … … 159 126 then 160 127 161 "H ot Stream Average Heat Capacity"128 "Heat Capacity Hot Stream" 162 129 Properties.Hot.Average.Cp = PP.LiquidCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 163 164 "Hot Stream Inlet Heat Capacity"165 130 Properties.Hot.Inlet.Cp = PP.LiquidCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 166 167 "Hot Stream Outlet Heat Capacity"168 131 Properties.Hot.Outlet.Cp = PP.LiquidCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 169 132 170 " Hot Stream Average Mass Density"133 "Mass Density Hot Stream" 171 134 Properties.Hot.Average.rho = PP.LiquidDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 172 173 "Hot Stream Inlet Mass Density"174 135 Properties.Hot.Inlet.rho = PP.LiquidDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 175 176 "Hot Stream Outlet Mass Density"177 136 Properties.Hot.Outlet.rho = PP.LiquidDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 178 137 179 " Hot Stream Average Viscosity"138 "Viscosity Hot Stream" 180 139 Properties.Hot.Average.Mu = PP.LiquidViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 181 182 "Hot Stream Inlet Viscosity"183 140 Properties.Hot.Inlet.Mu = PP.LiquidViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 184 185 "Hot Stream Outlet Viscosity"186 141 Properties.Hot.Outlet.Mu = PP.LiquidViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 187 142 188 " Hot Stream Average Conductivity"143 "Conductivity Hot Stream" 189 144 Properties.Hot.Average.K = PP.LiquidThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 190 191 "Hot Stream Inlet Conductivity"192 145 Properties.Hot.Inlet.K = PP.LiquidThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 193 194 "Hot Stream Outlet Conductivity"195 146 Properties.Hot.Outlet.K = PP.LiquidThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 196 147 197 "H ot Stream Heat Capacity at Wall Temperature"148 "Heat Capacity Hot Stream" 198 149 Properties.Hot.Wall.Cp = PP.LiquidCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 199 150 200 " Hot Stream Viscosity at Wall Temperature"151 "Viscosity Hot Stream" 201 152 Properties.Hot.Wall.Mu = PP.LiquidViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 202 153 203 " Hot Stream Conductivity at Wall Temperature"154 "Conductivity Hot Stream" 204 155 Properties.Hot.Wall.K = PP.LiquidThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 205 156 … … 207 158 else 208 159 209 "H ot Stream Average Heat Capacity"160 "Heat Capacity Hot Stream" 210 161 Properties.Hot.Average.Cp = PP.VapourCp(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 211 212 "Hot Stream Inlet Heat Capacity"213 162 Properties.Hot.Inlet.Cp = PP.VapourCp(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 214 215 "Hot Stream Outlet Heat Capacity"216 163 Properties.Hot.Outlet.Cp = PP.VapourCp(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 217 164 218 " Hot Stream Average Mass Density"165 "Mass Density Hot Stream" 219 166 Properties.Hot.Average.rho = PP.VapourDensity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 220 221 "Hot Stream Inlet Mass Density"222 167 Properties.Hot.Inlet.rho = PP.VapourDensity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 223 224 "Hot Stream Outlet Mass Density"225 168 Properties.Hot.Outlet.rho = PP.VapourDensity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 226 169 227 " Hot Stream Average Viscosity"170 "Viscosity Hot Stream" 228 171 Properties.Hot.Average.Mu = PP.VapourViscosity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 229 230 "Hot Stream Inlet Viscosity"231 172 Properties.Hot.Inlet.Mu = PP.VapourViscosity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 232 233 "Hot Stream Outlet Viscosity"234 173 Properties.Hot.Outlet.Mu = PP.VapourViscosity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 235 174 236 " Hot Stream Average Conductivity"175 "Conductivity Hot Stream" 237 176 Properties.Hot.Average.K = PP.VapourThermalConductivity(Properties.Hot.Average.T,Properties.Hot.Average.P,Inlet.Hot.z); 238 239 "Hot Stream Inlet Conductivity"240 177 Properties.Hot.Inlet.K = PP.VapourThermalConductivity(Inlet.Hot.T,Inlet.Hot.P,Inlet.Hot.z); 241 242 "Hot Stream Outlet Conductivity"243 178 Properties.Hot.Outlet.K = PP.VapourThermalConductivity(Outlet.Hot.T,Outlet.Hot.P,Outlet.Hot.z); 244 179 245 "H ot Stream Heat Capacity at Wall Temperature"180 "Heat Capacity Hot Stream" 246 181 Properties.Hot.Wall.Cp = PP.VapourCp(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 247 182 248 " Hot Stream Viscosity at Wall Temperature"183 "Viscosity Hot Stream" 249 184 Properties.Hot.Wall.Mu = PP.VapourViscosity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 250 185 251 " Hot Stream Conductivity at Wall Temperature"186 "Conductivity Hot Stream" 252 187 Properties.Hot.Wall.K = PP.VapourThermalConductivity(Properties.Hot.Wall.Twall,Properties.Hot.Average.P,Inlet.Hot.z); 253 188 254 189 255 190 end 256 257 191 258 192 #===================================================================== … … 483 417 484 418 Model HeatExchanger_NTU as Heatex_Basic_NTU 485 486 PARAMETERS 487 488 Side as Integer (Brief="Flow Direction",Lower=0,Upper=1); 489 490 SET 491 492 Side = HE.FlowDir(); # Return Flow Direction 493 494 EQUATIONS 495 496 if Details.Cr equal 0 497 498 then 419 420 EQUATIONS 499 421 "Effectiveness" 500 Eft = 1-exp(-Details.NTU); 501 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 522 end 523 524 end 525 526 527 end 528 422 Eft=HE.Effectiveness(Details.Cr,Details.NTU); 529 423 530 424 end -
/mso/eml/reactors/pfr.mso
r71 r63 45 45 q(NDisc) as heat_rate; 46 46 M(NComp, NDisc) as mol (Brief = "Molar holdup"); 47 Mt(NDisc) as mol (Brief = "Molar holdup"); 48 C(NComp, NDisc) as conc_mol(Brief="Components concentration", Lower=-1e-6); 47 C(NComp, NDisc) as conc_mol(Brief="Components concentration"); 49 48 E(NDisc) as energy (Brief="Total Energy Holdup on element"); 50 49 … … 71 70 72 71 for z in [1:NDisc] 73 for c in [1:NComp -1]72 for c in [1:NComp] 74 73 "Component Molar Balance" 75 74 diff(M(c,z)) = (str(z).F*str(z).z(c) - str(z+1).F*str(z+1).z(c)) … … 82 81 83 82 "Energy Holdup" 84 E(z) = Mt(z)*str(z+1).h - str(z+1).P*Across*L/NDisc;83 E(z) = sum(M(:,z))*str(z+1).h - str(z+1).P*Across*L/NDisc; 85 84 86 85 "mass flow is considered constant" 87 86 str(z+1).F*vol(z+1) = str(z).F*vol(z); # FIXME: is this correct? No (constant velocity: only for equimolar) 88 #rho(z+1)*vel(z+1) = rho(z)*vel(z); # FIXME: this is correct! But does not converge.87 # rho(z+1)*vel(z+1) = rho(z)*vel(z); # FIXME: this is correct! But does not converge. 89 88 90 89 "Molar concentration" 91 90 C(:,z) * Across*L/NDisc = M(:,z); 92 93 "Sum of M"94 Mt(z) = sum(M(:,z));95 96 "Geometrical constraint"97 Across*L/NDisc = Mt(z) * vol(z);98 91 99 92 "Molar fraction" 100 str(z+1).z * Mt(z) = M(:,z);101 end 93 str(z+1).z = C(:,z) * vol(z+1); 94 end 102 95 103 96 for z in [1:NDisc+1] … … 106 99 107 100 "Specific Mass" 108 rho(z) = PP.VapourDensity(str(z).T, str(z).P, str(z).z);101 rho(z) = sum(str(z).z*Mw)/vol(z); 109 102 110 103 "Velocity" -
/mso/eml/stage_separators/condenser.mso
r71 r63 101 101 ext PP as CalcObject; 102 102 ext NComp as Integer; 103 DP as press_delta (Brief="Pressure Drop in the condenser"); 103 104 104 105 VARIABLES … … 106 107 out OutletL as stream_therm; #(Brief="Liquid outlet stream"); 107 108 in Q as heat_rate (Brief="Heat supplied"); 108 DP as press_delta (Brief="Pressure Drop in the condenser");109 109 110 110 EQUATIONS -
/mso/eml/stage_separators/tank.mso
r71 r63 131 131 Fout = k*sqrt(h); 132 132 end 133 134 Model tank_feed135 136 PARAMETERS137 ext PP as CalcObject;138 ext NComp as Integer;139 Across as area (Brief="Tank cross section area", Default=2);140 141 VARIABLES142 in Feed as stream;143 in Inlet as stream;144 out Outlet as stream_therm;145 146 in Q as heat_rate (Brief="Rate of heat supply");147 Level as length(Brief="Tank level");148 M(NComp) as mol (Brief="Molar Holdup in the tank");149 E as energy (Brief="Total Energy Holdup on tank");150 vL as volume_mol (Brief="Liquid Molar Volume");151 152 EQUATIONS153 "Mass balance"154 diff(M) = Feed.F*Feed.z + Inlet.F*Inlet.z - Outlet.F*Outlet.z;155 156 "Energy balance"157 diff(E) = Feed.F*Feed.h + Inlet.F*Inlet.h - Outlet.F*Outlet.h + Q;158 159 "Energy Holdup"160 E = sum(M)*Outlet.h;161 162 "Mechanical Equilibrium"163 Inlet.P = Outlet.P;164 165 "Liquid Volume"166 vL = PP.LiquidVolume(Outlet.T, Outlet.P, Outlet.z);167 168 "Composition"169 M = Outlet.z*sum(M);170 171 "Level of liquid phase"172 Level = sum(M)*vL/Across;173 174 "Vapourisation Fraction"175 Outlet.v = Inlet.v;176 177 end -
/mso/eml/types.mso
r71 r63 22 22 positive as Real (Brief = "Positive General Constant", Default=1.0, Lower=-1e-6); 23 23 negative as Real (Brief = "Negative General Constant", Default=-1.0, Upper=0.0); 24 fraction as positive (Brief = "Fraction" , Default=0.5, Upper=1 .00001);24 fraction as positive (Brief = "Fraction" , Default=0.5, Upper=1); 25 25 percent as Real (Brief = "Percent", Default=50, Lower=0, Upper=100); 26 26 control_signal as Real (Brief = "Control Signal", Default=1, Lower=-1e9, Upper=1e9); -
/mso/sample/heat_exchangers/Eshell_Detailed_LMTD.mso
r71 r63 2 2 #=============================================================== 3 3 # Heat Exchanger TEMA E Shell - LMTD Method 4 # converge após várias tentativas 4 5 #=============================================================== 5 6 -
/mso/sample/heat_exchangers/Eshell_Detailed_NTU.mso
r71 r63 35 35 # Shell Geometrical Parameters 36 36 #===================================================================== 37 exchanger.Tpass = 4;37 exchanger.Tpass = 2; 38 38 exchanger.Dishell = 0.75 *"m"; 39 39 exchanger.Lcf = 0.043 *"m"; … … 53 53 exchanger.Ditube = 0.013395 *"m"; 54 54 exchanger.Dotube = 0.015875 *"m"; 55 exchanger.Kwall = 0. 057 *"kW/m/K";55 exchanger.Kwall = 0.57 *"kW/m/K"; 56 56 exchanger.Donozzle_Tube = 0.203 *"m"; 57 57 exchanger.Dinozzle_Tube = 0.203 *"m"; -
/mso/sample/heat_exchangers/Eshell_Discretized_LMTD.mso
r71 r63 100 100 # Simulation Options 101 101 #============================================ 102 mode = "steady";103 guessFile = "E_Shell_Discretized_NTU"; 102 mode = "steady"; 103 104 104 end -
/mso/sample/heat_exchangers/Eshell_Discretized_NTU.mso
r71 r63 97 97 #============================================ 98 98 mode = "steady"; 99 guessFile = "E_Shell_Discretized_NTU"; 99 100 100 end -
/mso/sample/heat_exchangers/Multipass_Detailed.mso
r71 r63 99 99 #============================================ 100 100 mode = "steady"; 101 guessFile = "Multipass_LMTD"; 101 102 102 end -
/mso/sample/heat_exchangers/NTU_Method.mso
r71 r63 11 11 streamcold as streamTP; 12 12 13 14 13 15 CONNECTIONS 14 16 … … 18 20 PARAMETERS 19 21 20 PP as CalcObject (File="vrpp"); 22 PP as CalcObject (File="vrpp.dll"); 23 HE as CalcObject (File="heatex.dll"); 21 24 NComp as Integer; 22 25 … … 30 33 PP.Components = ["water"]; 31 34 NComp = PP.NumberOfComponents; 32 exchanger.HE.HotSide = "Shell";35 HE.HotSide = "Shell"; 33 36 34 exchanger.HE.TurbulentFlow = "Petukhov";35 # exchanger.HE.TurbulentFlow = "SiederTate";37 # HE.TurbulentFlow = "Petukhov"; 38 HE.TurbulentFlow = "SiederTate"; 36 39 37 40 #===================================================================== -
/mso/sample/heat_exchangers/sampleEshell_LMTD.mso
r71 r63 23 23 24 24 exchanger.HE.LMTDcorrection = "Bowmann"; 25 # exchanger.HE.LMTDcorrection = "Fakeri";25 # HE.LMTDcorrection = "Fakeri"; 26 26 27 27 -
/mso/sample/heat_exchangers/sampleNTU.mso
r71 r63 9 9 NComp as Integer; 10 10 11 12 11 13 DEVICES 12 13 14 exchanger as HeatExchanger_NTU; 14 15 streamhot as streamTP; … … 19 20 PP.LiquidModel = "PR"; 20 21 PP.VapourModel = "PR"; 21 PP.Components = ["water","n-butane", "benzene", "n-octane" ]; 22 NComp = PP.NumberOfComponents; 23 24 exchanger.HE.FlowDirection = "Cocurrent"; 22 PP.Components = ["water","n-butane", "benzene", "n-octane" ]; 23 NComp = PP.NumberOfComponents; 24 exchanger.HE.FlowDirection = "Cocurrent"; 25 25 26 26 CONNECTIONS … … 32 32 33 33 exchanger.Details.U = 210*"W/(m^2*K)"; 34 exchanger.PressureDrop.Hot.Pdrop = 0. 2*"kPa";34 exchanger.PressureDrop.Hot.Pdrop = 0.1*"kPa"; 35 35 exchanger.PressureDrop.Cold.Pdrop = 0.2*"kPa"; 36 37 36 streamhot.F = 20 * "kmol/h"; 38 37 streamhot.T = 450 * "K"; 39 38 streamhot.P = 120 * "kPa"; 40 39 streamhot.z = [1,0,0,0]; 41 42 40 streamcold.F = 10 * "kmol/h"; 43 41 streamcold.P = 120 * "kPa"; 44 42 streamcold.T = 300 * "K"; 45 43 streamcold.z = [0,0.5, 0.1, 0.4]; 46 47 exchanger.Details.A = 20*"m^2"; 48 44 exchanger.Outlet.Cold.T = 340*"K"; 45 49 46 OPTIONS 50 51 mode = "steady"; 52 53 end 47 mode = "steady"; 48 end -
/mso/sample/heat_exchangers/samples1.mso
r71 r63 25 25 SET 26 26 27 PP.LiquidModel = " PR";28 PP.VapourModel = " PR";27 PP.LiquidModel = "RK"; 28 PP.VapourModel = "RK"; 29 29 PP.Components = ["water"]; 30 30 NComp = PP.NumberOfComponents; -
/mso/sample/miscellaneous/sample_streams.mso
r71 r63 66 66 sv.v = 1.0; #vapor stream 67 67 68 EQUATIONS69 68 "Liquid-Vapour equilibrium" 70 69 PP.VapourFugacityCoefficient(sv.T, sv.P, sv.z) * sv.z = -
/mso/sample/optimization/flash_opt.mso
r71 r63 54 54 FREE 55 55 fl.OutletL.T; 56 #fl.OutletL.P;57 56 58 57 EQUATIONS 59 fl.OutletL.T < 3 20* "K";58 fl.OutletL.T < 315 * "K"; 60 59 fl.OutletL.T > 300 * "K"; 61 60 -
/mso/sample/reactors/sample_pfr.mso
r71 r63 35 35 NComp = PP.NumberOfComponents; 36 36 37 Reac.NDisc = 10;37 Reac.NDisc = 20; 38 38 Reac.Across = 0.7 * "in^2"; 39 39 Reac.L = 2.28 * "m"; … … 71 71 for z in [2:Reac.NDisc+1] 72 72 Reac.str(z).T = Reac.Inlet.T; 73 Reac.str(z).z (1:NComp-1) = Reac.Inlet.z(1:NComp-1);73 Reac.str(z).z = Reac.Inlet.z; 74 74 end 75 75 -
/mso/sample/stage_separators/sample_condenser.mso
r71 r63 82 82 s1.v = 1.0; 83 83 Q = 3.71e6 * "kJ/h"; 84 85 SET 84 86 c1.DP = 100 * "kPa"; 85 87
Note: See TracChangeset
for help on using the changeset viewer.