source: branches/gui/sample/stage_separators/Sample_TankVL_PID.mso @ 795

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

updated tank model (vertical/horizontal orientation with heads flat,elliptical or hemispherical)

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