Abstract

We introduce two methods based on higher order compact finite differences for solving boundary layer problems. The methods called compact finite difference relaxation method (CFD-RM) and compact finite difference quasilinearization method (CFD-QLM) are an alternative form of the spectral relaxation method (SRM) and spectral quasilinearization method (SQLM). The SRM and SQLM are Chebyshev pseudospectral-based methods which have been successfully used to solve boundary layer problems. The main objective of this paper is to give a comparison of the compact finite difference approach against the pseudo-spectral approach in solving similarity boundary layer problems. In particular, we seek to identify the most accurate and computationally efficient method for solving systems of boundary layer equations in fluid mechanics. The results of the two approaches are comparable in terms of accuracy for small systems of equations. For larger systems of equations, the proposed compact finite difference approaches are more accurate than the spectral-method-based approaches.

1. Introduction

Low-order (second or lower) finite difference schemes are not accurate enough for solving many problems in fluid dynamics and other areas. Recently the focus has shifted to higher-order compact finite difference (CFD) schemes. Researchers have found significant improvement to the accuracy of numerical solutions by using fourth or sixth-order CFD schemes compared to the convectional second order finite central difference scheme [1]. Various CFD schemes used for applications such as interpolation, filtering, and evaluating high-order derivatives were discussed in detail by Lele [2]. CFD schemes have largely been applied to solve partial differential equations, for example, Burger’s equation [3, 4], Navier-Stokes equation [5], Korteweg-de Vries equation [6], Black-Scholes equation [7], and many more [810]. A limited number of researchers have utilised the CFD schemes in ordinary differential equations. For example in [11], Zhao solved two-point boundary value problems. In [12], Zhao and Corless used the CFD schemes to solve integro-differential equations.

The advantage of the higher-order CFD schemes is that they give high accuracy on coarser grids with greater computational efficiency [13]. The difficulty that comes with the higher order CFD schemes especially near the boundaries makes many researchers shy away from using them in practical computations. To retain the accuracy of the schemes at the boundaries, the schemes are adjusted for the boundary points.

When compared to spectral methods, compact schemes are more flexible in terms of application to complex geometries and boundary conditions. Lele [2] pointed out that the use of spectral methods in turbulent fluid flows is limited to flows in simple domains and simple boundary conditions. Spectral methods become less accurate for problems with complex geometries. Rai [14] gave a comprehensive comparison between results obtained using finite differences and spectral methods for direct simulation of turbulent flows. They used high-order accurate upwind schemes. They concluded that the spectral method is extremely accurate but it has restrictions on the type of geometry and grids that can be efficiently handled. They further state that unlike the spectral methods, the finite difference method can be used efficiently with curvilinear grids.

In recent years Motsa and his coworkers [1518] have developed successful methods based on the spectral method to solve nonlinear similarity boundary layer problems. The methods include, among others, the spectral relaxation method (SRM) [15, 19, 20], the spectral successive linearisation method [2123], spectral homotopy analysis method [2427], and the spectral quasilinearisation method (SQLM) [16]. The SRM is based on simple decoupling and rearrangement of the governing equations and numerically integrating the resulting equations using the Chebyshev spectral collocation method. The SQLM combines the quasilinearization technique developed by Bellman and Kalaba [28] to linearize nonlinear differential equations and solve the resulting equations using the spectral method. In this work we present alternative approach to the implementation of the SRM and SQLM. Instead of using the spectral method in these methods, we use the higher order CFD schemes, and hence the resulting methods are the compact finite difference relaxation method (CFD-RM) and compact finite difference quasilinearization method (CFD-QLM), respectively.

The main objective of this work is to compare the spectral-method-based and the CFD-based methods discussed above. We compare the performance of the methods in terms of accuracy and computational speed when solving nonlinear boundary layer problems in one dimension and three dimensions. We first consider the flow of a viscous incompressible electrically conducting fluid over a continuously shrinking sheet which is governed by a third-order nonlinear differential equation. The known exact analytical solution [29, 30] of this problem is used as a benchmark to validate the accuracy of the proposed algorithm discussed in this work. We also consider a a three-equation system that models the problem of unsteady free convective heat and mass transfer on a stretching surface in a porous medium in the presence of a chemical reaction [23, 31].

2. Description of the Methods of Solution

This section presents a brief description of how the proposed iterative methods of solution are developed for a general system of nonlinear ordinary differential equations in unknown functions.

2.1. Spectral Relaxation Method

The spectral relaxation method (SRM) is a new method that has been introduced recently by Motsa et al. [15, 19, 20] to solve initial and boundary value problems. The method is based on simple decoupling and rearrangement of the governing equations and numerically integrating the resulting equations using the Chebyshev spectral collocation method. The algorithm for the method is summarized as follows.(1)Arrange the governing nonlinear equations in a particular order, placing the equations with the least unknowns at the top of the equations list. (2)Assign the labels to the ordered equations obtained in the above step, where each is an unknown function which, in the th equation, is identified as the unknown function associated with the highest-order derivative. (3)In the equation for (1st equation), the iteration scheme is developed by assuming that only linear terms in are to be evaluated at the current iteration level (denoted by ) and all other terms (linear and nonlinear) in are assumed to be known from the previous iteration (denoted by ). In addition nonlinear terms in are also evaluated at the previous iteration. Furthermore, all derivative terms in are assumed to be known from the previous iteration. (4)Similarly, in developing the iteration scheme in the equation for (2nd equation), only linear terms in are evaluated at the current iteration level () with all other terms evaluated at the previous level, except which is now known from the solution of the first equation. (5)This process is repeated in the th equation () using the updated solutions for obtained from the previous equations. The resulting iteration scheme is integrated using the Chebyshev spectral method. The region of integration is discretized using the Gauss-Lobatto points defined by where is the number of collocation points used. The Chebyshev spectral collocation method is based on the idea of introducing a differentiation matrix which is used to approximate the derivatives of the unknown variables at the collocation points as the matrix vector product where is the vector function at the collocation points .

2.2. Compact Finite Difference Relaxation Method

The compact finite difference relaxation method (CFD-RM) uses the same procedure followed in the SRM. The difference is that instead of using spectral methods to solve the resulting iteration schemes, higher order compact finite difference schemes are used. In this work we use sixth-order CFD schemes.

In the derivation of the CFD schemes we consider a one-dimensional uniform mesh on the region with nodes () where and a corresponding function at the nodes. The distance between any two successive nodes is a constant . Sixth-order approximations of the first, second, and third derivatives at interior nodes can be obtained using the following schemes (see [2] for details):

For illustrative purposes we describe the application of the CFD schemes to second-order differential equations for with known boundary conditions at and . Consider the nonlinear differential equations where is a nonlinear function, and are known functions of , and and are known constants. In solving (7), we apply the CFD approximation for the first and second derivatives given by (4) and (5), respectively, at the interior nodes . Since we know boundary conditions at and , the CFD schemes must be adjusted for the nodes near the boundary points. In order to maintain the order accuracy at the boundary points as in the interior points and to maintain the same tridiagonal format, we use the following one-sided scheme at : and when , we use where are constants to be determined. To obtain a sixth-order accurate scheme, we use Taylor series expansion about and up to , in (8) and (9), respectively, and equate terms of order . In each case, we obtain a system of seven linear algebraic equations in seven unknowns which are solved to give

Similarly, for the second derivatives, we use at and at . The parameters can be determined by expanding (11) and (12) using Taylor series and equating powers of and subsequently solving the resulting equations. This gives

Using the above equations, the equations for approximating the first- and second-order derivatives can be expressed as where

For the purposes of the examples given in this work, we also illustrate the application of the CFD schemes for the following set of boundary conditions:

We adjust the schemes near the boundary points as discussed above. In this case, the schemes at are also adjusted. At , we use the following one-sided scheme: At , we use and at , we use with the constants given by

Similarly for the second derivative, we use at . At , we use and at ,

The constants are found to be

Combining the schemes for approximating the first and second derivatives at interior points with (19)–(23), the equations for approximating the first and second derivatives are given by where and are the same as in (14),

Similarly, third derivatives can be expressed in the form

2.3. Spectral Quasilinearization Method

In this section we give a brief description of the spectral quasilinearization method (SQLM). In this method we make use of the quasilinearization method (QLM) and spectral method. The QLM was initially proposed by Bellman and Kalaba [28] to solve nonlinear boundary layer problems. To develop the SQLM, we consider a system of nonlinear differential equations in unknowns where is the independent variable. The system can be written as a sum of its linear and nonlinear components as Define the vector to be the vector of the derivatives of the variable with respect to the independent variable ; that is, where , is the th derivative of with respect to , and is the highest derivative order of the variable appearing in the system of equations. In addition, we define and to be the linear and nonlinear operators, respectively, that operate on the for . With these definitions (30) can be written as where are the constant coefficients of , the derivative of that appears in the th equation for . Assume that the solution of (32) at the ()th iteration is . If the solution at the previous iteration is sufficiently close to , the nonlinear component of (32) can be linearised using one-term Taylor series for multiple variables, so that (32) can be approximated as where

Equation (33) can be rewritten as

To solve the iteration scheme (35), we use the Chebyshev spectral collocation method.

2.4. Compact Finite Difference Quasilinearization Method

Using compact finite difference schemes to solve the QLM scheme (35) results in the compact finite difference quasilinearization method (CFD-QLM). We will use the sixth-order finite difference schemes the same way we used them for the CFD-RM.

3. Examples

In this section, two numerical examples are discussed to compare the CFD results against spectral method results. We consider one-dimensional and three-dimensional problems.

3.1. MHD Boundary Layer Flow over a Shrinking Sheet

We first consider a steady one-dimensional laminar flow of a viscous incompressible electrically conducting fluid over a continuously shrinking sheet. The governing equation is given (see, e.g., [29, 30]) in similarity form as subject to where and is the magnetic interaction parameter. The analytical solution for (36) is given by

We solve (36) using the SRM and CFD-RM and the SQLM and CFD-QLM. In the next subsections we explain the development of each of the methods for the solution of (36).

3.1.1. SRM and CFD-RM

To apply the SRM and CFD-RM on (36), we first set and write the equation as the following system of equations: with the boundary conditions

Applying the SRM and CFD-RM on (36), we obtain the following iteration scheme: The SRM and CFD-RM schemes that result from applying the spectral method and compact finite difference schemes on (41)-(42), respectively, are given by where for the SRM, where is an identity matrix and is a function that places a vector on the main diagonal of an matrix of zeros. For the CFD-RM, we obtain where and . is an identity matrix.

3.1.2. SQLM and CFD-QLM

To solve (36) using the SQLM and CFD-QLM, we first linearize the equation using the quasilinearization method. We first reduce the order of the equation by setting and write it as the following system of equations: with the boundary conditions

Applying the quasilinearization method on (46), we obtain subject to

The SQLM and CFD-QLM schemes that result from applying the spectral method and compact finite difference schemes on (48)-(49), respectively, are given by where in the framework of the SQLM, where O is an zero vector. For the CFD-QLM, we have

3.2. Unsteady Free Convective Heat and Mass Transfer on a Stretching Surface in a Porous Medium with Suction/Injection

In this section we consider a three-equation system that models the problem of unsteady free convective heat and mass transfer on a stretching surface in a porous medium in the presence of a chemical reaction. The governing equations [23, 31] for this problem are given as the following dimensionless system of equations and boundary conditions: subject to where , , and are, respectively, the dimensionless velocity, temperature, and concentration, is the suction/injection parameter, is the chemical reaction constant, is the Prandtl number, is the Schmidt number, is the permeability parameter, and and are the temperature- and concentration-dependent Grashof numbers, respectively.

3.2.1. SRM and CFD-RM

To apply the SRM and CFD-RM on (54), we set and obtain the following iteration scheme: subject to

Applying the Chebyshev pseudo-spectral method and finite difference schemes, we obtain

For the SRM, we have where O is an zero vector.

For the CFD-RM, we have

3.2.2. SQLM and CFD-QLM

To apply the SQLM and CFD-QLM on (54), we first apply the quasilinearization method and obtain the following iteration scheme: subject to

Applying the spectral method and compact finite difference schemes, we obtain the SQLM and CFD-QLM iteration schemes, respectively. In matrix form, the SQLM and CFD-QLM schemes are given by

For the SQLM, we have where O is an zero matrix, and for the CFD-QLM, we have where is an zero matrix and .

4. Results and Discussion

In this section we present results for Examples 1 and 2 and give a comparison between the compact-finite-difference-based methods and the spectral-method-based methods, that is, the SRM and CFD-RM and the SQLM and CFD-QLM. The solution and the velocity profiles for varying values of for Example 1 are shown by Figure 1. The numerical results are compared against the exact analytical solution and good agreement is observed in all cases of varying parameter . Tables 1 and 2 show the computed skin friction to an accuracy of obtained using the four methods.

It can be seen from Table 1 that in terms of computational speed, the SRM is efficient compared to the CFD-RM. This is because quite a large number of grid points are needed for the CFD-RM to give an accuracy of as compared to the SRM. From Table 2 we observe similar results with the SQLM being computationally faster than the CFD-QLM. Again the number of grid points is the main reason for the difference in speed. The spectral method based approaches only require few grid points to give highly accurate results.

Figure 2 shows the errors at different iterations for the CFD-RM, and CFD-QLM respectively. In all cases the error decreases with each iteration which shows convergence of the methods. Increasing the value of the magnetic interaction parameter, increases the convergence of both the CFD-RM and CFD-QLM. This may be explained by the observation that when is very large, the dominant terms in the equation from which the SRM scheme is derived are . Solving this equation gives a solution of the form (where is a constant). For large values of , the appearing in the given exact solution (38) is approximately equal to . Consequently, the exact solution reduces to an exponential equation that has the same form as the approximate equation obtained from the SRM scheme at large . The CFD-QLM shows a faster convergence than the CFD-RM as shown in Figure 2.

Figures 3 and 4 show the velocity , temperature , and concentration for Example 2 for varying values of and , respectively. We observe that the graphs are qualitatively similar to those reported in [23, 31]. The comparison of the performance of the methods is given by Tables 3 and 4. In Example 2 we compute the solution to an accuracy of . The SRM is computationally faster than the CFD-RM since it requires fewer grid points to give the required accuracy. We observe different results for the SQLM in Example 2 compared to Example 1. When comparing the results with the SRM, CFD-RM, and CFD-QLM, we observe that the SQLM fails to give results to the accuracy of as it can be seen in Table 4. In this case the CFD-QLM is much better than the SQLM in terms of accuracy. This is one instance where the advantage of using CFD over spectral approach to integrate linearised equations is highlighted. The spectral approach is less accurate than the CFD approach when large systems of equations are considered.

In terms of convergence between the CFD-RM and CFD-QLM, we observe a faster convergence with the CFD-QLM than the CFD-RM. This is depicted in Figures 5 and 6.

5. Conclusion

In this work we have introduced two new methods for solving systems of nonlinear boundary value equations. These methods called the compact finite difference relaxation method (CFD-RM) and compact finite difference quasilinearization method (CFD-QLM) are a modification of the spectral relaxation method (SRM) and the spectral quasilinearization method (SQLM), respectively. We compared the CFD schemes and spectral methods in solving nonlinear similarity boundary layer problems by comparing the CFD-based CFD-RM and CFD-QLM against the spectral-method-based SRM and SQLM. We did the comparison on one dimensional and three-dimensional problems. After comparing these methods we can conclude that they are all highly accurate with the spectral method outperforming the CFD in terms of computational speed. The SQLM though was less accurate for the three-dimensional problems. The CFD-QLM was able to handle the three-dimensional problem. We also observed that the CFD-QLM converges faster than the CFD-RM. When solving nonlinear boundary value problems, we recommend that the spectral-method-based algorithms must be used in problems involving small systems of equations and when computational speed is of importance because they are easy to code and computationally faster. CFD-based algorithms are ideal for solving large systems of equations when high accuracy is required.