Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 176 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
176
Dung lượng
1,6 MB
Nội dung
Scilab Code for UnitOperationsofChemicalEngineering by Warren L McCabe, Julian C Smith, Peter Harriott1 Created by Prashant Dave Sr Research Fellow Chem Engg Indian Institute of Technology, Bombay College Teacher and Reviewer IIT Bombay 30 October 2010 Funded by a grant from the National Mission on Education through ICT, http://spoken-tutorial.org/NMEICT-Intro This text book companion and Scilab codes written in it can be downloaded from the ”Textbook Companion Project” Section at the website http://scilab.in/ Book Details Author: Warren L McCabe, Julian C Smith, Peter Harriott Title: UnitOperationsofChemicalEngineering Publisher: McGraw-Hill, Inc Edition: Fifth Year: 1993 Place: New Delhi ISBN: 0-07-112738-0 Contents List of Scilab Code Definitions and Principles 1.1 Scilab Code 9 Fluid Statics and its Application 2.1 Scilab Code 11 11 Basic Equations of Fluid Flow 4.1 Scilab Code 13 13 Flow of Incompressible Fluids in Conduits and Thin Layers 5.1 Scilab Code 18 18 Flow of Compressible Fluids 6.1 Scilab Code 20 20 Flow Past Immersed Bodies 7.1 Scilab Code 25 25 Transportation and Metering of Fluids 8.1 Scilab Code 29 29 Agitation and Mixing of Liquids 9.1 Scilab Code 36 36 10 Heat Transfer by Conduction 10.1 Scilab Code 44 44 11 Principles of Heat Flow in Fluids 11.1 Scilab Code 48 48 12 Heat Transfer to Fluids without Phase Change 12.1 Scilab Code 50 50 13 Heat Transfer to Fluids with Phase Change 13.1 Scilab Code 56 56 14 Radiation Heat Transfer 14.1 Scilab Code 60 60 15 Heat-Exchange Equipment 15.1 Scilab Code 62 62 16 Evaporation 16.1 Scilab Code 67 67 17 Equilibrium-Stage Operations 17.1 Scilab Code 71 71 18 Distillation 18.1 Scilab Code 75 75 19 Introduction to Multicomponent Distillation 19.1 Scilab Code 86 86 20 Leaching and Extraction 20.1 Scilab Code 93 93 21 Principles of Diffusion and Mass Transer between Phases 102 21.1 Scilab Code 102 22 Gas Absorption 108 22.1 Scilab Code 108 23 Humidification Operations 122 23.1 Scilab Code 122 24 Drying of Solids 126 24.1 Scilab Code 126 25 Adsorption 132 25.1 Scilab Code 132 26 Membrane Separation Processes 141 26.1 Scilab Code 141 27 Crystallization 146 27.1 Scilab Code 146 28 Properties, Handling and Mixing of Particulate Soilds 155 28.1 Scilab Code 155 29 Size Reduction 158 29.1 Scilab Code 158 30 Mechanical Separations 162 30.1 Scilab Code 162 List of Scilab Code 1.1 2.1 2.2 4.1 4.2 4.3 4.4 5.1 6.1 6.2 6.3 7.1 7.2 7.3 8.1 8.2 8.3 8.4 8.5 8.6 9.1 9.2 9.3 9.4 9.5 9.6 9.7 9.8 Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example 1.1.sce 2.1.sce 2.2.sce 4.1.sce 4.2.sce 4.3.sce 4.4.sce 5.1.sce 6.1.sce 6.2.sce 6.3.sce 7.1.sce 7.2.sce 7.3.sce 8.1.sce 8.2.sce 8.3.sce 8.4.sce 8.5.sce 8.6.sce 9.1.sce 9.2.sce 9.3.sce 9.4.sce 9.5.sce 9.6.sce 9.7.sce 9.8.sce 11 11 13 14 15 16 18 20 22 23 25 26 27 29 30 31 32 33 34 36 37 37 38 39 39 41 42 10.1 10.2 10.3 10.4 10.5 11.1 12.1 12.2 12.3 12.4 13.1 13.2 14.1 15.1 15.2 15.3 15.4 16.1 16.2 16.3 17.1 17.2 18.1 18.2 18.3 18.4 18.6 18.7 18.8 19.2 19.3 19.4 19.5 20.1 20.2 20.3 21.1 21.2 Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example 10.1.sce 10.2.sce 10.3.sce 10.4.sce 10.5.sce 11.1.sce 12.1.sce 12.2.sce 12.3.sce 12.4.sce 13.1.sce 13.2.sce 14.1.sce 15.1.sce 15.2.sce 15.3.sce 15.4.sce 16.1.sce 16.2.sce 16.3.sce 17.1.sce 17.2.sce 18.1.sce 18.2.sce 18.3.sce 18.4.sce 18.6.sce 18.7.sce 18.8.sce 19.2.sce 19.3.sce 19.4.sce 19.5.sce 20.1.sce 20.2.sce 20.3.sce 21.1.sce 21.2.sce 44 44 46 46 47 48 50 50 53 54 56 58 60 62 63 64 65 67 69 69 71 73 75 76 79 80 81 84 85 86 88 89 91 93 94 97 102 103 21.3 21.4 21.5 21.6 22.1 22.2 22.3 22.4 22.5 22.6 23.1 23.3 24.1 24.2 24.3 24.4 25.1 25.2 25.3 25.4 26.1 26.4 26.5 27.1 27.2 27.3 27.4 27.5 27.6 28.1 28.2 29.1 29.2 30.1 30.2 30.3 30.4 30.5 Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example Example 21.3.sce 21.4.sce 21.5.sce 21.6.sce 22.1.sce 22.2.sce 22.3.sce 22.4.sce 22.5.sce 22.6.sce 23.1.sce 23.3.sce 24.1.sce 24.2.sce 24.3.sce 24.4.sce 25.1.sce 25.2.sce 25.3.sce 25.4.sce 26.1.sce 26.4.sce 26.5.sce 27.1.sce 27.2.sce 27.3.sce 27.4.sce 27.5.sce 27.6.sce 28.1.sce 28.2.sce 29.1.sce 29.2.sce 30.1.sce 30.2.sce 30.3.sce 30.4.sce 30.5.sce 103 104 105 107 108 109 110 114 115 118 122 124 126 127 128 129 132 133 136 138 141 143 144 146 147 148 148 149 150 155 156 158 158 162 164 169 170 173 List 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 20.2 Diagram for Example 20.3 97 100 22.1 Diagram for Example 22.3 22.2 Diagram for Example 22.6 113 121 25.1 Breakthrough curves for Example 25.2 136 27.1 Population density vs length Example 27.6 27.2 Size-distribution relations for Example 27.6 153 154 29.1 Mass-fractions of Example 29.2 161 30.1 30.2 30.3 30.4 30.5 164 167 168 169 Analysis for Example 30.1 t/V vs V for Example 30.2 Rm vs deltaP for Example 30.2 alpha vs deltaP for Example 30.2 Effect of pressure drop and concentration on flux ple 30.4 for Exam 173 Chapter Definitions and Principles 1.1 Scilab Code Example 1.1 Example 1.1.sce clear all ; clc ; // Example // S o l u t i o n // ( a ) // U s i n g Eq ( , ) , ( ) , and ( ) // L e t N = 1N 10 N = 0.3048/(9.80665*0.45359237*0.3048) ; // [ l b f ] 11 12 // ( b ) 13 // U s i n g ( ) , ( ) , ( ) , and ( ) 14 // L e t B = Btu 15 B = 0.45359237*1000/1.8; // [ c a l ] 16 17 // ( c ) 18 // U s i n g Eq ( ) , ( ) , ( ) , ( ) , ( ) , 19 and ( ) // L e t P = atm Figure 29.1: Mass-fractions of Example 29.2 161 Chapter 30 Mechanical Separations 30.1 Scilab Code Example 30.1 Example 30.1.sce clear all ; clc ; // Example // Given // From T a b l e Dp = [4.699 ,3.327 ,2.362 ,1.651 ,1.168 ,0.833 ,0.589 ,0.417 ,0.208 ,0.0000001] ’ // [mm] F = [0 ,0.025 ,0.15 ,0.47 ,0.73 ,0.885 ,0.94 ,0.96 ,0.98 ,1.0] ’; O = [0 ,0.071 ,0.43 ,0.85 ,0.97 ,0.99 ,1.00] ’; // [ t o ] 10 U = [0.0 ,0.195 ,0.58 ,0.83 ,0.91 ,0.94 ,0.975 ,1.00] ’; // [ to 10] 11 12 13 14 15 // S o l u t i o n plot ( Dp , F ) plot ( Dp (1:7) ,O , ’ r ’ ) plot ( Dp (3: $ ) ,U , ’ g ’ ) 162 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 xgrid () ; xlabel ( ’Dp mm’ ) ; ylabel ( ’ C u m u l a t i v e mass f r a c t i o n l a r g e r t h a n Dp ’ ) ; title ( ’ A n a l y s i s f o r Example ’ ) ; legend ( ’ Feed ’ , ’ O v e r s i z e ’ , ’ U n d e r s i z e ’ ) ; // Cut−p o i n t d i a m e t e r from t h e T a b l e Dcp = 1.651; // [mm] xF = 0.47; xD = 0.85; xB = 0.195; // From Eq ( ) DbyF = ( xF - xB ) /( xD - xB ) ; BbyF = - DbyF ; // U s i n g Eq ( ) , o v e r a l l e f f e c t i v e n e s s E = ( xF - xB ) *( xD - xF ) *(1 - xB ) *( xD ) /(( xD - xB ) ^2*((1 - xF ) * xF ) ) ; 32 disp ( ’ r e s p e c t i v e l y ’ , BbyF , DbyF , ’ mass r a t i o o f o v e r f l o w and u n d e r f l o w i s ’ ) ; 33 disp (E , ’ O v e r a l l E f f e c t i v e n e s s (E) = ’ ) ; 163 Figure 30.1: Analysis for Example 30.1 Example 30.2 Example 30.2.sce clear all ; clc ; // Example // Given // From T a b l e V = linspace (0.5 ,6 ,12) ’; // [ L ] t1 = [17.3 ,41.3 ,72 ,108.3 ,152.1 ,201.7] ’; // [ s ] t2 = [6.8 ,19 ,34.6 ,53.4 ,76 ,102 ,131.2 ,163] ’; // [ s ] 164 10 t3 = [6.3 ,14 ,24.2 ,37 ,51.7 ,69 ,88.8 ,110 ,134 ,160] ’; // [ s] 11 t4 = 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 [5 ,11.5 ,19.8 ,30.1 ,42.5 ,56.8 ,73 ,91.2 ,111 ,133 ,156.8 ,182.5] ’; // [ s ] t5 = [4.4 ,9.5 ,16.3 ,24.6 ,34.7 ,46.1 ,59 ,73.6 ,89.4 ,107.3] ’; // [ s ] figure (1) ; plot ( V (1: length ( t1 ) ) , t1 / V (1: length ( t1 ) ) ) ; plot ( V (1: length ( t2 ) ) , t2 / V (1: length ( t2 ) ) , ’ r ’ ) ; plot ( V (1: length ( t3 ) ) , t3 / V (1: length ( t3 ) ) , ’ g ’ ) ; plot ( V (1: length ( t4 ) ) , t4 / V (1: length ( t4 ) ) , ’ k ’ ) ; plot ( V (1: length ( t5 ) ) , t5 / V (1: length ( t5 ) ) , ’ y ’ ) ; xgrid () ; xlabel ( ’V ( L ) ’ ) ; ylabel ( ’ t /V ( s /L ) ’ ) ; legend ( ’ deptaP = ’ , ’ deptaP = ’ , ’ deptaP = ’ , ’ deptaP = ’ , ’ deptaP = ’ ) ; title ( ’ t /V v s V ’ ) ; deltaP = [965 ,2330 ,4060 ,5230 ,7070] ’; // [ l b f / f t ˆ ] // From F i g // S l o p e ( Kc / ) slope = [10440 ,5800 ,3620 ,3060 ,2400] ’; // [ s / f t ˆ ] Kc = slope *2; // [ s / f t ˆ ] // I n t e r c e p t ( / q0 ) Inter = [800 ,343 ,267 ,212 ,180] ’; // [ s / f t ˆ ] // V i s c o s i t y o f w a t e r muw = 5.95*10^ -4; // [ l b / f t −s ] , from Appendix 14 // F i l t e r a r e a A = 440/30.48^2; // [ f t ˆ ] // c o n c e n t r a t i o n c = 23.5*28.31/454; // [ l b / f t ˆ ] gc = 32.14; // U s i n g Eq ( 2 ) Rm = A * gc / muw * deltaP *( Inter ) /10^10; // [ f t ˆ −1∗10ˆ10] 165 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 // U s i n g Eq ( ) alpha = A ^2* gc /( c * muw ) * deltaP *( Kc ) /10^11; // [ f t / l b ∗10ˆ −11] figure (2) ; plot2d ( deltaP , Rm ) ; xgrid () ; xlabel ( ’ d e l t a P ( l b f / f t ˆ ) ’ ) ; ylabel ( ’Rm ( f t ˆ −1∗10ˆ −10) ’ ) ; title ( ’Rm v s d e l t a P ’ ) ; figure (3) ; plot2d ( log ( deltaP ) , log ( alpha ) ) ; xgrid () ; xlabel ( ’ d e l t a P ( l b f / f t ˆ ) ’ ) ; ylabel ( ’ a l p h a ( l b / f t ∗10ˆ −11) ’ ) ; title ( ’ a l p h a v s d e l t a P ’ ) ; // Form disp ( Rm , ’Rm ( f t ˆ −1∗10ˆ −10) = ’ ) ; disp ( alpha , ’ a l p h a ( l b / f t ∗10ˆ −11) = ’ ) ; alpha0 = 1.75*10^11/1000^0.26; disp ( ’ a l p h a = ∗ ˆ ∗ d e l t a P ˆ ’ , ’ E m p e r i c a l Equation f o r the cake ’ ); 166 Figure 30.2: t/V vs V for Example 30.2 167 Figure 30.3: Rm vs deltaP for Example 30.2 168 Figure 30.4: alpha vs deltaP for Example 30.2 Example 30.3 Example 30.3.sce clear all ; clc ; // Example // Given f = 0.30; tc = 5*60; // [ s ] n = 1/ tc ; // [ s ˆ −1] cF = 14.7; // [ l b / f t ˆ ] 169 10 11 12 13 14 15 16 17 18 19 20 21 22 deltaP = 1414; mFbymC = // S o l u t i o n alpha0 = 2.9*10^10; // [ f t / l b ] , From Example s = 0.26; mu = 6.72*10^ -4; // [ l b / f t −s ] rho = 62.3; // [ l b / f t ˆ ] gc =32.17; // U s i n g Eq ( ) c = cF /(1 -( mFbymC -1) *( cF / rho ) ) ; // [ l b / f t ˆ ] mcdot = 10/(60*7.48) *(1/( cF /168.8+1) ) * cF ; // [ l b / s ] // S o l v i n g Eq ( ) AT = mcdot *( alpha0 * mu /(2* c *1414^(1 - s ) * gc * f * n ) ) ^(0.5) ; 23 disp ( ’ f t ˆ2 ’ ,AT , ’ F i l t e r Area (AT) = ’ ) ; Example 30.4 Example 30.4.sce 10 11 12 13 14 15 16 17 18 19 clear all ; clc ; // Example // Given D = 2; // [ cm ] Vbar = 150; // [ cm/ s ] rho = 1; // [ g /cm ˆ ] mu = 0.01; // [ g /cm−s ] Dv = 4*10^ -7; // [ cmˆ2/ s ] // S o l u t i o n // ( a ) Nre = Vbar * D * rho / mu ; Nsc = mu /( rho * Dv ) ; // U s i n g Eq ( 5 ) Nsh = 0.0096* Nre ^0.913* Nsc ^0.346; kc = Nsh * Dv / D ; // [ cm/ s ] pi = poly ([0 ,4.4*10^ -3 , -1.7*10^ -6 ,7.9*10^ -8] , ’ c ’ ,” c o e f f ”); 170 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 // For c1 = 10; // [ g /L ] v = 10^ -3; // [ cm/ s ] // U s i n g Eq ( ) cs = c1 * exp ( v / kc ) ; // [ g /L ] deltaPi = horner ( pi , cs ) ; Qm = 250/36000; // [ cm/ s−atm ] // U s i n g Eq ( ) deltaP = v / Qm + deltaPi ; // [ atm ] // U s i n g Eq ( ) cs = 400; vmax = kc * log ( cs / c1 ) ; // [ cm/ s ] deltaP = vmax / Qm + horner ( pi , cs ) ; // [ tm ] c = [10 ,20 ,40]; V =[]; deltaP =[]; for j = 1: length ( c ) c1 = c ( j ) ; i = 1; vmax = kc * log ( cs / c1 ) *10^4; h = ( vmax -1) /1000; for v = 1: h : vmax cs = c1 * exp ( v *10^ -4/ kc ) ; // [ g /L ] deltaPi = horner ( pi , cs ) ; // [ atm ] deltaP (j , i ) = v *10^ -4/ Qm + deltaPi ; // [ atm ] V (j , i ) = v *10^ -4; i = i +1; end end V = V *36000; for l =1: length ( c ) figure (1) plot2d ( deltaP (l ,:) ,V (l ,:) , style = l ) ; xgrid () ; xlabel ( ’ d e l t a P ( atm ) ’ ) ; ylabel ( ’ Pe rmeate f l u x ( L/mˆ2−h ) ’ ) ; title ( ’ E f f e c t i v e p r e s s u r e d r o p and c o n c e n t r a t i o n on f l u x ’ ) 171 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 legend ( ’ Cf =10 , ’ , ’ Cf =20 ’ , ’ Cf =40 ’ ) ; end // ( b ) Qmb = Qm /5; // [ cm/ s−atm ] vb = 10^ -3; // [ cm/ s ] c = 40; // [ g /L ] c1 = 40; csb = c1 * exp ( vb / kc ) ; deltaPi = horner ( pi , csb ) ; deltaPb = vb / Qmb + deltaPi ; disp ( ’ The l a r g e s t e f f e c t o f t h e l o w e r membrane p e r m e a b i l i t y i s a 30 p e r c e n t r e d u c t i o n i n low p r e s s u r e drop ’ ); i = 1; vmax = kc * log (400/ c1 ) *10^4; h = ( vmax -1) /1000; for vb = 1: h : vmax csb = c1 * exp ( vb *10^ -4/ kc ) ; // [ g /L ] deltaPi = horner ( pi , csb ) ; // [ atm ] deltaPb ( i ) = vb *10^ -4/ Qmb + deltaPi ; // [ atm ] Vb ( i ) = vb *10^ -4; i = i +1; end Vb = Vb *36000; plot2d ( deltaPb , Vb , style = l +1) legend ( ’ Cf =10 , ’ , ’ Cf =20 ’ , ’ Cf =40 ’ , ’ Cf = (Qm = / ) ’ ); 172 Figure 30.5: Effect of pressure drop and concentration on flux for Example 30.4 Example 30.5 Example 30.5.sce clear all ; clc ; // Example // Given D = 1.5; // [ cm ] Nre = 25000; Qm = 40; // [ L/m62−h ] 173 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 Mw = 30000; Dv = 5*10^ -7; // [ cmˆ2/ s ] R = 0.75; // S o l u t i o n // ( a ) // Base c a s e : v = Qm *2.78*10^ -5; // [ cm/ s ] Nsc = 0.01/ Dv ; // U s i n g Eq ( 5 ) Nsh = 0.0096* Nre ^0.913* Nsc ^0.346; kc = Nsh * Dv / D ; // [ cm/ s ] // L e t A = K/(1 −K) A = (1 - R ) / R * exp ( - v / kc ) ; K = A /(1+ A ) ; // I f t h e f l u x i s r e d u c e d t o 5 ∗ ˆ − cm/ s // L e t B = (1−R) /R B = K /(1 - K ) * exp (0.556*10^ -3/ kc ) ; R = 1/(1+ B ) ; // As f l u x a p p r o a c h e s z e r o R a p p r a o c h e s 1−K : Rmax = - K ; disp (R , ’ f r a c t i o n r e j e c t e d (R) = ’ ) ; disp ( Rmax , ’ maximum r e j e c t i o n ( Rmax ) = ’ ) ; // ( b ) // U s i n g F i g ( ) kc1 = kc ; M2 = 10000; R2 = 0.35; K1 = K ; lambda1 = - K1 ^0.5; lambda2 = lambda1 *(10000/ Mw ) ^(1/3) ; K2 = (1 - lambda2 ) ^2; kc2 = kc1 *3^0.22; // [ cm/ s ] // L e t B2 = (1−R2 ) /R2 B2 = K2 /(1 - K2 ) * exp ( v / kc2 ) ; R2 = 1/(1+ B2 ) ; disp ( R2 , ’ f r a c t i o n r e j e c t e d ( R2 ) = ’ ) ; 174 47 48 49 50 51 52 53 54 55 56 57 58 59 // ( c ) Dpore = 10^ -7; // [ cmˆ2/ s ] eps = 0.5; tou = 2; De = 2.5*10^ -8; // [ cmˆ2/ s ] L = 2*10^ -5; // [ cm ] v = 5.56*10^ -4; // [ cm/ s ] vLbyDe = v * L / De ; // U s i n g Eq ( ) K = 0.101; c2bycs = K * exp ( vLbyDe ) /( K -1+ exp ( vLbyDe ) ) ; disp ( ’ D i f f u s i o n i n t h e membrane makes t h e p r e m e a t e c o n c e n t r a t i o n s a b o u t t w i c e a s h i g h a s i t would be i f c 2=Kcs = 1 c s , i n d i c a t i n g t h a t t h e p a r t i t i o n c o e f f i c i e n t i s l o w e r than t h a t e s t i m a t e d i n p a r t ( a ) ’ ); 175 ... 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 Contents List of Scilab Code Definitions... Equations of Fluid Flow 4.1 Scilab Code 13 13 Flow of Incompressible Fluids in Conduits and Thin Layers 5.1 Scilab Code 18 18 Flow of Compressible... 25 25 Transportation and Metering of Fluids 8.1 Scilab Code 29 29 Agitation and Mixing of Liquids 9.1 Scilab Code 36