source: trunk/sample/stage_separators/sample_columnReact.mso @ 243

Last change on this file since 243 was 243, checked in by Paula Bettio Staudt, 16 years ago

Updated reactive distillation models andsample

  • Property svn:keywords set to Id
File size: 6.7 KB
Line 
1#*-------------------------------------------------------------------
2* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC.
3*
4* This LIBRARY is free software; you can distribute it and/or modify
5* it under the therms of the ALSOC FREE LICENSE as available at
6* http://www.enq.ufrgs.br/alsoc.
7*
8* EMSO Copyright (C) 2004 - 2007 ALSOC, original code
9* from http://www.rps.eng.br Copyright (C) 2002-2004.
10* All rights reserved.
11*
12* EMSO is distributed under the therms of the ALSOC LICENSE as
13* available at http://www.enq.ufrgs.br/alsoc.
14*
15*--------------------------------------------------------------------
16* Sample file for reaction column model
17*--------------------------------------------------------------------
18*
19* This sample file needs VRTherm (www.vrtech.com.br) to run.
20*
21*----------------------------------------------------------------------
22* Author: Paula B. Staudt
23* $Id: sample_columnReact.mso 243 2007-04-16 17:19:39Z paula $
24*--------------------------------------------------------------------*#
25using "controllers/PIDs";
26using "stage_separators/column";
27
28FlowSheet Startup_ReactiveDistillation
29        PARAMETERS
30        PP      as Plugin(Brief="Physical Properties", Type="PP",
31                Components = [ "acetic acid", "ethanol",  "ethyl acetate", "water"],
32                LiquidModel = "UNIFAC",
33                VapourModel = "Ideal"
34        );
35        NComp   as Integer;
36       
37        SET
38        NComp = PP.NumberOfComponents;
39       
40        DEVICES
41        col as ReactiveDistillation;
42        feed as source;
43        zero as stream;
44        PIDLreb as PID_Ideal_AW;
45        PIDLcond as PID_Ideal_AW;
46        PIDTreb as PID_Ideal_AW;
47        PIDTcond as PID_Ideal_AW;
48
49        VARIABLES
50        Qcmin as heat_rate (Brief="Condenser Heat supplied");
51        Qcmax as heat_rate (Brief="Condenser Heat supplied");
52        Qrmin as heat_rate (Brief="Reboiler Heat supplied");
53        Qrmax as heat_rate (Brief="Reboiler Heat supplied");
54        Fmin as flow_mol;
55        Fmax as flow_mol;
56        Frmin as flow_mol;
57        Frmax as flow_mol;
58       
59        Lreb_ad as Real;
60        Lrebmin as length;
61        Lrebmax as length;
62        Lcond_ad as Real;
63        Lcondmin as length;
64        Lcondmax as length;
65        Treb_ad as Real;
66        Trebmin as temperature;
67        Trebmax as temperature;
68        Tcond_ad as Real;
69        Tcondmin as temperature;
70        Tcondmax as temperature;
71
72        CONNECTIONS
73        feed.Outlet to col.trays(5).Inlet;
74        zero to col.reb.Inlet;
75        zero to col.trays([1:4]).Inlet;
76        zero to col.trays([6:col.NTrays]).Inlet;
77       
78       
79        EQUATIONS
80        col.sp.frac = 0.09;
81
82        #verificando a partida do refervedor
83        if time < 400 * 's' then
84                col.reb.startup = 1;
85        else
86                col.reb.startup = 0;
87        end
88 
89        if col.reb.startup then
90                col.cond.Q = 0 * PIDTcond.Ports.output * 'kJ/s';
91                col.reb.Q = 0 * PIDTreb.Ports.output * 'kJ/s';
92               
93                PIDTreb.Ports.input = PIDTreb.Ports.setPoint;
94        else
95                col.cond.Q = Qcmin+(Qcmax-Qcmin)*PIDTcond.Ports.output;
96                col.reb.Q = Qrmin+(Qrmax-Qrmin)*PIDTreb.Ports.output;
97               
98                PIDTreb.Ports.input=Treb_ad;
99        end
100
101        SPECIFY
102        feed.Outlet.F = 1.076 * 'mol/s';
103        feed.Outlet.T = 300 * 'K';
104        feed.Outlet.P = 1.0 * 'atm';
105        feed.Outlet.z = [0.4962, 0.4808, 0, 0.0229];
106
107        zero.F = 0 * 'kmol/h';
108        zero.T = 353 * 'K';
109        zero.P = 1 * 'atm';
110        zero.z = [0.4962, 0.4808, 0, 0.0229];
111        zero.v = 0;
112        zero.h = 0 * 'J/mol';
113
114        col.p.dP = 0.95 * 'atm' - col.sp.Outlet2.P;
115        col.trays.Emv = 1;
116       
117# Variáveis dos PID's especificadas
118        PIDLreb.Parameters.tau = 1*'s';
119        PIDLreb.Parameters.tauSet=1*'s';
120        PIDLreb.Parameters.bias = 0;
121        PIDLreb.Parameters.alpha=1;
122        PIDLreb.Parameters.gamma=1;
123        PIDLreb.Parameters.beta=1;
124        PIDLreb.Parameters.gain=1;
125        PIDLreb.Parameters.intTime=10*'s';
126        PIDLreb.Parameters.derivTime=1*'s';
127        PIDLreb.Options.action=-1;
128        PIDLreb.Options.clip=1;
129        PIDLreb.Options.autoMan=0;
130        PIDLreb.Ports.setPoint=(0.5 * 'm' - Lrebmin)/(Lrebmax-Lrebmin);
131        Lreb_ad*(Lrebmax-Lrebmin)=col.reb.Level-Lrebmin;
132        PIDLreb.Ports.input=Lreb_ad;
133        col.reb.OutletL.F = Frmin + (Frmax-Frmin) * PIDLreb.Ports.output;
134
135        PIDLcond.Parameters.tau = 1*'s';       
136        PIDLcond.Parameters.tauSet=1*'s';
137        PIDLcond.Parameters.bias = 0.5;
138        PIDLcond.Parameters.alpha=1;
139        PIDLcond.Parameters.gamma=1;
140        PIDLcond.Parameters.beta=1;
141        PIDLcond.Parameters.gain=1;
142        PIDLcond.Parameters.intTime=10*'s';
143        PIDLcond.Parameters.derivTime=1*'s';
144        PIDLcond.Options.action=-1;
145        PIDLcond.Options.clip=1;
146        PIDLcond.Options.autoMan=0;
147        PIDLcond.Ports.setPoint=(0.5 * 'm' - Lcondmin)/(Lcondmax-Lcondmin);
148        Lcond_ad*(Lcondmax-Lcondmin)=col.cond.Level-Lcondmin;
149        PIDLcond.Ports.input=Lcond_ad;
150        col.sp.Outlet1.F = Fmin + (Fmax-Fmin) * PIDLcond.Ports.output;
151
152        PIDTreb.Parameters.tau = 1*'s';
153        PIDTreb.Parameters.tauSet=1*'s';
154        PIDTreb.Parameters.bias = 0.2;
155        PIDTreb.Parameters.alpha=0.2;
156        PIDTreb.Parameters.gamma=1;
157        PIDTreb.Parameters.beta=1;
158        PIDTreb.Parameters.gain=0.9;
159        PIDTreb.Parameters.intTime=100*'s';
160        PIDTreb.Parameters.derivTime=1*'s';
161        PIDTreb.Options.action=1;
162        PIDTreb.Options.clip=1;
163        PIDTreb.Options.autoMan=0;
164        PIDTreb.Ports.setPoint= (366 * 'K' - Trebmin)/(Trebmax-Trebmin);
165        Treb_ad*(Trebmax-Trebmin)=col.reb.OutletL.T-Trebmin;
166
167        PIDTcond.Parameters.tau = 1*'s';       
168        PIDTcond.Parameters.tauSet=1*'s';
169        PIDTcond.Parameters.bias = 0.5;
170        PIDTcond.Parameters.alpha=0.2;
171        PIDTcond.Parameters.gamma=1;
172        PIDTcond.Parameters.beta=1;
173        PIDTcond.Parameters.gain=1;
174        PIDTcond.Parameters.intTime=10*'s';
175        PIDTcond.Parameters.derivTime=1*'s';
176        PIDTcond.Options.action=1;
177        PIDTcond.Options.clip=1;
178        PIDTcond.Options.autoMan=0;
179        PIDTcond.Ports.setPoint= (346 * 'K' - Tcondmin)/(Tcondmax-Tcondmin);
180        Tcond_ad*(Tcondmax-Tcondmin)=col.cond.OutletL.T-Tcondmin;
181        PIDTcond.Ports.input=Tcond_ad;
182       
183        "Valores limites para normalizações"
184        Lrebmax=0.8*'m';
185        Lrebmin=0.1*'m';
186        Lcondmax=0.8*'m';
187        Lcondmin=0.1*'m';
188        Trebmax=400*'K';
189        Trebmin=200*'K';
190        Tcondmax=380*'K';
191        Tcondmin=250*'K';
192        Qcmin = -100 * 'kJ/s';
193        Qcmax = 0 * 'kJ/s';
194        Qrmin = 0 * 'kJ/s';
195        Qrmax = 150 * 'kJ/s';
196        Fmin = 0 * 'kmol/h';
197        Fmax = 2 * 'kmol/h';
198        Frmin = 0 * 'kmol/h';
199        Frmax = 5 * 'kmol/h';
200       
201        col.cond.OutletV.F = 0 * 'kmol/h';
202       
203        SET
204        col.NTrays = 11;
205       
206        col.trays.stoic = [-1, -1, 1, 1];
207        col.cond.stoic = [-1, -1, 1, 1];
208        col.reb.stoic = [-1, -1, 1, 1];
209        col.cond.V = 6 * 'l';
210        col.cond.Across = 6 * 'l/m';
211       
212        col.trays.V =  0.0961 * 'm^3';
213        col.trays.Ah = 0.04 * 'm^2';
214        col.trays.lw = 0.457 * 'm';
215        col.trays.hw = 0.05 * 'm';
216        col.trays.Q = 0 * 'kW';
217        col.trays.beta = 0.8;
218        col.trays.alfa = 30;
219        col.alfacond = 100000;
220        col.trays.Ap = 0.07 * 'm^2';
221
222        col.trays.Hr = 0 * 'kJ/mol';
223        col.cond.Hr = 0 * 'kJ/mol';
224        col.reb.Hr = 0 * 'kJ/mol';
225        col.reb.V = 20 * 'l';
226        col.reb.Across = 20 * 'l/m';
227
228        col.reb.Pstartup = 1 * 'atm';
229        col.trays.Pstartup = 1 * 'atm';
230        col.cond.Pstartup = 1 * 'atm';
231       
232        INITIAL
233        # condenser
234        col.cond.OutletL.T = 300 *'K';
235        col.cond.Level = 0.1 * 'm';
236        col.cond.OutletL.z([1:3]) = [0.4962, 0.4808, 0];
237
238        # reboiler
239        col.reb.OutletL.T = 300 * 'K';
240        col.reb.Level = 0.1 * 'm';
241        col.reb.OutletL.z([1:3]) = [0.4962, 0.4808, 0];
242
243        # column trays
244        col.trays.OutletL.T = 300 * 'K';
245        col.trays.Level = 0.1 * col.trays.hw;
246        col.trays.OutletL.z([1:3]) = [0.4962, 0.4808, 0];
247
248        OPTIONS
249        TimeStep = 100;
250        TimeEnd = 50000;
251        NLASolver = "sundials";
252        DAESolver = "dassl";
253end
Note: See TracBrowser for help on using the repository browser.