# Book Reviews

Pages: pp. 85-87

## A System Dynamics Approach to Teaching Computational Science

R. Torsten Clay

A.B. Shiflet and G.W. Shiflet, Introduction to Computational Science: Modeling and Simulation for the Sciences, Princeton Univ. Press, 2006, ISBN: 978-0691125657, 554 pages.

Figure

One paradigm for studying complex physical systems is the system dynamics approach. We can define a system as virtually anything, from a mass oscillating on a spring to the complex interactions in the Earth's climate. Variables and objects within the system interact with one another often in the form of feedback loops. To understand the system, we must be able to generate a model containing variables, simplifying assumptions, and possibly submodels, solve it numerically, and visualize the results graphically.

Introduction to Computational Science: Modeling and Simulation for the Sciences by Angela B. Shiflet and George W. Shiflet introduces beginning undergraduate-level students to computational science in as nontechnical a way as possible, principally in the system dynamics mode of thinking. The material is presented in a tutorial style, with a series of problems drawn from biology, physics, and other sciences, to guide students through their solutions using computers. Each tutorial starts with a concise (and generally entertaining) introduction to the subject. The application areas covered vary widely, with a slightly larger emphasis on biological applications such as constrained growth, drug dosage, one-dimensional motion with friction, pendulums, disease epidemics, the carbon cycle, and mushroom fairy rings.

The text presumes that students don't need a computer programming background or an advanced knowledge of calculus.

## System Dynamics Diagrams

Many of the system dynamics models the text presents are systems of ordinary differential equations. However, rather than focusing on mathematics, the text uses a graphical approach to setting up models. In a model's system dynamics diagram, variables are represented by boxes, and arrows and symbols indicate connections and the variables' rates of change. Figure 1, for example, shows a typical model diagram for a ball falling under the influence of air drag.

Figure 1   Vensim model for a ball falling under the influence of air drag. (a) The variables describing the motion (the ball's position and velocity) are in rectangular boxes. Rates of change (derivatives) of these variables are represented by double-line arrows. Arrows describe interconnections between the model's various variables and parameters. (b) Velocity output illustrating terminal velocity.

The text devotes the first six chapters, or modules, to solving physical systems in the system dynamics paradigm and supports three related packages (Stella, Berkeley Madonna, and Vensim). Using one of these tools, students can graphically set up their models, which lets them go from zero experience to generating data in a very short time. A large portion of each module is devoted to teaching how the model is derived and how the different terms in the differential equation interact. Because setting up models is really where the art of computer modeling comes in, these sections will probably be most valuable for students.

To a great extent, the use of system dynamics tools hides the numerical techniques needed to integrate student-generated equations. The text does devote some time to the more technical details of solving the models, including sections that cover numerical error and the basics of integration (Euler, predictor-corrector, and fourth-order Runge-Kutta methods). These are probably the text's most technical parts, and students with a limited calculus background might be lost. The system dynamics approach could be a good way to get students to understand the meaning of terms (growth, decay, and so on) in an ordinary differential equation, but will probably be more meaningful for those who have mastered at least single-variable calculus.

The last modules cover cell- (grid-) based simulations and introduce the use of a general-purpose toolbox such as Maple, Mathematica, and Matlab. The modules do teach a fair amount of programming in these tools, so students with some previous programming practice might have an advantage. In keeping with the text's introductory nature, partial differential equations and matrices aren't introduced, although you could view some of the cell simulations as discretized versions of partial differential equations. Additional modules are available on Monte Carlo simulations and introductory data fitting.

## Tutorials

If you only glance through the book, you'll miss a large part of the material presented by the authors: the online tutorials. The text itself is simulation-environment neutral and contains no actual programming/simulation syntax from a particular system. This makes it stand alone and free from computer tools' syntax and version changes. The tutorials compose sample computational files and PDF text files with step-by-step student exercises, which the authors tested in classes at Wofford College. Tutorials are available for Stella, Vensim, Berkeley Madonna, Maple, Mathematica, and Mathematica, with limited exercises available for Excel and Python. The tutorials are comprehensive, taking students from the first time they start up the computational tool through modeling the physical systems presented in the text. I worked through some of the Vensim tutorials without any problems and believe the tutorials would be invaluable for teaching a course based on the book.

One possible criticism of the online materials is that all the computational tools used (especially the system dynamics tools) are proprietary systems that might involve a significant price tag for schools. Although Maple, Matlab, and Mathematica are often supported by university-wide licenses, the system dynamics tools are more specialized and must be purchased separately. Only one of the system dynamics tools (Vensim) has a relatively uncrippled free version. The system dynamics tools used are currently available for Windows or Macintosh operating systems, which is somewhat surprising given the computational science community's use of Unix and Linux (I had to find a Windows laptop to test the tutorials). Supporting the system dynamics tools in an open source toolbox (if one is available; I'm not familiar with all the available tools in the area) or on a Unix/Linux operating system would expand the tutorials' appeal.

On the other hand, beginning students will probably be most at home in a Windows-based computer environment. The authors also wisely make the text itself completely neutral about the choice of computational system and let instructors make the choice for each exercise.

## Conclusion

Introduction to Computational Science: Modeling and Simulation for the Sciences is an excellent text to get beginning undergraduate students excited about numerical simulation and modeling. Its coverage of systems modeled as ordinary differential equations is particularly strong, and the wide variety of projects and comprehensive downloadable tutorials are an extra bonus.

R. Torsten Clay is an assistant professor of physics at Mississippi State University and a member of its High Performance Computing Collaboratory Center for Computational Sciences. His research is in the theory of strong correlated electron materials and computational methods for many-body systems. Clay has a PhD in physics from the University of Illinois. Contact him at rtc29@msstate.edu.

## Computational Recipes

Richard Gass

R.H. Enns and G.C. McGuire, Computer Algebra Recipes: An Advanced Guide to Scientific Modeling, Springer, 2007, ISBN: 0387257683, 371 pages.

Figure

Targeted toward upper-level undergraduates in the physical sciences and engineering, Richard H. Enns and George C. McGuire's book is a collection of Maple-based recipes, or student exercises, for solving linear and nonlinear differential equations, both ordinary and partial. The book is divided into three parts—Appetizers, Entrees, and Desserts—with the complexity and difficulty of the topics increasing as students move through the meal.

The book begins with a brief introduction to Maple in the context of computing a ball's trajectory; additional commands are introduced as needed. Students without some prior exposure to Maple will probably require supplemental instruction to feel comfortable with the exercises. However, students with a rudimentary knowledge of it will be comfortable with the book.

Each recipe shows how to use Maple to solve a particular problem in science, engineering, or mathematics—for example, one recipe from the Entree section discusses solving the scalar Helmholtz equation to find the allowed sound frequencies in a cylindrical shower stall. Many of the classical partial differential equations of mathematical physics are treated, but the book features material that will be less familiar to physicists and engineers, such as an example of yeast growth in a finite media. The Desserts section covers colliding solitons, a topic not usually covered at the undergraduate level, and includes a set of useful tools for investigating nonlinear systems. Recipes are given for the calculation of power spectrums, bifurcation diagrams, Poincaré sections, and Lyapunov exponents. These tools are then applied to systems ranging from the Hénon-Heilies system to heartbeats. Unfortunately, the authors don't discuss error estimates for Lyapunov exponents, a topic that—in my experience—students have a very hard time with.

Despite its subtitle, this book isn't really a guide to scientific modeling. The first Entree is an interesting discussion of modeling blood pressure during the heart's contraction and expansion, but the results are never compared to experimental data. This is true throughout the book and is one of its weaknesses. A guide to modeling should emphasize the importance of validating the model against data and then, if necessary, how to improve the model.

The authors introduce the numerical solution of differential equations using the Euler method to solve predator-prey equations. This section explores the Euler method's instability and introduces the fourth-order Runge-Kutta method as a better alternative. The authors should have included more of this type of analysis in the book—in general, the topics of numerical error, stability, scaling, and model validation get short shrift. Some examples in which the obvious approach failed or the initial numerical results were wrong would have been helpful as well. In my experience, students often treat results from a computer algebra system as gospel. Teaching them that this isn't the case should be a goal of any book on modeling or computational science.

## Conclusion

Because the book doesn't discuss model validation and numerical error in great detail, it doesn't qualify as a complete guide to scientific modeling. Most students, however, will find the recipes in this book useful.

Richard Gass is a research associate in the physics department at the University of Cincinnati. He is the author of Mathematica for Scientists and Engineers: Using Mathematica to Do Science (Prentice Hall, 1997). Gass has a PhD in physics from the State University of New York at Stony Brook and his research interests are in general relativity. Contact him at richard.gass@uc.edu.