The behaviour of the Cubic splines, Taut splines of de Boor (1978), cubic Hermite, monotone cubic Hermite of Fritsch and Carlson (1980), the C 2 cubic Hermite exponential interpolant of Renka (1987), Quintic spline of Herriot and Reinsch (1976) and the cubic Exponential spline of Rentrop (1980), will be examined with the use of the C°° function, y = Tanh(a{\ - *)), where
a is an arbitrary constant. The values selected for the constant a are l, 4 and 20 and the test functions are shown in Figure 3.2.
Figure 3.2 Tank functions used to test the interpolation schemes
These parameters provided a wide range of interpolation test functions, ranging from smooth to steep profiles and should provide a reasonable test for the interpolation schemes.
In the Quasi-characteristic scheme, interpolation of the nodal concentrations and accurate estimates of the second derivatives are required for the first-order scheme.
Instead of fitting the interpolant to the concentration profile and interpolating for the unknown concentrations, the interpolant is also fitted to the integral of the concentration profile to ensure that mass is conserved. This is a significant improvement of the basic Quasi-characteristic method. The unknown nodal concentrations are obtained by differentiating the interpolant at the grid points.
Since the integral of the concentration profile is a smoother function than the concentration profile, less computational effort is required to fit a shape preserving interpolant and a more accurate interpolant is obtained near discontinuities in the concentration profile. Therefore, accurate estimates of the nodal concentrations, obtained by fitting an interpolant to the integral
The Quasi-Characteristic Method 3.20
of a function, are also required.
The second derivative and integral of the test function are; y" = -2a2Sech2{a{\ - *)) Tanh{a{ 1 - *)) and { ydx = -ln(Cosh(a( 1 - x)))/a respectively.
The various interpolation schemes are fitted to thirty-three data sets containing between 11 and 601 data points, (Ax = xj+l - *y = 0.2 to 0.0033) defining the Tank function.
As a measure of closeness of an interpolating function F(a,x) to the continuous function y(x), for each interpolation scheme the standardized Lu L2 and L«, norms given by equation (2.40) to (2.42), are evaluated at 104 equally spaced interpolation points in the interval 0 < x < 2. Identical boundary conditions are used for each interpolation scheme. For comparative purposes a sixth-order finite difference (m = 5) scheme (Table 25.2, Abramowitz and Stegun [1970])
k\ m\Ax*
m
E'W*,)
(3.23)is used for the first, (k = 1) and the second derivative, (k = 2) boundary conditions. The coefficients for the derivatives at x = 0 are for k = 1; A0 = -274, A 1 = 600, A2 = -600,
A3 = 400, A4 = -150 and As = 24 has 0{Ax6) and for k — 2; A0 = 225, A x = -770,
A2 = 1070, A3 = -780, A4 = 305 and As = -50 has 0(Ax6) and A, = Am, i = l,2 ,...,m for the derivatives at x = 2. The accuracy of these schemes for the derivative boundary conditions is greater than the accuracy required by the interpolants.
The theoretical accuracy of the interpolants can be established by considering the piecewise cubic Hermite interpolant. From equation (3.9) the error of a piecewise cubic Hermite P3(x) which interpolates^*) at xjf Xj, xj+l and xj+l is given by
P 3W - Ax) = — f (,%)(x- xp2(X -
where* 6 [xjtxj+l] and ^ E (xjrxj+l). This error assumes that/(*) is four times differentiable. For equally spaced data
A*
T
4
then
Ip3(x)
- m \therefore the error behaves like 0(Ax4).
For equally spaced data, an m + 1 order interpolant has an error term of 0 (Axm+1). The convergence rate for Quintic splines, where m = 5 is 0(Ax6) and for all cubic interpolants,
Obtaining the /Th derivative of an interpolant can be considered as fitting a 1 + m - k degree interpolant to the data. Therefore, analogous to the error analysis above, the k\h derivative of an interpolant of degree m results in an 0(Ax1+m"*) approximation for the &th derivative. A cubic interpolant should produce an 0(Ax2) approximation for the second derivative. For Quintic splines, 0 (Ax4) approximation should be achieved for the second derivative of the interpolant. A cubic interpolant is also fitted to the integral of the function values. An approximation of the function values are obtained by differentiating the interpolating function and the second derivative of the function is obtained from the third derivative of the interpolating function. The approximation of the function values using cubic interpolants should be 0 (Ax3) accurate and for the second derivative of the function to 0 (Ax) accuracy.
These theoretical convergence rates will be confirmed for several interpolation schemes. (a) Interpolation of the Test Function
For the cubic interpolants, second derivative boundary conditions approximated using equation (3.23) were used. An additional boundary condition was required for the Quintic splines. This was provided by estimating the derivative of the function at the boundary also using equation (3.23) .
For the smooth profiles, the convergence rates for the Cubic spline, cubic Hermite, monotone cubic Hermite and the cubic Hermite exponential interpolant all exhibit the same convergence rate for all the norms, Llf L2 and L», see Figures 3.3 to 3.5. They all have 0 (Ax4) convergence
rates. In these figures the convergence rates for these interpolation schemes are indistinguishable. The convergence rate is 0(Ax6) for the Quintic spline and the norms approach machine accuracy for smallest Ax’s.
These results are typical of the convergence rates obtained for the Lu L2 and L«, norms. Therefore only the L x norm will be presented in the subsequent discussion, unless the norms exhibit different convergence rates. These convergence rates were also obtained for a = 1 ,4 and 20. However in Figure 3.6, where a = 20, the correct convergence rates were only obtained for relatively small values of Ax.
Erratic error estimates were obtained for large Ax, where there are insufficient computational points to adequately resolve the steep profile. As the number of computational points increases, decreasing Ax, there are sufficient points to adequately define the profile and the true convergence rate of the scheme is revealed. In this initial region, odd numbers of intervals used to discretize the domain produced the smallest norms.
Similar results were obtained for L^ and L* norms. In each case the convergence rate for cubic interpolants is 0(Ax4) and for the Quintic spline 0(Ax6).
The Quasi-Characteristic Method 3.22
Log(Ax)
Figure 3.3 Lj norm using several interpolation schemes for y = Tanh( 1(1 - *))
o . - l . -2. -3. -4. -5. -6. -7. — 8. -9. o - 1 0 . -1 1. - 12. - 1 3. - 1 4. -1 5. -1 6. Cubic HcrmiU Monotone Hermite Quintic Hermite Exponential Log(Ax)
o. - l . -2. -3. -4. -5. -7. £ -O 1 ,0. “-a -1 1. —8. -9. -1 2. - 1 3. - 1 4. - 1 5. - 1 6. Cubic Hermiu Monotone Hermite Quintic Hermiu Exponential L o g ( A x )
Figure 3.5 L* norm using several interpolation schemes for y — Tanh( 1(1 - *))
o . - l . -2. -3. -4.
I "I -e-
I
-a. -9. - 1 0. - l i . - 1 2. Cubic Hermiu Monotone Hermite Quintic Hermite Exponential L o g ( A x )The Quasi-Characteristic Method 3.24
From these results there is no loss in accuracy by ensuring that the interpolant possesses the characteristics of the data, such as monotonicity. However, this was not the case for Taut splines. Since the Taut spline is also a cubic interpolant, its convergence rates should be 0 (Ax4). This convergence rate was achieved for the L, norm only, see Figures 3.7 to 3.9. Although, the rate of convergence for each norm is independent of a, the convergence rates for each norm differ. The L2 norm converges at the rate (^(Ax3 5) and for the L« norm at the rate 0(Ax3).
A A □ □ -1 0. -1 1. - 1 2. - 2.5 - 2.0 - 1.5 - 1.0 Log(A x)
Figure 3.7 norm for y = Tanh(a(\ - x)) using the Taut spline
The erratic behaviour of the norms for large Ax is due to insufficient computational points to adequately resolve the profile. More important is the deterioration in the estimated norm for some values of Ax throughout the data set. The deterioration in the local estimate of the norms is attributable to the selection of additional knots between data abscissae in an attempt to preserve convexity of the data. The deterioration increases with increasing a because as the profile steepens, an additional knot is placed close to data point to avoid oscillations in the spline. When this occurs the second derivative is not continuous (de Boor [1978]). In addition, as the additional knot approaches a data point, the interpolant contains a sharp bend to ensure convexity of the data. This increase in curvature of the interpolant reduces the convergence and accuracy of the interpolant. The amount of curvature is controlled by a user selectable parameter
y E [1,3]. The smoothing parameter recommended by de Boor (1978) and used to produce these results was y = 2.5. However, the norms were insensitive to the choice of y.
A A
-11.
-2.5 - 1.5
Log(Ax)
Figure 3.8 L2 norm for y = Tanh{a{\ - x)) using the Taut spline
-n.
- 1.0
- 2.5 - 1.5
L o g ( A x )
The Quasi-Characteristic Method 3.26
O a =
-1 0. 1 □
- 1 1.
L o g (A x )
Figure 3.10 L x norm for y = Tanh(a( 1 - x)) using Exponential splines
Unlike the Taut splines, the rate of convergence of the Lu L2 and norms obtained for the
Exponential splines of Rentrop were identical. The convergence rate for the L x norm shown in Figure 3.10 is 0(Ax4).
Unsatisfactory tension parameters are obtained when the second derivative of the Cubic spline is nearly zero at the inflection point of the profile (at x = 1). Rounding error effects can produce incorrect signs in the second derivative estimates, which are used in determining the tension parameters in equation (3.21). The effect of these rounding errors resulted in values for the tension parameter outside the range 4 < X, < 15. The use of excessively large tension parameters produced flat regions in the interpolant and a reduction in the predicted norm by an order of magnitude for some values of Ax. This was more pronounced for the steeper profile and occurred throughout the data set. Restricting values of the tension parameter had limited success. Therefore, the strategy suggested by Rentrop (1980) is not robust.
These results illustrate the difficulty in using simple techniques to estimate the tension parameters, such as equation (3.21). It is apparent that to obtain a robust and accurate exponential interpolant, an iterative strategy such as that used by Renka for estimating the tension parameters is required.
(b) Evaluation of the Second Derivative
The second derivative of the interpolating function is required for the solution of the advective- diffusion equation in the first-order Quasi-characteristic scheme.
The second derivative of the interpolant was calculated for all the interpolation schemes used to interpolate the function values. The accuracy of these schemes in approximating the second derivative of the test function, y = Tanh(a( 1 - x)) which is known, was estimated using the L u L2 and norms. The norms were evaluated at 104 points in the interval 0 < x < 2.
The L x norm for approximating the second derivative using Cubic, cubic Hermite, monotone cubic Hermite, Quintic and cubic Hermite exponential interpolants are presented in Figure 3.11. In all cases the theoretical rates of convergence were obtained, 0 (Ax2) for the cubic interpolants and 0 (Ax4) for the Quintic spline. Identical rates of convergence were obtained for the L^ and L* norms.
The same problems encountered in the interpolation of the function values also occurred for Lx
norm for the second derivative approximation for large values of Ax and a = 20, see Figure 3.12. There are insufficient points to adequately define the profile for large Ax. The result is a saw-tooth error profile in this region. These oscillations vanished when the profile was adequately defined by a sufficiently large number of points and the correct convergence rates were then obtained.
The L u L2 and L» norm approximation of the second derivative obtained using the Taut splines are shown in Figures 3.13, 3.14 and 3.15 respectively. The convergence rates are independent of a. However, each norm exhibits different convergence rates, 0 (Ax2) for Lu 0 (Ax15) for L7 and 0 (Ax) for L w norm. Only the L x norm exhibits the convergence rates predicted for cubic interpolants 0 (Ax2).
The results shown in Figures 3.7 to 3.9 and Figures 3.13 to 3.15 illustrate the problems associated with Taut splines. The additional knots are located to satisfy convexity properties of the data, thereby avoiding oscillations introduced by the interpolant. This is achieved at the sacrifice of other desirable properties, such as accuracy and monotonicity. Therefore, Taut splines will not be used in the Quasi-characteristic scheme.
The second derivative of the Exponential spline at any point is given by Wever (1988) as
d2E(x) _ dj.,. tfhjSinhiX/i/)
■ + d>- XjhjSinh(X/ij(l-t)) . dt2 a; Sinh(kjhj)
Vi
Sinh(kjhj)The Quasi-Characteristic Method 3.28 Cubic Hermite Monotone Hermite - 1 0. -1 1. Hermite Exponential -2.5 - 1.5 - 1.0 L o g ( A x )
Figure 3.11 Lx norm for approximating (fy/dx2 using several interpolation schemes of y = Tanh{ 1(1 - x)) 2. l . 0 . -1. -2.
!
i
- 3. - 4. - 5. -6. -7. -8. -9. -1 0. - 1 1. -1 2. Cubic Hermite Monotone Hermite Quintic Hermite Exponential -2.5 - 2 .0 - 1.5 - 1 .0 L o g ( A x )Figure 3.12 Lx norm for approximating dhyldh? using several interpolation schemes of y — Tanh{20{\ - x))
- l i .
L o g (A x )
Figure 3.13 Lx norm for approximating (fy/dx2 using Taut splines
O a - 1 0. -1 1. - 1.0 - 2.5 -2 .0 L o g ( A x )
The Quasi-Characteristic Method 3.30
> 0 0 0 °
A O A
-2 .0 - 1 .5 - 1 .0 Log(Ax)
Figure 3.15 L«, norm for approximating d^yldx2 using Taut splines
o o O O
- 1 0.
-11.
-2 .5 -2 .0 - 1.0
Log{Ax)
The strategy used by Rentrop was used to estimate the tension parameters, required by the Exponential spline. The convergence rate for the Lx norm is shown in Figure 3.16 for the Exponential spline approximation of the second derivative. The convergence rate for the second derivative estimation is 0{Ax2) for all values of a. Identical rates of convergence were obtained for the other norms.
For some values of Ax, rounding errors produced excessively large tension parameters. These parameters produced flat regions in the interpolant which reduced the predicted norm. The reduction in the L x norm, by an order of magnitude also coincided with the reduction observed in the norm for the interpolation of the function values.
The strategy proposed by Rentrop for estimating the tension parameters in an Exponential spline is susceptible to rounding errors. The strategy may produce large tension parameters resulting in flat region in the interpolant. This has a detrimental influence on the accuracy of the interpolant and in estimating the second derivative of the function values. Fortunately the rate of convergence of the scheme is not affected. In view of these limitations the Exponential spline and the Rentrop strategy for estimating the tension parameters will not be used in the Quasi characteristic scheme.
(c) Fitting a C2 Cubic Hermite Exponential Interpolant to the Integral
The C 2 cubic Hermite exponential interpolant was also fitted to the integral of the function. The interpolating function is differentiated to obtain the function values. The L x norm for the first derivative of the interpolant is shown in Figure 3.17 for all values of a. The correct convergence rates have been obtained, that is the interpolant provides (^(Ax3) accurate estimates of the function values. The third derivative of the interpolating function is required to obtain estimates of the second derivative of the function values. The convergence rate for approximating the second derivative of the function values, shown in Figure 3.18 was obtained by fitting the interpolant to the integral of the function values, is O(Ax), which coincides with the theoretical convergence rate for all values of a. Identical rates of convergence were obtained for the L2 and L«, norms.
The Cubic and Quintic splines, cubic Hermite, monotone cubic Hermite and the cubic Hermite exponential interpolants all exhibit the convergence rates commensurate to the order of accuracy of the interpolation scheme for approximating the function values and the second derivative of the interpolated function. The cubic Hermite exponential interpolant fitted to the integral of the function values also produces the correct rates of convergence for the function values and the second derivative of the function values.
The Quasi-Characteristic Method 3.32 Oo o a = -1 0. - 2.5 -2 .0 L o g ( A x )
Figure 3.17 L x norm for y(;t) obtained by fitting the cubic Hermite exponential
interpolant to J Tanh{a{ 1 - x))dx
cPcPo o
L o g (A x )
Figure 3.18 L x norm for ( fy ld x 1 obtained by fitting the cubic Hermite exponential