1. Trang chủ
  2. » Địa lí lớp 8

Chemical Reaction Engineering with IPython: Part I Transport Processes and Reaction in Porous Pellets - eBooks and textbooks from bookboon.com

148 18 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

1.1 GENERAL CONSIDERATION ON CATALYTIC REACTION IN POROUS PELLETS Before we can derive the differential equation describing the chemical reaction, mass and heat transfer in a porous pell[r]

(1)Chemical Reaction Engineering with IPython: Part I Transport Processes and Reaction in Porous Pellets Boris Golman Download free books at (2)  BORIS GOLMAN CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I TRANSPORT PROCESSES AND REACTION IN POROUS PELLETS Download free eBooks at bookboon.com (3) Chemical Reaction Engineering with IPython Part I: Transport Processes and Reaction in Porous Pellets 1st edition © 2016 Boris Golman & bookboon.com ISBN 978-87-403-1316-1 Peer reviewed by Viatcheslav Kafarov, Dean of Engineering Faculty, Director of the Center for Sustainable Development in Energy and Industry, Professor of Chemical Engineering Department​, Industrial University of Santander Download free eBooks at bookboon.com (4) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Contents CONTENTS Introduction 1.1 General consideration on catalytic reaction in porous pellets 1.2 Mechanism of mass transfer in porous media 1.3 Mechanism of heat transfer in porous media 11 First-order Reaction in Isothermal Catalyst Pellet 12 2.1 Derivation of mass balance equation 13 2.2 Analytical solution of mass balance equation 17 2.3 Computer programs and simulation results 23 Second-order Reaction in Isothermal Catalyst Pellet 38 3.1 38 Mass balance equation 3.2 Numerical solution of model equation using orthogonal 3.3 collocation method 39 Computer programs and numerical results 43 www.sylvania.com We not reinvent the wheel we reinvent light Fascinating lighting offers an infinite spectrum of possibilities: Innovative technologies and new markets provide both opportunities and challenges An environment in which your expertise is in high demand Enjoy the supportive working atmosphere within our global group and benefit from international career paths Implement sustainable ideas in close cooperation with other specialists and contribute to influencing our future Come and join us in reinventing light every day Light is OSRAM Download free eBooks at bookboon.com Click on the ad to read more (5) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Contents Chemical Reaction in Non-Isothermal Catalyst Pellet 57 4.1 57 Derivation of heat balance equation 4.2 Numerical solution of model equations using finite-difference method 64 4.3 Computer program description 72 4.4 Numerical results 83 Enzyme catalyzed reaction in isothermal pellet 87 5.1 Derivation of mass balance equation 88 5.2 Numerical implementation 91 5.3 Computer program description and numerical results 95 Non-catalytic Chemical Reaction in Agglomerate of Fine Particles 105 6.1 Derivation of mathematical model equations 106 6.2 Computational procedure using the method of lines 110 6.3 Program description 112 6.4 Numerical results 124 Summary 131 References 132 Appendix A1 Installing IPython 134 Appendix A2 Brief Overview of Python Language 138 Appendix A3 Auxiliary Programs used in Orthogonal Collocation Method 142 Download free eBooks at bookboon.com (6) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Introduction INTRODUCTION The focus of this textbook is to discuss both catalytic and non-catalytic chemical reactions that take place in a porous pellet The target audience are advanced undergraduate or graduate students in the chemical engineering or in related areas This textbook has been written to fulfill three major goals: To introduce the mathematical models describing the chemical reactions accompanied by heat and mass transfer in the pellets To explain the numerical or analytical methods for solving the model equations To discuss the numerical results The features of this book can be summarized as follows: (a) model equations are fully derived, (b) all chapters and all figures are illustrated with computer programs and (c) programs are explained in the text Computer programs are available to download on Bookboon’s companion website The programs are written in Python and implemented as IPython notebooks SciPy, NumPy and Matplotlib libraries are used to numerically solve the model equations and to visualize simulated results All of these tools are easy to use, well supported by a large online community, and available for free The installation of IPython system is explained in Appendix A1 and the brief overview of python computer language is given in Appendix A2 Using the developed tools, readers will be able to solve problems that appear in their study or research in the future We begin this book by reviewing the mechanism of mass and heat transfer in a porous media Then we derive the mass balance equation and solve it analytically for the first-order reaction in isothermal spherical pellet The following chapter describes the second-order reaction in isothermal pellet and an orthogonal collocation method is introduced as a numerical method for solving model equations Then we discuss the chemical reaction in the non-isothermal pellet We derive the heat balance equation and show how to solve numerically the system of mass and heat balance equations using a finite-difference method Next we discuss the enzymatic reaction taking place in the pellet We close the book with the chapter describing the non-catalytic reaction in an agglomerate of submicron particles In this example we take into account the change in the agglomerate porous structure with reaction progress We use a method of lines to solve the unsteady-state mass and heat balances Download free eBooks at bookboon.com (7) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Introduction Finally, the author wish to acknowledge and thank his wife, Nadezda, and his sons, Mikhail and Iakov, for their patient support and assistance during the preparation of this book 1.1 GENERAL CONSIDERATION ON CATALYTIC REACTION IN POROUS PELLETS Before we can derive the differential equation describing the chemical reaction, mass and heat transfer in a porous pellet, we need to consider the general steps through which the reaction proceeds and discuss the mechanisms of mass and heat transfer in porous media Here, we assume that the catalyst pellets are manufactured by agglomeration of primary fine particles The catalytic material is dispersed in the micropores of primary particles The void spaces among particles form macropores bounded by the outer particle surfaces, as shown in Fig 1.1 The heterogeneously catalyzed reaction $ o % takes place on active sites in the micropores of primary particles The reaction proceeds through the following sequential steps: • Diffusion of the gaseous reactant A from the bulk phase to the external pellet surface through a boundary layer located at the external surface of the pellet • Diffusion of the reactant A in the macropore spaces to the outer surface of primary particles Then, the reactant A diffuses in the micropore from the pore mouth to the point where adsorption and reaction take place • Adsorption of the reactant A on the active catalytic site • Surface reaction of the adsorbed species A to produce the product B adsorbed on active site • Desorption of the product B • Diffusion of B through the micropore and macropore porous spaces to the external pellet surface • Diffusion of the product B from the external pellet surface into the bulk gas phase through the boundary layer Download free eBooks at bookboon.com (8) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Introduction Figure 1.1: Illustration of sequential steps in reaction process in porous catalyst pellet An overall rate of reaction can be limited by the intrinsic rate of surface catalytic reaction, rate of mass transfer of reactant or product inside the catalyst pellet, rate of mass transfer through the boundary layer outside the pellet or by any combination of these processes At the low temperature and for slow reactions, the intrinsic rate of surface reaction is slow, resulting in the absence of the concentration gradient inside and outside catalyst pellet If the intrinsic rate of surface reaction has similar magnitude or faster rate than the mass transfer rates, the concentration gradient will developed in the pellet or in the boundary layer around catalyst pellet To characterize the ratio of intrinsic reaction rate to the rate of mass transfer, we introduce a catalytic effectiveness factor K , which is defined as the ratio of observed rate of reaction to the rate of reaction at the surface concentration, & $ It accounts for the extent of reduction in the overall reaction rate due to the lower concentration of reactant inside the catalyst pellet as compared to the surface concentration If the effectiveness factor is close to one, the all internal surface of catalyst pellet are utilized and the reaction rate at the pellet center is the same as the rate at the outer surface In the case when effectiveness factor is approaching zero, only the outer surface of catalyst pellet is used, and the intrapellet diffusion will reduce the overall reaction rate This usually occurs for active catalyst or when using the large pellet of low porosity  Download free eBooks at bookboon.com (9) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Introduction 1.2 MECHANISM OF MASS TRANSFER IN POROUS MEDIA Depending on the pellet pore size, different mechanisms of mass transfer can be observed, such as ordinary bulk diffusion, Knudsen diffusion and surface diffusion (Froment et al 2011, p 172) For very large pores, the bulk flow should be taken into account When the pore diameter is much larger than the mean free path of the diffusing molecule, the molecules are transported by ordinary bulk diffusion The Knudsen diffusion is responsible for the mass transfer when the molecule mean free path is larger than the pore diameter The surface diffusion is a dominant mechanism of mass transfer in the microporous pellet with pore diameter close to the size of diffusing molecule We can estimate the diffusion coefficient for a binary gas system at given temperature T using the Chapman-Enskog formula (Bird et al 2002, p 526): 'PL  u     ª¬ L  P (10)  L P º¼ (1.1) 3V P L :PL where L and P are the molecular weights of i species and carrier gas m, respectively, P is the total pressure of gas mixture, V PL is the characteristic diameter of the binary mixture and : PL is the dimensionless collision integral The following empirical approximation is used for estimation of : PL : :PL $ (11) %  & H '˜7  ( H ) ˜7  * H + ˜7 (1.2) Values of constants $  %  &  '  (  )  * and + are given in Reid et al (1987) as: $ = 1.06036, % = 0.1561, & = 0.193, ' = 0.47635, E = 1.053587, F = 1.52996, G = 1.76474, H = 3.89411 The dimensionless temperature is given by N%7  H PL (1.3) where N % is the Boltzman’s constant and H PL is the characteristic energy of the binary mixture The following combining rules are used to determine H PL and V PL : H PL  H LLH PP (12)  V PL V LL  V PP (13)   (1.4) where H LL and V PP are the characteristic energy and the diameter for like pairs LL and PP , respectively Download free eBooks at bookboon.com (14) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Introduction We can calculate the Knudsen diffusivity using the correlation resulting from the kinetic theory of gases for a cylindrical capillary of a mean radius D at normal pressure (Froment et al 2011, p 173):  ˜ D ˜ '.L (1.5) 0L The mean radius of capillary is estimated as H  (1.6) D where H is the voidage and S is the specific surface area The combined diffusivity to describe the transition from ordinary molecular diffusion to Knudsen diffusion is given as      D ˜ \L (1.7)  '.L 'PL 'FL where \L is the mole fraction of species i in the gas phase Here, D is defined as D  1P  1L where L and P are the molar fluxes of species i and m relative to the fixed coordinate system In the case of equimolar counter-diffusion, P  1L and Eq (1.7) becomes 'FL     (1.8)  '.L 'PL We describe the mass and heat transport with chemical reaction in a porous catalyst pellet using a concept of effective properties The corresponding fluxes and reaction rates are averaged over a volume which is small relative to the pellet volume, but large enough with respect to primary particles and pore sizes The effective diffusivity of the i species, 'HII L , is frequently evaluated using the following correlation: 'HII L H ˜ 'FL (1.9) ] Download free eBooks at bookboon.com 10 (15) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Introduction where ] is the tortuosity factor that accounts for increasing length of diffusional path and varying pore cross section (Butt 2000, p 495) Using a random pore model, Wakao and Smith (1962) postulated that the tortuosity factor is in inverse proportion to the void fraction: ]  (1.10) H Thus, the effective diffusivity can be estimated as Deff ,i = ε ⋅ DKi ⋅ Dmi  (1.11) DKi + Dmi 1.3 MECHANISM OF HEAT TRANSFER IN POROUS MEDIA The effective thermal conductivity of a porous pellet depends in a complex manner on the geometry of porous space, and thermal conductivities of solid and fluid phases The two limiting cases could be considered when the heat conduction in both phases occurs in parallel or in series If the conduction in the solid and fluid phases takes place in parallel, the maximum value of effective conductivity could be achieved, because the effective conductivity is given as the weighted arithmetic mean of the phase conductivities: NHII   H (16) ˜ NV  H ˜ N I  (1.12) where N V and N I are the thermal conductivities of solid and fluid phases If the conduction proceeds in such a way that all heat passes through the solid phase and then through the fluid phase in series, the minimum value of effective conductivity is obtained N HII is given as the harmonic mean of N V and N I : 1− ε ε = +  (1.13) keff ks kf Assuming that the solid and fluid phases are distributed randomly, Woodside and Messmer (1961) derived the following expression: keff ⎛ k = k f ⋅ ⎜ s ⎜ k f ⎝ 1−ε ⎞ ⎟⎟  (1.14) ⎠ Download free eBooks at bookboon.com 11 (17) Deloitte & Touche LLP and affiliated entities CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet FIRST-ORDER REACTION IN ISOTHERMAL CATALYST PELLET In this chapter, you will learn to: Derive a mass balance equation for the reactant that accounts for the diffusion and first-order catalytic reaction in the isothermal spherical pellet Solve analytically the model equation Plot the reactant concentration profiles in the pellet and calculate the effectiveness factors for various values of process parameters using the elaborated IPython notebooks 360° thinking 360° thinking 360° thinking Discover the truth at www.deloitte.ca/careers © Deloitte & Touche LLP and affiliated entities Discover the truth at www.deloitte.ca/careers © Deloitte & Touche LLP and affiliated entities Discoverfree theeBooks truth atatbookboon.com www.deloitte.ca/careers Download Click on the ad to read more 12 Dis (18) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet 2.1 DERIVATION OF MASS BALANCE EQUATION We first consider a first-order reaction $ o % in an isothermal catalyst pellet of spherical shape We use Fick’s law to relate the diffusive flux of reactant A to the concentration gradient in the radial direction of the pellet under the assumption of dilute gas mixture: $U  'HII  $ G& $  (2.1) GU where $U is the diffusive flux based on the total area of the spherical shell, S U  , including voids and solid, and & $ is the concentration of the gas species A within the pores We can perform a steady-state mass balance for species A over a spherical shell of thickness 'U located at radius r within a catalyst pellet as (Fogler 2008) § 5DWHRIJHQHUDWLRQ · § 5DWHRILQSXW · § 5DWHRIRXWSXW · ¨ ¸ ¨ ¸ ¨ ¸ RIVSHFLHV$ RIVSHFLHV$ ¸ ¨ RIVSHFLHV$ ¸  ¨ ¸  ¨ ¨ E\UHDFWLRQZLWKLQ'U ¸ ¨ E\GLIIXVLRQDWU ¸ ¨ E\GLIIXVLRQDWU  'U ¸ ¨ ¸ ¨ ¸ ¨ ¸ PROHVWLPH(19) PROHVWLPH(20) © ¹ © PROHVWLPH(21) ¹ © ¹  The molar rate of production of component A by the first-order reaction within the differential volume element, S U  'U , is U$ ˜ S U  'U  N&$ ˜ S U  'U (2.2) Thus, we can write the mass balance as $U u S U  (22) _U  $U u S U  (23) _U 'U  U$ ˜ S U  'U  (2.3) Dividing by S'U , we find: § U  ˜ $U (24) _U 'U  U  ˜ $U (25) _U ¨ ¨ 'U © · ¸  U  ˜ U$ ¸ ¹  Taking the limit as 'U goes to zero and using the definition of the first derivative gives G U  $U (26)  U  ˜ U$ GU  (2.4) Substituting the flux by Eq (2.1) and the reaction rate by Eq (2.2) into Eq (2.4), we have: G&$ · G §   ¨ U 'HII  $ ˜ ¸  U ˜ N& $ GU © GU ¹  (2.5) Download free eBooks at bookboon.com 13 (27) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet Changing the sign in Eq (2.5) gives G& $ · G §   ¨ U 'HII  $ ˜ ¸  U ˜ N& $ GU © GU ¹  Assuming a constant effective diffusivity 'HII  $ , we rearrange the above equation as 'HII  $ G §  G& $ · ¨U ˜ ¸  N& $ U  GU © GU ¹  (2.6) Using the chain rule of differentiation, we write the term with the second derivative as G §  G&$ · ¨U ˜ ¸ GU © GU ¹ G & $ GU  G&$  U GU GU GU  U G& $ G & $ (2.7)  U GU GU  Introducing Eq (2.6) into Eq (2.7), we derive the mass balance equation for the first-order reaction in catalyst pellet as § G & $  G& $ · N& $  ¨ ¸   U GU ¹ 'HII  $ © GU  (2.8) The boundary conditions are • At the center of catalyst pellet: There is no diffusive flux through the pellet center since this is a point of symmetry G& $ GU  DW U  (2.9) • At the external surface of catalyst pellet: οο Fixed reactant concentration at the external surface We assume that the concentration of reactant species A at the external pellet surface, & $V , is equal to the bulk phase concentration, & $E &$ & $V DW U & $E 5 (2.10) where R is the pellet radius οο Mass transfer across the boundary at the pellet external surface We derive the steady state mass balance at the pellet external surface as $U u S U  (28) _U  S U  ˜ NJ$ &$ _U  & $ E (29)  where N J$ is the mass transfer coefficient Download free eBooks at bookboon.com 14 (30) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet Simplifying the above equation and using the flux definition by Eq (2.1), we find: N J$ & $E  & $ U (31) 'HII  $ ˜ G& $ GU U (2.11) & U $ Introducing dimensionless variables, U and F , and using the chain rule of differentiation, & $E we can write the first derivative of concentration with respect to radial position as G& $ GU G& $ G U ˜ G U GU G& $ GF G U ˜ ˜ GF G U GU Using definitions of dimensionless variables, the first derivatives G& $ GF GU GU G F ˜ & $E (32) GF 5(33) G U GU & $E  GU GU Therefore, we can rewrite G& $ GU & $E ˜ GF GF GF  ˜ GU GU G& $ and are expressed as GU GF & $E   G& $  as GU & $E GF ˜ GU We will turn your CV into an opportunity of a lifetime Do you like cars? Would you like to be a part of a successful brand? We will appreciate and reward both your enthusiasm and talent Send us your CV You will be surprised where it can take you Download free eBooks at bookboon.com 15 Send us your CV on www.employerforlife.com Click on the ad to read more (34) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet Similarly, we can express the second derivative G § & $E GF · G U ˜ ¨ ¸ G U © G U ¹ GU G § G& $ · ¨ ¸ GU © GU ¹ G & $ in dimensionless form as GU  G § & $E GF ·  ˜ ¨ ¸ GU © GU ¹ & $E G  F  5 G U  Substituting the first and second derivatives into Eq (2.8), we get: & $E G  F  & $E GF N   F ˜ & $E   GU 'HII  $ U ˜5 GU Dividing by  (2.12) & $E , we have: 5 G F  GF N ˜ 5  ˜  ˜F GU 'HII  $ U GU  (2.13) Then, we will introduce the dimensionless Thiele modulus, I , defined by I N ˜ 5 (2.14) 'HII  $ The Thiele modulus relates the reaction rate to the diffusion rate in the pellet Finely, we write the dimensionless mass balance equation describing the first-order reaction in the spherical pellet as G F  GF  ˜  I ˜F  U GU GU  (2.15) The dimensionless boundary conditions are • At the center of catalyst particle: GF GU  U DW  (2.16) • At the external surface of catalyst particle: οο Fixed reactant concentration at the external surface of the catalyst pellet F  (2.17) οο Mass transfer across the boundary at the pellet external surface  F where %LP  GF ˜ %LP G U ˜ N J$ 'HII  $ U   (2.18) is the Biot number for mass transfer This dimensionless group compares the relative external and internal mass transport resistances Download free eBooks at bookboon.com 16 (35) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet 2.2 ANALYTICAL SOLUTION OF MASS BALANCE EQUATION Multiplying each term in Eq (2.15) by U , we have: U G F GF    I ˜F ˜ U  GU GU  (2.19) We introduce a new variable X F ˜ U The first derivative of u with respect to U is GX GF U˜  F  The second derivative is GU GU G X GU · G § GF  F¸ ¨U˜ GU © GU ¹ G § GF · GF ¨U˜ ¸ GU © GU ¹ GU ­ G  F GF ½ GF  ®U ˜ ¾  GU ¿ GU ¯ GU U˜ G F GF   GU GU Substituting the second derivative into Eq (2.19) results in G X  I ˜X  GU  (2.20) This is a linear second-order differential equation with constant coefficients We can write the boundary condition given by Eq (2.16) in terms of variable u as  GX X   U GU U GF GU  Multiplying by U  results in U˜ GX  X GU  Finely, we get: X  DW U  (2.21) Similarly, we rewrite the boundary condition by Eq (2.17) as X  DW U (2.22) The general solution of Eq (2.20) is X & ˜ HI ˜U  & ˜ HI ˜U  (2.23) where & and &  are the integration constants We will find these constants using the boundary conditions From the boundary condition at U  by Eq (2.21)follows &  &  Download free eBooks at bookboon.com 17 (36) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet Thus, &  &(2.24) Using the definition of a hyperbolic sine function, VLQK [(37) Eq (2.24) into Eq (2.23), we obtain: X & HI ˜U  HI ˜U (38) H [  H [ , and substituting  & ˜ VLQK I ˜ U (39) (2.25) 2.2.1 FIXED REACTANT CONCENTRATION AT PELLET EXTERNAL SURFACE We will derive the constant & from the boundary condition at U  by Eq (2.22) using Eq (2.25) as  & ˜ VLQK I (40) Thus, the constant & is &  (2.26) VLQK I (41) I joined MITAS because I wanted real responsibili� I joined MITAS because I wanted real responsibili� Real work International Internationa al opportunities �ree wo work or placements Maersk.com/Mitas www.discovermitas.com �e G for Engine Ma Month 16 I was a construction Mo supervisor ina const I was the North Sea super advising and the No he helping foremen advis ssolve problems Real work he helping fo International Internationa al opportunities �ree wo work or placements ssolve pr Download free eBooks at bookboon.com 18 �e Graduate Programme for Engineers and Geoscientists Click on the ad to read more (42) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet Substituting Eq (2.26) into Eq (2.25) gives X VLQK I ˜ U (43) (2.27) VLQK I (44) Finally, back substituting X F ˜ U into Eq (2.27), we can calculate the dimensionless concentration profile of reactant A in the spherical catalyst pellet as F  VLQK I ˜ U (45) ˜ U VLQK I (46) (2.28) The first derivative of & $ with respect to r is G& $ GU ª § U ·º VLQK ¨ I ˜ ¸ » « G & $E ˜ © ¹» « ˜ GU « VLQK I (47) U » «¬ »¼ G F ˜ & $E (48) GU & $E ˜ ˜ VLQK I (49) U˜ G ­ § U ·½ § U· ®VLQK ¨ I ˜ ¸ ¾  VLQK ¨ I ˜ ¸ GU ¯ © ¹¿ © 5¹  U   (2.29) § U· VLQK ¨ I ¸ & $E  I & U § · © 5¹ ˜ ˜ ˜ FRVK ¨ I ¸  $E ˜ VLQK I(50) VLQK I (51) U 5 U © ¹ § U· § U· VLQK ¨ I ¸ FRVK ¨ I ¸ & & $EI © ¹  $E ˜ © 5¹ ˜  VLQK I (52) VLQK I (53) U U Therefore, we can write the derivative of & $ with respect to r at the pellet surface U as G& $ GU U & $EI &   $E WDQK I (54) & $EI §  ·  ¸ (2.30) ¨ © WDQK I (55) I¹ At steady-state, the overall process rate should be equal to the rate of mass transfer into the pellet: 5DWH § G& · S  'HII  $ ¨ $ ¸ (2.31) © GU ¹ U Combining Eqs (2.30) and (2.31), we get: 5DWH S  'HII  $ ˜ & $EI §  ·  ¸ (2.32) ¨ © WDQK I (56) I ¹ Download free eBooks at bookboon.com 19 (57) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet We can calculate the intrinsic reaction rate in the absence of internal mass transfer limitation by assuming that & $ & $E throughout the pellet 5HDFWLRQ5DWH _& $  S  N& $E (2.33)  & $E We define the effectiveness factor K as the ratio of the consumption rate of reactant within the pellet to the intrinsic reaction rate (Kandiyoti 2009,p80) Thus, the effectiveness factor is given by the ratio of Eq (2.32) to Eq (2.33) as 'HII  $IV ª  º  » (2.34) «  N ¬ WDQK IV (58) I ¼ K Using the definition of Thiele modulus by Eq (2.14), we rewrite Eq (2.34) as ª  º  » « I ¬ WDQK I (59) I¼ K  I >I ˜ FRWK I (60)  @ (2.35) 2.2.2 MASS TRANSFER AT PELLET EXTERNAL SURFACE In the case of significant mass transfer limitations, we use the boundary conditions at the outer surface of the pellet by Eq (2.18) We can express this boundary condition in terms of variable u as  X U  %LP ª  GX X º « U G U  U  » (2.36) ¬ ¼ Substituting U  in above equation, we get:  X  %LP ª GX º « G U  X » (2.37) ¬ ¼ We calculate the derivative of u with respect to U by differentiation of Eq (2.25) as GX GU & ˜ I ˜ FRVK I ˜ U (61) (2.38) Substituting u by Eq (2.25) and   & VLQK I (62) GX by Eq (2.38) at U  into Eq (2.37), we get: GU & ˜ >I FRVK I (63)  VLQK I (64) @  %LP Download free eBooks at bookboon.com 20 (65) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet Thus, we obtain the constant & as &  %LP  I ˜ FRVK I (66)  VLQK I (67) %LP  (68) (69)  %LP (2.39)  %LP ˜ VLQK I (70)  I ˜ FRVK I (71)  VLQK I (72) (73) Substituting & into Eq (2.25) results in X %LP ˜ VLQK I ˜ U (74) (2.40) %LP ˜ VLQK I (75)  I ˜ FRVK I (76)  VLQK I (77) Finally, we derive the dimensionless concentration profiles in the pellet as F %LP ˜ VLQK I ˜ U (78) U %LP ˜ VLQK I (79)  I ˜ FRVK I (80)  VLQK I (81)    VLQK I ˜ U (82) ˜ U VLQK I (83)  I ˜ FRVK I (84)  VLQK I (85) %LP  ˜ Download free eBooks at bookboon.com 21 (2.41) Click on the ad to read more (86) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet The derivative of & $ with respect to r is G& $ GU U § · %LP ˜ VLQK I ˜ (87) ¨ ¸ ˜ & G $E ˜ ¨ ¸ GU ¨ U %LP ˜ VLQK I (88)  I ˜ FRVK I (89)  VLQK I (90) ¸ © ¹ § § U ·· VLQK ¨ I ˜ ¸ ¸ ¨ § ·G & $E ˜ ˜ %LP © 5¹¸ ¨ ¸ ¨ U ¸ © %LP ˜ VLQK I (91)  I ˜ FRVK I (92)  VLQK I (93) ¹ GU ¨ ¨ ¸ © ¹ § · & $E ˜ ˜ %LP ¨ ¸ © %LP ˜ VLQK I (94)  I ˜ FRVK I (95)  VLQK I (96) ¹ ª G § § U ·· § U ·º « U ¨ VLQK ¨ I ˜ ¸ ¸  VLQK ¨ I ˜ ¸ » © ¹» © ¹¹ « GU ©  « » U « » ¬ ¼  ª § U· § U ·º I ˜ FRVK ¨ I ˜ ¸ VLQK ¨ I ˜ ¸ » « § · & $E ˜ ˜ %LP © ¹» © 5¹  ¨ ¸« VLQK I (97) I FRVK I (98) VLQK I (99) ˜  ˜  ˜ %L U U » © P ¹« «¬ »¼ The derivative of & $ with respect to r at the pellet surface r = R is G& $ GU U § · ª I ˜ FRVK I (100) VLQK I (101) º & $E ˜ ˜ %LP  ¨ ¸« » 5 5 ¼ © %LP ˜ VLQK I (102)  I ˜ FRVK I (103)  VLQK I (104) ¹ ¬ § · ¨ & ˜ ˜ %L ¸ $E P ¨ ¸ ¨ %L  I ¸   ¨ P WDQK I (105) ¸ © ¹ ªI   º «  ˜ WDQK I (106)   » ¬ ¼ Finally, we can derive the effectiveness factor in the case of external mass transfer limitations as K S  'HII  $ ˜ G& $ GU   S ˜ N& $E  U § · ¨ ¸§ I ' · (2.42) %LP  ¸¨ ˜ HII  $ ¨  ¸  N ¨ %L  I ¸ © WDQK I (107) ¹ ¨ P WDQK I (108)   ¸ © ¹ ª º    « »  « WDQK I (109) I » ˜ I « I §   ·» ˜¨  ¸» «  ¬ %LP © WDQK I (110) I ¹ ¼ Download free eBooks at bookboon.com 22 (111) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet 2.3 COMPUTER PROGRAMS AND SIMULATION RESULTS Notebook FirstOrder_Isothermal_Concentration.ipynb The IPython notebook FirstOrder_Isothermal_Concentration.ipynb is a Python code to calculate the dimensionless reactant concentration profiles in the radial direction of isothermal spherical pellet for the first-order reaction The reactant concentration is fixed at the external surface of the catalyst pellet ◊◊ Import packages We will use the Python library NumPy for vector manipulations and calculation of sinh function To plot the results of numerical simulations, we will use the pyplot module from matplotlib library The IPython.html module is called to display widgets for interactive input of Thiele moduli ʩƒ–’Ž‘–Ž‹„‹Ž‹‡ ‹’‘”–—’›ƒ•’ ˆ”‘ƒ–’Ž‘–Ž‹„Ŝ’›Žƒ„‹’‘”–Ƌ ˆ”‘(112) ›–Š‘Ŝ†‹•’Žƒ›‹’‘”– Ž‡ƒ”ɏ‘—–’—–ř†‹•’Žƒ›ř  ˆ”‘(113) ›–Š‘ŜŠ–ŽŜ™‹†‰‡–•‹’‘”–‹–‡”ƒ –ř Ž‘ƒ–Ž‹†‡”ř řƒ–‡š ◊◊ Define the main function fmain: ɤ ɤƒ‹ˆ— –‹‘ ɤ †‡ˆˆƒ‹ſIɨřIɩřIɪřƋƋ™ƒ”‰•ƀś ɤ ɤIɨřIɩřIɪƒ”‡Š‹‡Ž‡‘†—Ž‹ ɤ ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–†‹‡•‹‘Ž‡••”‡ƒ –ƒ– ‘ ‡–”ƒ–‹‘ ɤ’”‘ˆ‹Ž‡•‹–Š‡”ƒ†‹ƒŽ†‹”‡ –‹‘‘ˆƒ•’Š‡”‹ ƒŽ’‡ŽŽ‡– ɤˆ‘”˜ƒ”‹‘—•Š‹‡Ž‡‘†—Ž‹Ŝ οο Specify the array of radial points and allocate the array of reactant concentrations ɤ ɤ•’‡ ‹ˆ›–Š‡ƒ””ƒ›‘ˆ‡“—ƒŽŽ›†‹•–”‹„—–‡†”ƒ†‹ƒŽ’‘•‹–‹‘• Uʰ’ŜŽ‹•’ƒ ‡ſɨŜ‡Şɬřɨřɬɥɨƀ ɤƒŽŽ‘ ƒ–‡ƒ””ƒ›‘ˆ ‘ ‡–”ƒ–‹‘•  ʰ’Ŝœ‡”‘•ſŽ‡ſUƀƀ Download free eBooks at bookboon.com 23 (114) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet οο Calculate and plot the reactant concentration profiles for various values of Thiele modulus ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–’”‘ˆ‹Ž‡ˆ‘”Iɨ  ʰſɨŵUƀƋ’Ŝ•‹ŠſIɨƋUƀŵ’Ŝ•‹ŠſIɨƀ ’Ž‘–ſUř řɐŞɐřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐ„ɐƀ Š‘Ž†ſɐ‘ɐƀ ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–’”‘ˆ‹Ž‡ˆ‘”Iɩ  ʰſɨŵUƀƋ’Ŝ•‹ŠſIɩƋUƀŵ’Ŝ•‹ŠſIɩƀ ’Ž‘–ſUř řɐŞɐřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐ”ɐƀ ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–’”‘ˆ‹Ž‡ˆ‘”Iɪ  ʰſɨŵUƀƋ’Ŝ•‹ŠſIɪƋUƀŵ’Ŝ•‹ŠſIɪƀ ’Ž‘–ſUř řɐŞɐřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐɐƀ ɤ•’‡ ‹ˆ›’Ž‘–ƒš‡•ř–‹–Ž‡ƒ†Ž‡‰‡† ƒ–’Ž‘–Ž‹„Ŝ” ƒ”ƒ•Ŝ—’†ƒ–‡ſƇɐˆ‘–Ŝ•‹œ‡ɐśɨɩƈƀ šŽƒ„‡Žſ”ɐ‹‡•‹‘Ž‡••”ƒ†‹—•řɛɎ”Š‘ɛƃŞƄɐƀ ›Žƒ„‡Žſɐ‹‡•‹‘Ž‡•• ‘ ‡–”ƒ–‹‘řɛ ɛƃŞƄɐƀ –‹–Ž‡ɨʰɐ ‹”•–Ş‘”†‡””‡ƒ –‹‘‹‹•‘–Š‡”ƒŽ•’Š‡”‹ ƒŽ’‡ŽŽ‡–Ɏɐ –‹–Ž‡ſ–‹–Ž‡ɨƀ Ž‡‰‡†ſƃſɐɛɎ’Š‹ɏɨʰɐʫ•–”ſIɨƀʫɐɛɐƀřſɐɛɎ’Š‹ɏɩʰɐʫ•–”ſIɩƀʫɐɛɐƀř ſɐɛɎ’Š‹ɏɪʰɐʫ•–”ſIɪƀʫɐɛɐƀƄřŽ‘ ʰɐŽ‘™‡””‹‰Š–ɐƀ ƒš‹•ſƃɥŜřɨŜřɥŜɥřɨŜɥƄƀ •Š‘™ſƀ ”‡–—” no.1 Sw ed en nine years in a row STUDY AT A TOP RANKED INTERNATIONAL BUSINESS SCHOOL Reach your full potential at the Stockholm School of Economics, in one of the most innovative cities in the world The School is ranked by the Financial Times as the number one business school in the Nordic and Baltic countries Stockholm Visit us at www.hhs.se Download free eBooks at bookboon.com 24 Click on the ad to read more (115) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet ◊◊ Define widgets ɤ ɤ•’‡ ‹ˆ›™‹†‰‡–• Šɨʰ ſ˜ƒŽ—‡ʰɑʳŠɫʴʳ„ʴ‹ˆˆ—•‹‘ƒ† ‹”•–Ş ”†‡”‡ƒ –‹‘‹(116) •‘–Š‡”ƒŽ’Š‡”‹ ƒŽ‡ŽŽ‡–ʳŵ„ʴɑř ‘Ž‘”ʰɑ„”‘™ɑƀ Šɩʰƒ–‡šſ˜ƒŽ—‡ʰɑɛɛɎ„‘šƇ’‡ ‹ˆ›–Š”‡‡˜ƒŽ—‡•‘ˆŠ‹‡Ž‡‘†—Ž—•ƈɎ’Š‹Ɏ„‘šƇ–‘ ‘’ƒ”‡  ‘ ‡–”ƒ–‹‘’”‘ˆ‹Ž‡•śƈɛɛɑřƀ Šɪʰ ſ˜ƒŽ—‡ʰɑʳ„”ʴɑƀ †‹•’Žƒ›ſŠɨƀ †‹•’Žƒ›ſŠɪƀ †‹•’Žƒ›ſŠɩƀ ɤ•‡•Ž‹†‡”–‘‹’—–˜ƒŽ—‡•‘ˆŠ‹‡Ž‡‘†—Ž‹ ’Š‹ɨɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɨƀ  ’Š‹ɨɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛɛɎ’Š‹ɏɨɛɛɑ ’Š‹ɩɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɩƀ  ’Š‹ɩɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛɛɎ’Š‹ɏɩɛɛɑ ’Š‹ɪɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɬƀ  ’Š‹ɪɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛɛɎ’Š‹ɏɪɛɛɑ ™ʰ‹–‡”ƒ –ſˆƒ‹řIɨʰ’Š‹ɨɏ•Ž‹†‡”řIɩʰ’Š‹ɩɏ•Ž‹†‡”řIɪʰ’Š‹ɪɏ•Ž‹†‡”ƀ The screenshot in Fig 2.1 shows the widgets to specify Thiele moduli and the plot obtained by simulating the concentration profiles in the pellet Figure 2.1: The screenshot of widgets to specify Thiele moduli for the first-order reaction in isothermal pellet Download free eBooks at bookboon.com 25 (117) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet Notebook FirstOrder_Isothermal_Effectiveness.ipynb This notebook is used to calculate the effectiveness factor for the first-order reaction in the isothermal spherical pellet assuming a fixed reactant concentration at the external pellet surface ◊◊ Import packages ʩƒ–’Ž‘–Ž‹„‹Ž‹‡ ‹’‘”–—’›ƒ•’ ‹’‘”–ƒ–’Ž‘–Ž‹„Ŝ’›Žƒ„ƒ•’Ž– ˆ”‘(118) ›–Š‘Ŝ†‹•’Žƒ›‹’‘”– Ž‡ƒ”ɏ‘—–’—–ř†‹•’Žƒ›ř  ˆ”‘(119) ›–Š‘ŜŠ–ŽŜ™‹†‰‡–•‹’‘”–‹–‡”ƒ –ř Ž‘ƒ–Ž‹†‡”ř řƒ–‡š ◊◊ Define the main function fmain: ɤ ɤƒ‹’”‘‰”ƒ ɤ †‡ˆˆƒ‹ſŠřƋƋ™ƒ”‰•ƀś ɤ ɤ ƒŽ —Žƒ–‡–Š‡‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘”ˆ‘”ˆ‹”•–Ş‘”†‡””‡ƒ –‹‘ ɤ‹‹•‘–Š‡”ƒŽ•’Š‡”‹ ƒŽ’‡ŽŽ‡– ɤ ɤ’ƒ”ƒ‡–‡”Š‹•—•‡†–‘ƒ‡ƒ„ŽƒŽ‹‡‹ƒ™‹†‰‡– οο Specify the array of Thiele moduli and allocate the array of effectiveness factors ɤ ɤ•’‡ ‹ˆ›–Š‡ƒ””ƒ›‘ˆŠ‹‡Ž‡‘†—Ž—• Iʰ’ŜŽ‹•’ƒ ‡ſɥŜɥɨřɨɥɥŜřɨɥɥɨƀ ɤƒŽŽ‘ ƒ–‡ƒ””ƒ›‘ˆ‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘” Kʰ’Ŝœ‡”‘•ſŽ‡ſIƀƀ οο Calculate and plot the effectiveness factor as a function of Thiele modulus ɤ ɤ ƒŽ —Ž–‡ƒ†’Ž‘–‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘” KʰſɪŜŵIƀƋſɨŜŵ’Ŝ–ƒŠſIƀŞɨŜŵſIƀƀ ’Ž–Ŝ” ƒ”ƒ•Ŝ—’†ƒ–‡ſƇɐˆ‘–Ŝ•‹œ‡ɐśɨɩƈƀ ’Ž–ŜŽ‘‰Ž‘‰ſIřKřɐŞɐř„ƒ•‡šʰɨɥřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐ„ɐƀ ɤ•’‡ ‹ˆ›’Ž‘–ƒš‡•ř–‹–Ž‡ƒ†Ž‡‰‡† ’Ž–ŜšŽƒ„‡ŽſɐŠ‹‡Ž‡‘†—Ž—•řɛɎ’Š‹ɛƃŞƄɐƀ ’Ž–Ŝ›Žƒ„‡Žſɐˆˆ‡ –‹˜‡‡••ˆƒ –‘”řɛɎ‡–ƒɛƃŞƄɐƀ ’Ž–Ŝƒš‹•ſƃɥŜɥɨřɨɥɥŜřɥŜɥřɨŜɩƄƀ ’Ž–Ŝ–‹–Ž‡ſɐ ‹”•–Ş‘”†‡””‡ƒ –‹‘‹ƒ•’Š‡”‹ ƒŽ’‡ŽŽ‡–Ɏɐƀ ’Ž–Ŝ‰”‹†ſ”—‡ř™Š‹ Šʰɑ„‘–ŠɑřŽ•ʰɑŞɑƀ ’Ž–Ŝ‰”‹†ſ”—‡řɐƒŒ‘”ɐřŽ‹‡™‹†–ŠʰɨŜɥƀ ’Ž–Ŝ‰”‹†ſ”—‡řɐ‹‘”ɐřŽ‹‡™‹†–ŠʰɥŜɬƀ ’Ž–Ŝ•Š‘™ſƀ ”‡–—” Download free eBooks at bookboon.com 26 (120) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet ◊◊ Define a widget ɤ ɤ•’‡ ‹ˆ›™‹†‰‡–• Šɨʰ ſ˜ƒŽ—‡ʰɑʳŠɫʴʳ„ʴ‹ˆˆ—•‹‘ƒ† ‹”•–Ş ”†‡”‡ƒ –‹‘‹(121) •‘–Š‡”ƒŽ’Š‡”‹ ƒŽ‡ŽŽ‡–ʳŵ„ʴɑř ‘Ž‘”ʰɑ„”‘™ɑƀ Šɩʰ ſ˜ƒŽ—‡ʰɑʳ„”ʴɑƀ †‹•’Žƒ›ſŠɨƀ ™ʰ‹–‡”ƒ –ſˆƒ‹řŠʰŠɩƀ The screenshot of the widget and resulting plot is shown in Fig 2.2 Download free eBooks at bookboon.com 27 Click on the ad to read more (122) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet Figure 2.2: The widget to plot the effectiveness factor for the first-order reaction in isothermal pellet Notebook FirstOrder_Isothermal_ExternalMassTransfer_Concentration.ipynb This notebook is utilized to calculate the reactant concentration profiles in the radial direction of isothermal spherical pellet for the first-order reaction taking into account the mass transfer resistance at the external pellet surface ◊◊ Import packages ʩƒ–’Ž‘–Ž‹„‹Ž‹‡ ‹’‘”–—’›ƒ•’ ˆ”‘ƒ–’Ž‘–Ž‹„Ŝ’›Žƒ„‹’‘”–Ƌ ˆ”‘(123) ›–Š‘Ŝ†‹•’Žƒ›‹’‘”– Ž‡ƒ”ɏ‘—–’—–ř†‹•’Žƒ›ř  ˆ”‘(124) ›–Š‘ŜŠ–ŽŜ™‹†‰‡–•‹’‘”–‹–‡”ƒ –ř Ž‘ƒ–Ž‹†‡”ř řƒ–‡š ◊◊ Define the main function fmain: ɤ ɤƒ‹ˆ— –‹‘ ɤ †‡ˆˆƒ‹ſIřŠř‹ɨř‹ɩř‹ɪřƋƋ™ƒ”‰•ƀś ɤ ɤI‹•–Š‡Š‹‡Ž‡‘†—Ž—•ř‹ɨř‹ɩƒ†‹ɪƒ”‡‹‘–—„‡”• ɤ ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–†‹‡•‹‘Ž‡••”‡ƒ –ƒ– ‘ ‡–”ƒ–‹‘ ɤ’”‘ˆ‹Ž‡•‹–Š‡”ƒ†‹ƒŽ†‹”‡ –‹‘‘ˆƒ•’Š‡”‹ ƒŽ’‡ŽŽ‡– ɤˆ‘”˜ƒ”‹‘—•‹‘–—„‡”• Download free eBooks at bookboon.com 28 (125) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet οο Specify the array of radial points and allocate the array of reactant concentrations ɤ ɤ•’‡ ‹ˆ›–Š‡ƒ””ƒ›‘ˆ‡“—ƒŽŽ›†‹•–”‹„—–‡†”ƒ†‹ƒŽ’‘•‹–‹‘• Uʰ’ŜŽ‹•’ƒ ‡ſɨŜ‡Şɬřɨřɬɥɨƀ ɤƒŽŽ‘ ƒ–‡ƒ””ƒ›‘ˆ ‘ ‡–”ƒ–‹‘•  ʰ’Ŝœ‡”‘•ſŽ‡ſUƀƀ οο Calculate and plot the reactant concentration profiles for various values of Biot number ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–’”‘ˆ‹Ž‡ˆ‘”‹ɨ  ʰſɨŜŵUƀƋ’Ŝ•‹ŠſIƋUƀŵſ’Ŝ•‹ŠſIƀʫſIƋ’Ŝ ‘•ŠſIƀސ’Ŝ•‹ŠſIƀƀŵ‹ɨƀ ƒ–’Ž‘–Ž‹„Ŝ” ƒ”ƒ•Ŝ—’†ƒ–‡ſƇɐˆ‘–Ŝ•‹œ‡ɐśɨɩƈƀ ’Ž‘–ſUř řɐŞɐřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐ„ɐƀ Š‘Ž†ſɐ‘ɐƀ ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–’”‘ˆ‹Ž‡ˆ‘”‹ɩ  ʰſɨŜŵUƀƋ’Ŝ•‹ŠſIƋUƀŵſ’Ŝ•‹ŠſIƀʫſIƋ’Ŝ ‘•ŠſIƀސ’Ŝ•‹ŠſIƀƀŵ‹ɩƀ ’Ž‘–ſUř řɐŞɐřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐ”ɐƀ ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–’”‘ˆ‹Ž‡ˆ‘”‹ɪ  ʰſɨŜŵUƀƋ’Ŝ•‹ŠſIƋUƀŵſ’Ŝ•‹ŠſIƀʫſIƋ’Ŝ ‘•ŠſIƀސ’Ŝ•‹ŠſIƀƀŵ‹ɪƀ ’Ž‘–ſUř řɐŞɐřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐɐƀ ɤ•’‡ ‹ˆ›’Ž‘–ƒš‡•ř–‹–Ž‡ƒ†Ž‡‰‡† šŽƒ„‡Žſ”ɐ‹‡•‹‘Ž‡••”ƒ†‹—•řɛɎ”Š‘ɛƃŞƄɐƀ ›Žƒ„‡Žſɐ‹‡•‹‘Ž‡•• ‘ ‡–”ƒ–‹‘řɛ ɛƃŞƄɐƀ –‹–Ž‡ɨʰɐ ‹”•–Ş ‘”†‡””‡ƒ –‹‘‹‹•‘–Š‡”ƒŽ•’Š‡”‹ ƒŽ’‡ŽŽ‡–Ɏ™‹–Š‡š–‡”ƒŽƒ••–”ƒ•ˆ‡”Ž‹‹–ƒ–‹‘•řɛ Ɏ’Š‹ʰʩ•ɛɐ –‹–Ž‡ſ–‹–Ž‡ɨʩſIƀƀ Ž‡‰‡†ſƃſ”ɐɛƇ‹ƈʰɐʫ•–”ſ‹ɨƀʫɐɛɐƀřſ”ɐɛƇ‹ƈʰɐʫ•–”ſ‹ɩƀʫɐɛɐƀř ſ”ɐɛƇ‹ƈʰɐʫ•–”ſ‹ɪƀʫɐɛɐƀƄřŽ‘ ʰɐŽ‘™‡””‹‰Š–ɐƀ ƒš‹•ſƃɥŜřɨŜřɥŜɥřɨŜɥƄƀ •Š‘™ſƀ ”‡–—” Download free eBooks at bookboon.com 29 (126) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet ◊◊ Define widgets ɤ ɤ•’‡ ‹ˆ›™‹†‰‡–• Šɨʰ ſ˜ƒŽ—‡ʰɑʳŠɫʴʳ„ʴ‹ˆˆ—•‹‘ƒ† ‹”•–Ş ”†‡”‡ƒ –‹‘‹(127) •‘–Š‡”ƒŽ’Š‡”‹ ƒŽ‡ŽŽ‡–ʳ„”ʴ™‹–Šš–‡”ƒŽƒ••”ƒ•ˆ‡”‹‹–ƒ–‹‘• ʳŵ„ʴɑř ‘Ž‘”ʰɑ„”‘™ɑƀ Šɩʰ ſ˜ƒŽ—‡ʰɑʳ„”ʴɑƀ Šɪʰƒ–‡šſ˜ƒŽ—‡ʰɑɛɛɎ„‘šƇ’‡ ‹ˆ›Š‹‡Ž‡‘†—Ž—•ƈɎ’Š‹Ɏ„‘šƇśƈɛɛɑřƀ Šɫʰƒ–‡šſ˜ƒŽ—‡ʰɑɛɛɎ„‘šƇ’‡ ‹ˆ›–Š”‡‡˜ƒŽ—‡•‘ˆ‹‘–—„‡”ƈ‹Ɏ„‘šƇ–‘  ‘’ƒ”‡ ‘ ‡–”ƒ–‹‘’”‘ˆ‹Ž‡•śƈɛɛɑřƀ †‹•’Žƒ›ſŠɨƀ †‹•’Žƒ›ſŠɩƀ †‹•’Žƒ›ſŠɪƀ ɤ•‡•Ž‹†‡”–‘‹’—––Š‡˜ƒŽ—‡‘ˆŠ‹‡Ž‡‘†—Ž—• ’Š‹ɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɩƀ ’Š‹ɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛɛɎ’Š‹ɛɛɑ ɤ•‡•Ž‹†‡”–‘‹’—–˜ƒŽ—‡•‘ˆ‹‘–—„‡” ‹ɨɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɨƀ ‹ɨɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛɛ‹ɏɨɛɛɑ ‹ɩɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɪƀ ‹ɩɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛɛ‹ɏɩɛɛɑ ‹ɪɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɨɥƀ ‹ɪɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛɛ‹ɏɪɛɛɑ ™ʰ‹–‡”ƒ –ſˆƒ‹řIʰ’Š‹ɏ•Ž‹†‡”řŠʰŠɫř‹ɨʰ‹ɨɏ•Ž‹†‡”ř‹ɩʰ‹ɩɏ•Ž‹†‡”ř‹ɪʰ‹ɪɏ• Ž‹†‡”ƀ Download free eBooks at bookboon.com 30 Click on the ad to read more (128) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet The screenshot of widgets to specify the Thiele modulus and Biot numbers and the resulting plot is shown in Fig 2.3 Figure 2.3: The widget to specify the values of Thiele modulus and Biot numbers for the first-order reaction with external mass transfer limitations in isothermal pellet Notebook FirstOrder_Isothermal_ExternalMassTransfer_Effectiveness.ipynb This notebook is used to calculate the effectiveness factor for the first-order isothermal reaction with external mass transfer limitations in the spherical pellet ◊◊ Import packages ʩƒ–’Ž‘–Ž‹„‹Ž‹‡ ‹’‘”–—’›ƒ•’ ‹’‘”–ƒ–’Ž‘–Ž‹„Ŝ’›Žƒ„ƒ•’Ž– ˆ”‘(129) ›–Š‘Ŝ†‹•’Žƒ›‹’‘”– Ž‡ƒ”ɏ‘—–’—–ř†‹•’Žƒ›ř  ˆ”‘(130) ›–Š‘ŜŠ–ŽŜ™‹†‰‡–•‹’‘”–‹–‡”ƒ –ř Ž‘ƒ–Ž‹†‡”ř řƒ–‡š Download free eBooks at bookboon.com 31 (131) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet ◊◊ Define the main function fmain: ɤ ɤƒ‹’”‘‰”ƒ ɤ †‡ˆˆƒ‹ſŠř‹ɨř‹ɩř‹ɪřƋƋ™ƒ”‰•ƀś ɤ ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–”‡Žƒ–‹‘•Š‹’•„‡–™‡‡–Š‡‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘” ɤƒ†Š‹‡Ž‡‘†—Ž—•ˆ‘”˜ƒ”‹‘—•˜ƒŽ—‡•‘ˆ‹‘–—„‡” οο Specify the array of Thiele moduli and allocate the array of effectiveness factors ɤ ɤ•’‡ ‹ˆ›–Š‡ƒ””ƒ›‘ˆŠ‹‡Ž‡‘†—Ž—• Iʰ’ŜŽ‹•’ƒ ‡ſɥŜɥɨřɨɥɥŜřɨɥɥɨƀ ɤƒŽŽ‘ ƒ–‡ƒ””ƒ›‘ˆ‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘” Kʰ’Ŝœ‡”‘•ſŽ‡ſIƀƀ οο Calculate and plot the effectiveness factor as a function of Thiele modulus ɤ ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘”ˆ‘”‹ɨ ƒʰɨŜŵ’Ŝ–ƒŠſIƀŞɨŜŵI KʰſɪŜŵIƀƋƒŵſɨʫſIŵ‹ɨƀƋƒƀ ’Ž–Ŝ” ƒ”ƒ•Ŝ—’†ƒ–‡ſƇɐˆ‘–Ŝ•‹œ‡ɐśɨɩƈƀ ’Ž–ŜŽ‘‰Ž‘‰ſIřKřɐŞɐř„ƒ•‡šʰɨɥřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐ„ɐƀ ’Ž–ŜŠ‘Ž†ſɐ‘ɐƀ ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘”ˆ‘”‹ɩ ƒʰɨŜŵ’Ŝ–ƒŠſIƀŞɨŜŵI KʰſɪŜŵIƀƋƒŵſɨʫſIŵ‹ɩƀƋƒƀ ’Ž–ŜŽ‘‰Ž‘‰ſIřKřɐŞɐř„ƒ•‡šʰɨɥřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐ”ɐƀ ɤ ƒŽ —Žƒ–‡ƒ†’Ž‘–‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘”ˆ‘”‹ɪ ƒʰɨŜŵ’Ŝ–ƒŠſIƀŞɨŜŵI KʰſɪŜŵIƀƋƒŵſɨʫſIŵ‹ɪƀƋƒƀ ’Ž–ŜŽ‘‰Ž‘‰ſIřKřɐŞɐř„ƒ•‡šʰɨɥřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐɐƀ ɤ•’‡ ‹ˆ›’Ž‘–ƒš‡•ř–‹–Ž‡ƒ†Ž‡‰‡† ’Ž–ŜšŽƒ„‡ŽſɐŠ‹‡Ž‡‘†—Ž—•řɛɎ’Š‹ɛƃŞƄɐƀ ’Ž–Ŝ›Žƒ„‡Žſɐˆˆ‡ –‹˜‡‡••ˆƒ –‘”řɛɎ‡–ƒɛƃŞƄɐƀ ’Ž–Ŝƒš‹•ſƃɥŜɥɨřɨɥɥŜřɥŜɥřɨŜɩƄƀ ’Ž–Ŝ–‹–Ž‡ſɐ ‹”•–Ş ‘”†‡””‡ƒ –‹‘‹ƒ•’Š‡”‹ ƒŽ’‡ŽŽ‡–™‹–Š‡š–‡”ƒŽƒ••–”ƒ•ˆ‡”Ɏɐƀ ’Ž–Ŝ‰”‹†ſ”—‡ř™Š‹ Šʰɑ„‘–ŠɑřŽ•ʰɑŞɑƀ ’Ž–Ŝ‰”‹†ſ”—‡řɐƒŒ‘”ɐřŽ‹‡™‹†–ŠʰɨŜɥƀ ’Ž–Ŝ‰”‹†ſ”—‡řɐ‹‘”ɐřŽ‹‡™‹†–ŠʰɥŜɬƀ Ž‡‰‡†ʰ’Ž–ŜŽ‡‰‡†ſƃſ”ɐɛƇ‹ƈʰɐʫ•–”ſ‹ɨƀʫɐɛɐƀřſ”ɐɛƇ‹ƈʰɐʫ•–”ſ‹ɩƀʫɐɛɐƀř ſ”ɐɛƇ‹ƈʰɐʫ•–”ſ‹ɪƀʫɐɛɐƀƄřŽ‘ ʰɐŽ‘™‡”Ž‡ˆ–ɐƀ Ž‡‰‡†Ŝ‰‡–ɏˆ”ƒ‡ſƀŜ•‡–ɏˆƒ ‡ ‘Ž‘”ſɐ™Š‹–‡ɐƀ ’Ž–Ŝ•Š‘™ſƀ ”‡–—” Download free eBooks at bookboon.com 32 (132) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet ◊◊ Define a widget ɤ ɤ•’‡ ‹ˆ›™‹†‰‡–• Šɨʰ ſ˜ƒŽ—‡ʰɑʳŠɫʴʳ„ʴ‹ˆˆ—•‹‘ƒ† ‹”•–Ş ”†‡”‡ƒ –‹‘‹(133) •‘–Š‡”ƒŽ’Š‡”‹ ƒŽ‡ŽŽ‡–ʳ„”ʴ™‹–Šš–‡”ƒŽƒ••”ƒ•ˆ‡”‹‹–ƒ–‹‘• ʳŵ„ʴɑř ‘Ž‘”ʰɑ„”‘™ɑƀ Šɩʰ ſ˜ƒŽ—‡ʰɑʳ„”ʴɑƀ †‹•’Žƒ›ſŠɨƀ ɤ•‡•Ž‹†‡”–‘‹’—–˜ƒŽ—‡•‘ˆ‹‘•—„‡” ‹ɨɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɨŜƀ ‹ɨɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛ‹ɏɨɛśɑ ‹ɩɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɪŜƀ ‹ɩɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛ‹ɏɩɛśɑ ‹ɪɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɨɥŜƀ ‹ɪɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛ‹ɏɪɛśɑ ™ʰ‹–‡”ƒ –ſˆƒ‹řŠʰŠɩř‹ɨʰ‹ɨɏ•Ž‹†‡”ř‹ɩʰ‹ɩɏ•Ž‹†‡”ř‹ɪʰ‹ɪɏ•Ž‹†‡”ƀ The screenshot of widgets to specify the Biot numbers is shown in Fig 2.4 Excellent Economics and Business programmes at: “The perfect start of a successful, international career.” CLICK HERE to discover why both socially and academically the University of Groningen is one of the best places for a student to be www.rug.nl/feb/education Download free eBooks at bookboon.com 33 Click on the ad to read more (134) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet Figure 2.4: The widget to plot the effectiveness factor for the first-order reaction with external mass transfer limitations in isothermal pellet Figure 2.5 illustrates the effect of Thiele modulus on the reactant concentration distribution in the radial direction of the isothermal pellet for the first-order reaction These distributions were calculated by using the FirstOrder_Isothermal_Concentration_print.ipynb notebook At low values of Thiele modulus, the reactant is nearly uniformly distributed within the pellet since the reactant consumption rate by reaction is slower than the delivery rate by diffusion At high values of Thiele modulus, the reactant is depleted close to the pellet outer surface due to the high reaction rate As a result, the reactant concentration distribution within the pellet is highly non-uniform Figure 2.5: Concentration profiles for the first-order reaction in isothermal catalyst pellet Download free eBooks at bookboon.com 34 (135) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet The effect of Thiele modulus on effectiveness factor is illustrated in Fig 2.6 This figure was calculated and plotted by using the FirstOrder_Isothermal_Effectiveness_print.ipynb notebook The effectiveness factor approaches unity at low values of Thiele modulus (I  ) indicating the complete utilization of internal catalyst volume However, the effectiveness factor decreases rapidly at high values of Thiele modulus This is an indication on non-effective utilization of catalyst volume as the reaction is taking place only near the outer pellet surface Figure 2.6: Effectiveness factor for the first-order reaction in isothermal catalyst pellet The effect of external mass transfer resistance on the reactant concentration distribution in the pellet is shown in Fig 2.7 We used the FirstOrder_Isothermal_ExternalMassTransfer_ Concentration_print.ipynb notebook to calculate and plot this figure At high values of Biot number, the rate of mass transfer of reactant from the bulk phase to the external pellet surface is high, and the reactant concentration near the pellet surface is close to the bulk concentration At low values of Biot number, the surface concentration is significantly lower than the bulk one For example, the dimensionless reactant concentration is equal to 0.44 at U  for %LP  and I  The reactant concentration profile is more uniform for low Biot number than that for high %LP due to the higher diffusion rate in the pellet Download free eBooks at bookboon.com 35 (136) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet Figure 2.7: Concentration profiles for the first-order reaction in isothermal catalyst pellet with external mass-transfer limitations In the past four years we have drilled 89,000 km That’s more than twice around the world Who are we? We are the world’s largest oilfield services company1 Working globally—often in remote and challenging locations— we invent, design, engineer, and apply technology to help our customers find and produce oil and gas safely Who are we looking for? Every year, we need thousands of graduates to begin dynamic careers in the following domains: n Engineering, Research and Operations n Geoscience and Petrotechnical n Commercial and Business What will you be? careers.slb.com Based on Fortune 500 ranking 2011 Copyright © 2015 Schlumberger All rights reserved Download free eBooks at bookboon.com 36 Click on the ad to read more (137) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I First-order Reaction in Isothermal Catalyst Pellet The relationships between the effectiveness factor and Thiele modulus are shown in Fig 2.8 for various values of Biot number This figure was calculated and plotted utilizing the FirstOrder_Isothermal_ExternalMassTransfer_Effectiveness_print.ipynb notebook The limiting value of Thiele modulus corresponding to K |  shifts to the low values of Thiele modulus with decreasing the Biot number to result in the narrow range of operation with full utilization of catalyst volume Figure 2.8: Effectiveness factor for the first-order reaction in isothermal catalyst pellet with external mass-transfer limitations Download free eBooks at bookboon.com 37 (138) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet SECOND-ORDER REACTION IN ISOTHERMAL CATALYST PELLET In this chapter, you will study: Setting up the mass balance equation that accounts for the diffusion and secondorder catalytic reaction in the isothermal spherical pellet Solving numerically the model equation using the orthogonal collocation method Simulating the reactant concentration profiles in the pellet and the effectiveness factor for various values of Thiele modulus using the developed IPython notebooks 3.1 MASS BALANCE EQUATION We can write the dimensionless mass balance equation for the second-order chemical reaction in the isothermal spherical catalyst pellet similar to Eq (2.15) as G F  GF  ˜  I F  U GU GU  (3.1) Here, the Thiele modulus is defined as N ˜  ˜ & $ E I 'HII  $  The boundary conditions are • At the pellet center U  : GF GU  (3.2) • At the outer pellet surface U  : οο without external mass transfer limitations F  (3.3) οο with external mass transfer limitations  F  GF ˜ %LP G U (3.4) U  Download free eBooks at bookboon.com 38 (139) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet 3.2 NUMERICAL SOLUTION OF MODEL EQUATION USING ORTHOGONAL COLLOCATION METHOD As the problem is symmetrical at U  , we introduce the following transformation [ U  (3.5) Using this transformation, we can write the first derivative of concentration with respect to U in terms of the derivative with respect to [ as GF GU GF G[ ˜ G[ G U GF ˜ U G[  [ GF G[ and the second derivative of concentration with respect to U as G F GU G § GF · ¨ [ ¸ GU © G[ ¹ G § GF · G[ ¨ [ ¸˜ G[ © G[ ¹ G U ª  GF G F º  U ˜  ˜ « » ˜ U G[  ¼ ¬ U G[ U  G F GF   G[ G[ ª GF    G  F º G[ « ˜ ˜ ˜ [   [ ˜  » ˜ G[ ¼ G U ¬ G[  [ G F GF   G[ G[ American online LIGS University is currently enrolling in the Interactive Online BBA, MBA, MSc, DBA and PhD programs: ▶▶ enroll by September 30th, 2014 and ▶▶ save up to 16% on the tuition! ▶▶ pay in 10 installments / years ▶▶ Interactive Online education ▶▶ visit www.ligsuniversity.com to find out more! Note: LIGS University is not accredited by any nationally recognized accrediting agency listed by the US Secretary of Education More info here Download free eBooks at bookboon.com 39 Click on the ad to read more (140) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet Substituting the first and second derivatives into Eq (3.1) results in § G F GF ·  § GF · ˜ ¨  [ ¸  I F  ¨ [    ¸  G[ ¹ G[ ¹ [ © © G[  Simplifying the above equation, we have: [ G F GF    I F G[  G[  (3.6) We use the orthogonal collocation method (Villadsen & Michelsen 1978) for the numerical solution of nonlinear ordinary differential equation, Eq (3.6), with boundary conditions Eqs (3.2)–(3.4) We select N+1 interpolation points in such a way that the first points are the interior collocation points and the N+1 point is the boundary point at [1   The interior points are chosen as roots of the Jacobi collocation polynomial - D  E (141) with D  and E   The unknown variable c is expanded in a set of Jacobi polynomials in terms of  even powers of U as (Finlayson 1980): F (142)    U  (143) ¦ D M ˜ 3M  U  (144) (3.7) F U (145) M  where D M are the unknown coefficients and 3M  U  (146) are the orthogonal polynomials The function defined by Eq (3.7) satisfy the boundary condition by Eq (3.2) The spatial derivatives in Eq (3.6) at the internal collocation points, U M, can be expressed as functions of the concentration: wF wU  UM w F wU  ¦$ N  M N ˜ FN  UM ¦% N  M N ˜ FN $˜F % ˜ F  where FN is the approximate solution at the collocation point U N The matrices A and B are calculated using the method based on Lagrange’s interpolation formula (Rice & Do 2012) The python program for calculation of matrices A and B is given in Appendix A3 Thus, we can write the collocation equations at the interior points, [L  L } , as   M  M   [L ¦ %L  M F M  ¦ $L  M F M  I FL  (3.8) Moving the N+1 term outside the summation sign, we rewrite Eq (3.8) as ª1 º ª1 º  [L « ¦ %L  M F M  %L  F1  »   « ¦ $L  M F M  $L  F1  »  I  FL ¬M  ¼ ¬M  ¼ Download free eBooks at bookboon.com 40  (147) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet Simplifying the above equation, we get: ¦ [ % L M L M    $L  M (148) F M   [L %L     $L   (149) F1   I FL  (3.9) The boundary condition at U  [ (150) is satisfied by using the transformation by Eq (3.5) We then use the boundary condition at U  [ (151) to eliminate F1  from Eq (3.9): οο Using the boundary condition by Eq (3.3), F1   at [1  , we simplify Eq (3.9) as ¦ [ % L M  L M   $L  M (152) F M   [L %L     $L   (153)  I FL  (3.10) οο In the case of external mass transfer limitations, the boundary condition by Eq (3.4) at [1   can be written in terms of the variable x as  GF ˜ %LP G U  F U   %LP GF · § ˜¨ [ ¸ G[ ¹ [ ©   GF %LP G[ (3.11) [  The first derivative at the point [1  is GF G[  ¦$ M  [ [1   M FM Substituting the derivative into Eq (3.11), we get: ¦$ M  F M  $1  F1   M %LP ˜   F1  (154) (3.12)  Solving the above equation for F1  results in  ¦ $1  M F M %LP M  $     %LP  F1  %LP  ¦ $1  M F M M  %LP   $1   Substituting F1  into Eq (3.9) yields 1 ¦ [ % M  L L M   $L  M (155) F M   [L %L     $L   (156) ˜ %LP  ¦ $1  M F M M  %LP   $1   Download free eBooks at bookboon.com 41  I FL (3.13)  (157) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet Rearranging the above equation, we get: § ¦ ¨¨  [ % M  L M L © [ % L L     $L  M   [L %L     $L   (158) ˜   $L   (159) ˜  $1  M · ¸ F M  (3.14) %LP   $1   ¸¹ %LP  I  FL %LP   $1    Finally, we obtain a system of nonlinear algebraic equations: ¦& )L M  L M ˜ F M  GL  JL  L } (3.15) where elements of the matrix C and vector d depend on the boundary conditions at the pellet surface: οο without mass transfer limitations &L  M  [L %L  M   $L  M GL  [L %L     $L   (3.16) JL  I  FL Download free eBooks at bookboon.com 42 Click on the ad to read more (160) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet οο with mass transfer limitations &L  M GL JL  [L %L  M   $L  M (161)   [L %L     $L   (162) ˜  $1  M %LP   $1    [L %L     $L   (163) ˜ %LP (3.17)  %LP   $1    I  FL We use the Newton-Raphson method to solve numerically the system of nonlinear Eqs (3.15) The vector of concentrations on the k +1 iteration, F N  , is calculated as F N   F N  ª¬ - N º¼ ˜ ) N  (3.18) where superscript N corresponds to the current N iteration and J is the Jacobian matrix The elements of the Jacobian matrix are - LM w)L wF M ­&L  M ®  ¯&L  M  IV FL IRU MzL IRU M L (3.19) Here, the non-diagonal elements of the Jacobian matrix are constant and only the diagonal entries depend on FL , and thus change with iteration The effectiveness factor K is given by (Villadsen & Michelsen 1978, p214) as K    F [ (164) ˜ [ G[ (3.20)  ³ The effectiveness factor is calculated by the Radau quadrature 3.3 COMPUTER PROGRAMS AND NUMERICAL RESULTS Notebook SecondOrder_Isothermal_Concentration.ipynb This notebook is used to calculate and plot the reactant concentration profile for the secondorder reaction in the isothermal spherical pellet Download free eBooks at bookboon.com 43 (165) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet ◊◊ Import packages We will use the Python library NumPy for vector manipulations and matrix formation The js_roots module from the scipy.special.orthogonal library is used to calculate the roots of Jacobi polynomial The solve and norm modules from the SciPy library are utilized to solve the dense system of linear equations and to find the vector norm To plot the results of numerical simulations, we will use the matplotlib library The IPython.html module is called to display widgets for interactive input of Thiele modulus The orthogonal_collocation library is used to calculate the collocation matrices and interpolate the solution ʩƒ–’Ž‘–Ž‹„‹Ž‹‡ ‹’‘”–—’›ƒ•’ ˆ”‘• ‹’›Ŝ•’‡ ‹ƒŽŜ‘”–Š‘‰‘ƒŽ‹’‘”–Œ•ɏ”‘‘–• ˆ”‘• ‹’›ŜŽ‹ƒŽ‰‹’‘”–•‘Ž˜‡ ˆ”‘• ‹’›ŜŽ‹ƒŽ‰‹’‘”–‘” ˆ”‘ƒ–’Ž‘–Ž‹„Ŝ’›Žƒ„‹’‘”–Ƌ ˆ”‘(166) ›–Š‘Ŝ†‹•’Žƒ›‹’‘”– Ž‡ƒ”ɏ‘—–’—–ř†‹•’Žƒ›ř  ˆ”‘(167) ›–Š‘ŜŠ–ŽŜ™‹†‰‡–•‹’‘”–‹–‡”ƒ –ř Ž‘ƒ–Ž‹†‡”ř řƒ–‡š ‹’‘”–‘”–Š‘‰‘ƒŽɏ ‘ŽŽ‘ ƒ–‹‘ƒ•‘  ◊◊ Define the main function fmain: οο Input parameters: I – Thiele modulus ɤ ɤƒ‹ˆ— –‹‘ ɤ †‡ˆˆƒ‹ſIřŠřƋƋ™ƒ”‰•ƀś ɤ ɤI‹•ƒŠ‹‡Ž‡‘†—Ž—• ɤ οο Specify the grid The number of internal collocation points is QFROSW The total number of collocation points is equal to QFROSW   ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ‡––Š‡—„‡”‘ˆ‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–• ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ  ‘Ž’–ʰɬ ɤ ɤ‘–ƒŽ—„‡”‘ˆ’‘‹–•ʰ‘‘ˆ‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•ʫ  ɤ”‹‰Š–„‘—†ƒ”›ˆ‘”šʰɨ –’–ʰ ‘Ž’–ʫɨ Download free eBooks at bookboon.com 44 (168) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet οο Set the initial guess for solution of nonlinear equations We will use the uniform profile, i.e F  , as the initial guess ɤ ɤ’‡ ‹ˆ›–Š‡‹‹–‹ƒŽ‰—‡••ˆ‘”•‘Ž—–‹‘‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘•Ŝ ɤ‡™‹ŽŽ—•‡–Š‡—‹ˆ‘” ‘ ‡–”ƒ–‹‘’”‘ˆ‹Ž‡ř ʰɨ  ɥʰ’Ŝ‘‡•ſ ‘Ž’–ƀ οο Calculate the position of internal collocation points as roots of Jacobi polynomial ɤ ɤƒŽ —Žƒ–‡‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•ſšŒƀ ɤŠ‡˜ƒŽ—‡‘ˆ’ƒ”ƒ‡–‡”•ƒŽ’Šƒƒ†„‡–ƒ‘ˆ ƒ ‘„‹’‘Ž›‘‹ƒŽ•ś ɤƒŽ’Šƒʰɨř„‡–ƒʰſ•Şɨƀŵɩ •ʰɩɤ’Š‡”‹ ƒŽ‰‡‘‡–”› ɤ‘””‡•’‘†‹‰’ƒ”ƒ‡–‡”•’ƒ†“‹–Š‡’›–Š‘ˆ— –‹‘Œ•ɏ”‘‘–•ś “ʰſ•ʫɨŜƀŵɩŜ ’ʰɨŜʫ“ ɤ••‹‰‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•řšŒř–‘”‘‘–•‘ˆ ƒ ‘„‹’‘Ž›‘‹ƒŽ šŒʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ™Œʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ƃšŒř™ŒƄʰŒ•ɏ”‘‘–•ſ ‘Ž’–ř’ř“ƀ ɤ”‡’ƒ”‡ƒ””ƒ›‘ˆƒŽŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•ʰ‹–‡”ƒŽʫ”‹‰Š–„‘—†ƒ”› š”ʰ’Ŝœ‡”‘•ſ–’–ƀ š”ƃɥś ‘Ž’–ƄʰšŒƃɥś ‘Ž’–Ƅ š”ƃ–’–ŞɨƄʰɨŜɥɤ”‹‰Š–„‘—†ƒ”› Join the best at the Maastricht University School of Business and Economics! Top master’s programmes •  3rd place Financial Times worldwide ranking: MSc International Business • 1st place: MSc International Business • 1st place: MSc Financial Economics • 2nd place: MSc Management of Learning • 2nd place: MSc Economics • 2nd place: MSc Econometrics and Operations Research • 2nd place: MSc Global Supply Chain Management and Change Sources: Keuzegids Master ranking 2013; Elsevier ‘Beste Studies’ ranking 2012; Financial Times Global Masters in Management ranking 2012 Maastricht University is the best specialist university in the Netherlands (Elsevier) Visit us and find out why we are the best! Master’s Open Day: 22 February 2014 www.mastersopenday.nl Download free eBooks at bookboon.com 45 Click on the ad to read more (169) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet οο Calculate vectors of the first, second and third derivatives of the polynomial at the collocation points ɤ ɤƒŽ —Žƒ–‡˜‡ –‘”•‘ˆ–Š‡ˆ‹”•–ř•‡ ‘†ƒ†–Š‹”† ɤ†‡”‹˜ƒ–‹˜‡•‘ˆ–Š‡’‘Ž›‘‹ƒŽƒ––Š‡ ‘ŽŽ‘ ƒ–‹‘’‘‹–• ƃ†‹ˆɨř†‹ˆɩř†‹ˆɪƄʰ‘ Ŝ†‹ˆſ–’–řš”ƀ οο Calculate matrices of the first Am and second Bm derivative weights, matrix Cm and vector d ɤ ɤŽŽ‘ ƒ–‡‡‘”›ƒ† ƒŽ —Žƒ–‡ƒ–”‹ ‡•‘ˆ–Š‡ˆ‹”•–ſƀƒ†•‡ ‘†ſƀ†‡”‹˜ƒ–‹˜‡™‡‹‰ Š–• ʰ’Ŝœ‡”‘•ſſ–’–ř–’–ƀƀ ʰ’Ŝœ‡”‘•ſſ–’–ř–’–ƀƀ ƃřƄʰ‘ Ŝ ‘Žƒ–”‹šſ–’–řš”ř†‹ˆɨř†‹ˆɩř†‹ˆɪƀ ɤ ɤŽŽ‘ ƒ–‡‡‘”›ƒ† ƒŽ —Žƒ–‡ƒ–”‹šƒ†˜‡ –‘”† ʰ’Ŝœ‡”‘•ſſ ‘Ž’–ř ‘Ž’–ƀƀ †ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ †ƃɥś ‘Ž’–ƄʰɫŜɥƋſš”ƃɥś ‘Ž’–ƄƋƃɥś ‘Ž’–ř–’–ŞɨƄʫ ſſ•ʫɨŜɥƀŵɩŜƀƋƃɥś ‘Ž’–ř–’–ŞɨƄƀ ˆ‘”‹‹”ƒ‰‡ſ ‘Ž’–ƀś ƃ‹řɥś ‘Ž’–ƄʰɫŜɥƋſš”ƃ‹ƄƋƃ‹řɥś ‘Ž’–Ƅʫ ſſ•ʫɨŜɥƀŵɩŜƀƋƃ‹řɥś ‘Ž’–Ƅƀ οο Solve the system of nonlinear equations using the Newton-Raphson method Specify tolerances and the maximum number of iterations ɤ ɤŽŽ‘ ƒ–‡‡‘”›  ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ɤ ɤ‘Ž˜‡–Š‡•›•–‡‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘•—•‹‰‡™–‘Şƒ’Š•‘‡–Š‘† ɤ ɤ‡ˆ‹‡–‘Ž‡”ƒ ‡•ƒ†–Š‡ƒš‹——„‡”‘ˆ‹–‡”ƒ–‹‘ • –‘Žʰɨ‡Şɨɫ –‘Ž ʰɨ‡Şɨɫ ƒš(170) –‡”ʰɨɥ οο Allocate vectors and Jacobian matrix ɤŽŽ‘ ƒ–‡˜‡ –‘”•ˆƒ†‰ ˆʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ‰ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ɤŽŽ‘ ƒ–‡–Š‡˜‡ –‘”˜‡ – ˜‡ –ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ɤŽŽ‘ ƒ–‡–Š‡ ƒ ‘„‹ƒƒ–”‹š  ƒ ʰ’Ŝœ‡”‘•ſſ ‘Ž’–ř ‘Ž’–ƀƀ ɤƒ‡ƒ ‘’›‘ˆ˜‡ –‘”   ʰ ɥŜ ‘’›ſƀ Download free eBooks at bookboon.com 46 (171) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet οο Start Newton iterations ɤ ɤ–ƒ”–‡™–‘‹–‡”ƒ–‹‘• ˆ‘”‹‹”ƒ‰‡ſƒš(172) –‡”ƀś ɤ ɤ‡–—’ƒ•›•–‡‘ˆ ‘Ž’–‘Ž‹‡ƒ”ƒŽ‰‡„”ƒ‹ ‡“—ƒ–‹‘•řˆʰɥ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ”‡ƒ –‹‘–‡” ‰ʰŞſIƋƋɩƀƋ ƋƋɩ ɤ ƒŽ —Žƒ–‡ˆſ‹ƀƒ–‹Ş–Š‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹– ˆ‘”‹‹”ƒ‰‡ſ ‘Ž’–ƀś ˜‡ –ʰƃ‹řśƄƋ ƃśƄ ˆƃ‹Ƅʰ˜‡ –Ŝ•—ſƀʫ†ƃ‹Ƅʫ‰ƃ‹Ƅ ɤ ɤ‡–—’ ƒ ‘„‹ƒ ɤ  ƒ ʰŜ ‘’›ſƀ ɤ”‡ƒ –‹‘–‡”  ƒ ƃ’Ŝ†‹ƒ‰ɏ‹†‹ ‡•ɏˆ”‘ſ ƒ ƀƄŞʰɩŜƋſIƋƋɩƀƋ  ɤ ‹†‡™•‘Ž—–‹‘˜‡ –‘”„›•‘Ž˜‹‰–Š‡•›•–‡‘ˆŽ‹‡ƒ”‡“—ƒ–‹‘•  ‡™ʰ Ş•‘Ž˜‡ſ ƒ řˆƀ ɤŠ‡ ƒŽ‰‘”‹–Š ‘˜‡”‰‡ ‡ ‹ˆſ‘”ſ ‡™Ş ƀʳ–‘Žƀś „”‡ƒ ‹ˆſ‘”ſˆƀʳ–‘Ž ƀś „”‡ƒ  ʰ ‡™Ŝ ‘’›ſƀ ɤ ɤ†‡™–‘‹–‡”ƒ–‹‘• ɤŠ‡ ‹ˆ–Š‡—„‡”‘ˆ‹–‡”ƒ–‹‘•”‡ƒ Š‡•ƒš(173) –‡” ‹ˆ‹ʴʰƒš(174) –‡”Şɨś ’”‹–ſɐ‘‘ƒ›‹–‡”ƒ–‹‘•ś–”›–‘‹ ”‡ƒ•‡ƒš(175) –‡”‘”†‡ ”‡ƒ•‡–‘Ž‡”ƒ ‡•ɐƀ •›•Ŝ‡š‹–ſƀ ɤ‡Ž•‡ś ɤ’”‹–ſɐ— ‡••ˆ—Ž•‘Ž—–‹‘ś–Š‡—„‡”‘ˆ‹–‡”ƒ–‹‘•‹•ʩ•ɐʩ‹ƀ οο Calculate the effectiveness factor ɤ ɤƒŽ —Žƒ–‡–Š‡‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘” ˜‡ –‘”ɨʰ’Ŝœ‡”‘•ſ–’–ƀ ˜‡ –‘”ɩʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ƃ˜‡ –‘”ɨƄʰ‘ Ŝ”ƒ†ƒ—ſ–’–řš”ř†‹ˆɨƀ ˜‡ –‘”ɩƃɥś ‘Ž’–Ƅʰ˜‡ –‘”ɨƃɥś ‘Ž’–ƄƋ ƃɥś ‘Ž’–ƄƋƋɩ Kʰ˜‡ –‘”ɨƃ–’–ŞɨƄʫ˜‡ –‘”ɩŜ•—ſƀ ’”‹–ſɑˆˆ‡ –‹˜‡‡••ˆƒ –‘”śKʰƇɥśʳɬŜɪˆƈɑŜˆ‘”ƒ–ſKƀƀ Download free eBooks at bookboon.com 47 (176) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet οο Find the solution vector by interpolation ɤ ɤ ‹†–Š‡•‘Ž—–‹‘ƒ–—†‹˜—‹ˆ‘”Ž›†‹•–”‹„—–‡†‹–‡”’‘Žƒ–‹ ‘’‘‹–• —†‹˜ʰɬɨ šɏ‹–ʰ’ŜŽ‹•’ƒ ‡ſɥŜɥřɨŜɥř—ʰ—†‹˜ƀ ›ɏ‹–ʰ’Ŝœ‡”‘•ſ—†‹˜ƀ ɤ ›ʰ’Ŝ‘‡•ſ–’–ƀ ›ƃɥś ‘Ž’–Ƅʰ ƃɥś ‘Ž’–Ƅ ɤ š‹–”’ʰ’Ŝœ‡”‘•ſ–’–ƀ ˆ‘”‹‹”ƒ‰‡ſ—†‹˜ƀś šššʰšɏ‹–ƃ‹ƄƋšɏ‹–ƃ‹Ƅ ƃš‹–’Ƅʰ‘ Ŝ‹–”’ſ–’–řšššřš”ř†‹ˆɨƀ ˜‡ –‘”ɨʰš‹–’Ƌ› ›ɏ‹–ƃ‹Ƅʰ˜‡ –‘”ɨŜ•—ſƀ > Apply now redefine your future - © Photononstop AxA globAl grAduAte progrAm 2015 axa_ad_grad_prog_170x115.indd 19/12/13 16:36 Download free eBooks at bookboon.com 48 Click on the ad to read more (177) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet οο Finally, we plot the concentration profile ɤ ɤ’Ž‘–”‡•—Ž–• ’Ž‘–ſšɏ‹–ř›ɏ‹–řɐŞɐřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐ„ɐƀ ƒ–’Ž‘–Ž‹„Ŝ” ƒ”ƒ•Ŝ—’†ƒ–‡ſƇɐˆ‘–Ŝ•‹œ‡ɐśɨɩƈƀ šŽƒ„‡Žſɐ‹‡•‹‘Ž‡••”ƒ†‹ƒŽ†‹•–ƒ ‡řɛUɛƃŞƄɐƀ ›Žƒ„‡Žſɐ‹‡•‹‘Ž‡•• ‘ ‡–”ƒ–‹‘ř ƃŞƄɐƀ –‹–Ž‡ɨʰɐ‡ ‘†Ş‘”†‡””‡ƒ –‹‘‹‹•‘–Š‡”ƒŽ•’Š‡”‹ ƒŽ ƒ–ƒŽ›•–śɎɐ –‹–Ž‡ɨʫʰɐŠ‹‡Ž‡‘†—Ž—•ʰʩ•ɐ –‹–Ž‡ſ–‹–Ž‡ɨʩſIƀƀ ƒš‹•ſƃɥŜřɨŜřɥŜɥřɨŜɥƄƀ •Š‘™ſƀ ”‡–—” ◊◊ Define the widget ɤ ɤ’‡ ‹ˆ›™‹†‰‡–• Šɨʰ ſ˜ƒŽ—‡ʰɑʳŠɫʴʳ„ʴ‹ˆˆ—•‹‘ƒ†‡ ‘†Ş ”†‡”‡ƒ –‹‘‹(178) •‘–Š‡”ƒŽ’Š‡”‹ ƒŽ‡ŽŽ‡–ʳŵ„ʴɑř ‘Ž‘”ʰɑ„”‘™ɑƀ Šɩʰ ſ˜ƒŽ—‡ʰɑʳ„”ʴɑƀ Šɪʰƒ–‡šſ˜ƒŽ—‡ʰɑɛɛɎ„‘šƇ’‡ ‹ˆ›Š‹‡Ž‡‘†—Ž—•ƈɎ’Š‹Ɏ„‘šƇśƈɛɛɑřƀ †‹•’Žƒ›ſŠɨƀ †‹•’Žƒ›ſŠɩƀ †‹•’Žƒ›ſŠɪƀ ɤ•‡•Ž‹†‡”–‘‹’—–˜ƒŽ—‡‘ˆŠ‹‡Ž‡‘†—Ž—• ’Š‹ɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɨɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɬƀ ’Š‹ɏ•Ž‹†‡”Ŝ†‡• ”‹’–‹‘ʰɑɛɛɎ’Š‹ɛɛɑ ™ʰ‹–‡”ƒ –ſˆƒ‹řIʰ’Š‹ɏ•Ž‹†‡”řŠʰŠɩƀ The screenshot illustrating the widget to specify the value of Thiele modulus and simulation results is shown in Fig 3.1 Download free eBooks at bookboon.com 49 (179) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet Figure 3.1: The widget to specify the value of Thiele modulus for the second-order reaction in isothermal pellet Notebook SecondOrder_Isothermal_Effectiveness.ipynb This notebook is used to calculate and plot the effectiveness factor for the second-order reaction in the isothermal spherical pellet ◊◊ Import packages ʩƒ–’Ž‘–Ž‹„‹Ž‹‡ ‹’‘”–• ‹’›ƒ••’ ‹’‘”–—’›ƒ•’ ˆ”‘• ‹’›Ŝ•’‡ ‹ƒŽŜ‘”–Š‘‰‘ƒŽ‹’‘”–Œ•ɏ”‘‘–• ɤ ˆ”‘• ‹’›ŜŽ‹ƒŽ‰‹’‘”–•‘Ž˜‡ ˆ”‘• ‹’›ŜŽ‹ƒŽ‰‹’‘”–‘” ‹’‘”–ƒ–’Ž‘–Ž‹„Ŝ’›Žƒ„ƒ•’Ž– ˆ”‘(180) ›–Š‘Ŝ†‹•’Žƒ›‹’‘”– Ž‡ƒ”ɏ‘—–’—–ř†‹•’Žƒ›ř  ˆ”‘(181) ›–Š‘ŜŠ–ŽŜ™‹†‰‡–•‹’‘”–  ɤ ‹’‘”–‘”–Š‘‰‘ƒŽɏ ‘ŽŽ‘ ƒ–‹‘ƒ•‘  ‹’‘”–•›• Download free eBooks at bookboon.com 50 (182) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet ◊◊ Define the main function fmain: ɤ ɤƒ‹ˆ— –‹‘ ɤ †‡ˆˆƒ‹ſIƀś ɤ ɤI‹•ƒŠ‹‡Ž‡‘†—Ž—• οο Specify the grid ɤ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ•’‡ ‹ˆ›–Š‡—„‡”‘ˆ‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•  ‘Ž’–ʰɮ ɤ •ʰɩɤ’Š‡”‹ ƒŽ‰‡‘‡–”› Download free eBooks at bookboon.com 51 Click on the ad to read more (183) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet οο Set the initial guess for solution of nonlinear equations ɤ ɤ•‡–‹‹–‹ƒŽ‰—‡••ś ɤ ‡”‡™‡—•‡ƒ—‹ˆ‘” ‘ ‡–”ƒ–‹‘’”‘ˆ‹Ž‡ƒ–‹Ž‡–˜ƒŽ—‡  ɥʰ’Ŝ‘‡•ſ ‘Ž’–ƀ οο Calculate the position of internal collocation points as roots of Jacobi polynomial ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ–‘–ƒŽ—„‡”‘ˆ’‘‹–•ʰ‘‘ˆ‹–‡”ƒŽ ‘ŽŽ‘ Ŝ’‘‹–•ʫ ɤ”‹‰Š–„‘—†ƒ”›ˆ‘”šʰɨ –’–ʰ ‘Ž’–ʫɨ ɤ ɤ ƒŽ —Žƒ–‡‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•ſšŒƀ ɤ–Š‡˜ƒŽ—‡‘ˆ’ƒ”ƒ‡–‡”•ƒŽ’Šƒƒ†„‡–ƒ‹†‡• ”‹’–‹‘‘ˆ ƒ ‘„‹’‘Ž›‘‹ƒŽ•ś ɤƒŽ’Šƒʰɨř„‡–ƒʰſ•Şɨƀŵɩ ɤ ‘””‡•’‘†‹‰’ƒ”ƒ‡–‡”•’ƒ†“‹–Š‡’›–Š‘ˆ— –‹‘Œ•ɏ”‘‘–•ś “ʰſ•ʫɨŜƀŵɩŜ ’ʰɨŜʫ“ ɤ‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•řšŒřƒ”‡–Š‡”‘‘–•‘ˆ ƒ ‘„‹’‘Ž› ‘‹ƒŽ šŒʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ™Œʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ƃšŒř™ŒƄʰŒ•ɏ”‘‘–•ſ ‘Ž’–ř’ř“ƀ ɤƒŽŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•ʰ‹–‡”ƒŽʫ”‹‰Š–„‘—†ƒ”› š”ʰ’Ŝœ‡”‘•ſ–’–ƀ š”ƃɥś ‘Ž’–ƄʰšŒƃɥś ‘Ž’–Ƅ š”ƃ–’–ŞɨƄʰɨŜɥɤ”‹‰Š–„‘—†ƒ”› οο Calculate vectors of the first, second and third derivatives of the polynomial at the collocation points Calculate matrices of the first Am and second Bm derivative weights, matrix Cm and vector d ɤ ɤ ƒŽ —Žƒ–‡˜‡ –‘”•‘ˆ–Š‡ˆ‹”•–ſ†‹ˆɨƀř•‡ ‘†ſ†‹ˆɩƀƒ†–Š‹”†ſ†‹ˆɪƀ ɤ†‡”‹˜ƒ–‹˜‡•‘ˆ–Š‡‘†‡’‘Ž›‘‹ƒŽƒ––Š‡œ‡”‘• ƃ†‹ˆɨř†‹ˆɩř†‹ˆɪƄʰ‘ Ŝ†‹ˆſ–’–řš”ƀ ɤ ɤ•‡–—’ƒ–”‹ ‡•‘ˆ–Š‡ˆ‹”•–ſƀƒ†•‡ ‘†ſƀ†‡”‹˜ƒ–‹˜‡™‡‹‰Š–• ʰ’Ŝœ‡”‘•ſſ–’–ř–’–ƀƀ ʰ’Ŝœ‡”‘•ſſ–’–ř–’–ƀƀ ƃřƄʰ‘ Ŝ ‘Žƒ–”‹šſ–’–řš”ř†‹ˆɨř†‹ˆɩř†‹ˆɪƀ  ɤ ɤ•‡–—’ƒ–”‹šƒ†˜‡ –‘”† ʰ’Ŝœ‡”‘•ſſ ‘Ž’–ř ‘Ž’–ƀƀ †ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ †ƃɥś ‘Ž’–ƄʰɫŜɥƋſš”ƃɥś ‘Ž’–ƄƋƃɥś ‘Ž’–ř–’–ŞɨƄʫ ſſ•ʫɨŜɥƀŵɩŜƀƋƃɥś ‘Ž’–ř–’–ŞɨƄƀ ˆ‘”‹‹”ƒ‰‡ſ ‘Ž’–ƀś ƃ‹řɥś ‘Ž’–ƄʰɫŜɥƋſš”ƃ‹ƄƋƃ‹řɥś ‘Ž’–Ƅʫ ſſ•ʫɨŜɥƀŵɩŜƀƋƃ‹řɥś ‘Ž’–Ƅƀ Download free eBooks at bookboon.com 52 (184) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet οο Solve the system of nonlinear equations using the Newton-Raphson method ɤ ɤƒŽŽ‘ ƒ–‡‡‘”›  ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ɤ ɤ•‘Ž˜‡–Š‡•›•–‡‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘•—•‹‰‡™–‘Şƒ’Š•‘‡–Š‘† ɤ ɤ†‡ˆ‹‡–‘Ž‡”ƒ ‡•ƒ†–Š‡ƒš‹——„‡”‘ˆ‹–‡”ƒ–‹‘• –‘Žʰɨ‡Şɨɫ –‘Ž ʰɨ‡Şɨɫ ƒš(185) –‡”ʰɨɥ ɤ ˆʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ‰ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ˜‡ –ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ  ƒ ʰ’Ŝœ‡”‘•ſſ ‘Ž’–ř ‘Ž’–ƀƀ ɤ  ʰ ɥŜ ‘’›ſƀ ɤ ɤ•–ƒ”–‡™–‘‹–‡”ƒ–‹‘• ˆ‘”‹‹”ƒ‰‡ſƒš(186) –‡”ƀś ɤ ɤ•‡–—’ƒ•›•–‡‘ˆ ‘Ž’–‘Ž‹‡ƒ”ƒŽ‰‡„”ƒ‹ ‡“—ƒ–‹‘•řˆʰɥ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ”‡ƒ –‹‘–‡” ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ‰ʰŞſIƋƋɩƀƋ ƋƋɩ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤˆ‘”‡ƒ Š‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹– ˆ‘”‹‹”ƒ‰‡ſ ‘Ž’–ƀś ˜‡ –ʰƃ‹řśƄƋ ƃśƄ ˆƃ‹Ƅʰ˜‡ –Ŝ•—ſƀʫ†ƃ‹Ƅʫ‰ƃ‹Ƅ ɤ ɤ•‡–—’ ƒ ‘„‹ƒ ɤ  ƒ ʰŜ ‘’›ſƀ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ  ɤ”‡ƒ –‹‘–‡” ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ   ƒ ƃ’Ŝ†‹ƒ‰ɏ‹†‹ ‡•ɏˆ”‘ſ ƒ ƀƄŞʰɩŜƋſIƋƋɩƀƋ  ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ  ɤˆ‹†–Š‡•‘Ž—–‹‘˜‡ –‘”„›•‘Ž˜‹‰•›•–‡‘ˆŽ‹‡ƒ”‡“—ƒ–‹‘•  ‡™ʰ Ş•‘Ž˜‡ſ ƒ řˆƀ ɤ Š‡ ƒŽ‰‘”‹–Š ‘˜‡”‰‡ ‡ ‹ˆſ‘”ſ ‡™Ş ƀʳ–‘Žƀś „”‡ƒ ‹ˆſ‘”ſˆƀʳ–‘Ž ƀś „”‡ƒ  ʰ ‡™Ŝ ‘’›ſƀ ɤ ɤ‡†‡™–‘‹–‡”ƒ–‹‘• ɤ Š‡ ‹ˆ–Š‡—„‡”‘ˆ‹–‡”ƒ–‹‘•”‡ƒ Š‡•ƒš(187) –‡” ‹ˆ‹ʴʰƒš(188) –‡”Şɨś ’”‹–ſɐ‘‘ƒ›‹–‡”ƒ–‹‘•ś–”›–‘‹ ”‡ƒ•‡ƒš(189) –‡”‘”†‡ ”‡ƒ•‡–‘Ž‡”ƒ ‡•ɐƀ •›•Ŝ‡š‹–ſƀ Download free eBooks at bookboon.com 53 (190) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet οο Calculate the effectiveness factor ɤ ɤ ƒŽ —Žƒ–‡–Š‡‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘” ˜‡ –‘”ɨʰ’Ŝœ‡”‘•ſ–’–ƀ ˜‡ –‘”ɩʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ƃ˜‡ –‘”ɨƄʰ‘ Ŝ”ƒ†ƒ—ſ–’–řš”ř†‹ˆɨƀ ˜‡ –‘”ɩƃɥś ‘Ž’–Ƅʰ˜‡ –‘”ɨƃɥś ‘Ž’–ƄƋ ƃɥś ‘Ž’–ƄƋƋɩ Kʰ˜‡ –‘”ɨƃ–’–ŞɨƄʫ˜‡ –‘”ɩŜ•—ſƀ ɤ ”‡–—”ƃKř ‘Ž’–Ƅ ◊◊ Define the widget ɤ ɤ†‹•’Žƒ›–Š‡–‹–Ž‡ Šɨʰ ſ˜ƒŽ—‡ʰɑʳŠɫʴʳ„ʴ‹ˆˆ—•‹‘ƒ†‡ ‘†Ş ”†‡”‡ƒ –‹‘‹(191) •‘–Š‡”ƒŽ’Š‡”‹ ƒŽ‡ŽŽ‡–ʳŵ„ʴɑř ‘Ž‘”ʰɑ„”‘™ɑƀ Šɩʰ ſ˜ƒŽ—‡ʰɑʳ„”ʴɑƀ †‹•’Žƒ›ſŠɨƀ †‹•’Žƒ›ſŠɩƀ Need help with your dissertation? Get in-depth feedback & advice from experts in your topic area Find out what you can to improve the quality of your dissertation! Get Help Now Go to www.helpmyassignment.co.uk for more info Download free eBooks at bookboon.com 54 Click on the ad to read more (192) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet ◊◊ Plot the effectiveness factor as a function of Thiele modulus ɤ ɤ•’‡ ‹ˆ›–Š‡ƒ””ƒ›‘ˆŠ‹‡Ž‡‘†—Ž‹—‹ˆ‘”Ž›†‹•–”‹„—–‡†‹Ž‘‰•’ƒ ‡ ɤ•’‡ ‹ˆ›–Š‡—„‡”‘ˆ†‹˜‹•‹‘•‘ˆ–Š‹••’ƒ ‡ —ɏ‡–ƒʰɨɥɨ Iƒʰ’ŜŽ‘‰•’ƒ ‡ſŞɩřɩř—ɏ‡–ƒř‡†’‘‹–ʰ”—‡ƀ Kƒʰ’Ŝœ‡”‘•ſ—ɏ‡–ƒƀ ɤ ƒŽ —Žƒ–‡–Š‡‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘” ˆ‘”‹‹”ƒ‰‡ſ—ɏ‡–ƒƀś Kƒƃ‹Ƅř ‘Ž’–ʰˆƒ‹ſIƒƃ‹Ƅƀ ɤ ɤ’”‡’ƒ”‡Ž‘‰ŞŽ‘‰’Ž‘– ’Ž–Ŝ” ƒ”ƒ•Ŝ—’†ƒ–‡ſƇɐˆ‘–Ŝ•‹œ‡ɐśɨɩƈƀ ’Ž–ŜŽ‘‰Ž‘‰ſIƒřKƒřɐŞɐř„ƒ•‡šʰɨɥřŽ‹‡™‹†–ŠʰɨŜɬř ‘Ž‘”ʰɐ„ɐƀ ɤ•’‡ ‹ˆ›’Ž‘–ƒš‡•ř–‹–Ž‡ƒ†Ž‡‰‡† ’Ž–Ŝ–‹–Ž‡ſɐ‡ ‘†Ş‘”†‡””‡ƒ –‹‘‹ƒ•’Š‡”‹ ƒŽ’‡ŽŽ‡–ɐ ƀ ’Ž–ŜšŽƒ„‡ŽſɐŠ‹‡Ž‡‘†—Ž—•řɛɎ’Š‹ɛƃŞƄɐƀ ’Ž–Ŝ›Žƒ„‡Žſɐˆˆ‡ –‹˜‡‡••ˆƒ –‘”řɛɎ‡–ƒɛƃŞƄɐƀ ’Ž–Ŝƒš‹•ſƃɥŜɥɨřɨɥɥŜřɥŜɥřɨŜɩƄƀ ’Ž–Ŝ‰”‹†ſ”—‡ř™Š‹ Šʰɑ„‘–ŠɑřŽ•ʰɑŞɑƀ ’Ž–Ŝ‰”‹†ſ”—‡řɐƒŒ‘”ɐřŽ‹‡™‹†–ŠʰɥŜɮƀ ’Ž–Ŝ‰”‹†ſ”—‡řɐ‹‘”ɐřŽ‹‡™‹†–ŠʰɥŜɪƀ ’Ž–Ŝ•Š‘™ſƀ The screenshot displaying the widget and simulation results is shown in Fig 3.2 Figure 3.2: The widget to plot the effectiveness factor for the second-order reaction in isothermal pellet Download free eBooks at bookboon.com 55 (193) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Second-order Reaction in Isothermal Catalyst Pellet Figure 3.3 illustrates the reactant concentration profiles in the isothermal spherical pellet calculated for the second-order reaction using the SecondOrder_Isothermal_Concentration_thiele ipynb notebook Figure 3.3: The reactant concentration distribution for the second-order reaction in isothermal pellet The reactant concentration is non-uniformly distributed in the radial direction of the pellet at large values of Thiele modulus due to increasing resistance to diffusion in the pellet As a result, the effectiveness factor decreases significantly for I ! , as shown in Fig 3.4 This plot was prepared using the SecondOrder_Isothermal_Effectiveness_print.ipynb notebook Figure 3.4: The effectiveness factor for the second-order reaction in isothermal pellet Download free eBooks at bookboon.com 56 (194) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet CHEMICAL REACTION IN NONISOTHERMAL CATALYST PELLET In this chapter, you will learn to: Derive the heat balance equation that accounts for the heat conduction and heat generation by chemical reaction in the non-isothermal spherical pellet Solve numerically the mass and heat balance equations using the finite-difference method Simulate and plot the reactant concentration and temperature profiles in the pellet for various values of process parameters using the elaborated IPython notebooks 4.1 DERIVATION OF HEAT BALANCE EQUATION Consider a first-order irreversible chemical reaction in non-isothermal spherical catalyst pellet $o % Brain power By 2020, wind could provide one-tenth of our planet’s electricity needs Already today, SKF’s innovative knowhow is crucial to running a large proportion of the world’s wind turbines Up to 25 % of the generating costs relate to maintenance These can be reduced dramatically thanks to our systems for on-line condition monitoring and automatic lubrication We help make it more economical to create cleaner, cheaper energy out of thin air By sharing our experience, expertise, and creativity, industries can boost performance beyond expectations Therefore we need the best employees who can meet this challenge! The Power of Knowledge Engineering Plug into The Power of Knowledge Engineering Visit us at www.skf.com/knowledge Download free eBooks at bookboon.com 57 Click on the ad to read more (195) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet We can derive a steady-state energy balance over a spherical shell of thickness 'U located at radius r within a spherical catalyst pellet as § 5DWHRILQSXW · ¨ ¸ RIHQHUJ\ ¨ ¸ ¨ E\FRQGXFWLRQDWU ¸ ¨ ¸ © -RXOHVWLPH(196) ¹ 5DWHRIRXWSXW § · ¨ ¸ RIHQHUJ\ ¨ ¸  ¨ E\FRQGXFWLRQDWU  'U ¸ ¨ ¸ -RXOHVWLPH(197) © ¹  § 5DWHRIJHQHUDWLRQ · ¨ ¸ RIHQHUJ\ ¨ ¸ ¨ E\UHDFWLRQZLWKLQ'U ¸ ¨ ¸ -RXOHVWLPH(198) © ¹  The heat flux by conduction in the catalyst pellet is defined as TU  NHII G7  (4.1) GU where TU is the heat flux and N HII is the effective conductivity The energy released by the first-order reaction within the differential volume element, S U  'U , is N (199) ˜ &$ ˜ S U  'U ˜ '+ 5$ (200)  where '+ (201) is the heat of reaction per mole of A reacted $ Combining all terms, we formulate the energy balance as T U u S U  (202) _U  TU u S U  (203) _U 'U  N (204) ˜ &$ ˜ S U  'U ˜ '+ 5$ (205)  (4.3) Dividing by S'U , taking the limit as 'U goes to zero and using the definition of the first derivative gives G U  TU (206)  U  ˜ N (207) ˜ & $ ˜ '+ 5$ (208) GU  Substituting the heat flux by Eq (4.1), we get: G §  G7 ·  ¨ U ˜ NHII ˜ ¸  U ˜ '+ 5$ (209) ˜ N (210) ˜ & $ GU © GU ¹  (4.4) Assuming a constant effective conductivity, we rewrite Eq (4.4) as N (211) ˜ & $ ˜ '+ 5$ (212) § G 7  G7 · ¨   ˜ ¸  U GU ¹ NHII © GU  (4.5) Download free eBooks at bookboon.com 58 (213) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet We use the Arrhenius equation to describe the temperature dependence of rate constant: § ( § 7E ··  ¸ ¸ N 7E (214) ˜ H[S ¨  ¨ ¨ 57 ©7 ¹ ¸¹ J E © N (215) where ( 5J 7E J § §7 ·· N 7E (216) ˜ H[S ¨ J ¨ E  ¸ ¸  (4.6) ¹¹ © ©7 is the Arrhenius number, E is the intrinsic activation energy, Rg is the gas constant and 7E is the bulk temperature The Arrhenius number reflects the sensitivity of the reaction rate to temperature changes Substituting Eq (4.6) into Eq (4.5), we could write the steady-state energy balance for the first-order reaction in the spherical catalyst pellet as § §7 ·· N 7E (217) ˜ H[S ¨ J ¨ E  ¸ ¸ ˜ & $ ˜ '+ 5$ (218) § G  G7 · ¹¹ © ©7 ¨   ˜ ¸  GU U GU N © ¹ HII   (4.7) The boundary conditions are • At the center of catalyst pellet: There is no heat flux through the pellet center since this is a point of symmetry G7 GU  DWU  (4.8) • At the external surface of catalyst pellet: ◊◊ Fixed temperature at the external surface of the catalyst The temperature at the pellet external surface is equal to the bulk temperature due to the negligible resistance to external mass transfer 7E (4.9) ◊◊ Heat transfer across the boundary at the pellet surface We derive the energy balance at the pellet surface as T u S U (219) _ U  U  S U  ˜ K ˜ _U 7E (220)  where h is the heat transfer coefficient between the catalyst pellet and the bulk fluid Simplifying the above equation and using the flux definition by Eq (4.1) yields K ˜ 7E  _U (221) NHII ˜ G7 GU U (4.10) Download free eBooks at bookboon.com 59 (222) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet Introducing dimensionless variables T  U 7E U and F &$ , we rewrite Eq (4.7) as & $E § §7 ·· N 7E (223) ˜ H[S ¨ J ¨ E  ¸ ¸ ˜ '+ 5$ (224) 7E G T  7E GT ¹¹ © ©7 F ˜ & $E (225)     U ˜ 5 GU GU NHII  Dividing through by  (4.11) 7E results in 5 '+ 5$ (226) 'HII  $& $E  § §  ·· G T  GT  ˜  ˜ I H[S ¨ J ¨  ¸ ¸ ˜ F  GU U GU NHII 7E © © T ¹¹  (4.12) where I is the dimensionless Thiele modulus evaluated at 7E  I  7E (227) N 7E (228) ˜   'HII  $ Introducing the energy generation function E '+ 5$ (229) 'HII  $& $E NHII 7E (4.13) we derive the dimensionless form of energy balance equation for the first-order reaction in non-isothermal spherical pellet as § §  ·· G T  GT  EIV H[S ¨ J ¨  ¸ ¸ F  ˜  GU U GU © © T ¹¹  (4.14) Download free eBooks at bookboon.com 60 Click on the ad to read more (230) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet The dimensionless boundary conditions are ◊◊ At the center of catalyst pellet: GT GU  DW U  (4.15) ◊◊ At the external surface of catalyst pellet: οο Fixed temperature at the external surface of the catalyst pellet T (4.16) οο Heat transfer across the boundary at the pellet external surface  GT ˜ %LK G U T where %LK 5˜K NHII (4.17) U  is the Biot number for heat transfer The Biot number is the ratio of resistance to heat conduction in the pellet to the external resistance to heat convection at the pellet surface The temperature profile within the pellet is uniform at the low value of Biot number due to the small resistance to heat conduction Damkohler relation between concentration and temperature Next we will derive the linear relation between the concentration and temperature Dividing Eq (4.4) by '+ (231) and adding to Eq (2.5), we have: $ NHII G& $ · G §  G §  G7 ˜ ¨U ˜ ¨ U ˜ 'HII  $ ˜ ¸  ¨ '+ 5$ (232) GU GU © GU ¹ GU © · ¸ ¸ ¹ (4.18) Integrating Eq (4.18) from a pellet center U  to a radius U yields § NHII G& G7 ˜ U  ¨ 'HII  $ ˜ $  ¨ '+ 5$ (233) GU GU © · ¸ ¸ ¹ &  (4.19) where & is the integration constant Dividing by U   and rearranging gives · NHII G § ˜7 ¸ ¨ 'HII  $ ˜ & $  '+ 5$ (234) ¸¹ GU ¨© & (4.20) U Download free eBooks at bookboon.com 61 (235) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet From the boundary conditions by Eqs (2.9) and (4.8), we get &  Thus, · NHII G § ˜7 ¸ ¨ 'HII  $ ˜ & $  '+ 5$ (236) ¸¹ GU ¨©  A second integration from the radius r to the pellet surface R gives ­ ½ NHII ° ° ˜ 7E ¾ ® 'HII  $ ˜ & $E  '+ 5$ (237) ° ° ¯ ¿ ­ ½ NHII ° ° ˜ U (238) ¾ (4.21) ® 'HII  $ ˜ & $ U (239)  '+ 5$ (240) ° ° ¯ ¿ Rearranging Eq (4.21), we obtain U (241)  7E 'HII  $ ˜ '+ 5$ (242) NHII ˜ & $E  & $ U (243) (244) (4.22) This linear relation between & $ U (245) and U (246) is called a Damkohler relation Thus, we can solve only one differential equation corresponding either mass or heat balance and find another variable from Eq (4.22) The Damkohler relation in dimensionless form is T  'HII  $ ˜ '+ 5$ (247) NHII ˜ 7E ˜ & $E ˜   F(248) E ˜   F(249) (4.23) Then, we can relate the dimensionless temperature to the dimensionless concentration by T   E ˜   F(250) (4.24) Therefore, we can rewrite Eq (4.6) as N (251) § § ··   ¸ ¸ N 7E (252) ˜ H[S ¨ J ¨ © ©   E ˜   F(253) ¹ ¹ § J ˜ E ˜   F(254) · N 7E (255) ˜ H[S ¨ ¸ (4.25) ©   E ˜   F(256) ¹ Substituting Eq (4.25) in Eq (2.15), we rewrite the dimensionless mass balance as § J ˜ E ˜   F (257) · G F  GF   ˜  I 7E (258) (259) ˜ H[S ¨ ¸˜F  GU U GU ©   E ˜   F(260) ¹  (4.26) Thus, we can solve Eq (4.26) with boundary conditions by Eqs (2.16) and (2.18) to obtain the dimensionless concentration profile in the radial direction of the pellet Then, we calculate the dimensionless temperature profile by Eq (4.24) Download free eBooks at bookboon.com 62 (261) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet The maximum temperature difference between the external surface and the center of catalyst pellet can be evaluated using the Damkohler relation by Eq (4.22) and substituting & $  at U  _U  7E (262) PD[ 'HII  $ '+ 5$ (263) & $E NHII (4.27) Using E by Eq (4.13), we can rewrite Eq (4.27) as E _U  7E (264) PD[ 7E Therefore, the energy generation function E characterizes the ratio of the maximum temperature difference that can exist within the pellet to the bulk temperature Challenge the way we run EXPERIENCE THE POWER OF FULL ENGAGEMENT… RUN FASTER RUN LONGER RUN EASIER… READ MORE & PRE-ORDER TODAY WWW.GAITEYE.COM 1349906_A6_4+0.indd 22-08-2014 12:56:57 Download free eBooks at bookboon.com 63 Click on the ad to read more (265) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet 4.2 NUMERICAL SOLUTION OF MODEL EQUATIONS USING FINITEDIFFERENCE METHOD The dimensionless mass and heat balance equations for the first-order non-isothermal chemical reaction in the spherical catalyst pellet are summarized as follows: οο mass balance equation § §  ··  GF G F  I  H[S ¨ J ¨   ¸ ¸ F  ˜  GU U GU © © T ¹¹  (4.28) οο heat balance equation § §  ·· G T  GT  ˜  EI  H[S ¨ J ¨   ¸ ¸ F  GU U GU © © T ¹¹  (4.29) οο boundary conditions at the pellet center are GF GU  GT GU  DW U  (4.30) οο boundary conditions at the outer surface of the pellet GF GU %LP ˜   F(266)  GT GU %LK ˜   T (267) DW U  (4.31) We use a finite-difference method for discretization of the second-order differential equations and boundary conditions (Beers 2007, p270) We introduce a grid of uniformly-spaced N internal points, U } U , and two end points, U  and U  , as U   U  }  U  U    Thus, the total number of grid points is   and the number of grid intervals is    The internal points are located at U N N ˜ 'U  N }  where 'U  We apply the central difference approximations to the first and second order derivatives at the grid point U N as GF GU G F GU UN UN F U N  (268)  F U N  (269)  'U GT GU UN F UN  (270)  F UN (271)  F UN  (272)  'U (273)  T U N  (274)  T U N  (275) 'U G T GU UN T UN  (276)  T UN (277)  T UN  (278) 'U (279)  Download free eBooks at bookboon.com 64 (280) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet Substitution of these approximations into the differential equation Eqs (4.28) and (4.29) results in § § F UN  (281)  F UN (282)  F UN  (283)  F UN  (284)  F UN  (285)  ··  ˜  I  H[S ¨ J ¨  ¸ ¸¸ F UN (286)  ¨ UN 'U (287) 'U © © T UN (288) ¹ ¹  (4.32) § § T UN  (289)  T UN (290)  T UN  (291)  T U N  (292)  T UN  (293)  ··  ˜  EI  H[S ¨ J ¨  ¸ ¸¸ F UN (294)  ¨ 'U (295) UN 'U © © T UN (296) ¹ ¹  (4.33) Rearrangement of Eqs (4.32) and (4.33) yields §  §  §  ·  ·  · ˜ F U N (297)  ¨   ¨ ¸ ˜ F U N  (298)  ¨  ¸ ˜ F U N  (299)    ¸  U N 'U ¹ U N 'U ¹ © 'U (300) ¹ © 'U (301) © 'U (302) § § I  H[S ¨¨ J ¨  © ©  ·· ¸ ¸ F U N (303) T U N (304) ¹ ¸¹  §  §  §  ·  ·  ·   ˜T UN (305)  ¨ ¨ ¸ ˜ T U N  (306)  ¨  ¸ ˜ T U N  (307)    ¸  U N 'U ¹ U N 'U ¹ © 'U (308) ¹ © 'U (309) © 'U (310) § § EI  H[S ¨¨ J ¨  © ©  ·· ¸ ¸ F U N (311)  T U N (312) ¹ ¸¹ The above equations can be rearranged as § §  ·· $N ˜ F UN  (313)  % ˜ F UN (314)  &N ˜ F UN  (315)  I  H[S ¨ J ¨  ¸ ¸¸ F UN (316) ¨ © © T UN (317) ¹ ¹ § §  ·· $N ˜ T UN  (318)  % ˜ T UN (319)  &N ˜ T UN  (320)  EI  H[S ¨ J ¨  ¸ ¸¸ F UN (321) ¨ © © T UN (322) ¹ ¹  (4.34)  (4.35) Here we define the coefficients $N , B and & N as $N      %   &N  'U (323) 'U (324)  UN 'U     'U (325) UN 'U Using a second-order forward approximation formula we formulate the discretized equations for the boundary conditions at U  by Eq (4.30) as follows F U (326)  F U (327)  F U  (328) 'U   T U  (329)  T U (330)  T U  (331) 'U Download free eBooks at bookboon.com 65  (332) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet Thus, we can calculate the concentration and temperature at U  as F U (333)    F U  (334)  F U (335) (4.36)   T U (336)    T U  (337)  T U (338) (4.37)   Introducing F U (339) by Eq (4.36) and T U  (340) by Eq (4.37) into Eqs (4.34) and (4.35) for N , we have: § §   ·· ª  º $ ˜ «  F U (341)  F U (342) »  % ˜ F U (343)  & ˜ F U (344)  I  H[S ¨¨ J ¨  ¸ ¸¸ F U (345)  ¬  ¼ © © T U (346) ¹ ¹  (4.38) § §   ·· ª  º $ ˜ «  T U (347)  T U (348) »  % ˜ T U (349)  & ˜ T U (350)  EI  H[S ¨¨ J ¨  ¸ ¸¸ F U (351) T U  (352) ¬  ¼  © ¹ © ¹  (4.39) Rearranging Eqs (4.38) and (4.39) results in  º ª « %   $ » ˜ F U (353)  ¬ ¼ § §  º  ·· ª  «&   $ » ˜ F U (354)  I H[S ¨¨ J ¨  T U (355) ¸ ¸¸ F U (356) ¬ ¼  ¹¹ © ©  º ª « %   $ » ˜ T U (357)  ¬ ¼ § §  º  ·· ª  T U EI J    & $ (358) H[S  ˜ ¨ ¨ ¸ ¸¸ F U (359)    « ¨ T U  »¼ (360) ¬  ¹ © © ¹ This e-book is made with  (4.40)  (4.41) SETASIGN SetaPDF PDF components for PHP developers www.setasign.com Download free eBooks at bookboon.com 66 Click on the ad to read more (361) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet We use a second-order backward approximation formula for discretizing the boundary condition at U  by Eq (4.31) as F U  (362)  F U (363)  F U  (364) 'U %LP ˜   F U  (365) (366) T U  (367)  T U (368)  T U  (369) 'U %LK ˜   T U  (370) (371) The above equations can be rearranged as § §  · §  ·  · ¨ %LP  ¸ ˜ F U  (372)  ¨ ¸ ˜ F U (373)  ¨ ¸ ˜ F U  (374)  %LP 'U ¹ © © 'U ¹ © 'U ¹  § §  · §  ·  · ¨ %LK  ¸ ˜ T U  (375)  ¨ ¸ ˜T U1 (376)  ¨ ¸ ˜ T U  (377)  %LK 'U ¹ © © 'U ¹ © 'U ¹  We can calculate the concentration and temperature at U  as F U  (378)  ˜ %LP ˜ 'U  F U (379)  F U  (380) (4.42)    ˜ %LP ˜ 'U T U  (381)  ˜ %LK ˜ 'U  T U (382)  T U  (383) (4.43)    ˜ %LK ˜ 'U Introducing F U  (384) by Eq (4.42) and T U  (385) by Eq (4.43) into Eqs (4.34) and (4.35) for N , we get: ª  ˜ %LP ˜ 'U  F U (386)  F U  (387) º $1 ˜ F U  (388)  % ˜ F U (389)  &1 ˜ « »     ˜ %LP ˜ 'U ¬ ¼ § §  ·· I H[S ¨¨ J ¨  ¸ ¸¸ F U (390)  © © T U1 (391) ¹ ¹ (4.44)  ª  ˜ %LP ˜ 'U  F U (392)  F U  (393) º $1 ˜ F U  (394)  % ˜ F U (395)  &1 ˜ « »     ˜ %LP ˜ 'U ¬ ¼ § §  ·· I H[S ¨¨ J ¨  ¸ ¸¸ F U (396)  © © T U1 (397) ¹ ¹  Download free eBooks at bookboon.com 67 (4.45) (398) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet Rearranging Eqs (4.44) and (4.45) results in ª § º ª § º · ·   «& ¨ ¸  $1 » ˜ F U  (399)  «&1 ¨ ¸  % » ˜ F U (400)  (4.46) ¬« ©    ˜ %LP ˜ 'U ¹ ¼» ¬« ©    ˜ %LP ˜ 'U ¹ ¼»  § § ª  ˜ %LP ˜ 'U º  ··  &1 « ¸ ¸¸ F U (401)  »  I H[S ¨¨ J ¨  ¬    ˜ %LP ˜ 'U ¼ © © T U1 (402) ¹ ¹ ª § º ª § º · ·   «& ¨ ¸  $1 » ˜ T U  (403)  «&1 ¨ ¸  % » ˜T U (404)  «¬ ©    ˜ %LK ˜ 'U ¹ »¼ ¬« ©    ˜ %LK ˜ 'U ¹ ¼» § § ª  ˜ %LK ˜ 'U º  ··  &1 « ¸ ¸¸ F U (405) »  EI H[S ¨¨ J ¨  ¬    ˜ %LK ˜ 'U ¼ © © T U1 (406) ¹ ¹ (4.47)  Therefore, we obtain the following system of  u nonlinear algebraic equations: I (407) § §  º  º  ·· ª ª  « %   $ » ˜ F U (408)  «&   $ » ˜ F U (409)  I H[S ¨¨ J ¨  T U (410) ¸ ¸¸ F U (411) ¬ ¼ ¬ ¼  ¹¹ © © § §  ·· $N ˜ F U N  (412)  % ˜ F U N (413)  &N ˜ F U N  (414)  I  H[S ¨ J ¨  ¸ ¸¸ F U N (415) ¨ © © T UN (416) ¹ ¹ N }   I N (417) I (418)  ª § º ª § º · ·   «& ¨ ¸  $1 » ˜ F U  (419)  «&1 ¨ ¸  % » ˜ F U (420)  «¬ ©    ˜ %LP ˜ 'U ¹ »¼ «¬ ©    ˜ %LP ˜ 'U ¹ »¼ § § ª  ˜ %LP ˜ 'U º  ··  &1 « ¸ ¸¸ F U (421) »  I H[S ¨¨ J ¨  ¬    ˜ %LP ˜ 'U ¼ © © T U1 (422) ¹ ¹ I  (423) I  N(424) I  (425)  (4.48)  § §  º  º  ·· ª ª  T U T U EI J  ˜   ˜   % $ & $ (426) (427) H[S  ¨ ¨ ¸ ¸¸ F U (428)      « « ¨  »¼  »¼ ¬ ¬ © © T U (429) ¹ ¹ § §  ·· $N ˜ T U N  (430)  % ˜ T U N (431)  &N ˜ T U N  (432)  EI  H[S ¨ J ¨  ¸ ¸¸ F U N (433) ¨ © © T UN (434) ¹ ¹ N }   ª § º ·  «& ¨ ¸  $1 » ˜ T U  (435)  ¬« ©    ˜ %LK ˜ 'U ¹ ¼» ª § º · ª  ˜ %LK ˜ 'U º  «& ¨ ¸  % » ˜ T U (436)  &1 « »  ¬    ˜ %LK ˜ 'U ¼ ¬« ©    ˜ %LK ˜ 'U ¹ ¼» § § EI  H[S ¨¨ J ¨   © © ·· ¸ ¸ F U (437)  T U (438) ¹ ¸¹  Download free eBooks at bookboon.com 68   (439) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet Then, we specify the Jacobian matrix, which is the matrix of derivatives of i equation, L }1 , with respect to F U N (440) and T U N (441) , N } as ª wI « wF U (442)  « « « wI L « « wF U (443) « wI  L   «« wF U (444) « « « wI 1 L 1 « w F ¬« U (445) L  - N  N N  M  M 1  M wI wF U (446) wI wT U (447) wI wF U (448) wI wT U (449) wI  wF U (450) wI  wT U (451) wI  wF U (452) wI  wT U (453) N M 1 wI º wT U (454) » » » » wI »  wT U (455) » » wI  » wT U (456) » » » wI  » » wT U (457) »¼ www.sylvania.com We not reinvent the wheel we reinvent light Fascinating lighting offers an infinite spectrum of possibilities: Innovative technologies and new markets provide both opportunities and challenges An environment in which your expertise is in high demand Enjoy the supportive working atmosphere within our global group and benefit from international career paths Implement sustainable ideas in close cooperation with other specialists and contribute to influencing our future Come and join us in reinventing light every day Light is OSRAM Download free eBooks at bookboon.com 69 Click on the ad to read more (458) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet The structure of the Jacobian matrix is shown in Fig 4.1, where , , ,  and  are the matrix diagonals Figure 4.1: The structure of Jacobian matrix The diagonal elements of the Jacobian matrix are summarized below: ◊◊ - G  - (459) § §  º  ·· ª  « %   $ »  I H[S ¨¨ J ¨  T U (460) ¸ ¸¸  ¬ ¼  ¹¹ © © - L L(461) § §  ·· %  IV H[S ¨ J ¨  ¸ ¸¸  L ¨ © © T UL (462) ¹ ¹  § § § ·   ··  &1 ¨ ¸  %  I H[S ¨¨ J ¨  ¸ ¸¸ ©    ˜ %LP ˜ 'U ¹ © © T U1 (463) ¹ ¹ -  (464) § § -    (465)  º ª « %   $ »  ¬ ¼ § § - L L(466)   %  EI  H[S ¨¨ J ¨  © ©  ·· ¸ ¸ ˜ F U (467) T U (468) ¹ ¸¹ T  U (469) ·· ¸ ¸¸ F UL  (470) © © T UL  (471) ¹ ¹  L T  UL  (472) EI  H[S ¨¨ J ¨         § § -    (473)  § ·  &1 ¨ ¸ %  ©    ˜ %LK ˜ 'U ¹ ·· ¸ ¸¸ F U (474) © © T U1 (475) ¹ ¹  T  U1 (476) EI  H[S ¨¨ J ¨  Download free eBooks at bookboon.com 70  (477) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet ◊◊ - G  - L L  (478) $L  L    -   (479) § ·  &1 ¨ ¸  $1 ©    ˜ %LP ˜ 'U ¹ -   (480)  - L L  (481) $L   L        § ·  &1 ¨ ¸  $1  ©    ˜ %LK ˜ 'U ¹ -     (482) ◊◊ - G  -  (483) &  - L L  (484) &L  L -   (485)      -    (486) - L L  (487)  $  &  &L   L  $     1  ◊◊ - G  -  L L (488) § § EI  H[S ¨¨ J ¨  © ©  ·· ¸ ¸  L  T UL (489) ¹ ¹¸ 1  ◊◊ - G  § § - L  L(490)  I  F UL (491) H[S ¨¨ J ¨  © © T  UL (492)  ·· ¸¸ T UL (493) ¹ ¸¹  L   Download free eBooks at bookboon.com 71 (494) Deloitte & Touche LLP and affiliated entities CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet 4.3 COMPUTER PROGRAM DESCRIPTION Notebook FirstOrder_Nonisothermal.ipynb ◊◊ Import packages We will use the Python library NumPy for vector manipulations and formation of diagonal matrices The sparse module from the library SciPy is called to generate a sparse matrix and convert it to various formats as well as to compute the norm of a vector The spsolve module from the SciPy library is utilized to solve the sparse linear system The exponential function is calculated using the exp function from the math module To plot the results of numerical simulations we will use the matplotlib library The IPython.html module is called to display widgets for interactive input of parameter values ʩƒ–’Ž‘–Ž‹„‹Ž‹‡ ‹’‘”–—’›ƒ•’ ˆ”‘• ‹’›‹’‘”–•’ƒ”•‡ ˆ”‘• ‹’›Ŝ•’ƒ”•‡ŜŽ‹ƒŽ‰‹’‘”–•’•‘Ž˜‡ ˆ”‘• ‹’›ŜŽ‹ƒŽ‰‹’‘”–‘” ˆ”‘ƒ–Š‹’‘”–‡š’ ˆ”‘ƒ–’Ž‘–Ž‹„Ŝ’›Žƒ„‹’‘”–Ƌ ˆ”‘(495) ›–Š‘Ŝ†‹•’Žƒ›‹’‘”– Ž‡ƒ”ɏ‘—–’—–ř†‹•’Žƒ›ř  ˆ”‘(496) ›–Š‘ŜŠ–ŽŜ™‹†‰‡–•‹’‘”–‹–‡”ƒ –ř Ž‘ƒ–Ž‹†‡”ř řƒ–‡š 360° thinking 360° thinking 360° thinking Discover the truth at www.deloitte.ca/careers © Deloitte & Touche LLP and affiliated entities Discover the truth at www.deloitte.ca/careers © Deloitte & Touche LLP and affiliated entities Discoverfree theeBooks truth atatbookboon.com www.deloitte.ca/careers Download Click on the ad to read more 72 Dis (497) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet ◊◊ Define the main function fmain: Input parameters: I – Thiele modulus E – energy generation function J – Arrhenius number %L B P – Biot number for mass transfer %L B K – Biot number for heat transfer ɤ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ  ɤ ɤƒ‹ˆ— –‹‘ ɤ †‡ˆˆƒ‹ſIřEřJř‹ɏř‹ɏŠřƋƋ™ƒ”‰•ƀś οο Specify the grid We specify the number of internal grid points N Thus, the grid is divided on   subintervals of the same length 'U Then, we generate the grid of internal points and saved it in the array U ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤŠ‡—„‡”‘ˆ‹–‡”ƒŽ‰”‹†’‘‹–• ʰɩɰɰ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ•‡–‰”‹†•’ƒ ‹‰ 'UʰɨŜŵſʫɨŜƀ ɤ•’‡ ‹ˆ›—‹ˆ‘”‰”‹†‘ˆ‹–‡”ƒŽ’‘‹–• Uʰ’ŜŽ‹•’ƒ ‡ſ'UřɨŜŞ'Uřƀ οο Specify common coefficients in the system of nonlinear equations ɤƒŽŽ‘ ƒ–‡ƒ””ƒ›•‘ˆ ‘‘ ‘‡ˆˆ‹ ‹‡–•ƒ† ʰ’Ŝœ‡”‘•ſƀ ʰ’Ŝœ‡”‘•ſƀ ɤ†‡ˆ‹‡ ‘•–ƒ– ‘‘ ‘‡ˆˆ‹ ‹‡– ʰŞɩŜŵſ'UƋƋɩƀ ɤ†‡ˆ‹‡ ‘‡ˆˆ‹ ‹‡–•ƒ†ƒ–‡ƒ Š‡•Š’‘‹– ʰɨŜŵſ'UƋƋɩƀŞɨŜŵſ'UƋUƀ ʰɨŜŵſ'UƋƋɩƀʫɨŜŵſ'UƋUƀ Download free eBooks at bookboon.com 73 (498) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet οο Set initial guesses for solution of nonlinear equations We will use uniform profiles, i.e F U (499) T U (500) , as initial guesses Here, the vector X  contains both the dimensionless concentration and temperature at the internal grid points ɤʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫ ɤ•’‡ ‹ˆ›‹‹–‹ƒŽ‰—‡••ˆ‘”•‘Ž—–‹‘‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘• ɤ™‡™‹ŽŽ—•‡—‹ˆ‘”’”‘ˆ‹Ž‡•ś ʰTʰɥŜɬ —ɥʰɥŜɬƋ’Ŝ‘‡•ſɩƋƀ οο Allocate arrays of dimensionless concentration and temperature at the grid points ɤʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫ ɤ•’‡ ‹ˆ›‹‹–‹ƒŽ‰—‡••ˆ‘”•‘Ž—–‹‘‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘• ɤ™‡™‹ŽŽ—•‡—‹ˆ‘”’”‘ˆ‹Ž‡•ś ʰTʰɥŜɬ —ɥʰɥŜɬƋ’Ŝ‘‡•ſɩƋƀ οο Use the Newton-Raphson method to solve the system of nonlinear equations ɤ ɤ•‘Ž˜‡–Š‡•›•–‡‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘•—•‹‰–Š‡‡™–‘Şƒ’Š•‘‡–Š‘† —řˆɏ˜ƒŽř‹–‡”ř‡š‹–ˆŽƒ‰ʰˆ•‘Ž˜‡ſ'UřIřEřJř‹ɏř‹ɏŠřřřř—ɥƀ ɤ ‹ˆ‘–‡š‹–ˆŽƒ‰ś ’”‹–ſɐ‘‘ƒ›‹–‡”ƒ–‹‘•ɐƀ οο Save results The resulting profiles at internal points are saved in arrays concentration and temperature The values of concentration and temperature are calculated at the pellet center and surface using the second-order forward and backward difference formulas to approximate the derivatives in the boundary conditions at U  and U  , respectively ɤ ɤ•ƒ˜‡”‡•—Ž–‹‰ ‘ ‡–”ƒ–‹‘ƒ†–‡’‡”ƒ–—”‡’”‘ˆ‹Ž‡• ɤ’”‘ˆ‹Ž‡•ƒ–‹–‡”ƒŽ‰”‹†’‘‹–•   ‘ ‡–”ƒ–‹‘ƃɨśʫɨƄʰ—ƃɥśƄ –‡’‡”ƒ–—”‡ƃɨśʫɨƄʰ—ƃśɩƋƄ ɤ ƒŽ —Žƒ–‡ ‘ ‡–”ƒ–‹‘ƒ†–‡’‡”ƒ–—”‡ƒ––Š‡’‡ŽŽ‡– ‡–‡”řUʰɥ  ‘ ‡–”ƒ–‹‘ƃɥƄʰɫŜƋ—ƃɥƄŵɪŜŞ—ƃɨƄŵɪŜ –‡’‡”ƒ–—”‡ƃɥƄʰɫŜƋ—ƃƄŵɪŜŞ—ƃʫɨƄŵɪŜ ɤ ƒŽ —Žƒ–‡ ‘ ‡–”ƒ–‹‘ƒ†–‡’‡”ƒ–—”‡ƒ––Š‡’‡ŽŽ‡–•—”ˆƒ ‡řUʰɨ  ‘ ‡–”ƒ–‹‘ƃʫɨƄʰſɩŜƋ‹ɏƋ'UʫɫŜƋ—ƃŞɨƄŞ—ƃŞɩƄƀŵſɪŜʫɩŜƋ‹ɏƋ'Uƀ –‡’‡”ƒ–—”‡ƃʫɨƄʰſɩŜƋ‹ɏŠƋ'UʫɫŜƋ—ƃɩƋŞɨƄŞ—ƃɩƋŞɩƄƀŵſɪŜʫɩŜƋ‹ɏŠƋ'Uƀ Download free eBooks at bookboon.com 74 (501) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet οο Finally, we plot the concentrations and temperature profiles and output the values of conversion, selectivity and yield ɤ ɤ’Ž‘–‰”ƒ’Š• ”ƒ†ʰ’ŜŽ‹•’ƒ ‡ſɥŜɥřɨŜɥřʫɩƀ ƒ–’Ž‘–Ž‹„Ŝ” ƒ”ƒ•Ŝ—’†ƒ–‡ſƇɐˆ‘–Ŝ•‹œ‡ɐśɨɩƈƀ –‹–Ž‡ɨʰɐ ‹”•–Ş‘”†‡””‡ƒ –‹‘‹‘Ş‹•‘–Š‡”ƒŽ•’Š‡”‹ ƒŽ ƒ–ƒŽ›•–śɎɐ –‹–Ž‡ɨʫʰɐɛIɛʰʩ•řɛEɛʰʩ•řɛJɛʰʩ•ř‹ɏʰʩ•ř‹ɏŠʰʩ•Ɏɐ ˆ‹‰ʰ’Ž–Ŝˆ‹‰—”‡ſƀ ƒš‡•ʰˆ‹‰Ŝƒ††ɏ•—„’Ž‘–ſɨɨɨƀ ƒš‡•Ŝ’Ž‘–ſ”ƒ†ř ‘ ‡–”ƒ–‹‘ř ‘Ž‘”ʰɑ‰”‡‡ɑřŽ‹‡•–›Ž‡ʰɑ•‘Ž‹†ɑřŽ‹‡™‹†–Šʰɩƀ ƒš‡•Ŝ•‡–ɏ–‹–Ž‡ſ–‹–Ž‡ɨʩſIřEřJř‹ɏř‹ɏŠƀƀ ƒš‡•Ŝ•‡–ɏšŽƒ„‡Žſɐ‹‡•‹‘Ž‡••”ƒ†‹—•řɛUɛƃŞƄɐƀ ƒš‡•Ŝ•‡–ɏ›Žƒ„‡Žſɐ‹‡•‹‘Ž‡•• ‘ ‡–”ƒ–‹‘ř ƃŞƄɐƀ ƒš‡•Ŝ‰”‹†ſƀ ƒš‡•Ŝ•‡–ɏšŽ‹ſƃɥŜřɨŜƄƀ ƒš‡•Ŝ•‡–ɏ›Ž‹ſƃɥŜřɨŜƄƀ ’Ž–Ŝ•Š‘™ſƀ ˆ‹‰ɩʰ’Ž–Ŝˆ‹‰—”‡ſƀ ƒš‡•ʰˆ‹‰ɩŜƒ††ɏ•—„’Ž‘–ſɨɨɨƀ ƒš‡•Ŝ’Ž‘–ſ”ƒ†ř–‡’‡”ƒ–—”‡ř ‘Ž‘”ʰɑ”‡†ɑřŽ‹‡•–›Ž‡ʰɑ•‘Ž‹†ɑřŽ‹‡™‹†–Šʰɩƀ ƒš‡•Ŝ•‡–ɏšŽƒ„‡Žſɐ‹‡•‹‘Ž‡••”ƒ†‹—•řɛUɛƃŞƄɐƀ ƒš‡•Ŝ•‡–ɏ›Žƒ„‡Žſɐ‹‡•‹‘Ž‡••–‡’‡”ƒ–—”‡řɛTɛƃŞƄɐƀ ƒš‡•Ŝ‰”‹†ſƀ ƒš‡•Ŝ•‡–ɏšŽ‹ſƃɥŜřɨŜƄƀ ƒš‡•Ŝ•‡–ɏ›Ž‹ſƃɥŜřɪŜƄƀ ’Ž–Ŝ•Š‘™ſƀ ”‡–—”ƃ”ƒ†ř ‘ ‡–”ƒ–‹‘ř–‡’‡”ƒ–—”‡Ƅ We will turn your CV into an opportunity of a lifetime Do you like cars? Would you like to be a part of a successful brand? We will appreciate and reward both your enthusiasm and talent Send us your CV You will be surprised where it can take you Download free eBooks at bookboon.com 75 Send us your CV on www.employerforlife.com Click on the ad to read more (502) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet ◊◊ Solve the system of nonlinear equations by the Newton-Raphson method ɤ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ  ɤ ɤ‘Ž˜‡–Š‡•›•–‡‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘•—•‹‰‡™–‘Şƒ’Š•‘  ɤ‡–Š‘†™‹–Š†‹ƒ‰‘ƒŽ ƒ ‘„‹ƒŜ ɤ †‡ˆˆ•‘Ž˜‡ſ'UřIřEřJř‹ɏř‹ɏŠřřřřšɥƀś ɤ –‘Žʰɨ‡Şɭ –‘Ž ʰɨ‡Şɭ ƒš(503) –‡”ʰɬɥɥ šʰšɥ ˆ‘”‹‹”ƒ‰‡ſƒš(504) –‡”ƀś ‰šʰˆˆſšř'UřIřEřJř‹ɏř‹ɏŠřřřƀ  ʰŒƒ ſšř'UřIřEřJř‹ɏř‹ɏŠřřřƀ š‡™ʰšŞ•’•‘Ž˜‡ſ ř‰šƀ ‹ˆſ‘”ſš‡™Şšƀʳ–‘Žƀś ”‡–—”ƃšř‰šř‹řɐ”—‡ɐƄ ‹ˆſ‘”ſ‰šƀʳ–‘Ž ƀś ”‡–—”ƃš‡™ř‰šř‹řɐ”—‡ɐƄ šʰš‡™ ”‡–—”ƃšř‰šř‹řɐ ƒŽ•‡ɐƄ ◊◊ Define the system of nonlinear equations οο The function ff: ɤ ɤ‡ˆ‹‡–Š‡•›•–‡‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘• ɤ †‡ˆˆˆſ—ř'UřIřEřJř‹ɏř‹ɏŠřřřƀś οο At first, we allocate arrays and separate u vector into cc and T vectors ɤ ɤƒŽŽ‘ ƒ–‡ƒ””ƒ›• ʰ‹–ſŽ‡ſ—ƀŵɩƀ  ʰ’Ŝœ‡”‘•ſƀ Tʰ’Ŝœ‡”‘•ſƀ ˆʰ’Ŝœ‡”‘•ſɩƋƀ ɤ ‘˜‡”–—ƒ””ƒ›–‘ ƒ†Tƒ””ƒ›•  ʰ—ƃɥśƄ Tʰ—ƃśɩƋƄ Download free eBooks at bookboon.com 76 (505) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet οο Then, we specify the reaction terms in the mass and heat balance equations ɤ ɤƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋ ɤ”‡ƒ –‹‘–‡”‹ƒ••„ƒŽƒ ‡‡“—ƒ–‹‘ ˆƃɥśƄŞʰſIƋƋɩƀƋ‡š’ſJƋſɨŜŞɨŜŵTƃɥśƄƀƀƋ ƃɥśƄ ɤ”‡ƒ –‹‘–‡”‹Š‡ƒ–„ƒŽƒ ‡‡“—ƒ–‹‘ ˆƃśɩƋƄʫʰEƋſIƋƋɩƀƋ‡š’ſJƋſɨŜŞɨŜŵTƃɥśƄƀƀƋ ƃɥśƄ ɤƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋ οο Next, we specify the discrete balance equations at the internal points ɤ ˆƃɥśƄʫʰƋ ƃɥśƄ ˆƃśɩƋƄʫʰƋTƃɥśƄ ɤ’‡ŽŽ‡–‹–‡”ƒŽ’‘‹–• ˆ‘”‹”ƒ‰‡ſɨřſŞɨƀƀś ˆƃƄʫʰƃƄƋ ƃŞɨƄʫƃƄƋ ƃʫɨƄ ˆƃʫƄʫʰƃƄƋTƃŞɨƄʫƃƄƋTƃʫɨƄ οο Finally, we define the balance equations at the center and surface of the pellet ɤ’‡ŽŽ‡– ‡–‡” ˆƃɥƄʫʰſɫŜƋƃɥƄŵɪŜƀƋ ƃɥƄʫſƃɥƄŞƃɥƄŵɪŜƀƋ ƃɨƄ ˆƃƄʫʰſɫŜƋƃɥƄŵɪŜƀƋTƃɥƄʫſƃɥƄŞƃɥƄŵɪŜƀƋTƃɨƄ ɤ’‡ŽŽ‡–•—”ˆƒ ‡ ˆƃŞɨƄʫʰſƃŞɨƄƋſŞɨŜŵſɪŜʫɩŜƋ‹ɏƋ'UƀƀʫƃŞɨƄƀƋ ƃŞɩƄʫɎ ſƃŞɨƄƋſɫŜŵſɪŜʫɩŜƋ‹ɏƋ'UƀƀƀƋ ƃŞɨƄʫɎ ƃŞɨƄƋſɩŜƋ'UƋ‹ɏŵſɪŜʫɩŜƋ‹ɏƋ'Uƀƀ ɤ ˆƃɩƋŞɨƄʫʰſƃŞɨƄƋſŞɨŜŵſɪŜʫɩŜƋ‹ɏŠƋ'UƀƀʫƃŞɨƄƀƋTƃŞɩƄʫɎ ſƃŞɨƄƋſɫŜŵſɪŜʫɩŜƋ‹ɏŠƋ'UƀƀƀƋTƃŞɨƄʫɎ ƃŞɨƄƋſɩŜƋ'UƋ‹ɏŠŵſɪŜʫɩŜƋ‹ɏŠƋ'Uƀƀ ɤ ”‡–—”ˆ ◊◊ Define the Jacobian matrix οο The function MDF : ɤ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ‡ˆ‹‡ ƒ ‘„‹ƒƒ–”‹š ɤ †‡ˆŒƒ ſ—ř'UřIřEřJ‹ɏř‹ɏŠřřřƀś Download free eBooks at bookboon.com 77 (506) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet οο We allocate arrays and separate u vector into cc and T vectors ɤ ɤƒŽŽ‘ ƒ–‡ƒ””ƒ›• ʰ‹–ſŽ‡ſ—ƀŵɩƀ  ʰ’Ŝœ‡”‘•ſƀ Tʰ’Ŝœ‡”‘•ſƀ ɤ ‘˜‡”–—ƒ””ƒ›–‘ ƒ†Tƒ””ƒ›•  ʰ—ƃɥśƄ Tʰ—ƃśɩƋƄ I joined MITAS because I wanted real responsibili� I joined MITAS because I wanted real responsibili� Real work International Internationa al opportunities �ree wo work or placements Maersk.com/Mitas www.discovermitas.com �e G for Engine Ma Month 16 I was a construction Mo supervisor ina const I was the North Sea super advising and the No he helping foremen advis ssolve problems Real work he helping fo International Internationa al opportunities �ree wo work or placements ssolve pr Download free eBooks at bookboon.com 78 �e Graduate Programme for Engineers and Geoscientists Click on the ad to read more (507) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet οο At first, we form the main diagonal d1 ɤ ɤƒ‹‹ƒ‰‘ƒŽ†ɨ ɤ †ɨʰ’Ŝœ‡”‘•ſɩƋƀ ɤƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋ ɤ†‡”‹˜ƒ–‹˜‡‘ˆ”‡ƒ –‹‘”ƒ–‡™‹–Š”‡•’‡ ––‘ ‘ ‡–”ƒ–‹‘ †ɨƃɥśƄʫʰŞſIƋƋɩƀƋ‡š’ſJƋſɨŜŞɨŜŵTƃɥśƄƀƀ ɤ†‡”‹˜ƒ–‹˜‡‘ˆ”‡ƒ –‹‘”ƒ–‡™‹–Š”‡•’‡ ––‘–‡’‡”ƒ–—”‡ †ɨƃśɩƋƄʫʰEƋſIƋƋɩƀƋ‡š’ſJƋſɨŜŞɨŜŵTƃɥśƄƀƀƋ ƃɥśƄŵſTƃɥśƄƋƋɩƀ ɤƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋ ɤ †ɨʫʰ ɤ„‘—†ƒ”› ‘†‹–‹‘ƒ–’‡ŽŽ‡– ‡–‡” †ɨƃɥƄʫʰɫŜƋƃɥƄŵɪŜ †ɨƃƄʫʰɫŜƋƃɥƄŵɪŜ ɤ„‘—†ƒ”› ‘†‹–‹‘ƒ–’‡ŽŽ‡–•—”ˆƒ ‡ †ɨƃŞɨƄʫʰƃŞɨƄƋſɫŜŵſɪŜʫɩŜƋ‹ɏƋ'Uƀƀ †ɨƃɩƋŞɨƄʫʰƃŞɨƄƋſɫŜŵſɪŜʫɩŜƋ‹ɏŠƋ'Uƀƀ ɤ’‘•‹–‹‘‘ˆ‘Şœ‡”‘‡Ž‡‡–•  †ɨʰƒ”ƒ‰‡ſɥřɩƋƀ (508) †ɨʰƒ”ƒ‰‡ſɥřɩƋƀ οο Then, we specify other diagonals: diagonal d2 ɤ ɤ‹ƒ‰‘ƒŽ†ɩ ɤ †ɩʰ’Ŝœ‡”‘•ſɩƋŞɨƀ †ɩƃɥśŞɩƄʰƃɨśŞɨƄ †ɩƃŞɩƄʰƃŞɨƄƋſŞɨŜŵſɪŜʫɩŜƋ‹ɏƋ'UƀƀʫƃŞɨƄ †ɩƃŞɨƄʰɥŜ †ɩƃśɩƋŞɩƄʰƃɨśŞɨƄ †ɩƃɩƋŞɩƄʰƃŞɨƄƋſŞɨŜŵſɪŜʫɩŜƋ‹ɏŠƋ'UƀƀʫƃŞɨƄ (509) †ɩʰƒ”ƒ‰‡ſɨřɩƋƀ  †ɩʰƒ”ƒ‰‡ſɥřɩƋŞɨƀ οο diagonal d3 ɤ ɤ‹ƒ‰‘ƒŽ†ɪ ɤ †ɪʰ’Ŝœ‡”‘•ſɩƋŞɨƀ †ɪƃɥƄʰƃɥƄŞƃɥƄŵɪŜ †ɪƃɨśŞɨƄʰƃɨśŞɨƄ †ɪƃŞɨƄʰɥŜ †ɪƃƄʰƃɥƄŞƃɥƄŵɪŜ †ɪƃʫɨśɩƋŞɨƄʰƃɨśŞɨƄ  †ɪʰƒ”ƒ‰‡ſɨřɩƋƀ (510) †ɪʰƒ”ƒ‰‡ſɥřɩƋŞɨƀ Download free eBooks at bookboon.com 79 (511) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet οο diagonal d4 ɤ ɤ‹ƒ‰‘ƒŽ†ɫ ɤ †ɫʰ’Ŝœ‡”‘•ſƀ †ɫʫʰEƋſIƋƋɩƀƋ‡š’ſJƋſɨŜŞɨŜŵTƀƀ (512) †ɫʰƒ”ƒ‰‡ſřɩƋƀ  †ɫʰƒ”ƒ‰‡ſɥřƀ οο diagonal d5 ɤ ɤ‹ƒ‰‘ƒŽ†ɬ ɤ †ɬʰ’Ŝœ‡”‘•ſƀ †ɬʫʰŞſIƋƋɩƀƋ‡š’ſJƋſɨŜŞɨŜŵTƀƀƋ ŵſTƋƋɩƀ  †ɬʰƒ”ƒ‰‡ſřɩƋƀ (513) †ɬʰƒ”ƒ‰‡ſɥřƀ οο Finally, we combine diagonals in one array and form the sparse Jacobian matrix ɤ ɤ‘„‹‡†‹ƒ‰‘ƒŽ•‹‘‡ƒ””ƒ› ɤ †ʰ ‘ ƒ–‡ƒ–‡ſſ†ɨř†ɩř†ɪř†ɫř†ɬƀřƒš‹•ʰɥƀ (514) ”ʰ ‘ ƒ–‡ƒ–‡ſſ(515) †ɨř(516) †ɩř(517) †ɪř(518) †ɫř(519) †ɬƀřƒš‹•ʰɥƀ  ʰ ‘ ƒ–‡ƒ–‡ſſ †ɨř †ɩř †ɪř †ɫř †ɬƀřƒš‹•ʰɥƀ ɤ ɤ ‘”•’ƒ”•‡ ƒ ‘„‹ƒƒ–”‹š ɤ  ƒ ʰ•’ƒ”•‡Ŝ ‘‘ɏƒ–”‹šſſ†řſ(520) ”ř ƀƀř•Šƒ’‡ʰſɩƋřɩƋƀƀ  ƒ ʰ ƒ Ŝ–‘ •”ſƀ ɤ ”‡–—” ƒ  Download free eBooks at bookboon.com 80 (521) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet ◊◊ Define widgets ɤ’‡ ‹ˆ›™‹†‰‡–• Šɨʰ ſ˜ƒŽ—‡ʰɑʳŠɫʴʳ„ʴƒ••”ƒ•ˆ‡”ƒ† ‹”•–Ş”†‡”‡ƒ –‹‘‹‘Ş (522) •‘–Š‡”ƒŽ’Š‡”‹ ƒŽ‡ŽŽ‡–ʳŵ„ʴɑř ‘Ž‘”ʰɑ„”‘™ɑƀ Šɩʰ ſ˜ƒŽ—‡ʰɑʳ„”ʴɑƀ Šɪʰƒ–‡šſ˜ƒŽ—‡ʰɑɛɛɎ„‘šƇ’‡ ‹ˆ›’ƒ”ƒ‡–‡”•śƈɛɛɑřƀ †‹•’Žƒ›ſŠɨƀ †‹•’Žƒ›ſŠɩƀ †‹•’Žƒ›ſŠɪƀ ’Š‹ɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɬřƒšʰɪŜɬř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɩř†‡• ”‹’–‹‘ʰɑŠ‹‡Ž‡‘†—Ž—•ř ɛɎ’Š‹ɛŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜɑƀ „‡–ƒɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɨřƒšʰɨŜř•–‡’ʰɥŜɨř˜ƒŽ—‡ʰɥŜɬř †‡• ”‹’–‹‘ʰ”ɑ‡”‰›‰‡‡”ƒ –‹‘ˆ— –‹‘řɛɎ„‡–ƒɛŜŜŜŜɑƀ ‰ƒƒɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɨř ƒšʰɩŜř•–‡’ʰɥŜɨř˜ƒŽ—‡ʰɨŜř†‡• ”‹’–‹‘ʰɑ””Š‡‹—•—„ ‡”řɛɎ‰ƒƒɛŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜɑƀ ‹ɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɨɥřƒšʰɬɥɥř•–‡’ʰɨɥř˜ƒŽ—‡ʰɨɥɥř†‡• ”‹’–‹‘ʰɑ‹‘–ƒ••—„‡” řɛ‹ɏɛŜŜŜŜŜŜŜŜŜŜŜŜŜŜɑƀ ‹Šɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɩɥřƒšʰɬɥɥř•–‡’ʰɨɥř˜ƒŽ—‡ʰɨɥɥř†‡• ”‹’–‹‘ʰɑ‹‘–Š‡ƒ–—„‡”ř ɛ‹ɏŠɛŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜɑƀ ™ʰ‹–‡”ƒ –ſˆƒ‹řIʰ’Š‹ɏ•Ž‹†‡”řEʰ„‡–ƒɏ•Ž‹†‡”ř Jʰ‰ƒƒɏ•Ž‹†‡”ř‹ɏʰ‹ɏ•Ž‹†‡”ř‹ɏŠʰ‹Šɏ•Ž‹†‡”ƀ Download free eBooks at bookboon.com 81 Click on the ad to read more (523) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet The screenshot of widgets to specify simulation parameters is shown in Fig 4.2 Figure 4.2: The widget to specify the values of parameters for the first-order reaction in non-isothermal pellet Download free eBooks at bookboon.com 82 (524) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet 4.4 NUMERICAL RESULTS The basic parameter values used for simulation are summarized in Table 4.1 Parameter Symbol Value Thiele modulus I 2.0 Energy generation function E 0.5 Arrhenius number J 1.0 Biot number for mass transfer %LP 100 Biot number for heat transfer %LK 100 Table Basic parameter values used for simulation The reactant concentration and temperature profiles in the radial direction of agglomerate are shown in Fig 4.3 for various values of Thiele modulus These profiles were simulated using the FirstOrder_Nonisothermal_thiele.ipynb notebook The reactant concentration and temperature are uniformly distributed in the pellet at low value of Thiele modulus due to the high diffusion rate of reactant as compared to the reaction rate At high Thiele modulus, the reactant is consumed in a short distance from the outer pellet surface and its concentration drops to almost zero at the pellet surface The pellet temperature increases with Thiele modulus and the temperature at the pellet center is 50% more than the bulk temperature at I   D(525)   E(526)  Figure 4.3: The effect of Thiele modulus on (a) concentration and (b) temperature profiles for the first-order reaction in non-isothermal pellet Download free eBooks at bookboon.com 83 (527) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet The effect of energy generation function on the temperature radial profile in the pellet is shown in Fig 4.4 The FirstOrder_Nonisothermal_beta.ipynb notebook was used for simulation and plotting this figure At high value of E , the temperature at the pellet center becomes significantly higher than that at the surface due to the low rate of heat transfer by conduction in the pellet Figure 4.4: The effect of energy generation function on temperature profile for the first-order reaction in non-isothermal pellet no.1 Sw ed en nine years in a row STUDY AT A TOP RANKED INTERNATIONAL BUSINESS SCHOOL Reach your full potential at the Stockholm School of Economics, in one of the most innovative cities in the world The School is ranked by the Financial Times as the number one business school in the Nordic and Baltic countries Stockholm Visit us at www.hhs.se Download free eBooks at bookboon.com 84 Click on the ad to read more (528) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet Figure 4.5 shows the concentration profiles in the pellet calculated for various values of Arrhenius number using the FirstOrder_Nonisotherma_gamma.ipynb notebook At high value of J , even a small increase in temperature in the pellet as compared to the bulk temperature results in significant gain in the reaction rate because the rate constant increases exponentially with J by Eq (4.6).Thus, the concentration profile at J  is considerably steeper than that at J  Figure 4.5: The effect of Arrhenius number on reactant concentration profile for the first-order reaction in non-isothermal pellet The effect of Biot number for mass transfer on reactant distribution in the pellet is illustrated in Fig 4.6 These profiles were calculated using the FirstOrder_Nonisothermal_Bim.ipynb notebook The reactant is uniformly distributed in the pellet at the small value of %LP because of the high diffusion rate in the pellet However, the reactant concentration near the pellet surface is significantly lower than that in the bulk due to the low rate of external mass transfer from the bulk to the pellet surface Download free eBooks at bookboon.com 85 (529) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Chemical Reaction in Non-Isothermal Catalyst Pellet Figure 4.6: The effect of Biot number for mass transfer on concentration profile for the first-order reaction in non-isothermal pellet Figure 4.7 shows the temperature profiles in the pellet calculated for various values of Biot number for heat transfer using the FirstOrder_Nonisothermal_Bih.ipynb notebook The pellet temperature at %LK  is considerably higher than those at higher values of %LK because of the limiting heat transfer from the pellet to the bulk phase through the boundary layer around the pellet Figure 4.7: The effect of Biot number for heat transfer on temperature profile for the first-order reaction in non-isothermal pellet Download free eBooks at bookboon.com 86 (530) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet ENZYME CATALYZED REACTION IN ISOTHERMAL PELLET In this chapter, you will learn to: Derive the mass balance equation for enzyme catalyzed reaction in the isothermal spherical pellet Solve numerically the model equation using the finite difference method Simulate the substrate concentration profiles in the pellet for various values of process parameters using the developed IPython notebook Download free eBooks at bookboon.com 87 Click on the ad to read more (531) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet 5.1 DERIVATION OF MASS BALANCE EQUATION We will consider an enzyme catalyzed reaction in a spherical pellet The reaction proceeds through a fast reversible formation of an enzyme-substrate complex ES from an enzyme E and a substrate S, and a slow dissociation of the complex yielding a product P (Shuler & Kargi 2002): N N  o (6  (  m o(3 N The reaction rate is U G3 GW N > (6 @ (5.1) The rate of variation of complex concentration is G > (6 @ GW N> ( @> @  N > (6 @  N  > (6 @ (5.2) Using a quasi-steady-state assumption, we can assume that N> ( @> @ G > (6 @ GW  Thus, N> (6 @  N > (6 @ (5.3) We can formulate the conservation balance on the enzyme as >(@ > ( @  > (6 @ (5.4) where (  is the initial enzyme concentration Substituting Eq (5.4) into Eq (5.3), we get: N > ( @  > (6 @(532) > @ N  N (533) > (6 @ RU N  N  N> @(534) > (6 @ N> ( @> @ Therefore, we can express the concentration of enzyme-substrate complex as N> ( @> @ N  N  N> @ > (6 @ > ( @> @  N  N (5.5)  >6 @ N Substituting Eq (5.5) into Eq (5.1), we have: U G3 GW N > ( @> @ N  N  >6 @ N where 9PD[ is the maximum rate, 9PD[ 9PD[ > @  NP  > @ (5.6) N > ( @, and N P is the Michaelis constant, NP Download free eBooks at bookboon.com 88 N  N (535)  N (536) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet We can derive a steady-state mass balance for enzymes immobilized in a porous spherical pellet similarly to Eq (2.5) as G §  G6 ·  9PD[ ¨ U 'HII  ¸  U ˜ GU © GU ¹ NP   (5.7) Assuming a constant diffusivity 'HII 6 , Eq (5.7) can be rewritten as  G6  G 6  ˜  ˜ PD[  GU U GU 'HII  N P   (5.8) The boundary conditions are • at the particle center, r = 0: G6 GU  (5.9) • at the outer particle surface, r = R: 6 (5.10) Multiplying Eq (5.8) by 5  6 yields 5 G    G6 5 ˜   ˜ ˜  ˜ PD[ 6 GU U 6 GU  'HII  N P   (5.11) The reaction term in Eq (5.11) can be transformed as   NP ˜ PD[ 6 'HII   NP NP  5 9PD[  NP ˜ 'HII  6 6  ˜ NP 6 Here, we introduce the dimensionless variables, concentration V and radius U U , and 6 the dimensionless parameters, Thiele modulus I 9PD[  NP  and saturation parameter E  NP 'HII  Then, we can write the reaction term as I ˜ V  E V Finally, we obtain the dimensionless mass balance for enzyme-catalyzed reaction in the spherical particle as  GV G V V  ˜  I ˜  U GU  E V GU  (5.12) Download free eBooks at bookboon.com 89 (537) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet The boundary conditions are • at the particle center, U  : GV GU  (5.13) • at the outer particle surface, U  : V  (5.14) The observed rate at steady state is equal to the flux through the outer particle surface UREVHUYHG ³  9PD[ U (538) ˜ S U  (539) GU NP  U (540) S  'HII  G6 GU U (5.15) Using the dimensionless variables, we rewrite Eq (5.15) as  9PD[ ˜ 6 ˜ V U (541)   ˜ ˜ U GU  6 ˜ V U (542)  P ³N ˜ 'HII  ˜ 6 ˜ GV GU U  Download free eBooks at bookboon.com 90 Click on the ad to read more (543) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet Substituting the dimensionless parameters into above equation, we derive the derivative of s with respect to U as GV GU  U  V I ³ ˜ U  G U (5.16)  E ˜ V  The intrinsic reaction rate is   ª 9PD[ 6 º S5 ˜« » (5.17)  ¬ NP  6 ¼ ULQWULQVLF The effectiveness factor is defined as the ratio of observed rate to the intrinsic reaction rate: K G6 GU U   9PD[ 6 S5 NP  6  S  'HII  Using the dimensionless variables and parameters, we can specify the effectiveness factor as K    E (544) GV ˜ I GU U  Substituting the derivative by Eq (5.16) into the above equation, we get: K    E (545) ³   V U  G U (5.18)  E V 5.2 NUMERICAL IMPLEMENTATION We use the finite-difference method to solve the second-order nonlinear differential equation We introduce the uniformly-spaced grid U   U  }  U  U   with internal points located at U N N ˜ 'U (546)  N }  'U   . The central difference approximations are used to the first and second order derivatives at U N as GV GU UN V UN  (547)  V UN  (548)  'U G V GU UN V UN  (549)  V UN (550)  V UN  (551) 'U (552)  Substitution of these approximations into the differential equation Eq (5.12) results in V UN  (553)  V UN (554)  V UN  (555) V U N (556)  V UN  (557)  V UN  (558)  ˜  I ˜  'U (559) UN 'U   E V U N (560) Download free eBooks at bookboon.com 91  (5.19) (561) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet Rearrangement of Eq (5.19) yields §  §  §  ·  ·  ·  ˜ V UN (562)  ¨  ¸ ˜ V U N  (563)  ¨ ¸ ˜ V U N  (564)  ¨    ¸  U N 'U ¹ U N 'U ¹ © 'U (565) ¹ © 'U (566) © 'U (567) V UN (568)  I ˜   E V UN (569) Simplifying above equations, we get: $N ˜ V UN  (570)  % ˜ V UN (571)  &N ˜ V UN  (572)  I  ˜ V UN (573)   E V UN (574)  (5.20) where $N      %   &N  'U (575) UN 'U 'U (576)       'U (577) UN 'U The discretized equation for the boundary condition at U  by Eq (5.13) is V U (578)   V U (579)  V U  (580) 'U  (5.21) Thus, the concentration at U  is given as V U (581)    V U  (582)  V U (583) (5.22)   Introducing V U (584) by Eq (5.22) into Eq (5.20) for N , we obtain: V U (585)  ª  º $ ˜ «  V U  (586)  V U (587) »  % ˜ V U (588)  & ˜ V U  (589)  I  ˜    E V U (590) ¬  ¼  (5.23) Rearrangement of Eq (5.23) results in V U (591)  º  º ª ª  «  %  $   & » ˜ V U (592)  «&   $ » ˜ V U  (593)  I ˜   E V U (594) ¬ ¼ ¬ ¼   (5.24) The boundary condition at U  by Eq (5.14) is V U  (595) (5.25) Introducing V U  (596) into Eq (5.20) for N $1 ˜ V U  (597)  % ˜ V U (598)  &1  I  ˜ yields V U (599)   E V U (600)  (5.26) Download free eBooks at bookboon.com 92 (601) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet Rearrangement of Eq (5.26) results in V U  (602) ˜ $1  V U (603) ˜ %  &1  I  ˜ V U (604)   E V U (605)  (5.27) Therefore, we obtain the following system of nonlinear algebraic equations: ­ ° I (606) ° °° ® I N (607) ° ° ° I (608) °¯ V U (609)  º  º ª ª  «  %  $   & » ˜ V U (610)  «&   $ » ˜ V U  (611)  I ˜   E V U (612) ¬ ¼ ¬ ¼  V UN (613) $N ˜ V U N  (614)  % ˜ V U N (615)  &N ˜ V U N  (616)  I  ˜  N   E V UN (617) $1 ˜ V U  (618)  % ˜ V U (619)  &  I  ˜ V U (620)   E V U (621)  }  (5.28)  Excellent Economics and Business programmes at: “The perfect start of a successful, international career.” CLICK HERE to discover why both socially and academically the University of Groningen is one of the best places for a student to be www.rug.nl/feb/education Download free eBooks at bookboon.com 93 Click on the ad to read more (622) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet The structure of the Jacobian matrix is shown in Fig 5.1, where ,  and  are the matrix diagonals j =1 N   i =1 0 0 0    0 0 0 0    0 0 0 0    0 0    0 0 0 0 0    0 0 0 0 0 0 0 0 0 J = N    0 0    0 0    0   Figure 5.1: The structure of tridiagonal Jacobian matrix The diagonal elements of the Jacobian matrix are summarized below: • main diagonal elements - G  - (623)  º  ª    «  %  $   & »  I ˜ ¬ ¼   E V U (624) (625) - L L (626) %  I ˜    E V UL (627) (628) %  I ˜ -  (629)  L       E V U (630) (631)  • lower diagonal elements - G  - L L  (632) $L  L -   (633)    $1  • upper diagonal elements - G  -  (634) - L L  (635) &   $   &L  L     Download free eBooks at bookboon.com 94 (636) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet 5.3 COMPUTER PROGRAM DESCRIPTION AND NUMERICAL RESULTS Notebook Enzyme_Concentration.ipynb ◊◊ Import packages We will use the Python library NumPy for vector manipulations and formation of diagonal matrices The sparse module from the library SciPy is called to generate a sparse matrix and convert it to various formats as well as to compute the vector norm The spsolve module from the SciPy library is utilized to solve the sparse linear system and the trapz module to integrate function using the composite trapezoidal rule To plot the results of numerical simulations, we will use the matplotlib library The IPython.html module is called to display the widgets for interactive input of parameter values ʩƒ–’Ž‘–Ž‹„‹Ž‹‡ ‹’‘”–—’›ƒ•’ ˆ”‘• ‹’›Ŝ•’ƒ”•‡ŜŽ‹ƒŽ‰‹’‘”–•’•‘Ž˜‡ ˆ”‘• ‹’›ŜŽ‹ƒŽ‰‹’‘”–‘” ˆ”‘• ‹’›‹’‘”–•’ƒ”•‡ ˆ”‘• ‹’›Ŝ‹–‡‰”ƒ–‡‹’‘”––”ƒ’œ ˆ”‘ƒ–’Ž‘–Ž‹„Ŝ’›Žƒ„‹’‘”–Ƌ ˆ”‘(637) ›–Š‘Ŝ†‹•’Žƒ›‹’‘”– Ž‡ƒ”ɏ‘—–’—–ř†‹•’Žƒ›ř  ˆ”‘(638) ›–Š‘ŜŠ–ŽŜ™‹†‰‡–•‹’‘”–‹–‡”ƒ –ř Ž‘ƒ–Ž‹†‡”ř řƒ–‡š ◊◊ Define the main function fmain: οο Input parameters: I – Thiele modulus E – saturation parameter ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ  ɤ ɤƒ‹ˆ— –‹‘ ɤ †‡ˆˆƒ‹ſIřEřƋƋ™ƒ”‰•ƀś Download free eBooks at bookboon.com 95 (639) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet οο Specify the grid The number of internal grid points is Thus, the total number of equally spaced points including the boundary ones is 1 The grid is divided on   subintervals of the same length 'U We generate the grid of internal points and saved it in the array U ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤŠ‡—„‡”‘ˆ‹–‡”ƒŽ‰”‹†’‘‹–• ʰɩɰɰ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ•‡–‰”‹†•’ƒ ‹‰ 'UʰɨŜŵſʫɨŜƀ ɤ•’‡ ‹ˆ›—‹ˆ‘”‰”‹†‘ˆ‹–‡”ƒŽ’‘‹–• Uʰ’ŜŽ‹•’ƒ ‡ſ'UřɨŜŞ'Uřƀ In the past four years we have drilled 89,000 km That’s more than twice around the world Who are we? We are the world’s largest oilfield services company1 Working globally—often in remote and challenging locations— we invent, design, engineer, and apply technology to help our customers find and produce oil and gas safely Who are we looking for? Every year, we need thousands of graduates to begin dynamic careers in the following domains: n Engineering, Research and Operations n Geoscience and Petrotechnical n Commercial and Business What will you be? careers.slb.com Based on Fortune 500 ranking 2011 Copyright © 2015 Schlumberger All rights reserved Download free eBooks at bookboon.com 96 Click on the ad to read more (640) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet οο Specify common coefficients in the system of nonlinear equations ɤƒŽŽ‘ ƒ–‡ƒ””ƒ›•‘ˆ ‘‘ ‘‡ˆˆ‹ ‹‡–•ƒ† ʰ’Ŝœ‡”‘•ſƀ ʰ’Ŝœ‡”‘•ſƀ ɤ†‡ˆ‹‡ ‘•–ƒ– ‘‘ ‘‡ˆˆ‹ ‹‡– ʰŞɩŜŵſ'UƋƋɩƀ ɤ†‡ˆ‹‡ ‘‡ˆˆ‹ ‹‡–•ƒ†ƒ–‡ƒ Š‡•Š’‘‹– ʰɨŜŵſ'UƋƋɩƀŞɨŜŵſ'UƋUƀ ʰɨŜŵſ'UƋƋɩƀʫɨŜŵſ'UƋUƀ οο Set initial guesses for solution of nonlinear equations We will use the uniform profile, V , as the initial guess ɤʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫ ɤ•’‡ ‹ˆ›‹‹–‹ƒŽ‰—‡••ˆ‘”•‘Ž—–‹‘‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘• ɤ™‡™‹ŽŽ—•‡—‹ˆ‘”’”‘ˆ‹Ž‡•ś•ɥʰɨ •ɥʰ’Ŝ‘‡•ſƀ οο Use the Newton-Raphson method to solve the system of nonlinear equations S \ T ɤ ɤ•‘Ž˜‡–Š‡•›•–‡‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘•—•‹‰–Š‡‡™–‘Şƒ’Š•‘‡–Š‘† ɤ —řˆɏ˜ƒŽř‹–‡”ř‡š‹–ˆŽƒ‰ʰˆ•‘Ž˜‡ſ•ɥřIřEřřřƀ ɤ ‹ˆ‘–‡š‹–ˆŽƒ‰ś ’”‹–ſɐ‘‘ƒ›‹–‡”ƒ–‹‘•ɐƀ ‡Ž•‡ś ’”‹–ſɐ— ‡••ˆ—Ž•‘Ž—–‹‘ś–Š‡—„‡”‘ˆ‹–‡”ƒ–‹‘•‹•ʩ•ɐʩ‹–‡”ƀ οο Save results Save the resulting profiles at internal points in arrays concentration and temperature Calculate the concentration at the pellet center using the second-order forward difference formula to approximate the derivative in the boundary condition at U  The concentration at the outer boundary is constant and equal to ɤ ɤ•ƒ˜‡”‡•—Ž–‹‰ ‘ ‡–”ƒ–‹‘’”‘ˆ‹Ž‡  ‘ ‡–”ƒ–‹‘ʰ’Ŝœ‡”‘•ſʫɩƀ  ‘ ‡–”ƒ–‹‘ƃɨśʫɨƄʰ—ƃɥśƄ ɤƒ†† ‘ ‡–”ƒ–‹‘˜ƒŽ—‡ƒ–Uʰɥ  ‘ ‡–”ƒ–‹‘ƃɥƄʰɫŜƋ—ƃɥƄŵɪŜŞ—ƃɨƄŵɪŜ ɤƒ†† ‘ ‡–”ƒ–‹‘˜ƒŽ—‡ƒ–Uʰɨ  ‘ ‡–”ƒ–‹‘ƃʫɨƄʰɨŜ Download free eBooks at bookboon.com 97 (641) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet οο Then, we plot the concentration profile ɤ ɤ’Ž‘–‰”ƒ’Š• ”ƒ†ʰ’ŜŽ‹•’ƒ ‡ſɥŜɥřɨŜɥřʫɩƀ ƒ–’Ž‘–Ž‹„Ŝ” ƒ”ƒ•Ŝ—’†ƒ–‡ſƇɐˆ‘–Ŝ•‹œ‡ɐśɨɩƈƀ ˆ‹‰ʰ’Ž–Ŝˆ‹‰—”‡ſƀ ƒš‡•ʰˆ‹‰Ŝƒ††ɏ•—„’Ž‘–ſɨɨɨƀ ƒš‡•Ŝ’Ž‘–ſ”ƒ†ř ‘ ‡–”ƒ–‹‘ř ‘Ž‘”ʰɑ‰”‡‡ɑřŽ‹‡•–›Ž‡ʰɑ•‘Ž‹†ɑřŽ‹‡™‹†–Šʰɩƀ –‹–Ž‡ɨʰɐœ›‡ ƒ–ƒŽ›œ‡†”‡ƒ –‹‘‹•’Š‡”‹ ƒŽ ƒ–ƒŽ›•–śɎɐ –‹–Ž‡ɨʫʰɐɛIɛʰʩ•řɛEɛʰʩ•ɐ ƒš‡•Ŝ•‡–ɏ–‹–Ž‡ſ–‹–Ž‡ɨʩſIřEƀƀ ƒš‡•Ŝ•‡–ɏšŽƒ„‡Žſ”ɐ‹‡•‹‘Ž‡••”ƒ†‹—•řɛɎ”Š‘ɛƃŞƄɐƀ ƒš‡•Ŝ•‡–ɏ›Žƒ„‡Žſɐ‹‡•‹‘Ž‡•• ‘ ‡–”ƒ–‹‘ř•ƃŞƄɐƀ ƒš‡•Ŝ‰”‹†ſƀ ƒš‹•ſƃɥŜřɨŜřɥŜɥřɨŜɥƄƀ ’Ž–Ŝ•Š‘™ſƀ οο Calculate the effectiveness factor ɤ ɤ ƒŽ —Žƒ–‡‡ˆˆ‡ –‹˜‡‡••ˆƒ –‘” ‹–‡‰”ƒ†ʰ’Ŝœ‡”‘•ſʫɩƀ ‹–‡‰”ƒ†ʰ ‘ ‡–”ƒ–‹‘Ƌſ”ƒ†ƋƋɩƀŵſɨʫEƋ ‘ ‡–”ƒ–‹‘ƀ KʰɪƋſɨʫEƀƋ–”ƒ’œſ‹–‡‰”ƒ†ř”ƒ†ƀ ’”‹–ſɐˆˆ‡ –‹˜‡‡••ˆƒ –‘”śKʰʩŜɪˆɐʩKƀ ◊◊ Solve the system of nonlinear equations by the Newton-Raphson method ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ  ɤ ɤ‘Ž˜‡–Š‡•›•–‡‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘•—•‹‰‡™–‘Şƒ’Š•‘  ɤ‡–Š‘†™‹–Š–”‹†‹ƒ‰‘ƒŽ ƒ ‘„‹ƒŜ ɤ †‡ˆˆ•‘Ž˜‡ſšɥřIřEřřřř–‘Žʰɨ‡Şɯř–‘Ž ʰɨ‡Şɯřƒš(642) –‡”ʰɨɥɥƀś  ɤ šʰšɥ ˆ‘”‹‹”ƒ‰‡ſƒš(643) –‡”ƀś ‰šʰ‰ſšřIřEřřřƀ š‡™ʰšŞ•’•‘Ž˜‡ſ ſšřIřEřřřƀř‰šƀ ‹ˆſ‘”ſš‡™Şšƀʳ–‘Žƀś ”‡–—”ƃšř‰šř‹řɐ”—‡ɐƄ ‹ˆſ‘”ſ‰šƀʳ–‘Ž ƀś ”‡–—”ƃš‡™ř‰šř‹řɐ”—‡ɐƄ šʰš‡™ ”‡–—”ƃšř‰šř‹řɐ ƒŽ•‡ɐƄ Download free eBooks at bookboon.com 98 (644) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet ◊◊ Define the system of nonlinear equations οο The function g : ɤ ɤ‡ˆ‹‡–Š‡•›•–‡‘ˆ‘Ž‹‡ƒ”‡“—ƒ–‹‘• ɤ †‡ˆ‰ſ•řIřEřřřƀś οο At first, we allocate the array f ɤƒŽŽ‘ ƒ–‡ƒ””ƒ›• ʰŽ‡ſ•ƀ ˆʰ’Ŝœ‡”‘•ſƀ οο Then, we specify the reaction term in the mass balance equations ɤƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋ ɤ”‡ƒ –‹‘–‡” ˆƃɥśƄŞʰſIƋƋɩƀƋ•ƃɥśƄŵſɨŜʫEƋ•ƃɥśƄƀ ɤƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋ American online LIGS University is currently enrolling in the Interactive Online BBA, MBA, MSc, DBA and PhD programs: ▶▶ enroll by September 30th, 2014 and ▶▶ save up to 16% on the tuition! ▶▶ pay in 10 installments / years ▶▶ Interactive Online education ▶▶ visit www.ligsuniversity.com to find out more! Note: LIGS University is not accredited by any nationally recognized accrediting agency listed by the US Secretary of Education More info here Download free eBooks at bookboon.com 99 Click on the ad to read more (645) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet οο Next, we specify the discrete balance equations at the internal points ɤ’‡ŽŽ‡–‹–‡”ƒŽ’‘‹–• ˆ‘”‹”ƒ‰‡ſɨřſŞɨƀƀś ˆƃƄʫʰƃƄƋ•ƃŞɨƄʫƋ•ƃƄʫƃƄƋ•ƃʫɨƄ οο Finally, we define the balance equations at the center and surface of the pellet ɤ’‡ŽŽ‡– ‡–‡” ˆƃɥƄʫʰſɩŜƋŵɪŜʫƃɥƄŞƃɥƄŵɪŜƀƋ•ƃɥƄʫſƃɥƄŞƃɥƄŵɪŜƀƋ•ƃɨƄ ɤ’‡ŽŽ‡–•—”ˆƒ ‡ ˆƃŞɨƄʫʰƃŞɨƄƋ•ƃŞɩƄʫƋ•ƃŞɨƄʫƃŞɨƄ  ɤ ”‡–—”ˆ ◊◊ Define the Jacobian matrix οο The function jac: ɤ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ‡ˆ‹‡ ƒ ‘„‹ƒƒ–”‹š ɤ †‡ˆ ſ•řIřEřřřƀś οο At first, we form the main diagonal d1 ɤ ɤƒ‹‹ƒ‰‘ƒŽ†ɨ ɤ ʰŽ‡ſ•ƀ †ɨʰ’Ŝœ‡”‘•ſƀ ɤƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋ ɤ†‡”‹˜ƒ–‹˜‡‘ˆ”‡ƒ –‹‘”ƒ–‡™‹–Š”‡•’‡ ––‘ ‘ ‡–”ƒ–‹‘ †ɨƃɥśƄʫʰŞſIƋƋɩƀŵſſɨŜʫEƋ•ƃɥśƄƀƋƋɩƀ ɤƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋƋ ɤ’‡ŽŽ‡–‹–‡”ƒŽ’‘‹–• ˆ‘”‹”ƒ‰‡ſɨřſŞɨƀƀś †ɨƃƄʫʰ ɤ’‡ŽŽ‡– ‡–‡” †ɨƃɥƄʫʰƃɥƄʫɩŜƋŵɪŜŞƃɥƄŵɪŜ ɤ’‡ŽŽ‡–•—”ˆƒ ‡ †ɨƃŞɨƄʫʰ ɤ’‘•‹–‹‘‘ˆ‘Şœ‡”‘‡Ž‡‡–•  †ɨʰƒ”ƒ‰‡ſɥřƀ (646) †ɨʰƒ”ƒ‰‡ſɥřƀ Download free eBooks at bookboon.com 100 (647) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet οο Then, we specify the lower diagonal d2 ɤ ɤ‘™‡”‹ƒ‰‘ƒŽ†ɩ ɤ †ɩʰ’Ŝœ‡”‘•ſŞɨƀ ɤ’‡ŽŽ‡–‹–‡”ƒŽ’‘‹–• †ɩƃɥśŞɩƄʰƃɨśŞɨƄ ɤ’‡ŽŽ‡–•—”ˆƒ ‡ †ɩƃŞɩƄʰƃŞɨƄ ɤ’‘•‹–‹‘‘ˆ‘Şœ‡”‘‡Ž‡‡–• (648) †ɩʰƒ”ƒ‰‡ſɨřƀ  †ɩʰƒ”ƒ‰‡ſɥřŞɨƀ οο Finally, we specify the upper diagonal d3 ɤ’’‡”‹ƒ‰‘ƒŽ†ɪ ɤ †ɪʰ’Ŝœ‡”‘•ſŞɨƀ ɤ’‡ŽŽ‡– ‡–‡” †ɪƃɥƄʰƃɥƄŞƃɥƄŵɪŜ ɤ’‡ŽŽ‡–‹–‡”ƒŽ’‘‹–• †ɪƃɨśŞɨƄʰƃɨśŞɨƄ ɤ’‘•‹–‹‘‘ˆ‘Şœ‡”‘‡Ž‡‡–•  †ɪʰƒ”ƒ‰‡ſɨřƀ (649) †ɪʰƒ”ƒ‰‡ſɥřŞɨƀ οο Then, we combine diagonals in one array and form the sparse Jacobian matrix ɤ ɤ‘„‹‡†‹ƒ‰‘ƒŽ•‹‘‡ƒ””ƒ› ɤ †ʰ ‘ ƒ–‡ƒ–‡ſſ†ɨř†ɩř†ɪƀřƒš‹•ʰɥƀ (650) ”ʰ ‘ ƒ–‡ƒ–‡ſſ(651) †ɨř(652) †ɩř(653) †ɪƀřƒš‹•ʰɥƀ  ʰ ‘ ƒ–‡ƒ–‡ſſ †ɨř †ɩř †ɪƀřƒš‹•ʰɥƀ ɤ ɤ ‘”•’ƒ”•‡ ƒ ‘„‹ƒƒ–”‹š ɤ  ƒ ʰ•’ƒ”•‡Ŝ ‘‘ɏƒ–”‹šſſ†řſ(654) ”ř ƀƀř•Šƒ’‡ʰſřƀƀ  ƒ ʰ ƒ Ŝ–‘ •”ſƀ ɤ ”‡–—” ƒ  Download free eBooks at bookboon.com 101 (655) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet ◊◊ Define widgets ɤ ɤ’‡ ‹ˆ›™‹†‰‡–• Šɨʰ ſ˜ƒŽ—‡ʰɑʳŠɫʴʳ„ʴƒ••”ƒ•ˆ‡”ƒ†œ›‡ƒ–ƒŽ›œ‡†‡ƒ –‹‘‹(656) •‘–Š‡”ƒŽ’Š‡”‹ ƒŽ ‡ŽŽ‡–ʳŵ„ʴɑř ‘Ž‘”ʰɑ„”‘™ɑƀ Šɩʰ ſ˜ƒŽ—‡ʰɑʳ„”ʴɑƀ Šɪʰƒ–‡šſ˜ƒŽ—‡ʰɑɛɛɎ„‘šƇ’‡ ‹ˆ›’ƒ”ƒ‡–‡”•śƈɛɛɑřƀ †‹•’Žƒ›ſŠɨƀ †‹•’Žƒ›ſŠɩƀ †‹•’Žƒ›ſŠɪƀ Š‹ɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥřƒšʰɩɥř•–‡’ʰɥŜɬř˜ƒŽ—‡ʰɨɥƀ „‡–ƒɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥřƒšʰɨř•–‡’ʰɥŜɥɬř˜ƒŽ—‡ʰɥŜɬƀ ™ʰ‹–‡”ƒ –ſˆƒ‹řIʰŠ‹ɏ•Ž‹†‡”řEʰ„‡–ƒɏ•Ž‹†‡”ƀ Download free eBooks at bookboon.com 102 Click on the ad to read more (657) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet The screenshot of widgets to specify parameters is shown in Fig 5.2 Figure 5.2: The screenshot of widget to specify parameters for the enzyme catalyzed reaction in isothermal pellet The dimensionless substrate profiles in the spherical immobilized particle are shown in Fig 5.3 for various values of Thiele modulus This plot was calculated using the Enzyme_Concentration_ thiele.ipynb notebook The effect of saturation parameter on the concentration profile is illustrated in Fig 5.4 These profiles were calculated using the Enzyme_Concentration_beta ipynb notebook The uniform substrate profile is obtained at low Thiele modulus and high value of saturation parameter Download free eBooks at bookboon.com 103 (658) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Enzyme catalyzed reaction in isothermal pellet Figure 5.3: Substrate profiles in the spherical immobilized particle for various values of Thiele modulus, E  Figure 5.4: Substrate profiles in the spherical immobilized particle for various values of parameter, I  Download free eBooks at bookboon.com 104 E (659) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES In this chapter, you will learn to: Derive the model equations for the non-catalytic chemical reaction in the agglomerate with porous structure that evolves during the reaction Solve the model equations numerically using the method of lines Simulate and plot the solid deposit and gaseous reactant concentration profiles for the chemical vapor deposition reaction in the agglomerate of fine particles using the elaborated IPython notebooks Study the effects of process parameters on the uniformity of deposit distribution in the agglomerate Join the best at the Maastricht University School of Business and Economics! Top master’s programmes •  3rd place Financial Times worldwide ranking: MSc International Business • 1st place: MSc International Business • 1st place: MSc Financial Economics • 2nd place: MSc Management of Learning • 2nd place: MSc Economics • 2nd place: MSc Econometrics and Operations Research • 2nd place: MSc Global Supply Chain Management and Change Sources: Keuzegids Master ranking 2013; Elsevier ‘Beste Studies’ ranking 2012; Financial Times Global Masters in Management ranking 2012 Maastricht University is the best specialist university in the Netherlands (Elsevier) Visit us and find out why we are the best! Master’s Open Day: 22 February 2014 www.mastersopenday.nl Download free eBooks at bookboon.com 105 Click on the ad to read more (660) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES 6.1 DERIVATION OF MATHEMATICAL MODEL EQUATIONS We will consider the chemical reaction in a porous agglomerate made of primary fine particles The gaseous reactant diffuses from the bulk phase to the outer agglomerate surface and then from the surface to the agglomerate center The reaction takes place on the surface of primary particles The chemical vapor deposition (Golman & Shinohara 2000) and chemical vapor infiltration (Xu & Yan 2010) are examples of such reactions The mechanism of these processes is quite complex It is assumed that the reactant species react in the gas phase generating the gaseous precursors Then, these precursors nucleate and grow to form the deposit on the surface of primary particles The amount of deposit increases with the reaction time, resulting in a decrease of pore space among primary particles Another example of non-catalytic reaction is the sulfation of lime, which is used to control the sulfur emissions in the fluidized bed combustion of coal (Jeong et al 2015) At high temperatures, the limestone calcines to form lime that reacts with sulfur dioxide released by the coal The solid reaction product, calcium sulfate, deposits in the porous CaO particles As the molar volume of calcium sulfate is larger than that of calcium oxide, the pore space in the CaO particles is gradually filled with calcium sulfate Therefore, we have to take into account both the temporal and spatial variations of effective transport properties in the radial direction of the agglomerate in deriving the mathematical model These variations should be related to the changes in agglomerate structural properties, such as voidage and specific surface area, which in turn should be connected to the rate of the reaction front advancing on the surface of primary particles Here, we will derive the mathematical model for the chemical vapor deposition reaction in the agglomerate of fine particles We assume that the gas-phase reaction is in steady-state at all times We also neglect the temperature gradient in the agglomerate We first write the mass balance equation of i gaseous species in the spherical agglomerate as: w& ·  w § 'HII L  L ¸  ˜ 56L ¨  w5 © w5 ¹  (6.1) where &L and 'HII L are the concentration and effective diffusivity of i species at the radial position R and time t in the porous structure of the agglomerate, respectively, S is the accessible internal surface area and 56 is the reaction rate per unit area L Download free eBooks at bookboon.com 106 (661) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES Then, we introduce the conservation equation for the solid product in terms of the varying radius of the reaction surface of fine particles, r, as follows: wU wW E ˜ X V ˜ 56L (6.2) D where X V V U V is the solid molar volume, and V and U V are the molecular weight and density of solid product, respectively Coefficients a and b represent the stoichiometric coefficients for the reacting species and the solid product Equations (6.1) and (6.2) are subject to the following initial and boundary conditions: w&L w5 &L U  DW DW 5 (6.4) DW W  DQG    5 (6.5) &L E U  (6.3) where U is the initial radius of fine particles, 5 is the agglomerate radius and &L E is the bulk concentration of growth species near the external surface of the agglomerate Here, we assume that the surface reaction kinetics follows a first-order rate law and the reaction is irreversible: 56L N ˜ FL (6.6) The specific reaction rate constant N is expressed as a function of the reaction temperature, T, according to the Arrhenius equation: N ª N H[S «J ¬ § ·º ˜ ¨   ¸ » (6.7) © ¹¼ where J ( is the Arrhenius parameter, E is the activation energy, N  is the reaction J  rate constant at the reference temperature 7 , and 5J is the ideal gas law constant We will use the modified random overlapping grain model, previously developed by the author (Golman & Shinohara 1998), to describe the evolution of porous structure of the agglomerate as the reaction progresses The agglomerate prior to reaction is represented as a population of randomly distributed grains of initially uniform size As the reaction proceeds, the solid product deposits on the surfaces of the grains and the grains begin to grow Download free eBooks at bookboon.com 107 (662) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES The variation of local void fraction in the agglomerate with reaction progress is given as: H ª   H (663) § § U · · º  ¨ ¨ ¸  ¸ » (6.8) H  H[S «  ¸» H  ¨ © U ¹ « © ¹¼ ¬ The relationship among the surface area, the void fraction and the grain size is as follows: 6  H § U · (6.9) ˜¨ ¸ H  © U ¹ The effective diffusivity of the i species, 'HII L , can be estimated by Eq (1.11) The mean radius of capillary used in the calculation of Knudsen diffusivity by Eq (1.5) is evaluated on the basis of the random overlapping structural model by Eq (6.9) as:  D H  § U · ˜ (6.10) 6 ¨© U ¸¹ Combining Eqs (6.6)–(6.9), we rewrite Eqs (6.1) and (6.2) in dimensionless form as:  w §  wFL · 'HII L U ¸ U  wU ¨© wU ¹ w[ wW ª   H  (664) ¬ H I  FL[  H[S «  [  º  (665) » (6.11) ¼ FL (6.12) > Apply now redefine your future - © Photononstop AxA globAl grAduAte progrAm 2015 axa_ad_grad_prog_170x115.indd 19/12/13 16:36 Download free eBooks at bookboon.com 108 Click on the ad to read more (666) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  W E YV N &L E U & NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES where U  FL & L  [ U  W are the dimensionless agglomerate radial coordinate, D U L E   the growth species concentration, the reaction radius of the primary particles and the reaction time, respectively The definitions of characteristic dimensionless parameters are summarized as follows: οο normalized effective diffusivity, 'HII , and specific surface area, s, L 'HII L 'HII L  'HII L V (6.13) 6 οο initial Thiele modulus, I , at W  I 5 N6 (6.14)  'HII L The voidage is calculated from Eq (6.8) as ª   H  (667)  º H H  H[S «  [  (668) » (6.15) H ¬ ¼ and the normalized effective diffusivity, 'HII L , is estimated from Eqs (1.1) – (1.11) as  HII L '     §H ·  § · § : PL ·§ '.L  'PL · ¸ (6.16) ¨ ¸ U(669) ¨ ¸ ¨ ¸¨ © H ¹ © 7 ¹ © :PL ¹© '.L  'PL ¹ The corresponding initial and boundary conditions are [  FL  DW W FL  DW U  IRUDOO W t  (6.18) GFL GU  DW U  IRUDOO U (6.17)  IRUDOO W t  (6.19) The local normalized mass concentration of deposit, Z , is defined as Z :V  :V PD[ where :V is the mass of solid product per unit agglomerate volume, :V PD[ UV ˜ H is the maximum value of :V corresponding to the complete filling of void spaces with solid product Thus, using Eq (6.15), we can evaluate Z as Z H  H H ª   H  (670)  º [  (671) » (6.20)   H[S «  H ¬ ¼ Download free eBooks at bookboon.com 109 (672) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES 6.2 COMPUTATIONAL PROCEDURE USING THE METHOD OF LINES The mass balance equations for the agglomerate consist of a system of the second-order ODEs of the boundary value type for the radial distribution of gas precursor by Eq (6.11) and the first-order ODE for the rate of growth of reaction interface on the primary particles due to the solid deposition by Eq (6.12) We will use the orthogonal collocation method for the solution of second-order differential Eq (6.11) for the agglomerate Using the transformation [ U  , we can rewrite Eq (6.11) similar to Eq (3.6) as [ I G  FL  GFL   G[  G[  'HII L ª   H  (673)  º ˜ FL[  ˜ H[S «  [  (674) » (6.21) H ¬ ¼ The boundary condition is  DW FL [ (6.22) The application of the orthogonal collocation method to Eq (6.21) results in the following algebraic equation at the j interior collocation point:  [ M ¦ % MN ˜ FL N  N    ¦ $MN ˜ FL N N  I HII L ' ª   H  (675)  º [ M  (676) » (6.23) ˜ FL  M ˜ [ M H[S «  H M(677) ¬ ¼ The boundary condition is FL   FL [   (6.24) Equation (6.23) can be rewritten using the above boundary condition as: N x j ∑ B jk ⋅ ci ,k + k =1 ⎡ (1 − ε ) ⎤ φ02 N ⋅ − ⋅ ci , j ⋅ ξ j2 exp ⎢ − ξ j − 1)⎥ = A c ( ∑ jk i ,k * k =1 Deff ,i ( j ) ε0 ⎣ ⎦ ⎛ ⎞ − ⎜ x j B jN +1 + AjN +1 ⎟ ⎝ ⎠ (6.25) Equation (6.25) can be represented in a matrix form as follows: '˜F ) (6.26) where )M  [ M % M1    $ M1  (678)  Download free eBooks at bookboon.com 110 (679) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I and ' ' MM ª ' « « «[ %   $ «  1  1 « « «  « [1 %1   $1   ¬ [ M % MM   NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES [ %   $   º $1 »  »  [ %  $ » »  » » » '11 » ¼ [ %1  ' [1 %1    $1   ª   H  (680)  º I   ˜ [ M  ˜ H[S «  [ M  (681) » $ MM  H   'HII L M (682) ¬ ¼ We solve the resulting system of N algebraic equations for the interior ordinates FL (683) } FL (684) and calculate the concentration profile by Lagrangian interpolation Then, the conservation Eq (6.12) for the solid deposit at each collocation point becomes as follows: G[ M GW FL  M (6.27) Thus, the mass balance equations for the agglomerate are reduced to a set of N simultaneous algebraic equations for the gas precursor concentration, Eq (6.26), and N simultaneous first order ODEs for the solid deposit, Eq (6.27) Download free eBooks at bookboon.com 111 Click on the ad to read more (685) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES 6.3 PROGRAM DESCRIPTION Notebook AgglomerateCVD.ipynb ◊◊ Import packages We will use the Python library NumPy for vector manipulations, calculation of exponential function, taking roots, etc The ode module from the library SciPy is called to solve the system of ordinary differential equations and the js_roots module is used to find the roots of orthogonal polynomials The solve module from the SciPy library is utilized to solve the dense linear system and the InterpolatedUnivariateSpline module is applied to interpolate the solid concentration profile in the radial direction of the agglomerate To calculate the collocation matrices, we use the module oc from the orthogonal_collocation library To plot the results of numerical simulations, we will use the pyplot module from the matplotlib library The IPython.html module is called to display widgets for interactive input of parameter values ʩƒ–’Ž‘–Ž‹„‹Ž‹‡ ‹’‘”–—’›ƒ•’ ˆ”‘• ‹’›Ŝ‹–‡‰”ƒ–‡‹’‘”–‘†‡ ˆ”‘• ‹’›Ŝ•’‡ ‹ƒŽŜ‘”–Š‘‰‘ƒŽ‹’‘”–Œ•ɏ”‘‘–• ˆ”‘• ‹’›ŜŽ‹ƒŽ‰‹’‘”–•‘Ž˜‡ ˆ”‘• ‹’›Ŝ‹–‡”’‘Žƒ–‡‹’‘”–(686) –‡”’‘Žƒ–‡†‹˜ƒ”‹ƒ–‡’Ž‹‡ ‹’‘”–‘”–Š‘‰‘ƒŽɏ ‘ŽŽ‘ ƒ–‹‘ƒ•‘  ‹’‘”–ƒ–’Ž‘–Ž‹„Ŝ’›’Ž‘–ƒ•’Ž– ˆ”‘(687) ›–Š‘Ŝ†‹•’Žƒ›‹’‘”– Ž‡ƒ”ɏ‘—–’—–ř†‹•’Žƒ›ř  ˆ”‘(688) ›–Š‘ŜŠ–ŽŜ™‹†‰‡–•‹’‘”–‹–‡”ƒ –ř Ž‘ƒ–Ž‹†‡”ř řƒ–‡š ◊◊ Define the main function fmain: οο Input parameters: T – temperature Ragl – agglomerate radius eag0 – initial agglomerate voidage ɤʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫ ɤ ɤƒ‹’”‘‰”ƒ ɤ †‡ˆˆƒ‹ſřƒ‰ŽřHƒ‰ɥřƋƋ™ƒ”‰•ƀś Download free eBooks at bookboon.com 112 (689) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Specify the global array Cgas ɤ ‰Ž‘„ƒŽ‰ƒ• οο Define the reaction and agglomerate parameters ɤ ɤʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫʫ ɤ†‡ˆ‹‡”‡ƒ –‹‘ƒ†ƒ‰‰Ž‘‡”ƒ–‡’ƒ”ƒ‡–‡”• ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ–‡’‡”ƒ–—”‡‹ƃƄ ʰʫɩɮɪŜ ɤ””Š‡‹—•’ƒ”ƒ‡–‡” JʰɨɯŜɪ ɤ”‡ˆ‡”‡ ‡–‡’‡”ƒ–—”‡řɥƃƄ ɥʰɯɥɥŜʫɩɮɪŜɨɬ ɤ”ƒ–‡ ‘•–ƒ–ƒ–”‡ˆ‡”‡ ‡–‡’‡”ƒ–—”‡ ɥʰɨŜɫ‡Şɫ ɤ ƒŽ —Žƒ–‹‘‘ˆ”ƒ–‡ ‘•–ƒ–ƒ––‡’‡”ƒ–—”‡ ʰɥƋ’Ŝ‡š’ſJƋſɨŜɥŞſɥŵƀƀƀ ɤƒ‰‰Ž‘‡”ƒ–‡•‹œ‡‹ƃƄ ƒ‰Žʰƒ‰ŽƋɨŜ‡Şɭ ɤ‹‹–‹ƒŽ•‹œ‡‘ˆ’”‹ƒ”›’ƒ”–‹ Ž‡•řƃƄ ”ɥʰɥŜɮɬ‡ŞɭŵɩŜ ɤ„—Ž‰ƒ• ‘ ‡–”ƒ–‹‘řƃ‘ŽŵɪƄ ‘ʰɨŜ‡Şɩ οο Calculate the initial diffusivity, surface area and Thiele modulus ɤ ɤ ƒŽ —Žƒ–‡‹‹–‹ƒŽƒ‰‰Ž‘‡”ƒ–‡ƒ†”‡ƒ –‹‘’ƒ”ƒ‡–‡”•ś ɤ‹‹–‹ƒŽ‡ˆˆ‡ –‹˜‡†‹ˆˆ—•‹˜‹–› ”•ʰɨŜɥ ‡ɥʰ‡ˆˆſHƒ‰ɥř”ɥřřHƒ‰ɥř”•ƀ ɤ‹‹–‹ƒŽ‹–‡”ƒŽƒ”‡ƒ ɥʰɪŜƋſɨŜɥŞHƒ‰ɥƀŵ”ɥ ɤ‹‹–‹ƒŽŠ‹‡Ž‡‘†—Ž—• Tɥʰƒ‰ŽƋ’Ŝ•“”–ſƋſɪŜƋſɨŞHƒ‰ɥƀŵ”ɥƀŵ‡ɥƀ Download free eBooks at bookboon.com 113 (690) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Specify the number of internal collocation points ɤ ɤŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞŞ ɤ•’‡ ‹ˆ›—„‡”‘ˆ‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•  ‘Ž’–ʰɮ ɤ ɤ–‘–ƒŽ—„‡”‘ˆ’‘‹–•ʰ‘‘ˆ‹–‡”ƒŽ ‘ŽŽ‘ Ŝ’‘‹–•ʫ ɤ”‹‰Š–„‘—†ƒ”›ˆ‘”šʰɨ –’–ʰ ‘Ž’–ʫɨ Need help with your dissertation? Get in-depth feedback & advice from experts in your topic area Find out what you can to improve the quality of your dissertation! Get Help Now Go to www.helpmyassignment.co.uk for more info Download free eBooks at bookboon.com 114 Click on the ad to read more (691) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Set internal collocation points as roots of Jacobi polynomial ɤ ɤƒŽ —Žƒ–‡‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•ſšŒƀ ɤŠ‡˜ƒŽ—‡‘ˆ’ƒ”ƒ‡–‡”•ƒŽ’Šƒƒ†„‡–ƒ‹ ƒ ‘„‹’‘Ž›‘‹ƒŽ•ś ɤƒŽ’Šƒʰɨř„‡–ƒʰɨŵɩ ɤ‘””‡•’‘†‹‰’ƒ”ƒ‡–‡”•’ƒ†“‹’›–Š‘ˆ— –‹‘Œ•ɏ”‘‘–•ś “ʰɪŜŵɩŜ ’ʰɨŜʫ“ ɤ‹–‡”ƒŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•řšŒřƒ”‡”‘‘–•‘ˆ ƒ ‘„‹’‘Ž›‘‹ƒŽ šŒʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ™Œʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ƃšŒř™ŒƄʰŒ•ɏ”‘‘–•ſ ‘Ž’–ř’ř“ƀ ɤƒŽŽ ‘ŽŽ‘ ƒ–‹‘’‘‹–•ʰ‹–‡”ƒŽʫ”‹‰Š–„‘—†ƒ”› š”ʰ’Ŝœ‡”‘•ſ–’–ƀ š”ƃɥś ‘Ž’–ƄʰšŒƃɥś ‘Ž’–Ƅ š”ƃ–’–ŞɨƄʰɨŜɥɤ”‹‰Š–„‘—†ƒ”› οο Set matrices of collocation equation ɤ ɤ ƒŽ —Žƒ–‡˜‡ –‘”•‘ˆ–Š‡ˆ‹”•–ſ†‹ˆɨƀř•‡ ‘†ſ†‹ˆɩƀƒ†–Š‹”†ſ†‹ˆɪƀ ɤ†‡”‹˜ƒ–‹˜‡•‘ˆ–Š‡‘†‡’‘Ž›‘‹ƒŽƒ––Š‡”‘‘–• ƃ†‹ˆɨř†‹ˆɩř†‹ˆɪƄʰ‘ Ŝ†‹ˆſ–’–řš”ƀ ɤ ɤ•‡–—’ƒ–”‹ ‡•‘ˆ–Š‡ˆ‹”•–ſƀƒ†•‡ ‘†ſƀ†‡”‹˜ƒ–‹˜‡™‡‹‰Š–• ʰ’Ŝœ‡”‘•ſſ–’–ř–’–ƀƀ ʰ’Ŝœ‡”‘•ſſ–’–ř–’–ƀƀ ƃřƄʰ‘ Ŝ ‘Žƒ–”‹šſ–’–řš”ř†‹ˆɨř†‹ˆɩř†‹ˆɪƀ  ɤ ɤ•‡–—’ƒ–”‹šƒ†˜‡ –‘”  ʰ’Ŝœ‡”‘•ſſ ‘Ž’–ř ‘Ž’–ƀƀ  ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ  ƃɥś ‘Ž’–ƄʰŞ ſš”ƃɥś ‘Ž’–ƄƋƃɥś ‘Ž’–ř ‘Ž’–ƄʫſɪŜŵɩŜƀƋƃɥś ‘Ž’–ř ‘Ž’–Ƅƀ ˆ‘”‹‹”ƒ‰‡ſ ‘Ž’–ƀś ƃ‹řɥś ‘Ž’–Ƅʰſš”ƃ‹ƄƋƃ‹řɥś ‘Ž’–ƄʫſɪŜŵɩŜƀƋƃ‹řɥś ‘Ž’–Ƅƀ οο Collect parameters to pass to function f ɤ ‘„‹‡’ƒ”ƒ‡–‡”•–‘’ƒ••–‘–Š‡ˆ— –‹‘ˆ ’ƒ”ƒ•ʰƃHƒ‰ɥř”ɥřř‡ɥřTɥř řƄ οο Allocate memory and set initial conditions for ODE ɤƒŽŽ‘ ƒ–‡‡‘”›ƒ†•‡–‹‹–‹ƒŽ ‘†‹–‹‘• ‰ƒ•ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ”ʰ’Ŝ‘‡•ſ ‘Ž’–ƀ Download free eBooks at bookboon.com 115 (692) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Set the time range for integration and calculate the number of time steps ɤ ɤ•‡––Š‡–‹‡”ƒ‰‡ˆ‘”‹–‡‰”ƒ–‹‘ Wɏ•–ƒ”–ʰɥŜɥ Wɏˆ‹ƒŽʰɥŜɩ ɤ•’‡ ‹ˆ›–Š‡–‹‡‹–‡”˜ƒŽˆ‘”†ƒ–ƒ ‘ŽŽ‡ –‹‘ †‡Ž–ƒɏWʰɥŜɥɬ ɤ ƒŽ —Žƒ–‡–Š‡—„‡”‘ˆ–‹‡•–‡’•”‡“—‹”‡†™‹–Šƒƒ††‹–‹‘ƒŽ ɤ•–‡’ˆ‘”‹‹–‹ƒŽ ‘†‹–‹‘ —ɏ•–‡’•ʰ’ŜˆŽ‘‘”ſſWɏˆ‹ƒŽŞWɏ•–ƒ”–ƀŵ†‡Ž–ƒɏWƀʫɨ οο Prepare plots ɤ ɤ”‡’ƒ”‡’Ž‘–• ˆřſƒšɨřƒšɩƀʰ’Ž–Ŝ•—„’Ž‘–•ſɩřɨřˆ‹‰•‹œ‡ʰſɭřɨɥƀƀ οο Specify the parameters of ODE integrator ɤ ɤ’‡ ‹ˆ›–Š‡‹–‡‰”ƒ–‘”’ƒ”ƒ‡–‡”•ś ɤ‡—•‡–Š‡˜‘†‡‹–‡‰”ƒ–‘”™‹–Š„ƒ ™ƒ”††‹ˆˆ‡”‡–‹ƒ–‹‘ˆ‘”—Žƒ–‘•‘Ž˜‡ ɤ–Š‡•›•–‡‘ˆ•–‹ˆˆ•Ŝ ɤŠ‡ƒ„•‘Ž—–‡–‘Ž‡”ƒ ‡‹•ƒ–‘Žř–Š‡”‡Žƒ–‹˜‡–‘Ž‡”ƒ ‡‹•”–‘Žƒ† ɤ–Š‡—„‡”‘ˆ•–‡’•‹••–‡’• ”‹–ʰ‘†‡ſˆˆƀŜ•‡–ɏ‹–‡‰”ƒ–‘”ſɐ˜‘†‡ɐř‡–Š‘†ʰɐ„†ˆɐř•–‡’•ʰɬɥɥɥɥřƒ–‘ŽʰɨŜɥ‡Ş ɥɬř”–‘ŽʰɨŜɥ‡Şɥɬƀ ”‹–Ŝ•‡–ɏ‹‹–‹ƒŽɏ˜ƒŽ—‡ſ”řWɏ•–ƒ”–ƀŜ•‡–ɏˆɏ’ƒ”ƒ•ſ’ƒ”ƒ•ƀ οο Create vectors to store the axial distributions of r, c and w at specified time steps ɤ ɤ”‡ƒ–‡˜‡ –‘”•–‘•–‘”‡ ‘’‘‡–•ƒš‹ƒŽ†‹•–”‹„—–‹‘•ƒ–•’‡ ‹ˆ‹‡†–‹‡•–‡’• Wʰ’Ŝœ‡”‘•ſſ—ɏ•–‡’•řɨƀƀ ”ɏƒ–ɏWʰ’Ŝœ‡”‘•ſſ—ɏ•–‡’•ř–’–ƀƀ ɏƒ–ɏWʰ’Ŝœ‡”‘•ſſ—ɏ•–‡’•ř–’–ƀƀ ™ɏƒ–ɏWʰ’Ŝœ‡”‘•ſſ—ɏ•–‡’•ř–’–ƀƀ οο Save initial values ɤƒ˜‡‹‹–‹ƒŽ˜ƒŽ—‡• WƃɥƄʰWɏ•–ƒ”– ”ɏƒ–ɏWƃɥřɥś ‘Ž’–Ƅʰ”ƃɥś ‘Ž’–Ƅ Download free eBooks at bookboon.com 116 (693) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Integrate the system of ODEs across each 'W timestep ɤ ɤ(694) –‡‰”ƒ–‡–Š‡•›•–‡‘ˆ•ƒ ”‘••‡ƒ Š†‡Ž–ƒɏW–‹‡•–‡’ ʰɨ ™Š‹Ž‡”‹–Ŝ•— ‡••ˆ—Žſƀƒ†ʳ—ɏ•–‡’•ś ”‹–Ŝ‹–‡‰”ƒ–‡ſ”‹–Ŝ–ʫ†‡Ž–ƒɏWƀ οο Store the results of integration ɤ•–‘”‡–Š‡”‡•—Ž–•‘ˆ‹–‡‰”ƒ–‹‘ś ɤ–‹‡ WƃƄʰ”‹–Ŝ– ɤ‘”ƒŽ‹œ‡†”ƒ†‹—•‘ˆ’”‹ƒ”›’ƒ”–‹ Ž‡• ”ɏƒ–ɏWƃřɥś ‘Ž’–Ƅʰ”‹–Ŝ›ƃɥś ‘Ž’–Ƅ ɤ‘”ƒŽ‹œ‡†‰ƒ• ‘ ‡–”ƒ–‹‘ ɏƒ–ɏWƃřɥś ‘Ž’–Ƅʰ‰ƒ•ƃɥś ‘Ž’–Ƅ ɏƒ–ɏWƃř ‘Ž’–ƄʰɨŜ ɤ‘”ƒŽ‹œ‡†ƒ•• ‘ ‡–”ƒ–‹‘‘ˆ†‡’‘•‹– ˆ‘”‹‹”ƒ‰‡ſɥř ‘Ž’–ƀś Hƒ‰ʰ’Ŝ‡š’ſŞſɨŜŞHƒ‰ɥƀƋſſ”ɏƒ–ɏWƃř‹ƄƋƋɪƀŞɨŜƀŵHƒ‰ɥƀ ™ɏƒ–ɏW>ř‹ƄʰɨŜŞHƒ‰ Brain power By 2020, wind could provide one-tenth of our planet’s electricity needs Already today, SKF’s innovative knowhow is crucial to running a large proportion of the world’s wind turbines Up to 25 % of the generating costs relate to maintenance These can be reduced dramatically thanks to our systems for on-line condition monitoring and automatic lubrication We help make it more economical to create cleaner, cheaper energy out of thin air By sharing our experience, expertise, and creativity, industries can boost performance beyond expectations Therefore we need the best employees who can meet this challenge! The Power of Knowledge Engineering Plug into The Power of Knowledge Engineering Visit us at www.skf.com/knowledge Download free eBooks at bookboon.com 117 Click on the ad to read more (695) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Interpolate gas and solid deposit radial profiles ɤ‹–‡”’‘Žƒ–‡”ƒ†‹ƒŽ‰ƒ• ‘ ‡–”ƒ–‹‘’”‘ˆ‹Ž‡ —†‹˜ʰɬɨ šɏ‹–ʰ’ŜŽ‹•’ƒ ‡ſɥŜɥřɨŜɥř—ʰ—†‹˜ƀ ›ɏ‹–ʰ’Ŝœ‡”‘•ſ—†‹˜ƀ ɤ ›ʰ’Ŝ‘‡•ſ–’–ƀ ›ƃɥś ‘Ž’–Ƅʰ‰ƒ•ƃɥś ‘Ž’–Ƅ ɤ š‹–”’ʰ’Ŝœ‡”‘•ſ–’–ƀ ˆ‘”‹‹”ƒ‰‡ſ—†‹˜ƀś šššʰšɏ‹–ƃ‹ƄƋšɏ‹–ƃ‹Ƅ ƃš‹–’Ƅʰ‘ Ŝ‹–”’ſ–’–řšššřš”ř†‹ˆɨƀ ˜‡ –‘”ɨʰš‹–’Ƌ› ›ɏ‹–ƃ‹Ƅʰ˜‡ –‘”ɨŜ•—ſƀ ɤ‹–‡”’‘Žƒ–‡•‘Ž‹† ‘ ‡–”ƒ–‹‘’”‘ˆ‹Ž‡•—•‹‰•’Ž‹‡• ˆɩʰ(696) –‡”’‘Žƒ–‡†‹˜ƒ”‹ƒ–‡’Ž‹‡ſš”ƃɥś ‘Ž’–Ƅř ™ɏƒ–ɏWƃřɥś ‘Ž’–Ƅřʰɪƀ οο Plot graphs ɤ ɤ’Ž‘–‰”ƒ’Š• ’Ž–Ŝ” ƒ”ƒ•Ŝ—’†ƒ–‡ſƇɐˆ‘–Ŝ•‹œ‡ɐśɨɩƈƀ –‹–Ž‡ɨʰɐ”‡ƒ –‹‘‹ƒ‰‰Ž‘‡”ƒ–‡‘ˆˆ‹‡’ƒ”–‹ Ž‡•śɎɐ  –‹–Ž‡ɨʫʰ”ɐƃƄʰʩɬŜɥˆřƒ‰ŽƃɛɎ—ɛƄʰʩɬŜɥˆřɛɎ˜ƒ”‡’•‹Ž‘ɏɥɛƃŞƄʰʩ ɫŜɩˆɐ ƒšɨŜ’Ž‘–ſšɏ‹–ř›ɏ‹–řŽ‹‡™‹†–ŠʰɨŜɬřŽƒ„‡Žʰ”ɑɛɎ–ƒ—ʰɛʩɫŜɩˆɑʩWƃƄƀ ƒšɨŜ•‡–ɏ–‹–Ž‡ſ–‹–Ž‡ɨʩſřƒ‰ŽŵɨŜ‡ŞɭřHƒ‰ɥƀƀ ƒšɩŜ’Ž‘–ſšɏ‹–řˆɩſšɏ‹–ƀřŽ‹‡™‹†–ŠʰɨŜɬřŽƒ„‡Žʰ”ɑɛɎ–ƒ—ʰɛʩɫŜɩˆɑʩWƃƄƀ ƒšɨŜ•‡–ɏ›Žƒ„‡Žſɐ ƒ• ‘ ‡–”ƒ–‹‘řɛ ɛƃŞƄɐƀ ƒšɩŜ•‡–ɏ›Žƒ„‡Žſɐ‘Ž‹† ‘ ‡–”ƒ–‹‘řɛ™ɛƃŞƄɐƀ ƒšɨŜ•‡–ɏšŽ‹ſƃɥŜɥřɨŜƄƀ ƒšɨŜ•‡–ɏ›Ž‹ſƃɥŜɥřɨŜƄƀ ƒšɩŜ•‡–ɏšŽ‹ſƃɥŜɥřɨŜƄƀ ƒšɩŜ•‡–ɏ›Ž‹ſƃɥŜɥřɨŜƄƀ ƒšɨŜ•‡–ɏšŽƒ„‡Žſɐƒ†‹ƒŽ’‘•‹–‹‘‹ƒ‰‰Ž‘‡”ƒ–‡řɛUɛƃŞƄɐƀ ƒšɩŜ•‡–ɏšŽƒ„‡Žſɐƒ†‹ƒŽ’‘•‹–‹‘‹ƒ‰‰Ž‘‡”ƒ–‡řɛ UɛƃŞƄɐƀ ƒšɨŜŽ‡‰‡†ſŽ‘ ʰɫƀ ƒšɩŜŽ‡‰‡†ſŽ‘ ʰɩƀ οο End of time integration loop ɤ ʫʰɨ Download free eBooks at bookboon.com 118 (697) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Save simulation results in csv files ɤ ɤ•ƒ˜‡†ƒ–ƒƒ• •˜ˆ‹Ž‡• ™‹–Š‘’‡ſɑ”ƒ†‹ƒŽɥɨŜ •˜ɑřɑ™ɑƀƒ•‘ƒ‡ś ɤ•ƒ˜‡ ƒŽ —Žƒ–‡†’”‘ˆ‹Ž‡•ƒ– ‘ŽŽ‘ ƒ–‹‘’‘‹–• ˆ‘”‹–‹”ƒ‰‡ſɥřƀś ‘ƒ‡Ŝ™”‹–‡ſɑɎ–ʰřʩɭŜɪˆɎɑʩſWƃ‹–Ƅƀƀ ˆ‘”Œ‹”ƒ‰‡ſɥř ‘Ž’–ƀś ‘ƒ‡Ŝ™”‹–‡ſɑʩɭŜɪˆřʩɨɥŜɬ‡řʩɨɥŜɬ‡řʩɨɥŜɬ‡Ɏɑʩſš”ƃŒƄř”ɏƒ–ɏW ƃ‹–řŒƄřɏƒ–ɏWƃ‹–řŒƄř™ɏƒ–ɏWƃ‹–řŒƄƀƀ ™‹–Š‘’‡ſɑ”ƒ†‹ƒŽɥɩŜ •˜ɑřɑ™ɑƀƒ•‘ƒ‡ś ɤ‹–‡”’‘Žƒ–‡ƒ†•ƒ˜‡‹–‡”’‘Žƒ–‡†’”‘ˆ‹Ž‡• ˆ‘”‹–‹”ƒ‰‡ſɥřƀś ɤˆ‹†–Š‡•‘Ž—–‹‘ƒ–—†‹˜‹–‡”’‘Žƒ–‹‘’‘‹–• —†‹˜ʰɬɨ šɏ‹–ʰ’ŜŽ‹•’ƒ ‡ſɥŜɥřɨŜɥř—ʰ—†‹˜ƀ ›ɏ‹–ʰ’Ŝœ‡”‘•ſ—†‹˜ƀ ›”ɏ‹–ʰ’Ŝœ‡”‘•ſ—†‹˜ƀ ɤ ›ʰ’Ŝ‘‡•ſ–’–ƀ ›ƃɥś ‘Ž’–Ƅʰɏƒ–ɏWƃ‹–řɥś ‘Ž’–Ƅ ›”ʰ’Ŝ‘‡•ſ–’–ƀ ›”ƃɥś ‘Ž’–Ƅʰ”ɏƒ–ɏWƃ‹–řɥś ‘Ž’–Ƅ ɤ š‹–”’ʰ’Ŝœ‡”‘•ſ–’–ƀ ˆ‘”‹‹”ƒ‰‡ſ—†‹˜ƀś šššʰšɏ‹–ƃ‹ƄƋšɏ‹–ƃ‹Ƅ ƃš‹–’Ƅʰ‘ Ŝ‹–”’ſ–’–řšššřš”ř†‹ˆɨƀ  ˜‡ –‘”ɨʰš‹–’Ƌ› ˜‡ –‘”ɩʰš‹–’Ƌ›” ›ɏ‹–ƃ‹Ƅʰ˜‡ –‘”ɨŜ•—ſƀ ›”ɏ‹–ƃ‹Ƅʰ˜‡ –‘”ɩŜ•—ſƀ ‘ƒ‡Ŝ™”‹–‡ſɑɎ–ʰřʩɭŜɪˆɎɑʩſWƃ‹–Ƅƀƀ ˆ‘”Œ‹”ƒ‰‡ſɥř—†‹˜ƀś ‘ƒ‡Ŝ™”‹–‡ſɑʩɭŜɪˆřʩɨɥŜɬ‡řʩɨɥŜɬ‡Ɏɑʩſšɏ‹–ƃŒƄř›ɏ‹–ƃŒƄř›”ɏ‹–ƃŒƄƀƀ  ◊◊ Specify the right-hand sides of ODEs ɤʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰʰ ɤ †‡ˆˆˆſWřř’ƒ”ƒ•ƀś ɤ ɤ•’‡ ‹ˆ›•–‘•‘Ž˜‡ ɤ Download free eBooks at bookboon.com 119 (698) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Set the global area, allocate arrays and unpack parameters ɤ ɤ‰Ž‘„ƒŽƒ”‡ƒ ɤ ‰Ž‘„ƒŽ‰ƒ• ɤ ɤƒŽŽ‘ ƒ–‡ƒ””ƒ›•  ‘Ž’–ʰŽ‡ſƀ †–ʰ’Ŝœ‡”‘•ſ ‘Ž’–ƀ ʰ’Ŝœ‡”‘•ſſ ‘Ž’–ř ‘Ž’–ƀƀ ɤ ɤ—’ƒ ’ƒ”ƒ‡–‡”• Hƒ‰ɥř”ɥřř‡ˆˆɥřTɥř řɨʰ’ƒ”ƒ• Download free eBooks at bookboon.com 120 Click on the ad to read more (699) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Modify the main diagonal of matrix Dm ɤ‘†‹ˆ›ƒ‹†‹ƒ‰‘ƒŽ‘ˆƒ–”‹š ƃśřśƄʰɨƃśřśƄ ˆ‘”‹‹”ƒ‰‡ſ ‘Ž’–ƀś ””ʰƃ‹Ƅ ɤ ƒŽ —Žƒ–‡ś ɤ‘”ƒŽ‹œ‡†˜‘‹†ƒ‰‡ Hƒ‰ɏ‘”ʰ’Ŝ‡š’ſŞſɨŜŞHƒ‰ɥƀƋſſ””ƋƋɪƀŞɨŜƀŵHƒ‰ɥƀ ɤ•—”ˆƒ ‡ƒ”‡ƒ ɏ‘”ʰHƒ‰ɏ‘”Ƌ””ƋƋɩ ɤ˜‘‹†ƒ‰‡ Hƒ‰ʰHƒ‰ɏ‘”ƋHƒ‰ɥ ɤ‘”ƒŽ‹œ‡†‡ˆˆ‡ –‹˜‡†‹ˆˆ—•‹˜‹–› ‡ˆʰ‡ˆˆſHƒ‰ɥř”ɥřřHƒ‰ř””ƀŵ‡ˆˆɥ ɤ‘†‹ˆ›ƒ‹†‹ƒ‰‘ƒŽ ƃ‹ř‹Ƅʰƃ‹ř‹ƄŞſTɥƋƋɩƀƋɏ‘”ŵſɫŜƋ‡ˆƀ οο Solve the system of linear algebraic equations ɤ•‘Ž˜‡–Š‡•›•–‡‘ˆŽ‹‡ƒ”ƒŽ‰‡„”ƒ‹ ‡“—ƒ–‹‘• ‰ƒ•ƃɥś ‘Ž’–ƄʰɥŜ ‰ƒ•ʰ•‘Ž˜‡ſř ƀ οο Calculate the vector of derivatives of ODEs ɤ ɤ˜‡ –‘”‘ˆ†‡”‹˜ƒ–‹˜‡•‘ˆ• †–ʰ‰ƒ• ɤ ”‡–—”†– ◊◊ Calculate the effective diffusion coefficient οο The function g : ɤ †‡ˆ‡ˆˆſHɥř”ɥřřHř”•ƀś ɤ ɤ ƒŽ —Žƒ–‹‘‘ˆ‡ˆˆ‡ –‹˜‡†‹ˆˆ—•‹‘ ‘‡ˆˆ‹ ‹‡– ɤ ɤHŞ‹’—–śŽ‘ ƒŽ’‘”‘•‹–› ɤ”•Ş‹’—–ś”ƒ–‹‘”ŵ”ɥ ɤ‡Ş‘—–’—–ś‡ˆˆ‡ –‹˜‡†‹ˆˆ—•‹‘ ‘‡ˆˆ‹ ‹‡– Download free eBooks at bookboon.com 121 (700) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Define parameters ɤ ɤƒ”ƒ‡–‡”•ś ɤ”‡••—”‡ƃƒ–Ƅ ʰɨŜ ɤ‘Ž‡ —Žƒ”™‡‹‰Š–ƃ‰ŵ‘ŽƄ ɤŞŽŽɪŚŞ ɪŚŞɩ ɏʰɨɪɪŜɪɫŚɏʰɨɮŜɥɪŚɏʰɩɯŜɥɩ ɤ‡ƒ”†Ş ‘‡•’ƒ”ƒ‡–‡”•ś ɤ Šƒ”ƒ –‡”‹•–‹ ‡‡”‰›‘ˆ–Š‡Ş‹–‡”‘Ž‡ —Žƒ”’‘–‡–‹ƒŽ HʰɬɩɫŜɥŚHʰɬɬɯŜɪŚHʰɰɨŜɬ ɤ‘Ž‡ —Žƒ”†‹ƒ‡–‡” VʰɬŜɬŚVʰɩŜɰŚVʰɪŜɭɯɨ οο Then, we calculate the molecular diffusivity ɤ ɤ ƒŽ —Žƒ–‹‘‘ˆ‘Ž‡ —Žƒ”†‹ˆˆ—•‹‘ ‘‡ˆˆ‹ ‹‡–—•‹‰ ɤŠƒ’ƒŞ•‘‰–Š‡‘”›ƃɩŵ•Ƅ ɤ ɤ Šƒ”ƒ –‡”‹•–‹ ‡‡”‰›ſ–Š‡™‡ŽŽ†‡’–Šƀ‘ˆ–Š‡ ɤŞ‹–‡”‘Ž‡ —Žƒ”’‘–‡–‹ƒŽ Vʰ’Ŝ•“”–ſVƋVƀ ɤ–Š‡†‹•–ƒ ‡‘ˆ–Š‡ Ž‘•‡•–ƒ’’”‘ƒ Š„‡–™‡‡–™‘ ɤ‹–‡”ƒ –‹‰‘Ž‡ —Žƒ” VʰſVʫVƀŵɩŜɥ •ʰŵH ɤ ‘‡ˆŜ‹ƒ ‘ŽŽ‹•‹‘‹–‡‰”ƒŽƒ’’”‘š‹ƒ–‹‘ ʰɨŜɥɭɥɪɭŚʰɥŜɨɬɭɨɥŚʰɥŜɨɰɪɥɥŚʰɥŜɫɮɭɪɬ ʰɨŜɥɪɬɯɮŚ ʰɨŜɬɩɰɰɭŚ ʰɨŜɮɭɫɮɫŚ ʰɪŜɯɰɫɨɨ ɤ ‘ŽŽ‹•‹‘‹–‡‰”ƒŽ :ʰŵſ•ƋƋƀʫŵ’Ŝ‡š’ſƋ•ƀʫŵ’Ŝ‡š’ſ Ƌ•ƀʫ ŵ’Ŝ‡š’ſ Ƌ•ƀ ɤ‘Ž‡ —Žƒ”†‹ˆˆ—•‹˜‹–› ʰɨŜɯɬɯɪ‡ŞɮƋ’Ŝ•“”–ſƋƋɪƋſſɏʫɏƀŵſɏƋɏƀƀƀŵſƋſ VƋƋɩƀƋ:ƀ οο Calculate the Knudsen diffusivity ɤ ɤ ƒŽ —Žƒ–‹‘‘ˆ—†•‡†‹ˆˆ—•‹‘ ‘‡ˆˆ‹ ‹‡–ƃɩŵ•Ƅ ɤ ɤ‹‹–‹ƒŽ•—”ˆƒ ‡ƒ”‡ •ɥʰɪŜƋſɨŜŞHɥƀŵ”ɥ ɤ‹‹–‹ƒŽ’‘”‡•‹œ‡ƒɥƃ Ƅ ƒɥʰɩŜƋHɥƋɨɥɥŜŵ•ɥ ɤ‡ƒ”ƒ†‹—•‘ˆ ƒ’‹ŽŽƒ”› ƒ••ʰƒɥŵſ”•ƋƋɩƀ ɤ—†•‡†‹ˆˆ—•‹˜‹–› ʰɥŜɰɭɰɯɮƋƒ••Ƌ’Ŝ•“”–ſŵɏƀ Download free eBooks at bookboon.com 122 (701) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES οο Finally, we calculate the effective diffusivity ɤ ɤ‡ˆˆ‡ –‹˜‡†‹ˆˆ—•‹‘ ‘‡ˆˆ‹ ‹‡– ɤ ‡ʰſHƋƋɩƀƋſƋƀŵſʫƀ ɤ ”‡–—”‡ ◊◊ Define widgets ɤ ɤ’‡ ‹ˆ›™‹†‰‡–• Šɨʰ ſ˜ƒŽ—‡ʰɑʳŠɫʴʳ„ʴ‘Ş ƒ–ƒŽ›–‹ ‡ƒ –‹‘‹ƒ‰‰Ž‘‡”ƒ–‡‘ˆ ‹‡ƒ”–‹ Ž‡•ʳŵ„ʴɑř ‘Ž‘”ʰɑ„”‘™ɑƀ Šɩʰ ſ˜ƒŽ—‡ʰɑʳ„”ʴɑƀ Šɪʰƒ–‡šſ˜ƒŽ—‡ʰɑɛɛɎ„‘šƇ’‡ ‹ˆ›’ƒ”ƒ‡–‡”•śƈɛɛɑřƀ †‹•’Žƒ›ſŠɨƀ †‹•’Žƒ›ſŠɩƀ †‹•’Žƒ›ſŠɪƀ ɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɮɥɥřƒšʰɰɥɥř•–‡’ʰɩɬř˜ƒŽ—‡ʰɯɥɥř†‡• ”‹’–‹‘ʰɑ‡’‡”ƒ–—”‡řɛɛ ƃɛɋƇɎ ‹” ƈɛƄŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜŜɑƀ ƒ‰Žɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɬɥřƒšʰɩɥɥř•–‡’ʰɩɬř˜ƒŽ—‡ʰɨɥɥř†‡• ”‹’–‹‘ʰɑ‰‰Ž‘‡”ƒ–‡ ”ƒ†‹—•řɛɏƇƒ‰ŽƈɛƃɛɎ—ɛƄŜŜŜɑƀ Hƒ‰ɥɏ•Ž‹†‡”ʰ Ž‘ƒ–Ž‹†‡”ſ‹ʰɥŜɪřƒšʰɥŜɭř•–‡’ʰɥŜɥɬř˜ƒŽ—‡ʰɥŜɫř†‡• ”‹’–‹‘ʰ”ɑ‰‰Ž‘‡”ƒ– ‡˜‘‹†ƒ‰‡řɛɎ˜ƒ”‡’•‹Ž‘ɛƃŞƄŜŜŜŜŜŜŜŜŜŜŜɑƀ ™ʰ‹–‡”ƒ –ſˆƒ‹řʰɏ•Ž‹†‡”řƒ‰Žʰƒ‰Žɏ•Ž‹†‡”řHƒ‰ɥʰHƒ‰ɥɏ•Ž‹†‡”ƀ Challenge the way we run EXPERIENCE THE POWER OF FULL ENGAGEMENT… RUN FASTER RUN LONGER RUN EASIER… READ MORE & PRE-ORDER TODAY WWW.GAITEYE.COM 1349906_A6_4+0.indd 22-08-2014 12:56:57 Download free eBooks at bookboon.com 123 Click on the ad to read more (702) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES The screenshot of widgets to specify parameters and simulation results is shown in Fig 6.1 Figure 6.1: The widget to specify parameters for CVD reaction in agglomerate of fine particles 6.4 NUMERICAL RESULTS Here we consider the CVD reaction of aluminum trichloride with ammonia to deposit aluminum nitride on the surface of fine silicon nitride particles (Golman & Shinohara 1998) The simulation parameters are summarized in Table 6.1 Parameter Symbol Value Temperature 800oC Agglomerate size 5 100 mm Initial radius of primary particles U 0.375 mm Initial voidage H 0.45 Initial Thiele modulus I 2.0 Table 6.1: Simulation parameters Download free eBooks at bookboon.com 124 (703) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES Figure 6.2 illustrates the evolution of gas reactant and solid deposit concentration profiles in the agglomerate with reaction time These profiles were calculated using the AgglomerateCVD_time ipynb notebook As the reaction proceeds, the gaseous reactant gets more non-uniformly distributed in the radial direction of the agglomerate (Fig 6.2 (a)) The preferable growth of solid deposit (Fig 6.2 (b)) results in a significant decrease in its voidage (Fig 6.3 (a)) near the outer agglomerate surface at U  Thus, greater mass transfer limitations in the agglomerate prevent gaseous reactant to reach the area close to the center The internal surface area available for reaction also decreases with reaction time, yielding a decline of reaction rate (Fig 6.3 (b)) This should result in a more uniform distribution of solid product in the agglomerate However, the local surface area at the radial position near the agglomerate center is significantly larger than that close to the agglomerate surface The increasing diffusional resistance and non-uniformity of surface area distribution lead to the non-uniform solid distribution in the agglomerate with long reaction time in spite of decrease in reaction rate D(704)   E(705)   Figure 6.2: Evolution of (a) gas reactant and (b) solid deposit concentration profiles in the agglomerate with reaction time Download free eBooks at bookboon.com 125 (706) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES D(707)   E(708)  Figure 6.3: Radial profiles of (a) local normalized voidage and (b) local normalized surface area at various reaction times The effect of initial Thiele modulus on the gaseous reactant and solid product distributions is illustrated in Fig 6.4 These profiles were calculated using the AgglomerateCVD_thiele ipynb notebook At high Thiele moduli the reactant and solid deposit are distributed nonuniformly along the agglomerate radius as a result of high reaction rate or high diffusion resistance in the agglomerate This e-book is made with SETASIGN SetaPDF PDF components for PHP developers www.setasign.com Download free eBooks at bookboon.com 126 Click on the ad to read more (709) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I D(710)   NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES  E(711)  Figure 6.4: Effect of Thiele modulus on (a) gas reactant and (b) solid deposit concentration profiles in the agglomerate The influence of reaction temperature on the solid deposit profile shown in Fig 6.5 was calculated using the AgglomerateCVD_temperature.ipynb notebook Increasing the reaction temperature results in an enhancement of both reaction and diffusion rates However, the reaction rate increases significantly with reaction temperature according to the Arrhenius dependence by Eq (6.7), whereas the temperature dependence of diffusion rate is much weaker as the ordinary diffusion coefficient is proportional to  (Eq (1.1)) and the Knudsen diffusivity to   (Eq (1.5)) As a result, the solid product deposited at 900oC is non-uniformly distributed in the agglomerate, but the product deposited at 700oC is almost uniformly distributed Figure 6.5: Effect of reaction temperature on the solid deposit concentration profile, τ = 0.25 Download free eBooks at bookboon.com 127 (712) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES The concentration profiles of solid product in the agglomerates of various initial voidages are shown in Fig 6.6 These profiles were calculated using the AgglomerateCVD_voidage.ipynb notebook The solid product becomes uniformly distributed in the agglomerate of large initial voidage due to the low resistance to the transport of gaseous product in the agglomerate H  H  (713)  , by The diffusion coefficient is the strong function of dimensionless voidage, 'HII L Eq (6.16) Moreover, the high initial porosity agglomerate has the low initial surface area, as 6  ˜   H  (714)  U Thus, both the low reaction rate and the high diffusion rate contribute to the formation of uniformly distributed solid product in the loose agglomerate Figure 6.6: Influence of agglomerate initial voidage on solid deposit concentration profiles in the agglomerate, τ = 0.25 The effect of agglomerate size on the solid deposit profile is illustrated in Fig 6.7 The AgglomerateCVD_AgglSize.ipynb notebook was used to calculate the deposit profiles The radial profiles are steeper in the large size agglomerates due to the increasing diffusion resistance as the result of the longer diffusion path Download free eBooks at bookboon.com 128 (715) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES Figure 6.7: Effect of agglomerate size on solid deposit concentration profiles in the agglomerate, τ = 0.25 www.sylvania.com We not reinvent the wheel we reinvent light Fascinating lighting offers an infinite spectrum of possibilities: Innovative technologies and new markets provide both opportunities and challenges An environment in which your expertise is in high demand Enjoy the supportive working atmosphere within our global group and benefit from international career paths Implement sustainable ideas in close cooperation with other specialists and contribute to influencing our future Come and join us in reinventing light every day Light is OSRAM Download free eBooks at bookboon.com 129 Click on the ad to read more (716) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I  NON-CATALYTIC CHEMICAL REACTION IN AGGLOMERATE OF FINE PARTICLES The effects of initial size of primary particles on the solid deposit profiles is shown in Fig 6.8 These profiles were calculated using the AgglomerateCVD_ParticleSize.ipynb notebook The agglomerates made of large size primary particles have the small initial surface area and pores of large sizes by Eq (1.6) These will lead to the lower reaction rate and higher Knudsen diffusivity and, as a result, to the more uniform distribution of solid deposit Figure 6.8: Influence of initial size of primary particles on solid deposit concentration profiles in the agglomerate, τ = 0.25 Download free eBooks at bookboon.com 130 (717) Deloitte & Touche LLP and affiliated entities CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Summary SUMMARY In the previous chapters we mainly discussed chemical reactions and the heat and mass transport processes in the catalyst pellet The basic mathematical models and numerical or analytical methods to solve these model equations have been also introduced together with the computer programs used for simulating and plotting the concentration and temperature profiles in the pellets We also covered the first- and second-order catalytic, enzyme catalyzed and non-catalytic reactions in the isothermal and non-isothermal pellets in this textbook Readers are advised to refer to the books by Aris (1975) and Kafarow (1993) for further exploration of complex phenomena involving simultaneous coupled heat and mass transfer with chemical reaction in the pellet The pellet models comprise an essential part of the overall reactor models, which will be discussed in the Part II of this book series 360° thinking 360° thinking 360° thinking Discover the truth at www.deloitte.ca/careers © Deloitte & Touche LLP and affiliated entities Discover the truth at www.deloitte.ca/careers © Deloitte & Touche LLP and affiliated entities Discoverfree theeBooks truth atatbookboon.com www.deloitte.ca/careers Download Click on the ad to read more 131 Dis (718) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I References REFERENCES Aris, R 1975, The Mathematical Theory of Diffusion and Reaction in Permeable Catalysts Vol 1: The Theory of the Steady State, Clarendon Press, Oxford Beers, KJ 2007, Numerical Methods for Chemical Engineering, Cambridge University Press, Cambridge, pp 270–282 Bird, RB, Stewart,WE & Lightfoot, EN 2002, Transport Phenomena, 2nd edn J Wiley & Sons, New York Butt, JB 2000, Reaction Kinetics and Reactor Design, 2nd edn Marcel Dekker, New York Finlayson, BA 1980, Nonlinear Analysis in Chemical Engineering, McGraw-Hill, New York, pp 96–149 Fogler, HS 2008, Elements of Chemical Reaction Engineering, 4th edn., Pearson Prentice Hall, NJ, pp 813–842 Froment, GF, Bischoff, KB &De Wilde J 2011, Chemical Reactor Analysis and Design, 3rd edn., J Wiley Sons, New York, pp 172–231 Golman, B & Shinohara, K 2000, ‘Fine particle coating by chemical vapor deposition for functional materials’, Trends in Chemical Engineering, vol 6, pp 1–16 Golman, B & Shinohara, K 1998, ‘Modeling of CVD coating inside agglomerate of fine particles’, Journal of Chemical Engineering of Japan, vol 31, no 1, pp 103–110 Hunter, JD 2007, ‘Matplotlib: A 2D graphics environment’, Computing in Science and Engineering, vol 9, pp 90–95 Jeong, S, Lee, KS, Keel SIn, Yun JH, Kim YJ & Kim, SS 2015, ‘Mechanisms of direct and in-direct sulfation of limestone’, Fuel, vol 161, pp 1–11 Jones, E, Oliphant T, Peterson P, et al 2001 SciPy: Open Source Scientific Tools for Python, http://www.scipy.org/ [Online; accessed 2015-09-20] Download free eBooks at bookboon.com 132 (719) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I References Kafarow, WW 1993, Methoden zur Entwicklung von industriellen katalytischen Prozessen, VDI-Verlag, Düsseldorf Kandiyoti R 2009, Fundamentals of Reaction Engineering, Ventus Publishing ApS, 2009 Langtangen, HP 2012, A Primer on Scientific Programming with Python, 3rd edn., Springer, Heifelberg Perez, F & Granger, BE 2007, ‘IPython: a system for interactive scientific computing’, Computing in Science and Engineering, vol 9, pp 21–29 Shuler, ML & Kargi F 2002, Bioprocess Engineering Basic Concepts, Prentice Hall, NJ, pp 60–90 Reid, R, Prausnitz, J & Poling, B 1987, The Properties of Gases and Liquids, 4th edn., McGraw-Hill, New York Rice, RG & Do, DD 2012, Applied Mathematics and Modeling for Chemical Engineering, 2nd edn., John Wiley & Sons, New York, pp 172–173 Villadsen, J & Michelsen, ML 1978, Solution of Differential Equation Models by Polynomial Approximation, Prentice Hall, NJ Wakao, N & Smith, JM 1962, ‘Diffusion in catalyst pellet’, Chemical Engineering Science, vol 17, pp 825–834 Woodside, W & Messmer, JH 1961, ‘Thermal conductivity of porous media (parts I and II)’, Applied Physics, Vol 32, pp 1688–1707 Xu, Y & Yan, X-T 2010, ‘Chemical Vapor Infiltration’ in Chemical Vapour Deposition: An Integrated Engineering Design for Advanced Materials, Springer-Verlag, London, pp 165–214 Download free eBooks at bookboon.com 133 (720) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Appendix A1 Installing IPython APPENDIX A1 INSTALLING IPYTHON There are many different ways of installing IPython (Péreza & Granger 2007) We recommend installing the Anaconda distribution by Continuum Analytics This distribution contains a full Python set for scientific and engineering computation and data visualization including NumPy, Scipy (Jones et al 2001) and Matplotlib (Hunter 2007) Anaconda is an open source platform and it can be installed using a free and easy to use installer The installer is available at https://www.continuum.io/downloads The notebooks described in this book were created using Python 3.4 You might also want to install a pandoc package available at http://pandoc org This is a universal document converter and it is used by nbconvert tool (https://ipython org/ipython-doc/3/notebook/nbconvert.html) to convert IPython notebook to html, pdf, LATEX and other formats We can start Anaconda using a launcher for IPython Notebook (IPython (Py 3.4) Notebook) in the start menu on Windows computer This launcher will open a local web server and we will interact with IPython using a web browser, as shown in Fig A1.1 Figure A1.1: Illustration of IPython web based interface Download free eBooks at bookboon.com 134 (721) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Appendix A1 Installing IPython We can create a new file or open an existing one, as illustrated in Fig A1.2 The notebook files are located in the directory in which Anaconda was installed, i.e c:/users/boris We have created a folder named ‘book’ with subfolder ‘appendix’ in this directory and saved there a newly created notebook ‘Untitled ’ Figure A1.2: Creation of new IPython notebook We will turn your CV into an opportunity of a lifetime Do you like cars? Would you like to be a part of a successful brand? We will appreciate and reward both your enthusiasm and talent Send us your CV You will be surprised where it can take you Download free eBooks at bookboon.com 135 Send us your CV on www.employerforlife.com Click on the ad to read more (722) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Appendix A1 Installing IPython The IPython (jupyter) notebook files contain the program code, text and reach media output All of this information is stored in the cells There are different types of cells, as illustrated in Fig A1.3 The Code cell is used to type the Python code The Markdown cell is utilized to show the text information such as model explanation using the markdown language and LATEX code Figure A1.3: Illustration of different types of cells To run the code cell, we can click the run button, as shown in Fig A1.4 (a), or choose the proper item in a dropdown menu, as illustrated in Fig A1.4 (b)  D(723)    E(724)  Figure A1.4: Illustration of two ways to run the IPython cell: (a) using a button and (b) using a menu selection Download free eBooks at bookboon.com 136 (725) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Appendix A1 Installing IPython The results of simulation are shown in the output cell below the code cell, as displayed in Fig A1.5 Figure A1.5: Screenshot of IPython input and output cells I joined MITAS because I wanted real responsibili� I joined MITAS because I wanted real responsibili� Real work International Internationa al opportunities �ree wo work or placements Maersk.com/Mitas www.discovermitas.com �e G for Engine Ma Month 16 I was a construction Mo supervisor ina const I was the North Sea super advising and the No he helping foremen advis ssolve problems Real work he helping fo International Internationa al opportunities �ree wo work or placements ssolve pr Download free eBooks at bookboon.com 137 �e Graduate Programme for Engineers and Geoscientists Click on the ad to read more (726) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Appendix A2 Brief Overview of Python Language APPENDIX A2 BRIEF OVERVIEW OF PYTHON LANGUAGE The Python syntax is briefly summarized below • Indentation is used to indicate the block of statements • The line break specifies the statement termination Statements are usually one line long, but some statements could be located on the same line and separated by a semicolon • The comment starts from # symbol • The arithmetic operator ** indicates power • Decision making The syntax of condition statement is as follows: if <condition>: <then statements> else: <else statements> next statement The following condition logical operator are defined: < less than, > greater than, <= less than or equal, >= greater than or equal, == equal to, != not equal to • For loop For loop is used to repeat execution of a piece of code The syntax of loop statement is as follows: for <variable> in range (start, stop, step): <body of for loop> In the example below, the start value is equal to 1, the stop value is and the step is Download free eBooks at bookboon.com 138 (727) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Appendix A2 Brief Overview of Python Language If the start value is not defined, it is assumed to be zero If the step value is not given it is presumed to be one Therefore, the loop below will be executed times starting from i = • The vector can be created using the numpy array functions For example, a = np.zeros (n) is the statement to create a null vector a with n elements The following code creates the array a with elements and prints it out Download free eBooks at bookboon.com 139 (728) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Appendix A2 Brief Overview of Python Language Below we specify the two-dimensional array b of size  u  and print out all array elements We can use slicing to generate the desired view of the array The following statements slice the second column and the first row of two-dimensional array defined above Download free eBooks at bookboon.com 140 (729) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I Appendix A2 Brief Overview of Python Language • Function A function is a piece of code to perform a task The function is defined with a keyword def followed by the function name and the list of arguments in parenthesis The final statement is a return statement with the list of expressions in parenthesis We can initialize the function calculation by calling it For further information on Python language, the reader is advised to consult numerous online recourses and books such as a comprehensive book by Langtangen (2012) Download free eBooks at bookboon.com 141 Click on the ad to read more (730) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I APPENDIX A3 AUXILIARY PROGRAMS USED IN ORTHOGONAL COLLOCATION METHOD APPENDIX A3 AUXILIARY PROGRAMS USED IN ORTHOGONAL COLLOCATION METHOD The Jacobi polynomials of degree N can be written in the form of a power series as (Villadsen & Michelsen 1978; Rice & Do 2012) - D  E (731) [(732) ¦ (733) L   ˜ J L ˜ [L  (A3.1) where J L are the coefficients, and D and E are the characteristic parameters The coefficients J can be found using the orthogonality property as ³   [ E   [(734) D - MD  E (735) [(736) - D  E (737) [(738) G[  M     (A3.2) To obtain an explicit expression for - D  E (739) [(740) , the recursive computation of J L can be used as J L  L   L  D  E ˜ ˜ J L  (A3.3) L LE for L    starting from J   Equation (A3.3) can be rewritten as S1 [(741) [  J 1 D  E (742) (743) S1   K1 D  E (744) S1   (A3.4) where S1 is the rescaled polynomial defined as S1 - D  E (745) [(746) J 1 Download free eBooks at bookboon.com 142 (747) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I APPENDIX A3 AUXILIARY PROGRAMS USED IN ORTHOGONAL COLLOCATION METHOD Here, J E  D E  º ª D  E «  »  IRU !    ¬   D  E  (748)   ¼ J1 K K K1  D  (749) E  (750) D  E  (751)  D  E  (752)  (753)  D  (754)  E  (755)  D  E  (756) IRU1 ! Q   D  E  (757)   D  E  (758)    D  E  (759) An interpolation polynomial of degree passing through   points is defined using the Lagrange formula as  ¦ \ O [(760)  (A3.5) \ [(761) L L L  where \L is the value of \ at [L , and OL [(762) is the Lagrangian polynomial specified as ­ LI L z M (A3.6) ® ¯ LI L M OL [ M (763) The Lagrangian polynomial can be evaluated as S1  [(764) GS [(765) (A3.7) [  [L (766)  G[ OL [(767) The first and second derivatives of the interpolation polynomial are given at the interpolation point [L as G\ [L (768) G[ G  \1 [L (769) G[   ¦\ M  M GO M [L (770) G[  ¦\ M  M (A3.8) G O M [L (771) G[  (A3.9) Using the matrix notation, Eqs (A3.8) and (A3.9) can be written as \c $ ˜ \ (A3.10) \cc % ˜ \ (A3.11) Download free eBooks at bookboon.com 143 (772) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I APPENDIX A3 AUXILIARY PROGRAMS USED IN ORTHOGONAL COLLOCATION METHOD where the elements of matrices A and B are given as DL  M ­ GO M [L (773) ° ° G[ ® ° GO M [L (774) ° G[ ¯ EL  M ­ G O M [L (775) °  ° G[ ®  ° G O M [L (776)  ° ¯ G[  S1 (777)  [L (778)   S1 (779)  [L (780) DW M L (A3.12)  S1 (781)  [L (782)   DW M z L [L  [ M S1 (783)  [ M (784)  S1 (785)  [L (786)   S1 (787)  [L (788) DW M L (A3.13) §  · DL  M ¨ DL L  ¸  DW M z L ¨ [L  [ M ¸¹ ©  – [  [ (789) The first, second and third derivatives of the polynomial S1  [(790) using the following recurrence formulas M  M are evaluated S (791) [L  [ M (792) S (793) M [L (794) M  [L (795) (796) (A3.14) S (797) [L  [ M (798) S (799) M [L (800) M  [L (801)   S M  [L (802) (803) [L  [ M (804) S (805) S (806) M [L (807) M  [L (808)   S M  [L (809) with M   L   L      and S (810) [L (811)  S (812) [L (813)  S (814) [L (815)  no.1 Sw ed en nine years in a row STUDY AT A TOP RANKED INTERNATIONAL BUSINESS SCHOOL Reach your full potential at the Stockholm School of Economics, in one of the most innovative cities in the world The School is ranked by the Financial Times as the number one business school in the Nordic and Baltic countries Stockholm Visit us at www.hhs.se Download free eBooks at bookboon.com 144 Click on the ad to read more (816) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I APPENDIX A3 AUXILIARY PROGRAMS USED IN ORTHOGONAL COLLOCATION METHOD The listing of auxiliary programs used in orthogonal collocation method is shown below The programs were adopted from the FORTRAN programs given in Villadsen and Michelsen (1978) • Function dif is used to calculate the first, second and third derivatives of Lagrangian polynomial at interpolation points ‹’‘”–—’›ƒ•’ †‡ˆ†‹ˆſ–ř”‘‘–ƀś ɤ ɤƒŽ —Žƒ–‡ˆ‹”•–ř•‡ ‘†ƒ†–Š‹”††‡”‹˜ƒ–‹˜‡•‘ˆƒ‰”ƒ‰‹ƒ’‘Ž›‘‹ƒŽ ɤƒ–‹–‡”’‘Žƒ–‹‘’‘‹–• ɤ ɤ(817) ’—–ś ɤ–Ş–‘–ƒŽ—„‡”‘ˆ‹–‡”’‘Žƒ–‹‘’‘‹–• ɤ”‘‘–Şœ‡”‘•‘ˆ‘†‡’‘Ž›‘‹ƒŽſ–ƀ ɤ—–’—–ś ɤ†‹ˆɨވ‹”•–†‡”‹˜ƒ–‹˜‡ƒ–‹–‡”’‘Žƒ–‹‘’‘‹–•ſ–ƀ ɤ†‹ˆɩŞ•‡ ‘††‡”‹˜ƒ–‹˜‡ƒ–‹–‡”’‘Žƒ–‹‘’‘‹–•ſ–ƀ ɤ†‹ˆɪŞ–Š‹”††‡”‹˜ƒ–‹˜‡ƒ–‹–‡”’‘Žƒ–‹‘’‘‹–•ſ–ƀ ɤ †‹ˆɨʰ’Ŝ‘‡•ſ–ƀ †‹ˆɩʰ’Ŝœ‡”‘•ſ–ƀ †‹ˆɪʰ’Ŝœ‡”‘•ſ–ƀ ˆ‘”‹‹”ƒ‰‡ſ–ƀś šʰ”‘‘–ƃ‹Ƅ ˆ‘”Œ‹”ƒ‰‡ſ–ƀś ‹ˆŒŠʰ‹ś ›ʰšŞ”‘‘–ƃŒƄ †‹ˆɪƃ‹Ƅʰ›Ƌ†‹ˆɪƃ‹ƄʫɪŜɥƋ†‹ˆɩƃ‹Ƅ †‹ˆɩƃ‹Ƅʰ›Ƌ†‹ˆɩƃ‹ƄʫɩŜɥƋ†‹ˆɨƃ‹Ƅ †‹ˆɨƃ‹Ƅʰ›Ƌ†‹ˆɨƃ‹Ƅ ”‡–—”ƃ†‹ˆɨř†‹ˆɩř†‹ˆɪƄ Download free eBooks at bookboon.com 145 (818) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I APPENDIX A3 AUXILIARY PROGRAMS USED IN ORTHOGONAL COLLOCATION METHOD • Function colmatrix is utilized to calculate the matrices of first and second derivatives of interpolation polynomial †‡ˆ ‘Žƒ–”‹šſ–ř”‘‘–ř†‹ˆɨř†‹ˆɩř†‹ˆɪƀś ɤ ɤ‡–—’ƒ–”‹ ‡•‘ˆˆ‹”•–řƒřƒ†•‡ ‘†ř„ř†‡”‹˜ƒ–‹˜‡•‘ˆ‹–‡”’‘Žƒ–‹‘ ɤ’‘Ž›‘‹ƒŽ ɤ ɤ(819) ’—–ś ɤ–Ş–‘–ƒŽ—„‡”‘ˆ‹–‡”’‘Žƒ–‹‘’‘‹–• ɤ”‘‘–Şœ‡”‘•‘ˆ‘†‡’‘Ž›‘‹ƒŽſ–ƀ ɤ†‹ˆɨވ‹”•–†‡”‹˜ƒ–‹˜‡ƒ–‹–‡”’‘Žƒ–‹‘’‘‹–•ſ–ƀ ɤ†‹ˆɩŞ•‡ ‘††‡”‹˜ƒ–‹˜‡ƒ–‹–‡”’‘Žƒ–‹‘’‘‹–•ſ–ƀ ɤ†‹ˆɪŞ–Š‹”††‡”‹˜ƒ–‹˜‡ƒ–‹–‡”’‘Žƒ–‹‘’‘‹–•ſ–ƀ ɤ—–’—–ś ɤƒŞƒ–”‹š‘ˆˆ‹”•–†‡”‹˜ƒ–‹˜‡•‘ˆ‹–‡”’‘Žƒ–‹‘’‘Ž›‘‹ƒŽſ–Ƌ–ƀ ɤ„ޏƒ–”‹š‘ˆ•‡ ‘††‡”‹˜ƒ–‹˜‡•‘ˆ‹–‡”’‘Žƒ–‹‘’‘Ž›‘‹ƒŽſ–Ƌ–ƀ ɤ ƒʰ’Ŝœ‡”‘•ſſ–ř–ƀƀ „ʰ’Ŝœ‡”‘•ſſ–ř–ƀƀ ˜‡ –ɨʰ’Ŝœ‡”‘•ſ–ƀ ˜‡ –ɩʰ’Ŝœ‡”‘•ſ–ƀ ˆ‘”‹‹”ƒ‰‡ſ–ƀś ɤ ƒŽ —Žƒ–‡ˆ‹”•–†‡”‹˜ƒ–‹˜‡•ƒ–’‘‹–‹ ˜‡ –ɨƃś‹Ƅʰ†‹ˆɨƃ‹Ƅŵ†‹ˆɨƃś‹Ƅŵſ”‘‘–ƃ‹ƄŞ”‘‘–ƃś‹Ƅƀ ˜‡ –ɨƃ‹Ƅʰ†‹ˆɩƃ‹Ƅŵ†‹ˆɨƃ‹ƄŵɩŜɥ ˜‡ –ɨƃ‹ʫɨśƄʰ†‹ˆɨƃ‹Ƅŵ†‹ˆɨƃ‹ʫɨśƄŵſ”‘‘–ƃ‹ƄŞ”‘‘–ƃ‹ʫɨśƄƀ ɤ ƒŽ —Žƒ–‡•‡ ‘††‡”‹˜ƒ–‹˜‡•ƒ–’‘‹–‹ ˜‡ –ɩƃś‹Ƅʰſſ†‹ˆɨƃ‹Ƅŵ†‹ˆɨƃś‹Ƅŵſ”‘‘–ƃ‹ƄŞ”‘‘–ƃś‹ƄƀƀƋ ſ†‹ˆɩƃ‹Ƅŵ†‹ˆɨƃ‹ƄŞɩŜɥŵſ”‘‘–ƃ‹ƄŞ”‘‘–ƃś‹Ƅƀƀƀ ˜‡ –ɩƃ‹Ƅʰ†‹ˆɪƃ‹Ƅŵ†‹ˆɨƃ‹ƄŵɪŜɥ ˜‡ –ɩƃ‹ʫɨśƄʰſſ†‹ˆɨƃ‹Ƅŵ†‹ˆɨƃ‹ʫɨśƄŵſ”‘‘–ƃ‹ƄŞ”‘‘–ƃ‹ʫɨśƄƀƀƋ ſ†‹ˆɩƃ‹Ƅŵ†‹ˆɨƃ‹ƄŞɩŜɥŵſ”‘‘–ƃ‹ƄŞ”‘‘–ƃ‹ʫɨśƄƀƀƀ ƒƃ‹řśƄʰ˜‡ –ɨ „ƃ‹řśƄʰ˜‡ –ɩ ”‡–—”ƃƒř„Ƅ Download free eBooks at bookboon.com 146 (820) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I APPENDIX A3 AUXILIARY PROGRAMS USED IN ORTHOGONAL COLLOCATION METHOD • Function intrp is used to calculate the Lagrangian interpolation coefficients †‡ˆ‹–”’ſ–řšř”‘‘–ř†‹ˆɨƀś ɤ ɤƒŽ —Žƒ–‡ƒ‰”ƒ‰‹ƒ‹–‡”’‘Žƒ–‹‘ ‘‡ˆˆ‹ ‹‡–• ɤ ɤ(821) ’—–ś ɤ–Ş–‘–ƒŽ—„‡”‘ˆ‹–‡”’‘Žƒ–‹‘’‘‹–• ɤšŞƒ„ ‹••ƒ‘ˆ’‘‹–ƒ–™Š‹ Šˆ— –‹‘˜ƒŽ—‡‹•†‡•‹”‡† ɤ”‘‘–Şœ‡”‘•‘ˆ‘†‡’‘Ž›‘‹ƒŽſ–ƀ ɤ†‹ˆɨވ‹”•–†‡”‹˜ƒ–‹˜‡ƒ–‹–‡”’‘Žƒ–‹‘’‘‹–•ſ–ƀ ɤ—–’—–ś ɤš‹–’ŞŽƒ‰”ƒ‰‹ƒ‹–‡”’‘Žƒ–‹‘ ‘‡ˆˆ‹ ‹‡–•ſ–ƀ ɤ š‹–’ʰ’Ŝœ‡”‘•ſ–ƀ ɤ ’‘Žʰɨ ˆ‘”‹‹”ƒ‰‡ſɥř–ƀś ʰšŞ”‘‘–ƃ‹Ƅ ‹ˆſʰʰɥƀś š‹–’ƃ‹Ƅʰɨ ‡Ž•‡ś š‹–’ƃ‹Ƅʰɥ ’‘Žʰ’‘ŽƋ ‹ˆſ’‘Žʰʰɥƀś ”‡–—”ƃš‹–’Ƅ ˆ‘”‹‹”ƒ‰‡ſɥř–ƀś š‹–’ƃ‹Ƅʰ’‘Žŵ†‹ˆɨƃ‹ƄŵſšŞ”‘‘–ƃ‹Ƅƀ ”‡–—”ƃš‹–’Ƅ Download free eBooks at bookboon.com 147 Click on the ad to read more (822) CHEMICAL REACTION ENGINEERING WITH IPYTHON PART I APPENDIX A3 AUXILIARY PROGRAMS USED IN ORTHOGONAL COLLOCATION METHOD • Function radau is utilized to calculate the weights of Radau quadrature †‡ˆ”ƒ†ƒ—ſ–ř”‘‘–ř†‹ˆɨƀś ɤ ɤƒŽ —Žƒ–‡ƒ†ƒ—“—ƒ†”ƒ–—”‡™‡‹‰Š–• ɤſ‹ Ž—†‹‰šʰɨƀ ɤ ɤ(823) ’—–ś ɤ–Ş–‘–ƒŽ—„‡”‘ˆ‹–‡”’‘Žƒ–‹‘’‘‹–• ɤ”‘‘–Şœ‡”‘•‘ˆ‘†‡’‘Ž›‘‹ƒŽſ–ƀ ɤ†‹ˆɨވ‹”•–†‡”‹˜ƒ–‹˜‡ƒ–‹–‡”’‘Žƒ–‹‘’‘‹–•ſ–ƀ ɤ—–’—–ś ɤ˜‡ –ރ†ƒ—“—ƒ†”ƒ–—”‡™‡‹‰Š–•ſ–ƀ ɤ ˜‡ –ʰ’Ŝœ‡”‘•ſ–ƀ ˜‡ –ʰſɨŜɥŵ”‘‘–ƀŵſ†‹ˆɨƋƋɩƀ ˜‡ –ʰ˜‡ –ŵ˜‡ –Ŝ•—ſƀ ”‡–—”ƃ˜‡ –Ƅ Download free eBooks at bookboon.com 148 (824)

Ngày đăng: 15/01/2021, 16:23

Xem thêm:

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w