86
2. Basic Finite-Difference Methods
Y48t ::: 0.0625 . When Y28t = 0.25 (or Y48t = 0.0625) any 28x wave will be
completely removed by a single application of the second-order (or fourth-order)
filter.
2.4.4 Compact Differencing
Further improvements in the filtered solutions shown in Fig. 2.16 can be obtained
by using more accurate finite-difference schemes. Simply switching to a higherorder explicit scheme, such as the centered sixth-order difference
df
dx = "2
3 02x f - S04xf + 1006xf + 0
[6] (8x)
3
1
(2.79)
(where the operator Onx is defined by (2.7», provides only marginal improvement.
More significant improvements can be obtained using compact differencing, in
which the desired derivative is given implicitly by a matrix equation. Dur attention will be restricted to compact schemes in which this implicit coup1ing leads
to tridiagonal matrices, since tridiagonal systems can be evaluated with modest
computationa1 effort (see Appendix).
The simplest compact scheme is obtained by rewriting the expression for the
truncation error in the centered second-order difference (2.8) in the form
(2.80)
Expanding the finite-difference operators in the preceding expression yields the
following 0 [(8X)4] accurate expression for the derivative:
fj+1 - fj-I
28x
1 [(d
f)
(d
f)
(d
f)
]
= 6 dx j+1 + 4 dx j + dx j-I .
(2.81)
This scheme allows fourth-order-accurate derivatives to be calculated on a three -
point stencil. At intermediate numerical resolution, the fourth-order compact
scheme is typically more accurate than the sixth-order explicit difference (2.79) .
If one is going to the trouble to solve a tridiagonal matrix, it can be advantageous to do a little extra work and use the sixth-order tridiagonal scheme. The
formula for the sixth-order tridiagonal compact scheme may be derived by first
noting that the truncation error in the fourth-order explicit scheme (2.9) is
I _ (8X)2 02) 0 f = df _ (8x)4 d5 f + 0 [(8 )6]
(
6
x 2x
dx
30 dx 5
x ,
6
0 2) df _ (8X)4 d5 f + 0[(8 )6]
x dx
180 dx 5
s f = (I + (8X)2
and the truncation error in the fourth-order compact scheme (2.80) is
2x
x
.
2. Basic Finite-Difference Methods
Y48t ::: 0.0625 . When Y28t = 0.25 (or Y48t = 0.0625) any 28x wave will be
completely removed by a single application of the second-order (or fourth-order)
filter.
2.4.4 Compact Differencing
Further improvements in the filtered solutions shown in Fig. 2.16 can be obtained
by using more accurate finite-difference schemes. Simply switching to a higherorder explicit scheme, such as the centered sixth-order difference
df
dx = "2
3 02x f - S04xf + 1006xf + 0
[6] (8x)
3
1
(2.79)
(where the operator Onx is defined by (2.7», provides only marginal improvement.
More significant improvements can be obtained using compact differencing, in
which the desired derivative is given implicitly by a matrix equation. Dur attention will be restricted to compact schemes in which this implicit coup1ing leads
to tridiagonal matrices, since tridiagonal systems can be evaluated with modest
computationa1 effort (see Appendix).
The simplest compact scheme is obtained by rewriting the expression for the
truncation error in the centered second-order difference (2.8) in the form
(2.80)
Expanding the finite-difference operators in the preceding expression yields the
following 0 [(8X)4] accurate expression for the derivative:
fj+1 - fj-I
28x
1 [(d
f)
(d
f)
(d
f)
]
= 6 dx j+1 + 4 dx j + dx j-I .
(2.81)
This scheme allows fourth-order-accurate derivatives to be calculated on a three -
point stencil. At intermediate numerical resolution, the fourth-order compact
scheme is typically more accurate than the sixth-order explicit difference (2.79) .
If one is going to the trouble to solve a tridiagonal matrix, it can be advantageous to do a little extra work and use the sixth-order tridiagonal scheme. The
formula for the sixth-order tridiagonal compact scheme may be derived by first
noting that the truncation error in the fourth-order explicit scheme (2.9) is
I _ (8X)2 02) 0 f = df _ (8x)4 d5 f + 0 [(8 )6]
(
6
x 2x
dx
30 dx 5
x ,
6
0 2) df _ (8X)4 d5 f + 0[(8 )6]
x dx
180 dx 5
s f = (I + (8X)2
and the truncation error in the fourth-order compact scheme (2.80) is
2x
x
.
