The equations governing the flows of fluids are inherently nonlinear, so exact solutions are rare and gemlike. Approximate solutions of the equations are thus critical to understanding most of the interesting behaviors seen in fluids. Although analytic approximations have been used to glean insight into fluid phenomena since the field’s beginning in the 19th century, numerical approximations provide a complementary way to learn about the behaviors of the solutions. In his new book, Think Before You Compute: A Prelude to Computational Fluid Dynamics, renowned fluid dynamicist Edward John Hinch provides an introduction to those techniques.

The titular exhortation outlines the book’s objective: To help readers develop intuition about the physics and the mathematics necessary to formulate a problem, learn the techniques and algorithms used to solve the equations approximately, and understand the meaning of the results. The product of decades spent teaching the subject, Think Before You Compute is a superb introduction to the basic methods underlying the theory and practice of computational fluid dynamics (CFD).

Dye added to a rotating fluid vividly illustrates the flows and eddies modeled by computational fluid dynamics.

Dye added to a rotating fluid vividly illustrates the flows and eddies modeled by computational fluid dynamics.

Close modal

The book is split into three parts. The first part starts with an invitation to jump directly into the deep end of the pool and solve the two-dimensional Navier–Stokes equations for flow in a cavity with a driven lid, which is a classic problem that encompasses and highlights all the major issues of CFD. The section discusses different formulations of the problem; issues associated with the pressure singularity at the corners; questions of stability, consistency, and accuracy in the finite difference discretization; and various iterative and projection-based methods. Helpful ready-to-run MATLAB codes are available on the author’s website. (A better solution might be to host the code on GitHub and permanently link to the repository from the publisher’s site.)

Hinch makes the case for part 1 to be covered in about three lectures and a few exercises. I tried that recently, and it works. The approach of using a single example to illustrate the main difficulties of the field is a refreshing change from other books in the genre that often take too long to spin up.

Part 2 presents a broad but succinct introduction to different CFD approaches, including methods based on compact finite differencing, finite elements, spectral techniques, and the many ways of time stepping. It concludes with a chapter on numerical linear algebra that starts with a very apt caution to readers: “Health warning. Do not do it.” Each topic is presented concisely, and the exposition is uniformly lucid.

The final third of the book is a discursive amble through such topics as hyperbolic problems and shock capturing, boundary integral methods, interface tracking, lattice- and particle-based methods, numerical continuation, and wavelets. Throughout, Hinch shows readers how to think via examples embedded in the text. Those include the use of scaling estimates for real and spurious instabilities and singular behaviors, how to separate the behavior of the algorithm from that of the continuum equations, and a discussion of convergence and speed of computation. Part 3, however, is probably too brief to be useful for a beginner except as an appetizer.

Overall, the relatively short book strikes a good balance by being neither too technical nor too recipe driven, and it imparts key concepts and practical details without a fuss. Adding an online supplement with examples of when the maxim in the title was not followed would illuminate the teachable moments at the origin of the amusing and occasionally inscrutable pronouncements sprinkled throughout the book.

In our digital age, the firepower afforded by cheap and fast computing is immense, and it is easy to generate Colored Fanciful Displays; this minimalist book has none and is none the worse for it. CFD has succeeded—and will continue to do so—because it augments physical experimentation and analytic approximation. Hinch’s direct and informal writing style and his emphasis on understanding fluid dynamics via a recursive loop—think, compute, and think again—make Think Before You Compute an attractive textbook for a standalone course on CFD or an excellent supplement for a graduate course that includes conceptual, analytic, and numerical approaches.

L. Mahadevan is the Lola England de Valpine Professor of Applied Mathematics and a professor of physics and of organismic and evolutionary biology at Harvard University, where he teaches and researches problems in fluid dynamics, among other subjects.