106
2. BasicFinite-Difference Methods
instabilities exhibited by the forward, leapfrog, and Heun methods in the
simulations in (a), (b), and (c).
22. *Find solutions to the advection equation
-+c-=o
a1/1
a1/1
at
ax
in a periodic domain 0 x
l. Suppose that c = 0.2 ms"! and
1/1(x, 0) = 1
94
[(X -
0,
-
' if Ix - 6 < 1 ·
- 9'
otherwise.
Obtain solutions using (I) leapfrog time differencing and centered secondorder spatial differencing, (2) upstream (or donor cell) differencing and (3)
the Lax-Wendroff method . Choose t:J.x = 1/36 . Examine the sensitivity
ofthe numerical solutions to the Courant number (ct:J.t/t:J.x) . Try Courant
numbers of 0.1, 0.5, and 0.9. For each Courant number, submit a plot of
the three numerical solutions and the exact solution at time t = 5. Scale
the vertical axis on the plot to the range -0.6
1/1
1.6. Discuss the
relative quality of the solutions and their dependence on Courant number.
Is the dependence of the solutions on the Courant number consistent with
the modified equation (7.23) and the results obtained in Problem 17?
23. *Consider the leapfrog -time, fourth-order space approximation to the constant-wind-speed advection equation
(a) Determine the maximum Courant number (ct:J.t/t:J.x) for which this
scheme is stable.
(b) Repeat the comparison in Problem 22 including results from this fourth -
order scheme and the second-order leapfrog scheme on each plot. Use
Courant numbers 0.1, 0.5, and 0.72. Does the accuracy of all three approximate solutions improve as the Courant number approaches its maximum
stable value? Why or why not?
2. BasicFinite-Difference Methods
instabilities exhibited by the forward, leapfrog, and Heun methods in the
simulations in (a), (b), and (c).
22. *Find solutions to the advection equation
-+c-=o
a1/1
a1/1
at
ax
in a periodic domain 0 x
l. Suppose that c = 0.2 ms"! and
1/1(x, 0) = 1
94
[(X -
0,
-
' if Ix - 6 < 1 ·
- 9'
otherwise.
Obtain solutions using (I) leapfrog time differencing and centered secondorder spatial differencing, (2) upstream (or donor cell) differencing and (3)
the Lax-Wendroff method . Choose t:J.x = 1/36 . Examine the sensitivity
ofthe numerical solutions to the Courant number (ct:J.t/t:J.x) . Try Courant
numbers of 0.1, 0.5, and 0.9. For each Courant number, submit a plot of
the three numerical solutions and the exact solution at time t = 5. Scale
the vertical axis on the plot to the range -0.6
1/1
1.6. Discuss the
relative quality of the solutions and their dependence on Courant number.
Is the dependence of the solutions on the Courant number consistent with
the modified equation (7.23) and the results obtained in Problem 17?
23. *Consider the leapfrog -time, fourth-order space approximation to the constant-wind-speed advection equation
(a) Determine the maximum Courant number (ct:J.t/t:J.x) for which this
scheme is stable.
(b) Repeat the comparison in Problem 22 including results from this fourth -
order scheme and the second-order leapfrog scheme on each plot. Use
Courant numbers 0.1, 0.5, and 0.72. Does the accuracy of all three approximate solutions improve as the Courant number approaches its maximum
stable value? Why or why not?
