source: branches/gui/sample/stage_separators/sample_flash.mso @ 775

Last change on this file since 775 was 749, checked in by gerson bicca, 14 years ago

added samples in mso version

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