Changeset 498 for trunk/sample/stage_separators/sample_column.mso
- Timestamp:
- Apr 11, 2008, 3:21:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sample/stage_separators/sample_column.mso
r398 r498 503 503 end 504 504 505 505 # packed column section with 8 trays 506 FlowSheet PackedSectionColumn 507 PARAMETERS 508 PP as Plugin(Brief="Physical Properties", 509 Type="PP", 510 Components = [ "isobutane", "n-pentane", "propylene", 511 "benzene", "isobutene" ], 512 LiquidModel = "PR", 513 VapourModel = "PR" 514 ); 515 NComp as Integer; 516 517 SET 518 NComp = PP.NumberOfComponents; 519 520 DEVICES 521 sec as Packed_Section_Column; 522 feed as liquid_stream; 523 reb as vapour_stream; 524 cond as liquid_stream; 525 zero as stream; 526 527 CONNECTIONS 528 feed to sec.stage(5).Inlet; 529 zero to sec.stage([1:4]).Inlet; 530 zero to sec.stage([6:sec.NStages]).Inlet; 531 reb to sec.stage(8).InletV; 532 cond to sec.stage(1).InletL; 533 534 SPECIFY 535 feed.F = 113.4 * 'kmol/h'; 536 feed.T = 291 * 'K'; 537 feed.P = 1.66 * 'atm'; 538 feed.z = [0.2, 0.2, 0.2, 0.2, 0.2]; 539 540 zero.F = 0 * 'kmol/h'; 541 zero.T = 300 * 'K'; 542 zero.P = 1 * 'atm'; 543 zero.z = [0.2, 0.2, 0.2, 0.2, 0.2]; 544 zero.v = 0; 545 zero.h = 0 * 'J/mol'; 546 547 cond.F = 85 * 'kmol/h'; 548 cond.P = 2.33 * 'atm'; 549 cond.T = 283.5 * 'K'; 550 cond.z = [0.599, 0.044, 0.035, 0.007, 0.315]; 551 552 reb.F = 137.57 * 'kmol/h'; 553 reb.P = 2.46 * 'atm'; 554 reb.T = 325 * 'K'; 555 reb.z = [0.16, 0.542, 0.013, 0.008, 0.277]; 556 557 sec.stage.deltaP = 0.001 * 'atm'; 558 559 SET 560 sec.H = 4 * 'm'; 561 sec.NStages = 8; 562 sec.stage.Q = 0 * 'kW'; 563 sec.stage.d = 1.009 * 'm'; 564 sec.stage.Cpo = 0.763; 565 sec.stage.e = 0.951; 566 sec.stage.a = 112.6 * 'm^2/m^3'; 567 sec.stage.Qsil = 0.1; 568 569 INITIAL 570 sec.stage.OutletL.T =[283:(325-283)/(sec.NStages-1):325] *'K'; 571 sec.stage.ML = 0.01 * 'kmol'; 572 sec.stage.OutletL.z([1:4]) = [0.3, 0.2, 0.002, 0.1]; 573 574 OPTIONS 575 DAESolver(File="dassl"); 576 NLASolver(File="nlasolver"); 577 TimeStep = 10; 578 TimeEnd = 100; 579 end 580 581 FlowSheet Packed_kettle_cond_Test 582 PARAMETERS 583 PP as Plugin(Brief="Physical Properties", 584 Type="PP", 585 Components = [ "isobutane", "n-pentane", "propylene", 586 "benzene", "isobutene" ], 587 LiquidModel = "PR", 588 VapourModel = "PR" 589 ); 590 NComp as Integer; 591 592 VARIABLES 593 Qc as energy_source (Brief="Heat rate removed from condenser"); 594 Qr as energy_source (Brief="Heat rate supplied to reboiler"); 595 596 SET 597 NComp = PP.NumberOfComponents; 598 599 DEVICES 600 col as PackedDistillation_kettle_cond; 601 feed as source; 602 zero as stream; 603 604 CONNECTIONS 605 feed.Outlet to col.stage(5).Inlet; 606 zero to col.reb.Inlet; 607 zero to col.stage([1:4]).Inlet; 608 zero to col.stage([6:col.NStages]).Inlet; 609 Qc.OutletQ to col.cond.InletQ; 610 Qr.OutletQ to col.reb.InletQ; 611 612 SPECIFY 613 feed.Outlet.F = 113.4 * 'kmol/h'; 614 feed.Outlet.T = 291 * 'K'; 615 feed.Outlet.P = 168.3 * 'kPa'; 616 feed.Outlet.z = 1/NComp; 617 618 zero.F = 0 * 'kmol/h'; 619 zero.T = 300 * 'K'; 620 zero.P = 1 * 'atm'; 621 zero.z = 1/NComp; 622 zero.v = 0; 623 zero.h = 0 * 'J/mol'; 624 625 col.sptop.Outlet2.F = 85 * 'kmol/h'; 626 col.reb.OutletL.F = 28.4 * 'kmol/h'; 627 col.sptop.frac = 0.444445; 628 col.cond.OutletV.F = 0 * 'kmol/h'; 629 Qr.OutletQ.Q = 3.7743e6 * 'kJ/h'; 630 Qc.OutletQ.Q = -3.71e6 * 'kJ/h'; 631 col.pump1.dP = 16 * 'kPa'; 632 633 col.stage.deltaP = 0.003 * 'atm'; 634 635 SET 636 col.H = 3.5 * 'm'; 637 col.NStages = 8; 638 col.stage.Q = 0 * 'kW'; 639 col.stage.d = 2.24 * 'ft'; 640 col.stage.Cpo = 0.763; 641 col.stage.e = 0.951; 642 col.stage.a = 112.6 * 'm^2/m^3'; 643 644 col.cond.V = 2 * 'm^3'; 645 col.cond.Across = 1 * 'm^2'; 646 col.reb.V = 2 * 'm^3'; 647 col.reb.Across = 1 * 'm^2'; 648 col.stage.Qsil = 2; 649 650 INITIAL 651 # condenser 652 col.cond.OutletL.T = 260 *'K'; 653 col.cond.Level = 1 * 'm'; 654 col.cond.OutletL.z([1:4]) = [0.65, 0.05, 0.01, 0.01]; 655 656 # reboiler 657 col.reb.OutletL.T = 330 *'K'; 658 col.reb.Level = 1 * 'm'; 659 col.reb.OutletL.z([1:4]) = [0.1, 0.7, 0.01, 0.01]; 660 661 # column trays 662 col.stage.OutletL.T = [290:(330-290)/(col.NStages-1):330] * 'K'; 663 col.stage.ML = 0.1 * 'kmol'; 664 col.stage.OutletL.z([1:4]) = [0.15, 0.5, 0.001, 0.1]; 665 666 OPTIONS 667 TimeStep = 10; 668 TimeEnd = 500; 669 end 670 671 FlowSheet PackedColumn_ctrl 672 PARAMETERS 673 PP as Plugin(Brief="Physical Properties", 674 Type="PP", 675 Components = [ "isobutane", "n-pentane", "propylene", 676 "benzene", "isobutene" ], 677 LiquidModel = "PR", 678 VapourModel = "PR" 679 ); 680 NComp as Integer; 681 682 Qcmin as heat_rate (Brief="Minimum Condenser Heat supplied"); 683 Qcmax as heat_rate (Brief="Maximum Condenser Heat supplied"); 684 Qrmin as heat_rate (Brief="Minimum Reboiler Heat supplied"); 685 Qrmax as heat_rate (Brief="Maximum Reboiler Heat supplied"); 686 Frmin as flow_mol (Brief="Minimum bottom flow rate"); 687 Frmax as flow_mol (Brief="Maximum bottom flow rate"); 688 Fcmin as flow_mol (Brief="Minimum reflux flow rate"); 689 Fcmax as flow_mol (Brief="Maximum reflux flow rate"); 690 Hmint as length (Brief="Minimum liquid level in top tank"); 691 Hmaxt as length (Brief="Maximum liquid level in top tank"); 692 Hminb as length (Brief="Minimum liquid level in reboiler"); 693 Hmaxb as length (Brief="Maximum liquid level in reboiler"); 694 Pmax as pressure (Brief="Maximum column pressure"); 695 Pmin as pressure (Brief="Minimum column pressure"); 696 Tmax as temperature (Brief="Maximum column temperature"); 697 Tmin as temperature (Brief="Minimum column temperature"); 698 699 VARIABLES 700 Qc as energy_source (Brief="Heat rate removed from condenser"); 701 Qr as energy_source (Brief="Heat rate supplied to reboiler"); 702 Had_top as Real (Brief="Dimensionless condenser level"); 703 Had_bot as Real (Brief="Dimensionless reboiler level"); 704 Pad as Real (Brief="Dimensionless pressure"); 705 Tad as Real (Brief="Dimensionless temperature"); 706 RR as positive (Brief="Reflux ratio"); 707 708 SET 709 NComp = PP.NumberOfComponents; 710 711 DEVICES 712 col as PackedDistillation_kettle_cond; 713 feed as source; 714 zero as stream; 715 TCcond as PIDIncr; 716 LCtop as PIDIncr; 717 LCbot as PIDIncr; 718 PC as PIDIncr; 719 720 CONNECTIONS 721 feed.Outlet to col.stage(5).Inlet; 722 zero to col.reb.Inlet; 723 zero to col.stage([1:4]).Inlet; 724 zero to col.stage([6:col.NStages]).Inlet; 725 Qc.OutletQ to col.cond.InletQ; 726 Qr.OutletQ to col.reb.InletQ; 727 728 EQUATIONS 729 "Temperature Controller" 730 TCcond.Parameters.tau = 0*'s'; 731 TCcond.Parameters.tauSet = 0*'s'; 732 TCcond.Parameters.alpha = 0.3; 733 TCcond.Parameters.bias = 0.5; 734 TCcond.Parameters.gamma = 1; 735 TCcond.Parameters.beta = 1; 736 TCcond.Options.action = 1; 737 TCcond.Options.clip = 1; 738 TCcond.Options.autoMan = 0; 739 TCcond.Parameters.intTime = 60*'s'; 740 TCcond.Parameters.gain = 0.6; 741 TCcond.Parameters.derivTime = 1*'s'; 742 TCcond.Ports.setPoint = ((15+273.15) * 'K' - Tmin)/(Tmax-Tmin); 743 TCcond.Ports.input = Tad; 744 Tad = (col.cond.OutletL.T-Tmin)/(Tmax-Tmin); 745 Qc.OutletQ.Q = Qcmin+(Qcmax-Qcmin)*TCcond.Ports.output; 746 747 "Pressure Controller" 748 PC.Parameters.tau = 0*'s'; 749 PC.Parameters.tauSet = 0*'s'; 750 PC.Parameters.alpha = 0.3; 751 PC.Parameters.bias = 0; 752 PC.Parameters.gamma = 1; 753 PC.Parameters.beta = 1; 754 PC.Options.action = -1; 755 PC.Options.clip = 1; 756 PC.Options.autoMan = 0; 757 PC.Parameters.intTime = 50*'s'; 758 PC.Parameters.gain = 0.5; 759 PC.Parameters.derivTime = 1*'s'; 760 PC.Ports.setPoint = (4.0*'bar'-Pmin)/(Pmax-Pmin); 761 PC.Ports.input = Pad; 762 Pad = (col.cond.OutletV.P-Pmin)/(Pmax-Pmin); 763 col.cond.OutletV.F = (Fcmin+(Fcmax-Fcmin)*PC.Ports.output); 764 765 "Ttop Level Controller" 766 LCtop.Parameters.tau = 0*'s'; 767 LCtop.Parameters.tauSet = 0*'s'; 768 LCtop.Parameters.alpha = 0.3; 769 LCtop.Parameters.bias = 0.5; 770 LCtop.Parameters.gamma = 1; 771 LCtop.Parameters.beta = 1; 772 LCtop.Options.action = -1; 773 LCtop.Options.clip = 1; 774 LCtop.Options.autoMan = 0; 775 LCtop.Parameters.intTime = 10*'s'; 776 LCtop.Parameters.gain = 1; 777 LCtop.Parameters.derivTime = 0*'s'; 778 LCtop.Ports.setPoint = (1.0 * 'm' - Hmint)/(Hmaxt-Hmint); 779 LCtop.Ports.input = Had_top; 780 Had_top = (col.cond.Level-Hmint)/(Hmaxt-Hmint); 781 col.sptop.Outlet1.F = Fcmin + (Fcmax-Fcmin) * LCtop.Ports.output; 782 783 "Tbottom Level Controller" 784 LCbot.Parameters.tau = 0*'s'; 785 LCbot.Parameters.tauSet = 0*'s'; 786 LCbot.Parameters.alpha = 0.3; 787 LCbot.Parameters.bias = 0.5; 788 LCbot.Parameters.gamma = 1; 789 LCbot.Parameters.beta = 1; 790 LCbot.Options.action = -1; 791 LCbot.Options.clip = 1; 792 LCbot.Options.autoMan = 0; 793 LCbot.Parameters.intTime = 100*'s'; 794 LCbot.Parameters.gain = 1; 795 LCbot.Parameters.derivTime = 0*'s'; 796 LCbot.Ports.setPoint = (1.0 * 'm' - Hminb)/(Hmaxb-Hminb); 797 LCbot.Ports.input = Had_bot; 798 Had_bot = (col.reb.Level-Hminb)/(Hmaxb-Hminb); 799 col.reb.OutletL.F = Frmin + (Frmax-Frmin) * LCbot.Ports.output; 800 801 RR * (col.cond.OutletV.F + col.sptop.Outlet1.F) = col.sptop.Outlet2.F; 802 803 if time < 1 * 'h' then 804 col.sptop.Outlet2.F = 75 * 'kmol/h'; # reflux 805 else 806 col.sptop.Outlet2.F = 85 * 'kmol/h'; # reflux 807 end 808 809 SPECIFY 810 feed.Outlet.F = 113.4 * 'kmol/h'; 811 feed.Outlet.T = 291 * 'K'; 812 feed.Outlet.P = 5 * 'bar'; 813 feed.Outlet.z = 1/NComp; 814 815 zero.F = 0 * 'kmol/h'; 816 zero.T = 300 * 'K'; 817 zero.P = 1 * 'atm'; 818 zero.z = 1/NComp; 819 zero.v = 0; 820 zero.h = 0 * 'J/mol'; 821 822 Qr.OutletQ.Q = 4e6 * 'kJ/h'; 823 col.pump1.dP = 16 * 'kPa'; 824 825 col.stage.deltaP = 0.003 * 'atm'; 826 827 SET 828 col.H = 3.5 * 'm'; 829 col.NStages = 8; 830 col.stage.Q = 0 * 'kW'; 831 col.stage.d = 2.24 * 'ft'; 832 col.stage.Cpo = 0.763; 833 col.stage.e = 0.951; 834 col.stage.a = 112.6 * 'm^2/m^3'; 835 836 col.cond.V = 2 * 'm^3'; 837 col.cond.Across = 1 * 'm^2'; 838 col.reb.V = 2 * 'm^3'; 839 col.reb.Across = 1 * 'm^2'; 840 841 col.stage.Qsil = 2; 842 843 # Controllers type 844 TCcond.PID_Select = "Ideal_AW"; 845 PC.PID_Select = "Ideal_AW"; 846 LCtop.PID_Select = "Ideal_AW"; 847 LCbot.PID_Select = "Ideal_AW"; 848 849 Qrmax = 5e6 * 'kJ/h'; 850 Qrmin = 1e6 * 'kJ/h'; 851 Frmin = 0 * 'kmol/h'; 852 Frmax = 60 * 'kmol/h'; 853 Fcmin = 0 * 'kmol/h'; 854 Fcmax = 120 * 'kmol/h'; 855 Hmint = 0 * 'm'; 856 Hmaxt = 2 * 'm'; 857 Hminb = 0 * 'm'; 858 Hmaxb = 2 * 'm'; 859 Pmin = 0.5 * 'bar'; 860 Pmax = 6 * 'bar'; 861 Qcmax = -5e5 * 'kJ/h'; 862 Qcmin = -5e6 * 'kJ/h'; 863 Tmax = (30+273.15) * 'K'; 864 Tmin = (-20+273.15) * 'K'; 865 866 INITIAL 867 # condenser 868 col.cond.OutletL.T = 260 *'K'; 869 col.cond.Level = 1 * 'm'; 870 col.cond.OutletL.z([1:4]) = [0.2, 0.2, 0.4, 0.05]; 871 872 # reboiler 873 col.reb.OutletL.T = 350 *'K'; 874 col.reb.Level = 1 * 'm'; 875 col.reb.OutletL.z([1:4]) = [0.1, 0.4, 0.1, 0.3]; 876 877 # column trays 878 col.stage.OutletL.T = [290:(330-290)/(col.NStages-1):330] * 'K'; 879 col.stage.ML = 0.1 * 'kmol'; 880 col.stage.OutletL.z([1:4]) = [0.15, 0.3, 0.25, 0.2]; 881 882 OPTIONS 883 TimeStep = 0.1; 884 TimeEnd = 5; 885 TimeUnit = 'h'; 886 end
Note: See TracChangeset
for help on using the changeset viewer.