source: branches/gui/sample/stage_separators/Sample_flash_PID.mso @ 905

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

updated flash model

File size: 3.2 KB
Line 
1#*----------------------------------------------
2* FlowSheet generated automaticaly by EMSO-GUI
3*----------------------------------------------*#
4
5using "streams";
6using "pressure_changers/valve";
7using "controllers/PIDs";
8using "stage_separators/flash";
9
10FlowSheet Sample_flash_PID
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        HeatToFlash as energy_source;
24
25        SET
26
27        SPECIFY
28        HeatToFlash.OutletQ = 1027 * 'kW';
29
30        INITIAL
31
32        GUESS
33
34        DEVICES
35        Feed as simple_source;
36
37        SET
38
39        SPECIFY
40        Feed.MolarComposition(1) = 0.3;
41        Feed.MolarComposition(2) = 0.3;
42        Feed.MolarComposition(3) = 0.4;
43        Feed.F = 500 * 'kmol/h';
44        Feed.T = 338 * 'K';
45        Feed.P = 5 * 'atm';
46
47        INITIAL
48
49        GUESS
50
51        DEVICES
52        VaporProduct as sink;
53
54        SET
55
56        SPECIFY
57
58        INITIAL
59
60        GUESS
61
62        DEVICES
63        valve_liquid as valve_flow;
64
65        SET
66
67        SPECIFY
68
69        INITIAL
70
71        GUESS
72
73        DEVICES
74        valve_Vapour as valve_flow;
75
76        SET
77
78        SPECIFY
79
80        INITIAL
81
82        GUESS
83
84        DEVICES
85        PID_LC as PID;
86
87        SET
88        PID_LC.PID_Select = "Parallel_AWBT";
89        PID_LC.Action = "Direct";
90        PID_LC.Mode = "Automatic";
91        PID_LC.Clip = "Clipped";
92        PID_LC.alpha = 1;
93        PID_LC.beta = 1;
94        PID_LC.bias = 0.5;
95        PID_LC.derivTime = 19 * 's';
96        PID_LC.intTime = 76 * 's';
97        PID_LC.gain = 1.1776;
98        PID_LC.gamma = 1;
99        PID_LC.tau = 1 * 's';
100        PID_LC.tauSet = 1 * 's';
101        PID_LC.MinInput = 0;
102        PID_LC.MaxInput = 1;
103        PID_LC.MinOutput = 0;
104        PID_LC.MaxOutput = 1;
105
106        SPECIFY
107        PID_LC.SetPoint = 0.7;
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 = 4;
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        LiquidProduct as simple_sink;
144
145        SET
146
147        SPECIFY
148
149        INITIAL
150
151        GUESS
152
153        DEVICES
154        F101_1 as flash;
155
156        SET
157        F101_1.Orientation = "vertical";
158        F101_1.Heads = "flat";
159        F101_1.Diameter = 3.1 * 'm';
160        F101_1.Lenght = 6 * 'm';
161        F101_1.Levelpercent_Initial = 0.80;
162        F101_1.Temperature_Initial = 373 * 'K';
163        F101_1.Composition_Initial(1) = 0.30;
164        F101_1.Composition_Initial(2) = 0.40;
165        F101_1.Composition_Initial(3) = 0.30;
166
167        SPECIFY
168
169        INITIAL
170
171        GUESS
172
173        CONNECTIONS
174        valve_Vapour.Outlet to VaporProduct.Inlet;
175        PID_LC.Output to valve_liquid.FlowFraction;
176        PID_PC.Output to valve_Vapour.FlowFraction;
177        valve_liquid.Outlet to LiquidProduct.Inlet;
178        Feed.Outlet to F101_1.Inlet;
179        F101_1.OutletVapour to valve_Vapour.Inlet;
180        HeatToFlash.OutletQ to F101_1.InletQ;
181        F101_1.OutletLiquid to valve_liquid.Inlet;
182        F101_1.LI to PID_LC.Input;
183        F101_1.PI to PID_PC.Input;
184
185        OPTIONS
186        Dynamic = true;
187        TimeStep = 0.2;
188        TimeEnd = 12;
189        TimeUnit = 'h';
190        Integration = "original";
191        NLASolver(
192                File = "sundials",
193                RelativeAccuracy = 1e-3,
194                AbsoluteAccuracy = 1e-3,
195                MaxIterations = 100
196        );
197        DAESolver(
198                File = "sundials",
199                RelativeAccuracy = 1e-2,
200                AbsoluteAccuracy = 1e-6,
201                EventAccuracy = 1e-2
202        );
203end
Note: See TracBrowser for help on using the repository browser.