2
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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$)

$\endgroup$
0
$\begingroup$

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$.

$\endgroup$
2
  • 1
    $\begingroup$ I know I need a 4th order approximation. I'm curious what the difference is between a compact scheme and a noncompact scheme $\endgroup$ – Devin Crossman Apr 1 '18 at 6:45
  • 2
    $\begingroup$ I apologize for misreading your question. Tho I'm familiar with compact schemes, they are a bit out my expertise. If someone else doesn't answer first, I will try to find time this week to expand & clarify. To give a hand-wavy description, essentially, a noncompact scheme for $u_{xx} = f$ would use 5 pts for the solution ($u_{i-2}, u_{i-1}, \ldots, u_{i+2}$) but only 1 pt ($f_i$) for the right-hand side (RHS), while a compact scheme for $u_{xx} = f$ would use 3 pts for the solution ($u_{i-1}, u_i, u_{i+1}$) & also 3 pts for the RHS ($f_{i-1}, f_i, f_{i+1}$). Same idea for $u'=f$. :) $\endgroup$ – Kyle Apr 1 '18 at 7:12

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.