This distribution contains M-files for producing the figures in the second
edition, third printing of the textbook, "Chemical Reactor Analysis and Design
Fundamentals," by James B. Rawlings and John G. Ekerdt.  These files will work
in either Octave (www.octave.org) or Matlab (www.mathworks.com).

These M-files are distributed under the terms of the GNU General Public
License (GPL).  The complete text of the GPL is in the file COPYING.
The copyright on all of the M-files is held by James B. Rawlings and
John G. Ekerdt.

The code for each figure is in a separate directory. The names of the
directories are of the form fig_N_M and correspond to the figure
numbers in the text.  Within each directory, the main script to run is
called main.m.  The files have been tested with Octave 5.2.0 and
Matlab 9.5.0 (R2018b). 

You can view all of the figures at the website:
www.engineering.ucsb.edu/~jbraw/chemreacfun/figures.html


Running Examples
----------------

To run the examples, open Octave/Matlab, navigate to this folder, and run

   book_setup

This function will add the appropriate folder to Octave/Matlab's path, and it
will also check whether the package CasADi is installed (see below). After
running this script, you can navigate to the appropriate figure directory
and run main.m to produce the corresponding figure. Note that multiple figures
may be produced, and figure formatting may not be identical to the text, but
all of the data will be created.


CasADi
------

The code for some figures in chapter 9 require the use of CasADi
which is not part of Matlab or Octave.  If this toolbox is not
installed on your system, you can find it at casadi.org, with installation
instructions at

    https://github.com/casadi/casadi/wiki/InstallationInstructions

You should download the appropriate version of Casadi for your operating
system and Octave/Matlab preference. Note that CasADi must be version 3.4.3
or later.

If you do not wish to run any code from chapter 9, then you do not need to
install CasADi.
