Problems
105
(a) Compare the exact solution with those obtained using the following
schemes: (1) forward, (2) backward, (3) trapezoidal, (4) Matsuno, (5) Huen
variant of second-order Runge-Kutta, (6) Leapfrog, and (7) second-order
Adams-Bashforth. Initialize the leapfrog and second-order Adams-Bashforth schemes by taking one forward time step and set f Ilt = n /6. Submit
plots of u as a function of t comparing the various methods with the exact
solution over the interval 0 S t S 6. Set the vertical scale to -2 S u S 2
and terminate the curve for wildly unstable schemes when u exceeds these
limits .
(b) Compare the average damping or amplification and the average phasespeed error per time step in your solution with the theoretical value for
small f Ilt. Choose f Ilt = 0.2 for this comparison and present your results in a table. The table should contain the amplification per time step as
predicted by theory (in the limit of good numerical resolution) and as determined from the numerical simulation. The table should also contain the
phase-speed error as predicted by theory and as determined by the numerical solution. In gathering data for the table, run the simulations long enough
to get reasonable estimates for each numerical scheme.
20. *Compare the performance of two strategies for initializing the leapfrog
approximation to the equations in Problem 19. As the first strategy initialize
the leapfrog scheme with a single forward time step. As the second strategy
take a single forward step of length Ilt /2 followed by a leapfrog step of
length Ilt /2 to obtain the unknowns at time Ilt. This second approach is
equivalent to a second-order Runge-Kutta midpoint method. As before, let
u(O) = I, v(O) = 0, and determine the error in v(t = 4) generated by each
scheme when f Ilt is 0.1, 0.3, . . . ,0.9.
21. *Compute solutions to the constant-wind-speed advection equation on the
periodic domain 0 S x S 1 subject to the initial condition 1/1(x, 0) =
sin
6(2rrx). Use centered-space differencing a1/l/ßx
lhx,p and set e =
0.1.
(a) Compare the exact solution with numerical solutions obtained using
forward and leapfrog differencing. Use a Courant number eilt / Ilx = 0.1
and plot your solutions at t = 50 using a vertical scale that inc1udes -40 S
,p S 40. Compare and explain the results obtained using Sx = 1/20,
Ilx = 1/40 and Ilx = 1/80. Use a single forward time step to initialize
the leapfrog integration.
(b) Compare the exact solution with numerical solutions obtained using
Heun (second-order Runge-Kutta) and leapfrog differencing. Use a Courant
number cSt / Sx = 0.5 and plot your solutions at t = 60 using a vertical
scale that inc1udes -2 S ,p S 2. Compare and explain the results obtained
using Ilx = 1/20, 1140, 1180, and 11160.
(c) Repeat the simulation in (b) with Ilx = 1/160 but use a Courant number
of 1.2 and integrate to t = 2.1. Compare and contrast the nature of the
Précédent

- 120/476

Suivant