The CFL criterion gives a necessary condition for convergence. It suggests, but cannot confirm, that a step size of O(h) may be adequate in the advection equation. More details emerge when we adopt the semidiscretization point of view.
Let the advection equation (12.2.1) over [0,1] be subjected to periodic end conditions. Suppose we use the central-difference matrix Dx defined in (12.1.7) to discretize the space derivative, leaving us with
To apply an IVP solver, we need to compare the stability region of the solver with the eigenvalues of −cDx, as in Absolute stability. You can verify (see Exercise 1) that for m points in [0,1), these are
Two things stand out about these eigenvalues: they are purely imaginary, which is consistent with conservation of magnitude, and they extend no farther than O(m)=O(h−1) away from the origin. These characteristics suggest how to analyze the use of different time-stepping methods by referring to stability regions.
Many PDEs that conserve quantities will have imaginary eigenvalues, causing Euler and some other IVP methods to fail regardless of step size. Diffusion problems, in which the eigenvalues are negative and real, are compatible with a wider range of integrators, though possibly with onerous step size requirements due to stiffness.
The location of eigenvalues near ±ic/h also confirms what the CFL condition was suggesting. In order to use RK4, for example, whose stability region intersects the imaginary axis at around ±2.8i, the time step stability restriction is τc/h≤2.8, or τ=O(h). This is much more favorable than for diffusion, whose eigenvalues were as large as O(h−2), and it makes explicit IVP methods much more attractive for advection problems than for diffusion.
The traffic flow equation (12.1.4) combines a nonlinear advection with a diffusion term. The simplest linear problem with the same feature is the advection–diffusion equation
The parameter ε controls the relative strength between the two mechanisms, and the eigenvalues accordingly vary between the purely imaginary ones of advection and the negative real ones of diffusion.
In a nonlinear problem, the eigenvalues come from the linearization about an exact solution, as in Stiffness.
Boundary conditions can have a dramatic effect on the eigenvalues of the semidiscretization. For instance, Demo 12.2.6 solves linear advection ut=ux on [0,1] with the homogeneous inflow condition u(0,t)=0. Exclusion of the boundary node from the semidiscretization u to get the interior vector v is equivalent to
As a result, we conclude that A=EDxET is the appropriate matrix for determining the eigenvalues of the semidiscretization. More simply, we can simply delete the last row and last column from Dx.
✍ Let Dx be m×m and given by (12.2.2). For any integer k∈{0,…,m−1}, define ω=exp(2ikπ/m) and v=[1,ω,ω2,…,ωm−1]. Show that v is an eigenvector of Dx, with eigenvalue
⌨ Refer to the semidiscretization of the advection–diffusion equation on x∈[0,1] with c=1, ϵ=0.01, and periodic end conditions in Demo 12.3.2. For m=100, find the upper bound on τ that gives absolute stability for Euler time stepping. (Hint: The stability region of Euler is the set of complex values whose distance from -1 is less than or equal to one. The effect of τ is to uniformly scale that distance for the eigenvalues.)
⌨ Refer to the semidiscretization in Demo 12.3.3. Find the upper bound on τ that gives absolute stability for Euler time stepping. (See the hint in the previous exercise.)
⌨ Modify Demo 12.3.3 so that it produces the eigenvalues of the problem ut+ux=0 with an outflow condition u(1,t)=0. What is the behavior of solutions as t→∞?