Sheng Wang

Finite Difference of Staggered Grid (1)

This post presents the central finite difference(FD) system build in stagger grid. Symmetric scheme are derived and examples are presented.

Taylor expansion

As always, we start the derivation from taylor expansion. For the $\color{red}{red}$ points in the below staggerd point, function value here have the form of taylor series expanded in the $\color{blue}{blue}$ point. This kind of stagger grid scheme is widely used in modeling.

First order derivatives

or in the forms of:

adding all these $f’(x)$ propotionally together:

So, for $2N$th order accuracy, $C_k$ must be the solution of linear equation:

$\eqref{LA}$ is the vandermonde equation, its augmented matrix corresponds to the upper triangular linear equation:

while

Thus, $x_i$ have the value of:

Conclusion

From $\eqref{fd1}$, the FD scheme of 2Nth order accuracy is built:

or in the form of:

Values of $c_i$ for different accuracy order are:

order $c_1$ $c_2$ $c_3$ $c_4$ $c_5$ $c_6$
2 $\frac{1}{1}$
4 $\frac{9}{8}$ $\frac{-1}{24}$
6 $\frac{75}{64}$ $\frac{-25}{384}$ $\frac{3}{640}$
8 $\frac{1225}{1024}$ $\frac{-245}{3072}$ $\frac{49}{5120}$ $\frac{-5}{7168}$
10 $\frac{19845}{16384}$ $\frac{-735}{8192}$ $\frac{567}{40960}$ $\frac{-405}{229376}$ $\frac{35}{294912}$
12 $\frac{160083}{131072}$ $\frac{-12705}{131072}$ $\frac{22869}{1310720}$ $\frac{-5445}{1835008}$ $\frac{847}{2359296}$ $\frac{-63}{2883584}$

Examples

FD scheme corresponding to accuracy orders of 2,4,6,8,10,12 are implemented to $f(x) = sin(x)$, their FD results are ploted versus theoretical first order derivative of $f’(x) = cos(x)$, as well as their error.