source: trunk/sample/stage_separators/Sample_TankL_PID.mso @ 990

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

fixed some samples

File size: 1.9 KB
Line 
1#*----------------------------------------------
2* FlowSheet generated automaticaly by EMSO-GUI
3*----------------------------------------------*#
4
5using "streams.mso";
6using "pressure_changers/valve.mso";
7using "controllers/PIDs.mso";
8using "stage_separators/tank.mso";
9
10FlowSheet Sample_TankL_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        valve_liquid as valve_flow;
25        PID_LC as PID;
26        LiquidProduct as simple_sink;
27        Heat_Duty as energy_source2;
28        TankL_1 as TankL;
29
30        CONNECTIONS
31        PID_LC.Output to valve_liquid.FlowFraction;
32        valve_liquid.Outlet to LiquidProduct.Inlet;
33        Feed.Outlet to TankL_1.Inlet;
34        Heat_Duty.OutletQ to TankL_1.InletQ;
35        TankL_1.OutletLiquid to valve_liquid.Inlet;
36        TankL_1.LI to PID_LC.Input;
37
38        SET
39        PID_LC.PID_Select = "Parallel_AWBT" ;
40        PID_LC.Action = "Direct" ;
41        PID_LC.Mode = "Automatic" ;
42        PID_LC.Clip = "Clipped" ;
43        PID_LC.alpha = 1 ;
44        PID_LC.beta = 1 ;
45        PID_LC.bias = 0.5 ;
46        PID_LC.derivTime = 19 * 's' ;
47        PID_LC.intTime = 76 * 's' ;
48        PID_LC.gain = 1.1776 ;
49        PID_LC.gamma = 1 ;
50        PID_LC.tau = 1 * 's' ;
51        PID_LC.tauSet = 1 * 's' ;
52        PID_LC.MinInput = 0 ;
53        PID_LC.MaxInput = 2 ;
54        PID_LC.MinOutput = 0 ;
55        PID_LC.MaxOutput = 1 ;
56        TankL_1.Levelpercent_Initial = 0.80 ;
57
58        SPECIFY
59        Feed.MolarComposition(1) = 0.3 ;
60        Feed.MolarComposition(2) = 0.3 ;
61        Feed.MolarComposition(3) = 0.4 ;
62        Feed.F = 500 * 'kmol/h' ;
63        Feed.T = 338 * 'K' ;
64        Feed.P = 5 * 'atm' ;
65        PID_LC.SetPoint = 0.7 ;
66        Heat_Duty.OutletQ = 0 * 'kW' ;
67
68        INITIAL
69
70        GUESS
71
72        OPTIONS
73        Dynamic = true;
74        TimeStep = 0.2;
75        TimeEnd = 12;
76        TimeUnit = 'h';
77        Integration = "original";
78        NLASolver(
79                File = "sundials",
80                RelativeAccuracy = 1e-3,
81                AbsoluteAccuracy = 1e-3,
82                MaxIterations = 100
83        );
84        DAESolver(
85                File = "sundials",
86                RelativeAccuracy = 1e-2,
87                AbsoluteAccuracy = 1e-6,
88                EventAccuracy = 1e-2
89        );
90end
Note: See TracBrowser for help on using the repository browser.