
Amath-Math 586/Atm S 581 Due Wednesday, 3 May 2005
Homework 3
1. Consider the system of equations describing two chemical species a and b of concentrations
A(t) and B(t), respectively, for which species a has a source 1 - cos(t) but rapidly decays into
b, and b decays much more slowly:
dA/dt = -λA + 1 - cos(t), λ >> 1
dB/dt = λA – B, A(0) = B(0) = 0. (*)
(a) By considering the dominant balance in the equation for a (please don’t go to the trouble
of an exact solution of the equation valid for finite λ), show that
B(t) = 1 – 0.5e-t - 0.5[cos(t) + sin(t)] + O(λ -1)
(b) Use a backward Euler method to solve the IVP (*) with λ = 1000 for 0 < t < T = π. In
particular, find the numerical solution B∆t(T) for ∆t = T/N, where N = 2-p, p = 2,…,7.
Since the exact solution is a bit messy, measure error for each ∆t using the solution
increment ε(∆t) = |B∆t(T) - B2∆t (T)|. Log-log plot ε vs. timestep ∆t for p = 3,…,7. Does ε
converge with ∆t at the expected rate?
(c) Now use the BDF2 method with the same range of ∆t, with a backward Euler starting
step. Overplot the BDF2 solution increments. Are they smaller than with backward
Euler? Do they converge with ∆t at the expected rate?
2. Consider the following IBVP, describing advection of a tracer u(x, t) introduced into water
flowing into one end of a pipe. The pipe narrows with increasing x, causing a corresponding
increase in the flow speed that carries the tracer along:
ut + (1+9x)ux = 0, 0 < x < 1, 0 < t < 0.5
u(x,0) = 0, u(0, t) = 1
(a) What is the exact solution ue(1,t)? Why is no boundary condition required for x = 1?
(b) Consider the leapfrog method with centered space differencing for the derivative, using a
midpoint second-order Runge-Kutta starting timestep. If we use a small uniform grid
spacing ∆x, what is the CFL stability limit on ∆t?
(c) At the right boundary x = 1, we lack the information to calculate a centered difference.
Give a second-order accurate one-sided approximation to ux that we can use there.
(d) Implement the above method using ∆x = 0.05 and ∆t given by the stability limit found in
(b). Use Asselin filtering with γ = 0.05. Plot a comparison of the numerical and the exact
solutions at x = 1 for 0 < t < 0.5. Are the dominant errors diffusive or dispersive? Is this
as you expected? – Explain. What happens if without Asselin filtering (i.e. γ = 0)?