source: mso/sample/reactors/fogler/chap2/series_reactors.mso @ 28

Last change on this file since 28 was 28, checked in by Rodolfo Rodrigues, 16 years ago
File size: 11.3 KB
Line 
1#*---------------------------------------------------------------------
2* Series of CSTR and PFR
3*----------------------------------------------------------------------
4* Solved problem from Fogler (1999)
5* Problem number: 2-2 at 2-7
6* Page: 38-49 (Brazilian edition, 2002)
7*----------------------------------------------------------------------
8*
9*   Description:
10*      Sample to comparative between volumes to specific outlet molar
11*       conversion of CSTR and PFR by means of several different
12*       configurations
13*
14*   Assumptions:
15*       * steady-state
16*       * isotermic and isobaric system
17*       * gaseous phase
18*
19*       Specify:
20*               * the inlet stream (F,X)
21*               * the expression of rate of reaction
22*       * the initial volume
23*               * the outlet conversion
24*
25*   Configurations:
26*       * only one CSTR
27*       * only one PFR
28*       * 2 CSTRs in series
29*       * 2 PFRs in series
30*       * one PFR followed for one CSTR
31*       * one CSTR followed for one PFR
32*
33*----------------------------------------------------------------------
34* Author: Rodolfo Rodrigues and Argimiro R. Secchi
35* GIMSCOP/UFRGS - Group of Integration, Modeling, Simulation, Control,
36*                               and Optimization of Processes
37* $Id$
38*--------------------------------------------------------------------*#
39
40using "types";
41
42
43#*---------------------------------------------------------------------
44* Model of a stream
45*--------------------------------------------------------------------*#
46
47Model stream
48        PARAMETERS
49        NComp   as Integer      (Brief="Number of components", Default=1);
50        VARIABLES
51        F(NComp)as flow_mol     (Brief="Molar flow", Unit="mol/s");
52        X(NComp)as fraction     (Brief="Molar conversion");
53end
54
55
56#*---------------------------------------------------------------------
57* Model of a steady-state, isotermic, and isobaric CSTR
58*--------------------------------------------------------------------*#
59
60Model cstr     
61        VARIABLES
62in      Inlet   as stream; # Inlet stream
63out     Outlet  as stream; # Outlet stream
64        r               as reaction_mol(Brief="Rate of reaction", Unit="mol/l/s");
65        V       as volume          (Brief="Volume", Unit="l");
66
67        EQUATIONS
68        "Component molar balance"
69        Inlet.F - Outlet.F = (-r)*V;
70       
71        "Outlet molar flow"
72        Outlet.F = Inlet.F*(1 - Outlet.X);
73end
74
75
76#*---------------------------------------------------------------------
77* Model of a steady-state, isotermic, and isobaric PFR
78*--------------------------------------------------------------------*#
79
80Model pfr
81        VARIABLES
82in      Inlet   as stream; # Inlet stream
83out     Outlet  as stream; # Outlet stream
84        V       as volume          (Brief="Volume", Unit="l");
85        r               as reaction_mol(Brief="Rate of reaction", Unit="mol/l/s");
86       
87        EQUATIONS
88        "Molar balance"
89        diff(V) = Inlet.F/(-r)*"1/s";
90
91        "Change time in X"
92        Outlet.X = time*"1/s";
93       
94        "Molar flow"
95        Outlet.F = Inlet.F*(1 - Outlet.X);
96end
97
98
99#*---------------------------------------------------------------------
100* Model of a discreted steady-state, isotermic, and isobaric PFR
101*--------------------------------------------------------------------*#
102
103Model pfr_d
104        PARAMETERS
105        N       as Integer              (Brief="Number of descrete points", Default=200);
106       
107        VARIABLES
108in      Inlet   as stream; # Inlet stream
109out     Outlet  as stream; # Outlet stream
110        V(N)    as volume           (Brief="Volume", Unit="l");
111        X(N)    as fraction             (Brief="Molar conversion");
112        dx      as fraction     (Brief="Conversion increment");
113        r(N)    as reaction_mol (Brief="Rate of reaction", Unit="mol/l/s");
114        F(N)    as flow_mol             (Brief="Molar flow", Unit="mol/s");
115       
116        EQUATIONS
117        "Discrete interval"
118        dx = X(N)/N;
119       
120        for i in [2:N]
121        "Molar balance"
122           V(i) - V(i-1) = Inlet.F*dx/(-r(i));
123        "Discrete molar conversion"
124           X(i-1) = X(i) - dx;
125    end
126       
127        "Molar flow"
128        F = Inlet.F*(1 - X);
129       
130        "Outlet molar flow"
131        Outlet.F = F(N);
132       
133        "Outlet molar conversion"
134        Outlet.X = X(N);
135end
136
137
138#*---------------------------------------------------------------------
139* Example 2-2: Scale-up an isotermic CSTR in gaseous phase
140*--------------------------------------------------------------------*#
141
142FlowSheet cstr_sample
143        PARAMETERS
144        R       as Real                 (Brief="Universal gas constant", Unit="atm*l/mol/K", Default=0.082);
145        T       as temperature  (Brief="Temperatura in the reactor", Unit="K");
146        P       as pressure             (Brief="Pressure in the reactor", Unit="atm");
147        zin     as fraction             (Brief="Inlet molar fraction");
148        v0  as flow_vol         (Brief="Volumetric flow");
149       
150        VARIABLES
151        Vt      as volume               (Brief="Total reactor volume", Unit="l");
152       
153        DEVICES
154        Inlet   as stream; # Inlet stream
155        R1              as cstr;
156
157        CONNECTIONS
158        Inlet   to R1.Inlet;
159       
160        EQUATIONS
161        "Inlet molar flow"
162        Inlet.F = (zin*P/(R*T))*v0;
163       
164        "Rate of reaction"
165        (-R1.r) = (0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*"mol/l/s";
166       
167        "Total reactor volume"
168        Vt = R1.V;
169       
170        SPECIFY
171        "Inlet conversion"
172        Inlet.X = 0.0;
173        "Required conversion"
174        R1.Outlet.X = 0.8;
175       
176        SET
177        v0  = 6.0*"l/s";
178        T       = 422.2*"K";
179        P       = 10*"atm";
180        zin     = 0.5;
181       
182        OPTIONS
183        mode = "steady";
184end
185
186
187#*---------------------------------------------------------------------
188* Example 2-3: Scale-up an isotermic PFR in gaseous phase
189*--------------------------------------------------------------------*#
190
191FlowSheet pfr_sample
192        DEVICES
193        Inlet   as stream; # Inlet stream
194        R1              as pfr;
195       
196        CONNECTIONS
197        Inlet   to R1.Inlet;
198       
199        EQUATIONS
200        "Rate of reaction"
201        (-R1.r) = (0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*"mol/l/s";
202       
203        SPECIFY
204        "Inlet molar flow"
205        Inlet.F = 0.866541*"mol/s";
206        "Inlet conversion"
207        Inlet.X = 0.0;
208       
209        INITIAL
210        "Reactor volume"
211        R1.V    = 0.0*"l";
212       
213        OPTIONS
214        time = [0:0.004:0.8];
215end
216
217
218#*---------------------------------------------------------------------
219* Example 2-3: (discreted)
220*--------------------------------------------------------------------*#
221
222FlowSheet pfr_d_sample
223        VARIABLES
224        Vt              as volume       (Brief="Total reactor volume", Unit="l");
225       
226        DEVICES
227        Inlet   as stream; # Inlet stream
228        R1              as pfr_d;
229
230        CONNECTIONS
231        Inlet   to R1.Inlet;
232       
233        EQUATIONS
234        "Rate of reaction"
235        (-R1.r) = (0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*"mol/l/s";
236       
237        "Total reactor volume"
238        Vt = R1.V(R1.N);
239
240#       SET
241#       R1.N    = 100;
242       
243        SPECIFY
244        "Inlet molar flow"
245        Inlet.F = 0.866541*"mol/s";
246        "Inlet conversion"
247        Inlet.X = 0.0;
248
249        "Required conversion"
250        R1.Outlet.X     = 0.8;
251        "Initial volume"
252        R1.V(1) = 0.0*"l";
253       
254        OPTIONS
255        mode = "steady";
256end
257
258
259#*---------------------------------------------------------------------
260* Example 2-5: two CSTRs in serie
261*--------------------------------------------------------------------*#
262
263FlowSheet cstr_cstr
264        VARIABLES
265        V1              as volume       (Brief="1st reactor volume", Unit="l");
266        V2              as volume       (Brief="2nd reactor volume", Unit="l");
267        Vt              as volume       (Brief="Total reactor volumes", Unit="l");
268       
269        DEVICES
270        Inlet   as stream; # Inlet stream
271        R1              as cstr;
272        R2              as cstr;
273
274        CONNECTIONS
275        Inlet           to R1.Inlet;
276        R1.Outlet       to R2.Inlet;
277       
278        EQUATIONS
279        "Rate of reaction in 1st reactor"
280        (-R1.r) = (0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*"mol/l/s";
281        "Rate of reaction in 2nd reactor"
282        (-R2.r) = (0.0092*R2.Outlet.X^3 - 0.0153*R2.Outlet.X^2 + 0.0013*R2.Outlet.X + 0.0053)*"mol/l/s";
283       
284        "1st volume reactor"
285        V1 = R1.V;
286        "1st volume reactor"
287        V2 = R2.V;
288        "Total volume of reactors"
289        Vt = V1 + V2;
290       
291        SPECIFY
292        "Inlet molar flow"
293        Inlet.F = 0.866541*"mol/s";
294        "Inlet conversion"
295        Inlet.X = 0.0;
296       
297        "Required 1st reactor conversion"
298        R1.Outlet.X = 0.4;
299        "Required 2nd reactor conversion"
300        R2.Outlet.X = 0.8;
301       
302        OPTIONS
303        mode = "steady";
304end
305
306
307#*---------------------------------------------------------------------
308* Example 2-6: two PFRs in series (descreted)
309*--------------------------------------------------------------------*#
310
311FlowSheet pfr_pfr
312        VARIABLES
313        V1              as volume       (Brief="1st reactor volume", Unit="l");
314        V2              as volume       (Brief="2nd reactor volume", Unit="l");
315        Vt              as volume       (Brief="Total reactor volumes", Unit="l");
316       
317        DEVICES
318        Inlet   as stream; # Inlet stream
319        R1              as pfr_d;
320        R2              as pfr_d;
321
322        CONNECTIONS
323        Inlet           to      R1.Inlet;
324        R1.Outlet       to      R2.Inlet;
325       
326        EQUATIONS
327        "Rate of reaction in 1st reactor"
328        (-R1.r) = (0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*"mol/l/s";
329        "Rate of reaction in 2nd reactor"
330        (-R2.r) = (0.0092*R2.X^3 - 0.0153*R2.X^2 + 0.0013*R2.X + 0.0053)*"mol/l/s";
331       
332        "1st reactor volume"
333        V1 = R1.V(R1.N);
334        "1st reactor volume"
335        V2 = R2.V(R2.N);
336        "Total reactor volumes"
337        Vt = V1 + V2;
338       
339        SPECIFY
340        "Inlet molar flow"
341        Inlet.F = 0.866541*"mol/s";
342        "Inlet conversion"
343        Inlet.X = 0.0;
344       
345        "Required 1st reactor conversion"
346        R1.Outlet.X = 0.4;
347        "Required 2nd reactor conversion"
348        R2.Outlet.X = 0.8;
349       
350        "Initial 1st reactor volume"
351        R1.V(1) = 0.0*"l";
352        "Initial 2nd reactor volume"
353        R2.V(1) = 0.0*"l";
354       
355        OPTIONS
356        mode = "steady";
357end
358
359
360#*---------------------------------------------------------------------
361* Example 2-7a: one PFR and one CSTR in series
362*--------------------------------------------------------------------*#
363
364FlowSheet pfr_cstr
365        VARIABLES
366        V1              as volume       (Brief="1st reactor volume", Unit="l");
367        V2              as volume       (Brief="2nd reactor volume", Unit="l");
368        Vt              as volume       (Brief="Total reactor volumes", Unit="l");
369       
370        DEVICES
371        Inlet   as stream; # Inlet stream
372        R1              as pfr_d;
373        R2              as cstr;
374
375        CONNECTIONS
376        Inlet           to      R1.Inlet;
377        R1.Outlet       to      R2.Inlet;
378       
379        EQUATIONS
380        "Rate of reaction in 1st reactor"
381        (-R1.r) = (0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*"mol/l/s";
382        "Rate of reaction in 2nd reactor"
383        (-R2.r) = (0.0092*R2.Outlet.X^3 - 0.0153*R2.Outlet.X^2 + 0.0013*R2.Outlet.X + 0.0053)*"mol/l/s";
384       
385        "1st reactor volume"
386        V1 = R1.V(R1.N);
387        "1st reactor volume"
388        V2 = R2.V;
389        "Total reactor volumes"
390        Vt = V1 + V2;
391       
392#       SET
393#       R1.N    = 100;
394       
395        SPECIFY
396        "Inlet molar flow"
397        Inlet.F = 0.866541*"mol/s";
398        "Inlet conversion"
399        Inlet.X = 0.0;
400       
401        "Required 1st reactor conversion"
402        R1.Outlet.X = 0.5;
403        "Required 2nd reactor conversion"
404        R2.Outlet.X = 0.8;
405       
406        "Initial 1st reactor volume"
407        R1.V(1) = 0.0*"l";
408       
409        OPTIONS
410        mode = "steady";
411end
412
413
414#*---------------------------------------------------------------------
415* Example 2-7b: one CSTR and one PFR in series
416*--------------------------------------------------------------------*#
417
418FlowSheet cstr_pfr
419        VARIABLES
420        V1              as volume       (Brief="1st reactor volume", Unit="l");
421        V2              as volume       (Brief="2nd reactor volume", Unit="l");
422        Vt              as volume       (Brief="Total reactor volumes", Unit="l");
423       
424        DEVICES
425        Inlet   as stream; # Inlet stream
426        R1              as cstr;
427        R2              as pfr_d;
428
429        CONNECTIONS
430        Inlet           to      R1.Inlet;
431        R1.Outlet       to      R2.Inlet;
432       
433        EQUATIONS
434        "Rate of reaction in 1st reactor"
435        (-R1.r) = (9.2*R1.Outlet.X^3 - 15.3*R1.Outlet.X^2 + 1.3*R1.Outlet.X + 5.3)*1e-3*"mol/l/s";
436        "Rate of reaction in 2nd reactor"
437        (-R2.r) = (9.2*R2.X^3 - 15.3*R2.X^2 + 1.3*R2.X + 5.3)*1e-3*"mol/l/s";
438       
439        "1st reactor volume"
440        V1 = R1.V;
441        "1st reactor volume"
442        V2 = R2.V(R2.N);
443        "Total reactor volumes"
444        Vt = V1 + V2;
445       
446#       SET
447#       R2.N    = 100;
448       
449        SPECIFY
450        "Inlet molar flow"
451        Inlet.F = 0.866541*"mol/s";
452        "Inlet conversion"
453        Inlet.X = 0.0;
454       
455        "Required 1st reactor conversion"
456        R1.Outlet.X = 0.5;
457        "Required 2nd reactor conversion"
458        R2.Outlet.X = 0.8;
459       
460        "Initial 2nd reactor volume"
461        R2.V(1) = 0.0*"l";
462       
463        OPTIONS
464        mode = "steady";
465end
Note: See TracBrowser for help on using the repository browser.