Compact stencil

Compact stencil
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 currently implemented in many partial differential equation solvers, including several in the topics of CFD, FEA, and other mathematical solvers relating to PDE's.[1][2]

Contents

Two Point Stencil Example

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


f'(x_0)=\frac{f\left(x_0 + h\right) - f\left(x_0 - h\right)}{2h} + O\left(h^2\right)
.


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

\begin{array} {l}
f'(x_0)=\frac{f\left(x_0 + h\right) - f(x_0)}{h} -\frac{f^{(2)}(x_0)}{2!}h - \frac{f^{(3)}(x_0)}{3!}h^2 - \frac{f^{(4)}(x_0)}{4!}h^3 + \cdots
\end{array}.


Replacing h with h, we have:

\begin{array} {l}
f'(x_0)=-\frac{f\left(x_0 - h\right) - f(x_0)}{h} + \frac{f^{(2)}(x_0)}{2!}h - \frac{f^{(3)}(x_0)}{3!}h^2 + \frac{f^{(4)}(x_0)}{4!}h^3 + \cdots 
\end{array}.


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

\begin{array} {l}
2f'(x_0)=
\frac{f\left(x_0 + h\right) - f(x_0)}{h}
-\frac{f\left(x_0 - h\right) - f(x_0)}{h}
-2\frac{f^{(3)}(x_0)}{3!}h^2 + \cdots
\end{array}.

\begin{array} {l}
f'(x_0)=
\frac{f\left(x_0 + h\right) - f\left(x_0 - h\right)}{2h} - \frac{f^{(3)}(x_0)}{3!}h^2 + \cdots
\end{array}.

\begin{array} {l}
f'(x_0)=
\frac{f\left(x_0 + h\right) - f\left(x_0 - h\right)}{2h} + O\left(h^2\right)
\end{array}.


Three Point Stencil Example

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

\begin{array} {l}
f^{(2)}(x_0)=
\frac{f\left(x_0 + h\right) + f\left(x_0 - h\right) - 2f(x_0)}{h^2} + O\left(h^2\right)
\end{array}.


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

\begin{array} {l}
f'(x_0)=\frac{f\left(x_0 + h\right) - f(x_0)}{h} -\frac{f^{(2)}(x_0)}{2!}h - \frac{f^{(3)}(x_0)}{3!}h^2 - \frac{f^{(4)}(x_0)}{4!}h^3 + \cdots
\end{array}.


Replacing h with h, we have:

\begin{array} {l}
f'(x_0)=-\frac{f\left(x_0 - h\right) - f(x_0)}{h} + \frac{f^{(2)}(x_0)}{2!}h - \frac{f^{(3)}(x_0)}{3!}h^2 + \frac{f^{(4)}(x_0)}{4!}h^3 + \cdots 
\end{array}.


Subtraction of the above two equations results in the cancellation of the terms in even powers of h: \begin{array} {l}
0=
\frac{f\left(x_0 + h\right) - f(x_0)}{h}
+\frac{f\left(x_0 - h\right) - f(x_0)}{h}
- 2\frac{f^{(2)}(x_0)}{2!}h - 2\frac{f^{(4)}(x_0)}{4!}h^3 + \cdots
\end{array}.

\begin{array} {l}
f^{(2)}(x_0)=
\frac{f\left(x_0 + h\right) + f\left(x_0 - h\right) - 2f(x_0)}{h^2} - 2\frac{f^{(4)}(x_0)}{4!}h^2 + \cdots
\end{array}.

\begin{array} {l}
f^{(2)}(x_0)=
\frac{f\left(x_0 + h\right) + f\left(x_0 - h\right) - 2f(x_0)}{h^2} + O\left(h^2\right)
\end{array}.


See also

External links

References

  1. ^ W. F. Spotz. High-Order Compact Finite Difference Schemes for Computational Mechanics. PhD thesis, University of Texas at Austin, Austin, TX, 1995.
  2. ^ Communications in Numerical Methods in Engineering, Copyright © 2008 John Wiley & Sons, Ltd.

Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Non-compact stencil — A 2D non compact stencil In numerical mathematics, a non compact stencil is a type of discretization method, where any node surrounding the node of interest may be used in the calculation. A non compact stencil s computational time increases with …   Wikipedia

  • Stencil (numerical analysis) — In mathematics, especially the areas of numerical analysis concentrating on the numerical solution of partial differential equations, a stencil is a geometric arrangement of a nodal group that relate to the point of interest by using a numerical… …   Wikipedia

  • List of numerical analysis topics — This is a list of numerical analysis topics, by Wikipedia page. Contents 1 General 2 Error 3 Elementary and special functions 4 Numerical linear algebra …   Wikipedia

  • List of mathematics articles (C) — NOTOC C C closed subgroup C minimal theory C normal subgroup C number C semiring C space C symmetry C* algebra C0 semigroup CA group Cabal (set theory) Cabibbo Kobayashi Maskawa matrix Cabinet projection Cable knot Cabri Geometry Cabtaxi number… …   Wikipedia

  • List of mathematics articles (N) — NOTOC N N body problem N category N category number N connected space N dimensional sequential move puzzles N dimensional space N huge cardinal N jet N Mahlo cardinal N monoid N player game N set N skeleton N sphere N! conjecture Nabla symbol… …   Wikipedia

  • List of mathematics articles (S) — NOTOC S S duality S matrix S plane S transform S unit S.O.S. Mathematics SA subgroup Saccheri quadrilateral Sacks spiral Sacred geometry Saddle node bifurcation Saddle point Saddle surface Sadleirian Professor of Pure Mathematics Safe prime Safe… …   Wikipedia

  • Old Fashioned Oriental Frill — The Classic Oriental Frill is an exhibition breed of pigeon from the Owl family. It is a Turkish breed specially bred for the Ottoman Sultans. In its homeland it is known as Hünkari: the bird of the Sultans. It is known that upon the sultans… …   Wikipedia

  • Topology — (Greek topos , place, and logos , study ) is the branch of mathematics that studies the properties of a space that are preserved under continuous deformations. Topology grew out of geometry, but unlike geometry, topology is not concerned with… …   Wikipedia

  • Eurostile — Infobox font name = Eurostile style = Sans serif based on = Microgramma releasedate = 1962 creator = Aldo Novarese, Akira Kobayashi foundry = Nebiolo foundries = Linotype, URW variations = Microgramma Microstyle sample = Eurostile (sometimes… …   Wikipedia

  • printing — /prin ting/, n. 1. the art, process, or business of producing books, newspapers, etc., by impression from movable types, plates, etc. 2. the act of a person or thing that prints. 3. words, symbols, etc., in printed form. 4. printed material. 5.… …   Universalium

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”