7 Ideal Reactor Models
To complete common reaction engineering tasks, reactor models must be generated and the equations in them must be solved. Chapter 6 showed how to generate the reactor design equations for the four ideal reactor types. This very brief chapter describes the formulation of reactor models using the design equations.
7.1 Summarizing Reaction Engineering Assignments
It is good practice to summarize the assigment each time you begin one. In a book like this, assignments take the form of a few paragraphs that provide data and then assign tasks or ask questions. In practice, a reaction engineering assignment might be conveyed orally, and it might define one or more objectives, but leave it to the engineer to decide how to proceed and to find the necessary data.
For the purposes of this book, a good assignment summary will begin by defining the reactor system (type of reactor, whether it is isothermal, adiabatic, or uses heat exchange, and whether it operates transiently or at steady-state, if appropriate). Including a simple reactor schematic in the summary is also a good idea. Doing so allows an index to be assigned to each flow stream. Then variables that pertain to one particular flow stream can be subscripted with the flow stream’s index.
A good assignment summary will identify the quantities of interest, that is, the things that need to be calculated and/or plotted in order to accomplish the assigned task or answer the questions posed in the assignment. An appropriate variable symbol should be used to represent each quantity of interest, and, if necessary, appropriate notation should be used, e. g. to indicate a minimum value, the point of evaluation, etc.
The assignment should be read carefully, and each time a numeric value is encountered, an appropriate variable should be chosen to represent it, and the variables and it’s value should be added to a list of given and known constants. After doing this it may also be useful to add universal constants such as the ideal gas constant in appropriate units to the given and known quantities list if one knows the constant will be needed.
Occasionally an assignment does not specify any extensive quantities. In this situation one extensive quantity should be chosen as a basis for the calculations and listed as such in the summary. Also, in a later section of the book, assignments will involve the analysis of experimental data. For those assignments the assignment summary should list the adjusted experimental input variables and the experimentlly measured response variable.
Every example assignment in Reaction Engineering Basics will begin with an assignment summary. In the example it is then assumed that the given and known constants listed in the assignment summary are always available when needed at any point in the calculations. Similarly, when reactor models are detailed later in this chapter, it is assumed that all given and known constants provided in the assignment are available within the reactor model.
7.2 Analytical vs. Numerical Solution of the Reactor Design Equations
In some scenarios the reactor design equations can be solved analytically. Most of these scenarios involve isothermal reactor operation with one reaction taking place and with a rate expression that is fairly simple. In a few instances the design equations can be solved analytically for an adiabatic reactor or for a reactor wherein more than one reaction occurring.
Still, the scenarios where the reactor design equations can be solved analytically do not include many important, real-world situations that involve adiabatic operation, multiple reactions, complex rate expressions, non-isothermal operation involving heat exchange, and others. In all of these scenarios the reactor design equations can be solved numerically. Of course in the scenarios where analytical solution is possible, the reactor design equations can also be solved numerically. Therefore, in Reaction Engineering Basics the reactor design equations are always solved numerically, because that is always possible.
Chapter 6 showed that for ideal BSTRs, SBSTRs, CSTRs, and PFRs, the reactor models either will be a set of ATEs or a set of ODEs. Fortunately, there are many software packages that provide tools for numerical solution of the sets of equations that make up the reactor design equations. However, from the perspective of a book like this, that presents two challenges.
First, different readers of this book will want, or need, to use different software packages. If one software package is selected and used throughout, the book will be less useful to readers who do not use that software. At the same time, there are too many different software packages to try to show how to use all of them.
A second challenge that arises from the decision to always solve the reactor model equations numerically is one of focus. This book is about reaction engineering, not computer programming or numerical methods. Including extended discussions on the computational aspects of solving the reactor model equations might obfuscate the reaction engineering.
To address these challenges, in Reaction Engineering Basics, all discussion of how software equation solvers work and how they are used appears in Appendices J, K, L, and M. The presentation in those appendices is general and not specific any one software package. Fortunately, solvers for ATEs require essentially same inputs and return essentially the same results irrespective of the software package they are taken from. The same is true of IVODE solvers. It is mainly the programming language used, the details of how to access the equation solving software, how to provide the inputs to it, and how the results are returned from it that differ from one software package to the next. Appendices J, K, L, and M provide some basic understanding of how the software solves the equations, with sufficient information for readers to follow Reaction Engineering Basics example assignments and to implement solutions using the software they prefer. It is left to the reader to consult the documentation for the software they choose to learn the details for using it.
7.3 Formulation of Reactor Models
Having decided to always solve the reactor design equations numerically, it is reasonable to formulate reactor models to accomplish that task. The primary component of a reactor model is the reactor design equations for that specific reactor. The design equations may include mole balances, an energy balance on the reacting fluid, an energy balance on the heat exchange fluid, and, for PFRs, a momentum balance. Chapter 6 showed that not all of these types of equations are always needed, and it explained how to select which equations need to be included among the design equations for a given reactor system.
If the reactor to be modeled is a steady-state CSTR, the design equations will be a set of ATEs (see Appendix J). If it is a BSTR, transient CSTR, or steady-state PFR, the design equations will be a set of IVODEs (see Appendix K) or a set of MVODEs (see Appendix L). The formulation of the reactor model in each of these three situations is similar, as can be seen by comparing the following sub-sections..
7.3.1 Formulation of a Reactor Model with ATE Design Equations
The first component of the reactor model in this case is the set of ATEs that make up the reactor design equations. If there are \(N\) ATEs, they they can be solved to find \(N\) ATE unknowns. The second component of the reactor model is an initial guess for the ATE unknowns, and the third component is a residuals function. Both of these components must be provided to the ATE solver that is used to solve the design equations.
The response function is described in Appendix J. The reactor model should indiate the arguments that will be passed to it (guesses for the ATE unknowns), an additional input that needs to be provided to it, the quantities it will return (residuals corresponding to each of the ATE design equations), and the sequence of calculations that it must perform to evaluate the residuals assuming the given and known constants, arguments, and additional input are available. Typically that sequence, i. e. the algorithm for the residuals function will first calculate any other unknowns appearing in the ATE design equations, and then evaluate the residuals.
If the any additional input is needed to solve the design equations, the reactor model should identified that necessary input. The final component of the reactor model should be a listing of the sequence of function calls and calculations necessary to solve the design equations for the ATE unknowns.
7.3.2 Formulation of a Reactor Model with IVODE Design Equations
When the reactor design equations are a set of IVODEs, those IVODEs are the fist component of the reactor model. Numerical solution of a set of IVODEs requires (a) initial values, (b) a stopping criterion, and (c) a derivatives function, so those are tne next components of the reactor model. It is convenient to include the initial values and stopping criterion as a table wherein the first column lists the independent and dependent variables, the second column lists their initial values (either as numbers , variables, or expressions), and the third column gives the final value of either the independent variable or one of the dependent variables.
The derivatives function is described in Appendix K. The reactor model should list the arguments passed to it (the independent and dependent variables), any additional input that needs to be provided to it, the quantities it returns (the derivatives of each dependent variable with respect to the independent variable), and the sequence of calculations that it must perform to evaluate the derivatives assuming the given and known constants, arguments, and additional input are available. Typically that algorithm begins with the calculation of any unknown quantities appearing in the design equations, after which the derivatives are evaluated.
If the any additional input is needed to solve the design equations, the reactor model should identified that necessary input. The final component of the reactor model should be a listing of the sequence of function calls and calculations necessary to solve the design equations for corresponding sets of values of the independent and dependent variables that span the range from thier initial values to the point where the stopping criterion was satisfied.
7.3.3 Formulation of a Reactor Model with MVODE Design Equations
When the design equations are MVODEs, the reactor model includes the design equations, initial values and a stopping criterion, other required input, and a derivatives function. These components are the same as for a model with IVODE design equations. However, when the design equations are MVODEs, additional components appear in the reactor mode.
First, the model should identify the missing values. As explained in Appendix L, one or more constants that are needed to solve the design equations are not known and cannot be calculated directly. Specifically, the missing values are either constants that appear in the design equations or initial values. If there are \(N\) missing values, then the reactor model should include \(N\) missing value ATEs, and it should include initial guesses for the missing values. The missing value ATEs are implicit equations for the missing values that are written using “extre” dependent variable final values (see Appendix L).
The model should also include a missing value residuals function. Just like the residuals function in a steady-state CSTR model, the arguments, return values, additional input and algorithm for the missing values residuals function should be specified. There is an important difference in the missing values residuals function algorithm, however. It should begin by making the missing values available to the derivatives function, setting the initial values and stopping criterion for the ODEs, and using an IVODE solver to solve the ODEs. Then it should use the results to evaluate the missing values residuals.
As with the other reactor models, the final component should be a listing of the sequence of function calls and calculations necessary to solve the design equations for the missing unknowns and corresponding sets of values of the independent and dependent variables that span the range from thier initial values to the point where the stopping criterion was satisfied. To do this it should set an initial guess for the missing values, solve the missing values ATEs using an ATE solver, then use the results to solve the ODEs.
7.4 Completing Reaction Engineering Assignments
Very often, solving the reactor design equations does not yield one or more of the quantities of interest. Thus, the example reaction engineering assignments in the next several chapters have four of the following five sections.
- Assignment Summary
- Reactor Model
- Calculation of Quantities of Interest
- Numerical Implementation of the Calculations (not included in *Reaction Engineering Basics example assignments)
- Results and Discussion
The assignment summary and the reactor model have already been discussed. The section on calculation of quantities of interest simply presesnts the sequence of calculations necessary to find the quantities of interest using the given and known constants and the results from solving the reactor model. The next section of a report on the completion of an assignment would typically describe how a mathematics package and its functions were used to perform the calculations. This section does not appear in Reaction Engineering Basics because different readers are likely to use different software packages. Instead, in Reaction Engineering Basics the results and discussion simply begins by stating that the calculations were performed as described in the previous sections. It then presents the results and discusses them.
7.5 Symbol Used in Chapter 7
Symbol | Meaning |
---|---|
\(N\) | Number of ATEs or number of missing values. |