224
4. Series-Expansion Methods
(a)
(b)
1.75
x
2.25 1.75
x
2.25
FIGURE 4.9. Comparison of solutions to the constant-wind-speed advection equation at
(a) t = 10 and (b) t = 10ft, : quadratic finite-element (short dashed), linear finite-element
(solid), fourth-order explicit finite difference (long dashed) and exact (dot-dashed).
obtained using trapezoidal time-differencing with a very small Courant number
(c!i.t /!i.x = 1/16), so essentially all the error is produced by the spatial discretization. Solutions were computed on the periodic domain 0
to the initial condition
x
3 subject
1/I(x,0) =
!
i(cos(81l'(x - 1» + 1)2, if Ix - 11 < 1
- 8'
0,
otherwise.
In order to facilitate the comparison with the finite-difference method, the nodal
values were initialized by collocation, i.e., aj (0) = 1/1 (j!i.x, 0). The horizontal
mesh spacing is !i.x = 1/32, implying that the total width of the initial spike is
8!i.x , which is sufficiently narrow to reveal short-wavelength errors without allowing the solution to be completely dominated by 2!i.x disturbanees. The wind
speed is c = 0.1. The solution at t = 10 is shown in Fig. 4.9a, at which time
the peak in the true solution is centered at x = 2. Only the central portion of the
total domain is shown in Fig. 4.9. For simplicity, the quadratic finite-element solution is plotted as a piecewise-linear function between the nodes. The superiority
of the quadratic finite-element solution over the linear finite-element solution is
clearly evident. The linear finite-elernent solution is, nevertheless, substantially
better than the solution obtained with explicit fourth-order finite differences.
The nature of the amplitude error in the quadratic finite-element solution can be
seen by comparing Fig. 4.9a with Fig. 4.9b. The exact solution propagates exactly
one grid interval between the times shown in panels (a) and (b). There are essentially no changes in the shapes of the linear finite-element and the finite-difference
solutions over this short period of time, but the quadratic finite-elernent solution
is damped noticeably. This damping is followed by reamplification as the solu -
4. Series-Expansion Methods
(a)
(b)
1.75
x
2.25 1.75
x
2.25
FIGURE 4.9. Comparison of solutions to the constant-wind-speed advection equation at
(a) t = 10 and (b) t = 10ft, : quadratic finite-element (short dashed), linear finite-element
(solid), fourth-order explicit finite difference (long dashed) and exact (dot-dashed).
obtained using trapezoidal time-differencing with a very small Courant number
(c!i.t /!i.x = 1/16), so essentially all the error is produced by the spatial discretization. Solutions were computed on the periodic domain 0
to the initial condition
x
3 subject
1/I(x,0) =
!
i(cos(81l'(x - 1» + 1)2, if Ix - 11 < 1
- 8'
0,
otherwise.
In order to facilitate the comparison with the finite-difference method, the nodal
values were initialized by collocation, i.e., aj (0) = 1/1 (j!i.x, 0). The horizontal
mesh spacing is !i.x = 1/32, implying that the total width of the initial spike is
8!i.x , which is sufficiently narrow to reveal short-wavelength errors without allowing the solution to be completely dominated by 2!i.x disturbanees. The wind
speed is c = 0.1. The solution at t = 10 is shown in Fig. 4.9a, at which time
the peak in the true solution is centered at x = 2. Only the central portion of the
total domain is shown in Fig. 4.9. For simplicity, the quadratic finite-element solution is plotted as a piecewise-linear function between the nodes. The superiority
of the quadratic finite-element solution over the linear finite-element solution is
clearly evident. The linear finite-elernent solution is, nevertheless, substantially
better than the solution obtained with explicit fourth-order finite differences.
The nature of the amplitude error in the quadratic finite-element solution can be
seen by comparing Fig. 4.9a with Fig. 4.9b. The exact solution propagates exactly
one grid interval between the times shown in panels (a) and (b). There are essentially no changes in the shapes of the linear finite-element and the finite-difference
solutions over this short period of time, but the quadratic finite-elernent solution
is damped noticeably. This damping is followed by reamplification as the solu -
