Numerical Techniques for Chemical

Numerical Techniques for Chemical

(Parte 1 de 6)

Numerical Techniques for Chemical and

Biological Engineers


Numerical Techniques for Chemical and

Biological Engineers


A Simple

Bifurcation Approach

Said Elnashaie

Frank Uhlig with the assistance of Chadia Affane

MATLAB® is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does notwarrant the accuracy of the text or exercises in this book. This book’s use or discussion of MATLAB® software or related products does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular use of the MATLAB® software.

Library of Congress Control Number: 2006930111

ISBN-10: 0-387-34433-0 ISBN-13: 978-0-387-34433-1

© 2007 Springer Science+Business Media, LLC All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (Springer Science+Business Media, LLC, 233 Spring Street, New York, NY 10013, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use in this publication of trade names, trademarks, service marks and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.


Professor Said

S.E.H. Elnashaie

Pennsylvania State University at Harrisburg

Room TL 176 Capital College 7 W. Harrisburg Pike Middletown, PA 17057-4898

Professor Frank Uhlig Department of Mathematics and Statistics

Auburn University 312 Parker Hall Auburn, AL 36849

Chadia Affane Department of Mathematics and Statistics

Auburn University Auburn, AL 36849

Born 1947, Cairo/Egypt; grew up in Egypt; married, two children, three grandchildren.

Chemical Engineering student at Cairo University, University of

Waterloo, and University of Edinburgh.

B. S., Cairo University, 1968; M.S., U of Waterloo, Canada, 1970; Ph.D., U Edinburgh, UK, 1973. Postdoc, University of Toronto and McGill U, 1973 – 1974. Professor, Cairo University, 1974 – 1992; King Saud University, Saudi

Arabia, 1986 – 1996; University of British Columbia, Canada, 1990; University Putra Malaysia, 1996/97; King Fahad University, Saudi Arabia, 1999; Auburn University, 1999 – 2005; Visiting Professor, U British Columbia, Vancouver, 2004; U British Columbia, Vancouver, 2005 –

Vice President, Environmental Energy Systems and Services (ES),

Research Areas: Modeling, Simulation and Optimization of Chemical and Biological Processes, Clean Fuels (Hydrogen, Biodiesel and Ethanol), Fixed and Fluidized Bed Catalytic Reactors, Nonlinear Dynamics, Bifurcation and Chaos, Clean Technology, Utilization of Renewable Materials, Sustainable Engineering. 300+ papers, 3+ books.

Born 1945, Magdesprung, Germany; grew up in Mulheim/Ruhr,

Germany; married, two sons.

Mathematics student at University of Cologne, California Institute of Technology.

Ph.D. CalTech 1972; Assistant, University of Wurzburg, RWTH

Two Habilitations (Mathematics), University of Wurzburg 1977,

RWTH Aachen 1978.

Visiting Professor, Oregon State University 1979/1980; Professor of Mathematics, Auburn University 1982 – Two Fulbright Grants; (Co-)organizer of eight research conferences. Research Areas: Linear Algebra, Matrix Theory, Numerical Analysis,

Numerical Algebra, Geometry, Krein Spaces, Graph Theory, Mechanics, Inverse Problems, Mathematical Education, Applied Mathematics, Geometric Computing. 50+ papers, 3+ books.

Born 1968, Fes/Morocco; grew up in Morocco; married, two children.

Engineering student at Ecole Superieure de Technologie, E.S.T.,

Chemical engineering student at Texas A&M University, 1997 – 1999;

B.S. Texas A&M University, 1999.

MS in Applied Mathematics, Auburn University, 2003. Ph. D. student, Mathematics, Auburn University, 2004 – Research Areas: Numerical Analysis, Applied Mathematics.


This book has come about by chance.

The first author, Said Elnashaie, and his wife, Shadia Elshishini, moved next door to the second author, Frank Uhlig, and his family in 2000. The two families became good neighbors and friends. Their chats covered the usual topics and occasionally included random teaching, departmental, and university matters. One summer day in 2003, Said showed Frank a numerical engineering book that he had been asked to review. Neither of them liked what they saw. Frank eventually brought over his “Numerical Algorithms” book and Said liked it. Then Said brought over his latest Modeling book and Frank liked it, too. And almost immediately this Numerical Chemical and Biological Engineering book project started to take shape.

Said had always felt more mathematically inclined in his work on modeling problems and bifurcation and chaos in chemical/biological engineering; Frank had lately turned more numerical in his perception and efforts as a mathematician.

This book is the outcome of Said’s move to Auburn University and his chance moving in next door to Frank. It was born by a wonderful coincidence!

Said and Frank’s long evening walks through Cary Woods contributed considerably towards most of the new ideas and the educational approach in this book. We have both learned much about numerics, chemical/biological engineering, book writing, and thinking in our effort to present undergraduates with state of the art chemical/biological engineering models and state of the art numerics for modern chemical/biological engineering problems.

Chadia is a chemical engineer who has turned towards applied mathematics in her graduate studies at Auburn University and has helped us bridge the gap between our individual perspectives.

The result is an interdisciplinary, totally modern book, in contents, treatment, and spirit. We hope that the readers and students will enjoy the book and benefit from it.

For help with our computers and computer software issues we are indebted to A. J., to Saad, and to Darrell.

Auburn and Vancouver, 2006 vii


How to Use this Book5

Introduction 1

1.1 MATLAB Software and Programming12
1.1.1 The Basics of MATLAB12
1.2 Numerical Methods and MATLAB Techniques19
1.2.1 Solving Scalar Equations20
1.2.2 Differential Equations; the Basic Reduction to First Order Systems34
1.2.3 Solving Initial Value Problems37
1.2.4 Solving Boundary Value Problems42
1.2.5 MATLAB m and Other Files and Built-in MATLAB Functions43

1 Computations and MATLAB 1

2.1 System Theory and its Applications5
2.1.1 Systems5
2.1.2 Steady State, Unsteady State, and Thermodynamic Equilibrium57
2.2 Basic Principles for Modeling Chemical and Biological Engineering Systems58
2.3 Classification of Chemical and Biological Engineering Systems59
2.4 Physico-Chemical Sources of Nonlinearity61
2.5 Sources of Multiplicity and Bifurcation65

2 Modeling, Simulation, and Design 5

3.1 Continuous Stirred Tank Reactor: The Adiabatic Case69
3.2 Continuous Stirred Tank Reactor: The Nonadiabatic Case92
3.3 A Biochemical Enzyme Reactor115
3.4 Scalar Static Equations118

3 Some Models with Scalar Equations 69 3.4.1 Simple Examples of Reactions with No Possible Multiple Steady States . 119 3.4.2 Solving Some Static Transcendental and Algebraic Equations from the

Chemical and Biological Engineering Fields121
Problems for Chapter 3130
4.1 A Nonisothermal Distributed System135
4.1.1 Vapor-Phase Cracking of Acetone138
4.1.2 Prelude to the Solution of the Problem138
4.1.3 Material Balance Design Equation in Terms of Volume139
4.1.4 Heat Balance Design Equation in Terms of Volume141
4.1.5 Numerical Solution of the Resulting Initial Value Problem142
4.2 Anaerobic Digester155
4.2.1 Process Description and Rate Equations155
4.2.2 Mathematical Modeling for a Continuous Anaerobic Digester156
4.2.3 Solution of the Steady-State Equations157
4.2.4 Steady-State Volume in terms of the Feed Rate157
4.2.5 Steady-State Conversion in Terms of the Feed Concentration159
4.3 Heterogeneous Fluidized Bed Catalytic Reactors169
4.3.1 Mathematical Modeling and Simulation of Fluidized Beds169
4.3.2 Analytical Manipulation of the Joint Integrodifferential Equations174
4.3.4 Dynamic Models and Chemisorption Mechanisms177
4.3.5 Fluidized Bed Catalytic Reactor with Consecutive Reactions181

4 Initial Value Problems 135 4.2.6 The Unsteady-State Behavior of the Digester and the Solution of the IVP 165 4.3.3 Bifurcation and Dynamic Behavior of Fluidized Bed Catalytic Reactors . 177 4.3.6 Numerical Treatment of the Steady-State and Dynamical Cases of the

Bubbling Fluidized Bed Catalytic Reactor with Consecutive Reactions184
4.4 A Biomedical Example: The Neurocycle Enzyme System2
4.4.1 Fundamentals223
4.4.3 Dynamic Model Development225
4.4.4 Normalized Form of the Model Equations229
4.4.5 Identification of Parameter Values231
4.4.6 Numerical Considerations232
Problems for Chapter 4250

4.4.2 The Simplified Diffusion-Reaction Two Enzymes/Two Compartments Model223

5.1 The Axial Dispersion Model255
5.1.1 Formulation of the Axial Dispersion Model257

5 Boundary Value Problems 255 5.1.2 Example of an Axial Dispersion Model. Linear and Non-linear Two-point

Boundary Value Problems (BVPs)262
The Linear Case262
Analytic Solution of the Linear Case265
5.1.3 Numerical Solution of Nonlinear BVPs. The Non-Isothermal Case277
5.2 The Porous Catalyst Pellet BVP298
5.2.1 Diffusion and Reaction in a Porous Structure298
5.2.2 Numerical Solution for the Catalytic Pellet BVP303
The Heat Balance Model304
The Mass and Heat Balance Model314
Problems for Chapter 5324
6.1 Heterogeneous Systems327
6.1.1 Material Balance and Design Equations for Heterogeneous Systems328
Generalized Mass Balance and Design Equations328
Overall Heat Balance and Design Equations3
Two Phase Systems335
The Co- and Countercurrent Cases337
The Equilibrium Case338
Stage Efficiency339
Generalized Mass Balance for Two Phase Systems339
6.1.2 Steady State Models for Isothermal Heterogeneous Lumped Systems340
Multiple Reactions in Two Phase Systems346
6.1.4 Nonisothermal Heterogeneous Systems348
Lumped Systems348
Heterogeneous Lumped Systems349
Distributed Systems351
6.2 Nonreacting Multistage Isothermal Systems353

6 Heterogeneous and Multistage Systems 327 6.1.3 Steady State Models for Isothermal Heterogeneous Distributed Systems . 344 6.2.1 Absorption Columns or High Dimensional Lumped, Steady State and

Equilibrium Stages Systems353
The Case of a Linear Equilibrium Relation354
Multistage Absorption361
6.2.2 Nonequilibrium Multistages with Nonlinear Equilibrium Relations373
6.3 Isothermal Packed Bed Absorption Towers382
6.3.1 Model Development383
6.3.2 Manipulation of the Model Equations384
6.4 The Nonisothermal Case: a Battery of CSTRs399
6.4.1 Model Development399
6.4.2 Numerical Solutions402
6.4.3 The Steady State Equations419

6.3.3 Discussion and Results for both the Simulation and the Design Problem . 384 xi

Problems for Chapter 6422
7.1 A Simple Illustrative Example426
7.1.1 Mass Balance for the Reactor427
7.1.2 Heat Balance for the Reactor428
7.1.3 Reactor Model Summary429

7 Industrial Problems 425 7.1.4 The Catalyst Pellet Design Equations and the Computation of the Effec-

tiveness Factor η430
7.1.5 Pellet Model Summary431
7.1.6 Manipulation and Reduction of the Equations432
7.2 Industrial Fluid Catalytic Cracking FCC Units436
7.2.1 Model Development for Industrial FCC Units437
7.2.2 Static Bifurcation in Industrial FCC Units442
The Steady State Model443
Solution of the Steady State Equations445
Steady State Simulation Results for an Industrial Scale FCC Unit446

7.2.3 Industrial Verification of the Steady State Model and Static Bifurcation

of Industrial Units451
Simulation Procedure; Verification and Cross Verification453
The Dynamic Model459

Simulation and Bifurcation Results; Discussion for two Industrial FCC Units453 7.2.4 Preliminary Dynamic Modeling and Characteristics of Industrial FCC Units459 Results for the Dynamic Behavior of FCC Units and their Relation to the

Static Bifurcation Characteristics461

7.2.5 Combined Static and Dynamic Bifurcation Behavior of Industrial FCC

The Dynamic Model470
7.3 The UNIPOL Process for Polyethylene and Polypropylene Production473
7.3.1 A Dynamic Mathematical Model475
General Assumptions475
Hydrodynamic Relations476
The Model Equations478
7.3.2 Numerical Treatment482
7.4 Industrial Steam Reformers and Methanators484
7.4.1 Rate Expressions484
7.4.2 Model Development for Steam Reformers488
7.4.3 Modeling of Side-Fired Furnaces490
7.4.4 Model for a Top-Fired Furnace491
7.4.5 Modeling of Methanators491

7.4.6 Dusty Gas Model for Catalyst Pellets in Steam Reformers and Methanators492 xii

7.4.8 Some Computed Simulation Results for Steam Reformers494
7.4.9 Simulation Results for Methanators498
7.5 Production of Styrene502
7.5.1 The Pseudohomogeneous Model503
The Rate Equations503
Model Equations506
Numerical Solution of the Model Equations508

7.4.7 Numerical Considerations ... ........ ....... ........ . 493 Simulation of an Industrial Reactor Using the Pseudohomogeneous Model 508 7.5.2 Simulation of Industrial Units Using the more Rigorous Heterogeneous

The Catalyst Pellet Equations509
Model Equations of the Reactor511
Extracting Intrinsic Rate Constants512
7.6 Production of Bioethanol515
7.6.1 Model Development515
7.6.2 Discussion of the Model and Numerical Solution519
7.6.3 Graphical Presentation520
Problems for Chapter 7531
(A) Basic Notions of Linear Algebra535
(B) Row Reduction and Systems of Linear Equations537
(C) Subspaces, Linear (In)dependence, Matrix Inverse and Bases538
(D) Basis Change and Matrix Similarity539
(E) Eigenvalues and Eigenvectors, Diagonalizable Matrices541
(F) Orthonormal Bases, Normal Matrices and the Schur Normal Form542
(G) The Singular Value Decomposition and Least Squares Problems543
(H) Linear Differential Equations544

Appendix 1: Linear Algebra and Matrices 533

Appendix 2:

1. Sources of Multiplicity549
1.1 Isothermal or Concentration Multiplicity549
1.2 Thermal Multiplicity550
1.3 Multiplicity due to Reactor Configuration551
2. Simple Quantitative Explanation of the Multiplicity Phenomenon551
3. Bifurcation and Stability553
3.1 Steady State Analysis553
3.2 Dynamic Analysis559
3.3 Chaotic Behavior564

Bifurcation, Instability, and Chaos in Chemical and Biological Systems 547 xiii

Appendix 3: Contents of the CD and How to Use it 571 Resources 573 Epilogue 579 Index 581 List of Photographs 590 xiv

The question mark The question mark


This book is interdisciplinary, involving two relatively new fields of human endeavor. The two fields are: Chemical/Biological1 Engineering and Numerical Mathematics.

How do these two disciplines meet? They meet through mathematical modeling.

Mathematical modeling is the science or art of transforming any macro-scale or microscale problem to mathematical equations. Mathematical modeling of chemical and biological systems and processes is based on chemistry, biochemistry, microbiology, mass diffusion, heat transfer, chemical, biochemical and biomedical catalytic or biocatalytic reactions, as well as noncatalytic reactions, material and energy balances, etc.

As soon as the chemical and biological processes are turned into equations, these equations must be solved efficiently in order to have practical value. Equations are usually solved numerically with the help of computers and suitable software.

Almost all problems faced by chemical and biological engineers are nonlinear. Most if not all of the models have no known closed form solutions. Thus the model equations generally require numerical techniques to solve them. One central task of chemical/biological engineers is to identify the chemical/biological processes that take place within the boundaries of a system and to put them intelligently into the form of equations by utilizing justifiable assumptions and physico-chemical and biological laws. The best and most modern classification of different processes is through system theory. The models can be formed of steady-state design equations used in the design (mainly sizing and optimization), or unsteady-state (dynamic) equations used in start-up, shutdown, and the design of control systems. Dynamic equations are also useful to investigate the bifurcation and stability characteristics of the processes.

The complexity of the mathematical model depends upon the degree of accuracy required and on the complexity of the interaction between the different processes taking place within the boundaries of the system and on the interaction between the system and its surrounding. It is an important art for chemical/biological engineers to reach an optimal degree of sophistication (complexity) for the system model. By “optimal degree of sophistication” we mean finding a model for the process, which is as simple as possible without sacrificing the required accuracy as dictated by the specific practical application

1Biological engineering comprises both biochemical and biomedical engineering

2 Introduction of the model.

After the chemical/biological engineer has developed a suitable mathematical model with an optimal degree of “sophistication” for the process, he/she is then faced with the problem of solving its equations numerically. This is where stable and efficient numerical methods become essential.

The classification of numerical solution techniques lends itself excellently to the system theory classification as well. A large number of chemical/biological processes will be presented, modeled, and effi- cient numerical techniques will be developed and programmed using MATLAB R 2.T his is a sophisticated numerical software package. MATLAB is powerful numerically through its built-in functions and it allows us to easily develop and evaluate complicated numerical codes that fulfil very specialized tasks. Our solution techniques wil be developed and discussed from both the chemical/biological point of view and the numerical point of view.

Hence the flow of each chapter of this book will lead from a description of specific chemical/biological processes and systems to the identification of the main state variables and processes occurring within the boundaries of the system, as well as the interaction between the system and its surrounding environment. The necessary system processes and interactions are then expressed mathematically in terms of state variables and parameters in the form of equations. These equations may most simply be algebraic or transcendental, or they may involve functional, differential, or matrix equations in finitely many variables.

The mathematical model specifies a set of equations that reflects the characteristics and behavior of the underlying chemical/biological system. The parameters of the model can be obtained from data in the literature or through well-designed experimentation. Any model solution should be checked first against known experimental and industrial data before relying on its numerical solution for new data. To use a model in the design and control of a system generally requires efficient solution methods for the model equations.

Some of the models are very simple and easy to solve, even by hand, but most require medium to high-powered numerical techniques.

From chapter to chapter, we introduce increasingly more complex chemical/biological processes and describe methods and develop MATLAB codes for their numerical solution. The problem of validating a solution and comparing between different algorithms can be tackled by testing different numerical techniques on the same problem and verifying and comparing their output against known experimental and industrial data.

In this interdisciplinary text we assume that the reader has a basic knowledge of the laws governing the rates of different chemical, biological and physical processes, as well as of material and energy balances. Junior and senior undergraduates majoring in chemical/biological engineering and graduate students in these areas should be able to follow the engineering related portions of the text, as well as its notations and scientific deductions easily. Regarding mathematics, students should be familiar with calculus, linear algebra and matrices, as well as differential equations, all on the first and second

2MATLAB is a registered trade mark of The MathWorks, Inc., 3 Apple Hill Drive, Natick, MA 01760; .

Introduction 3 year elementary undergraduate level. Having had a one semester course in numerical analysis is not required, but will definitely be helpful. We include an appendix on linear algebra and matrices at the end of the book since linear lgebra is often not required in chemical/biological engineering curricula.

In order to solve chemical/biological problems of differing levels we rely throughout on well tested numerical procedures for which we include MATLAB codes and test files. Moreover, a large part of this book is dedicated to explain the workings of our algorithms on an intuitive level and thereby we give a valuable introduction to the world of scientific computation and numerical analysis.

(Parte 1 de 6)