Changeset 848 for trunk/sample
- Timestamp:
- Oct 3, 2009, 7:15:28 PM (14 years ago)
- Location:
- trunk/sample/stage_separators
- Files:
-
- 1 added
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sample/stage_separators/sample_column.mso
r650 r848 505 505 end 506 506 507 # packed column section with 8 trays508 FlowSheet PackedSectionColumn509 PARAMETERS510 PP as Plugin(Brief="Physical Properties",511 Type="PP",512 Components = [ "isobutane", "n-pentane", "propylene",513 "benzene", "isobutene" ],514 LiquidModel = "PR",515 VapourModel = "PR"516 );517 NComp as Integer;518 519 SET520 NComp = PP.NumberOfComponents;521 522 DEVICES523 sec as Packed_Section_Column;524 feed as liquid_stream;525 reb as vapour_stream;526 cond as liquid_stream;527 zero as stream;528 529 CONNECTIONS530 feed to sec.stage(5).Inlet;531 zero to sec.stage([1:4]).Inlet;532 zero to sec.stage([6:sec.NStages]).Inlet;533 reb to sec.stage(8).InletV;534 cond to sec.stage(1).InletL;535 536 SPECIFY537 feed.F = 113.4 * 'kmol/h';538 feed.T = 291 * 'K';539 feed.P = 1.66 * 'atm';540 feed.z = [0.2, 0.2, 0.2, 0.2, 0.2];541 542 zero.F = 0 * 'kmol/h';543 zero.T = 300 * 'K';544 zero.P = 1 * 'atm';545 zero.z = [0.2, 0.2, 0.2, 0.2, 0.2];546 zero.v = 0;547 zero.h = 0 * 'J/mol';548 549 cond.F = 85 * 'kmol/h';550 cond.P = 2.33 * 'atm';551 cond.T = 283.5 * 'K';552 cond.z = [0.599, 0.044, 0.035, 0.007, 0.315];553 554 reb.F = 137.57 * 'kmol/h';555 reb.P = 2.46 * 'atm';556 reb.T = 325 * 'K';557 reb.z = [0.16, 0.542, 0.013, 0.008, 0.277];558 559 sec.dP = 0.008 * 'atm'; #queda de pressao na secao!560 561 SET562 sec.H = 4 * 'm';#altura do recheio563 sec.NStages = 8; #numero de estagios teoricos do recheio564 sec.stage.Q = 0 * 'kW';565 sec.stage.d = 1.009 * 'm';566 sec.stage.Cpo = 0.763;567 sec.stage.e = 0.951;568 sec.stage.a = 112.6 * 'm^2/m^3';569 sec.stage.Qsil = 0.1;#coeficiente de resistencia do recheio570 571 INITIAL572 sec.stage.OutletL.T =[283:(325-283)/(sec.NStages-1):325] *'K';573 sec.stage.ML = 0.01 * 'kmol';574 sec.stage.OutletL.z([1:4]) = [0.3, 0.2, 0.002, 0.1];575 576 OPTIONS577 DAESolver(File="dassl");578 NLASolver(File="nlasolver");579 TimeStep = 10;580 TimeEnd = 100;581 end582 583 FlowSheet Packed_kettle_cond_Test584 PARAMETERS585 PP as Plugin(Brief="Physical Properties",586 Type="PP",587 Components = [ "isobutane", "n-pentane", "propylene",588 "benzene", "isobutene" ],589 LiquidModel = "PR",590 VapourModel = "PR"591 );592 NComp as Integer;593 594 VARIABLES595 Qc as energy_source (Brief="Heat rate removed from condenser");596 Qr as energy_source (Brief="Heat rate supplied to reboiler");597 598 SET599 NComp = PP.NumberOfComponents;600 601 DEVICES602 col as PackedDistillation_kettle_cond;603 feed as source;604 zero as stream;605 606 CONNECTIONS607 feed.Outlet to col.stage(5).Inlet;608 zero to col.reb.Inlet;609 zero to col.stage([1:4]).Inlet;610 zero to col.stage([6:col.NStages]).Inlet;611 Qc.OutletQ to col.cond.InletQ;612 Qr.OutletQ to col.reb.InletQ;613 614 SPECIFY615 feed.F = 113.4 * 'kmol/h';616 feed.T = 291 * 'K';617 feed.P = 168.3 * 'kPa';618 feed.Composition = 1/NComp;619 620 zero.F = 0 * 'kmol/h';621 zero.T = 300 * 'K';622 zero.P = 1 * 'atm';623 zero.z = 1/NComp;624 zero.v = 0;625 zero.h = 0 * 'J/mol';626 627 col.sptop.Outlet2.F = 85 * 'kmol/h';628 col.reb.OutletL.F = 28.4 * 'kmol/h';629 col.sptop.frac = 0.444445;630 col.cond.OutletV.F = 0 * 'kmol/h';631 Qr.OutletQ.Q = 3.7743e6 * 'kJ/h';632 Qc.OutletQ.Q = -3.71e6 * 'kJ/h';633 col.pump1.dP = 16 * 'kPa';634 635 col.dP = 0.024 * 'atm'; #queda de pressao entre o topo e o fundo da coluna.636 637 SET638 col.H = 3.5 * 'm'; # altura de recheio639 col.NStages = 8; # numero de estagios teoricos do recheio640 col.stage.Q = 0 * 'kW';641 col.stage.d = 2.24 * 'ft';642 col.stage.Cpo = 0.763;643 col.stage.e = 0.951;644 col.stage.a = 112.6 * 'm^2/m^3';645 646 col.cond.V = 2 * 'm^3';647 col.cond.Across = 1 * 'm^2';648 col.reb.V = 2 * 'm^3';649 col.reb.Across = 1 * 'm^2';650 col.stage.Qsil = 2; # coeficiente de resistencia do recheio651 652 INITIAL653 # condenser654 col.cond.OutletL.T = 260 *'K';655 col.cond.Level = 1 * 'm';656 col.cond.OutletL.z([1:4]) = [0.65, 0.05, 0.01, 0.01];657 658 # reboiler659 col.reb.OutletL.T = 330 *'K';660 col.reb.Level = 1 * 'm';661 col.reb.OutletL.z([1:4]) = [0.1, 0.7, 0.01, 0.01];662 663 # column trays664 col.stage.OutletL.T = [290:(330-290)/(col.NStages-1):330] * 'K';665 col.stage.ML = 0.1 * 'kmol';666 col.stage.OutletL.z([1:4]) = [0.15, 0.5, 0.001, 0.1];667 668 OPTIONS669 TimeStep = 10;670 TimeEnd = 500;671 end672 673 FlowSheet PackedColumn_ctrl674 PARAMETERS675 PP as Plugin(Brief="Physical Properties",676 Type="PP",677 Components = [ "isobutane", "n-pentane", "propylene",678 "benzene", "isobutene" ],679 LiquidModel = "PR",680 VapourModel = "PR"681 );682 NComp as Integer;683 684 Qcmin as heat_rate (Brief="Minimum Condenser Heat supplied");685 Qcmax as heat_rate (Brief="Maximum Condenser Heat supplied");686 Qrmin as heat_rate (Brief="Minimum Reboiler Heat supplied");687 Qrmax as heat_rate (Brief="Maximum Reboiler Heat supplied");688 Frmin as flow_mol (Brief="Minimum bottom flow rate");689 Frmax as flow_mol (Brief="Maximum bottom flow rate");690 Fcmin as flow_mol (Brief="Minimum reflux flow rate");691 Fcmax as flow_mol (Brief="Maximum reflux flow rate");692 Hmint as length (Brief="Minimum liquid level in top tank");693 Hmaxt as length (Brief="Maximum liquid level in top tank");694 Hminb as length (Brief="Minimum liquid level in reboiler");695 Hmaxb as length (Brief="Maximum liquid level in reboiler");696 Pmax as pressure (Brief="Maximum column pressure");697 Pmin as pressure (Brief="Minimum column pressure");698 Tmax as temperature (Brief="Maximum column temperature");699 Tmin as temperature (Brief="Minimum column temperature");700 701 VARIABLES702 Qc as energy_source (Brief="Heat rate removed from condenser");703 Qr as energy_source (Brief="Heat rate supplied to reboiler");704 Had_top as Real (Brief="Dimensionless condenser level");705 Had_bot as Real (Brief="Dimensionless reboiler level");706 Pad as Real (Brief="Dimensionless pressure");707 Tad as Real (Brief="Dimensionless temperature");708 RR as positive (Brief="Reflux ratio");709 710 SET711 NComp = PP.NumberOfComponents;712 713 DEVICES714 col as PackedDistillation_kettle_cond;715 feed as source;716 zero as stream;717 TCcond as PIDIncr;718 LCtop as PIDIncr;719 LCbot as PIDIncr;720 PC as PIDIncr;721 722 CONNECTIONS723 feed.Outlet to col.stage(5).Inlet;724 zero to col.reb.Inlet;725 zero to col.stage([1:4]).Inlet;726 zero to col.stage([6:col.NStages]).Inlet;727 Qc.OutletQ to col.cond.InletQ;728 Qr.OutletQ to col.reb.InletQ;729 730 EQUATIONS731 "Temperature Controller"732 TCcond.Parameters.tau = 0*'s';733 TCcond.Parameters.tauSet = 0*'s';734 TCcond.Parameters.alpha = 0.3;735 TCcond.Parameters.bias = 0.5;736 TCcond.Parameters.gamma = 1;737 TCcond.Parameters.beta = 1;738 TCcond.Options.action = 1;739 TCcond.Options.clip = 1;740 TCcond.Options.autoMan = 0;741 TCcond.Parameters.intTime = 60*'s';742 TCcond.Parameters.gain = 0.6;743 TCcond.Parameters.derivTime = 1*'s';744 TCcond.Ports.setPoint = ((15+273.15) * 'K' - Tmin)/(Tmax-Tmin);745 TCcond.Ports.input = Tad;746 Tad = (col.cond.OutletL.T-Tmin)/(Tmax-Tmin);747 Qc.OutletQ.Q = Qcmin+(Qcmax-Qcmin)*TCcond.Ports.output;748 749 "Pressure Controller"750 PC.Parameters.tau = 0*'s';751 PC.Parameters.tauSet = 0*'s';752 PC.Parameters.alpha = 0.3;753 PC.Parameters.bias = 0;754 PC.Parameters.gamma = 1;755 PC.Parameters.beta = 1;756 PC.Options.action = -1;757 PC.Options.clip = 1;758 PC.Options.autoMan = 0;759 PC.Parameters.intTime = 50*'s';760 PC.Parameters.gain = 0.5;761 PC.Parameters.derivTime = 1*'s';762 PC.Ports.setPoint = (4.0*'bar'-Pmin)/(Pmax-Pmin);763 PC.Ports.input = Pad;764 Pad = (col.cond.OutletV.P-Pmin)/(Pmax-Pmin);765 col.cond.OutletV.F = (Fcmin+(Fcmax-Fcmin)*PC.Ports.output);766 767 "Ttop Level Controller"768 LCtop.Parameters.tau = 0*'s';769 LCtop.Parameters.tauSet = 0*'s';770 LCtop.Parameters.alpha = 0.3;771 LCtop.Parameters.bias = 0.5;772 LCtop.Parameters.gamma = 1;773 LCtop.Parameters.beta = 1;774 LCtop.Options.action = -1;775 LCtop.Options.clip = 1;776 LCtop.Options.autoMan = 0;777 LCtop.Parameters.intTime = 10*'s';778 LCtop.Parameters.gain = 1;779 LCtop.Parameters.derivTime = 0*'s';780 LCtop.Ports.setPoint = (1.0 * 'm' - Hmint)/(Hmaxt-Hmint);781 LCtop.Ports.input = Had_top;782 Had_top = (col.cond.Level-Hmint)/(Hmaxt-Hmint);783 col.sptop.Outlet1.F = Fcmin + (Fcmax-Fcmin) * LCtop.Ports.output;784 785 "Tbottom Level Controller"786 LCbot.Parameters.tau = 0*'s';787 LCbot.Parameters.tauSet = 0*'s';788 LCbot.Parameters.alpha = 0.3;789 LCbot.Parameters.bias = 0.5;790 LCbot.Parameters.gamma = 1;791 LCbot.Parameters.beta = 1;792 LCbot.Options.action = -1;793 LCbot.Options.clip = 1;794 LCbot.Options.autoMan = 0;795 LCbot.Parameters.intTime = 100*'s';796 LCbot.Parameters.gain = 1;797 LCbot.Parameters.derivTime = 0*'s';798 LCbot.Ports.setPoint = (1.0 * 'm' - Hminb)/(Hmaxb-Hminb);799 LCbot.Ports.input = Had_bot;800 Had_bot = (col.reb.Level-Hminb)/(Hmaxb-Hminb);801 col.reb.OutletL.F = Frmin + (Frmax-Frmin) * LCbot.Ports.output;802 803 RR * (col.cond.OutletV.F + col.sptop.Outlet1.F) = col.sptop.Outlet2.F;804 805 if time < 1 * 'h' then806 col.sptop.Outlet2.F = 75 * 'kmol/h'; # reflux807 else808 col.sptop.Outlet2.F = 85 * 'kmol/h'; # reflux809 end810 811 SPECIFY812 feed.F = 113.4 * 'kmol/h';813 feed.T = 291 * 'K';814 feed.P = 5 * 'bar';815 feed.Composition = 1/NComp;816 817 zero.F = 0 * 'kmol/h';818 zero.T = 300 * 'K';819 zero.P = 1 * 'atm';820 zero.z = 1/NComp;821 zero.v = 0;822 zero.h = 0 * 'J/mol';823 824 Qr.OutletQ.Q = 4e6 * 'kJ/h';825 col.pump1.dP = 16 * 'kPa';826 827 col.dP = 0.024 * 'atm'; #queda de pressao entre o topo e o fundo da coluna828 829 SET830 col.H = 3.5 * 'm'; #altura do recheio831 col.NStages = 8; #numero de estagios teoricos do recheio832 col.stage.Q = 0 * 'kW';833 col.stage.d = 2.24 * 'ft';834 col.stage.Cpo = 0.763;835 col.stage.e = 0.951;836 col.stage.a = 112.6 * 'm^2/m^3';837 838 col.cond.V = 2 * 'm^3';839 col.cond.Across = 1 * 'm^2';840 col.reb.V = 2 * 'm^3';841 col.reb.Across = 1 * 'm^2';842 843 col.stage.Qsil = 2; #coeficiente de resistencia do recheio844 845 # Controllers type846 TCcond.PID_Select = "Ideal_AW";847 PC.PID_Select = "Ideal_AW";848 LCtop.PID_Select = "Ideal_AW";849 LCbot.PID_Select = "Ideal_AW";850 851 Qrmax = 5e6 * 'kJ/h';852 Qrmin = 1e6 * 'kJ/h';853 Frmin = 0 * 'kmol/h';854 Frmax = 60 * 'kmol/h';855 Fcmin = 0 * 'kmol/h';856 Fcmax = 120 * 'kmol/h';857 Hmint = 0 * 'm';858 Hmaxt = 2 * 'm';859 Hminb = 0 * 'm';860 Hmaxb = 2 * 'm';861 Pmin = 0.5 * 'bar';862 Pmax = 6 * 'bar';863 Qcmax = -5e5 * 'kJ/h';864 Qcmin = -5e6 * 'kJ/h';865 Tmax = (30+273.15) * 'K';866 Tmin = (-20+273.15) * 'K';867 868 INITIAL869 # condenser870 col.cond.OutletL.T = 260 *'K';871 col.cond.Level = 1 * 'm';872 col.cond.OutletL.z([1:4]) = [0.2, 0.2, 0.4, 0.05];873 874 # reboiler875 col.reb.OutletL.T = 350 *'K';876 col.reb.Level = 1 * 'm';877 col.reb.OutletL.z([1:4]) = [0.1, 0.4, 0.1, 0.3];878 879 # column trays880 col.stage.OutletL.T = [290:(330-290)/(col.NStages-1):330] * 'K';881 col.stage.ML = 0.1 * 'kmol';882 col.stage.OutletL.z([1:4]) = [0.15, 0.3, 0.25, 0.2];883 884 OPTIONS885 TimeStep = 0.1;886 TimeEnd = 5;887 TimeUnit = 'h';888 InitialFile = "Packed_Column_ctrl.rlt";889 #GuessFile = "Packed_Column_ctrl.rlt";890 #Dynamic = false;891 DAESolver(File="dassl");892 end
Note: See TracChangeset
for help on using the changeset viewer.