Compact finite difference

From testwiki
Revision as of 18:03, 10 February 2025 by imported>ArturGesla (List of compact schemes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Multiple issues

The compact finite difference formulation, or Hermitian formulation, is a numerical method to compute finite difference approximations. Such approximations tend to be more accurate for their stencil size (i.e. their compactness) and, for hyperbolic problems, have favorable dispersive error and dissipative error properties when compared to explicit schemes.[1] A disadvantage is that compact schemes are implicit and require to solve a diagonal matrix system for the evaluation of interpolations or derivatives at all grid points. Due to their excellent stability properties, compact schemes are a popular choice for use in higher-order numerical solvers for the Navier-Stokes Equations.

Example

The classical Pade scheme for the first derivative at a cell with index i (f'i) reads;

14f'i1+f'i+14f'i+1=32fi+1fi12Δ.

Where Δ is the spacing between points with index i1, i & i+1. The equation yields a fourth-order accurate solution for f when supplemented with suitable boundary conditions (typically periodic). When compared to the 4th-order accurate central explicit method;

f'i=fi+2+8fi+18fi1+fi212Δ,

the former (implicit) method is compact as it only uses values on a 3-point stencil instead of 5.

Derivation of compact schemes

Compact schemes are derived using a Taylor series expansion. Say we wish to construct a compact scheme with a three-point stencil (as in the example):

α1f'i1+f'i+α2f'i+1=b1fi+1+afi+b2fi1.

From a symmetry argument we deduce α1=α2=α, a=0 and b1=b2=b, resulting in a two-parameter system,

αf'i1+f'i+αf'i+1+bfi+1bfi1=0.

We write the expansions around xi up to a reasonable number of terms and using notation dnfdxn=fn,

fi+1=fi+Δf'i+12Δ2fi2+16Δ3fi3+124Δ4fi4+etc.,fi1=fiΔf'i+12Δ2fi216Δ3fi3+124Δ4fi4+etc.,f'i=f'i,f'i+1=f'i+Δfi2+12Δ2fi3+16Δ3fi4+124Δ4fi5+etc.,f'i1=f'iΔfi2+12Δ2fi316Δ3fi4+124Δ4fi5+etc.,

Each column on the right-hand side gives an equation for the coefficients α,b,

fi:   bb=0, (Trivial)f'i:   2Δb+1+2α=0, (eq. 1)fi2:   bb+αα=0, (Trivial)fi3:   13bΔ3+Δ2α=0. (eq. 2).

We now have two equations for two unknowns and therefore stop checking for higher-order-term equations.

eq. 2: b=3Δα,eq. 1: 6α+1+2α=0,α=14, and, b=34Δ,

which is indeed the scheme from the example.

Evaluation of a compact scheme

Template:Empty section

List of compact schemes

First derivative f'i

4th order central scheme:

14f'i1+f'i+14f'i+1=32fi+1fi12Δ.


6th order central scheme:

13f'i1+f'i+13f'i+1=149fi+1fi12Δ+19fi+2fi24Δ.


Second derivative f'i

4th order central scheme:

110f'i1+f'i+110f'i+1=65fi+12fi+fi1Δ2.


References

Template:Reflist