Scilab Code for Unit Operations of Chemical Engineeringby Warren L.. Smith, Peter Harriott 1 Created by Prashant Dave Sr.. Indian Institute of Technology, Bombay College Teacher and Revi
Trang 1Scilab Code for Unit Operations of Chemical Engineering
by Warren L McCabe, Julian C Smith, Peter
Harriott 1
Created by Prashant Dave
Sr Research Fellow Chem Engg.
Indian Institute of Technology, Bombay
College Teacher and Reviewer
Trang 2Book Details
Author: Warren L McCabe, Julian C Smith, Peter Harriott
Title: Unit Operations of Chemical Engineering
Publisher: McGraw-Hill, Inc
Edition: Fifth
Year: 1993
Place: New Delhi
ISBN: 0-07-112738-0
Trang 3Contents
Trang 411 Principles of Heat Flow in Fluids 48
Trang 6List of Scilab Code
1.1 Example 1.1.sce 9
2.1 Example 2.1.sce 11
2.2 Example 2.2.sce 11
4.1 Example 4.1.sce 13
4.2 Example 4.2.sce 14
4.3 Example 4.3.sce 15
4.4 Example 4.4.sce 16
5.1 Example 5.1.sce 18
6.1 Example 6.1.sce 20
6.2 Example 6.2.sce 22
6.3 Example 6.3.sce 23
7.1 Example 7.1.sce 25
7.2 Example 7.2.sce 26
7.3 Example 7.3.sce 27
8.1 Example 8.1.sce 29
8.2 Example 8.2.sce 30
8.3 Example 8.3.sce 31
8.4 Example 8.4.sce 32
8.5 Example 8.5.sce 33
8.6 Example 8.6.sce 34
9.1 Example 9.1.sce 36
9.2 Example 9.2.sce 37
9.3 Example 9.3.sce 37
9.4 Example 9.4.sce 38
9.5 Example 9.5.sce 39
9.6 Example 9.6.sce 39
9.7 Example 9.7.sce 41
9.8 Example 9.8.sce 42
Trang 710.1 Example 10.1.sce 44
10.2 Example 10.2.sce 44
10.3 Example 10.3.sce 46
10.4 Example 10.4.sce 46
10.5 Example 10.5.sce 47
11.1 Example 11.1.sce 48
12.1 Example 12.1.sce 50
12.2 Example 12.2.sce 50
12.3 Example 12.3.sce 53
12.4 Example 12.4.sce 54
13.1 Example 13.1.sce 56
13.2 Example 13.2.sce 58
14.1 Example 14.1.sce 60
15.1 Example 15.1.sce 62
15.2 Example 15.2.sce 63
15.3 Example 15.3.sce 64
15.4 Example 15.4.sce 65
16.1 Example 16.1.sce 67
16.2 Example 16.2.sce 69
16.3 Example 16.3.sce 69
17.1 Example 17.1.sce 71
17.2 Example 17.2.sce 73
18.1 Example 18.1.sce 75
18.2 Example 18.2.sce 76
18.3 Example 18.3.sce 79
18.4 Example 18.4.sce 80
18.6 Example 18.6.sce 81
18.7 Example 18.7.sce 84
18.8 Example 18.8.sce 85
19.2 Example 19.2.sce 86
19.3 Example 19.3.sce 88
19.4 Example 19.4.sce 89
19.5 Example 19.5.sce 91
20.1 Example 20.1.sce 93
20.2 Example 20.2.sce 94
20.3 Example 20.3.sce 97
21.1 Example 21.1.sce 102
21.2 Example 21.2.sce 103
Trang 821.3 Example 21.3.sce 103
21.4 Example 21.4.sce 104
21.5 Example 21.5.sce 105
21.6 Example 21.6.sce 107
22.1 Example 22.1.sce 108
22.2 Example 22.2.sce 109
22.3 Example 22.3.sce 110
22.4 Example 22.4.sce 114
22.5 Example 22.5.sce 115
22.6 Example 22.6.sce 118
23.1 Example 23.1.sce 122
23.3 Example 23.3.sce 124
24.1 Example 24.1.sce 126
24.2 Example 24.2.sce 127
24.3 Example 24.3.sce 128
24.4 Example 24.4.sce 129
25.1 Example 25.1.sce 132
25.2 Example 25.2.sce 133
25.3 Example 25.3.sce 136
25.4 Example 25.4.sce 138
26.1 Example 26.1.sce 141
26.4 Example 26.4.sce 143
26.5 Example 26.5.sce 144
27.1 Example 27.1.sce 146
27.2 Example 27.2.sce 147
27.3 Example 27.3.sce 148
27.4 Example 27.4.sce 148
27.5 Example 27.5.sce 149
27.6 Example 27.6.sce 150
28.1 Example 28.1.sce 155
28.2 Example 28.2.sce 156
29.1 Example 29.1.sce 158
29.2 Example 29.2.sce 158
30.1 Example 30.1.sce 162
30.2 Example 30.2.sce 164
30.3 Example 30.3.sce 169
30.4 Example 30.4.sce 170
30.5 Example 30.5.sce 173
Trang 9List of Figures
17.1 Diagram for Example 17.1 73
18.1 Results of Example 18.1 76
20.1 Diagram for Example 20.2 97
20.2 Diagram for Example 20.3 100
22.1 Diagram for Example 22.3 113
22.2 Diagram for Example 22.6 121
25.1 Breakthrough curves for Example 25.2 136
27.1 Population density vs length Example 27.6 153
27.2 Size-distribution relations for Example 27.6 154
29.1 Mass-fractions of Example 29.2 161
30.1 Analysis for Example 30.1 164
30.2 t/V vs V for Example 30.2 167
30.3 Rm vs deltaP for Example 30.2 168
30.4 alpha vs deltaP for Example 30.2 169
30.5 Effect of pressure drop and concentration on flux for Exam-ple 30.4 173
Trang 1415 disp( ’ l b / h r ’ , mdot , ’ mass f l o w r a t e p i p e A = ’ )
16 disp( ’ l b / h r ’ , mdot , ’ mass f l o w r a t e p i p e B = ’ )
17 disp( ’ l b / h r ’ , mdot_C , ’ mass f l o w r a t e p i p e C = ’ )
18
19 // ( b )
Trang 19Chapter 5
Flow of Incompressible Fluids
in Conduits and Thin Layers
Trang 2315 A = 2 * ( 1 + ( ( gama -1) /2) * Ma_a ^2) /(( gama +1) * Ma_a ^2) ;
16 f L m a x _ r h = (1/ Ma_a ^2 -1 -( gama +1) *log( A ) /2) / gama
21 pa = pr /( A ^( gama /( gama -1) ) ) // [ atm ]
22 // From Example 6 1 , t h e d e n s i t y o f a i r a t 20 atm and
1 0 0 0R i s 0 7 9 5 l b / f t ˆ3
23 // U s i n g Eq ( 6 1 7 ) , t h e a c o u s t i c v e l o c i t y
24 Aa = sqrt( gc * gama * Tr * R / M ) // [m/ s ]
Trang 2918 L b y L m = 1 2 5 ;
19 eps = 0 5 2 ;
20 // From Eq ( 7 5 9 )
21 V o _ b a r = 1 9 4 * ( 0 5 2 / 0 4 0 ) ^3.9 // [mm/ s ]
Trang 40Example 9.5 Example 9.5.sce
Trang 4425 // b l e n d i n g i n t h e 6− f t v e s s e l wo ul d be
26 t6 = t1 * n 6 b y n 1 // [ s ]
Trang 47Example 10.3 Example 10.3.sce
Trang 4823 Q T b y A = s * rho * Cp *( Tb_bar - Ta ) // [ Btu / f t ˆ 2 ]
Example 10.5 Example 10.5.sce
Trang 5018 // 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
19 Uo = 1/( Do /( Di * hdi ) + Do /( Di * hi ) +( xw * Do ) /( km * D L _ b a r )
+1/ ho +1/ hdo ) // [ Btu / f t ˆ2−h−F ]
Trang 51Chapter 12
Heat Transfer to Fluids
without Phase Change
Trang 5340 V w _ b a r = m w _ d o t /( %pi /4*( Dij ^2 - Dot ^2) * r h o _ w ) ; // [ f t / s
Trang 6624 disp( ’C ’ , Log_T , ’ The c o r r e c t mean e m p e r a t u r e d r o p i s ’
Trang 74Figure 17.1: Diagram for Example 17.1
Example 17.2 Example 17.2.sce
Trang 7721 y l a b e l( ’ C o n c e n t r a t i o n , m o l e f r a c t i o n B e n z e n e ’ )
22 l e g e n d ( ’ T e m p e r a t u r e (C) ∗ 1 0 0 ’ , ’ Con o f Bnz ene i n
l i q u i d ’ , ’ Con o f Bnz ene i n v a p o r ’ )
Figure 18.1: Results of Example 18.1
Example 18.2 Example 18.2.sce
1 c l e a r all;
2 clc;
3
4 // Example 1 8 2
Trang 86Example 18.8 Example 18.8.sce
Trang 89Example 19.3 Example 19.3.sce
Trang 9032 xB = [ 0 0 1 , 0 5 4 4 , 0 4 4 6 ] ’ ;
33 c o m p _ D = xD * D ;
34 c o m p _ B = xB * B ;
35
36 disp( ’ mol / h ’ , c o m p _ D (3) , ’ n−o c t a n e ’ , ’ mol / h ’ , c o m p _ D (2) ,
’ n−h e p t a n e ’ , ’ mol / h ’ , comp_D (1) , ’ n−h e x a n e ’ , ’ The
c o m p o s i t i o n o f t h e o v e r h e a d p r o d u c t i s ’ ) ;
37 disp( ’ mol / h ’ , c o m p _ B (3) , ’ n−o c t a n e ’ , ’ mol / h ’ , c o m p _ B (2) ,
’ n−h e p t a n e ’ , ’ mol / h ’ , comp_B (1) , ’ n−h e x a n e ’ , ’ The
Trang 9142 fnew = sum((( a l p h a L K _ H K * xD ) /( a l p h a L K _ H K - phi ) ) ) ;
43 err = abs( f - fnew ) ;
44 if ( f > fnew )
45 phi = phi + 0 0 1 ;
Trang 9319 fnew = sum((( a l p h a * xD ) /( alpha - phi ) ) ) ;
20 err = abs( f - fnew ) ;
Trang 9545 disp( N +1 , ’ The t o t a l number o f i d e a l s t a g e s i s ’ ) ;
Example 20.2 Example 20.2.sce
1 c l e a r all;
2 clc;
Trang 98a r e
73 N = 4;
74 disp( N , ’ Number o f s t a g e s r e q u i r e d a r e ’ )
Figure 20.1: Diagram for Example 20.2
Example 20.3 Example 20.3.sce
1 c l e a r all;
2 clc;
3
4 // Example 2 0 3
Trang 103Chapter 21
Principles of Diffusion and
Mass Transer between Phases
Trang 10740 neta = 1 -exp( - NOy ) ;
41 disp( neta , ’ The e f f i c i e n y w i l l be ’ )
Trang 108Example 21.6 Example 21.6.sce
Trang 11038 disp( ’ i n H2O ’ , Pt , ’ The p r e s s u r e d r o p w ou ld be ’ ) ;
Example 22.2 Example 22.2.sce
Trang 115Example 22.4 Example 22.4.sce
Trang 122Figure 22.2: Diagram for Example 22.6
Trang 12913 tT = 4* s ^2/( %pi ^2* D v p r i m e ) *log(8* X1 /( %pi ^2* X ) ) / 3 6 0 0 ;
Trang 13046 Nre = 1 / 4 8 * Vbar * r h o _ a /( mu_a * 6 7 2 * 1 0 ^ - 4 ) ;
47 Npr = mu_a * 2 4 2 * Cp_a / k_a ;
Trang 137Figure 25.1: Breakthrough curves for Example 25.2
Example 25.3 Example 25.3.sce
Trang 142Chapter 26
Membrane Separation Processes
Trang 14481 disp( ’ f t ˆ 2 ’ ,A , ’ The membrane a r e a n e e d e d i s ’ )
Example 26.4 Example 26.4.sce
Trang 154Figure 27.1: Population density vs length Example27.6
Trang 155Figure 27.2: Size-distribution relations for Example 27.6
Trang 156Chapter 28
Properties, Handling and
Mixing of Particulate Soilds
Trang 162Figure 29.1: Mass-fractions of Example29.2
Trang 165Figure 30.1: Analysis for Example 30.1
Example 30.2 Example 30.2.sce
Trang 168Figure 30.2: t/V vs V for Example 30.2
Trang 169Figure 30.3: Rm vs deltaP for Example 30.2
Trang 170Figure 30.4: alpha vs deltaP for Example 30.2
Example 30.3 Example 30.3.sce
Trang 17123 disp( ’ f t ˆ 2 ’ , AT , ’ F i l t e r Area (AT) = ’ ) ;
Example 30.4 Example 30.4.sce
Trang 174Figure 30.5: Effect of pressure drop and concentration on flux for ple 30.4
Exam-Example 30.5 Exam-Example 30.5.sce