I have a ADI finite difference scheme for the 2D Navier-Stokes equations that uses a second order accurate (central) approximation for the advective terms. I am ignoring the diffusive terms for now. I am trying to check the order of accuracy of the scheme by using a test case with analytical solution. For implementation reasons, the grid is non-uniform in the upper half (see footnotes for the reasons for it).
My question is: can I still get second order of accuracy? It is known that for non uniform grid the central scheme reduce to first order (see slides 17-18 here). Note that I use equation 32 without the two rightmost terms, clearly. However the mentioned slides say that if grid is slowly expanding, i.e., $\Delta x_i = r \Delta x_{i−1}$ with the grid expansion ratio $r$ not too far from unity, the leading order error can then still be essentially second order. Any experience with that? How small has to be $r$? I guess it depends from the problem and the value of the second derivative, since the first truncated term is proportional to it.
PS: The grid is non-uniform in the upper half because it is the only way to have a circular periodic boundary condition without rewriting all the code, i.e., I stretch the grid and I use two lines of cells as the halo for periodicity). The upper half have basically 4 line of cells missing, so I need either to:
- stretch the remaining smoothly
- have a discontinuity on the grid size at 2 single interfaces.
I guess option (1) is the better, since I make the error smaller locally, right?