Changeset 139 for branches/newlanguage/eml/heat_exchangers/DoublePipe.mso
 Timestamp:
 Jan 29, 2007, 1:50:41 PM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/newlanguage/eml/heat_exchangers/DoublePipe.mso
r110 r139 24 24 25 25 Model DoublePipe_Basic 26 27 ATTRIBUTES 28 Pallete = false; 29 Brief = "Double Pipe Basic Equations"; 30 Info = 31 "write some information"; 26 32 27 33 PARAMETERS 28 ext PP as CalcObject(Brief="External Physical Properties");29 ext NCompas Integer (Brief="Number of Components");30 M(NComp) as molweight (Brief="Component Mol Weight");34 outer PP as Plugin (Brief="External Physical Properties"); 35 outer NComp as Integer (Brief="Number of Components"); 36 M(NComp) as molweight (Brief="Component Mol Weight"); 31 37 32 38 VARIABLES 33 39 34 in Inlet as Inlet_Main_Stream; # Hot and Cold Inlets35 out Outlet as Outlet_Main_Stream; # Hot and Cold Outlets36 Properties as Main_Properties; # Hot and Cold Properties37 Details as Details_Main;38 Inner as Main_DoublePipe;39 Outer as Main_DoublePipe;40 Resistances as Main_Resistances;40 in Inlet as Inlet_Main_Stream (Brief="Hot and Cold Inlets"); 41 out Outlet as Outlet_Main_Stream (Brief="Hot and Cold Outlets"); 42 Properties as Main_Properties (Brief="Hot and Cold Properties"); 43 Details as Details_Main (Brief="Details"); 44 Inner as Main_DoublePipe (Brief="Inner Side"); 45 Outer as Main_DoublePipe (Brief="Outer Side"); 46 Resistances as Main_Resistances (Brief="Resistances"); 41 47 42 48 SET … … 299 305 300 306 Model DoublePipe as DoublePipe_Basic 307 308 ATTRIBUTES 309 Pallete = false; 310 Brief = "Double Pipe"; 311 Info = 312 "write some information"; 301 313 302 314 PARAMETERS 303 315 304 HE as CalcObject (Brief="STHE Calculations",File="heatex"); 305 Pi as constant (Brief="Pi Number",Default=3.14159265); 306 Hside as Integer (Brief="Fluid Alocation FlagDefault:Outer",Lower=0,Upper=1); 307 Side as Integer (Brief="Flow Direction",Lower=0,Upper=1); 308 DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e6); 309 DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e10); 310 DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e10); 311 Lpipe as length (Brief="Effective Tube Length",Lower=0.1); 312 Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0); 313 316 HE as Plugin (Brief="STHE Calculations",File="heatex"); 317 Pi as constant (Brief="Pi Number",Default=3.14159265); 318 Hside as Integer (Brief="Fluid Alocation FlagDefault:Outer",Lower=0,Upper=1); 319 Side as Integer (Brief="Flow Direction",Lower=0,Upper=1); 320 DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e6); 321 DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e10); 322 DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e10); 323 Lpipe as length (Brief="Effective Tube Length",Lower=0.1); 324 Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0); 325 326 SET 327 328 Pi = 3.14159265; 329 Hside = HE.FluidAlocation(); 330 Side = HE.FlowDir(); 331 332 #"Inner Pipe Cross Sectional Area for Flow" 333 Inner.HeatTransfer.As=Pi*DiInner*DiInner/4; 334 335 #"Outer Pipe Cross Sectional Area for Flow" 336 Outer.HeatTransfer.As=Pi*(DiOuter*DiOuter  DoInner*DoInner)/4; 337 338 #"Inner Pipe Hydraulic Diameter for Heat Transfer" 339 Inner.HeatTransfer.Dh=DiInner; 340 341 #"Outer Pipe Hydraulic Diameter for Heat Transfer" 342 Outer.HeatTransfer.Dh=(DiOuter*DiOuterDoInner*DoInner)/DoInner; 343 344 #"Inner Pipe Hydraulic Diameter for Pressure Drop" 345 Inner.PressureDrop.Dh=DiInner; 346 347 #"Outer Pipe Hydraulic Diameter for Pressure Drop" 348 Outer.PressureDrop.Dh=DiOuterDoInner; 349 350 EQUATIONS 351 352 "Exchange Surface Area" 353 Details.A=Pi*DoInner*Lpipe; 354 355 if Hside equal 1 356 357 then 358 359 "Pressure Drop Hot Stream" 360 Outlet.Hot.P = Inlet.Hot.P  Outer.PressureDrop.Pdrop; 361 362 "Pressure Drop Cold Stream" 363 Outlet.Cold.P = Inlet.Cold.P  Inner.PressureDrop.Pdrop; 364 365 "Outer Pipe Film Coefficient" 366 Outer.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Outer.HeatTransfer.Re,Outer.HeatTransfer.PR,Properties.Hot.Average.K,Outer.HeatTransfer.Dh,Lpipe)*Outer.HeatTransfer.Phi; 367 368 "Inner Pipe Film Coefficient" 369 Inner.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Inner.HeatTransfer.Re,Inner.HeatTransfer.PR,Properties.Cold.Average.K,DiInner,Lpipe)*Inner.HeatTransfer.Phi; 370 371 "Outer Pipe Pressure Drop" 372 Outer.PressureDrop.Pdrop = (2*Outer.PressureDrop.fi*Lpipe*Properties.Hot.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi); 373 374 "Inner Pipe Pressure Drop" 375 Inner.PressureDrop.Pdrop = (2*Inner.PressureDrop.fi*Lpipe*Properties.Cold.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi); 376 377 "Outer Pipe Phi correction" 378 Outer.HeatTransfer.Phi = HE.PhiCorrection(Properties.Hot.Average.Mu,Properties.Hot.Wall.Mu); 379 380 "Inner Pipe Phi correction" 381 Inner.HeatTransfer.Phi = HE.PhiCorrection(Properties.Cold.Average.Mu,Properties.Cold.Wall.Mu); 382 383 "Outer Pipe Prandtl Number" 384 Outer.HeatTransfer.PR = ((Properties.Hot.Average.Cp/Properties.Hot.Average.Mw)*Properties.Hot.Average.Mu)/Properties.Hot.Average.K; 385 386 "Inner Pipe Prandtl Number" 387 Inner.HeatTransfer.PR = ((Properties.Cold.Average.Cp/Properties.Cold.Average.Mw)*Properties.Cold.Average.Mu)/Properties.Cold.Average.K; 388 389 "Outer Pipe Reynolds Number for Heat Transfer" 390 Outer.HeatTransfer.Re = (Properties.Hot.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Properties.Hot.Average.Mu; 391 392 "Outer Pipe Reynolds Number for Pressure Drop" 393 Outer.PressureDrop.Re = (Properties.Hot.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Properties.Hot.Average.Mu; 394 395 "Inner Pipe Reynolds Number for Heat Transfer" 396 Inner.HeatTransfer.Re = (Properties.Cold.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Properties.Cold.Average.Mu; 397 398 "Inner Pipe Reynolds Number for Pressure Drop" 399 Inner.PressureDrop.Re = Inner.HeatTransfer.Re; 400 401 "Outer Pipe Velocity" 402 Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Properties.Hot.Average.rho) = Properties.Hot.Inlet.Fw; 403 404 "Inner Pipe Velocity" 405 Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Properties.Cold.Average.rho) = Properties.Cold.Inlet.Fw; 406 407 else 408 409 "Pressure Drop Hot Stream" 410 Outlet.Hot.P = Inlet.Hot.P  Inner.PressureDrop.Pdrop; 411 412 "Pressure Drop Cold Stream" 413 Outlet.Cold.P = Inlet.Cold.P  Outer.PressureDrop.Pdrop; 414 415 "Inner Pipe Film Coefficient" 416 Inner.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Inner.HeatTransfer.Re,Inner.HeatTransfer.PR,Properties.Hot.Average.K,DiInner,Lpipe)*Inner.HeatTransfer.Phi; 417 418 "Outer Pipe Film Coefficient" 419 Outer.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Outer.HeatTransfer.Re,Outer.HeatTransfer.PR,Properties.Cold.Average.K,Outer.HeatTransfer.Dh,Lpipe)*Outer.HeatTransfer.Phi; 420 421 "Outer Pipe Pressure Drop" 422 Outer.PressureDrop.Pdrop = (2*Outer.PressureDrop.fi*Lpipe*Properties.Cold.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi); 423 424 "Inner Pipe Pressure Drop" 425 Inner.PressureDrop.Pdrop = (2*Inner.PressureDrop.fi*Lpipe*Properties.Hot.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi); 426 427 "Outer Pipe Phi correction" 428 Outer.HeatTransfer.Phi = HE.PhiCorrection(Properties.Cold.Average.Mu,Properties.Cold.Wall.Mu); 429 430 "Inner Pipe Phi correction" 431 Inner.HeatTransfer.Phi = HE.PhiCorrection(Properties.Hot.Average.Mu,Properties.Hot.Wall.Mu); 432 433 "Outer Pipe Prandtl Number" 434 Outer.HeatTransfer.PR = ((Properties.Cold.Average.Cp/Properties.Cold.Average.Mw)*Properties.Cold.Average.Mu)/Properties.Cold.Average.K; 435 436 "Inner Pipe Prandtl Number" 437 Inner.HeatTransfer.PR = ((Properties.Hot.Average.Cp/Properties.Hot.Average.Mw)*Properties.Hot.Average.Mu)/Properties.Hot.Average.K; 438 439 "Outer Pipe Reynolds Number for Heat Transfer" 440 Outer.HeatTransfer.Re = (Properties.Cold.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Properties.Cold.Average.Mu; 441 442 "Outer Pipe Reynolds Number for Pressure Drop" 443 Outer.PressureDrop.Re = (Properties.Cold.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Properties.Cold.Average.Mu; 444 445 "Inner Pipe Reynolds Number for Pressure Drop" 446 Inner.PressureDrop.Re = Inner.HeatTransfer.Re; 447 448 "Inner Pipe Reynolds Number for Heat Transfer" 449 Inner.HeatTransfer.Re = (Properties.Hot.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Properties.Hot.Average.Mu; 450 451 "Outer Pipe Velocity" 452 Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Properties.Cold.Average.rho)= Properties.Cold.Inlet.Fw; 453 454 "Inner Pipe Velocity" 455 Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Properties.Hot.Average.rho) = Properties.Hot.Inlet.Fw; 456 457 end 458 459 "Inner Pipe Resistance" 460 Resistances.Rtube*(Inner.HeatTransfer.hcoeff*DiInner) = DoInner; 461 462 "Wall Resistance" 463 Resistances.Rwall*(2*Kwall) = DoInner*ln(DoInner/DiInner); 464 465 "Outer Pipe Resistance" 466 Resistances.Rshell*(Outer.HeatTransfer.hcoeff)=1; 467 468 "Overall Heat Transfer Coefficient Clean" 469 Details.Uc*(Resistances.Rtube+Resistances.Rwall+Resistances.Rshell)=1; 470 471 "Overall Heat Transfer Coefficient Dirty" 472 Details.Ud*(Resistances.Rfi*(DoInner/DiInner) + Resistances.Rfo + Resistances.Rtube + Resistances.Rwall + Resistances.Rshell)=1; 473 474 end 475 476 Model DoublePipe_Basic_NTU as DoublePipe 477 478 ATTRIBUTES 479 Pallete = false; 480 Brief = "Basic Model Double Pipe Heat Exchanger  NTU Method"; 481 Info = 482 "write some information"; 483 484 VARIABLES 485 486 Eft as positive (Brief="Effectiveness",Default=0.5,Lower=1e12); 487 488 EQUATIONS 489 490 "Energy Balance" 491 Details.Q = Eft*Details.Cmin*(Inlet.Hot.TInlet.Cold.T); 492 493 494 end 495 496 Model DoublePipe_Basic_LMTD as DoublePipe 497 498 ATTRIBUTES 499 Pallete = false; 500 Brief = "Basic Model Double Pipe Heat Exchanger  LMTD Method"; 501 Info = 502 "write some information"; 503 504 VARIABLES 505 506 DT0 as temp_delta (Brief="Temperature Difference at Inlet",Lower=1); 507 DTL as temp_delta (Brief="Temperature Difference at Outlet",Lower=1); 508 LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=1); 509 510 EQUATIONS 511 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 512 # Log Mean Temperature Difference 513 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 514 515 if abs(DT0  DTL) > 0.05*max(abs([DT0,DTL])) 516 517 then 518 "Log Mean Temperature Difference" 519 LMTD*ln(DT0/DTL) = (DT0DTL); 520 521 else 522 523 if DT0*DTL equal 0 524 525 then 526 "Log Mean Temperature Difference" 527 LMTD = 0.5*(DT0+DTL); 528 529 else 530 "Log Mean Temperature Difference" 531 LMTD = 0.5*(DT0+DTL)*(1(DT0DTL)^2/(DT0*DTL)*(1+(DT0DTL)^2/(DT0*DTL)/2)/12); 532 533 end 534 535 end 536 537 "Exchange Surface Area" 538 Details.Q = Details.Ud*Pi*DoInner*Lpipe*LMTD; 539 540 end 541 542 Model DoublePipe_LMTD as DoublePipe_Basic_LMTD 543 544 ATTRIBUTES 545 Pallete = true; 546 Brief = "Double Pipe Heat Exchanger  LMTD Method"; 547 Info = 548 "write some information"; 549 550 EQUATIONS 551 552 if Side equal 0 553 554 then 555 "Temperature Difference at Inlet  Cocurrent Flow" 556 DT0 = Inlet.Hot.T  Inlet.Cold.T; 557 558 "Temperature Difference at Outlet  Cocurrent Flow" 559 DTL = Outlet.Hot.T  Outlet.Cold.T; 560 561 else 562 "Temperature Difference at Inlet  Counter Flow" 563 DT0 = Inlet.Hot.T  Outlet.Cold.T; 564 565 "Temperature Difference at Outlet  Counter Flow" 566 DTL = Outlet.Hot.T  Inlet.Cold.T; 567 end 568 569 end 570 571 Model DoublePipe_NTU as DoublePipe_Basic_NTU 572 573 ATTRIBUTES 574 Pallete = true; 575 Brief = "Basic Model Double Pipe Heat Exchanger  NTU Method"; 576 Info = 577 "write some information"; 578 579 EQUATIONS 580 581 if Details.Cr equal 0 582 583 then 584 "Effectiveness" 585 Eft = 1exp(Details.NTU); 586 587 else 588 589 if Side equal 0 590 591 then 592 "Effectiveness in Cocurrent Flow" 593 Eft*(1+Details.Cr) = (1exp(Details.NTU*(1+Details.Cr))); 594 595 else 596 597 if Details.Cr equal 1 598 599 then 600 "Effectiveness in Counter Flow" 601 Eft*(1+Details.NTU) = Details.NTU; 602 603 else 604 "Effectiveness in Counter Flow" 605 Eft*(1Details.Cr*exp(Details.NTU*(1Details.Cr))) = (1exp(Details.NTU*(1Details.Cr))); 606 607 end 608 609 end 610 611 612 end 613 614 end 615 616 Model Multitubular_Basic 617 618 ATTRIBUTES 619 Pallete = false; 620 Brief = "Basic Model Multitubular Double Pipe Heat Exchanger"; 621 Info = 622 "write some information"; 623 624 PARAMETERS 625 626 Npipe as Integer (Brief="N Pipe in Series",Default=2); 627 outer PP as Plugin (Brief="External Physical Properties"); 628 HE as Plugin (Brief="STHE Calculations",File="heatex"); 629 Pi as constant (Brief="Pi Number",Default=3.14159265); 630 Hside as Integer (Brief="Fluid Alocation FlagDefault:Outer",Lower=0,Upper=1); 631 DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e6); 632 DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e10); 633 DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e10); 634 Lpipe as length (Brief="Effective Tube Length",Lower=0.1); 635 Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0); 636 637 VARIABLES 638 639 Unity(Npipe) as DoublePipe_Basic; 640 314 641 SET 315 642 Pi = 3.14159265; 316 643 Hside = HE.FluidAlocation(); 317 Side = HE.FlowDir();318 319 #"Inner Pipe Cross Sectional Area for Flow"320 Inner.HeatTransfer.As=Pi*DiInner*DiInner/4;321 322 #"Outer Pipe Cross Sectional Area for Flow"323 Outer.HeatTransfer.As=Pi*(DiOuter*DiOuterDoInner*DoInner)/4;324 325 #"Inner Pipe Hydraulic Diameter for Heat Transfer"326 Inner.HeatTransfer.Dh=DiInner;327 328 #"Outer Pipe Hydraulic Diameter for Heat Transfer"329 Outer.HeatTransfer.Dh=(DiOuter*DiOuterDoInner*DoInner)/DoInner;330 331 #"Inner Pipe Hydraulic Diameter for Pressure Drop"332 Inner.PressureDrop.Dh=DiInner;333 334 #"Outer Pipe Hydraulic Diameter for Pressure Drop"335 Outer.PressureDrop.Dh=DiOuterDoInner;336 337 EQUATIONS338 339 "Exchange Surface Area"340 Details.A=Pi*DoInner*Lpipe;341 342 if Hside equal 1343 344 then345 346 "Pressure Drop Hot Stream"347 Outlet.Hot.P = Inlet.Hot.P  Outer.PressureDrop.Pdrop;348 349 "Pressure Drop Cold Stream"350 Outlet.Cold.P = Inlet.Cold.P  Inner.PressureDrop.Pdrop;351 352 "Outer Pipe Film Coefficient"353 Outer.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Outer.HeatTransfer.Re,Outer.HeatTransfer.PR,Properties.Hot.Average.K,Outer.HeatTransfer.Dh,Lpipe)*Outer.HeatTransfer.Phi;354 355 "Inner Pipe Film Coefficient"356 Inner.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Inner.HeatTransfer.Re,Inner.HeatTransfer.PR,Properties.Cold.Average.K,DiInner,Lpipe)*Inner.HeatTransfer.Phi;357 358 "Outer Pipe Pressure Drop"359 Outer.PressureDrop.Pdrop = (2*Outer.PressureDrop.fi*Lpipe*Properties.Hot.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi);360 361 "Inner Pipe Pressure Drop"362 Inner.PressureDrop.Pdrop = (2*Inner.PressureDrop.fi*Lpipe*Properties.Cold.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi);363 364 "Outer Pipe Phi correction"365 Outer.HeatTransfer.Phi = HE.PhiCorrection(Properties.Hot.Average.Mu,Properties.Hot.Wall.Mu);366 367 "Inner Pipe Phi correction"368 Inner.HeatTransfer.Phi = HE.PhiCorrection(Properties.Cold.Average.Mu,Properties.Cold.Wall.Mu);369 370 "Outer Pipe Prandtl Number"371 Outer.HeatTransfer.PR = ((Properties.Hot.Average.Cp/Properties.Hot.Average.Mw)*Properties.Hot.Average.Mu)/Properties.Hot.Average.K;372 373 "Inner Pipe Prandtl Number"374 Inner.HeatTransfer.PR = ((Properties.Cold.Average.Cp/Properties.Cold.Average.Mw)*Properties.Cold.Average.Mu)/Properties.Cold.Average.K;375 376 "Outer Pipe Reynolds Number for Heat Transfer"377 Outer.HeatTransfer.Re = (Properties.Hot.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Properties.Hot.Average.Mu;378 379 "Outer Pipe Reynolds Number for Pressure Drop"380 Outer.PressureDrop.Re = (Properties.Hot.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Properties.Hot.Average.Mu;381 382 "Inner Pipe Reynolds Number for Heat Transfer"383 Inner.HeatTransfer.Re = (Properties.Cold.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Properties.Cold.Average.Mu;384 385 "Inner Pipe Reynolds Number for Pressure Drop"386 Inner.PressureDrop.Re = Inner.HeatTransfer.Re;387 388 "Outer Pipe Velocity"389 Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Properties.Hot.Average.rho) = Properties.Hot.Inlet.Fw;390 391 "Inner Pipe Velocity"392 Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Properties.Cold.Average.rho) = Properties.Cold.Inlet.Fw;393 394 else395 396 "Pressure Drop Hot Stream"397 Outlet.Hot.P = Inlet.Hot.P  Inner.PressureDrop.Pdrop;398 399 "Pressure Drop Cold Stream"400 Outlet.Cold.P = Inlet.Cold.P  Outer.PressureDrop.Pdrop;401 402 "Inner Pipe Film Coefficient"403 Inner.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Inner.HeatTransfer.Re,Inner.HeatTransfer.PR,Properties.Hot.Average.K,DiInner,Lpipe)*Inner.HeatTransfer.Phi;404 405 "Outer Pipe Film Coefficient"406 Outer.HeatTransfer.hcoeff= HE.PipeFilmCoeff(Outer.HeatTransfer.Re,Outer.HeatTransfer.PR,Properties.Cold.Average.K,Outer.HeatTransfer.Dh,Lpipe)*Outer.HeatTransfer.Phi;407 408 "Outer Pipe Pressure Drop"409 Outer.PressureDrop.Pdrop = (2*Outer.PressureDrop.fi*Lpipe*Properties.Cold.Average.rho*Outer.HeatTransfer.Vmean^2)/(Outer.PressureDrop.Dh*Outer.HeatTransfer.Phi);410 411 "Inner Pipe Pressure Drop"412 Inner.PressureDrop.Pdrop = (2*Inner.PressureDrop.fi*Lpipe*Properties.Hot.Average.rho*Inner.HeatTransfer.Vmean^2)/(DiInner*Inner.HeatTransfer.Phi);413 414 "Outer Pipe Phi correction"415 Outer.HeatTransfer.Phi = HE.PhiCorrection(Properties.Cold.Average.Mu,Properties.Cold.Wall.Mu);416 417 "Inner Pipe Phi correction"418 Inner.HeatTransfer.Phi = HE.PhiCorrection(Properties.Hot.Average.Mu,Properties.Hot.Wall.Mu);419 420 "Outer Pipe Prandtl Number"421 Outer.HeatTransfer.PR = ((Properties.Cold.Average.Cp/Properties.Cold.Average.Mw)*Properties.Cold.Average.Mu)/Properties.Cold.Average.K;422 423 "Inner Pipe Prandtl Number"424 Inner.HeatTransfer.PR = ((Properties.Hot.Average.Cp/Properties.Hot.Average.Mw)*Properties.Hot.Average.Mu)/Properties.Hot.Average.K;425 426 "Outer Pipe Reynolds Number for Heat Transfer"427 Outer.HeatTransfer.Re = (Properties.Cold.Average.rho*Outer.HeatTransfer.Vmean*Outer.HeatTransfer.Dh)/Properties.Cold.Average.Mu;428 429 "Outer Pipe Reynolds Number for Pressure Drop"430 Outer.PressureDrop.Re = (Properties.Cold.Average.rho*Outer.HeatTransfer.Vmean*Outer.PressureDrop.Dh)/Properties.Cold.Average.Mu;431 432 "Inner Pipe Reynolds Number for Pressure Drop"433 Inner.PressureDrop.Re = Inner.HeatTransfer.Re;434 435 "Inner Pipe Reynolds Number for Heat Transfer"436 Inner.HeatTransfer.Re = (Properties.Hot.Average.rho*Inner.HeatTransfer.Vmean*Inner.HeatTransfer.Dh)/Properties.Hot.Average.Mu;437 438 "Outer Pipe Velocity"439 Outer.HeatTransfer.Vmean*(Outer.HeatTransfer.As*Properties.Cold.Average.rho)= Properties.Cold.Inlet.Fw;440 441 "Inner Pipe Velocity"442 Inner.HeatTransfer.Vmean*(Inner.HeatTransfer.As*Properties.Hot.Average.rho) = Properties.Hot.Inlet.Fw;443 444 end445 446 "Inner Pipe Resistance"447 Resistances.Rtube*(Inner.HeatTransfer.hcoeff*DiInner) = DoInner;448 449 "Wall Resistance"450 Resistances.Rwall*(2*Kwall) = DoInner*ln(DoInner/DiInner);451 452 "Outer Pipe Resistance"453 Resistances.Rshell*(Outer.HeatTransfer.hcoeff)=1;454 455 "Overall Heat Transfer Coefficient Clean"456 Details.Uc*(Resistances.Rtube+Resistances.Rwall+Resistances.Rshell)=1;457 458 "Overall Heat Transfer Coefficient Dirty"459 Details.Ud*(Resistances.Rfi*(DoInner/DiInner) + Resistances.Rfo + Resistances.Rtube + Resistances.Rwall + Resistances.Rshell)=1;460 461 end462 463 Model DoublePipe_Basic_NTU as DoublePipe464 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#465 # Basic Model Double Pipe Heat Exchanger  NTU Method466 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#467 VARIABLES468 469 Eft as positive (Brief="Effectiveness",Default=0.5,Lower=1e12);470 471 EQUATIONS472 473 "Energy Balance"474 Details.Q = Eft*Details.Cmin*(Inlet.Hot.TInlet.Cold.T);475 476 477 end478 479 Model DoublePipe_Basic_LMTD as DoublePipe480 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#481 # Basic Model for Double Pipe Heat Exchanger LMTD Method482 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#483 VARIABLES484 485 DT0 as temp_delta (Brief="Temperature Difference at Inlet",Lower=1);486 DTL as temp_delta (Brief="Temperature Difference at Outlet",Lower=1);487 LMTD as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=1);488 489 EQUATIONS490 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#491 # Log Mean Temperature Difference492 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#493 494 if abs(DT0  DTL) > 0.05*max(abs([DT0,DTL]))495 496 then497 "Log Mean Temperature Difference"498 LMTD*ln(DT0/DTL) = (DT0DTL);499 500 else501 502 if DT0*DTL equal 0503 504 then505 "Log Mean Temperature Difference"506 LMTD = 0.5*(DT0+DTL);507 508 else509 "Log Mean Temperature Difference"510 LMTD = 0.5*(DT0+DTL)*(1(DT0DTL)^2/(DT0*DTL)*(1+(DT0DTL)^2/(DT0*DTL)/2)/12);511 512 end513 514 end515 516 "Exchange Surface Area"517 Details.Q = Details.Ud*Pi*DoInner*Lpipe*LMTD;518 519 end520 521 Model DoublePipe_LMTD as DoublePipe_Basic_LMTD522 523 EQUATIONS524 525 if Side equal 0526 527 then528 "Temperature Difference at Inlet  Cocurrent Flow"529 DT0 = Inlet.Hot.T  Inlet.Cold.T;530 531 "Temperature Difference at Outlet  Cocurrent Flow"532 DTL = Outlet.Hot.T  Outlet.Cold.T;533 534 else535 "Temperature Difference at Inlet  Counter Flow"536 DT0 = Inlet.Hot.T  Outlet.Cold.T;537 538 "Temperature Difference at Outlet  Counter Flow"539 DTL = Outlet.Hot.T  Inlet.Cold.T;540 end541 542 end543 544 Model DoublePipe_NTU as DoublePipe_Basic_NTU545 546 EQUATIONS547 548 if Details.Cr equal 0549 550 then551 "Effectiveness"552 Eft = 1exp(Details.NTU);553 554 else555 556 if Side equal 0557 558 then559 "Effectiveness in Cocurrent Flow"560 Eft*(1+Details.Cr) = (1exp(Details.NTU*(1+Details.Cr)));561 562 else563 564 if Details.Cr equal 1565 566 then567 "Effectiveness in Counter Flow"568 Eft*(1+Details.NTU) = Details.NTU;569 570 else571 "Effectiveness in Counter Flow"572 Eft*(1Details.Cr*exp(Details.NTU*(1Details.Cr))) = (1exp(Details.NTU*(1Details.Cr)));573 574 end575 576 end577 578 579 end580 581 end582 583 Model Multitubular_Basic584 585 PARAMETERS586 587 Npipe as Integer (Brief="N Pipe in Series",Default=2);588 ext PP as CalcObject (Brief="External Physical Properties");589 HE as CalcObject (Brief="STHE Calculations",File="heatex");590 Pi as constant (Brief="Pi Number",Default=3.14159265);591 Hside as Integer (Brief="Fluid Alocation FlagDefault:Outer",Lower=0,Upper=1);592 DoInner as length (Brief="Outside Diameter of Inner Pipe",Lower=1e6);593 DiInner as length (Brief="Inside Diameter of Inner Pipe",Lower=1e10);594 DiOuter as length (Brief="Inside Diameter of Outer pipe",Lower=1e10);595 Lpipe as length (Brief="Effective Tube Length",Lower=0.1);596 Kwall as conductivity (Brief="Tube Wall Material Thermal Conductivity",Default=1.0);597 598 VARIABLES599 600 Unity(Npipe) as DoublePipe_Basic;601 602 SET603 Pi = 3.14159265;604 Hside = HE.FluidAlocation();605 644 606 645 #"Inner Pipe Cross Sectional Area for Flow" … … 754 793 755 794 Model Multitubular_Basic_LMTD as Multitubular_Basic 756 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 757 # Basic Model for Double Pipe Heat Exchanger LMTD Method 758 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# 795 796 ATTRIBUTES 797 Pallete = false; 798 Brief = "Basic Model for Multitubular Double Pipe Heat Exchanger LMTD Method"; 799 Info = 800 "write some information"; 801 759 802 VARIABLES 760 803 761 804 DT0(Npipe) as temp_delta (Brief="Temperature Difference at Inlet",Lower=1); 762 DTL(Npipe) as temp_delta (Brief="Temperature Difference at Outlet",Lower=1);805 DTL(Npipe) as temp_delta (Brief="Temperature Difference at Outlet",Lower=1); 763 806 LMTD(Npipe) as temp_delta (Brief="Logarithmic Mean Temperature Difference",Lower=1); 764 807 … … 800 843 Model Multitubular_Counter_NTU as Multitubular_Basic 801 844 845 ATTRIBUTES 846 Pallete = true; 847 Brief = "Multitubular Double Pipe Heat Exchanger in counter flow  NTU Method"; 848 Info = 849 "write some information"; 850 802 851 VARIABLES 803 852 … … 845 894 Model Multitubular_Cocurrent_NTU as Multitubular_Basic 846 895 896 ATTRIBUTES 897 Pallete = true; 898 Brief = "Multitubular Double Pipe Heat Exchanger in cocurrent flow  NTU Method"; 899 Info = 900 "write some information"; 901 847 902 VARIABLES 848 903 … … 879 934 Model Multitubular_Counter_LMTD as Multitubular_Basic_LMTD 880 935 936 ATTRIBUTES 937 Pallete = true; 938 Brief = "Multitubular Double Pipe Heat Exchanger in counter flow  LMTDMethod"; 939 Info = 940 "write some information"; 941 881 942 CONNECTIONS 882 943 … … 899 960 Model Multitubular_Cocurrent_LMTD as Multitubular_Basic_LMTD 900 961 962 ATTRIBUTES 963 Pallete = true; 964 Brief = "Multitubular Double Pipe Heat Exchanger in cocurrent flow  NTU Method"; 965 Info = 966 "write some information"; 967 901 968 CONNECTIONS 902 969
Note: See TracChangeset
for help on using the changeset viewer.