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

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

added samples in mso version

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 = 1026.32 * '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 = 2;
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        F101_1 as flash;
144
145        SET
146        F101_1.VesselVolume = 8 * 'm^3';
147        F101_1.Orientation = "vertical";
148        F101_1.Diameter = 3.1 * 'm';
149        F101_1.Levelpercent_Initial = 0.70;
150        F101_1.Temperature_Initial = 383 * 'K';
151        F101_1.Composition_Initial(1) = 0.3;
152        F101_1.Composition_Initial(2) = 0.4;
153        F101_1.Composition_Initial(3) = 0.3;
154
155        SPECIFY
156
157        INITIAL
158
159        GUESS
160
161        DEVICES
162        LiquidProduct as simple_sink;
163
164        SET
165
166        SPECIFY
167
168        INITIAL
169
170        GUESS
171
172        CONNECTIONS
173        valve_Vapour.Outlet to VaporProduct.Inlet;
174        PID_LC.Output to valve_liquid.FlowFraction;
175        PID_PC.Output to valve_Vapour.FlowFraction;
176        F101_1.OutletVapour to valve_Vapour.Inlet;
177        F101_1.OutletLiquid to valve_liquid.Inlet;
178        Feed.Outlet to F101_1.Inlet;
179        HeatToFlash.OutletQ to F101_1.InletQ;
180        F101_1.LI to PID_LC.Input;
181        F101_1.PI to PID_PC.Input;
182        valve_liquid.Outlet to LiquidProduct.Inlet;
183
184        OPTIONS
185        Dynamic = true;
186        TimeStep = 0.2;
187        TimeEnd = 1;
188        TimeUnit = 'h';
189        Integration = "original";
190        NLASolver(
191                File = "sundials",
192                RelativeAccuracy = 1e-3,
193                AbsoluteAccuracy = 1e-3,
194                MaxIterations = 100
195        );
196        DAESolver(
197                File = "sundials",
198                RelativeAccuracy = 1e-2,
199                AbsoluteAccuracy = 1e-6,
200                EventAccuracy = 1e-2
201        );
202end
Note: See TracBrowser for help on using the repository browser.