Changeset 148 for branches/newlanguage/eml
 Timestamp:
 Feb 1, 2007, 6:57:34 PM (17 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/newlanguage/eml/heat_exchangers/HeatExchangerSimplified.mso
r147 r148 274 274 end 275 275 276 277 276 #===================================================================== 278 277 # Thermal Details … … 331 330 Outlet.Cold.z=Inlet.Cold.z; 332 331 333 #"No Phase Change In Cold Stream"334 # Inlet.Cold.v=Outlet.Cold.v;335 336 #"No Phase Change In Hot Stream"337 # Inlet.Hot.v=Outlet.Hot.v;338 339 332 #====================================== 340 333 # Pressure Drop … … 355 348 end 356 349 357 Model Heatex_Basic_NTU as HeatExchangerSimplified_Basic350 Model Heatex_Basic_NTU as HeatExchangerSimplified_Basic 358 351 359 352 ATTRIBUTES … … 375 368 end 376 369 377 Model Heatex_Basic_LMTD as HeatExchangerSimplified_Basic370 Model Heatex_Basic_LMTD as HeatExchangerSimplified_Basic 378 371 379 372 ATTRIBUTES … … 425 418 end 426 419 427 428 #===================================================================== 429 # Concrete Models for Simplified Heat Exchangers 430 #===================================================================== 431 432 #===================================================================== 433 # LMTD Method 434 #===================================================================== 435 436 Model HeatExchanger_LMTD as Heatex_Basic_LMTD 420 Model HeatExchanger_LMTD as Heatex_Basic_LMTD 437 421 438 422 ATTRIBUTES … … 469 453 end 470 454 471 Model E_Shell_LMTD as Heatex_Basic_LMTD472 455 Model Shell_and_Tubes_LMTD as Heatex_Basic_LMTD 456 473 457 ATTRIBUTES 474 458 Pallete = true; 475 Brief = "Shell and Tubes Heat Exchanger with 1 shell pass  LMTD Method";459 Brief = "Shell and Tubes Heat Exchanger with 1 or 2 shell pass  LMTD Method"; 476 460 Info = 477 461 "write some information"; 478 462 479 463 PARAMETERS 480 464 481 465 LMTDcorrection as Switcher(Brief="LMTD Correction Factor Model",Valid=["Bowmann","Fakeri"],Default="Bowmann"); 466 ShellType as Switcher(Brief="TEMA Designation",Valid=["Eshell","Fshell"],Default="Eshell"); 482 467 483 468 VARIABLES 484 469 485 R as positive; 486 P as positive; 487 Rho as positive; 488 Phi as positive; 470 R as positive (Brief=" Capacity Ratio for LMTD Correction Fator",Lower=1e6); 471 P as positive (Brief="Non  Dimensional Variable for LMTD Correction Fator ",Lower=1e6); 472 Pc as positive (Brief="Non  Dimensional Variable for LMTD Correction Fator when 2 Pass Shell Side",Lower=1e6); 473 Rho as positive (Brief="Non  Dimensional Variable for LMTD Correction Fator in Fakeri Equation",Lower=1e6); 474 Phi as positive (Brief="Non  Dimensional Variable for LMTD Correction Fator in Fakeri Equation",Lower=1e6); 475 lambdaN as Real (Brief="Non  Dimensional Variable for LMTD Correction Fator in Fakeri Equation when 2 Pass Shell Side"); 476 lambda1 as Real (Brief="Non  Dimensional Variable for LMTD Correction Fator in Fakeri Equationwhen 2 Pass Shell Side"); 489 477 490 478 EQUATIONS 491 479 492 " Capacity Ratio for LMTD Correction Fator"480 "R: Capacity Ratio for LMTD Correction Fator" 493 481 R*(Outlet.Cold.T  Inlet.Cold.T ) = (Inlet.Hot.TOutlet.Hot.T); 494 482 495 " Non  Dimensional Variable for LMTD Correction Fator"483 "P: Non  Dimensional Variable for LMTD Correction Fator" 496 484 P*(Inlet.Hot.T Inlet.Cold.T)= (Outlet.Cold.TInlet.Cold.T); 497 485 498 486 "Temperature Difference at Inlet" 499 487 DT0 = Inlet.Hot.T  Outlet.Cold.T; … … 502 490 DTL = Outlet.Hot.T  Inlet.Cold.T; 503 491 504 "Rho: Non  Dimensional Variable for LMTD Correction Fator in Fakeri Equation" 492 switch ShellType 493 494 case "Fshell": 495 496 switch LMTDcorrection 497 498 case "Bowmann": 499 500 " Variable not in use with Bowmann equation" 501 lambdaN =1; 502 503 " Variable not in use with Bowmann equation" 504 lambda1 =1; 505 506 " Variable not in use with Bowmann equation" 507 Phi = 1; 508 509 " Variable not in use with Bowmann equation" 510 Rho =1; 511 512 if R equal 1 513 514 then 515 516 "Non Dimensional Variable for LMTD Correction Fator when 2 Pass Shell Side" 517 Pc*(2P)= P; 518 519 "LMTD Correction Fator when 2 Pass Shell Side" 520 Fc= (sqrt(2)*Pc)/((1Pc)*ln( abs( ( 2Pc*0.585786)/( 2Pc*3.414214)))); 521 522 else 523 524 "Non Dimensional Variable for LMTD Correction Fator when 2 Pass Shell Side" 525 Pc = (sqrt(abs(( 1P*R)/(1P)))1)/(sqrt(abs(( 1P*R)/(1P)))R); 526 527 "LMTD Correction Fator when 2 Pass Shell Side" 528 Fc = sqrt(R*R+1)*ln(abs((1Pc*R)/(1Pc)))/((1R)*ln( abs( ( 2Pc*(R+1sqrt(R*R+1)))/ ( 2Pc*(R + 1 + sqrt(R*R+1)))))); 529 530 end 531 532 case "Fakeri": 533 534 " Variable not in use with Fakeri equation" 535 Pc = P; 536 537 "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation" 505 538 Rho*(1P*R) = (1P); 506 539 507 "Phi: Non  Dimensional Variable for LMTD Correction Fator in Fakeri Equation" 540 "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation " 541 Phi = (sqrt(((Inlet.Hot.T  Outlet.Hot.T)*(Inlet.Hot.T Outlet.Hot.T))+((Outlet.Cold.T  Inlet.Cold.T)*(Outlet.Cold.T  Inlet.Cold.T))))/(2*((Inlet.Hot.T + Outlet.Hot.T)( Inlet.Cold.T + Outlet.Cold.T))); 542 543 if Rho equal 1 544 545 then 546 547 " Variable not in use when Rho = 1" 548 lambdaN = 1; 549 550 " Variable not in use when Rho = 1" 551 lambda1 = 1; 552 553 "LMTD Correction Fator when 2 Pass Shell Side" 554 Fc = (2*Phi )/(ln(abs((1+Phi )/(1Phi )))); 555 556 else 557 558 "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation" 559 lambdaN = (1/ln(sqrt(abs(Rho))))*((2*sqrt(abs(Rho))2)/(sqrt(abs(Rho))+1)); 560 561 "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation" 562 lambda1 = (1/ln(abs(Rho)))*((2*Rho2)/(Rho+1)); 563 564 "LMTD Correction Fator when 2 Pass Shell Side" 565 Fc = ((2*Phi *(lambdaN/lambda1))/(ln(abs((1+Phi *(lambdaN/lambda1))/(1Phi *(lambdaN/lambda1))))))*(1/lambdaN); 566 567 end 568 569 570 end 571 572 case "Eshell": 573 574 " Variable not in use when 1 Pass Shell Side" 575 lambdaN =1; 576 577 " Variable not in use when 1 Pass Shell Side" 578 lambda1 =1; 579 580 " Variable not in use when 1 Pass Shell Side" 581 Pc = P; 582 583 switch LMTDcorrection 584 585 case "Bowmann": 586 587 " Variable not in use with Bowmann equation" 588 Phi = 1; 589 590 " Variable not in use with Bowmann equation" 591 Rho = 1; 592 593 594 if R equal 1 595 596 then 597 598 "LMTD Correction Fator when 1 Pass Shell Side" 599 Fc = (sqrt(2)*P)/((1P)*ln( abs( ( 2P*0.585786)/( 2P*3.414214)))); 600 601 else 602 603 "LMTD Correction Fator when 1 Pass Shell Side" 604 Fc = sqrt(R*R+1)*ln(abs((1P*R)/(1P)))/((1R)*ln( abs( ( 2P*(R+1sqrt(R*R+1)))/ ( 2P*(R + 1 + sqrt(R*R+1)))))); 605 606 end 607 608 case "Fakeri": 609 610 "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation " 508 611 Phi = (sqrt(((Inlet.Hot.T Outlet.Hot.T)*(Inlet.Hot.T Outlet.Hot.T))+((Outlet.Cold.T  Inlet.Cold.T)*(Outlet.Cold.T  Inlet.Cold.T))))/(2*((Inlet.Hot.T+ Outlet.Hot.T)(Inlet.Cold.T+ Outlet.Cold.T))); 509 612 510 switch LMTDcorrection 511 512 case "Bowmann": 513 514 if R equal 1 515 516 then 517 Fc = (sqrt(2)*P)/((1P)*ln( abs( ( 2P*0.585786)/( 2P*3.414214)))); 518 519 else 520 Fc = sqrt(R*R+1)*ln(abs((1P*R)/(1P)))/((1R)*ln( abs( ( 2P*(R+1sqrt(R*R+1)))/ ( 2P*(R + 1 + sqrt(R*R+1)))))); 521 522 end 523 524 case "Fakeri": 613 "Non Dimensional Variable for LMTD Correction Fator in Fakeri Equation" 614 Rho*(1P*R) = (1P); 525 615 526 616 if Rho equal 1 527 617 528 618 then 619 620 "LMTD Correction Fator when 1 Pass Shell Side" 529 621 Fc = (4*Phi)/(ln(abs((1+2*Phi)/(12*Phi)))); 530 622 531 623 else 624 625 "LMTD Correction Fator when 1 Pass Shell Side" 532 626 Fc = (2*Phi*(Rho+1)*ln(abs(Rho)))/( ln(abs((1+2*Phi)/(12*Phi)))*(Rho1)); 533 627 … … 536 630 end 537 631 538 end 539 540 Model F_Shell_LMTD as Heatex_Basic_LMTD 541 542 ATTRIBUTES 543 Pallete = true; 544 Brief = "Shell and Tubes Heat Exchanger with 2 shell pass  LMTD Method"; 545 Info = 546 "write some information"; 547 548 PARAMETERS 549 550 LMTDcorrection as Switcher(Brief="LMTD Correction Factor Model",Valid=["Bowmann","Fakeri"],Default="Bowmann"); 551 552 VARIABLES 553 554 R as positive; 555 P as positive; 556 Pc as positive; 557 Rho as positive; 558 Phi as positive; 559 lambdaN as positive; 560 lambda1 as positive; 561 562 EQUATIONS 563 564 "Rho: Non  Dimensional Variable for LMTD Correction Fator in Fakeri Equation" 565 Rho*(1P*R) = (1P); 566 567 "R: Capacity Ratio for LMTD Correction Fator" 568 R*(Outlet.Cold.T  Inlet.Cold.T ) = (Inlet.Hot.TOutlet.Hot.T); 569 570 "P: Non  Dimensional Variable for LMTD Correction Fator" 571 P*(Inlet.Hot.T Inlet.Cold.T)= (Outlet.Cold.TInlet.Cold.T); 572 573 "Temperature Difference at Inlet" 574 DT0 = Inlet.Hot.T  Outlet.Cold.T; 575 576 "Temperature Difference at Outlet" 577 DTL = Outlet.Hot.T  Inlet.Cold.T; 578 579 switch LMTDcorrection 580 581 case "Bowmann": 582 583 lambdaN =1; 584 lambda1 =1; 585 Phi = 1; 586 587 if R equal 1 588 589 then 590 Pc*(2P)= P; 591 Fc= (sqrt(2)*Pc)/((1Pc)*ln( abs( ( 2Pc*0.585786)/( 2Pc*3.414214)))); 592 593 else 594 Pc = (sqrt(abs(( 1P*R)/(1P)))1)/(sqrt(abs(( 1P*R)/(1P)))R); 595 Fc = sqrt(R*R+1)*ln(abs((1Pc*R)/(1Pc)))/((1R)*ln( abs( ( 2Pc*(R+1sqrt(R*R+1)))/ ( 2Pc*(R + 1 + sqrt(R*R+1)))))); 596 597 end 598 599 case "Fakeri": 600 Pc = P; 601 Phi = (sqrt(((Inlet.Hot.T  Outlet.Hot.T)*(Inlet.Hot.T Outlet.Hot.T))+((Outlet.Cold.T  Inlet.Cold.T)*(Outlet.Cold.T  Inlet.Cold.T))))/(2*((Inlet.Hot.T + Outlet.Hot.T)( Inlet.Cold.T + Outlet.Cold.T))); 602 603 if Rho equal 1 604 605 then 606 lambdaN = 1; 607 lambda1 = 1; 608 Fc = (2*Phi )/(ln(abs((1+Phi )/(1Phi )))); 609 610 else 611 612 lambdaN = (1/ln(sqrt(abs(Rho))))*((2*sqrt(abs(Rho))2)/(sqrt(abs(Rho))+1)); 613 614 lambda1 = (1/ln(abs(Rho)))*((2*Rho2)/(Rho+1)); 615 616 Fc = ((2*Phi *(lambdaN/lambda1))/(ln(abs((1+Phi *(lambdaN/lambda1))/(1Phi *(lambdaN/lambda1))))))*(1/lambdaN); 617 618 end 619 620 621 end 622 623 624 end 625 #===================================================================== 626 # NTU Method 627 #===================================================================== 632 633 end 634 635 end 628 636 629 637 Model HeatExchanger_NTU as Heatex_Basic_NTU … … 677 685 end 678 686 679 Model E_Shell_NTU as Heatex_Basic_NTU687 Model E_Shell_NTU as Heatex_Basic_NTU 680 688 681 689 ATTRIBUTES … … 691 699 end 692 700 693 Model F_Shell_NTU as Heatex_Basic_NTU701 Model F_Shell_NTU as Heatex_Basic_NTU 694 702 695 703 ATTRIBUTES
Note: See TracChangeset
for help on using the changeset viewer.