Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Compact stencil

From Wikipedia, the free encyclopedia
A 2D compact stencil using all 8 adjacent nodes, plus the center node (in red).

In mathematics, especially in the areas of numerical analysis called numerical partial differential equations, a compact stencil is a type of stencil that uses only nine nodes for its discretization method in two dimensions. It uses only the center node and the adjacent nodes. For any structured grid utilizing a compact stencil in 1, 2, or 3 dimensions the maximum number of nodes is 3, 9, or 27 respectively. Compact stencils may be compared to non-compact stencils. Compact stencils are implemented in many partial differential equation solvers, including several in the topics of CFD, FEA, and other mathematical solvers relating to PDEs[1][2]

Two point stencil example

[edit]

The two point stencil for the first derivative of a function is given by:

This is obtained from the Taylor series expansion of the first derivative of the function given by:

Replacing with , we have:

Addition of the above two equations together results in the cancellation of the terms in odd powers of :

Three point stencil example

[edit]

For example, the three point stencil for the second derivative of a function is given by:

This is obtained from the Taylor series expansion of the first derivative of the function given by:

Replacing with , we have:

Subtraction of the above two equations results in the cancellation of the terms in even powers of :

See also

[edit]

References

[edit]
  1. Spotz, William F. (1996). "High-Order Compact Finite Difference Schemes for Computational Mechanics". The University of Texas at Austin via ResearchGate.
  2. Communications in Numerical Methods in Engineering, Copyright © 2008 John Wiley & Sons, Ltd.