A plane wave of the form
| (100) |
| (101) | |||
| (102) |
![]() |
The plane wave is set as the initial solution on a periodic domain (shown in Figure 4.1) and the solver is ran for one light transit time. Except where otherwise noted, the grid is 20 cells in the x-direction and 3 cells in the y-direction. Under these conditions, the wave should propagate, and at one time transit time, the initial solution is the analytic solution. The time step used is a CFL of 0.2 for all three solvers.
|
The propagation of the wave with the rectangular upwind solver is shown in Figure 4.2 and demonstrates that the wave does propagate properly to the left. As can be seen, significant dissipation in the rectangular upwind solver is evident in the drastic decrease in wave amplitude over the single light transit time.
|
The propagation of the wave for each of the solvers can be compared in Figure 4.3 where the solution is plotted after one light transit, the solutions should be the initial sine wave
.
As can be seen, the triangular WENO performed the best, however, a bit of super-compression can be seen near the peak.
Second best is the triangular upwind which shows itself to be better than the rectangular upwind; however, the triangular upwind solver does have greater fidelity in the usage of four sub-cells per grid cell, therefore, the increase of accuracy over the rectangular upwind solver is not unexpected.
In all three cases, the solutions converge to the analytic solution as the grid is refined.
|
| Solver | Time | Error | |
| Absolute | Relative | ||
| Rectangular Upwind | 0:06:15 |
|
9,824 |
| Triangular Upwind | 0:17:56 |
|
1,898 |
| Triangular WENO | 4:07:35 |
|
1 |
The order of accuracy for each of the solvers is determined by refining the grid, repeating the simulation, and measuring the error.
The error measure
is calculated using the p-norm measure where
, as in
![]() |
(103) | ||
![]() |
(104) | ||
| (105) |
| is the order of the norm, | ||
| is the index to indicate the cell for the rectangular upwind, or the sub-cell for the triangular upwind and WENO solvers, | ||
| is the number of cells for the rectangular upwind, or the number of sub-cells for the triangular upwind and WENO solvers. |
The 2-norm errors are fitted to the form
| (106) |
| is the order of accuracy. |
Speed of each solver is measured by listing the time the main for loop in the code starts the time marching and the time the code stops the time marching to the nearest second. This comparison is done using a grid spanning 2,000 cells in the x-direction. The timings are listed in Table 4.2. While the triangular WENO solver takes the longest to compute, it has the highest accuracy. The rectangular upwind solver takes a mere 6 minutes to run the simulation; however, to reach the same error figures as the triangular WENO solver, a grid of nearly twenty million cells would be required, this would take 11.5 centuries on a single 2.0 GHz AthlonXP.