noncompact difference

198 Views Asked by At

The Taylor series can be used to approximate a derivative to a desired amount of error. For instance

$\displaystyle \frac{du}{dx} = \frac{u_{i+1}-u_{i-1}}{2\Delta x} + O((\Delta x)^2)$

I have a problem where it asks for a 4th order noncompact difference. Can someone please explain what noncompact means in this context and how it differs from a compact scheme? Thanks

2

There are 2 best solutions below

0
On BEST ANSWER

I'm kind of embarrassed how long it took me to find the Wikipedia article on this.

https://en.wikipedia.org/wiki/Non-compact_stencil

https://en.wikipedia.org/wiki/Compact_stencil

Essentially non-compact refers to the stencil used to create the finite difference approximation. A compact approximation may only use the values at a single node and its adjacent nodes while a non-compact approximation does not have this restriction.

For example in 2D a compact approximation can use only the red center node and the adjacent black nodes.

compact approximation stencil

A non-compact scheme can use any node in any layer of nodes surrounding the current node.

non-compact approximation stencil

A 1 dimensional 4th order finite difference approximation to the first derivative such as

$\displaystyle \frac{df}{dx} = \frac{f_{i-2}-8f_{i-1}+8f_{i+1}-f_{i+2}}{12\Delta x} + O((\Delta x)^4)$

would be non-compact because it uses 2 layers of nodes ($i\pm1$ and $i\pm2$)

2
On

In this context, "4th order noncompact difference" likely means that you are tasked with finding a 4th-order approximation of $\frac{du}{dx}$. Since it is a higher-order accurate approximation, you will need to use the value of $u$ at more than two grid points. As an ansatz, you might start with $$\frac{du}{dx} = \alpha u_{i+2} + \beta u_{i+1} + \gamma u_i + \delta u_{i-1} + \epsilon u_{i-2} + O((\Delta x)^4).$$ Your goal will be to use compute the undetermined coefficients $\alpha$, $\beta$, $\gamma$, $\delta$, and $\epsilon$.