3.3 Approximation of the First Derivative
45
The above approximations are third order BDS, third order FDS, and fourth
order CDS schemes, respectively. On non-uniform grids, the coefficients in
the above expressions become functions of grid expansion ratios.
In the case of FDS and BDS, the major contribution to the approximation
comes from one side. In convection problems, BDS is sometimes used when
flow is locally from node xi-1 to xi and FDS when the flow is in the negative direction. Such methods are called upwind schemes (UDS). First order
upwind schemes are very inaccurate; their truncation error has the effect of
a false diffusion (i.e. the solution corresponds to a larger diffusion coefficient,
which is sometimes much larger than the actual diffusivity). Higher-order
upwind schemes are more accurate, but one can usually implement a CDS
of higher order with less effort, since it is not necessary to check the flow
direction (see above expressions).
We have demonstrated only one-dimensional polynomial fitting here; a
similar approach can be used together with any type of shape function or
interpolant in one-, two-, or three-dimensions. The only constraint is the
obvious one that the number of grid points used to compute the coefficients
of the shape function must equal the number of available coefficients. This
approach is attractive when irregular grids are used, because it allows the
possibility of avoiding the use of coordinate transformations; see Sect. 8.5.
3.3.3 Compact Schemes
For uniformly spaced grids, many special schemes can be derived. Among
these are compact schemes and the spectral methods described later. Here,
only Pad4 schemes will be described.
Compact schemes can be derived through the use of polynomial fitting.
However, instead of using only the variable values at computational nodes to
derive the coefficients of the polynomial, one also uses values of the derivatives at some of the points. We will use this idea t o derive a fourth-order
Pad6 scheme. The objective is to use information from near-neighbor points
only; this makes solution of the resulting equations simpler and reduces the
difficulty of finding approximations near the domain boundaries. In the particular schemes described here, we will use the variable values a t nodes i ,
i + 1, and i - 1, and the first derivatives at nodes i + 1 and i - 1, t o obtain an
approximation for the first derivative at the node i. To this end, a polynomial
of degree four is defined in the vicinity of node i:
The coefficients ao, . . . , as can be found by fitting the above polynomial t o the
three variable and two derivative values. However, since we are interested only
in the first derivative at the node i, we only need to compute the coefficient
a l . Differentiating Eq. (3.15), we have:
45
The above approximations are third order BDS, third order FDS, and fourth
order CDS schemes, respectively. On non-uniform grids, the coefficients in
the above expressions become functions of grid expansion ratios.
In the case of FDS and BDS, the major contribution to the approximation
comes from one side. In convection problems, BDS is sometimes used when
flow is locally from node xi-1 to xi and FDS when the flow is in the negative direction. Such methods are called upwind schemes (UDS). First order
upwind schemes are very inaccurate; their truncation error has the effect of
a false diffusion (i.e. the solution corresponds to a larger diffusion coefficient,
which is sometimes much larger than the actual diffusivity). Higher-order
upwind schemes are more accurate, but one can usually implement a CDS
of higher order with less effort, since it is not necessary to check the flow
direction (see above expressions).
We have demonstrated only one-dimensional polynomial fitting here; a
similar approach can be used together with any type of shape function or
interpolant in one-, two-, or three-dimensions. The only constraint is the
obvious one that the number of grid points used to compute the coefficients
of the shape function must equal the number of available coefficients. This
approach is attractive when irregular grids are used, because it allows the
possibility of avoiding the use of coordinate transformations; see Sect. 8.5.
3.3.3 Compact Schemes
For uniformly spaced grids, many special schemes can be derived. Among
these are compact schemes and the spectral methods described later. Here,
only Pad4 schemes will be described.
Compact schemes can be derived through the use of polynomial fitting.
However, instead of using only the variable values at computational nodes to
derive the coefficients of the polynomial, one also uses values of the derivatives at some of the points. We will use this idea t o derive a fourth-order
Pad6 scheme. The objective is to use information from near-neighbor points
only; this makes solution of the resulting equations simpler and reduces the
difficulty of finding approximations near the domain boundaries. In the particular schemes described here, we will use the variable values a t nodes i ,
i + 1, and i - 1, and the first derivatives at nodes i + 1 and i - 1, t o obtain an
approximation for the first derivative at the node i. To this end, a polynomial
of degree four is defined in the vicinity of node i:
The coefficients ao, . . . , as can be found by fitting the above polynomial t o the
three variable and two derivative values. However, since we are interested only
in the first derivative at the node i, we only need to compute the coefficient
a l . Differentiating Eq. (3.15), we have: