Book Review
Numerical Methods for Partial Differential Equations: Finite-Difference and Finite-Volume Methods by Sandip Mazumder
By Steven H. Frankel
Chapter 1
Numerical methods are needed to solve partial differential equations (PDEs). This is because many mathematical models of physical phenomena result in one or more coupled PDEs which are usually non-linear and therefore not easily solved analytically. Focusing on second-order PDEs, which are commonly seen in science and engineering, there are two ways to classify them. One is based on the number of directions in the space of the independent variables along which the solution and/or its derivatives may be discontinuous. By considering the discriminant of the coefficients of the PDE, it can be classified as either elliptic (0 directions), parabolic (1 direction), or hyperbolic (2 directions). Another way to classify PDEs is by considering either equilibrium (steady state; elliptic) or marching (unsteady; parabolic or hyperbolic) problems. The later classification is useful regarding the choice of numerical method (iterative for elliptic vs. marching for parabolic/hyperbolic). Numerous examples are brought including the classical Laplace, heat, and wave equations all the way up to the Navier-Stokes equations for fluid dynamics.
Regarding numerical methods and the discretization of the physical domain and PDE to be solved, finite-difference methods (FDM), finite-volume methods (FVM), and finite-element methods (FEM) are quickly overviewed. In FDM, the derivatives appearing in the original PDE are replaced (approximated) by finite-difference formulas derived from manipulated and truncated Taylor series expansions resulting in a set of discrete algebraic equations governing the dependent variable evaluated at a series of grid or mesh points (not necessarily uniformly spaced) over the physical domain (now the computational domain) of the problem of interest.
In FVM, the physical domain is discretized into a series of non-overlapping control volumes of structured or unstructured shape producing the computational domain and the original PDE is integrated over each of the control volumes. Volumetric derivatives associated with terms involving the divergence of the dependent variable or some function thereof are converted using Gauss’s Divergence Theorem to integrals over the bounding surface of the elements. These surface integrals often require evaluation of the so-called physical flux of the quantity of interest on the cell boundaries resulting in a set of discrete (or semi-discrete in the case of unsteady PDEs) algebraic equations for each cell which can be solved to yield the cell volume average (evaluated at the cell centroid) of the dependent variable of interest.
In FEM, we discretize the domain in the same fashion as in FVM e.g. into elements. Then we multiply the PDE of interest by a smooth test function and then integrate over each of the finite elements. Next the dependent variable is expressed as a weighted sum of known basis functions. The test function is also written as a similar weighted sum (with different weights) of basis functions. For the standard Galerkin method the basis functions for the solution and the test function are chosen to be the same. Substitution of these forms into the integrated PDE yields a set of discrete algebraic equations for the unknown expansion coefficients whose solution enables one to evaluate the solution to the PDE. The basis functions are like the skeleton or muscles of the solution.
In all three methods, implementation of boundary conditions, whether Dirichlet (setting the dependent variable itself on the boundary), Neumann (setting the gradient normal to the boundary), or Robin (setting a linear combination of the dependent variable and its derivative on the boundary), must be done with care. The author has an excellent recent article on this which you can find here.
The bottomline for all three methods is that they result in a set of discrete algebraic equations for the solution which must be solved. This will begin to be addressed in the next and subsequent chapters.
The chapter ends with a discussion of different mesh types used in all three methods including structured Cartesian grids, body-fitted curvlinear grids, and unstructured grids and some of the advantages and disadvantages of each method when it comes to handling complex geometries. Finally, there is a nice qualitative discussion of verification and validation efforts in solving PDEs numerically.
Overall, an excellent jam packed chapter that provides a nice overview of the major numerical methods for solving PDEs. There are also nice end of the chapter exercises to gain hands-on experience.
Chapter 2
Get Steven Frankel’s stories in your inbox
Join Medium for free to get updates from this writer.
The subject of this chapter is finite-difference methods for boundary value problems. The initial focus is 1D and after discretization of space (grid generation), introduction of stencil notation, and Taylor series expansions (including detailed derivations), the simple 2nd-order central difference finite-difference equation results. The truncation or discretization error is identified as second-order in this case. There is a considerable focus on all implementation of three types of boundary conditions including numerical examples. Finally, the nodal equations are assembled into matrix form including pseudocode to form the coefficient matrix and right-hand-side vectors. Finally, an extension to multidimensions is presented including valuable pseudocode (that works!) for generating the matrix system. The chapter concludes with a brief discussion of high-order approximations, extension to cylindrical coordinate systems, and finally transformation to curvilinear coordinate system which is very valuable and unique to textbooks of this type.
Chapter 3
After setting up systems of linear algebraic equations arising from finite-difference approximations to PDEs in the previous chapter, Chapter 3 focuses appropriately on their solution. This is broken up into the usual direct vs. Iterative methods distinction. Gauss elimination is treated in detail including pseudocode (that works!) with careful attention to local vs. global notation. Tridiagonal and pentadiagonal matrix solvers are presented next complete with pseudocode. Iterative solvers are up next including Jacobi, Gauss-Seidel in point and line forms, and followed by Stone’s strongly implicit method (not usually detailed in texts like this). After this nice and clear (light on math) presentations of method of steepest descent and conjugate gradient method follow with pseudocode and nice illustrative examples and figures. A unique feature of the book addresses the issue of non-linear source terms and how to handle them wraps up the solidly written and presented chapter.
Chapter 4
Chapter 4 focuses on stability and convergence of iterative solvers addressing eigenvalues and condition numbers of iterative matrices and diagonal dominance. The Fourier decomposition of errors is nicely presented in full details leading to the definition of the spectral radius of convergence, preconditioning, and eventually multigrid methods to accelerate convergence. Both geometric and algebraic multigrid methods are presented in full details with pseudocode (that works!) with the later rarely presented in texts of this type.
Chapter 5
It’s time for time! Here parabolic and hyperbolic PDEs and time marching is covered. For parabolic PDEs, the classical explicit, implicit and Crank-Nicolson trifecta are presented clearly complete with stability analysis. Time-splitting alternate direction implicit method is also covered. This is all pretty basic and not very exciting but for a first course it is well done. For hyperbolic PDEs, the classical 2nd order wave equation is treated in much the same way e.g. explicit, implicit and Crank-Nicolson. Finally, higher order methods for ODEs are presented such as Runge-Kutta and Adams methods motivated by the semi-discrete approach to solving PDEs. This ends the presentation of FDM and the next chapter will tackle FVM.
Chapter 6
This is where the book really shines! It presents the FVM from scratch and clearly states the goal of determining volume-averaged values at cell centroids and introducing key notation such as cell face, cell center, and nodes. It begins with 1D steady problems and through a formal derivation of the FVM clearly defines and emphasizes the importance of local and global flux conservation and boundary condition implementation. Advection-diffusion equations are treated next. For pure diffusion equations the key is discrete approximation comes involves the derivative or flux at the cell edge. When advection is present, discrete approximates for the dependent variable itself at the cell edge is required allowing for the possibly of upwinding and the important grid Peclet number. Upwinding schemes are extensively presented from basic upwind to exponential to QUICK. Extension of FVM to multidimensions is next with full details and examples. Then axisymmetric problems are treated followed by a presentation of FVM in curvilinear coordinates. The chapter ends with a nice comparison of FDM and FVM.
Chapter 7
This is the reason I selected this book as the main text for my class. It deals with the unstructured FVM. It begins with a presentation of Gauss-Divergence theorem and discussion of the diffusive flux. Then a detailed presentation of unstructured grid stencil with clearly labeled notation will set the stage for implementation of FVM on unstructured grids. Emphasis on processing and storage of geometric (mesh) information, processing connectivity information (Figure 7.3 is my favorite in the entire text), and pseudocode. Interpolation to determine face center and nodal values from cell centers (which are all you have to work with) is presented next. A key realisation we had in class was how nodal values are needed for evaluating cell edge fluxes. Calculation of cell volumes, face areas, and surface normals are presented in implementable detail including pseudocode. Treatment of normal and tangential fluxes follow. Extension to 3D, treatment of boundary conditions, construction of matrix system, and extension to advection-diffusion finish up this unique and well written chapter. It is worth the price of the book just to study this chapter and all its details.
Chapter 8
This chapter surprised me. It is called miscellaneous topics making me think it could be skipped. A careful study of this chapter shows it is anything but miscellaneous. It is strategically placed and highly relevant to the rest of the book. It deals with traditional numerical methods topics such as interpolation, numerical integration, and solving non-linear algebraic equations. The second half of the chapter is where the author tie’s these topics into the rest of the book. A very nice presentation of the use of Newton-Raphson method for solving non-linear algebraic equation systems is followed by an illustration of how this is used to handle non-linear PDEs. Finally, while solving one PDE at a time is nice, in practice coupled PDEs usually need to be solved for most science and engineering problems. This is dealt with in the last section of the chapter and the book complete with a very nice detailed example.
Overall review
Overall, this is an excellent textbook for a first course in numerical methods for PDEs which focuses on the most popular methods of finite-difference and finite-volume methods. It is unique in that it present useful pseudocode and emphasizes details of unstructured finite-volume methods — which is rare to find in such a book. After finishing the book, we had some extra time to introduce spectral methods, method of weighted residual, and discontinuous Galerkin (DG) methods (although I would probably leave DG methods for an advanced class next time). My postdoc wrote a very nice Python code to implement the pseudocode in Chapter 7 for unstructured FVM for solving 2D diffusion and advection-diffusion PDEs. A few students in the class used this code (which relied on the open source grid generation gmsh) for their final class project to good effect. Perhaps we will share this code with the community in future posts. Happy coding!







