4. RK4 Scheme:
For N=10, Δ𝑥 =
2𝜋
𝑁
and Δ𝑡 = 0.01, we obtain the following temperature fields and profiles:
Temperature field at t = 2.5s:
Temperature profile at t = 2.5s:
8. Grid Refinement Study:
Considering the solution at 𝑡 = 10𝑠 for Δ𝑡 = 0.1𝑠 to be the ‘exact’ solution for every
subsequent grid resolution (i.e. 10x10, 20x20, 40x40), we compute the following errors for the
solution at t =2.5s. The summary of the results is tabulated instead of all of the values in the
interests of brevity, but the raw data is available in the attached zip file.
The data obtained and the resulting plot confirms that the solution is independent of the grid
spacing as error does not reduce with finer grid resolution.
Resolution L1-norm L∞ -norm Grid Spacing (h) Log(h) Log (L1) Log (L∞)
10 x 10 0.1067 0.2439 0.6283 -0.2018 -0.9718 -0.6127
20 x 20 0.0979 0.2308 0.3142 -0.5029 -1.0090 -0.6367
40 x 40 0.0935 0.2292 0.1571 -0.8039 -1.0292 -0.6398
9. Conclusion:
The advection-diffusion equation was numerically solved for a 2𝜋x2𝜋 grid using the AB2 and
RK4 schemes for time integration. The results were obtained at values of t = 2.5, 5, 7.5 and 10s
for a time step of Δ𝑡 = 0.01𝑠. The ‘exact’ solution was considered to be the steady state
solution at t=10s and comparisons were made relative to this. The results of this exercise
demonstrate that both methods afford considerable accuracy with the RK4 method displaying
greater accuracy since it is a fourth order method. Error near the boundary was also marginal
since second order methods for spatial discretization were employed at the extremities.
A grid refinement study was also carried out by increasing the number of nodes from 10 to 20
and then 40 in each direction. This exercise proved that the error was independent of grid
resolution.
Machine round-off and discretization errors are therefore still potential sources of error. Better
agreement with exact solutions may be obtained by reducing the time step further. For this
project, it was deemed unnecessary since sufficient accuracy was obtained with Δ𝑡 = 0.01𝑠.