According to this paper the following finite difference approximation is third-order accurate:

$$\frac{d\rho_j}{dx}\approx\frac{2-\eta}{3}\frac{\rho_{j+1/2}-\rho_{j-1/2}}{\Delta x}+\frac{1+\eta}{3}\frac{\rho_{j-1/2}-\rho_{j-3/2}}{\Delta x}\text{, with }\eta=\frac{u\Delta t}{\Delta x}.$$

But I don't see how this is third-order accurate. If you Taylor expand $\rho_j$ you get: $$\frac{\rho_{j+1/2}-\rho_{j-1/2}}{\Delta x}=\frac{d\rho_i}{dx}+\frac{\Delta x^2}{24}\frac{d^3\rho_j}{dx^3}+O(\Delta x^3),$$ $$\frac{\rho_{j-1/2}-\rho_{j-3/2}}{\Delta x}=\frac{d\rho_i}{dx}-\Delta x\frac{d^2\rho_j}{dx^2}+\frac{13\Delta x^2}{24}\frac{d^3\rho_j}{dx^3}+O(\Delta x^3).$$ Therefore, at best this scheme is first-order accurate? For reference see page 6 of the paper that is linked. Or this image here: enter image description here


I think you are meant to examine the order of the whole scheme for the equation, rather than just this particular approximation of $\rho_x$. Substitute the whole expression back into the definition of the scheme (top of page 6, with $u$ missing): $$ \frac{\rho^{n+1}_{j+\frac12}-\rho^n_{j+\frac12}}{\delta t} + u \frac{\bar\rho_{j+1}-\bar\rho_j}{\delta x} = 0 $$ and evaluate the residual for a true solution $\rho$ of the equation $\rho_t + u \rho_x = 0$.

For the 1st order scheme I get 1st order (code): $$ \tfrac12 h u(\eta-1)\rho_{xx}, $$ second order: $$ -\tfrac16 h^2u(\eta^2-1)\rho_{xxx}, $$ third order: $$ \tfrac1{24}h^3u(\eta^3-2\eta^2-\eta+2)\rho_{xxxx}, $$ so the orders come out as the paper says.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.