Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chemical Reactor Design P Harriott PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 115
At a glance
Powered by AI
The document discusses various Scilab codes related to chemical reactor design and their relation to examples in the textbook 'Chemical Reactor Design' by P. Harriott.

The numbering policy explains that Exa refers to solved examples, Eqn refers to equations, and AP refers to appendix codes related to examples in the book.

The contents list the chapters and topics covered in the book, including homogeneous kinetics, heterogeneous reactions, ideal reactors, diffusion and reaction, heat and mass transfer, nonideal flow, gas-liquid reactions, multiphase reactors, fluidized bed reactors and novel reactors.

Scilab Textbook Companion for

Chemical Reactor Design


by P. Harriott1

Created by
Sneha R Iyer
B-Tech Chemical Engineering
Chemical Engineering
SASTRA University ,Thanjavur
College Teacher
NA
Cross-Checked by
Spandana

July 14, 2015

1 Funded by a grant from the National Mission on Education through ICT,


http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab
codes written in it can be downloaded from the Textbook Companion Project
section at the website http://scilab.in
Book Description

Title: Chemical Reactor Design

Author: P. Harriott

Publisher: CRC Press

Edition: 1

Year: 2002

ISBN: 978-0824708818

1
Scilab numbering policy used in this document and the relation to the
above book.

Exa Example (Solved example)

Eqn Equation (Particular equation of the above book)

AP Appendix to Example(Scilab Code that is an Appednix to a particular


Example of the above book)

For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.

2
Contents

List of Scilab Codes 4

1 Homogeneous Kinetics 6

2 Kinetic Models for Heterogeneous Reactions 15

3 Ideal Reactors 19

4 Diffusion and Reaction in Porous Catalysts 39

5 Heat and Mass Transfer in Reactors 52

6 Nonideal Flow 61

7 Gas Liquid Reactions 72

8 Multiphase Reactors 96

9 Fluidized Bed Reactors 104

10 Novel Reactors 108

3
List of Scilab Codes

Exa 1.4 Activation energy from packed bed data . . . . . . . . 6


Exa 1.5 Methods to determine km and vm . . . . . . . . . . . 11
Exa 2.1 Effectiveness factor for solid catalyzed reaction . . . . 15
Exa 3.1 Time to reach desired conversion for bimolecular batch
reaction . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Exa 3.2 Residence time and heat generation for four STR s in
series . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Exa 3.3 Effect of temperature on yield . . . . . . . . . . . . . . 23
Exa 3.4 Volume of reactor for Gas Phase isothermal reaction . 26
Exa 3.5 Rate Equation to fit Initial Rate data . . . . . . . . . 27
Exa 3.6 Optimum reaction temperature . . . . . . . . . . . . . 31
Exa 3.7 Equilibrium temperature as a function of conversion and
optimum feed temperature . . . . . . . . . . . . . . . 33
Exa 4.1 Diffusivity of Chlorine and tortuosity in catalyst pellet 39
Exa 4.2 Effective diffusivity of O2 in air . . . . . . . . . . . . . 42
Exa 4.3 Influence of Pore diffusion over rate . . . . . . . . . . 44
Exa 4.4 Effectiveness factor for solid catalyzed reaction . . . . 46
Exa 4.5 The optimum pore size distribution for a spherical pellet 48
Exa 5.1 Temperature Profiles for tubular reactor . . . . . . . . 52
Exa 5.2 Maximum internal temperature difference . . . . . . . 55
Exa 5.3 Overall heat transfer coefficients and radial average bed
temperature for packed bed reactor . . . . . . . . . . . 56
Exa 6.1 Power Consumption at 300 rpm speed of stirrer and
blending time . . . . . . . . . . . . . . . . . . . . . . . 61
Exa 6.2 Effect of diffusion on conversion for laminar flow . . . 64
Exa 6.3 Effect of Axial dispersion and length on conversion . . 66
Exa 6.4 Conversion in packed bed for same superficial velocity 68

4
Exa 7.1 Overall Reaction Rate Coefficient Percent Resistance
Reaction Volume and Reactor Size . . . . . . . . . . . 72
Exa 7.2 The gradient for B in the liquid film . . . . . . . . . . 75
Exa 7.3 Overall mass transfer coefficient and percent resistance 76
Exa 7.4 Local selectivity due to mass transfer limitations . . . 78
Exa 7.5 Maximum rate of CO absorption and Dimensions of
Bubble Column Reactor . . . . . . . . . . . . . . . . . 80
Exa 7.6 Fraction of O2 Power of agitator kLa and average dis-
solved oxygen concentration . . . . . . . . . . . . . . . 85
Exa 7.7 Apparent value of kLa regime of operation and selectiv-
ity dependency on gas mixing . . . . . . . . . . . . . . 91
Exa 8.1 Gas absorption coefficient and fraction of overall resis-
tance . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Exa 8.2 External Mass Transfer resistance . . . . . . . . . . . 98
Exa 8.3 Apparent rate constant and consistency . . . . . . . . 100
Exa 9.1 Model II Volumetric Mass Transfer Coefficient K . . . 104
Exa 9.2 Model II Fraction unconverted naphthalene . . . . . . 106
Exa 10.1 Fraction unconverted naphthalene based on model II . 108
Exa 10.2 Conversion as a function of No of Gauzes . . . . . . . 110

5
Chapter 1

Homogeneous Kinetics

Scilab code Exa 1.4 Activation energy from packed bed data

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 1 Ex1 . 4 Pg No . 23
3 // T i t l e : A c t i v a t i o n e n e r g y from p a c k e d bed d a t a
4 //
==================================================================

5 clear
6 clc
7 clf
8 // COMMON INPUT
9 L = [0 1 2 3 4 5 6 9]; // Bed l e n g t h i n f e e t ( f t )
10 T =[330 338 348 361 380 415 447 458 ] // T e m p e r a t u r e
C o r r e s p o n d i n g t h e bed l e n g t h g i v e n ( C )
11 R =1.98587 E -3; // Gas c o n s t a n t ( k c a l / mol K)
12
13 //CALCLATION ( Ex1 . 4 . a )

6
14 // B a s i s i s 1 mol o f f e e d A( F u r f u r a l ) X m o l e s r e a c t e d
t o form F u r f u r a n and CO
15 x =( T -330) ./130; // C o n v e r s i o n b a s e d on f r a c t i o n a l
temperature r i s e
16 n = length ( T ) ; // 6 m o l e s o f steam p e r mole o f F u r f u r a l
i s u s e d t o d e c r e a s e t e m p e r a t u r e r i s e i n t h e bed
17 P_mol = x +7; // T o t a l No . o f m o l e s i n p r o d u c t s t r e a m
18 for i =1:( n -1)
19 T_avg ( i ) = ( T ( i ) + T ( i +1) ) /2
20 P_molavg ( i ) = ( P_mol ( i ) + P_mol ( i +1) ) /2
21 delta_L ( i ) = L ( i +1) -L ( i )
22 k_1 ( i ) =(( P_molavg ( i ) ) / delta_L ( i ) ) * log ((1 - x ( i ) )
/(1 - x ( i +1) ) )
23 u1 ( i ) =(1/( T_avg ( i ) +273.15) ) ;
24 end
25 v1 =( log ( k_1 ) ) ;
26 i = length ( u1 ) ;
27 X1 =[ u1 ones (i ,1) ];
28 result1 = X1 \ v1 ;
29 k_1_dash = exp ( result1 (2 ,1) ) ;
30 E1 =( - R ) *( result1 (1 ,1) ) ;
31
32 //OUTPUT ( Ex1 . 4 . a )
33 // C o n s o l e Output
34 mprintf ( \n OUTPUT Ex1 . 4 . a ) ;
35 mprintf ( \n
=================================================================
n )
36 mprintf ( L \ t \ t T \ t \ t x \ t \ t T a v e r a g e \ t (7+ x ) a v e
\ tk 1 )
37 mprintf ( \n ( f t ) \ t \ t ( C ) \ t \ t \t\t ( C ) \t )
38 mprintf ( \n
==================================================================
)
39 for i =1: n -1
40 mprintf ( \ n%f \ t %f \ t %f ,L ( i +1) ,T ( i +1) ,x ( i +1) )
41 mprintf ( \ t %f \ t %f \ t %f , T_avg ( i ) , P_molavg ( i ) , k_1
(i))

7
42 end
43 mprintf ( \n\ nThe a c t i v a t i o n e n e r g y from t h e s l o p e =
%f k c a l / mol , E1 ) ;
44 //
==================================================================

45
46
47 // T i t l e : I I Order R e a c t i o n
48 //
==================================================================

49 //CALCULATION ( Ex 1 . 4 . b )
50 for i =1:( n -1)
51 T_avg ( i ) = ( T ( i ) + T ( i +1) ) /2
52 P_molavg ( i ) = ( P_mol ( i ) + P_mol ( i +1) ) /2
53 delta_L ( i ) = L ( i +1) -L ( i )
54 k_2 ( i ) =(( P_molavg ( i ) ) / delta_L ( i ) ) *(( x ( i +1) -x ( i ) )
/((1 - x ( i +1) ) *(1 - x ( i ) ) ) )
55 u2 ( i ) =(1/( T_avg ( i ) +273.15) ) ;
56 end
57 v2 =( log ( k_2 ) ) ;
58 plot ( u1 .*1000 , v1 , o , u2 .*1000 , v2 , ) ;
59 xlabel ( 1 0 0 0 /T (K 1) ) ;
60 ylabel ( l n k 1 o r l n k 2 ) ;
61 xtitle ( l n k v s 1 0 0 0 /T ) ;
62 legend ( l n k 1 , l n k 2 ) ;
63 j = length ( u2 ) ;
64 X2 =[ u2 ones (j ,1) ];
65 result2 = X2 \ v2 ;
66 k_2_dash = exp ( result2 (2 ,1) ) ;
67 E2 =( - R ) *( result2 (1 ,1) ) ;
68
69 //OUTPUT ( Ex 1 . 4 . b )
70 mprintf ( \n OUTPUT Ex1 . 4 . b ) ;
71 mprintf ( \n
=================================================================
n )

8
72 mprintf ( L \ t \ t T \ t \ t x \ t \ t T a v e r a g e \ t (7+ x ) a v e
\ tk 2 )
73 mprintf ( \n ( f t ) \ t \ t ( C ) \ t \ t \t\t ( C ) \t )
74 mprintf ( \n
==================================================================
)
75 for i =1: n -1
76 mprintf ( \ n%f \ t %f \ t %f ,L ( i +1) ,T ( i +1) ,x ( i +1) )
77 mprintf ( \ t %f \ t %f \ t %f , T_avg ( i ) , P_molavg ( i ) , k_2
(i))
78 end
79 mprintf ( \n\ nThe a c t i v a t i o n e n e r g y from t h e s l o p e =
%f k c a l / mol , E2 ) ;
80
81 // FILE OUTPUT
82 fid = mopen ( . \ Chapter1 Ex4Output . t x t , w ) ;
83 mfprintf ( fid , \n OUTPUT Ex1 . 4 . a ) ;
84 mfprintf ( fid , \n
=================================================================
n )
85 mfprintf ( fid , L \ t \ t T \ t \ t x \ t \ t T a v e r a g e \ t (7+ x
) ave \ t k 1 )
86 mfprintf ( fid , \n ( f t ) \ t \ t ( C ) \ t \ t \t\t ( C ) \
t )
87 mfprintf ( fid , \n
==================================================================
)
88 for i =1: n -1
89 mfprintf ( fid , \ n%f \ t %f \ t %f ,L ( i +1) ,T ( i +1) ,x ( i
+1) )
90 mfprintf ( fid , \ t %f \ t %f \ t %f , T_avg ( i ) , P_molavg ( i
) , k_1 ( i ) )
91 end
92 mfprintf ( fid , \n\ nThe a c t i v a t i o n e n e r g y from t h e
s l o p e =%f k c a l / mol , E1 ) ;
93 mfprintf ( fid , \n\n
=================================================================
n )

9
94 mfprintf ( fid , \n OUTPUT Ex1 . 4 . b ) ;
95 mfprintf ( fid , \n
=================================================================
n )
96 mfprintf ( fid , L \ t \ t T \ t \ t x \ t \ t T a v e r a g e \ t (7+ x
) ave \ t k 2 )
97 mfprintf ( fid , \n ( f t ) \ t \ t ( C ) \ t \ t \t\t ( C ) \
t )
98 mfprintf ( fid , \n
==================================================================
)
99 for i =1: n -1
100 mfprintf ( fid , \ n%f \ t %f \ t %f ,L ( i +1) ,T ( i +1) ,x ( i
+1) )
101 mfprintf ( fid , \ t %f \ t %f \ t %f , T_avg ( i ) , P_molavg ( i
) , k_2 ( i ) )
102 end
103 mfprintf ( fid , \n\ nThe a c t i v a t i o n e n e r g y from t h e
s l o p e =%f k c a l / mol , E2 ) ;
104 mclose ( all ) ;
105
106 //
============================================================
END OF PROGRAM
===========================================
107 // D i s c l a i m e r ( Ex1 . 4 . a ) : The l a s t v a l u e o f t a v g and
k 1 c o r r e s p o n d i n g t o L=9 i n T a b l e 1 . 6 ( Pg No .
25) of the textbook i s a misprint .
108 // The v a l u e s h o u l d be 4 5 2 . 5 and 4 . 9 5 5 4 7 6
r e s p e c t i v e l y i n s t e a d o f 455 and 1 8 . 2 a s p r i n t e d
in the textbook .
109 // Hence t h e r e i s a c h a n g e i n t h e a c t i v a t i o n e n e r g y
o b t a i n e d from t h e c o d e
110 // The a n s w e r o b t a i n e d i s 2 1 . 3 9 3 5 k c a l / mol i n s t e a d
o f 27 k c a l / mol a s r e p o r t e d i n t h e t e x t b o o k .
111 // F i g u r e 1 . 8 i s a p l o t b e t w e e n l n k 1 v s 1 0 0 0 /T
i n s t e a d o f k 1 v s 1 0 0 0 /T a s s t a t e d i n t h e
s o l u t i o n o f Ex1 . 4 . a

10
112 //
==================================================================

113 // D i s c l a i m e r ( Ex1 . 4 . b ) : There i s a d i s c r e p a n c y


b e t w e e n t h e computed v a l u e o f a c t i v a t i o n e n e r g y
and v a l u e r e p o r t e d i n t e x t b o o k
114 // E r r o r c o u l d have b e e n on s i m i l a r l i n e s a s
r e p o r t e d f o r e x a m p l e Ex . 1 . 4 . a
115 // F u r t h e r , i n t e r m e i d a t e v a l u e s f o r Ex . 1 . 4 . b i s n o t
a v a i l a b l e / r e p o r t e d i n t e x t b o o k and h e n c e c o u l d
n o t be compared .
116 // F i g u r e 1 . 8 i s a p l o t b e t w e e n l n k 2 v s 1 0 0 0 /T
i n s t e a d o f k 2 v s 1 0 0 0 /T a s s t a t e d i n t h e
s o l u t i o n o f Ex1 . 4 . b

Scilab code Exa 1.5 Methods to determine km and vm

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 1 Ex1 . 5 Pg No . 29
3 // T i t l e : Methods t o d e t e r m i n e km and vm
4 //
==================================================================

5 clear
6 clc
7 clf
8 //INPUT
9 S =[2;5;10;15]*10^( -3) ; // C o n c e n t r a t i o n o f
substrate [
HCO3 ]
10 r_reciprocal =[95;45;29;25]*10^(3) ; // R e c i p r o c a l r a t e s

11
( Ls e c / mol )
11
12 //CALCULATION
13 // P l o t 1 r e f e r e q u a t i o n 1 . 2 4 Pg No . 2 9
14 x1 =( S ) .^( -1) ;
15 y1 = r_reciprocal ;
16 scf (0)
17 plot ( x1 , y1 *10^( -3) , RED ) ;
18 xlabel ( 1 / [ S ] ) ;
19 ylabel ( ( 1 / r ) 10 3 ) ;
20 xtitle ( 1/ r v e r s u s 1/ S ) ;
21 p = length ( x1 ) ;
22 X_1 =[ x1 ones (p ,1) ];
23 R1 = X_1 \ y1 ;
24 slope (1) = R1 (1 ,1) ;
25 intercept (1) = R1 (2 ,1) ;
26 v_m (1) =(1/( intercept (1) ) ) ; //Maximum R e a c t i o n Rate (
mol /Ls e c )
27 k_m (1) = slope (1) * v_m (1) ; // M i c h a e l i s Menton c o n s t a n t
28
29 // P l o t 2 r e f e r e q u a t i o n 1 . 2 5 Pg No . 2 9
30 x2 = S ;
31 y2 = S .* r_reciprocal ;
32 scf (1)
33 plot ( x2 *10^(3) , y2 ) ;
34 xlabel ( ( S ) 1 0 3 ) ;
35 ylabel ( ( S ) / r ) ;
36 xtitle ( ( S ) / r v e r s u s ( S ) ) ;
37 q = length ( x2 ) ;
38 X_2 =[ x2 ones (q ,1) ];
39 R2 = X_2 \ y2 ;
40 slope (2) = R2 (1 ,1) ;
41 intercept (2) = R2 (2 ,1) ;
42 v_m (2) =1/( slope (2) ) ; //Maximum R e a c t i o n Rate ( mol /L
sec )
43 k_m (2) = intercept (2) /( slope (2) ) ; // M i c h a e l i s Menton
constant
44

12
45
46 //OUTPUT
47 mprintf ( \n
==================================================================
);
48 mprintf ( \n \ t \ tMethod 1 \ tMethod 2 );
49 mprintf ( \n
==================================================================
);
50 i =1
51 mprintf ( \n S l o p e \ t%f \ t%f , slope ( i ) , slope ( i
+1) ) ;
52 mprintf ( \n I n t e r c e p t \ t%f \ t%f , intercept ( i ) ,
intercept ( i +1) ) ;
53 mprintf ( \n Km (M) \ t%f \ t%f , k_m ( i ) , k_m ( i
+1) ) ;
54 mprintf ( \n Vm( mol /Ls e c ) %f\ t%f , v_m ( i ) , v_m ( i
+1) ) ;
55
56 // FILE OUTPUT
57 fid = mopen ( . \ Chapter1 Ex5Output . t x t , w ) ;
58 mfprintf ( fid , \n
==================================================================
);
59 mfprintf ( fid , \n \ t \ tMethod 1 \ tMethod 2 );
60 mfprintf ( fid , \n
==================================================================
);
61 i =1
62 mfprintf ( fid , \n S l o p e \ t%f \ t%f , slope ( i ) ,
slope ( i +1) ) ;
63 mfprintf ( fid , \n I n t e r c e p t \ t%f \ t%f , intercept
( i ) , intercept ( i +1) ) ;
64 mfprintf ( fid , \n Km (M) \ t%f \ t%f , k_m ( i ) ,
k_m ( i +1) ) ;
65 mfprintf ( fid , \n Vm( mol /Ls e c ) %f\ t%f , v_m ( i ) ,
v_m ( i +1) ) ;
66 mclose ( fid ) ;

13
67
68 //
==================================================================
END OF PROGRAM=================================
69 // D i s c l a i m e r : L e a s t S q u a r e method i s u s e d t o f i n d
t h e s l o p e and i n t e r c e p t i n t h i s e x a m p l e .
70 // Hence t h e v a l u e s d i f f e r from t h e g r a p h i c a l l y
o b t a i n e d v a l u e s o f s l o p e and i n t e r c e p t i n t h e
textbook .

14
Chapter 2

Kinetic Models for


Heterogeneous Reactions

Scilab code Exa 2.1 Effectiveness factor for solid catalyzed reaction

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . USA , pp 4 3 6 .
2 // Chapter 2 Ex2 . 1 Pg No . 5 2
3 // T i t l e : E f f e c t i v e n e s s f a c t o r f o r s o l i d c a t a l y z e d
reaction
4 //
==================================================================

5 clear
6 clc
7 clf
8 //INPUT
9 // Case : I c o n s t a n t h y d r o g e n p r e s s u r e : P H2= 2 1 1 0
torr
10 P_B =[70 185 286]; // Benzene P r e s s u r e ( t o r r )

15
11 r_1 =1 E -3 *[4.27 5.4 6.12]; // ( mol / h r g ) o b s e r v e d
rates
12 P_H2_const =2110; // C o n s t a n t Hydrogen P r e s s u r e ( t o r r )
13
14
15 // Case : I I C o n s t a n t b e n z e n e p r e s s u r e P B c o n s t =70
torr
16 P_H2 =[1050 2105 2988]; // Hydrogen P r e s s u r e ( t o r r )
17 r_2 =1 E -3 * [3.81 4.27 4.5]; // ( mol / h r g ) o b s e r v e d
rates
18 P_B_const =70; // C o n s t a n t Benzene P r e s s u r e ( t o r r )
19
20 //CALCULATION
21 // Case : I c o n s t a n t h y d r o g e n p r e s s u r e : P H2= 2 1 1 0
torr
22
23 n = length ( P_B )
24 for i =1: n
25 Y_1 ( i ) =( P_B ( i ) * P_H2_const / r_1 ( i ) ) ^(1/3) ;
26 X_1 ( i ) = P_B ( i ) ;
27 end
28 coefs_I = regress ( X_1 , Y_1 ) ;
29 intercept_1 = coefs_I (1)
30 slope_1 = coefs_I (2)
31
32 // Case : I I C o n s t a n t b e n z e n e p r e s s u r e P B c o n s t =70
torr
33 m = length ( P_H2 )
34 for i =1: n
35 Y_2 ( i ) =( P_B_const * P_H2 ( i ) / r_2 ( i ) ) ^(1/3) ;
36 X_2 ( i ) =( P_H2 ( i ) ) ^0.5;
37 end
38 coefs_II = regress ( X_2 , Y_2 ) ;
39 intercept_2 = coefs_II (1) ;
40 slope_2 = coefs_II (2) ;
41 coef_1 =( intercept_1 ) ^0.5;
42 coef_2 =( slope_1 * slope_2 ) ^(1/2) *( slope_1 / slope_2 ) *
intercept_1 ;

16
43
44 function y = funct1 ( K_H2 )
45 y = coef_2 * K_H2 ^0.5 - coef_1 * K_H2 ^(4/3) -1
46 endfunction
47
48 [ K_H2_res ]= fsolve (0 , funct1 ) ;
49
50 K_B = K_H2_res ^(4/3) *( slope_1 / slope_2 ) ;
51
52 k =(0.635) ^( -1/3) * K_B ^2/ K_H2_res ;
53 scf (0)
54 plot ( X_1 , Y_1 , )
55 xtitle ( Benzene H y d r o g e n a t i o n ( a ) V a r i a b l e b e n z e n e
pressure )
56 xlabel ( P B ( t o r r ) ) ;
57 ylabel ( ( P H2 P B / 1 0 3 r ) ( 1 / 3 ) ) ;
58 legend ( T=67.6 C );
59
60 scf (1)
61 plot ( X_2 , Y_2 , )
62 xtitle ( Benzene H y d r o g e n a t i o n ( b ) V a r i a b l e h y d r o g e n
pressure )
63 xlabel ( P H2 ( t o r r ) ) ;
64 ylabel ( ( P H2 P B / 1 0 3 r ) ( 1 / 3 ) ) ;
65 legend ( T=67.6 C );
66
67 //OUTPUT
68 mprintf ( \n Solving f o r the three parameters g i v e s )
;
69 mprintf ( \n K H2 = %f t o r r 1 , K_H2_res ) ;
70 mprintf ( \n K B = %f t o r r 1 , K_B ) ;
71 mprintf ( \n k = %E ,k ) ;
72
73 // FILE OUTPUT
74 fid = mopen ( . \ Chapter2 Ex1Output . t x t , w ) ;
75 mfprintf ( fid , \n S o l v i n g f o r t h e t h r e e p a r a m e t e r s
g i v e s );
76 mfprintf ( fid , \n K H2 = %f t o r r 1 , K_H2_res ) ;

17
77 mfprintf ( fid , \n K B = %f t o r r 1 , K_B ) ;
78 mfprintf ( fid , \n k = %E ,k ) ;
79 mclose ( fid ) ;
80
81 //
==================================================================

82 // D i s c l a i m e r : Page 53 There i s a t y p o i n t h e
e q u a t i o n f o r Y o b t a i n e d f o r Model c a s e I :
C o n s t a n t h y d r o g e n p r e s s u r e and v a r i a b l e b e n z e n e
pressure formulation
83 // From F i g 2 . 7 ( a ) , I t i s e v i d e n t t h a t f o r P H2 =
2110 t o r r , t h r e e e x p e r i m e n t a l p o i n t s a r e
c o n s i d e r e d f o r l i n e a r r e g r e s s i o n . However , from
t a b l e 2 . 1 , o n l y two p o i n t s c o r r e s p o n d s t o P H2 =
2110 t o r r . In comparison with Fig . 2 . 7 ( a ) , the
t a b l e v a l u e c o r r e s p o n d i n g t o P H2 = 2 1 0 5 i s a l s o
r e a d a s P H2 = 2 1 1 0 .
84 // T h e r e f o r e t h e v a l u e s o f t h e c o n s t a n t s a r e
d i f f e r e n t from t h a t o b t a i n e d i n t h e t e x t b o o k .
Also r e g r e s s i o n i s used to obtain the v a l u e s o f
s l o p e s and i n t e r c e p t w h e r e a s t h e t e x t b o o k
c o n s i d e r s g r a p h i c a l method f o r t h e c o m p u t a t i o n o f
the codes

18
Chapter 3

Ideal Reactors

Scilab code Exa 3.1 Time to reach desired conversion for bimolecular batch
reaction

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 1 Ex3 . 1 Pg No . 8 4
3 // T i t l e : Time t o r e a c h d e s i r e d c o n v e r s i o n f o r
b i m o l e c u l a r batch r e a c t i o n
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 C_A0 =1; // Assuming 1 mol b a s i s f o r the l i m i t i n g
reactant
9 C_B0_old =1.02; // 2% E x c e s s o f r e a c t a n t B i s s u p p l i e d
10 R_old = C_B0_old / C_A0 ; // R e f e r e q u a t i o n 3 . 7 Pg No .
11 X_A =0.995; // C o n v e r s i o n i n t e r m s o f l i m i t i n g r e a c t a n t
12 t_old =6.5; // Time r e q u i r e d f o r t h e g i v e n c o n v e r s i o n (
hr )

19
13 C_B0_new =1.05; // 5% E x c e s s o f r e a c t a n t B
14 R_new = C_B0_new / C_A0 ; // R e f e r e q u a t i o n 3 . 7 Pg No . 8 3
15
16 //CALCULATION
17 k =( log (( R_old - X_A ) /( R_old *(1 - X_A ) ) ) /(( R_old -1) * t_old
* C_A0 ) ) ;
18 t_new = log (( R_new - X_A ) /( R_new *(1 - X_A ) ) ) /(( R_new -1) * k *
C_A0 ) ;
19
20 //OUTPUT
21 mprintf ( \ nTime r e q u i r e d t o a c h i e v e r e q u i r e d
c o n v e r s i o n f o r 5%% e x c e s s o f B= %f h r , t_new ) ;
22
23 // FILE OUTPUT
24 fid = mopen ( . \ Chapter3 Ex1Output . t x t , w ) ;
25 mfprintf ( fid , \ nTime r e q u i r e d t o a c h i e v e r e q u i r e d
c o n v e r s i o n f o r 5%% e x c e s s o f B= %f h r , t_new ) ;
26 mclose ( fid ) ;
27 //=================================================
END OF PROGRAM==================================

Scilab code Exa 3.2 Residence time and heat generation for four STR s
in series

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 3 Ex3 . 2 Pg No . 96
3 // T i t l e : R e s i d e n c e t i m e and h e a t g e n e r a t i o n f o r f o u r
STR s i n s e r i e s
4 //
==================================================================

5 clear

20
6 clc
7 // COMMON INPUT
8 X_A =0.95; // Given c o n v e r s i o n
9 t_batch =6; // Batch t i m e t o r e a c h t h e d e s i r e d
conversion
10 N =4 //No . o f r e a c t o r s i n s e r i e s
11 X_final = X_A ;
12
13 //CALCULATION ( Ex3 . 2 . a )
14 k = log ((1/(1 - X_A ) ) ) / t_batch ; // R e f e r e q u a t i o n 3 . 2 9 Pg
No . 90
15 t_1 =((1/(1 - X_A ) ) ^(1/ N ) -1) / k ; // R e f e r e q u a t i o n 3 . 4 0 Pg
No . 94
16 t_Tot = N * t_1 ;
17
18 //OUTPUT ( Ex3 . 2 . a )
19 mprintf ( \n OUTPUT Ex3 . 2 . a ) ;
20 mprintf ( \n
==================================================================
);
21 mprintf ( \ nThe t o t a l r e s i d e n c e t i m e o f t h e f o u r
r e a c t o r s i n s e r i e s = %f h r , t_Tot ) ;
22
23 //
==================================================================

24
25 // T i t l e : Heat g e n e r a t i o n i n CSTR i n S e r i e s
26 //
==================================================================

27 //CALCULATION ( Ex3 . 2 . b )
28 t_1 =((1/(1 - X_final ) ) ^(1/ N ) -1) / k ; // R e f e r e q u a t i o n
3 . 4 0 Pg No . 94
29 for i =1: N
30 X ( i ) =1 -(1/(1+ k * t_1 ) ^( i ) ) ;
31 end
32

21
33 delQ_by_Q (1) =( X (1) ) / X_final ; // R a t i o o f h e a t
generated in 1 st reactor
34 for i =1: N -1
35 delQ_by_Q ( i +1) =( X ( i +1) -X ( i ) ) / X_final ; // R a t i o
o f h e a t g e n e r a t e d i n 2 nd , 3 r d and 4 t h
reactors
36 end
37
38 //OUTPUT ( Ex3 . 2 . b )
39 mprintf ( \n
=================================================================
n )
40 mprintf ( \n OUTPUT Ex3 . 2 . b ) ;
41 mprintf ( \n
==================================================================
);
42 mprintf ( \ n R e a c t o r v e s s e l \ t C o n v e r s i o n \ t F r a c t i o n
o f t o t a l h e a t r e l e a s e d \n )
43 mprintf ( \n
==================================================================
)
44 for i =1: N
45 mprintf ( \n %d \ t \ t %0 . 3 f \ t \ t \ t %0 . 3 f \n ,i ,
X ( i ) , delQ_by_Q ( i ) )
46 end
47
48 // FILE OUTPUT
49 fid = mopen ( . \ Chapter3 Ex2Output . t x t , w ) ;
50 mfprintf ( fid , \n OUTPUT Ex3 . 2 . a ) ;
51 mfprintf ( fid , \n
==================================================================
);
52 mfprintf ( fid , \ nThe t o t a l r e s i d e n c e t i m e o f t h e f o u r
r e a c t o r s i n s e r i e s = %f h r , t_Tot ) ;
53 mfprintf ( fid , \n
==============================================================
)
54 mfprintf ( fid , \ n R e a c t o r v e s s e l \ t C o n v e r s i o n \ t

22
F r a c t i o n o f t o t a l h e a t r e l e a s e d \n )
55 mfprintf ( fid , \n
==============================================================
)
56 for i =1: N
57 mfprintf ( fid , \n %d \ t \ t %0 . 3 f \ t \ t \ t %0 . 3 f \
n ,i , X ( i ) , delQ_by_Q ( i ) )
58 end
59 mclose ( fid ) ;
60
61
62 //
=============================================================
END OF PROGRAM================================

Scilab code Exa 3.3 Effect of temperature on yield

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 3 Ex3 . 3 Pg No . 97
3 // T i t l e : E f f e c t o f t e m p e r a t u r e on y i e l d
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 C_A0 =1; // I n i t i a l c o n c e n t r a t i o n o f A
9 C_B0 =5; // I n i t i a l c o n c e n t r a t i o n o f B
10 E1 =15; // A c t i v a t i o n e n e r g y f o r f i r s t r e a c t i o n ( k c a l )
11 E2 =20; // A c t i v a t i o n e n e r g y f o r s e c o n d r e a c t i o n ( k c a l )
12 X_A =0.88; // T o t a l c o n v e r s i o n o f r e a c t a n t A
13 Y =0.81; // Y i e l d f o r t h e r e a c t i o n t o p r o d u c e C

23
14 R =1.987; // Gas C o n s t a n t ( c a l /K1 mol 1)
15 T_0 =350; // T e m p e r a t u r e (K)
16
17 //CALCULATION
18 // Assuming f i r s t o r d e r by t a k i n g c o n c e n t r a t i o n of B
constant s i n c e B i s in Excess
19 C_A = C_A0 *(1 - X_A ) ; // U n r e a c t e d amount o f A
20 C_B = C_B0 - Y ; // U n r e a c t e d amount o f B
21 k1_plus_k2_t =( X_A /(1 - X_A ) ) ;
22 S = Y / X_A ; // At 350K
23 k1_by_k2 =11.57;
24 k1_plus_k2_by_k2 = k1_by_k2 +1; // R e f e r Ex3 . 3 f o r t h e
coded e q u a t i o n s
25 k2_t = k1_plus_k2_t / k1_plus_k2_by_k2 ;
26 k1_t = k1_plus_k2_t - k2_t ;
27 T =345;
28 for i =1:7
29 T = T +5;
30 Temp ( i ) = T ;
31 k1_dash_t ( i ) = k1_t * exp ((( E1 *1000/ R ) *((1/ T_0 ) -(1/ T ) ) ) )
; // A r r h e n i u s law
32 k2_dash_t ( i ) = k2_t * exp ((( E2 *1000/ R ) *((1/ T_0 ) -(1/ T ) ) ) )
; // A r r h e n i u s law
33 k1_plus_k2_t_new ( i ) = k1_dash_t ( i ) + k2_dash_t ( i ) ;
34 X_A_new ( i ) = k1_plus_k2_t_new ( i ) /(1+ k1_plus_k2_t_new ( i
));
35 S_new ( i ) =(( k1_dash_t ( i ) / k2_dash_t ( i ) ) /(1+( k1_dash_t (
i ) / k2_dash_t ( i ) ) ) ) ;
36 Y_new ( i ) = S_new ( i ) * X_A_new ( i ) ;
37 end
38
39 //OUTPUT
40 mprintf ( ======================================= ) ;
41 mprintf ( \n\ t T \ t X A \ t S \ t Y );
42 mprintf ( \n\ t K \ t ( ) \ t ( ) \ t ( ) ) ;
43 mprintf ( \n====================================== ) ;
44 for i =1:7
45 mprintf ( \n\ t %d \ t %0 . 3 f \ t %0 . 3 f \ t %0 . 3 f ,

24
Temp ( i ) , X_A_new ( i ) , S_new ( i ) , Y_new ( i ) ) ;
46 end
47 maximum = max ( Y_new ) ;
48 mprintf ( \n\ t \ nThe maximum v a l u e o f y i e l d i s %f ,
maximum ) ;
49 mprintf ( \n\ t \ nHigh y i e l d i s o b t a i n e d b e t w e e n 365K
t o 375K ) ;
50
51 // FILE OUTPUT
52 fid = mopen ( . \ Chapter3 Ex3Output . t x t , w ) ;
53 mfprintf ( fid ,
======================================= ) ;
54 mfprintf ( fid , \n\ t T \ t X A \ t S \ t Y ) ;
55 mfprintf ( fid , \n\ t K \ t ( ) \ t ( ) \ t ( ) ) ;
56 mfprintf ( fid , \n
====================================== ) ;
57 for i =1:7
58 mfprintf ( fid , \n\ t %d \ t %0 . 3 f \ t %0 . 3 f \ t %0 . 3 f
, Temp ( i ) , X_A_new ( i ) , S_new ( i ) , Y_new ( i ) ) ;
59 end
60 maximum = max ( Y_new ) ;
61 mfprintf ( fid , \n\ t \ nThe maximum v a l u e o f y i e l d i s
%f , maximum ) ;
62 mfprintf ( fid , \n\ t \ nHigh y i e l d i s o b t a i n e d b e t w e e n
365K t o 375K ) ;
63 mclose ( fid ) ;
64 //
======================================================
END OF PROGRAM
===================================================

65 // D i s c l a i m e r : R e f e r Ex3 . 3 i n t h e t e x t b o o k The
A r r h e n i u s law e q u a t i o n h a s a t y p o e r r o r .
E x p o n e n t i a l term m i s s i n g i n t h e t e x t b o o k

25
Scilab code Exa 3.4 Volume of reactor for Gas Phase isothermal reaction

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 3 Ex3 . 4 Pg No . 101
3 // T i t l e : Volume o f r e a c t o r f o r Gas Phase i s o t h e r m a l
reaction
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 // F i r s t Order R e a c t i o n
9 // B a s i s : 1 mol o f f e e d
10 k =0.45; // Rate c o n s t a n t o f f i r s t o r d e r r e a c t i o n ( s 1)
11 v0 =120; // V o l u m e t r i c f l o w r a t e ( cm3/ s )
12 C_A0 =0.8; // I n i t i a l amount o f r e a c t a n t A ( mol )
13 X_A =0.95; // C o n v e r s i o n i n t e r m s o f r e a c t a n t A
14 C_inert =0.2; // C o n c e n t r a t i o n o f i n e r t ( N i t r o g e n ) i n
feed
15
16 //CALCULATION
17 E_A =((2* C_A0 + C_inert ) -( C_A0 + C_inert ) ) /( C_A0 + C_inert )
; // Volume f r a c t i o n
18 Tot_mol =( C_A0 + C_inert ) +( E_A ) ; // T o t a l No . o f m o l e s
19 V = v0 *(( -( E_A ) * X_A ) + Tot_mol *( log (1/(1 - X_A ) ) ) ) /( k ) ; //
R e f e r P e r f o r m a n c e E q u a t i o n e q u a t i o n 3 . 4 4 and 3 . 4 2
i n Pg No . 100
20 V_l = V *10^ -3; // Volume o f r e a c t o r i n l i t e r s
21
22 //OUTPUT

26
23 mprintf ( \n\ tThe Volume o f t h e r e a c t o r r e q u i r e d f o r
t h e g i v e n c o n v e r s i o n i s %. 0 f cm3 o r %0 . 2 f l i t e r s
,V , V_l ) ;
24
25 // FILE OUTPUT
26 fid = mopen ( . \ Chapter3 Ex4Output . t x t , w ) ;
27 mfprintf ( fid , \n\ tThe Volume o f t h e r e a c t o r r e q u i r e d
f o r t h e g i v e n c o n v e r s i o n i s %. 0 f cm3 o r %0 . 2 f
l i t e r s ,V , V_l ) ;
28 mclose ( fid ) ;
29 //
==============================================================
END OF PROGRAM
==========================================

Scilab code Exa 3.5 Rate Equation to fit Initial Rate data

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 3 Ex3 . 5 Pg No . 104
3 // T i t l e : Rate E q u a t i o n t o f i t I n i t i a l Rate d a t a
4 //
==================================================================

5 clear
6 clc
7 clf ()
8 //INPUT ( Ex3 . 5 . 1 )
9 // I n i t i a l Rate Data
10 B_by_A = [5 7 10 20 37]; //B/A Mol R a t i o
11 r_0 =[75 65 50 33 18]; // Rate ( mol / h r g )

27
12
13 //CALCULATION ( Ex3 . 5 . 1 )
14 // Assuming E l e y R i d e a l Mechanism f o r t h e b e n z e n e
a l k y l a t i o n with propylene
15 for i =1:5
16 C_B ( i ) = ( B_by_A ( i ) /(1+ B_by_A ( i ) ) ) ; // I n t e r m s o f
Mol F r a a c t i o n
17 C_A ( i ) = (1/(1+ B_by_A ( i ) ) ) ;
18 CA_CB ( i ) = C_B ( i ) * C_A ( i ) ;
19 C_by_r ( i ) = CA_CB ( i ) / r_0 ( i ) ;
20 end
21 coefs = regress ( C_A , C_by_r ) ; // The e q u a t i o n ( ( C BC A ) /
r 0 )= 1 / ( k K A ) + ( C A/ k )
22 scf (0)
23 plot ( C_A , C_by_r , ) ;
24 xtitle ( T e s t o f Eley R i d e a l model f o r b e n z e n e
a l k y l a t i o n );
25 xlabel ( CA , Mol F r a c t i o n ) ;
26 ylabel ( CA CB/ r 0 ) ;
27 intercept = coefs (1) ;
28 slope = coefs (2) ;
29 K_A = slope / intercept ;
30 k =1/( slope ) ;
31 K_A_k = k * K_A ;
32
33 //OUTPUT ( Ex3 . 5 . 1 )
34 mprintf ( \n OUTPUT Ex3 . 5 . 1 ) ;
35 mprintf ( \n
=================================================
)
36 mprintf ( \ nThe r a t e e q u a t i o n f o r Eley R i d e l y
Mechanism i s : \ n r= %0 . 0 fC A C B/(1+%0 . 2 fC A ) ,
K_A_k , K_A ) ;
37 //
==================================================================

38
39 // T i t l e : C o n v e r s i o n a s a f u n c t i o n o f S p a c e v e l o c i t y

28
40 //
==================================================================

41 //INPUT ( Ex3 . 5 . 2 )
42 x = [0.16 0.31 0.40 0.75];
43 Exp_Inverse_WHSV =(10^ -3) *[4 8.2 17 39]; // Weight
Hourly Space V e l o c i t y
44 Feed_ratio =10;
45
46 //CALCULATION ( Ex3 . 5 . 2 )
47 // The i n t e g r a t e d r a t e e q u a t i o n i n t e r m s o f
c o n v e r s i o n l n (1/(1 X) ) + 0 . 2 3 6X= 6 0 . 4 /WHSV ( Page no
. 106)
48 function [ y ]= integrated_rate_eqn ( x0 )
49 y = log (1 ./(1 - x0 ) ) + 0.236.* x0 - 60.4.*
Exp_Inverse_WHSV
50 endfunction
51
52 n = length ( x )
53 x0 =0.9* ones (1 , n ) ; // P r o v i d e g u e s s v a l u e f o r
conversion
54 [ x_predicted ]= fsolve ( x0 , integrated_rate_eqn ,1 d -15) ;
// U s i n g f s o l v e t o d e t e r m i n e c o n v e r s i o n from
i n t e g r a t e d r a t e e x p r e s s i o n f o r each o p e r a t i n g
WHSV
55
56 scf (1)
57 plot ( Exp_Inverse_WHSV ,x , , Exp_Inverse_WHSV ,
x_predicted , )
58 xtitle ( I n t e g r a l a n a l y s i s , I n v e r s e o f WHSV ,
Conversion )
59 legend ( E x p e r i m e n t a l , P r e d i c t e d )
60
61 //OUTPUT ( Ex3 . 5 . 2 )
62 // C o n s o l e Output
63 mprintf ( \n
=================================================\
n );

29
64 mprintf ( \n OUTPUT Ex3 . 5 . 2 ) ;
65 mprintf ( \n P r e d i c t e d and E x p e r i m e n t a l C o n v e r s i o n
Values )
66 mprintf ( \n
=================================================
)
67 mprintf ( \ n10 3/WHSV\ t X e x p e r i m e n t a l \ t X p r e d i c t e d )
68 mprintf ( \n
=================================================
)
69 for i =1: n
70 mprintf ( \n %0 . 2 f \ t \ t%0 . 2 f \ t \ t%0 . 2 f ,
Exp_Inverse_WHSV ( i ) *10^3 , x ( i ) , x_predicted ( i ) )
71 end
72
73 // FILE OUTPUT
74 fid = mopen ( . \ Chapter3 Ex5Output . t x t , w ) ;
75 mfprintf ( fid , \n OUTPUT Ex3 . 5 . 1 ) ;
76 mprintf ( \n
=================================================
)
77 mfprintf ( fid , \ nThe r a t e e q u a t i o n f o r Eley R i d e l y
Mechanism i s : \ n r= %0 . 0 fC A C B/(1+%0 . 2 fC A ) ,
K_A_k , K_A ) ;
78 mfprintf ( fid , \n
=================================================\
n )
79 mfprintf ( fid , \n OUTPUT Ex3 . 5 . 2 ) ;
80 mfprintf ( fid , \n P r e d i c t e d and E x p e r i m e n t a l
Conversion Values )
81 mfprintf ( fid , \n
=================================================
)
82 mfprintf ( fid , \ n10 3/WHSV\ t X e x p e r i m e n t a l \
tX predicted )
83 mfprintf ( fid , \n
=================================================
)

30
84 for i =1: n
85 mfprintf ( fid , \n %0 . 2 f \ t \ t%0 . 2 f \ t \ t%0 . 2 f
,
Exp_Inverse_WHSV ( i ) *10^3 , x ( i ) , x_predicted ( i ) )
86 end
87 mclose ( fid )
88
89 //===========================================END OF
PROGRAM=================================
90 // D i s c l a i m e r : R e g r e s s i o n method i s u s e d t o f i n d t h e
s l o p e and i n t e r c e p t i n Ex3 . 5 . 2 .
91 // Hence t h e r a t e e q u a t i o n d i f f e r from t h e
g r a p h i c a l l y o b t a i n e d v a l u e s o f s l o p e and
i n t e r c e p t in the textbook .

Scilab code Exa 3.6 Optimum reaction temperature

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 3 Ex3 . 6 Pg No . 114
3 // T i t l e : Optimum r e a c t i o n t e m p e r a t u r e
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 del_H = -20*10^3; // Heat o f r e a c t i o n ( c a l )
9 T_eq =[500 700]; // E q u i v a l e n t t e m p e r a t u r e s (K)
10 R =1.987; // Gas C o n s t a n t ( c a l / mol K)
11 E2_by_E1 =2; // R a t i o o f a c t i v a t i o n e n e r g y
12
13 //CALCULATION
14 T_opt (1) = T_eq (1) /(1+( log ( E2_by_E1 ) *( R /( - del_H ) ) ) *

31
T_eq (1) ) ; // R e f e r e q u a t i o n 3 . 6 3 Pg No . 113
15 T_opt (2) = T_eq (2) /(1+( log ( E2_by_E1 ) *( R /( - del_H ) ) ) *
T_eq (2) ) ;
16 delta_T (1) = T_eq (1) - T_opt (1) ;
17 delta_T (2) = T_eq (2) - T_opt (2) ;
18
19
20 //OUTPUT
21 mprintf ( \n \ t \ t Temperature 1 \ t Temperature 2
);
22 mprintf ( \n \ t \t
================================== ) ;
23 mprintf ( \n ( T eq T o p t ) (K) : \ t%0 . 0 f \ t \ t%0 . 0 f
, delta_T (1) , delta_T (2) ) ;
24 mprintf ( \n T o p t (K) : \ t \ t%0 . 0 f \ t \ t%0 . 0 f , T_opt
(1) , T_opt (2) ) ;
25
26 fid = mopen ( . \ Chapter3 Ex6Output . t x t , w ) ;
27 mfprintf ( fid , \n \ t \ t Temperature 1 \ t
Temperature 2 );
28 mfprintf ( fid , \n \ t \t
================================== ) ;
29 mfprintf ( fid , \n ( T eq T o p t ) (K) : \ t%0 . 0 f \t\
t%0 . 0 f , delta_T (1) , delta_T (2) ) ;
30 mfprintf ( fid , \n T o p t (K) : \ t \ t%0 . 0 f \ t \ t%0 . 0 f ,
T_opt (1) , T_opt (2) ) ;
31 mclose ( fid ) ;
32
33 //
=========================================================
END OF PROGRAM
=====================================
34 // D i s c l a i m e r : There i s an a r i t h m e t i c e r r o r i n the
optimum t e m p e r a t u r e s o b t a i n e d i n t h e t e x t b o o k .
35 // Based on t h e v a l u e s ( T eq T o p t ) 1=17 and ( T eq
T o p t ) 2=32 t h e optimum t e m p e r a t u r e s o b t a i n e d
are
36 // T o p t 1 =483 K and T o p t 2 =668 K r e s p e c t i v e l y .

32
Scilab code Exa 3.7 Equilibrium temperature as a function of conversion
and optimum feed temperature

1 // H a r r i o t P , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n )
M a r c e l Dekker , I n c . USA , pp 436
2 // Chapter 3 Ex3 . 7 Pg No . 115
3 // T i t l e : E q u i l i b r i u m t e m p e r a t u r e a s a f u n c t i o n o f
c o n v e r s i o n and Optimum Feed T e m p e r a t u r e
4 //
==================================================================

5 clear
6 clc
7 // COMMON INPUT
8 P_opt =1.5; // ( atm ) O p e r a t i n g p r e s s u r e
of f i r s t
converter
9 x =[0.5 0.6 0.7 0.8 0.9 0.95]; // C o n v e r s i o n o f SO2
10 k =[2 E -06 5.1 E -06 10.3 E -06 18 E -06 27 E -06 37.5 E -06 48 E
-06 59 E -06 69 E -06 77 E -06] ; // Rate C o n s t a n t ( gmol
/ g c a t s e c atm )
11 T =420:20:600; // T e m p e r a t u r e ( C )
12 X =0.68;
13 T_F =700; // Feed T e m p e r a t u r e (K)
14 C_pi_800 =[12.53 18.61 8.06 7.51];
15 F =100; // ( mol ) amount o f f e e d
16 delta_H_700 = -23270; // ( c a l / mol )
17 percent_SO2_f =11; // (%) P e r c e n t a g e o f SO2 i n f e e d
18
19
20 //CALCULATION ( Ex3 . 7 . a )

33
21 n = length ( x ) ;
22 m = length ( k ) ;
23 for i =1: n
24 K_eq ( i ) =(( x ( i ) /(1 - x ( i ) ) ) ) *((100 -5.5* x ( i ) )
/(10 -5.5* x ( i ) ) ) ^0.5*(1/ P_opt ) ^0.5;
25 T_eq ( i ) =(11412/( log ( K_eq ( i ) ) +10.771) ) ;
26 P_O2 ( i ) =(10*(10 -5.5* x ( i ) ) * P_opt ) /(100 -5.5* x ( i ) ) ;
27 P_SO3 ( i ) =(11* x ( i ) * P_opt ) /(100 -5.5* x ( i ) ) ;
28 P_SO2 ( i ) =(11*(1 - x ( i ) ) * P_opt ) /(100 -5.5* x ( i ) ) ;
29 end
30
31 for i =1: n
32 for j =1: m
33 r (j , i ) = k ( j ) *( P_SO2 ( i ) / P_SO3 ( i ) ) ^0.5*( P_O2 ( i )
-( P_SO3 ( i ) /( P_SO2 ( i ) * K_eq ( i ) ) ) ^2)
34 end
35 r_max ( i ) = max ( r (j , i ) ) ;
36 end
37 clf ()
38 scf (0)
39 plot (x , T_eq -273 , ) ;
40 xtitle ( T e m p e r a t u r e i n S t a g e 1 o f an SO2 c o n v e r t e r )
;
41 xlabel ( x , SO2 C o n v e r s i o n ) ;
42 ylabel ( Temperature , C ) ;
43
44 //CALCULATION ( Ex3 . 7 . b )
45 n_SO2 = F * percent_SO2_f *10^ -2*(1 - X ) ;
46 n_SO3 = F * percent_SO2_f *10^ -2* X ;
47 n_O2 =(10 -5.5* X ) ;
48 n_N2 =79;
49 sigma_n_C_pi = n_SO2 * C_pi_800 (1) + n_SO3 * C_pi_800 (2) +
n_O2 * C_pi_800 (3) + n_N2 * C_pi_800 (4) ;
50 Temp_change =( F * percent_SO2_f *10^( -2) * X *( -1) *
delta_H_700 ) / sigma_n_C_pi ; // R e f e r e q u a t i o n 3 . 6 0
Pg No . 1 1 0
51 mprintf ( \ nHeat C a p a c i t y e v a l u a t e d a t 800 K : %0 . 0 f (
c a l / C ) , sigma_n_C_pi ) ;

34
52 mprintf ( \ n T e m p e r a t u r e Change t o c a r r y o u t t h e
r e a c t i o n at T F ,\ nusing the energy to heat the
p r o d u c t g a s : %0 . 0 f C , Temp change ) ;
53 // From g r a p h i c a l p r o c e d u r e ( F i g u r e 3 . 1 9 , Pg No . 1 1 8 )
t h e f i n a l t e m p e r a t u r e i s o b t a i n e d a s 410 C
54 T F =410;//( C ) Final temperature
55 // From F i g u r e 3 . 1 9 , Pg No . 1 1 8 t e m p e r a t u r e f o r
corresponding conversion i s obtained
56 X stage = [ 0 . 1 ; 0 . 2 ; 0 . 3 ; 0 . 4 ; 0 . 5 ; 0 . 6 ]
57 T stage =[441;470;500;540;565;580]
58 m=l e n g t h ( X s t a g e ) ;
59 f o r i =1:m
60 K eq ( i )=exp ( ( 1 1 4 1 2 / T s t a g e ( i ) ) 1 0 . 7 7 1 ) ;
61 end
62 k =10 6[5.25 1 4 . 1 5 27 48 6 1 . 5 6 9 ] ; / / From T a b l e 3 . 5
Corresponding to the s t a g e temperature data
o b t a i n e d form F i g u r e 3 . 1 9
63 f o r i =1:m
64 P SO2 ( i ) =11(1 X s t a g e ( i ) ) P o p t / ( 1 0 0 5 . 5
X stage ( i ) )
65 P SO3 ( i ) =11 X s t a g e ( i ) P o p t / ( 1 0 0 5 . 5 X s t a g e ( i )
)
66 P O2 ( i ) =10(10 5.5 X s t a g e ( i ) ) P o p t / ( 1 0 0 5 . 5
X stage ( i ) )
67 r ( i )=k ( i ) ( P SO2 ( i ) / P SO3 ( i ) ) 0 . 5 ( P O2 ( i ) (
P SO3 ( i ) / ( P SO2 ( i ) K eq ( i ) ) ) 2 ) 1 0 6 ;
68 i n v e r s e r ( i ) =(1/ r ( i ) ) ;
69 end
70 scf (1)
71 p l o t ( X stage , i n v e r s e r , * ) ;
72 x t i t l e ( 1/ r vs x , X ( c o n v e r s i o n ) , 10 6/ r ) ;
73
74
75 //OUTPUT ( Ex3 . 7 . a )
76 mprintf ( \n\n OUTPUT Ex3 . 7 . a ) ;
77 mprintf ( \n
==================================================================
);

35
78 mprintf ( \n X\ t P h i \ t \ t T e q \ t T e q \ t \ t r m a x ) ;
79 mprintf ( \n \ t ( atm 0 .5 ) \ t (K) \ t ( C ) \ t \ t ( gmol / g c a t
s e c ) );
80 mprintf ( \n
==================================================================
);
81 for i =1: n -1
82 mprintf ( \n %0 . 2 f \ t%0 . 2 f \ t %0 . 0 f \ t%0 . 0 f \ t \ t%0 . 6 E
,x ( i ) , K_eq ( i ) , T_eq ( i ) , T_eq ( i ) -273 , r_max ( i ) ) ;
83 end
84 mprintf ( \n %0 . 2 f \ t%0 . 2 f \ t \ t%0 . 0 f \ t%0 . 0 f \ t \ t%0 . 6 E ,x
( n ) , K_eq ( n ) , T_eq ( n ) , T_eq ( n ) -273 , r_max ( n ) ) ;
85
86 //OUTPUT ( Ex3 . 7 . b )
87 mprintf ( \n\n\n OUTPUT Ex3 . 7 . b ) ;
88 mprintf ( \n
==================================================================
);
89 mprintf ( \n
=========================================== ) ;
90 mprintf ( \n 10 6/ r \tX ( c o n v e r s i o n ) ) ;
91 mprintf ( \n ( gmol / g c a t , s ) \ t ( ) ) ;
92 mprintf ( \n
=========================================== ) ;
93 for i =1: m
94 mprintf ( \n %0 . 2 f \ t \ t \ t%0 . 2 f , inverse_r ( i ) ,
X_stage ( i ) ) ;
95 end
96 mprintf ( \nFrom g r a p h i c a l p r o c e d u r e ( 1 / r v s x ) t h e
optimum t e m p e r a t u r e o b t a i n e d i s T o p t : 412 C ) ;
97
98 // FILE OUTPUT
99 fid = mopen ( . \ Chapter3 Ex7Output . t x t , w ) ;
100 mfprintf ( fid , \ nHeat C a p a c i t y e v a l u a t e d a t 800 K : %0
. 0 f ( c a l / C ) , sigma_n_C_pi ) ;
101 mfprintf ( fid , \ n T e m p e r a t u r e Change t o c a r r y o u t t h e
r e a c t i o n at T F ,\ nusing the energy to heat the
p r o d u c t g a s : %0 . 0 f C , Temp change ) ;

36
102 m f p r i n t f ( f i d , \ n OUTPUT Ex3 .7. a ) ;
103 mfprintf ( fid , \n
==================================================================
);
104 mfprintf ( fid , \n X\ t P h i \ t \ t T e q \ t T e q \ t \ t r m a x ) ;
105 mfprintf ( fid , \n \ t ( atm 0 .5 ) \ t (K) \ t ( C ) \ t \ t ( gmol /
g c a t s e c ) );
106 mfprintf ( fid , \n
==================================================================
);
107 for i =1: n -1
108 mfprintf ( fid , \n %0 . 2 f \ t%0 . 2 f \ t %0 . 0 f \ t%0 . 0 f \ t \
t%0 . 6 E ,x ( i ) , K_eq ( i ) , T_eq ( i ) , T_eq ( i ) -273 ,
r_max ( i ) ) ;
109 end
110 mfprintf ( fid , \n %0 . 2 f \ t%0 . 2 f \ t \ t%0 . 0 f \ t%0 . 0 f \ t \ t%0
. 6 E ,x ( n ) , K_eq ( n ) , T_eq ( n ) , T_eq ( n ) -273 , r_max ( n ) ) ;
111 mfprintf ( fid , \n\n\n OUTPUT Ex3 . 7 . b ) ;
112 mfprintf ( fid , \n
==================================================================
);
113 mfprintf ( fid , \n
=========================================== ) ;
114 mfprintf ( fid , \n 10 6/ r \tX ( c o n v e r s i o n ) ) ;
115 mfprintf ( fid , \n ( gmol / g c a t , s ) \ t ( ) ) ;
116 mfprintf ( fid , \n
=========================================== ) ;
117 for i =1: m
118 mfprintf ( fid , \n %0 . 2 f \ t \ t \ t%0 . 2 f , inverse_r ( i )
, X_stage ( i ) ) ;
119 end
120 mfprintf ( fid , \nFrom g r a p h i c a l p r o c e d u r e ( 1 / r v s x )
t h e optimum t e m p e r a t u r e o b t a i n e d i s T o p t : 412
C );
121 mclose ( fid ) ;
122
123 //
==========================================================

37
END OF PROGRAM
======================================
124 // D i s c l a i m e r : The optimum t e m p e r a t u r e f o r e a c h
c o n v e r s i o n i s f o u n d by t r i a l a t maximum r a t e and
the k i n e t i c data in the textbook i s not
s u f f i c i e n t t o c a l c u l a t e t h e optimum t e m p e r a t u r e
in the code .

38
Chapter 4

Diffusion and Reaction in


Porous Catalysts

Scilab code Exa 4.1 Diffusivity of Chlorine and tortuosity in catalyst pel-
let

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 4 Ex4 . 1 Pg No . 135
3 // T i t l e : D i f f u s i v i t y o f C h l o r i n e and t o r t u o s i t y i n
catalyst pellet
4 //
==================================================================

5 clear
6 clc
7
8 // COMMON INPUT
9 S_g =235; // T o t a l s u r f a c e p e r gram (m2/ g )
10 V_g =0.29 E -6; // Pore volume p e r gram ( cm3/ g )
11 rho_p =1.41; // D e n s i t y o f p a r t i c l e ( g /cm3 )
12 D_He =0.0065; // E f f e c t i v e d i f f u s i v i t y o f He ( cm2/ s e c )

39
13 D_AB =0.73; // a t 1 atm and 298K
14 M_He =4; // M o l e c u l a r w e i g h t o f He
15 M_Cl2 =70.09; // M o l e c u l a r w e i g h t o f Cl2
16 T_ref =293; // R e f e r e n c e t e m p e r a t u r e
17 T_degC =300;
18 T_01 = T_degC +273; // R e a c t i o n t e m p e r a t u r e (K) ( Ex4 . 1 . a )
19 T_02 =298; // O p e r a t i n g t e m p e r a t u r e ( Ex4 . 1 . b )
20 T_03 =573; // o p e r a t i n g t e m p e r a t u r e ( Ex4 . 1 . c )
21 P_ref =1; // R e f e r e n c e p r e s s u r e
22 D_Cl2_CH4 =0.15; // a t 1 atm 273K
23 P =15; // o p e r a t i n g p r e s s u r e
24 // t a u = 1 . 2 5 ; / / From v a l u e c a l c u l a t e d i n Ex4 . 1 . b Pg . No
. 136
25
26
27 //CALCULATION ( Ex4 . 1 . a )
28 r_bar =2* V_g / S_g ; // Mean Pore r a d i u s
29 D_Cl2_Ex_a = D_He *(( M_He / M_Cl2 ) *( T_01 / T_ref ) ) ^(0.5) ; //
Assuming Knudsen f l o w a t 573K
30
31 //CALCULATION ( Ex4 . 1 . b )
32 r_bar =2* V_g *(10^6) /( S_g *(10^4) ) ;
33 D_K =9700*( r_bar ) *( T_ref / M_He ) ^(0.5) ; // Knudsen f l o w
34 D_AB1 = D_AB *(293/298) ^(1.7) // a t 1 . 5 atm and 293K
35 D_pore =1/((1/ D_K ) +(1/ D_AB1 ) ) ; // p o r e d i f f u s i o n
36 Epsilon = V_g * rho_p *(10^6) ;
37 tau =( D_pore * Epsilon ) / D_He ; // T o r t u s i t y
38
39 //CALCULATION ( Ex4 . 1 . c )
40 D_Cl2_CH4_new = D_Cl2_CH4 *( P_ref / P ) *( T_03 / T_ref ) ^(1.7)
;
41 D_K_Cl2 =9700* r_bar * sqrt ( T_03 / M_Cl2 ) ;
42 D_pore =1/((1/ D_Cl2_CH4_new ) +(1/ D_K_Cl2 ) ) ;
43 Epsilon = V_g * rho_p ;
44 D_Cl2_Ex_c = D_pore * Epsilon / tau ;
45
46
47 //OUTPUT

40
48 mprintf ( \n OUTPUT Ex4 . 1 . a ) ;
49 mprintf ( \n
=================================================
);
50 mprintf ( \ nThe p r e d i c t e d d i f f u s i v i t y o f C h l o r i n e i s
%0 . 2 e cm2/ s , D_Cl2_Ex_a ) ;
51 mprintf ( \n\n OUTPUT Ex4 . 1 . b ) ;
52 mprintf ( \n
=================================================
);
53 mprintf ( \ nThe t o r t u s i t y v a l u e = %0 . 2 f , tau ) ;
54 mprintf ( \n\n OUTPUT Ex4 . 1 . b ) ;
55 mprintf ( \n
=================================================
)
56 mprintf ( \ nThe E f f e c t i v e d i f f u s i v i t y o f C h l o r i n e a t
%g K and %g atm = %0 . 2 e cm2/ s e c , T_03 , P ,
D_Cl2_Ex_c ) ;
57
58 // FILE OUTPUT
59 fid = mopen ( . \ Chapter4 Ex1Output . t x t , w ) ;
60 mfprintf ( fid , \n OUTPUT Ex4 . 1 . a ) ;
61 mfprintf ( fid , \n
=================================================
);
62 mfprintf ( fid , \ nThe p r e d i c t e d d i f f u s i v i t y o f
C h l o r i n e i s %0 . 2 e cm2/ s , D_Cl2_Ex_a ) ;
63 mfprintf ( fid , \n\n OUTPUT Ex4 . 1 . b ) ;
64 mfprintf ( fid , \n
=================================================
);
65 mfprintf ( fid , \ nThe t o r t u s i t y v a l u e = %0 . 2 f , tau ) ;
66 mfprintf ( fid , \n\n OUTPUT Ex4 . 1 . b ) ;
67 mfprintf ( fid , \n
=================================================
)
68 mfprintf ( fid , \ nThe E f f e c t i v e d i f f u s i v i t y o f
C h l o r i n e a t %g K and %g atm = %0 . 2 e cm2/ s e c ,

41
T_03 , P , D_Cl2_Ex_c ) ;
69 mclose ( fid )
70 //============================================END OF
PROGRAM
=================================================

Scilab code Exa 4.2 Effective diffusivity of O2 in air

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 4 Ex4 . 2 Pg No . 140
3 // T i t l e : E f f e c t i v e d i f f u s i v i t y o f O2 i n a i r
4 //
==================================================================

5 clear
6 clc
7 // COMMON INPUT
8 S_g =150; // T o t a l s u r f a c e p e r gram (m2/ g )
9 V_g =0.45; // Pore volume p e r gram ( cm3/ g )
10 V_i =0.30; // M i c r o p o r e volume p e r gram ( cm3/ g )
11 V_a =0.15; // M a c r o p o r e volume p e r gram ( cm3/ g )
12 rho_P =1.2; // D e n s i t y o f p a r t i c l e ( g /cm3 )
13 tau =2.5; // T o r t u s i t y
14 r_bar_i =40*(10^( -8) ) ; // M i c r o p o r e r a d i u s
15 r_bar_a =2000*(10^( -8) ) ; // M a c r o p o r e r a d i u s
16 D_AB =0.49; // For N 2 O 2 a t 1 atm ( cm2/ s )
17 M_O2 =32; // M o l e c u l a r w e i g h t o f O2
18 T =493; // O p e r e a t i n g T e m p e r a t u r e (K)
19
20
21
22 //CALCULATION ( Ex4 . 2 . a )

42
23 Epsilon = V_g * rho_P ;
24 D_K_i =9700*( r_bar_i ) * sqrt ( T / M_O2 ) ; // Knudsen f l o w f o r
micropore
25 D_Pore_i =1/((1/ D_K_i ) +(1/ D_AB ) )
26 D_K_a =9700*( r_bar_a ) * sqrt ( T / M_O2 ) ;
27 D_Pore_a =1/((1/ D_K_a ) +(1/ D_AB ) ) ; // // Knudsen f l o w f o r
macropore
28 D_Pore_Avg =( V_i * D_Pore_i + V_a * D_Pore_a ) /( V_i + V_a ) ;
29 D_e = Epsilon * D_Pore_Avg / tau ;
30
31 //CALCULATION ( Ex4 . 2 . b )
32 Epsilon = V_g * rho_P ;
33 r_bar =2* V_g /( S_g *10^4) ;
34 D_K =9700*( r_bar ) * sqrt ( T / M_O2 ) ; // Knudsen Flow
35 D_Pore =1/((1/ D_K ) +(1/ D_AB ) ) ;
36 tau = D_Pore * Epsilon / D_e ;
37
38 //OUTPUT
39 mprintf ( \n OUTPUT Ex4 . 2 . a ) ;
40 mprintf ( \n
=================================================
);
41 mprintf ( \n The e f f e c t i v e d i f f u s i v i t y o f O2 i n a i r =
%0 . 2 e cm2/ s , D_e ) ;
42 mprintf ( \n\n OUTPUT Ex4 . 2 . b ) ;
43 mprintf ( \n
=================================================
);
44 mprintf ( \n The c a l c u l a t e d s u r f a c e mean p o r e r a d i u s
= %. 0 e cm , r_bar ) ;
45 mprintf ( \n The p r e d i c t e d p o r e d i f f u s i v i t y = %0 . 2 e
cm2/ s e c , D_Pore ) ;
46 mprintf ( \n The c o r r e s p o n d i n g t o r t u s i t y = %0 . 2 f , tau
);
47
48 // FILE OUTPUT
49 fid = mopen ( . \ Chapter4 Ex2Output . t x t , w ) ;
50 mfprintf ( fid , \n OUTPUT Ex4 . 2 . a ) ;

43
51 mfprintf ( fid , \n
=================================================
);
52 mfprintf ( fid , \n The e f f e c t i v e d i f f u s i v i t y o f O2 i n
a i r = %0 . 2 e cm2/ s , D_e ) ;
53 mfprintf ( fid , \n\n OUTPUT Ex4 . 2 . b ) ;
54 mfprintf ( fid , \n
=================================================
);
55 mfprintf ( fid , \n The c a l c u l a t e d s u r f a c e mean p o r e
r a d i u s = %. 0 e cm , r_bar ) ;
56 mfprintf ( fid , \n The p r e d i c t e d p o r e d i f f u s i v i t y = %0
. 2 e cm2/ s e c , D_Pore ) ;
57 mfprintf ( fid , \n The c o r r e s p o n d i n g t o r t u s i t y = %0 . 2 f
, tau ) ;
58 mclose ( fid ) ;
59
60
61 //
======================================================
END OF PROGRAM
========================================

Scilab code Exa 4.3 Influence of Pore diffusion over rate

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 4 Ex4 . 3 Pg No . 154
3 // T i t l e : I n f l u e n c e o f Pore d i f f u s i o n o v e r r a t e
4 //
==================================================================

5 clear

44
6 clc
7 //INPUT
8 d_p =1/4; // S p h e r i c a l C a t a l y s t p e l l e t s i z e ( i n c h )
9 k =[7.6*10^ -3 14*10^ -3]; // R e a c t i o n r a t e s ( mol / h r )
10 f_A =[0.1 0.2]; // Feed f r a c t i o n o f r e a c t a n t A
11 D_e =0.0085; // D i f f u s i v i t y o f A ( cm2/ s )
12 rho_p =1.4 ; // D e n s i t y o f c a t a l y s t p a r t i c l e ( g /cm3 )
13 V_ref =22400; // r e f e r e n c e volume ( cm3 )
14 T_ref =273; // R e f e r e n c e T e m p e r a t u r e (K)
15 P_ref =1; // R e f e r e n c e P r e s s u r e ( atm )
16 P =1.2; // O p e r a t i n g P r e s s u r e ( atm )
17 T_C =150;
18 T = T_C +273; // O p e r a t i n g T e m p e r a t u r e (K)
19
20 //CALCULATION
21 // For 10% o f A
22 C_A (1) = f_A (1) * T_ref * P_ref /( V_ref * T * P ) ;
23 R = d_p *2.54/2;
24 k_app (1) = k (1) * rho_p /(3600* C_A (1) ) ; // R e f e r e q u a t i o n
4 . 5 3 Pg . No . 153
25 phi_app (1) = R * sqrt ( k_app (1) / D_e ) ; // R e f e r e q u a t i o n
4 . 5 5 Pg . No . 155
26 C_A (2) = f_A (2) * T_ref * P_ref /( V_ref * T * P ) ;
27 // I f C A i s d o u b l e d t h e o r d e r i s q u i t e c l o s e t o 1 ,
from t h e F i g u r e 4 . 8 Pg . No . 1 4 8 , r e f e r v a l u e o f
effectiveness
28 eta_graph =0.42;
29 k_app (2) = k_app (1) / eta_graph ;
30 phi_app (2) = R * sqrt ( k_app (2) / D_e ) ;
31 eta_calc =(3/ phi_app (2) ) *((1/ tanh ( phi_app (2) ) ) -(1/
phi_app (2) ) ) ;
32 eff_rate =(1 - eta_graph ) *100;
33
34 //OUTPUT
35 mprintf ( \n The e f f e c t i v e n e s s from g r a p h = %0 . 2 f \n
The c a l c u l a t e d e f f e c t i v e n e s s = %0 . 2 f , eta_graph ,
eta_calc ) ;
36 mprintf ( \n The p o r e d i f f u s i o n d e c r e a s e d t h e r a t e by

45
%. 0 f%% , eff_rate ) ;
37
38 // FILE OUTPUT
39 fid = mopen ( . \ Chapter4 Ex3Output . t x t , w ) ;
40 mfprintf ( fid , \n The e f f e c t i v e n e s s from g r a p h = %0 . 2
f \n The c a l c u l a t e d e f f e c t i v e n e s s = %0 . 2 f ,
eta_graph , eta_calc ) ;
41 mfprintf ( fid , \n The p o r e d i f f u s i o n d e c r e a s e d t h e
r a t e by %. 0 f%% , eff_rate ) ;
42 mclose ( fid ) ;
43 //
==============================================================
END OF PROGRAM===============================

Scilab code Exa 4.4 Effectiveness factor for solid catalyzed reaction

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . USA , pp 4 3 6 .
2 // Chapter 4 Ex4 . 4 Pg No . 1 5 7
3 // T i t l e : E f f e c t i v e n e s s f a c t o r f o r s o l i d c a t a l y z e d
reaction
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 D_e_A =0.02; // ( cm2/ s )
9 D_e_B =0.03; // ( cm2/ s )
10 D_e_C =0.015; // ( cm2/ s )
11 X_f_A =0.3;
12 X_f_B =(1 - X_f_A ) ;
13 eta_assumed =0.68; // E f f e c t i v e n e s s f a c t o r from F i g . 4 . 8

46
for f i r s t order reaction
14 T =150; // ( deg C)
15 T_K = T +273; // (K)
16 r =0.3; // ( cm ) R a d i u s o f c a t a l y s t s p h e r e
17 P_opt =4; // ( atm ) O p e r a t i n g P r e s s u r e
18 R =82.056; // ( cm3 atm /K mol ) Gas c o n s t a n t
19
20
21 //CALCULATION
22 // K i n e t i c e q u a t i o n r= ( 2 . 5 1 0 5 P AP B ) / ( 1 + 0 . 1 P A
+2P C ) 2
23 P_A = X_f_A * P_opt ;
24 P_B = X_f_B * P_opt ;
25 r_star =(2.5*10^ -5* P_A * P_B ) /(1+0.1* P_A ) ^2;
26 C_A = P_A /( R * T_K ) ;
27 k = r_star / C_A ;
28 Phi = r *( k / D_e_A ) ^(0.5) ;
29 P_A_bar = eta_assumed * P_A ;
30 delta_P_A = P_A *(1 - eta_assumed ) ;
31 delta_P_B = delta_P_A *( D_e_A / D_e_B ) ;
32 P_B_bar = P_B - delta_P_B ;
33 delta_P_C = delta_P_A *( D_e_A / D_e_C ) ;
34 P_C_bar = delta_P_C ;
35 r_calc =(2.5*10^ -5* P_A_bar * P_B_bar ) /(1+0.1* P_A_bar +2*
P_C_bar ) ^2
36 eta_calc = r_calc / r_star ;
37 eta_approx =( eta_calc + eta_assumed ) /2;
38
39 //OUTPUT
40 // C o n s o l e Output
41 mprintf ( \ t B a s e d on a v e r a g e p r e s s u r e s c a l c u l a t e d
Rate and E f f e c t i v e n e s s f a c t o r ) ;
42 mprintf ( \n\ t r : %0 . 2 E ( mol / s cm3 ) , r_calc ) ;
43 mprintf ( \n\ t e t a c a l c : %0 . 3 f , eta_calc ) ;
44 mprintf ( \n The a c t u a l v a l u e o f E f f e c t i v e n e s s f a c t o r
e t a a c t u a l : %0 . 1 f , eta_approx ) ;
45
46 // F i l e Output

47
47 fid = mopen ( . \ Chapter4 Ex4Output . t x t , w ) ;
48 mfprintf ( fid , \ t B a s e d on a v e r a g e p r e s s u r e s
c a l c u l a t e d Rate and E f f e c t i v e n e s s f a c t o r ) ;
49 mfprintf ( fid , \n\ t r : %0 . 2 E ( mol / s cm3 ) , r_calc ) ;
50 mfprintf ( fid , \n\ t e t a c a l c : %0 . 3 f , eta_calc ) ;
51 mfprintf ( fid , \n The a c t u a l v a l u e o f E f f e c t i v e n e s s
f a c t o r e t a a c t u a l : %0 . 1 f , eta_approx ) ;
52 mclose ( fid ) ;
53 //================================================
END OF PROGRAM
==================================================================

Scilab code Exa 4.5 The optimum pore size distribution for a spherical
pellet

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 4 Ex4 . 5 Pg No . 164
3 // T i t l e : The optimum p o r e s i z e d i s t r i b u t i o n f o r a
spherical pellet
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 d_pellet =5*10^ -1; // C a t a l y s t p e l l e t s i z e ( cm )
9 k_cat =3.6; // True Rate C o n s t a n t ( s e c 1)
10 V_g_cat =0.60 ; // Pore Volume o f t h e c a t a l y s t ( cm3/ g )
11 S_g_cat =300*10^4; // S u r f a c e a r e a o f c a t a l y s t ( cm2/ g )
12 dp =0.02; // S i z e o f powdered c a t a l y s t ( cm )
13 rho_p =0.8 ; // D e n s i t y o f c a t a l y s t p a r t i c l e ( g /cm3 )

48
14 r_bar_narrow = 40*10^( -10) // n a r r o w d i s t r i b u t i o n
15 D_KA =0.012 ; // ( cm2/ s e c )
16 D_AB = 0.40 ; // ( cm2/ s e c )
17 r_macro =2000*10^( -10) ; // For M a c r o p o r e s
18 V_cat =1/ rho_p ; // T o t a l c a t a l y s t volume ( cm3/ g )
19 eta =1; // For powdered c a t a l y s t
20
21 //CALCULATION
22 epsilon = V_g_cat / V_cat ;
23 r_bar =2* V_g_cat / S_g_cat ;
24 R = dp /2;
25 R_pellet = d_pellet /2;
26 D_pore_a =1/((1/ D_KA ) +(1/ D_AB ) ) ;
27 tau =3; // Assumed v a l u e
28 D_e_cat = D_pore_a * epsilon / tau ;
29 Phi_app = R * sqrt ( k_cat / D_e_cat ) ; // R e f e r e q u a t i o n 4 . 5 5
Pg . No . 153
30 D_KB = D_KA *( r_macro / r_bar_narrow ) ;
31 D_pore_b =1/((1/ D_KB ) +(1/ D_AB ) ) ;
32 V_a_end =0.35;
33 del_V_a = -0.05;
34 V_a = V_g_cat : del_V_a : V_a_end ;
35 for i =1:6
36 V_b ( i ) = V_g_cat - V_a ( i ) ; // R e f e r E q u a t i o n 4 . 8 1 Pg .
No . 164
37 S_a ( i ) =2*( V_a ( i ) / r_bar_narrow ) *(10^ -6) ;
38 S_b ( i ) =2*( V_b ( i ) / r_macro ) *(10^ -6) ;
39 S_g ( i ) = S_a ( i ) + S_b ( i ) ;
40 k ( i ) = k_cat * S_g ( i ) /( S_g_cat *10^ -4) ;
41 D_e ( i ) =(( D_pore_a * V_a ( i ) + D_pore_b * V_b ( i ) ) /
V_g_cat ) *( epsilon / tau ) ;
42 phi ( i ) = R_pellet * sqrt ( k ( i ) / D_e ( i ) ) ;
43 eta ( i ) =(3/ phi ( i ) ) *((1/ tanh ( phi ( i ) ) ) -(1/ phi ( i ) ) )
;
44 eta_k ( i ) = eta ( i ) * k ( i )
45 end
46 //OUTPUT
47 mprintf ( \n

49
=================================================================
)
48 mprintf ( \ nV a \ t V b \ t \ t S a \t S b \t S g \
t k \t D e \t phi \ t e t a \ t e t a k );
49 mprintf ( \ nVolume \ t cm3/ g \ t \ t S u r f a c e Area \ t m2/
g \ t \ t s 1 \ t cm2/ s \ t ( ) \ t ( ) \ t ( ) ) ;
50 mprintf ( \n
================================================================
)
51 for i =1:6
52 mprintf ( \n %. 2 f \ t %0 . 2 f \ t \ t %. 0 f \ t %. 1 f
\ t %0 . 1 f \ t \ t %0 . 2 f \ t%0 . 2 e \ t%0 . 2 f \ t
%0 . 2 f \ t %0 . 2 f , V_a ( i ) , V_b ( i ) , S_a ( i ) , S_b
( i ) , S_g ( i ) ,k ( i ) , D_e ( i ) , phi ( i ) , eta ( i ) ,
eta_k ( i ) ) ;
53 end
54
55 // FILE OUTPUT
56 fid = mopen ( . \ Chapter4 Ex5Output . t x t , w ) ;
57 mfprintf ( fid , \n
=================================================================
)
58 mfprintf ( fid , \ nV a \ t V b \ t \ t S a \t S b \t
S g \t k \t D e \t phi \ t e t a \ t e t a k );
59 mfprintf ( fid , \ nVolume \ t cm3/ g \ t \ t S u r f a c e Area \
t m2/ g \ t \ t s 1 \ t cm2/ s \ t ( ) \ t ( ) \ t
( ) ) ;
60 mfprintf ( fid , \n
================================================================
)
61 for i =1:6
62 mfprintf ( fid , \n %. 2 f \ t %0 . 2 f \ t \ t %. 0 f \ t
%. 1 f \ t %0 . 1 f \ t \ t %0 . 2 f \ t%0 . 2 e \ t%0 . 2 f
\ t %0 . 2 f \ t %0 . 2 f , V_a ( i ) , V_b ( i ) , S_a ( i )
, S_b ( i ) , S_g ( i ) ,k ( i ) , D_e ( i ) , phi ( i ) , eta ( i )
, eta_k ( i ) ) ;
63 end
64 //

50
==============================================================
END OF PROGRAM
===================================================

51
Chapter 5

Heat and Mass Transfer in


Reactors

Scilab code Exa 5.1 Temperature Profiles for tubular reactor

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . USA , pp 436
2 // Chapter 5 Ex5 . 1 Pg No . 185
3 // T i t l e : T e m p e r a t u r e P r o f i l e s f o r t u b u l a r r e a c t o r
4 //
==================================================================

5 clear
6 clc
7 clf
8 //INPUT
9 delta_H = -25000; // ( k c a l / mol ) E n t h a l p y
10 D =2; // ( cm ) D i a m e t e r o f T u b u l a r R e a c t o r
11 C_A0 =0.002; // ( mol /cm3 ) I n i t i a l c o n c e n t r a t i o n o f f e e d
12 k =0.00142; // ( s 1) Rate C o n s t a n t

52
13 E_by_R =15000; // (K1)
14 rho =0.8; // ( g /cm3 )
15 c_p = 0.5; // ( c a l / g C )
16 U =0.025; // ( c a l / s e c c m 2 C )
17 u =60; // ( cm/ s )
18
19
20 //CALCULATION
21 function diffeqn = Simul_diff_eqn (l ,y , T_j )
22 diffeqn (1) =( k * exp ( E_by_R *((1/ T_initial ) -(1/ y (2)
) ) ) ) *(1 - y (1) ) / u ; // D e r i v a t i v e f o r t h e f i r s t
variable
23 diffeqn (2) =( C_A0 *( k * exp ( E_by_R *((1/ T_initial )
-(1/ y (2) ) ) ) ) *(1 - y (1) ) *( -1* delta_H ) -U *(4/ D ) *( y
(2) - T_j ) ) /( u * rho * c_p ) ; // D e r i v a t i v e f o r t h e
second v a r i a b l e
24 endfunction
25
26 // =======================================
27
28 T_j_data = [ 348 349 350 351];
29 m = length ( T_j_data ) ;
30 n = 1;
31 while n <= m
32 T_j = T_j_data ( n )
33 T_initial =340; // f o r r a t e c o n s t a n t
34 x0 =0;
35 T0 =344;
36 l0 =0;
37 l =0:0.1 E2 :70 E2 ;
38 y = ode ([ x0 ; T0 ] , l0 ,l , list ( Simul_diff_eqn , T_j ) ) ;
39 x_data (n ,:) = y (1 ,:) ;
40 T_data (n ,:) = y (2 ,:) ;
41 n = n + 1;
42 end
43 // ================================
44 scf (0)
45 plot (l , T_data (1 ,:) , r ,l , T_data (2 ,:) , b ,l , T_data

53
(3 ,:) , k ,l , T_data (4 ,:) , g )
46 xtitle ( T e m p e r a t u r e P r o f i l e s f o r a j a c k e t e d tubular
reactor )
47 xlabel ( Length ( cm ) )
48 ylabel ( T e m p e r a t u r e (K) )
49 legend ([ 348 ; 349 ; 350 ; 351 ]) ;
50
51 scf (1)
52 plot (l , x_data (1 ,:) , r ,l , x_data (2 ,:) , b ,l , x_data
(3 ,:) , k ,l , x_data (4 ,:) , g )
53 xtitle ( C o n v e r s i o n f o r a j a c k e t e d tubular reactor
);
54 xlabel ( Length ( cm ) )
55 ylabel ( C o n v e r s i o n )
56 legend ([ 348 ; 349 ; 350 ; 351 ]) ;
57
58 //OUTPUT
59 mprintf ( \n The T e m p e r a t u r e p r o f i l e s f o r f o u r f e e d
t e m p e r a t u r e s a r e p l o t t e d );
60 mprintf ( \n For T0 : 3 4 8 K a t t a i n s i t s maximum
t e m p e r a t u r e a t c o n v e r s i o n o f a b o u t 25%%30%% ) ;
61 mprintf ( \n At T0 : 3 5 1 K t h e t e m p e r a t u r e i n c r e a s e s by
6.5 C high s e n s t i v i t y that the r e a c t o r i s
n e a r i n g u n s t a b l e );
62
63 // FILE OUTPUT
64 fid = mopen ( . \ Chapter5 Ex1Output . t x t , w ) ;
65 mfprintf ( fid , \n The T e m p e r a t u r e p r o f i l e s f o r four
f e e d t e m p e r a t u r e s a r e p l o t t e d . );
66 mfprintf ( fid , \n For T0 : 3 4 8 K a t t a i n s i t s maximum
t e m p e r a t u r e a t c o n v e r s i o n o f a b o u t 25%%30%% ) ;
67 mfprintf ( fid , \n At T0 : 3 5 1 K t h e t e m p e r a t u r e
i n c r e a s e s by 6 . 5 C h i g h s e n s t i v i t y t h a t t h e
r e a c t o r i s n e a r i n g u n s t a b l e );
68 mclose ( fid ) ;
69
70 //
===================================================

54
END OF PROGRAM
======================================================

Scilab code Exa 5.2 Maximum internal temperature difference

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 5 Ex5 . 2 Pg No . 194
3 // T i t l e : Maximum i n t e r n a l t e m p e r a t u r e d i f f e r e n c e
4 //
==================================================================

5 clear
6 format (16)
7 clc
8 //INPUT
9 T_C =200; // T e m p e r a t u r e ( C )
10 P =1.2; // P r e s s u r e ( atm )
11 f_ethylene =0.05; // f r a c t i o n o f e t h y l e n e
12 k_s =8*10^( -4) ; // S o l i d c o n d u c t i v i t y ( c a l / s e c c m C )
13 D_e =0.02; // D i f f u s i v i t y f o r e t h y l e n e ( cm2/ s )
14 del_H = -32.7*10^(3) ; // Heat o f r e a c t i o n ( c a l )
15 V_ref =22400; // r e f e r e n c e volume ( cm3 )
16 T_ref =273; // R e f e r e n c e T e m p e r a t u r e (K)
17 P_ref =1; // R e f e r e n c e P r e s s u r e ( atm )
18 T_K = T_C +273; // R e a c t i o n T e m p e r a t u r e (K)
19
20 //CALCULATION
21 C_s = f_ethylene * P * T_ref /( V_ref * T_K * P_ref ) ;
22 Tc_minus_Ts = D_e * C_s *( - del_H ) / k_s ; // R e f e r e q u a t i o n
5 . 5 1 Pg No . 194
23

55
24 //OUTPUT
25 mprintf ( \n\ tThe maximum i n t e r n a l t e m p e r a t u r e
d i f f e r e n c e %0 . 3 f C , Tc_minus_Ts ) ;
26
27 // FILE OUTPUT
28 fid = mopen ( . \ Chapter5 Ex2Output . t x t , w ) ;
29 mfprintf ( fid , \n\ tThe maximum i n t e r n a l t e m p e r a t u r e
d i f f e r e n c e %0 . 3 f C , Tc_minus_Ts ) ;
30 mclose ( fid ) ;
31
32 //
=====================================================
END OF PROGRAM
=================================================

Scilab code Exa 5.3 Overall heat transfer coefficients and radial average
bed temperature for packed bed reactor

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 5 Ex5 . 3 Pg No . 209
3 // T i t l e : O v e r a l l h e a t t r a n s f e r c o e f f i c i e n t s and
r a d i a l a v e r a g e bed t e m p e r a t u r e f o r p a c k e d bed
reactor
4 //
==================================================================

5 clear
6 clc
7
8 // COMMON INPUT
9 k_s = 8*10^( -4) ; // ( c a l / s e c c m C )
10 M_air_avg =29.24; // A v e r a g e M o l e c u l a r w e i g h t o f air

56
11 Cp_air_mol =7.91; // c a l / m o l C ;
12 Cp_air_g = Cp_air_mol / M_air_avg ; // c a l / g C
13 dp =0.4; // S i z e o f t h e c a t a l y s t p e l l e t ( cm )
14 D =3.8; // D i a m e t e r o f t u b e ( cm )
15 R_pellet = D /2; // R a d i u s
16 f_EO =0.7; // F r a c t i o n of ethylene forming ethylene
oxide
17 f_CO2_H2O =1 - f_EO ; // F r a c t i o n o f e t h y l e n e f o r m i n g CO2
and H2O
18 rho_p =2.5; // D e n s i t y o f c a t a l y s t p a r t i c l e ( g /cm3 )
19 V_ref =22400; // R e f e r e n c e volume ( cm3 )
20 T_ref =273; // R e f e r e n c e T e m p e r a t u r e (K)
21 P_ref =1; // R e f e r e n c e P r e s s u r e ( atm )
22 P =5; // System P r e s s u r e ( atm )
23 T_C =230; // System T e m p e r a t u r e ( C )
24 T = T_C +273; // System T e m p e r a t u r e (K)
25 u_ft =[1.5 3]; // V e l o c i t y ( f t / s )
26 myu =0.026*(10^( -2) ) ; // V i s c o s i t y o f a i r ( P o i s e )
27 M_wt =[28 32 44 28]; // M o l e c u l a r w e i g h t
28 M_fraction =[0.04 0.07 0.06 0.83];
29 Cp =[15.3 7.4 10.7 7.4]; // ( c a l / m o l C )
30 k_g =9.27*10^( -5) ; // ( c a l / s e c c m C )
31 del_H_rxn =[ -29.9 -317]; // ( k c a l / mol )
32 E =18*1000; // A c t i v a t i o n Energy ( c a l )
33 R =1.987; // Gas C o n s t a n t ( c a l /K . mol )
34
35 //CALCULATION ( Ex5 . 3 . a )
36 rho = M_air_avg * P * T_ref /( V_ref * P_ref * T ) ;
37 u =30.533.* u_ft ; // V e l o c i t y i n ( cm/ s )
38 Re_p =( rho * dp / myu ) .* u ;
39 Pr = Cp_air_g * myu / k_g ;
40 ks_by_kg = k_s / k_g ;
41 k0e_by_kg =3.5; // From f i g u r e 5 . 1 6 Pg . No . 203
42 kr_by_kg =2.5; // From e q u a t i o n 5 . 6 8 and 5 . 6 9 Pg . No .
204
43 for i =1:2
44 ktd_by_k_air ( i ) =(0.1* Pr ) * Re_p ( i ) ;
45 ke_by_kg ( i ) =( k0e_by_kg + kr_by_kg ) + ktd_by_k_air ( i ) ;

57
46 k_e ( i ) = ke_by_kg ( i ) * k_g ;
47 h_bed ( i ) =4* k_e ( i ) / R_pellet ;
48 Nu_w ( i ) =(1.94* Pr ^(0.33) ) * Re_p ( i ) ^(0.5) ; // R e f e r
equation 5.83 Pg . No . 208
49 h_w ( i ) =( k_g / dp ) * Nu_w ( i ) ; // ( c a l / s e c cm2 K)
50 h_j =100*10^( -3) ; // Assumed
51 U ( i ) =1/((1/ h_j ) +(1/ h_w ( i ) ) +(1/ h_bed ( i ) ) ) ;
52 end
53
54 //CALCULATION ( Ex5 . 3 . b )
55 minus_delH = f_EO *( - del_H_rxn (1) ) + f_CO2_H2O *( -
del_H_rxn (2) ) ;
56 T_max = T +20;
57 del_Tc = R *( T_max ) ^2/ E ;
58 T_new =250 +273;
59 X_E =0.1;
60 k250_by_k230 = exp (( E / R ) *((1/ T ) -(1/ T_new ) ) ) ;
61 P_E = P *(1 - X_E ) * M_fraction (1) ;
62 P_O2 = P *(1 - f_EO * X_E ) * M_fraction (2) ;
63 P_CO2 = P *(1+ f_CO2_H2O * X_E ) * M_fraction (3) ;
64 r = k250_by_k230 *((0.076* P_E * P_O2 ) /(1+2* P_E +15* P_CO2 ) )
;
65 Q_dash = r * minus_delH *10^3/3600;
66 epsilon =0.4;
67 rho_bed = rho_p *(1 -0.4) ;
68 A_percm3 =4/ D ;
69 Q =( Q_dash * rho_bed )
70 for i =1:2
71 delta_T ( i ) =( Q / A_percm3 ) *(1/ U ( i ) ) ;
72 end
73
74 //OUTPUT ( ( Ex5 . 3 . a ) )
75 mprintf ( \n OUTPUT Ex5 . 3 . a ) ;
76 mprintf ( \n
==========================================================
)
77 mprintf ( \ nThe O v e r a l l Heat t r a n s f e r c o e f f i c i e n t f o r
given V e l o c i t i e s )

58
78 mprintf ( \n
==========================================================
)
79 mprintf ( \n u ( v e l o c i t y ) U)
80 mprintf ( \n ( f t / s ) ( c a l /cm2 s e c K) )
81 mprintf ( \n
==========================================================
)
82 for i =1:2
83 mprintf ( \n %0 . 1 f %3E , u_ft ( i ) ,U ( i ) )
84 end
85
86 //OUTPUT ( ( Ex5 . 3 . b )
87 mprintf ( \n\n\n OUTPUT Ex5 . 3 . b ) ;
88 mprintf ( \n
==========================================================
)
89 mprintf ( \ nThe Peak R a d i a l a v e r a g e bed t e m p e r a t u r e
for given V e l o c i t i e s )
90 mprintf ( \n
==========================================================
)
91 mprintf ( \n u ( v e l o c i t y ) delta T )
92 mprintf ( \n ( f t / s ) ( C ) )
93 mprintf ( \n
==========================================================
)
94 for i =1:2
95 mprintf ( \n %0 . 1 f \ t \ t %0 . 0 f , u_ft ( i ) ,
delta_T ( i ) )
96 end
97
98 // FILE OUTPUT
99 fid = mopen ( . \ Chapter5 Ex3Output . t x t , w ) ;
100 mfprintf ( fid , \n OUTPUT Ex5 . 3 . a ) ;
101 mfprintf ( fid , \n
==========================================================
)

59
102 mfprintf ( fid , \ nThe O v e r a l l Heat t r a n s f e r
c o e f f i c i e n t for given V e l o c i t i e s )
103 mfprintf ( fid , \n
==========================================================
)
104 mfprintf ( fid , \n u ( v e l o c i t y ) U)
105 mfprintf ( fid , \n ( f t / s ) ( c a l /cm2 s e c K) )
106 mfprintf ( fid , \n
==========================================================
)
107 for i =1:2
108 mfprintf ( fid , \n %0 . 1 f %3E , u_ft ( i ) ,U ( i ) )
109 end
110 mfprintf ( fid , \n\n\n OUTPUT Ex5 . 3 . b ) ;
111 mfprintf ( fid , \n
==========================================================
)
112 mfprintf ( fid , \ nThe Peak R a d i a l a v e r a g e bed
temperature f o r given V e l o c i t i e s )
113 mfprintf ( fid , \n
==========================================================
)
114 mfprintf ( fid , \n u ( v e l o c i t y ) delta T )
115 mfprintf ( fid , \n ( f t / s ) ( C ) )
116 mfprintf ( fid , \n
==========================================================
)
117 for i =1:2
118 mfprintf ( fid , \n %0 . 1 f \ t \ t %0 . 0 f , u_ft ( i ) ,
delta_T ( i ) )
119 end
120 mclose ( fid ) ;
121 //===============================================END
OF PROGRAM
=======================================================

60
Chapter 6

Nonideal Flow

Scilab code Exa 6.1 Power Consumption at 300 rpm speed of stirrer and
blending time

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( I
E d i t i o n ) , M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 6 Ex6 . 1 Pg No . 2 3 6
3 // T i t l e : Power Consumption a t 300 rpm , s p e e d o f
s t i r r e r and b l e n d i n g t i m e
4 //
==================================================================

5 clear
6 clc
7 // COMMON INPUT
8 D_a =0.1;
9 D_t =0.3;
10 H =0.3;
11 N_P =5.5;
12 rho =1000;
13 n =5;
14 S_f =6; // S c a l e up f a c t o r i n d i a m e t e r

61
15 P_by_V_limit =10; // P r e s s u r e p e r u n i t volume (HP/ 1 0 0 0
gal )
16 n1 =5;
17 Da_by_Dt1 = D_a / D_t ;
18 Da_by_Dt2 =0.5;
19
20 //CALCULATION ( Ex6 . 1 . a )
21 P_unit_vol =( N_P * n ^3* D_a ^5) /( %pi *(1/4) * D_t ^2* H ) ;
22 P_thousand_gal = P_unit_vol *5.067;
23 t =(4/ n ) *( D_t / D_a ) ^2*( H / D_t ) ;
24 P_unit_vol_new = S_f ^2* P_thousand_gal ;
25
26 //CALCULATION ( Ex6 . 1 . b )
27 n_limit =( P_by_V_limit / P_unit_vol_new ) ^(1/3) * n1 ; //
P r e s s u r e p e r u n i t v o l p r o p o t i o n a l t o n3
28 t_inc_factor = n1 / n_limit ; // t i n v e r s e l y p r o p o t i o n a l t o
n
29 rotational_speed = n_limit *60; // Speed i n rpm
30
31 //CALCULATION ( Ex6 . 1 . c )
32 n2 =( Da_by_Dt1 / Da_by_Dt2 ) ^(5/3) * n_limit ;
33 rotaional_speed = n2 *60;
34 t1 =4*(1/ Da_by_Dt1 ) ^2*( H / D_t ) *(1/ n_limit ) ;
35 t2 =4*(1/ Da_by_Dt2 ) ^2*( H / D_t ) *(1/ n2 ) ;
36
37 //OUTPUT ( Ex6 . 1 . a )
38 mprintf ( \n OUTPUT Ex6 . 1 . a ) ;
39 mprintf ( \n
==========================================================
);
40 mprintf ( \n The Power c o n s u m p t i o n p e r u n i t volume a t
300 rpm = %. 2 f HP/ 1 0 0 0 g a l , P_thousand_gal ) ;
41 mprintf ( \n\ The Power c o n s u m p t i o n s c a l i n g up
s i x f o l d i n d i a m e t e r = %. 0 f HP/ 1 0 0 0 g a l ,
P_unit_vol_new ) ;
42
43
44 //OUTPUT ( Ex6 . 1 . b )

62
45 mprintf ( \n\n\n OUTPUT Ex6 . 1 . b ) ;
46 mprintf ( \n
==========================================================
);
47 mprintf ( \n The s p e e d o f t h e s t i r r e r = %. 2 f s e c 1
o r %. 0 f rpm , n_limit , rotational_speed ) ;
48 mprintf ( \n B l e n d i n g t i m e i n c r e a s e s by f a c t o r o f %. 2
f , t_inc_factor ) ;
49
50 //OUTPUT( Ex6 . 1 . c )
51 mprintf ( \n\n\n OUTPUT Ex6 . 1 . c ) ;
52 mprintf ( \n
==========================================================
);
53 mprintf ( \n The new s t i r r e r s p e e d = %. 2 f s e c 1 o r %
. 0 f rpm ,n2 , rotaional_speed ) ;
54 mprintf ( \n The new b l e n d i n g t i m e f o r Da/Dt r a t i o
o f 0 . 5 = %. 1 f s e c , t2 ) ;
55
56 // FILE OUTPUT
57 fid = mopen ( . \ Chapter6 Ex1Output . t x t , w ) ;
58 mfprintf ( fid , \n OUTPUT Ex6 . 1 . a ) ;
59 mfprintf ( fid , \n
==========================================================
);
60 mfprintf ( fid , \n The Power c o n s u m p t i o n p e r u n i t
volume a t 300 rpm = %. 2 f HP/ 1 0 0 0 g a l ,
P_thousand_gal ) ;
61 mfprintf ( fid , \n\ The Power c o n s u m p t i o n s c a l i n g up
s i x f o l d i n d i a m e t e r = %. 0 f HP/ 1 0 0 0 g a l ,
P_unit_vol_new ) ;
62 mfprintf ( fid , \n\n\n OUTPUT Ex6 . 1 . b ) ;
63 mfprintf ( fid , \n
==========================================================
);
64 mfprintf ( fid , \n The s p e e d o f t h e s t i r r e r = %. 2 f
s e c 1 o r %. 0 f rpm , n_limit , rotational_speed ) ;
65 mfprintf ( fid , \n B l e n d i n g t i m e i n c r e a s e s by f a c t o r

63
o f %. 2 f , t_inc_factor ) ;
66 mfprintf ( fid , \n\n\n OUTPUT Ex6 . 1 . c ) ;
67 mfprintf ( fid , \n
==========================================================
);
68 mfprintf ( fid , \n The new s t i r r e r s p e e d = %. 2 f s e c 1
o r %. 0 f rpm ,n2 , rotaional_speed ) ;
69 mfprintf ( fid , \n The new b l e n d i n g t i m e f o r Da/Dt
r a t i o o f 0 . 5 = %. 1 f s e c , t2 ) ;
70 mclose ( fid ) ;
71 //
======================================================
END OF PROGRAM
=================================================
72 // D i s c l a i m e r : I n Ex6 . 1 . c t h e r e i s an a r i t h e m a t i c
e r r o r i n t h e v a l u e o f D a / D t . The v a l u e o f D a /
D t s h o u l d be 1 1 . 4 i n s t e a d o f t h e v a l u e r e p o r t e d
in the textbook f o r D a/D t =11.1.

Scilab code Exa 6.2 Effect of diffusion on conversion for laminar flow

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( I
E d i t i o n ) , M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 6 Ex6 . 2 Pg No . 239
3 // T i t l e : E f f e c t o f d i f f u s i o n on c o n v e r s i o n f o r
laminar flow
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 D =1*10^( -2) ; // D i a m e t e r o f p i p e l i n e (m)

64
9 R = D /2; // R a d i u s (m)
10 D_m =10^( -4) ; // D i f f u s i v i t y (m2/ s e c )
11 k =1; // R e a c t i o n r a t e c o n s t a n t ( s e c 1)
12
13
14 //CALCULATION
15 alpha = D_m /( k *( R ^2) ) ; // R e f e r t o p i c ( D i f f u s i o n in
l a m i n a r f l o w r e a c t o r s ) Pg No . 2 3 9
16
17
18 //OUTPUT
19 if ( alpha <=0.01)
20 then
21 mprintf ( \n The e f f e c t o f r a d i a l d i f f u s i o n on
c o n v e r s i o n can be n e g l e c t e d a s a l p h a = %. 0 f ,
alpha )
22 else
23 mprintf ( \n The e f f e c t o f r a d i a l d i f f u s i o n makes
c o n v e r s i o n a l m o s t a s same a s p l u g f l o w a s
a l p h a = %. 0 f , alpha )
24 end
25
26 // FILE OUTPUT
27 fid = mopen ( . \ Chapter6 Ex2Output . t x t , w ) ;
28 if ( alpha <=0.01)
29 then
30 mfprintf ( fid , \n The e f f e c t o f r a d i a l d i f f u s i o n
on c o n v e r s i o n can be n e g l e c t e d a s a l p h a = %
. 0 f , alpha )
31 else
32 mfprintf ( fid , \n The e f f e c t o f r a d i a l d i f f u s i o n
makes c o n v e r s i o n a l m o s t a s same a s p l u g f l o w
a s a l p h a = %. 0 f , alpha )
33 end
34 mclose ( fid ) ;
35 //================================================
END OF PROGRAM
========================================================

65
Scilab code Exa 6.3 Effect of Axial dispersion and length on conversion

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( I
E d i t i o n ) , M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 6 Ex6 . 3 Pg No . 248
3 // T i t l e : E f f e c t o f A x i a l d i s p e r s i o n and l e n g t h on
conversion
4 //
==================================================================

5 clear
6 clc
7 // COMMON INPUT
8 u =1; // S u p e r f i c i a l v e l o c i t y ( cm/ s )
9 D =2*10^( -5) // M o l e c u l a r D i f f u s i v i t y ( cm2/ s )
10 Re =30; // R e y n o l d s No .
11 Pe_a =0.25; // P e c l e t No . c o r r e s p o n d i n g Re No . from F i g
6.10
12 dp =3*(10^ -1) ; // P a r t i c l e S i z e ( cm )
13 L =48; // Length o f t h e bed ( cm )
14 X_A =0.93; // C o n v e r s i o n
15 L_old =48; // Old bed l e n g t h ( cm )
16 L_new = L_old /2; //New bed l e n g t h ( cm )
17
18
19
20 //CALCULATION ( Ex6 . 3 . a )
21 Pe_dash = Pe_a * L / dp ; // R e f e r Pg . No . 2 4 7
22 one_minus_X_A =(1 - X_A ) ;
23 k_rho_L_by_u1 =2.65; // From F i g 6 . 1 2 f o r g i v e n Pe dash
24 X_A1 =1 - exp ( - k_rho_L_by_u1 ) ;

66
25 //To i n c r e a s e t h e c o n v e r s i o n more c a t a l y s t i s n e e d e d
26 k_rho_L_by_u2 =2.85; // From F i g 6 . 1 2
27 X_A2 =1 - exp ( - k_rho_L_by_u2 ) ;
28 Percentage_excess_cat_a =(( k_rho_L_by_u2 -
k_rho_L_by_u1 ) / k_rho_L_by_u1 ) *100;
29
30 //CALCULATION( Ex6 . 3 . b )
31 k_rho_L_by_u_new = k_rho_L_by_u1 /2;
32 X_A_cal =(1 - exp ( - k_rho_L_by_u_new ) ) ; // C a l c u l a t e d
conversion
33 Pe_dash_new = Pe_dash /2;
34 k_rho_L_by_u_graph =1.3992; // V a l u e o b t a i n e d from
Figure6 .12 f o r the c a l c u l a t e d conversion
35 Percentage_excess_cat_b =(( k_rho_L_by_u_graph -
k_rho_L_by_u_new ) / k_rho_L_by_u_new ) *100;
36
37 //OUTPUT( Ex6 . 3 . a )
38 mprintf ( \n OUTPUT Ex6 . 3 . a ) ;
39 mprintf ( \n
==========================================================
);
40 mprintf ( \n The e f f e c t o f a x i a l d i s p e r s i o n i s
s i g n i f i c a n t and t h e p e r c e n t a g e e x c e s s o f c a t a l y s t
= %. 0 f%% , Percentage_excess_cat_a ) ;
41
42 //OUTPUT ( Ex6 . 3 . b )
43 mprintf ( \n\n\n OUTPUT Ex6 . 3 . b ) ;
44 mprintf ( \n
==========================================================
);
45 mprintf ( \n The e f f e c t o f a x i a l d i s p e r s i o n i s l e s s
on r e d u c i n g t h e bed l e n g t h \n The p e r c e n t a g e
e x c e s s o f c a t a l y s t = %. 0 f%% ,
Percentage_excess_cat_b ) ;
46
47 // FILE OUTPUT
48 fid = mopen ( . \ Chapter6 Ex3Output . t x t , w ) ;
49 mfprintf ( fid , \n OUTPUT Ex6 . 3 . a ) ;

67
50 mfprintf ( fid , \n
==========================================================
);
51 mfprintf ( fid , \n The e f f e c t o f a x i a l d i s p e r s i o n i s
s i g n i f i c a n t and t h e p e r c e n t a g e e x c e s s o f c a t a l y s t
= %. 0 f%% , Percentage_excess_cat_a ) ;
52 mfprintf ( fid , \n\n\n OUTPUT Ex6 . 3 . b ) ;
53 mfprintf ( fid , \n
==========================================================
);
54 mfprintf ( fid , \n The e f f e c t o f a x i a l d i s p e r s i o n i s
l e s s on r e d u c i n g t h e bed l e n g t h \n The p e r c e n t a g e
e x c e s s o f c a t a l y s t = %. 0 f%% ,
Percentage_excess_cat_b ) ;
55 mclose ( fid ) ;
56 //==============================================END
OF PROGRAM
=========================================================

Scilab code Exa 6.4 Conversion in packed bed for same superficial veloc-
ity

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( I
E d i t i o n ) , M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 6 Ex6 . 4 Pg No . 2 5 1
3 // T i t l e : C o n v e r s i o n i n p a c k e d bed f o r same
superficial velocity
4 //
==================================================================

5 clear
6 clc

68
7 //COMMON INPUT
8 L =2.5; // Lendth o f bed ( f t )
9 X_A =0.95; // C o n v e r s i o n
10 L_a =3; // Length o f s e c t i o n a ( f t )
11 L_b =2; // Length o f s e c t i o n b ( f t )
12 u_oa_by_u0 =0.88; // R e f e r e q u a t i o n 3 . 6 4
13 u_ob_by_u0 =1.12;
14 L =2.5; // ( f t )
15
16
17 //CALCULATION ( Ex6 . 4 . a )
18 k_rho_L_by_u = log (1/(1 - X_A ) ) ; // F i r s t Order r e a c t i o n s
19 // For S e c t i o n a
20 k_rho_L_by_u_a = k_rho_L_by_u *( L_a / L ) ;
21 X_A_section_a =(1 - exp ( - k_rho_L_by_u_a ) ) ;
22 // For S e c t i o n b
23 k_rho_L_by_u_b = k_rho_L_by_u *( L_b / L ) ; // D i m e n s i o n l e s s
Group b a s e d on i d e a l p l u g f l o w f o r f i r s t o r d e r
reaction
24 X_A_section_b =(1 - exp ( - k_rho_L_by_u_b ) ) ;
25 X_A_Ave =( X_A_section_b + X_A_section_a ) /2;
26 Percent_X_A_Ave = X_A_Ave *100
27
28 //CALCULATION ( Ex6 . 4 . b )
29 k_rho_L_by_u = log (1/(1 - X_A ) ) ; // F i r s t Order r e a c t i o n
30 // For S e c t i o n a
31 k_rho_L_by_u_a = k_rho_L_by_u *( L_a / L ) *(1/ u_oa_by_u0 ) ;
32 X_A_section_a =(1 - exp ( - k_rho_L_by_u_a ) ) ;
33 delP_a_by_alpha_u0_pow = L_a *( u_oa_by_u0 ) ; // R e f e r
equation 3.64
34
35 // For S e c t i o n b
36 k_rho_L_by_u_b = k_rho_L_by_u *( L_b / L ) *(1/ u_ob_by_u0 ) ;
// D i m e n s i o n l e s s Group b a s e d on i d e a l p l u g f l o w
for f i r s t order reaction
37 delP_b_by_alpha_u0_pow = L_b * u_ob_by_u0 ;
38 X_A_section_b =(1 - exp ( - k_rho_L_by_u_b ) ) ;
39 X_A_avg =( u_oa_by_u0 * X_A_section_a + u_ob_by_u0 *

69
X_A_section_b ) /2;
40 Percent_X_A_avg = X_A_avg *100;
41
42 //OUTPUT( Ex6 . 4 . a )
43 mprintf ( \n OUTPUT Ex6 . 4 . a ) ;
44 mprintf ( \n
==========================================================
);
45 mprintf ( \ nThe a v e r a g e c o n v e r i o n when e a c h s e c t i o n
h a s same s u p e r f i c i a l v e l o c i t y : %0 . 1 f%% ,
Percent_X_A_Ave ) ;
46
47 //OUTPUT( Ex6 . 4 . b )
48 mprintf ( \n\n\n OUTPUT Ex6 . 4 . b ) ;
49 mprintf ( \n
==========================================================
);
50 mprintf ( \ nThe o v e r a l l c o n v e r s i o n f o r d i f f e r e n t
v e l o c i t i e s : %0 . 1 f%% , Percent_X_A_avg ) ;
51
52 // FILE OUTPUT
53 fid = mopen ( . \ Chapter6 Ex4Output . t x t , w ) ;
54 mfprintf ( fid , \n OUTPUT Ex6 . 4 . a ) ;
55 mfprintf ( fid , \n
==========================================================
);
56 mfprintf ( fid , \ nThe a v e r a g e c o n v e r i o n when e a c h
s e c t i o n h a s same s u p e r f i c i a l v e l o c i t y : %0 . 1 f%% ,
Percent_X_A_Ave ) ;
57 mfprintf ( fid , \n\n\n OUTPUT Ex6 . 4 . b ) ;
58 mfprintf ( fid , \n
==========================================================
);
59 mfprintf ( fid , \ nThe o v e r a l l c o n v e r s i o n f o r d i f f e r e n t
v e l o c i t i e s : %0 . 1 f%% , Percent_X_A_avg ) ;
60 mclose ( fid ) ;
61 //
=======================================================

70
END OF PROGRAM
=================================================

71
Chapter 7

Gas Liquid Reactions

Scilab code Exa 7.1 Overall Reaction Rate Coefficient Percent Resistance
Reaction Volume and Reactor Size

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 7 Ex7 . 1 Pg No . 2 6 0
3 // T i t l e : O v e r a l l R e a c t i o n Rate C o e f f i c i e n t , P e r c e n t
R e s i s t a n c e , R e a c t i o n Volume and R e a c t o r S i z e
4 //
==================================================================

5 clear
6 clc
7 // COMMON INPUT
8 k2 =8.5; // R e a c t i o n r a t e c o n s t a n t ( L/ mols e c )
9 T =50; // R e a c t i o n c o n d i t i o n t e m p e r a t u r e ( C )
10 P =2; // R e a c t i o n P r e s s u r e ( atm )
11 H_O2 =8*10^4; // S o l u b i l i t y ( atm / mol f r a c t i o n )
12 F =17000 // Feed r a t e ( L/ h r )
13 C_B_feed =1.6; // Feed c o n c e n t r a t i o n (M)
14 C_B_product =0.8; // P r o d u c t c o n c e n t r a t i o n (M)

72
15 k_L_a =900; // L i q u i d f i l m mass t r a n s f e r c o e f f i c i e n t ( hr
1)
16 k_g_a =80; // Gas f i l m mass t r a n s f e r c o e f f i c i e n t ( mol / h r
L atm )
17 Epsilon =0.1; // P o r o s i t y
18 percent_inc =0.2; // P e r c e n t a g e e x c e s s r e q u i r e d f o r
r e a c t o r volume
19
20
21 //CALCULATION ( Ex7 . 1 . a )
22 H_O2_conv = H_O2 *18/1000; // C o n v e r t ( atm L/ mole O2 )
23 k_L_a_by_H = k_L_a / H_O2_conv ;
24 reaction_resistance = H_O2_conv /( k2 * C_B_product *(1 -
Epsilon ) *3600) ;
25 Kg_a =1/((1/ k_g_a ) +(1/ k_L_a_by_H ) +(
reaction_resistance ) ) ; // R e f e r e q u a t i o n 7 . 1 0
26 gasfilm_resistance_per =((1/ k_g_a ) /(1/ Kg_a ) ) *100;
27 liq_film_resistance_per =((1/ k_L_a_by_H ) /(1/ Kg_a ) )
*100;
28 reaction_resistance_per =(( reaction_resistance ) /(1/
Kg_a ) ) *100;
29
30 //CALCULATION ( Ex7 . 1 . b )
31 delta_C_B = C_B_feed - C_B_product ;
32 mol_O2_needed = F * delta_C_B /4;
33 N_air =100; // Assuming 100 mole o f f e e d a i r
34 f_O2 =0.209; // F r a c t i o n o f O2
35 f_N2 =1 - f_O2 ; // F r a c t i o n o f N2
36 N_O2_in = N_air * f_O2 ;
37 N_N2_in = N_air * f_N2 ;
38 N_O2_out = N_O2_in /2; // H a l f o f O2 f e d
39 N_N2_out = N_N2_in ;
40 N_air_out = N_N2_out + N_O2_out ;
41 P_O2_out = P *( N_O2_out / N_air_out ) ;
42 P_O2_in = P *( N_O2_in / N_air ) ;
43 P_O2_bar =( P_O2_in - P_O2_out ) /( log ( P_O2_in / P_O2_out ) ) ;
// Log mean P r e s s u r e
44 volume = mol_O2_needed /( Kg_a * P_O2_bar ) ;

73
45 reactor_vol = volume + volume * percent_inc ;
46 volume_gal = volume *0.264;
47 reactor_vol_gal = reactor_vol *0.264;
48
49
50 //OUTPUT ( Ex7 . 1 . a )
51 mprintf ( \n OUTPUT Ex7 . 1 . a ) ;
52 mprintf ( \n
==========================================================
);
53 mprintf ( \ nThe p e r c e n t a g e gas f i l m r e s i s t a n c e : %0
. 1 f%% , gasfilm_resistance_per ) ;
54 mprintf ( \ nThe p e r c e n t a g e l i q u i d f i l m r e s i s t a n c e : %0
. 1 f%% , liq_film_resistance_per ) ;
55 mprintf ( \ nThe p e r c e n t a g e c h e m i c a l r e a c t i o n
r e s i s t a n c e : %0 . 1 f%% , reaction_resistance_per ) ;
56
57 //OUTPUT ( Ex7 . 1 . b )
58 mprintf ( \n\n\n OUTPUT Ex7 . 1 . b ) ;
59 mprintf ( \n
==========================================================
);
60 mprintf ( \n R e a c t i o n volume c a l c u l a t e d : %0 . 0 f L ,
volume ) ;
61 mprintf ( \n R e a c t o r s i z e t o be c h o s e n : %0 . 0 f L ,
reactor_vol ) ;
62
63
64 // FILE OUTPUT
65 fid = mopen ( . \ Chapter7 Ex1Output . t x t , w ) ;
66 mfprintf ( fid , \n OUTPUT Ex7 . 1 . a ) ;
67 mfprintf ( fid , \n
==========================================================
);
68 mfprintf ( fid , \ nThe p e r c e n t a g e gas f i l m r e s i s t a n c e
: %0 . 1 f%% , gasfilm_resistance_per ) ;
69 mfprintf ( fid , \ nThe p e r c e n t a g e l i q u i d f i l m
r e s i s t a n c e : %0 . 1 f%% , liq_film_resistance_per ) ;

74
70 mfprintf ( fid , \ nThe p e r c e n t a g e c h e m i c a l r e a c t i o n
r e s i s t a n c e : %0 . 1 f%% , reaction_resistance_per ) ;
71 mfprintf ( fid , \n\n\n OUTPUT Ex7 . 1 . b ) ;
72 mfprintf ( fid , \n
==========================================================
);
73 mfprintf ( fid , \n R e a c t i o n volume c a l c u l a t e d : %0 . 0 f
L , volume ) ;
74 mfprintf ( fid , \n R e a c t o r s i z e t o be c h o s e n : %0 . 0 f L
, reactor_vol ) ;
75 mclose ( fid ) ;
76 //
===================================================
END OF PROGRAM
======================================================

Scilab code Exa 7.2 The gradient for B in the liquid film

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . USA , pp 4 3 6 .
2 // Chapter 7 Ex7 . 2 Pg No . 2 7 0
3 // T i t l e : The g r a d i e n t f o r B i n t h e l i q u i d f i l m
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 C_B0_by_C_Ai =40;
9 D_A_by_D_B =1.2;
10 sqrt_M =10;
11 phi = sqrt_M ; // Assume t h e g r a d i e n t f o r A i s t h e same

75
a s when t h e g r a d i e n t f o r B i s negligible
12 eff_diff_distA_by_xL =(1/ phi ) ;
13
14 //CALCULATION
15 eff_diff_distB_by_xL =(1 - eff_diff_distA_by_xL ) ;
16 CB0_minus_CBbar_by_CB0 = D_A_by_D_B *(1/ C_B0_by_C_Ai ) *(
eff_diff_distB_by_xL / eff_diff_distA_by_xL ) ;
17 C_Bbar_by_C_B0 =(1 - CB0_minus_CBbar_by_CB0 ) ;
18 sqrt_kC_B = sqrt ( C_Bbar_by_C_B0 ) ;
19 phi_corrected = phi * sqrt_kC_B ;
20 Percent_change =(( phi - phi_corrected ) /( phi ) ) *100;
21
22 //OUTPUT
23 mprintf ( \n P e r c e n t a g e D e c r e a s e i n Rate : %0 . 0 f%% ,
Percent_change ) ;
24 mprintf ( \n The d e c r e a s e i n r a t e i s s i g n i f i c a n t ,
hence the g r a d i e n t f o r B i s s i g n i f i c a n t in l i q u i d
f i l m );
25 fid = mopen ( . \ Chapter7 Ex2Output . t x t , w ) ;
26 mfprintf ( fid , \n P e r c e n t a g e D e c r e a s e i n Rate : %0 . 0
f%% , Percent_change ) ;
27 mfprintf ( fid , \n The d e c r e a s e i n r a t e i s s i g n i f i c a n t
, hence the g r a d i e n t f o r B i s s i g n i f i c a n t in
l i q u i d f i l m );
28 mclose ( fid ) ;
29 //================================================
END OF PROGRAM
==========================================================

Scilab code Exa 7.3 Overall mass transfer coefficient and percent resis-
tance

76
1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 436
2 // Chapter 7 Ex7 . 3 Pg No . 2 7 4
3 // T i t l e : O v e r a l l mass t r a n s f e r c o e f f i c i e n t and
percent resistance
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 k2 =8500; // ( L/ mol s e c ) a t 25 C
9 kg_a = 7.4 // ( mol / h r f t 3 atm )
10 k_star_L_a =32; // ( hr 1)
11 a =34; // ( f t 2 / f t 3 )
12 H_CO2 =1.9*10^(3) ; // ( atm /m f ) Henry s C o n s t a n t
13 D_CO2 =2*10^( -5) ; // ( cm2/ s e c )
14 D_OH =2.8*10^( -5) ; // ( cm2/ s e c )
15 P_CO2_in =0.04; // ( atm )
16 P_CO2_out =0.004; // ( atm )
17 Caustic_conc =[0.5 0.75]; // C o c e n t r a t i o n on b o t h t h e
e n d s o f t h e column bottom and t o p (M)
18 n =2;
19 M_H2O =18; // M o l e c u l a r Weight
20 H_H2O =62.3; // ( g / f t 3 ) Henry s C o n s t a n t
21 H_H2O_dash = H_H2O / M_H2O ; // Henry s C o n s t a n t c o n v e r t e d
i n t o c o n s i s t e n t u n i t s with kg a
22
23
24 //CALCULATION
25 C_Ai = P_CO2_in / H_CO2 *(1000/18) ;
26 k_star_L =( k_star_L_a /( a *3600) ) *(30.5) ;
27 H_CO2_dash = H_CO2 *(1/ H_H2O_dash ) ;
28 for i =1:2
29 Phi_a ( i ) =(1+( Caustic_conc ( i ) /( n * C_Ai ) ) *( D_OH / D_CO2 ) )
; // R e f e r e q u a t i o n 7 . 5 1
30 sqrt_M ( i ) = sqrt ( k2 * Caustic_conc ( i ) * D_CO2 ) / k_star_L ;
31 Phi ( i ) = sqrt_M ( i ) ; // R e f e r f i g 7 . 7

77
32 K_ga ( i ) =(1/((1/ kg_a ) +( H_CO2_dash /( Phi ( i ) * k_star_L_a )
) ) ) ; // O v e r a l l Mass t r a n s f e r c o e f f i c i e n t
33 Percent_resis_gasfilm ( i ) =( K_ga ( i ) / kg_a ) *100;
34 end
35
36 //OUTPUT
37 mprintf ( \n \ t \ t \ t \ t \ t \ t \ tTop \ t Bottom ) ;
38 mprintf ( \n O v e r a l l mass t r a n s f e r c o e f f i c i e n t ( mol /
h r f t 3 atm ) : %0 . 1 f \ t %0 . 1 f , K_ga (1) , K_ga (2) ) ;
39 mprintf ( \n P e r c e n a g e r e s i s t a n c e i n g a s f i l m :
%0 . 0 f%%\ t %0 . 0 f%% ,
Percent_resis_gasfilm (1) , Percent_resis_gasfilm
(2) ) ;
40
41 // FILE OUTPUT
42 fid = mopen ( . \ Chapter7 Ex3Output . t x t , w ) ;
43 mfprintf ( fid , \n \ t \ t \ t \ t \ t \ t \ tTop \ t Bottom ) ;
44 mfprintf ( fid , \n O v e r a l l mass t r a n s f e r c o e f f i c i e n t (
mol / h r f t 3 atm ) : %0 . 1 f \ t %0 . 1 f , K_ga (1) , K_ga (2) ) ;
45 mfprintf ( fid , \n P e r c e n a g e r e s i s t a n c e i n g a s f i l m :
%0 . 0 f%%\ t %0 . 0 f%% ,
Percent_resis_gasfilm (1) , Percent_resis_gasfilm
(2) ) ;
46 mclose ( fid ) ;
47 //
==================================================================
END OF PROGRAM
==================================================================

Scilab code Exa 7.4 Local selectivity due to mass transfer limitations

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n

78
) M a r c e l Dekker , I n c . , USA , pp 436
2 // Chapter 7 Ex7 . 4 Pg No . 2 7 9
3 // T i t l e : L o c a l s e l e c t i v i t y due t o mass t r a n s f e r
limitations
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 C_Ai =0.02; // (M)
9 C_B0 =3; // (M)
10 D_A =10^( -5) ; // ( cm2/ s e c )
11 D_B = D_A ; // ( cm2/ s e c )
12 D_C = D_B ; // ( cm2/ s e c )
13 k_1 =10^(4) ; // ( L/ mol s e c )
14 k_star_l =0.015; // ( cm/ s e c )
15 n =1;
16 C_c0 =[0 1.4];
17 X =[0 0.5] // C o n v e r s i o n
18 Phi =[33 23]; // From f i g u r e 7 . 7
19
20
21 //CALCULATION
22 k_2 =0.09* k_1 ;
23 for i =1:2
24 C_B ( i ) =(1 - X ( i ) ) * C_B0 ;
25 sqrt_M ( i ) = sqrt ( C_B ( i ) * k_1 * D_A ) / k_star_l ;
26 Phi_a ( i ) =(1+( C_B ( i ) /( n * C_Ai ) ) *( D_B / D_A ) ) ; // R e f e r
equation 7.51
27 C_Bbar_by_C_B ( i ) =( Phi ( i ) / sqrt_M ( i ) ) ^2; // R e f e r
equation 7.59
28 delta_C_B ( i ) =(1 - C_Bbar_by_C_B ( i ) ) * C_B ( i ) ; // R e f e r
equation 7.60
29 delta_C_c ( i ) = delta_C_B ( i ) ;
30 C_cbar ( i ) = delta_C_c ( i ) + C_c0 ( i ) ;
31 C_Bbar ( i ) = C_Bbar_by_C_B ( i ) *( C_B ( i ) ) ;
32 S ( i ) =(1 -( k_2 * C_cbar ( i ) /( C_Bbar ( i ) * k_1 ) ) ) *100; // R e f e r

79
equation 7.56
33 end
34
35 //OUTPUT
36 mprintf ( \n\ t L o c a l s e l e c t i v i t y due t o mass t r a n s f e r
l i m i t a t i o n s );
37 mprintf ( \n\ tThe l o c a l s e l e c t i v i t y f o r Z e r o
C o n v e r s i o n : %0 . 0 f%% ,S (1) ) ;
38 mprintf ( \n\ tThe l o c a l s e l e c t i v i t y f o r 50%%
C o n v e r s i o n : %0 . 0 f%% ,S (2) ) ;
39
40 // FILE OUTPUT
41 fid = mopen ( . \ Chapter7 Ex4Output . t x t , w ) ;
42 mfprintf ( fid , \n\ t L o c a l s e l e c t i v i t y due t o mass
t r a n s f e r l i m i t a t i o n s );
43 mfprintf ( fid , \n\ tThe l o c a l s e l e c t i v i t y f o r Z e r o
C o n v e r s i o n i s %0 . 0 f%% ,S (1) ) ;
44 mfprintf ( fid , \n\ tThe l o c a l s e l e c t i v i t y f o r 50%%
C o n v e r s i o n i s %0 . 0 f%% ,S (2) ) ;
45 mclose ( fid ) ;
46 //
======================================================
END OF PROGRAM
===================================================

Scilab code Exa 7.5 Maximum rate of CO absorption and Dimensions of


Bubble Column Reactor

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 436
2 // Chapter 7 Ex7 . 5 Pg No . 2 9 3
3 // T i t l e : Maximum r a t e o f CO a b s o r p t i o n and

80
D i m e n s i o n s o f Bubble Column R e a c t o r
4 //
==================================================================

5 clear
6 clc
7 // COMMON INPUT
8 P_dash =5; // P a r t i a l p r e s s u r e o f a c e t i c a c i d ( atm )
9 P_total =20; // T o t a l P r e s s u r e ( atm )
10 myu =0.19; // V i s c o s i t y o f a c e t i c a c i d
11 T_C =180; // T e m p e r a t u r e i n ( C )
12 T_K = T_C +273; // T e m p e r a t u r e i n (K)
13 sigma_20 =28; // S u r f a c e T e n s i o n ( Dynes /cm ) a t 20 ( C )
14 sigma_180 =20; // S u r f a c e T e n s i o n ( Dynes /cm ) a t 180 ( C
)
15 M_CO =28; // M o l e c u l a r w e i g h t o f CO
16 M_B =60.05; // M o l e c u l a r w e i g h t a c e t i c a c i d
17 V_A = 30.7; // Molar volume
18 S_CO =7*10^( -3) ; // S o l u b i l i t y o f CO ( mol /L atm )
19 f_CO =0.75; // F r a c t i o n o f CO i n f e e d
20 f_acetic_acid =1 - f_CO ; // F r a c t i o n o f A c e t i c a c i d
21 R =82.056*(10^ -3) ; // ( c m 3 a t m / K mol )
22 rho_air =1.21; // ( kg /m3) d e n s i t y o f a i r a t 20 ( C )
23 sigma_H2O =72; // S u r f a c e t e n s i o n ( Dynes /cm )
24 myu_H2O =1; // V i s c o s i t y o f w a t e r
25 k_L_a_air_water =0.051; // ( s e c 1)
26 D_O2_water =2.4*(10^ -5) ; // ( cm2/ s e c ) d i f f u s i v i t y f o r
oxygen i n w a t e r a t 20( C )
27 Conc_Rh =4*10^( -3) ; // C o n c e n t r a t i o n o f Rohdium (M)
28 Conc_CH3I =1; // C o n c e n t r a t i o n o f Methyl I o d i d e (M)
29 F_product_acetic_acid =0.1; // Rate o f a c e t i c a c i d
p r o d u c e d ( kmol / s e c )
30 f_CO_reacted =0.8; // 80% o f CO r e a c t e d
31 u_g =0.1; // (m/ s e c )
32 Epsilon_air_water_new =0.07; // At v e l o c i t y 3 ( cm/ s e c )
33 Epsilon_air_water_old = 0.12; // At v e l o c i t y 6 ( cm/ s e c )
34 u_g_c =5*(10^( -2) ) ; // Gas V e l o c i t y Ex7 . 5 . c (m/ s e c )
35

81
36
37
38 //CALCUATION ( Ex7 . 5 . a )
39 D_CO =(7.4*10^( -8) * M_B ^(1/2) * T_K ) /( myu * V_A ^(0.6) ) ; //
D i f f u s i v i t y o f CO ( W i l k e C h a n g e q u a t i o n Eq4 . 1 7 )
40 M_ave = f_CO * M_CO + M_B * f_acetic_acid ; // A v e r a g e
Molecular weight
41 rho_g = M_ave * P_total /( R * T_K ) ; // From i d e a l g a s law
42 epsilon_air_water = 0.12; // At v e l o c i t y 6 ( cm/ s e c )
43 epsilon = epsilon_air_water *( sigma_H2O / sigma_180 )
^(0.4) *( myu / myu_H2O ) ^(0.2) *( rho_g / rho_air ) ^(0.2) ;
// From e q u a t i o n 7 . 6 4
44 u_G =6; // From f i g u r e 7 . 1 2 ( cm/ s e c )
45 k_L_a = k_L_a_air_water *( D_CO / D_O2_water ) ^(0.5) *(
epsilon / epsilon_air_water ) ; // From e q u a t i o n 7 . 6 9
46 P_CO = P_total - P_dash ;
47 C_CO_Star = S_CO * P_CO ;
48 r_max = C_CO_Star * k_L_a ; // Rate o f CO a b s o r p t i o n a t 15
atm
49 r_test =158.8*(10^(6) ) * exp ( -8684/ T_K ) *( Conc_Rh ) *(
Conc_CH3I ) ; // K i n e t i c r a t e a t 180 ( C )
50
51 //CALCULATION( Ex7 . 5 . b )
52 F_feed_CO = F_product_acetic_acid / f_CO_reacted ; // Rate
o f f l o w o f CO ( kmol / s e c )
53 F_total = F_feed_CO / f_CO ;
54 Q = F_total * R * T_K /( P_total ) ;
55 S = Q / u_g ;
56 D_t = sqrt (4* S / %pi ) ;
57 r_test_b =(158.8*(10^(6) ) * exp ( -8684/ T_K ) *( Conc_Rh ) *(
Conc_CH3I ) ) *(10^( -3) ) ; // K i n e t i c r a t e a t 180 ( C )
58 liquid_vol = ( F_product_acetic_acid / r_test_b )
*(10^( -3) ) ; // l i q u i d volume (m3)
59 h0 = liquid_vol / S ; // c l e a r l i q u i d
60 h = h0 /(1 - epsilon ) ; // a e r a t e d l i q u i d
61
62 //CALCULATION( Ex7 . 5 . c )
63 Q = F_total * R * T_K /( P_total ) ;

82
64 S = Q / u_g_c ;
65 D_t_c = sqrt (4* S / %pi ) ;
66 Epsilon_new =( Epsilon_air_water_new /
Epsilon_air_water_old ) * epsilon ;
67 liquid_vol = ( F_product_acetic_acid / r_test_b )
*(10^( -3) ) ; // l i q u i d volume (m3)
68 h0 = liquid_vol / S ; // c l e a r l i q u i d
69 h_new = h0 /(1 - Epsilon_new ) ; // a e r a t e d l i q u i d
70
71 //OUTPUT ( Ex7 . 5 . a )
72 mprintf ( \n OUTPUT Ex7 . 5 . a ) ;
73 mprintf ( \n
==========================================================
);
74 mprintf ( \n\ tThe maximum r a t e o f CO a b s o r p t i o n a t 15
atm : %f ( mol /L s ) , r_max ) ;
75 mprintf ( \n\ tThe k i n e t i c r a t e o f CO a b s o r p t i o n a t
1 8 0 ( C ) : %f ( mol /L s ) , r_test ) ;
76 mprintf ( \n\ tThe p r e d i c t e d v a l u e o f k L a : %0 . 2 f ( s
1) , k_L_a ) ;
77
78 //OUTPUT ( Ex7 . 5 . b )
79 mprintf ( \n\n\n OUTPUT Ex7 . 5 . b ) ;
80 mprintf ( \n
==========================================================
);
81 mprintf ( \n\ tThe D i m e n s i o n s o f t h e r e a c t o r a r e ) ;
82 mprintf ( \n\ t D i a m e t e r : %0 . 0 f m , D_t ) ;
83 mprintf ( \n\ t H e i g h t : %0 . 2 f m ,h ) ;
84
85 //OUTPUT ( Ex7 . 5 . c )
86 mprintf ( \n\n\n OUTPUT Ex7 . 5 . c ) ;
87 mprintf ( \n
==========================================================
);
88 mprintf ( \n\ tThe new d i m e n s i o n s o f t h e r e a c t o r ) ;
89 mprintf ( \n\ t D i a m e t e r : %0 . 1 f m , D_t_c ) ;
90 mprintf ( \n\ t H e i g h t : %0 . 1 f m , h_new ) ;

83
91
92 // FILE OUTPUT
93 fid = mopen ( . \ Chapter7 Ex5Output . t x t , w ) ;
94 mfprintf ( fid , \n OUTPUT Ex7 . 5 . a ) ;
95 mfprintf ( fid , \n
==========================================================
);
96 mfprintf ( fid , \n\ tThe maximum r a t e o f CO a b s o r p t i o n
a t 15 atm : %f ( mol /L s ) , r_max ) ;
97 mfprintf ( fid , \n\ tThe k i n e t i c r a t e o f CO a b s o r p t i o n
a t 1 8 0 ( C ) : %f ( mol /L s ) , r_test ) ;
98 mfprintf ( fid , \n\ tThe p r e d i c t e d v a l u e o f k L a : %0
. 2 f ( s 1) , k_L_a ) ;
99 mfprintf ( fid , \n\n\n OUTPUT Ex7 . 5 . b ) ;
100 mfprintf ( fid , \n
==========================================================
);
101 mfprintf ( fid , \n\ tThe D i m e n s i o n s o f t h e r e a c t o r a r e
);
102 mfprintf ( fid , \n\ t D i a m e t e r : %0 . 0 f m , D_t ) ;
103 mfprintf ( fid , \n\ t H e i g h t : %0 . 2 f m ,h ) ;
104 mfprintf ( fid , \n\n\n OUTPUT Ex7 . 5 . c ) ;
105 mfprintf ( fid , \n
==========================================================
);
106 mfprintf ( fid , \n\ tThe new d i m e n s i o n s o f t h e r e a c t o r
);
107 mfprintf ( fid , \n\ t D i a m e t e r : %0 . 1 f m , D_t_c ) ;
108 mfprintf ( fid , \n\ t H e i g h t : %0 . 1 f m , h_new ) ;
109 mclose ( fid ) ;
110
111 //=================================================
END OF PROGRAM
===========================================================

84
Scilab code Exa 7.6 Fraction of O2 Power of agitator kLa and average
dissolved oxygen concentration

1 // H a r r i o t P , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n )
M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 7 Ex7 . 6 Pg No . 3 0 0
3 // T i t l e : F r a c t i o n o f O2 , Power o f a g i t a t o r , k L a and
a v e r a g e d i s s o l v e d oxygen c o n c e n t r a t i o n .
4 //
==================================================================

5 clear
6 clc
7 // COMMON INPUT
8 Vol_reactor =200; // Volume o f r e a c t o r (m3)
9 D =4; // D i a m e t e r o f r e a c t o r (m)
10 depth =12; // Depth o f r e a c t o r (m)
11 u_g =3; // S u p e r f i c i a l v e l o c i t y ( cm/ s e c )
12 T_C =30; // T e m p e r a t u r e ( C )
13 T_K =273+ T_C ; // T e m p e r a t u r e (K)
14 f_O2 =0.21; // F r a c t i o n o f O2 i n a i r
15 myu_soln =1.5*(10^( -3) ) ; // V i s c o s i t y o f s o l u t i o n ( Pa
sec )
16 R =0.08206; // Gas c o n s t a n t ( m 3 a t m / K kmol )
17 r_O2_peak =45*(10^( -3) ) ; // Flow r a t e o f O2 a t peak
demand
18 Da_by_Dt =(1/3) ;
19 Da =1.333; // (m)
20 N =120; // ( rpm )
21 N_conv =( N /60) ; // ( s e c 1)
22 Press_top =1; // P r e s s u r e a t t h e t o p o f t h e v e s s e l ( atm
)

85
23 rho =1000; // D e n s i t y o f w a t e r ( kg /m3)
24 ug_sup1 =3*(10^( -2) ) ; // b a s e d on 3 0 ( C ) and 1 ( atm )
25 V =151; // Volume o f s o l u t i o n c a l c u l a t e d Ex7 . 6 . a (m3)
26 ug_sup1 =3*(10^( -2) ) ; // b a s e d on 3 0 ( C ) and 1 atm .
27 Press_top =1; // P r e s s u r e a t t h e t o p o f t h e v e s s e l ( atm
)
28 Press_bottom =2; // From Ex7 . 6 . c
29 ug_sup2 = ug_sup1 / Press_bottom ; // a t 2 atm s u p e r f i c i a l
v e l o c i t y ( cm/ s e c )
30 ug_ave =( ug_sup1 + ug_sup2 ) /2; // A v e r a g e s u p e r f i c i a l
v e l o c i t y ( cm/ s e c )
31 depth =12; // Depth o f r e a c t o r (m)
32 one_atm_water =10.3; // 1 atm p r e s s u r e c o r r e s p o n d s t o
1 0 . 3 (m) h e i g h t o f w a t e r
33 k_H_O2 =5.2*10^(4) // Henery s law c o n s t a n t f o r O2 i n
w a t e r f o r O2 ( atm / mol f r a c t i o n )
34 M_O2 =32; // M o l e c u l a r w e i g h t o f O2
35 M_H2O =18; // M o l e c u l a r w e i g h t o f w a t e r
36 C_O2_critical =1*10^( -3) ; // C r i t i c a l O2 C o n c e n t r a t i o n
( g /L )
37 percent_reduction =40/100; // Mass t r a n s f e r c o e f f i c i e n t
i n t h e u p p e r r e g i o n o f t h e r e a c t o r i s 40% l e s s
than the a v e r a g e
38 kLa_soln =0.22; // V a l u e c a l c u l a t e d i n Ex7 . 6 . d
39 r_conv =1.25*10^( -5) ; // Rate a t peak O2 demand ( mol /L
sec )
40 depth =12; // Depth o f r e a c t o r (m)
41
42
43 //CALCULATION ( Ex7 . 6 . a )
44 S = %pi *( D ^2) /4; // C r o s s s e c t i o n a r e a (m2)
45 V = S * depth ; // Volume o f s o l u t i o n (m3)
46 F_air =( S * u_g *(10^( -2) ) *3600) /( R *(10^( -3) ) * T_K ) ;
47 F_O2 = f_O2 * F_air ; // Feed r a t e o f O2 ( mol / h r )
48 F_O2_used = r_O2_peak * V *(10^(3) ) ; //O2 u s e d f o r a e r o b i c
f e r m e n t a t i o n ( mol / h r )
49 F_O2_left = F_O2 - F_O2_used ; //O2 l e f t after aerobic
f e r m e n t a t i o n ( mol / h r )

86
50 f_O2_exitgas = F_O2_left / F_air ; // F r a c t i o n o f O2 i n
e x i t gas
51 Percent_O2_exitgas =( f_O2_exitgas ) *(100) ;
52 Frac_O2_used =(( f_O2 - f_O2_exitgas ) / f_O2 ) ;
53
54 //CALCULATION ( Ex7 . 6 . b )
55 Re =( rho * N_conv * Da ^2) / myu_soln ;
56 N_p =6; // For a s t a n d a r d t u r b i n e
57 N_p_pitched =1.7; // For a p i t c h e d b l a d e t u r b i n e
58 P0 =( N_p * rho *( N_conv ^3) *( Da ^5) ) *(10^( -3) ) ; // R e f e r
e q u a t i o n 7 . 7 3 (kW)
59 // I f t h e t u r b i n e i s 2 m from t h e bottom , o r 10 m
b e l o w t h e s u r f a c e , t h e p r e s s u r e i s a b o u t 2 atm
s i n c e 1 atm= 1 0 . 3 m w a t e r
60 Press_bottom =2
61 ug_sup2 = ug_sup1 / Press_bottom ;
62 Q = ug_sup2 * S ;
63 N_Ae = Q /( N_conv *( Da ^3) ) ;
64 Pg_by_P0 =0.55; // From f i g u r e 7 . 1 5 b a s e d on N Ae v a l u e
calculated
65 Pg = Pg_by_P0 * P0 ; //When a e r a t e d
66 P0_pitched =( N_p_pitched / N_p ) * P0 ;
67 Pg_by_P0_pitched =0.8; // S o l u t i o n r e a c h i n g t h e u p p e r
s t i r r e r s i s already aerated
68 Pg_pitched = Pg_by_P0_pitched * P0_pitched ;
69 Tot_Pow_no_air = P0 + Press_bottom * P0_pitched ; // T o t a l
power when no a i r i s p r e s e n t e d
70 Tot_Pow_aerated = Pg + Press_bottom * Pg_pitched ; // T o t a l
power when i t i s a e r a t e d
71
72 //CALCULATION ( Ex7 . 6 . c )
73 P_by_V_ave = Tot_Pow_aerated / V ;
74 kLa_O2_sulfite =0.32; // U s i n g f i g u r e 7 . 1 6 b a s e d on a v e (
P/V) v a l u e and u g a v e r a g e v a l u e
75 kLa_soln =0.7* kLa_O2_sulfite ; // kLa f o r t h i s s o l u t i o n
i s 70% o f t h e v a l u e f o r o x y g e n a b s o r p t i o n i n
sodium s u l f i t e ( s e c 1)
76 y_O2 =0.086; // I f g a s i s backmixed

87
77 depth_ave = depth /2;
78 Press_ave =( Press_top +( depth_ave / one_atm_water ) ) ; //
P r e s s u r e a t a v e r a g e d e p t h ( atm )
79 C_O2_star =( Press_ave * y_O2 / k_H_O2 ) *(1000/ M_H2O ) ; //
C o n v e r s i o n ( mol /L )
80 r_conv = r_O2_peak /3600; // Rate a t peak O2 demand ( mol /
L sec )
81 C_ave =( C_O2_star -( r_conv / kLa_soln ) )
82 C_ave_conv = C_ave * M_O2 *1000; // C o n v e r t e d v a l u e o f O2
c o n c e n t r a t i o n i n (mg/L )
83
84 //CALCULATION ( Ex7 . 6 . d )
85 depth_ave = depth /2;
86 Press_ave =( Press_top +( depth_ave / one_atm_water ) ) ; //
P r e s s u r e a t a v e r a g e d e p t h ( atm )
87 kLa_soln_reduced = kLa_soln *(1 - percent_reduction ) ;
88 C_star_minus_C = r_conv / kLa_soln_reduced ;
89 C_O2_new =( C_O2_star -( C_star_minus_C ) ) ;
90 C_O2_new_conv = C_O2_new * M_O2 *1000; // C o n v e r t e d v a l u e
o f O2 c o n c e n t r a t i o n i n (mg/L )
91 C_O2_star_new = C_O2_star / Press_ave ;
92
93 //OUTPUT ( Ex7 . 6 . a )
94 mprintf ( \n OUTPUT Ex7 . 6 . a ) ;
95 mprintf ( \n
==========================================================
);
96 mprintf ( \ nAt t h e peak demand , f r a c t i o n o f t h e
o x y g e n s u p p l i e d = %. 3 f , Frac_O2_used ) ;
97
98 //OUTPUT( Ex7 . 6 . b )
99 mprintf ( \n\n\n OUTPUT Ex7 . 6 . b ) ;
100 mprintf ( \n
==========================================================
);
101 mprintf ( \ nThe t o t a l power r e q u i r e d f o r t h e a g i t a t o r
b e f o r e t h e a i r i s t u r n e d on : %0 . 0 f kW ,
Tot_Pow_no_air ) ;

88
102 mprintf ( \ nThe t o t a l power r e q u i r e d f o r t h e a g i t a t o r
a f t e r t h e a i r i s t u r n e d on : %0 . 0 f kW ,
Tot_Pow_aerated ) ;
103
104 //OUTPUT ( Ex7 . 6 . c )
105 mprintf ( \n\n\n OUTPUT Ex7 . 6 . c ) ;
106 mprintf ( \n
==========================================================
);
107 mprintf ( \ nThe c a l c u l a t e d v a l u e o f kLa ( mass
t r a n s f e r c o e f f i c i e n t ) o f s o l u t i o n : %0 . 2 f ( s e c 1) ,
kLa_soln ) ;
108 mprintf ( \ nThe c a l c u l a t e d v a l u e o f a v e r a g e d i s s o l v e d
O2 c o n c e n t r a t i o n : %0 . 2 f (mg/L ) , C_ave_conv ) ;
109
110 //OUTPUT ( Ex7 . 6 . d )
111 mprintf ( \n\n\n OUTPUT Ex7 . 6 . d ) ;
112 mprintf ( \n
==========================================================
);
113 mprintf ( \ nThe new c a l c u l a t e d v a l u e o f a v e r a g e
d i s s o l v e d O2 c o n c e n t r a t i o n %0 . 2 f (mg/L ) ,
C_O2_new_conv ) ;
114 if ( C_star_minus_C > C_O2_star_new )
115 mprintf ( \ nThe r e a c t o r i s o p e r a t e d a b o v e
c r i t i c a l O2 c o n c e n t r a t i o n ) ;
116 else
117 mprintf ( \ nThe r e a c t o r s h o u l d be o p e r a t e d a t
h i g h e r a i r r a t e o t h e r w i s e C O2 would d r o p t o
zero )
118 end
119 // FILE OUTPUT
120 fid = mopen ( . \ Chapter7 Ex6Output . t x t , w ) ;
121 mfprintf ( fid , \n OUTPUT Ex7 . 6 . a ) ;
122 mfprintf ( fid , \n
==========================================================
);
123 mfprintf ( fid , \ nAt t h e peak demand , f r a c t i o n o f t h e

89
o x y g e n s u p p l i e d = %. 3 f , Frac_O2_used ) ;
124 mfprintf ( fid , \n\n\n OUTPUT Ex7 . 6 . b ) ;
125 mfprintf ( fid , \n
==========================================================
);
126 mfprintf ( fid , \ nThe t o t a l power r e q u i r e d f o r t h e
a g i t a t o r b e f o r e t h e a i r i s t u r n e d on : %0 . 0 f kW ,
Tot_Pow_no_air ) ;
127 mfprintf ( fid , \ nThe t o t a l power r e q u i r e d f o r t h e
a g i t a t o r a f t e r t h e a i r i s t u r n e d on : %0 . 0 f kW ,
Tot_Pow_aerated ) ;
128 mfprintf ( fid , \n\n\n OUTPUT Ex7 . 6 . c ) ;
129 mfprintf ( fid , \n
==========================================================
);
130 mfprintf ( fid , \ nThe c a l c u l a t e d v a l u e o f kLa ( mass
t r a n s f e r c o e f f i c i e n t ) o f s o l u t i o n : %0 . 2 f ( s e c 1) ,
kLa_soln ) ;
131 mfprintf ( fid , \ nThe c a l c u l a t e d v a l u e o f a v e r a g e
d i s s o l v e d O2 c o n c e n t r a t i o n : %0 . 2 f (mg/L ) ,
C_ave_conv ) ;
132 mfprintf ( fid , \n\n\n OUTPUT Ex7 . 6 . d ) ;
133 mfprintf ( fid , \n
==========================================================
);
134 mfprintf ( fid , \ nThe new c a l c u l a t e d v a l u e o f a v e r a g e
d i s s o l v e d O2 c o n c e n t r a t i o n %0 . 2 f (mg/L ) ,
C_O2_new_conv ) ;
135 if ( C_star_minus_C > C_O2_star_new )
136 mfprintf ( fid , \ nThe r e a c t o r i s o p e r a t e d a b o v e
c r i t i c a l O2 c o n c e n t r a t i o n ) ;
137 else
138 mfprintf ( fid , \ nThe r e a c t o r s h o u l d be o p e r a t e d
a t h i g h e r a i r r a t e o t h e r w i s e C O2 would d r o p
to zero )
139 end
140 mclose ( fid ) ;
141 //

90
===================================================
END OF PROGRAM
======================================================

Scilab code Exa 7.7 Apparent value of kLa regime of operation and selec-
tivity dependency on gas mixing

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 7 Ex7 . 7 Pg No . 3 0 4
3 // T i t l e : Apparent v a l u e o f kLa , r e g i m e o f o p e r a t i o n
and s e l e c t i v i t y d e p e n d e n c y on g a s m i x i n g
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 Vol_reactor =35; // Volume o f r e a c t o r ( L )
9 No_reactor =3; //No . o f r e a c t o r
10 T_C =155; // O p e r a t i n g T e m p e r a t u r e ( C )
11 T_ref =273; // R e f e r e n c e T e m p e r a t u r e ( C )
12 T_K = T_C + T_ref ; // O p e r a t i n g T e m p e r a t u r e (K)
13 P =8.2; // O p e r a t i n g P r e s s u r e ( atm )
14 X_conversion =9.5*10^( -2) ; // C o n v e r s i o n
15 S =73*10^( -2) ; // S e l e c t i v i t y
16 M_cyclohexane =84.16; // M o l e c u l a r w e i g h t o f
cyclohexane
17 F_cyclohexane =100; // Feed r a t e o f c y c l o h e x a n e ( L/ h r )
18 F_air =9.9; // Feed r a t e o f a i r ( nm3/ h r )
19 f_O2_air =0.21; // F r a c t i o n o f O2 i n a i r
20 V_ref =22400; // R e f e r e n c e volume a t STP ( cm3/ mol )

91
21 y_O2 =0.002; //O2 i n v e n t g a s
22 f_O2_consumed =0.99; // F r a c t i o n o f O2 Consumed
23 rho_cyclohexane =0.779; // D e n s i t y o f c y c l o h e x a n e a t 20
( C )
24 main_pdt_ratio =3/2;
25 by_pdt_ratio =(1 - main_pdt_ratio ) ;
26 stoi_rxn_O2 =[0.5 1];
27 rho_M =0.650; // D e n s i t y o f C y c l o h e x a n e a t 155 ( C )
28 P_dash =5.8; // Vapour P r e s s u r e o f c y c l o h e x a n e a t 155 (
C )
29 D_reactor =30; // D i a m e t e r o f r e a c t o r ( cm )
30 h_reactor =50; // H e i g h t o f r e a c t o r ( cm )
31 myu_20 =0.98; // ( cp ) V i s c o s i t y a t 2 0 ( C )
32 myu_155 =0.2 // ( cp ) V i s c o s i t y a t 1 5 5 ( C )
33 x_O2 =6.38*(10^( -6) ) ; // Mol f r a c t i o n o f O2
34 D_B_by_D_A =0.5; // Assumed v a l u e ( r e f e r Ex7 . 7 )
35 Phi =20; // R e f e r F i g . 7 . 7
36 n =1/(0.7) ;
37
38
39 //CALCULATION ( Ex7 . 7 . a )
40 F_O2 =( F_air *10^(6) * f_O2_air ) /(3600* V_ref ) ;
41 delta_N_O2 = F_O2 * f_O2_consumed ;
42 F_C6 =( F_cyclohexane *10^(3) * rho_cyclohexane ) /(3600*
M_cyclohexane )
43 F_prdts = F_C6 * X_conversion * S ;
44 F_O2_prdts = F_prdts *( main_pdt_ratio * stoi_rxn_O2 (1) +
by_pdt_ratio * stoi_rxn_O2 (2) ) ;
45 F_O2_remain_used = delta_N_O2 - F_O2_prdts ;
46 F_O2_prdts_conver = F_O2_prdts /( F_C6 * X_conversion * S ) ;
47 F_O2_remain_used_conver = F_O2_remain_used /( F_C6 *
X_conversion *(1 - S ) ) ;
48 X_O2 =10^(0.366* log10 ( T_K ) -3.8385) ; //O2 s o l u b i l i t y
from Wild e t a l . [ 3 7 ] :
49 PO2_plus_PN2 =P - P_dash ;
50 P_O2 = y_O2 * PO2_plus_PN2 ;
51 x_O2 = P_O2 * X_O2 ; // Mol f r a c t i o n o f O2
52 C_M = rho_M *10^(3) / M_cyclohexane ;

92
53 C_O2_star = C_M * x_O2 ;
54
55 // Assume e a c h r e a c t o r h a s 30 L s o l u t i o n
56 V_soln_n =30; // Volume o f s o l u t i o n i n e a c h r e a c t o r
57 apparent_kLa =( delta_N_O2 ) /( V_soln_n * No_reactor *
C_O2_star ) ;
58 F_total =( F_air *10^(6) /3600) *( T_K / T_ref ) *(8.2/2.4)
*(1/8.2) ; // The t o t a l v a p o r f l o w i s 8 . 2 / 2 . 4 t i m e s
the a i r flow
59 CSA_reactor = %pi *( D_reactor ^2) /4;
60 u_g = F_total /( CSA_reactor * No_reactor ) ;
61 // C a l c u l a t i o n f o r p r e d i c t e d v a l u e o f kLa
62 kLa_20 =0.16; // From F i g u r e 7 . 1 6 , f o r O 2 C 6 H 1 2 a t 20
( C ) , 2 cm/ s e c , 5 kW/m3
63 T_data =20+ T_ref ; // T e m p e r a t u r e a t which d a t a i s t a k e n
from t h e t a b l e
64 D_155_by_D_20 =( T_K / T_data ) *( myu_20 / myu_155 ) ;
65 Predicted_kLa = kLa_20 *( D_155_by_D_20 ^(0.5) ) *( u_g /2)
^(0.5) ;
66
67 //CALCULATION ( Ex7 . 7 . b )
68 C_M = rho_M *10^(3) / M_cyclohexane ;
69 C_B0 =(1 - X_conversion ) * C_M ;
70 C_Ai = C_M * x_O2 ;
71 Phi_a =(1+( C_B0 /( C_Ai * n ) ) *( D_B_by_D_A ) ^(0.5) ) ;
72 ratio = Phi_a / Phi ;
73
74 //OUTPUT ( Ex7 . 7 . a )
75 mprintf ( \n OUTPUT Ex7 . 7 . a ) ;
76 mprintf ( \n
==========================================================
);
77 mprintf ( \ nThe v a l u e o f a p p a r e n t kLa : %0 . 2 f ( s e c 1)
, apparent_kLa ) ;
78 mprintf ( \n The v a l u e o f p r e d i c t e d kLa : %0 . 2 f ( s e c
1) , Predicted_kLa ) ;
79 if ( apparent_kLa > Predicted_kLa )
80 mprintf ( \ nThe a b s o r p t i o n o f o x y g e n i s g r e a t l y

93
e n h a n c e d by c h e m i c a l r e a c t i o n s i n t h e l i q u i d
film )
81 mprintf ( \ nThe k i n e t i c s can be a p p r o x i m a t e d by
a f i r s t o r d e r e x p r e s s i o n , t h e r e a c t i o n would
f a l l i n t h e pseudo f i r s t o r d e r r e g i m e , \
nwhere t h e r a t e v a r i e s w i t h t h e s q u a r e r o o t
o f t h e o x y g e n d i f f u s i v i t y and t h e r a t e
constant . )
82 end
83
84 //OUTPUT ( Ex7 . 7 . b )
85 mprintf ( \n\n\n OUTPUT Ex7 . 7 . b ) ;
86 mprintf ( \n
==========================================================
);
87 mprintf ( \ nThe v a l u e o f Phi ( enhancement f a c t o r ) %0
. 4 E , Phi_a ) ;
88 mprintf ( \ nThe v a l u e o f r a t i o P h i a b y P h i : %0 . 1 E ,
ratio ) ;
89 mprintf ( \nFrom t h e r a t i o v a l u e P h i a i s g r e a t e r
t h a n Phi h e n c e t h e r e i s no s i g n i f i c a n t g r a d i e n t
f o r c y c l o h e x a n e );
90
91 // FILE OUTPUT
92 fid = mopen ( . \ Chapter7 Ex7Output . t x t , w ) ;
93 mfprintf ( fid , \n OUTPUT Ex7 . 7 . a ) ;
94 mfprintf ( fid , \n
==========================================================
);
95 mfprintf ( fid , \ nThe v a l u e o f a p p a r e n t kLa : %0 . 2 f (
s e c 1) , apparent_kLa ) ;
96 mfprintf ( fid , \n The v a l u e o f p r e d i c t e d kLa : %0 . 2 f (
s e c 1) , Predicted_kLa ) ;
97 if ( apparent_kLa > Predicted_kLa )
98 mfprintf ( fid , \ nThe a b s o r p t i o n o f o x y g e n i s
g r e a t l y e n h a n c e d by c h e m i c a l r e a c t i o n s i n
the l i q u i d f i l m )
99 mfprintf ( fid , \ nThe k i n e t i c s can be

94
a p p r o x i m a t e d by a f i r s t o r d e r e x p r e s s i o n , t h e
r e a c t i o n would f a l l i n t h e pseudo f i r s t
o r d e r r e g i m e , \ nwhere t h e r a t e v a r i e s w i t h
the s q u a r e r o o t o f the oxygen d i f f u s i v i t y
and t h e r a t e c o n s t a n t . )
100 end
101 mfprintf ( fid , \n\n\n OUTPUT Ex7 . 7 . b ) ;
102 mfprintf ( fid , \n
==========================================================
);
103 mfprintf ( fid , \ nThe v a l u e o f Phi ( enhancement f a c t o r
) %0 . 4 E , Phi_a ) ;
104 mfprintf ( fid , \ nThe v a l u e o f r a t i o P h i a b y P h i : %0 . 1
E , ratio ) ;
105 mfprintf ( fid , \nFrom t h e r a t i o v a l u e P h i a i s
g r e a t e r t h a n Phi h e n c e t h e r e i s no s i g n i f i c a n t
g r a d i e n t f o r c y c l o h e x a n e );
106 mclose ( fid ) ;
107 //
==========================================================
END OF PROGRAM
===============================================

95
Chapter 8

Multiphase Reactors

Scilab code Exa 8.1 Gas absorption coefficient and fraction of overall re-
sistance

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( I
E d i t i o n ) , M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 8 Ex8 . 1 Pg No . 323
3 // T i t l e : Gas a b s o r p t i o n c o e f f i c i e n t and f r a c t i o n o f
overall resistance
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 rho_oil =0.8; // D e n s i t y o f o i l ( g /cm3 )
9 IV_init =130; // I o d i n e V a l u e i n i t i a l
10 IV_final =80; // I o d i n e V a l u e f i n a l
11 P =45; // P r e s s u r e o f s y s t e m ( p s i g )
12 T_C =204; // T e m p e r a t u r e o f s y s t e m ( C )
13 t_run =[26 17]; // Time r e q u i r e d f o r h y d r o g e n a t i o n run
2;

96
14 frac_Ni =[0.005 0.0125] // F r a c t i o n o f N i c k e l u s e d f o r
d i f f e r e n t run
15
16 //CALCULATION
17 r_ave =(( IV_init - IV_final ) ) *(0.039* rho_oil ) *(1/60)
.*( t_run .^( -1) ) ; // R e l a t i o n s h i p b e t w e e n I o d i n e
v a l u e and Hydrogen c o n s u m p t i o n ( mol H2/ L s e c )
18 H_H2 = 4*10^( -3) ; // S o l u b i l i t y o f H2 from F i g 8 . 4 Pg No
.322
19 P_H2 =( P /14.7) +1; // A b s o l u t e P r e s s u r e i n ( atm )
20 C_H2 = P_H2 * H_H2 ;
21 Ci_by_r = C_H2 .*( r_ave .^( -1) ) ;
22 Coeff_R_cat = frac_Ni .^( -1) ;
23 equation =[ ones (1 ,2) ; Coeff_R_cat ] // S i m u l t a n e o u s
Equation
24 Resistance = Ci_by_r * inv ( equation ) ;
25 Gas_abs_resistance =( Resistance (1) *100 ) .*( Ci_by_r
.^( -1) ) ;
26 Gas_abs_coefficient =(1/ Resistance (1) ) ;
27
28 //OUTPUT
29 mprintf ( \ nThe Gas a b s o r p t i o n c o e f f i c i e n t i s %f s e c
1 , Gas_abs_coefficient ) ;
30 mprintf ( \n The F r a c t i o n o f o v e r a l l r e s i s t a n c e due
t o g a s a b s o r p t i o n \n Run 1 %0 . 0 f%% \n Run 2 %0 . 0
f%% , Gas_abs_resistance (1) , Gas_abs_resistance (2) )
;
31
32 // FILE OUTPUT
33 fid = mopen ( . \ Chapter8 Ex1Output . t x t , w ) ;
34 mfprintf ( fid , \ nThe Gas a b s o r p t i o n c o e f f i c i e n t i s %f
s e c 1 , Gas_abs_coefficient ) ;
35 mfprintf ( fid , \n The F r a c t i o n o f o v e r a l l r e s i s t a n c e
due t o g a s a b s o r p t i o n \n Run 1 %0 . 0 f%% \n Run 2
%0 . 0 f%% , Gas_abs_resistance (1) , Gas_abs_resistance
(2) ) ;
36 mclose ( fid ) ;
37 //

97
=======================================================
END OF PROGRAM
=================================================

Scilab code Exa 8.2 External Mass Transfer resistance

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( I
E d i t i o n ) , M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 8 Ex8 . 2 Pg No . 329
3 // T i t l e : E x t e r n a l Mass T r a n s f e r r e s i s t a n c e
4 //
==================================================================

5
6 clear
7 clc
8 //INPUT
9 Chi =1.9;
10 M_A =2; // M o l e c u l a r w e i g h t o f Hydrogen
11 M_B =32; // M o l e c u l a r w e i g h t o f m e t h a n o l
12 rho =0.79; // D e n s i t y o f m e t h a n o l
13 myu =0.52; // V i s c o s i t y o f m e t h a n o l ( cP )
14 V_A =14.3 // Molar volume H2
15 T_C =30; // O p e r a t i n g T e m p e r a t u r e ( C )
16 T_K =273+ T_C // T e m p e r a t u r e (K)
17 Epsilon =0.4; // P o r o s i t y
18 rho_cat_dry =1.2; // D e n s i t y o f d r y c a t a l y s t ( g /cm3 )
19 rho_s =2; // S o l i d d e n s i t y
20 g =9.8 // A c c e l e r a t i o n due t o g r a v i t y (m/ s 2 )
21 d_p =10^( -3) ; // S i z e o f c a t a l y s t ( cm )
22 lambda =1.3; // From e q u a t i o n 8 . 4 Pg . No . 317
23 r_vol =2.4; // Measured r a t e ( L/ min )
24 V_mol =22.4; // ( L/ mol ) a s s u m i n g i d e a l g a s

98
25 C_H2 =4.1*10^( -3) ; // From F i g u r e 8 . 3 ( mol /L ) Pg . No .
321
26
27
28 //CALCULATION
29 // Assume D H2 i s t h r e e t i m e s t h e v a l u e g i v e n by t h e
W i l k e C h a n g Equation
30 D_H2 =3*(7.4*(10^( -8) ) *( Chi * M_B ) ^(0.5) * T_K ) /( myu *( V_A
) ^0.6)
31 Sc = myu *10^ -2/( rho * D_H2 ) ;
32 rho_cat_methanol =(1 - Epsilon ) * rho_s + Epsilon * rho ;
33 delta_rho = rho_cat_methanol - rho ;
34 v_t =( g *10*( d_p ) ^2* delta_rho ) /(18* myu *10^ -2) ; // From
S t o k e s Law
35 Re = rho * v_t * d_p /( myu *10^ -2) ;
36 Sh_star =2+0.6*( Re ) ^(0.5) *( Sc ^(1/3) ) ; // R e f e r e q u a t i o n
8 . 9 Pg . No . 3 2 5
37 kc_star = Sh_star * D_H2 / d_p ;
38 kc =2* kc_star ; // With v i g o r o u s a g i t a t i o n
39 a_c =6* lambda /( d_p * rho_cat_dry ) ; // From E q u a t i o n 8 . 4
Pg . No . 317
40 r_mol = r_vol /(22.4*60) ; //
41 delta_C_ext = r_mol *10^3/( kc * a_c ) ;
42 percent_ext_resistance =( delta_C_ext / C_H2 ) *100;
43
44 //OUTPUT
45 mprintf ( \ nThe e x t e r n a l mass t r a n s f e r r e s i s t a n c e i s
a b o u t %0 . 0 f%% o f o v e r a l l r e s i s t a n c e ,
percent_ext_resistance ) ;
46 mprintf ( \n The e x t e r n a l mass t r a n s f e r r e s i s t a n c e i s
b a r e l y s i g n i f i c a n t );
47
48 // FILE OUTPUT
49 fid = mopen ( . \ Chapter8 Ex2Output . t x t , w ) ;
50 mfprintf ( fid , \ nThe e x t e r n a l mass t r a n s f e r
r e s i s t a n c e i s a b o u t %0 . 0 f%% o f o v e r a l l r e s i s t a n c e
, percent_ext_resistance ) ;
51 mfprintf ( fid , \n The e x t e r n a l mass t r a n s f e r

99
r e s i s t a n c e i s b a r e l y s i g n i f i c a n t );
52 mclose ( fid ) ;
53 //
=====================================================
END OF PROGRAM
=========================================

Scilab code Exa 8.3 Apparent rate constant and consistency

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( I
E d i t i o n ) , M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 8 Ex8 . 3 Pg No .
3 // T i t l e : Apparent r a t e c o n s t a n t and c o n s i s t e n c y
4 //
==================================================================

5
6 clear
7 clc
8 // COMMON INPUT
9 LHSV_inv =[0.75 1.39]; // R e f e r t a b l e 8 . 2 Test R e s u l t s
( Liquid Hourly Space V e l o c i t y )
10 X_S =[0.77 0.83]; // R e f e r t a b l e 8 . 2 P e r c e n t a g e S u l p h u r
removal
11 T_C =365; // O p e r a t i n g T e m p e r a t u r e ( C )
12 rho =0.64; // D e n s i t y o f S u l p h u r Compounds ( g /cm3 )
13 myu =0.5; // V i s c o s i t y ( cP )
14 T_K =273+ T_C ; // T e m p e r a t u r e (K)
15 M_B =374; // For CHS compounds ( R e f e r t a b l e 8 . 1 )
16 V_A = M_B /0.6; // Molar volume
17 Chi =1;
18 Epsilon_by_tau =0.1;
19 D_pore_by_D_bulk =0.5; // H i n d e r a n c e due t o l a r g e

100
molecules
20 epsilon_holdup =0.6; // Assuming bed c o n s i s t s 60%
catalyst
21 k_app_rhob =1.96 // R e f e r Ex8 . 3 . a Run 1
22 eta =0.74;
23 R =0.095; // S i z e o f p a r t i c l e
24 C_H2_incorrect =0.48; // S o l u b i l i t y o f H2 a t 56 atm
25 P_incorrect =56; // I n c o r r e c t P r e s s u r e
26 P_correct =65; // C o r r e c t P r e s s u r e
27 m_feed =640; // C o n c e n t r a t i o n o f Feed ( g /L ) ;
28 percent_S =2.04; // P e r c e n t a g e o f S u l p h u r
29 MW_S =32; // M o l e c u l a r w e i g h t o f S u l p h u r
30 N_H2 =1.5; // M o l e s o f H2
31 V_H2 =14.3; // S o l u b i l i t y o f Hydrogen
32
33 //CALCULATION ( Ex8 . 3 . a )
34 for i =1:2
35 kapp_rhob ( i ) = log ((1/(1 - X_S ( i ) ) ) ) *(1/ LHSV_inv ( i ) )
; // R e f e r E q u a t i o n 8 . 2 1
36
37 end
38 L = LHSV_inv (2) / LHSV_inv (1) ;
39 kapp_ratio = kapp_rhob (1) / kapp_rhob (2) ;
40 n = log10 ( kapp_ratio ) / log10 ( L ) ;
41
42 //CALCULATION ( Ex8 . 3 . b )
43 //FOR SULPHUR
44 D_CHS =(7.4*(10^( -8) ) *( Chi * M_B ) ^(0.5) * T_K ) /( myu *( V_A )
^0.6) ;
45 D_e_S = Epsilon_by_tau * D_pore_by_D_bulk * D_CHS ;
46 epsilon_holdup =0.6; // Assuming bed c o n s i s t s 60%
catalyst
47 k_app_S = k_app_rhob /(3600* epsilon_holdup ) ; // R e f e r Ex8
.3. a
48 phi_app_S = R *( k_app_S / D_e_S ) ^(0.5) ;
49 //FOR H2
50 C_H2_corrected = C_H2_incorrect *( P_correct / P_incorrect
);

101
51 C_S_initial = m_feed * percent_S *10^( -2) / MW_S ;
52 Initial_rate = k_app_rhob * C_S_initial ;
53 k_app_H2 = N_H2 * Initial_rate /(3600* epsilon_holdup *
C_H2_corrected ) ;
54 // Assume D H2 i s t h r e e t i m e s t h e v a l u e g i v e n by t h e
W i l k e C h a n g Equation
55 D_H2 =3*(7.4*(10^( -8) ) *( Chi * M_B ) ^(0.5) * T_K ) /( myu *(
V_H2 ) ^0.6) ;
56 D_e_H2 = Epsilon_by_tau * D_H2 ;
57 phi_app_H2 = R *( k_app_H2 / D_e_H2 ) ^(0.5) ;
58
59 //OUTPUT ( Ex8 . 3 . a )
60 mprintf ( \n OUTPUT Ex8 . 3 . a ) ;
61 mprintf ( \n
==========================================================
);
62 mprintf ( \n\ tThe Apparent r a t e c o n s t a n t s a r e \n\ t
Run1 %0 . 2 f hr 1 \n\ t Run2 %0 . 2 f hr 1 , kapp_rhob
(1) , kapp_rhob (2) )
63 mprintf ( \n\ tThe e x p o n e n t v a l u e = %0 . 1 f h e n c e t h e
d i f f e r e n c e i s not c o n s i s t e n t with r e p e c t to
e q u a t i o n s ( 8 . 2 3 ) and ( 8 . 2 4 ) f o r t h e a p p a r e n t
r a t e c o n s t a n t s o b t a i n e d ,n ) ;
64 mprintf ( \n\ tThe e r r o r may be due t o e r r o r i n
assuming a f i r s t o r d e r r e a c t i o n );
65
66 //OUTPUT ( Ex8 . 3 . b )
67 mprintf ( \n\n\n OUTPUT Ex8 . 3 . b ) ;
68 mprintf ( \n
==========================================================
);
69 mprintf ( \n\ tThe i n t e r n a l e f f e c t i v e n e s s f a c t o r b a s e d
on S u l p h u r and Hydrogen d i f f u s i o n a r e %0 . 2 f and
%0 . 2 f r e s p e c t i v e l y , phi_app_S , phi_app_H2 ) ;
70 mprintf ( \n\ tThe i n t e r n a l e f f e c t i v e n e s s f a c t o r b a s e d
on Hydrogen i s n e g l i g i b l e ) ;
71
72 // FILE OUTPUT

102
73 fid = mopen ( . \ Chapter8 Ex3Output . t x t , w ) ;
74 mfprintf ( fid , \n OUTPUT Ex8 . 3 . a ) ;
75 mfprintf ( fid , \n
==========================================================
);
76 mfprintf ( fid , \n\ tThe Apparent r a t e c o n s t a n t s a r e \n
\ t Run1 %0 . 2 f hr 1 \n\ t Run2 %0 . 2 f hr 1 ,
kapp_rhob (1) , kapp_rhob (2) )
77 mfprintf ( fid , \n\ tThe e x p o n e n t v a l u e = %0 . 1 f h e n c e
the d i f f e r e n c e i s not c o n s i s t e n t with r e p e c t to
e q u a t i o n s ( 8 . 2 3 ) and ( 8 . 2 4 ) f o r t h e a p p a r e n t r a t e
c o n s t a n t s o b t a i n e d ,n ) ;
78 mfprintf ( fid , \n\ tThe e r r o r may be due t o e r r o r i n
assuming a f i r s t o r d e r r e a c t i o n );
79 mfprintf ( fid , \n\n\n OUTPUT Ex8 . 3 . b ) ;
80 mfprintf ( fid , \n
==========================================================
);
81 mfprintf ( fid , \n\ tThe i n t e r n a l e f f e c t i v e n e s s f a c t o r
b a s e d on S u l p h u r and Hydrogen d i f f u s i o n a r e %0 . 2 f
and %0 . 2 f r e s p e c t i v e l y , phi_app_S , phi_app_H2 ) ;
82 mfprintf ( fid , \n\ tThe i n t e r n a l e f f e c t i v e n e s s f a c t o r
b a s e d on Hydrogen i s n e g l i g i b l e ) ;
83 mclose ( fid ) ;
84 //============================================END OF
PROGRAM
=================================================

103
Chapter 9

Fluidized Bed Reactors

Scilab code Exa 9.1 Model II Volumetric Mass Transfer Coefficient K

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 9 Ex9 . 1 Pg No . 3 7 6
3 // T i t l e : Model I I V o l u m e t r i c Mass T r a n s f e r
C o e f f i c i e n t (K)
4 //
==================================================================

5
6 clear
7 clc
8 //INPUT
9 u0 =[ 0.1 0.3 0.5 0.75 0.95 1.15]; // F l u i d Velocities
(m/ s e c )
10 X =[0.923 0.872 0.846 0.775 0.728 0.664]; // C o n v e r s i o n
11 h_by_h0 =[1.26 1.44 1.66 2.0 2.3 2.7]; // H e i g h t o f bed
u n d e r f l u i d i z e d c o n d i t i o n by h e i g h t o f p a c k e d
bed
12 Epsilon_m =0.456; // F r a c t i o n o f v o i d s i n p a c k e d bed

104
13 h0 =0.75; // H e i g h t o f p a c k e d bed (m)
14 k_r =4.45 ; // R e a c t i o n r a t e c o n s t a n t ( s e c 1)
15 W =5; // Weight o f t h e bed ( kg )
16
17
18 //CALCULATION
19 n = length ( X ) ;
20 for i =1: n
21 K0_L_by_u0 ( i ) = log (1/(1 - X ( i ) ) ) ; // R e f e r e q u a t i o n
9 . 2 1 Pg No . 3 7 1
22 L ( i ) = h_by_h0 ( i ) * h0 ;
23 one_minus_epsilon ( i ) =(1 - Epsilon_m ) / h_by_h0 ( i ) ;
24 k_rhob ( i ) = k_r * one_minus_epsilon ( i ) ;
25 K0 ( i ) = K0_L_by_u0 ( i ) * u0 ( i ) / L ( i ) ;
26 K ( i ) =1/(( K0 ( i ) .^( -1) ) -(1/ k_rhob ( i ) ) ) ; // R e f e r
e q u a t i o n 9 . 1 9 Pg No . 3 7 1
27 end
28
29
30 //OUTPUT
31 mprintf ( \ nThe v a l u e s o f K f o r g i v e n v e l o c i t i e s )
32 mprintf ( \n u (m/ s e c ) \ t K ( s e c 1) ) ;
33 mprintf ( \n
==================================================================
);
34 for i =1: n
35 mprintf ( \n %. 3 g \ t \ t %0 . 3 f , u0 ( i ) ,K ( i ) ) ;
36 end
37
38 // FILE OUTPUT
39 fid = mopen ( . \ Chapter9 Ex1Output . t x t , w ) ;
40 mfprintf ( fid , \ nThe v a l u e s o f K f o r g i v e n v e l o c i t i e s
)
41 mfprintf ( fid , \n u (m/ s e c ) \ t K ( s e c 1) ) ;
42 mfprintf ( fid , \n
==================================================================
);
43 for i =1: n

105
44 mfprintf ( fid , \n %. 3 g \ t \ t %0 . 3 f , u0 ( i ) ,K ( i ) ) ;
45 end
46
47 //==============================================END
OF PROGRAM
=============================================

Scilab code Exa 9.2 Model II Fraction unconverted naphthalene

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( IE d i t i o n
) M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 9 Ex9 . 2 Pg No . 3 8 9
3 // T i t l e : Model I I F r a c t i o n u n c o n v e r t e d n a p h t h a l e n e
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 D =2.13 ; // R e a c t o r D i a m e t e r (m)
9 L =7.9; // R e a c t o r l e n g t h (m)
10 dp_bar = 53*10^( -6) ; // P a r t i c l e s i z e (m)
11 u_mf =0.077; // Minimum f l u i d z a t i o n v e l o c i t y ( cm/ s )
12 u_mb =0.5; // Minimum b u b b l i n g v e l o c i t y ( cm/ s )
13 rho_bulk =770; // Bulk d e n s i t y ( kg /m3)
14 rho_b =350; // D e n s i t y ( kg /m3)
15 Epsilon_m =0.44; // P o r o s i t y o f bed
16 T_K =636; // R e a c t i o n T e m p e r a t u r e (K)
17 P =266; // R e a c t i o n P r e s s u r e ( kPa )
18 k_1 =1.8; // R e a c t i o n r a t e c o n s t a n t ( s e c 1)
19 k_2 = k_1 ;
20 u0 =0.43; // V e l o c i t y (m/ s e c )
21 C0 =2*10^( -2) ; // I n i t i a l c o n c e n t r a t i o n (%)

106
22
23 //CALCULATION
24 k = k_1 + k_2 ;
25 one_minus_epsilon =(1 - Epsilon_m ) *( rho_b / rho_bulk ) ;
26 k_corrected = k * one_minus_epsilon ; // b a s e d on bed
volume
27 Nr = k_corrected * L / u0 ;
28 K =0.8; // From f i g u r e 9 . 1 2 a t u0 =0.43m/ s e c Pg No . 3 7 6
29 Nm = K * L / u0 ; // R e f e r e q u a t i o n 9 . 2 1 Pg No . 3 7 1
30 N =1/((1/ Nm ) +(1/ Nr ) ) ; // R e f e r e q u a t i o n 9 . 2 2 Pg No . 3 7 1
31 X =(1 - exp ( - N ) ) ; // R e f e r e q u a t i o n 9 . 2 3 Pg No . 3 7 1
32 C_out =(1 - X ) * C0 ;
33 C_out_ppm = C_out *(10^6) ;
34
35 //OUTPUT
36 mprintf ( \ nThe f r a c t i o n o f n a p h t h a l e n e u n c o n v e r t e d
i s %0 . 0 f ppm , C_out_ppm ) ;
37
38 // FILE OUTPUT
39 fid = mopen ( . \ Chapter9 Ex2Output . t x t , w ) ;
40 mfprintf ( fid , \ nThe f r a c t i o n o f n a p h t h a l e n e
u n c o n v e r t e d i s %0 . 0 f ppm , C_out_ppm ) ;
41 mclose ( fid ) ;
42
43
44 //===========================================END OF
PROGRAM
=================================================

107
Chapter 10

Novel Reactors

Scilab code Exa 10.1 Fraction unconverted naphthalene based on model


II

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( I
E d i t i o n ) , M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 10 Ex10 . 1 Pg No . 408
3 // T i t l e : F r a c t i o n u n c o n v e r t e d n a p h t h a l e n e b a s e d on
model I I
4 //
==================================================================

5 clear
6 clc
7 //INPUT
8 T_ref =273; // R e f e r e n c e T e m p e r a t u r e
9 T_feed =300+ T_ref ; // T e m p e r a t u r e i n (K)
10 SV_STP =[60000 120000]; // S p a c e v e l o c i t y ( Hr 1)
11 t_cell =0.04; // T h i c k n e s s ( cm )
12 cell_unit_area =100/(2.54^2) ; //No o f c e l l s p e r u n i t
a r e a ( c e l l s /cm2 )
13 L_inch =6; // Length o f m o n o l i t h i c c o n v e r t e r ( I n c h e s )

108
14 Epsilon =0.68; // P o r o s i t y
15 myu =0.0284*(10^ -2) ; // V i s c o s i t y o f a i r ( P o i s e )
16 rho =6.17*10^( -4) ; // D e n s i t y o f a i r ( g /cm3 )
17
18
19 //CALCULATION
20 d = sqrt (1/ cell_unit_area ) - t_cell ;
21 Epsilon =( d ^2/( d + t_cell ) ^2) ;
22
23 // Assume t h e wash c o a t i n g l o w e r s d t o 0 . 2 1 cm and
Epsilon to 0 . 6 8 :
24 d_new =0.21;
25 Epsilon_new =0.68
26 a =4* Epsilon_new / d_new ;
27 SV = SV_STP .*( T_feed /( T_ref *3600) ) ; // R e f e r e q u a t i o n
10.13
28 L_cm = L_inch *2.54;
29 u0 = SV .*( L_cm ) ;
30 u = u0 .*(1/ Epsilon ) ;
31 Nu = myu / rho ; // K i n e m a t i c v i s c o s i t y
32 D_CO_N2_1 =0.192; // D i f f u s i o n c o e f f i c i e n t s f o r b i n a r y
g a s m i x t u r e s ( cm2/ s e c ) a t 288K
33 D_CO_N2_2 = D_CO_N2_1 *( T_feed /288) ^(1.7) ; // // D i f f u s i o n
c o e f f i c i e n t s f o r b i n a r y g a s m i x t u r e s ( cm2/ s e c ) a t
573K
34 Sc = Nu / D_CO_N2_2 ;
35 for i =1:2
36 Re ( i ) = d_new * u ( i ) / Nu ;
37 Re_Sc_d_by_L ( i ) = Re ( i ) * Sc *( d_new / L_cm ) ;
38 Sh ( i ) = 3.66 *(1+0.095* Re_Sc_d_by_L ( i ) ) ^(0.45) ; //
Refer equation 10.7
39 k_c ( i ) = Sh ( i ) * D_CO_N2_2 / d_new ;
40 X ( i ) =1 - exp (( - k_c ( i ) * a * L_cm * u0 ( i ) ^( -1) ) ) ; // R e f e r
equation10 .12
41 Percent_X ( i ) = X ( i ) *100;
42 end
43
44 //OUTPUT

109
45 mprintf ( \n The C o n v e r s i o n e x p e c t e d f o r t h e g i v e n
space v e l o c i t i e s );
46 mprintf ( \n S p a c e V e l o c i t y ( hr 1) \ t \ t C o n v e r s i o n (
%%) ) ;
47 mprintf ( \n
======================================================
);
48 for i =1:2
49 mprintf ( \n %. 0 f \ t \ t \ t \ t %. 1 f , SV_STP ( i ) ,
Percent_X ( i ) ) ;
50 end
51
52 // FILE OUTPUT
53 fid = mopen ( . \ Chapter10 Ex1Output . t x t , w ) ;
54 mfprintf ( fid , \n The C o n v e r s i o n e x p e c t e d f o r t h e
g i v e n space v e l o c i t i e s );
55 mfprintf ( fid , \n S p a c e V e l o c i t y ( hr 1) \ t \ t
C o n v e r s i o n (%%) ) ;
56 mfprintf ( fid , \n
======================================================
);
57 for i =1:2
58 mfprintf ( fid , \n %. 0 f \ t \ t \ t \ t %. 1 f , SV_STP ( i
) , Percent_X ( i ) ) ;
59 end
60 mclose ( fid ) ;
61
62
63 //================================================
END OF PROGRAM
=========================================================

110
Scilab code Exa 10.2 Conversion as a function of No of Gauzes

1 // H a r r i o t P . , 2 0 0 3 , C h e m i c a l R e a c t o r D e s i g n ( I
E d i t i o n ) , M a r c e l Dekker , I n c . , USA , pp 4 3 6 .
2 // Chapter 10 Ex10 . 2 Pg No . 414
3 // T i t l e : C o n v e r s i o n a s a f u n c t i o n o f No . o f Gauzes
4 //
==================================================================

5 clear
6 clc
7 // COMMON INPUT
8 M_NH3 =17; // M o l e c u l a r w e i g h t NH3
9 M_air =29; // M o l e c u l a r w e i g h t a i r
10 f_air =0.9; // F r a c t i o n o f a i r i n f e e d
11 f_NH3 =(1 - f_air ) ; // F r a c t i o n o f NH3 i n f e e d
12 myu_air =0.0435*(10^ -2) ; // V i s c o s i t y o f a i r ( P o i s e )
13 P_atm =(100+14.7) /14.7; // P r e s s u r e o f t h e s y s t e m
14 P_ref =1; // R e f e r e n c e P r e s s u r e
15 T_ref =273; // R e f e r e n c e t e m p e r a t u r e
16 T_inlet =300+ T_ref ; // I n l e t T e m p e r a t u r e
17 V_ref =22400;
18 T_surf =700+ T_ref ; // S u r f a c e T e m p e r a t u r e
19 u0 =1.8; // V e l o c i t y a t 300 C (m/ s e c )
20 d =0.076*(10^ -1) ; // S i z e o f w i r e ( cm )
21 D_NH3_N2 =0.23; // D i f f u s i v i t y a t 298 K 1 atm ( cm2/ s )
22 N =32; // Gauzes ( w i r e s /cm )
23 frac_N2 = 0.25*(10^( -2) ) ; // F r a c t i o n o f NH3 f e d i n t o
N2 ( B y p r o d u c t r e a c t i o n )
24 n =[1 2 5 10 15 20]; //No . o f Gauzes
25
26
27 //CALCULATION ( Ex 1 0 . 2 . a )
28 M_ave = f_air * M_air + f_NH3 * M_NH3 ;
29 rho =( M_ave * T_ref * P_atm ) /( V_ref * T_surf * P_ref ) ;
30 u0_surf = u0 *( T_surf / T_inlet ) ;
31 Re = rho * u0_surf *100* d / myu_air ;
32 Gamma = [1 -32*( d ) ]^2; // From e q u a t i o n 1 0 . 5

111
33 Re_Gamma = Re / Gamma ;
34 D_NH3 = 0.23*( T_surf /298) ^(1.7) *(1/7.8) ; // a t 7 . 8
atm 700 C
35 Sc =( myu_air * P_ref ) /( rho * D_NH3 ) ;
36 j_D = 0.644*( Re_Gamma ) ^( -0.57) ; // R e f e r e q u a t i o n
10.14
37 k_c = j_D *( u0_surf *100/ Gamma ) *(1/( Sc ) ^(2/3) ) ;
38 a_dash = 2*( %pi ) *( d ) * N
39 k_c_a_dash_u0 =( k_c * a_dash ) /( u0_surf *100) ;
40 m = length ( n )
41 for i = 1: m
42 X ( i ) = (1 - exp ( - k_c_a_dash_u0 * n ( i ) ) ) ;
43 end
44 //CALCULATION ( Ex 1 0 . 2 . b )
45 for i = 1: m
46 X ( i ) = (1 - exp ( - k_c_a_dash_u0 * n ( i ) ) ) ;
47 Yield ( i ) = X ( i ) - frac_N2 * n ( i ) ;
48 end
49
50
51 //OUTPUT( Ex 1 0 . 2 . a )
52 mprintf ( \n OUTPUT Ex10 . 2 . a ) ;
53 mprintf ( \n===================================== ) ;
54 mprintf ( \n \ tThe Ammonia C o n v e r s i o n ) ;
55 mprintf ( \n===================================== ) ;
56 mprintf ( \n\ t Gauzes Conversion );
57 mprintf ( \n\ t (n) (X) ) ;
58 mprintf ( \n===================================== ) ;
59 for i =1: m
60 mprintf ( \n\ t %. 0 f \ t \ t %. 3 f ,n ( i ) ,X ( i ) ) ;
61 end
62
63 //OUTPUT( Ex 1 0 . 2 . b )
64 mprintf ( \n\n\n OUTPUT Ex10 . 2 . b ) ;
65 mprintf ( \n
========================================== ) ;
66 mprintf ( \n \ tThe Ammonia Y i e l d ) ;
67 mprintf ( \n

112
========================================== ) ;
68 mprintf ( \n\ t Gauzes Y i e l d );
69 mprintf ( \n\ t ( n ) (X%fn ) , frac_N2 ) ;
70 mprintf ( \n
========================================== ) ;
71 for i =1: m
72 mprintf ( \n\ t %. 0 f \ t \ t %. 3 f ,n ( i ) , Yield ( i ) ) ;
73 end
74 // FILE OUTPUT
75 fid = mopen ( . \ Chapter10 Ex2Output . t x t , w ) ;
76 mfprintf ( fid , \n OUTPUT Ex10 . 2 . a ) ;
77 mfprintf ( fid , \n
===================================== ) ;
78 mfprintf ( fid , \n \ tThe Ammonia C o n v e r s i o n ) ;
79 mfprintf ( fid , \n
===================================== ) ;
80 mfprintf ( fid , \n\ t Gauzes Conversion );
81 mfprintf ( fid , \n\ t ( n ) (X) ) ;
82 mfprintf ( fid , \n
===================================== ) ;
83 for i =1: m
84 mfprintf ( fid , \n\ t %. 0 f \ t \ t %. 3 f ,n ( i ) ,X ( i ) )
;
85 end
86 mfprintf ( fid , \n\n\n OUTPUT Ex10 . 2 . b ) ;
87 mfprintf ( fid , \n
========================================== ) ;
88 mfprintf ( fid , \n \ tThe Ammonia Y i e l d ) ;
89 mfprintf ( fid , \n
========================================== ) ;
90 mfprintf ( fid , \n\ t Gauzes Y i e l d );
91 mfprintf ( fid , \n\ t ( n ) (X%fn ) , frac_N2
);
92 mfprintf ( fid , \n
========================================== ) ;
93 for i =1: m
94 mfprintf ( fid , \n\ t %. 0 f \ t \ t %. 3 f ,n ( i ) , Yield (
i));

113
95 end
96 mclose ( fid ) ;
97
98 //
====================================================
END OF PROGRAM
====================================================

114

You might also like