3
$\begingroup$

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:

  1. stretch the remaining smoothly
  2. 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?

$\endgroup$
1
  • $\begingroup$ You will have first-order accuracy as soon as $r\neq1$. When $r$ is close to1, it may not be too bad, but what's the point? There's almost no stretching then. The slides argue that Eq.(35) gives second order on stretched grids, you can try that. Also check out Wesseling's CFD principles, section 3.7. Formal second-order on stretched grids is definitely possible. $\endgroup$
    – chris
    Mar 21, 2015 at 9:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.