|
| 1 | +package DiethylEther_from_Ethanol |
| 2 | + |
| 3 | +model ms |
| 4 | + extends Simulator.Streams.MaterialStream; |
| 5 | + extends Simulator.Files.ThermodynamicPackages.RaoultsLaw; |
| 6 | +end ms; |
| 7 | + |
| 8 | +model CR |
| 9 | + extends Simulator.UnitOperations.ConversionReactor; |
| 10 | + extends Simulator.Files.Models.ReactionManager.ConversionReaction; |
| 11 | +end CR; |
| 12 | + |
| 13 | +package rigDist |
| 14 | + model Condenser |
| 15 | + extends Simulator.UnitOperations.DistillationColumn.Cond; |
| 16 | + extends Simulator.Files.ThermodynamicPackages.RaoultsLaw; |
| 17 | + end Condenser; |
| 18 | + |
| 19 | + model Tray |
| 20 | + extends Simulator.UnitOperations.DistillationColumn.DistTray; |
| 21 | + extends Simulator.Files.ThermodynamicPackages.RaoultsLaw; |
| 22 | + end Tray; |
| 23 | + |
| 24 | + model Reboiler |
| 25 | + extends Simulator.UnitOperations.DistillationColumn.Reb; |
| 26 | + extends Simulator.Files.ThermodynamicPackages.RaoultsLaw; |
| 27 | + end Reboiler; |
| 28 | + |
| 29 | + model DistColumn |
| 30 | + |
| 31 | + extends Simulator.UnitOperations.DistillationColumn.DistCol; |
| 32 | + Condenser condenser(Nc = Nc, C = C, Ctype = Ctype, Bin = Bin_t[1]); |
| 33 | + Reboiler reboiler(Nc = Nc, C = C, Bin = Bin_t[Nt]); |
| 34 | + Tray tray[Nt - 2](each Nc = Nc, each C = C, Bin = Bin_t[2:Nt - 1]); |
| 35 | + |
| 36 | + end DistColumn; |
| 37 | + |
| 38 | +end rigDist; |
| 39 | + |
| 40 | + model Flowsheet |
| 41 | + |
| 42 | + import data = Simulator.Files.ChemsepDatabase; |
| 43 | + parameter data.Diethylether dieth; |
| 44 | + parameter data.Ethanol eth; |
| 45 | + parameter data.Water wat; |
| 46 | + parameter Integer Nc = 3; |
| 47 | + parameter data.GeneralProperties C[Nc] = {dieth, eth, wat}; |
| 48 | + Simulator.UnitOperations.Mixer MIX_01(C = C, NI = 2, Nc = Nc, outPress = "Inlet_Average") annotation( |
| 49 | + Placement(visible = true, transformation(origin = {-48, 48}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); |
| 50 | + DiethylEther_from_Ethanol.CR REACT_01(BC_r = {2}, C = C, CalcMode = "Define_Out_Temperature", Coef_cr = {{1}, {-2}, {1}}, Nc = Nc, Nr = 1, Tdef = 298.15, X_r = {0.5}) annotation( |
| 51 | + Placement(visible = true, transformation(origin = {38, 50}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); |
| 52 | + DiethylEther_from_Ethanol.rigDist.DistColumn DC_01(C = C, Ctype = "Total", InT_s = {4}, Nc = Nc, Ni = 1, Nt = 8) annotation( |
| 53 | + Placement(visible = true, transformation(origin = {66, -38}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); |
| 54 | + DiethylEther_from_Ethanol.rigDist.DistColumn DC_02(C = C, Ctype = "Total", InT_s = {7}, Nc = Nc, Ni = 1, Nt = 10) annotation( |
| 55 | + Placement(visible = true, transformation(origin = {-48, -38}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); |
| 56 | + ms S_01(C = C, Nc = Nc) annotation( |
| 57 | + Placement(visible = true, transformation(origin = {-84, 66}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); |
| 58 | + DiethylEther_from_Ethanol.ms S_02(C = C, Nc = Nc) annotation( |
| 59 | + Placement(visible = true, transformation(origin = {-86, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); |
| 60 | + ms S_03(C = C, Nc = Nc) annotation( |
| 61 | + Placement(visible = true, transformation(origin = {-8, 50}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); |
| 62 | + ms S_04(C = C, Nc = Nc) annotation( |
| 63 | + Placement(visible = true, transformation(origin = {80, 50}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); |
| 64 | + DiethylEther_from_Ethanol.ms S_05(C = C, Nc = Nc) annotation( |
| 65 | + Placement(visible = true, transformation(origin = {10, -4}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); |
| 66 | + DiethylEther_from_Ethanol.ms S_06(C = C, Nc = Nc) annotation( |
| 67 | + Placement(visible = true, transformation(origin = {8, -70}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); |
| 68 | + DiethylEther_from_Ethanol.ms S_07(C = C, Nc = Nc) annotation( |
| 69 | + Placement(visible = true, transformation(origin = {-106, -8}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); |
| 70 | + DiethylEther_from_Ethanol.ms S_08(C = C, Nc = Nc) annotation( |
| 71 | + Placement(visible = true, transformation(origin = {-106, -66}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); |
| 72 | + Simulator.Streams.EnergyStream E_01 annotation( |
| 73 | + Placement(visible = true, transformation(origin = {20, 8}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); |
| 74 | + Simulator.Streams.EnergyStream E_02 annotation( |
| 75 | + Placement(visible = true, transformation(origin = {18, -98}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); |
| 76 | + Simulator.Streams.EnergyStream E_03 annotation( |
| 77 | + Placement(visible = true, transformation(origin = {10, 28}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); |
| 78 | + Simulator.Streams.EnergyStream E_04 annotation( |
| 79 | + Placement(visible = true, transformation(origin = {-92, 22}, extent = {{10, -10}, {-10, 10}}, rotation = 0))); |
| 80 | + Simulator.Streams.EnergyStream E_05 annotation( |
| 81 | + Placement(visible = true, transformation(origin = {-106, -98}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); |
| 82 | + equation |
| 83 | + connect(S_06.Out, DC_02.In_s[1]) annotation( |
| 84 | + Line(points = {{-2, -70}, {-6, -70}, {-6, -38}, {-22, -38}, {-22, -38}}, color = {0, 70, 70})); |
| 85 | + connect(E_05.Out, DC_02.Rduty) annotation( |
| 86 | + Line(points = {{-96, -98}, {-74, -98}, {-74, -98}, {-72, -98}}, color = {255, 0, 0})); |
| 87 | + connect(E_02.Out, DC_01.Rduty) annotation( |
| 88 | + Line(points = {{28, -98}, {40, -98}, {40, -98}, {42, -98}}, color = {255, 0, 0})); |
| 89 | + connect(DC_02.Cduty, E_04.In) annotation( |
| 90 | + Line(points = {{-72, 22}, {-82, 22}}, color = {255, 0, 0})); |
| 91 | + connect(DC_01.Cduty, E_01.In) annotation( |
| 92 | + Line(points = {{42, 22}, {30, 22}, {30, 8}, {30, 8}}, color = {255, 0, 0})); |
| 93 | + connect(E_03.Out, REACT_01.energy) annotation( |
| 94 | + Line(points = {{20, 28}, {38, 28}, {38, 38}, {38, 38}}, color = {255, 0, 0})); |
| 95 | + connect(S_08.In, DC_02.Bot) annotation( |
| 96 | + Line(points = {{-96, -66}, {-72, -66}, {-72, -68}, {-74, -68}, {-74, -68}}, color = {0, 70, 70})); |
| 97 | + connect(S_07.In, DC_02.Dist) annotation( |
| 98 | + Line(points = {{-96, -8}, {-72, -8}, {-72, -8}, {-72, -8}}, color = {0, 70, 70})); |
| 99 | + connect(S_06.In, DC_01.Bot) annotation( |
| 100 | + Line(points = {{18, -70}, {40, -70}, {40, -68}, {40, -68}}, color = {0, 70, 70})); |
| 101 | + connect(S_05.In, DC_01.Dist) annotation( |
| 102 | + Line(points = {{20, -4}, {40, -4}, {40, -8}, {42, -8}}, color = {0, 70, 70})); |
| 103 | + connect(S_04.Out, DC_01.In_s[1]) annotation( |
| 104 | + Line(points = {{90, 50}, {128, 50}, {128, -38}, {92, -38}, {92, -38}}, color = {0, 70, 70})); |
| 105 | + connect(REACT_01.Out, S_04.In) annotation( |
| 106 | + Line(points = {{48, 50}, {70, 50}, {70, 50}, {70, 50}}, color = {0, 70, 70})); |
| 107 | + connect(S_03.Out, REACT_01.In) annotation( |
| 108 | + Line(points = {{2, 50}, {28, 50}, {28, 50}, {28, 50}, {28, 50}}, color = {0, 70, 70})); |
| 109 | + connect(MIX_01.outlet, S_03.In) annotation( |
| 110 | + Line(points = {{-38, 48}, {-18, 48}, {-18, 50}, {-18, 50}}, color = {0, 70, 70})); |
| 111 | + connect(S_02.Out, MIX_01.inlet[2]) annotation( |
| 112 | + Line(points = {{-76, 40}, {-64, 40}, {-64, 48}, {-58, 48}, {-58, 48}}, color = {0, 70, 70})); |
| 113 | + connect(S_01.Out, MIX_01.inlet[1]) annotation( |
| 114 | + Line(points = {{-74, 66}, {-64, 66}, {-64, 48}, {-58, 48}, {-58, 48}}, color = {0, 70, 70})); |
| 115 | + |
| 116 | + S_01.T = 347.602; |
| 117 | + S_01.P = 101325; |
| 118 | + S_01.F_p[1] = 20.7564; |
| 119 | + S_01.x_pc[1, :] = {0.025052486, 0.81126839, 0.16367913}; |
| 120 | + S_02.T = 313.15; |
| 121 | + S_02.P = 101325; |
| 122 | + S_02.F_p[1] = 20; |
| 123 | + S_02.x_pc[1, :] = {0, 0.85, 0.15}; |
| 124 | + DC_01.condenser.P = 101325; |
| 125 | + DC_01.reboiler.P = 101325; |
| 126 | + DC_01.RR = 3; |
| 127 | + S_06.F_p[1] = 30.7662; |
| 128 | + DC_02.condenser.P = 101325; |
| 129 | + DC_02.reboiler.P = 101325; |
| 130 | + DC_02.RR = 2; |
| 131 | + S_08.F_p[1] = 14.7189; |
| 132 | + end Flowsheet; |
| 133 | + |
| 134 | +end DiethylEther_from_Ethanol; |
0 commit comments