1 | #*---------------------------------------------- |
---|
2 | * FlowSheet generated automaticaly by EMSO-GUI |
---|
3 | *----------------------------------------------*# |
---|
4 | |
---|
5 | using "pressure_changers/valve"; |
---|
6 | using "streams"; |
---|
7 | using "controllers/PIDs"; |
---|
8 | using "stage_separators/flash"; |
---|
9 | |
---|
10 | FlowSheet sample_flash |
---|
11 | PARAMETERS |
---|
12 | PP as Plugin(Brief="Physical Properties", |
---|
13 | Type="PP", |
---|
14 | Components = ["n-butane","benzene","n-octane"], |
---|
15 | LiquidModel = "SRK", |
---|
16 | VapourModel = "SRK" |
---|
17 | ); |
---|
18 | NComp as Integer; |
---|
19 | SET |
---|
20 | NComp = PP.NumberOfComponents; |
---|
21 | |
---|
22 | DEVICES |
---|
23 | LCV as valve_flow; |
---|
24 | |
---|
25 | SET |
---|
26 | LCV.MinFlow = 0 * 'kmol/h'; |
---|
27 | LCV.MaxFlow = 700 * 'kmol/h'; |
---|
28 | |
---|
29 | SPECIFY |
---|
30 | |
---|
31 | INITIAL |
---|
32 | |
---|
33 | GUESS |
---|
34 | |
---|
35 | DEVICES |
---|
36 | Feed as simple_source; |
---|
37 | |
---|
38 | SET |
---|
39 | |
---|
40 | SPECIFY |
---|
41 | Feed.MolarComposition(1) = 0.3; |
---|
42 | Feed.MolarComposition(2) = 0.3; |
---|
43 | Feed.MolarComposition(3) = 0.4; |
---|
44 | Feed.T = 338 * 'K'; |
---|
45 | Feed.P = 5 * 'atm'; |
---|
46 | |
---|
47 | INITIAL |
---|
48 | |
---|
49 | GUESS |
---|
50 | |
---|
51 | DEVICES |
---|
52 | PCV as valve_flow; |
---|
53 | |
---|
54 | SET |
---|
55 | PCV.MinFlow = 0 * 'kmol/h'; |
---|
56 | PCV.MaxFlow = 500 * 'kmol/h'; |
---|
57 | |
---|
58 | SPECIFY |
---|
59 | |
---|
60 | INITIAL |
---|
61 | |
---|
62 | GUESS |
---|
63 | |
---|
64 | DEVICES |
---|
65 | VaporProduct as sink; |
---|
66 | |
---|
67 | SET |
---|
68 | |
---|
69 | SPECIFY |
---|
70 | |
---|
71 | INITIAL |
---|
72 | |
---|
73 | GUESS |
---|
74 | |
---|
75 | DEVICES |
---|
76 | LiquidProduct as sink; |
---|
77 | |
---|
78 | SET |
---|
79 | |
---|
80 | SPECIFY |
---|
81 | |
---|
82 | INITIAL |
---|
83 | |
---|
84 | GUESS |
---|
85 | |
---|
86 | DEVICES |
---|
87 | FeedValve as valve_flow; |
---|
88 | |
---|
89 | SET |
---|
90 | FeedValve.MinFlow = 0 * 'kmol/h'; |
---|
91 | FeedValve.MaxFlow = 1000 * 'kmol/h'; |
---|
92 | |
---|
93 | SPECIFY |
---|
94 | |
---|
95 | INITIAL |
---|
96 | |
---|
97 | GUESS |
---|
98 | |
---|
99 | DEVICES |
---|
100 | FeedStep as StepSignal; |
---|
101 | |
---|
102 | SET |
---|
103 | FeedStep.StepTime = 1.5 * 'h'; |
---|
104 | FeedStep.StartValue = 0.5; |
---|
105 | FeedStep.FinalValue = 0.6; |
---|
106 | |
---|
107 | SPECIFY |
---|
108 | |
---|
109 | INITIAL |
---|
110 | |
---|
111 | GUESS |
---|
112 | |
---|
113 | DEVICES |
---|
114 | PID_PC as PID; |
---|
115 | |
---|
116 | SET |
---|
117 | PID_PC.PID_Select = "Parallel_AWBT"; |
---|
118 | PID_PC.Action = "Direct"; |
---|
119 | PID_PC.Mode = "Automatic"; |
---|
120 | PID_PC.Clip = "Clipped"; |
---|
121 | PID_PC.alpha = 1; |
---|
122 | PID_PC.beta = 1; |
---|
123 | PID_PC.bias = 0.5; |
---|
124 | PID_PC.derivTime = 18 * 's'; |
---|
125 | PID_PC.intTime = 72 * 's'; |
---|
126 | PID_PC.gain = 0.9275; |
---|
127 | PID_PC.gamma = 1; |
---|
128 | PID_PC.tau = 1 * 's'; |
---|
129 | PID_PC.tauSet = 1 * 's'; |
---|
130 | PID_PC.MinInput = 0; |
---|
131 | PID_PC.MaxInput = 6; |
---|
132 | PID_PC.MinOutput = 0; |
---|
133 | PID_PC.MaxOutput = 1; |
---|
134 | |
---|
135 | SPECIFY |
---|
136 | PID_PC.SetPoint = 0.6; |
---|
137 | |
---|
138 | INITIAL |
---|
139 | |
---|
140 | GUESS |
---|
141 | |
---|
142 | DEVICES |
---|
143 | PID_LC as PID; |
---|
144 | |
---|
145 | SET |
---|
146 | PID_LC.PID_Select = "Parallel_AWBT"; |
---|
147 | PID_LC.Action = "Direct"; |
---|
148 | PID_LC.Mode = "Automatic"; |
---|
149 | PID_LC.Clip = "Clipped"; |
---|
150 | PID_LC.alpha = 1; |
---|
151 | PID_LC.beta = 1; |
---|
152 | PID_LC.bias = 0.5; |
---|
153 | PID_LC.derivTime = 19 * 's'; |
---|
154 | PID_LC.intTime = 76 * 's'; |
---|
155 | PID_LC.gain = 1.1776; |
---|
156 | PID_LC.gamma = 1; |
---|
157 | PID_LC.tau = 1 * 's'; |
---|
158 | PID_LC.tauSet = 1 * 's'; |
---|
159 | PID_LC.MinInput = 0; |
---|
160 | PID_LC.MaxInput = 2; |
---|
161 | PID_LC.MinOutput = 0; |
---|
162 | PID_LC.MaxOutput = 1; |
---|
163 | |
---|
164 | SPECIFY |
---|
165 | PID_LC.SetPoint = 0.7; |
---|
166 | |
---|
167 | INITIAL |
---|
168 | |
---|
169 | GUESS |
---|
170 | |
---|
171 | DEVICES |
---|
172 | F101 as flash; |
---|
173 | |
---|
174 | SET |
---|
175 | F101.Orientation = "vertical"; |
---|
176 | F101.Heads = "hemispherical"; |
---|
177 | F101.Diameter = 2 * 'm'; |
---|
178 | F101.Lenght = 5 * 'm'; |
---|
179 | F101.Levelpercent_Initial = 0.80; |
---|
180 | F101.Temperature_Initial = 373 * 'K'; |
---|
181 | F101.Composition_Initial(1) = 0.30; |
---|
182 | F101.Composition_Initial(2) = 0.40; |
---|
183 | F101.Composition_Initial(3) = 0.30; |
---|
184 | |
---|
185 | SPECIFY |
---|
186 | |
---|
187 | INITIAL |
---|
188 | |
---|
189 | GUESS |
---|
190 | |
---|
191 | DEVICES |
---|
192 | heat_duty as energy_source2; |
---|
193 | |
---|
194 | SET |
---|
195 | |
---|
196 | SPECIFY |
---|
197 | heat_duty.OutletQ = 1026.32 * 'kW'; |
---|
198 | |
---|
199 | INITIAL |
---|
200 | |
---|
201 | GUESS |
---|
202 | |
---|
203 | CONNECTIONS |
---|
204 | PCV.Outlet to VaporProduct.Inlet; |
---|
205 | LCV.Outlet to LiquidProduct.Inlet; |
---|
206 | Feed.Outlet to FeedValve.Inlet; |
---|
207 | FeedStep.OutSignal to FeedValve.FlowFraction; |
---|
208 | PID_LC.Output to LCV.FlowFraction; |
---|
209 | PID_PC.Output to PCV.FlowFraction; |
---|
210 | FeedValve.Outlet to F101.Inlet; |
---|
211 | heat_duty.OutletQ to F101.InletQ; |
---|
212 | F101.OutletLiquid to LCV.Inlet; |
---|
213 | F101.OutletVapour to PCV.Inlet; |
---|
214 | F101.LI to PID_LC.Input; |
---|
215 | F101.PI to PID_PC.Input; |
---|
216 | |
---|
217 | OPTIONS |
---|
218 | Dynamic = true; |
---|
219 | TimeStep = 0.02; |
---|
220 | TimeEnd = 3; |
---|
221 | TimeUnit = 'h'; |
---|
222 | Integration = "original"; |
---|
223 | NLASolver( |
---|
224 | File = "sundials", |
---|
225 | RelativeAccuracy = 1e-3, |
---|
226 | AbsoluteAccuracy = 1e-3, |
---|
227 | MaxIterations = 100 |
---|
228 | ); |
---|
229 | DAESolver( |
---|
230 | File = "sundials", |
---|
231 | RelativeAccuracy = 1e-3, |
---|
232 | AbsoluteAccuracy = 1e-6, |
---|
233 | EventAccuracy = 1e-2 |
---|
234 | ); |
---|
235 | end |
---|