Skip to main content

Advertisement

A higher-order blended compact difference (BCD) method for solving the general 2D linear second-order partial differential equation

Article metrics

  • 480 Accesses

Abstract

A higher-order blended compact difference (BCD) scheme is proposed to solve the general two-dimensional (2D) linear second-order partial differential equation. The distinguishing feature of the present method is that methodologies of explicit compact difference and implicit compact difference are blended together. Sixth-order accuracy approximations for the first- and second-order derivatives are employed, and the original equation is also discretized based on a 9-point stencil, which is different from the work of Lee et al. (J. Comput. Appl. Math. 264:23–37, 2014). A truncation error analysis is performed to show that the scheme is of sixth-order accuracy for the interior grid points. Simultaneously, sixth-order accuracy schemes are proposed to compute the grid points on the boundaries for the first- and second-order derivatives. Numerical experiments are conducted to demonstrate the accuracy and efficiency of the present method.

Introduction

In this paper, we consider the general two-dimensional (2D) linear partial differential equation in the form

$$ a(x,y)u_{xx} + b(x,y)u_{yy} + c(x,y)u_{xy} + p(x,y)u_{x} + q(x,y)u_{y} + r(x,y)u = f(x,y). $$
(1)

Here the unknown function u, the variable coefficient functions \(a,b,c,p,q,r\), and the forcing function f are assumed to be continuously differentiable and have the required partial derivatives on Ω. Ω is a continuous rectangular domain. A suitable Dirichlet condition is prescribed on the boundary (∂Ω) in this paper.

Equation (1) is widely used in the fields of porous media flow [2, 3] and when coordinate transformations are applied to a convection-diffusion equation on non-rectangular domains [4], which also generate Eq. (1). So it is both theoretically and practically important to investigate their accurate, stable and efficient numerical methods. In the past decades, high-order compact (HOC) difference methods have attracted increasing interests for solving such equations [1, 5,6,7,8]. The main feature of HOC methods is that they have higher-order accuracy (usually fourth-order, even higher) and higher spectral resolution with relatively few grid points (compact grid stencil) than the conventional difference methods. There are two kinds of compact difference methods. One is called the explicit compact difference method and the other is called the implicit compact difference method. For the explicit compact difference method, all the derivatives in partial differential equations are explicitly approximated by the nodal values of the target function. Usually, 9 grid points are used for solving the 2D problems and no more than 27 grid points (usually 19 points) for solving the three-dimensional (3D) problems. For instance, in Ref. [9], Gupta et al. derived a fourth-order compact finite-difference scheme for the 2D convection-diffusion equation. Then they extended the method to the 2D elliptic equation without the mixed derivative term [5]. Karaa extended the work of Gupta et al. to the 2D elliptic and parabolic problems with mixed derivatives [8]. The basic idea of their methods lies in utilizing the Taylor expansions by 2D power series of all the functions involved in the differential equation at the reference grid point (\(i,j\)), substituting these expansions into the original equation and comparing the coefficients of \(x^{i}y^{j}\) to get the linear constraints on the unknown coefficients. In Ref. [8], the author considered the model equations with the mixed derivative terms, but the coefficients of the second derivatives \(u_{xx}\) and \(u_{yy}\) were equivalent to constants. In other words, if they are functions and \(a(x,y) \ne b(x,y)\), and \(c(x,y) \ne 0\) in Eq. (1), there do not exist any explicit fourth-order compact difference schemes with 9-point grid stencil as was declared in Ref. [6]. And the authors of [6] also pointed out that explicit sixth-order compact difference schemes exist only if \(a(x,y) = b(x,y) = 1\), \(c(x,y) = 0\), and \(p(x,y) = q(x,y)\). Special cases are the Poisson equation and the Helmholtz equation. Some fourth- and sixth-order compact difference schemes are reported in Refs. [10,11,12,13,14,15,16]. Additionally, some fourth-order compact difference schemes for the convection-diffusion equations and the steady incompressible Navier–Stokes equations are reported in Refs. [17,18,19,20,21,22,23,24,25].

Different from the explicit compact difference method, the implicit compact difference method is to treat the derivatives and the target function as unknowns simultaneously, with all derivatives involved in computation. The advantage of the method is that they are easier to attain higher-order accuracy by using additional information of the derivatives that are possibly unnecessary for reality use than the explicit compact difference method. In the 1970s, Kreiss [26], Hirsh [27], and Adam [28] have proposed Hermitian compact techniques using fewer grid nodes (three instead of five) at each coordinate direction to solve partial differential equations (PDEs). Later on, Lele [29] proposed a class of compact finite-difference schemes with a range of spatial scales (spectral-like resolution). Chu and Fan [30] proposed a combined compact difference (CCD) scheme, which can be regarded as an extension of the standard Padé schemes discussed by Lele [29]. In [30], the CCD scheme is derived by using local Hermitian polynomials and is sixth-order accuracy with 3 points for one dimension (see Appendix 1). Fourier analysis shows that the CCD scheme has better spectral resolution than many other existing compact or non-compact high-order schemes. Fu et al. [31] developed an upwind fifth-order compact scheme. Deng and Zhang [32] developed a high-order accurate weighted compact nonlinear scheme. More recently, implicit compact difference schemes were used to solve hyperbolic equations and various kinds of fluid dynamics and engineering problems [33,34,35,36,37,38,39,40,41,42,43].

As we discussed above, for the general 2D linear second-order equations with variable coefficients and the mixed derivative term like (1), it is impossible to get an explicit fourth-order compact difference scheme with 9 grid points except under certain conditions mentioned above. But it is possible to get an implicit fourth-order, even sixth-order compact difference scheme for such equations with no more than 9 grid points. Very recently, Lee et al. [1] extended the work in [30] and proposed a combined compact difference (CCD2) scheme to solve Eq. (1). The highlight of this work is a sixth-order accurate difference scheme for the mixed derivative with a 9-point compact stencil at the interior region. It is a pity that just the fourth-order accuracy schemes on the boundaries are proposed in [1], which results in the convergence order of the CCD2 scheme is less than six for some problems. So, in this paper, we are aiming at developing a new sixth-order compact difference scheme for solving the general 2D linear partial differential equation (1). Our method makes use of the explicit compact difference scheme in which the derivatives of the original differential equation are discretized and the implicit compact difference scheme in which all derivatives with their own schemes are involved in computation independently, which is named the blended compact difference (BCD) scheme. Namely, the original governing equation is discretized with the 9-point compact stencil (like the explicit compact difference scheme) and a sixth-order compact difference scheme is proposed, but it still includes the representations of the first- and second-order derivatives (like the implicit compact difference scheme), which are computed by the sixth-order CCD schemes [30]. This scheme differs from the explicit compact difference method because the computations of the first- and second-order derivatives are also needed in the scheme. And it also differs from the implicit CCD2 scheme [1] because the governing equation is required to be discretized simultaneously in the present method. Although the computational cost increases, it is more accurate and more convenient to conduct computation than the method described in [1, 30]. We will illustrate this conclusion in the following sections.

This paper is organized as follows. In Sect. 2, we present the method for deriving a sixth-order compact difference scheme for solving Eq. (1). Simultaneously, the sixth-order accuracy schemes are proposed to compute the grid points on the boundaries. In Sect. 3, truncation error analysis is done to show that the scheme is sixth-order accuracy for the interior grid points. Next, numerical tests are conducted in Sect. 4, and we compare the present scheme with other existing numerical methods in the literature. Finally, we give a brief conclusion in Sect. 5.

Methodology of sixth-order BCD scheme

In this section, we briefly discuss the development of BCD formulation for Eq. (1). Assume the problem domain to be rectangular \(\varOmega = [0,L_{x}] \times [0,L_{y}]\), and we discrete the domain with uniform grids and set \(h_{x}\) and \(h_{y}\) to be the grid step-length in the x- and y-directions, respectively. The central mesh point (\(x_{i},y_{j}\)) is denoted by 0 and the other 8 mesh points at \(( x_{i} \pm h_{x},y_{j})\), \((x_{i},y_{j} \pm h_{y})\), \((x_{i} \pm h_{x},y_{j} \pm h_{y})\), are denoted by numbers \(1 - 8\) (see Fig. 1). For convenience, we denote the derivatives by \(\{u,u_{x},u_{xx},u_{y}, u_{yy},u_{xy}\}\), respectively. We consider the general Dirichlet boundary condition. In the following sections, we will discuss how to implement the BCD scheme on a rectangular region.

Figure 1
figure1

Labeling of the 9 grid points

Inner grid points

For each interior grid point \((x_{i},y_{j}), x_{i} = ih_{x}, y_{j} = jh_{y}, i = 1,2, \ldots, N_{x} - 1, j = 1,2, \ldots, N_{y} - 1\). There are 6 unknowns \(\{u,u_{x},u_{y},u_{xx},u_{yy},u_{xy}\}\) to be determined and consequently we should provide 6 independent difference equations. Note that the original 3-point sixth-order CCD schemes for the first- and second-order derivatives as well as the 9-point sixth-order scheme of the mixed derivative \(u_{xy}\) are proposed in [30] and [1], respectively. We simply borrow the sixth-order schemes for the five derivatives \(\{u_{x},u_{y},u_{xx},u_{yy},u_{xy}\}\) that are listed in Appendix 1.

In order to get the BCD scheme, we use the Taylor series expansions at point \((x,y)\).

$$\begin{aligned} &u_{x} = \delta_{x}u - \frac{h_{x}^{2}}{6}u_{xxx} - \frac{h_{x}^{4}}{120}u_{x^{(5)}} + O \bigl(h_{x}^{6} \bigr), \end{aligned}$$
(2)
$$\begin{aligned} &u_{y} = \delta_{y}u - \frac{h_{y}^{2}}{6}u_{yyy} - \frac{h_{y}^{4}}{120}u_{y^{(5)}} + O \bigl(h_{y}^{6} \bigr). \end{aligned}$$
(3)

Here \(\delta_{x}\) and \(\delta_{{y}}\) (see Appendix 2) are standard central difference operators for the first-order derivatives. Substituting (2) and (3) into (1),we obtain the following modified differential equation corresponding to Eq. (1):

$$\begin{aligned} &au_{xx} + bu_{yy} + cu_{xy} + p \biggl( \delta_{x}u - \frac{h_{x}^{2}}{6}u_{xxx} \biggr) + q \biggl( \delta_{y}u - \frac{h_{y}^{2}}{6}u_{yyy} \biggr) + ru \\ &\quad{}- \frac{1}{120} \bigl(ph_{x}^{4}u_{x^{(5)}} + qh_{y}^{4}u_{y^{(5)}} \bigr) + O \bigl(h_{x}^{6} + h_{y}^{6} \bigr) = f. \end{aligned}$$
(4)

We now replace all the third-order derivatives in Eq. (4). Differentiating Eq. (1) with respect to x and y, respectively:

$$\begin{aligned} u_{xxx} ={}& \biggl[\frac{1}{a}(f_{x} - bu_{yyx} - b_{x}u_{yy} - cu_{xxy} - c_{x}u_{xy} - pu_{xx} - p_{x}u_{x} - qu_{yx} - q_{x}u_{y} - r_{x}u - ru_{x}) \\ &{}- \frac{a_{x}}{a^{2}}(f - bu_{yy} - cu_{xy} - pu_{x} - qu_{y} - ru) \biggr], \end{aligned}$$
(5)
$$\begin{aligned} u_{yyy} ={}& \biggl[\frac{1}{b}(f_{y} - au_{xxy} - a_{y}u_{xx} - cu_{xyy} - c_{y}u_{xy} - pu_{xy} - p_{y}u_{x} - qu_{yy} - q_{y}u_{y} - r_{y}u - ru_{y}) \\ &{}- \frac{b_{y}}{b^{2}}(f - au_{xx} - cu_{xy} - pu_{x} - qu_{y} - ru) \biggr]. \end{aligned}$$
(6)

Substituting Eqs. (5)–(6) into Eq. (4),and rearranging it, we obtain

$$\begin{aligned} &\bar{A}u_{xx}+\bar{B}u_{yy} + \bar{C}u_{xy} +\bar{D}u_{x}+\bar{E}u_{y}+ \bar{G}u_{xyy}+\bar{H}u_{xxy} +(r+p\delta_{x}+q \delta_{y})u \\ &\quad{} + \biggl( \frac{pr_{x}h_{x}^{2}}{6a}+\frac{qr_{y}h_{y}^{2}}{6b} \biggr)- \frac{1}{120} \bigl(ph_{x}^{4}u_{{x}^{(5)}}+qh_{y}^{4}u_{y^{(5)}} \bigr) +O \bigl(h_{x}^{6}+h_{y}^{6} \bigr)=F, \end{aligned}$$
(7)

where

$$\begin{aligned} &\bar{A} = a + \frac{h_{x}^{2}p^{2}}{6a} - \frac{h_{y}^{2}qb_{y}a}{6\beta^{2}} + \frac{h_{y}^{2}qa_{y}}{6\beta}, \end{aligned}$$
(8)
$$\begin{aligned} &\bar{B} = b + \frac{h_{x}^{2}pb_{x}}{6a} - \frac{h_{x}^{2}pa_{x}b}{6a^{2}} + \frac{h_{y}^{2}q^{2}}{6b}, \end{aligned}$$
(9)
$$\begin{aligned} &\bar{C} = c + \frac{h_{x}^{2}p}{6a} \biggl(c_{x} + q - \frac{a_{x}c}{a} \biggr) + \frac{h_{y}^{2}q}{6b} \biggl(c_{y} + p - \frac{b_{y}c}{b} \biggr), \end{aligned}$$
(10)
$$\begin{aligned} &\bar{D} = \frac{h_{x}^{2}p}{6a} \biggl(r + p_{x} - \frac{a_{x}p}{a} \biggr) + \frac{h_{y}^{2}q}{6b} \biggl(p_{y} - \frac{b_{y}p}{b} \biggr), \end{aligned}$$
(11)
$$\begin{aligned} &\bar{E} = \frac{h_{x}^{2}p}{6a} \biggl(q_{x} - \frac{a_{x}q}{a} \biggr) + \frac{h_{y}^{2}q}{6b} \biggl(r + q_{y} - \frac{b_{y}q}{b} \biggr), \end{aligned}$$
(12)
$$\begin{aligned} &\bar{G} = \frac{h_{x}^{2}pb}{6a} + \frac{h_{y}^{2}qc}{6b}, \end{aligned}$$
(13)
$$\begin{aligned} &\bar{H} = \frac{h_{x}^{2}pc}{6a} + \frac{h_{y}^{2}qa}{6b}, \end{aligned}$$
(14)
$$\begin{aligned} &F = \biggl(1 - \frac{a_{x}ph_{x}^{2}}{6a^{2}} - \frac{b_{y}qh_{y}^{2}}{6b^{2}} \biggr)f + \frac{ph_{x}^{2}}{6a}f_{x} + \frac{qh_{y}^{2}}{6b}f_{y}. \end{aligned}$$
(15)

To get a sixth-order compact scheme for Eq. (7), we use the following approximations for all the derivatives \(\{u_{xx},u_{yy}, u_{xxy},u_{xyy}, u_{x^{(5)}},u_{x^{(6)}},u_{y^{(5)}},u_{y^{(6)}}\}\):

$$\begin{aligned} &u_{xx} = 2\delta_{x}^{2}u - \delta_{x}u_{x} + \frac{h_{x}^{4}}{360}u_{x^{(6)}} + O \bigl(h_{x}^{6} \bigr), \end{aligned}$$
(16)
$$\begin{aligned} &u_{yy} = 2\delta_{y}^{2}u - \delta_{y}u_{y} + \frac{h_{y}^{4}}{360}u_{y^{(6)}} + O \bigl(h_{y}^{6} \bigr), \end{aligned}$$
(17)
$$\begin{aligned} &u_{xxy} = \delta_{x}^{2}u_{y} + \delta_{x}^{2}\delta_{y}u - \delta_{x} \delta_{y}u_{x} + O \bigl(h_{x}^{4} + h_{y}^{4} \bigr), \end{aligned}$$
(18)
$$\begin{aligned} &u_{xyy} = \delta_{y}^{2}u_{x} + \delta_{y}^{2}\delta_{x}u - \delta_{y} \delta_{x}u_{y} + O \bigl(h_{x}^{4} + h_{y}^{4} \bigr), \end{aligned}$$
(19)
$$\begin{aligned} &u_{x^{(5)}} = \frac{360}{7h_{x}^{4}} \biggl(u_{x} - \delta_{x}u + \frac{h_{x}^{2}}{6}\delta_{x}u_{xx} \biggr) + O \bigl(h_{x}^{2} \bigr), \end{aligned}$$
(20)
$$\begin{aligned} &u_{x^{(6)}} = \frac{240}{h_{x}^{4}} \biggl(u_{xx} - \delta_{x}^{2}u + \frac{h_{x}^{2}}{12}\delta_{x}^{2}u_{xx} \biggr) + O \bigl(h_{x}^{2} \bigr), \end{aligned}$$
(21)
$$\begin{aligned} &u_{y^{(5)}} = \frac{360}{7h_{y}^{4}} \biggl(u_{y} - \delta_{y}u + \frac{h_{y}^{2}}{6}\delta_{y}u_{yy} \biggr) + O \bigl(h_{y}^{2} \bigr), \end{aligned}$$
(22)
$$\begin{aligned} &u_{y^{(6)}} = \frac{240}{h_{y}^{4}} \biggl(u_{yy} - \delta_{y}^{2}u + \frac{h_{y}^{2}}{12}\delta_{y}^{2}u_{yy} \biggr) + O \bigl(h_{y}^{2} \bigr). \end{aligned}$$
(23)

Substituting Eqs. (16)–(23) into Eq. (7) and rearranging it, we have

$$\begin{aligned} &\biggl(\frac{4}{3}\bar{A}\delta_{x}^{2} + \frac{4}{3}\bar{B}\delta_{y}^{2} + \frac{10p}{7}\delta_{x} + \frac{10q}{7}\delta_{y} + \bar{G}\delta_{y}^{2}\delta_{x} + \bar{H} \delta_{x}^{2}\delta_{y} \biggr)u \\ &\quad{}+ \biggl( - \bar{A}\delta_{x} + \bar{D} + \bar{G}\delta_{y}^{2} - \bar{H}\delta_{x}\delta_{y} - \frac{3p}{7} \biggr)u_{x} \\ &\quad{}+ \biggl(\bar{E} - \bar{B}\delta_{y} + \bar{H}\delta_{x}^{2} - \bar{G}\delta_{y}\delta_{x} - \frac{3q}{7} \biggr)u_{y} + \biggl(\frac{2\bar{A}}{3} - \frac{ph_{x}^{2}}{14} \delta_{x} + \frac{\bar{A}h_{x}^{2}}{18}\delta_{x}^{2} \biggr)u_{xx} \\ &\quad{}+ \biggl( - \frac{qh_{y}^{2}}{14}\delta_{y} + \frac{2\bar{B}}{3} + \frac{\bar{B}h_{y}^{2}}{18}\delta_{y}^{2} \biggr)u_{yy} + \bar{C}u_{xy} + O \bigl(h_{x}^{6} + h_{y}^{6} \bigr) = F. \end{aligned}$$
(24)

Substituting the standard finite-difference operators (see Appendix 2) into (24) and omitting the truncation error terms, we obtain the following BCD scheme:

$$\begin{aligned} &\sum_{k = 0}^{8}(\hat{b}_{k}u_{k} + \hat{c}_{k}u_{xk} + \hat{d}_{k}u_{yk}) + \bar{C}u_{xy0} + \frac{5\bar{A}}{9}u_{xx0} + \biggl( \frac{\bar{A}}{18} - \frac{h_{x}p_{0}}{28} \biggr)u_{xx1} \\ &\quad{} + \biggl( \frac{\bar{A}}{18} + \frac{h_{x}p_{0}}{28} \biggr)u_{xx3} + \frac{5\bar{B}}{9}u_{yy0} \\ &\quad{}+ \biggl(\frac{\bar{B}}{18} - \frac{h_{y}q_{0}}{28} \biggr)u_{yy2} + \biggl(\frac{\bar{B}}{18} + \frac{h_{y}q_{0}}{28} \biggr)u_{yy4} = F_{0}. \end{aligned}$$
(25)

All the coefficients are explicitly given as follows:

$$\begin{aligned} &\hat{b}_{0} = - \frac{8}{3} \biggl( \frac{\bar{A}}{h_{x}^{2}} + \frac{\bar{B}}{h_{y}^{2}} \biggr) + r_{0} + \frac{p_{0}h_{x}^{2}r_{x0}}{6a_{0}} + \frac{q_{0}h_{y}^{2}r_{y0}}{6b_{0}},\\ & \hat{b}_{1} = \frac{4\bar{A}}{3h_{x}^{2}} + \frac{10p_{0}}{14h_{x}} - \frac{\bar{G}}{h_{x}h_{y}^{2}},\qquad \hat{b}_{2} = \frac{4\bar{B}}{3h_{y}^{2}} + \frac{5q_{0}}{7h_{y}} - \frac{\bar{H}}{h_{x}^{2}h_{y}},\\ &\hat{b}_{3} = \frac{4\bar{A}}{3h_{x}^{2}} - \frac{10p_{0}}{14h_{x}} + \frac{\bar{G}}{h_{x}h_{y}^{2}}, \qquad \hat{b}_{4} = \frac{4\bar{B}}{3h_{y}^{2}} - \frac{5q_{0}}{7h_{y}} + \frac{\bar{H}}{h_{x}^{2}h_{y}},\qquad \hat{b}_{5} = \frac{\bar{G}}{2h_{x}h_{y}^{2}} + \frac{\bar{H}}{2h_{y}h_{x}^{2}}, \\ &\hat{b}_{6} = - \frac{\bar{G}}{2h_{x}h_{y}^{2}} + \frac{\bar{H}}{2h_{y}h_{x}^{2}},\qquad \hat{b}_{7} = - \frac{\bar{G}}{2h_{x}h_{y}^{2}} - \frac{\bar{H}}{2h_{y}h_{x}^{2}},\qquad \hat{b}_{8} = \frac{\bar{G}}{2h_{x}h_{y}^{2}} - \frac{\bar{H}}{2h_{y}h_{x}^{2}}, \\ &\hat{c}_{0} = \bar{D} - \frac{2\bar{G}}{h_{y}^{2}} - \frac{3p_{0}}{7} + \frac{p_{0}h_{x}^{2}r_{0}}{6a_{0}}, \qquad \hat{c}_{1} = - \hat{c}_{3} = - \frac{\bar{A}}{2h_{x}},\qquad \hat{c}_{2} = \hat{c}_{4} = \frac{\bar{G}}{h_{y}^{2}}, \\ &\hat{c}_{5} = - \hat{c}_{6} = \hat{c}_{7} = - \hat{c}_{8} = - \frac{\bar{H}}{4h_{x}h_{y}},\qquad \hat{d}_{0} = \bar{E} - \frac{2\bar{H}}{h_{x}^{2}} - \frac{3q_{0}}{7},\qquad \hat{d}_{1} = \hat{d}_{3} = \frac{\bar{H}}{h_{x}^{2}}, \\ &\hat{d}_{2} = - \hat{d}_{4} = - \frac{\bar{B}}{2h_{y}},\qquad \hat{d}_{5} = \hat{d}_{7} = - \hat{d}_{6} = - \hat{d}_{8} = - \frac{\bar{G}}{4h_{x}h_{y}}, \\ &F_{0} = \biggl(1 - \frac{a_{x0}p_{0}h_{x}^{2}}{6a^{2}} - \frac{b_{y0}q_{0}h_{y}^{2}}{6b^{2}} \biggr)f_{0} + \frac{p_{0}h_{x}^{2}}{6a}f_{x0} + \frac{q_{0}h_{y}^{2}}{6b}f_{y0}. \end{aligned}$$

Equation (25) is the new BCD scheme we developed. It involves the values of the unknown function on 9 grid points (like explicit compact difference scheme) and their first- and second-order derivatives on 3 grid points on each coordinate direction (like implicit compact difference scheme). All the derivatives are separately required to be approximated up to sixth-order accuracy. Namely, the first-order derivatives \(u_{x}\) and \(u_{y}\) are approximated by the sixth-order CCD interior schemes (59) and (61) in Appendix 1, respectively. The second-order derivatives \(u_{xx}\) and \(u_{yy}\) are approximated by the sixth-order CCD interior schemes (60) and (62) in Appendix 1, respectively. The mixed second-order derivative \(u_{xy}\) is approximated by the 9-point sixth-order interior schemes (63) in Appendix 1. We now present some remarks on the BCD and CCD schemes.

Remark 1

The CCD scheme needs to couple all difference equations for the unknown function and its various derivatives together and solve them simultaneously along with complex boundary schemes. It is unavoidable to result in large scale and complicated coefficient matrix, which increases the complexity of algorithm design and programming. However, the BCD scheme is decoupled by means of solving the unknown function and its various derivatives separately with an iteration process, so the derivation of the schemes, the algorithm design and programming are simple and convenient to operate.

Remark 2

The CCD scheme uses the original equation (1) as governing equation of the unknown function u directly, while the BCD scheme uses the discretized equation, i.e., Eq. (25) to compute u. Obviously Eq. (25) is more complicated than the original equation (1), so the calculation cost correspondingly increases.

Boundary grid points

In the above section, we have developed difference equations for each interior grid point. Many applications involve computations in domains with non-periodic boundaries. In this section, we will introduce approximations for the first- and second-order derivatives for the boundary nodes. For non-periodic problems, these approximations are, of necessity, non-central or one-sided. Additional sixth-order expressions are needed to compute nodes at the boundaries nodes to close the system. Consider left boundary \(i = 0\), the sixth-order schemes of the first-order derivative may be obtained from a relation of the form

$$ (u_{x})_{0,j} + \alpha (u_{x})_{1,j} = (b_{0}u_{0,j} + b_{1}u_{1,j} + b_{2}u_{2,j} + b_{3}u_{3,j} + b_{4}u_{4,j} + b_{5}u_{5,j})/h_{x}. $$
(26)

The coefficients \(b_{0},b_{1},b_{2},b_{3},b_{4},b_{5}\) (for the subscript see Fig. 2) and α are derived by matching the Taylor series coefficients of various orders. By some tedious calculations, we are able to obtain the linear equations as shown below:

$$\begin{aligned} \begin{aligned}& b_{0} + b_{1} + b_{2} + b_{3} + b_{4} + b_{5} = 0, \\ &\frac{1}{2!} \bigl(b_{1} + 2^{2}b_{2} + 3^{2}b_{3} + 4^{2}b_{4} + 5^{2}b_{5} \bigr) = \alpha, \\ &\frac{1}{3!} \bigl(b_{1} + 2^{3}b_{2} + 3^{3}b_{3} + 4^{3}b_{4} + 5^{3}b_{5} \bigr) = \frac{\alpha}{2}, \\ &\frac{1}{4!} \bigl(b_{1} + 2^{4}b_{2} + 3^{4}b_{3} + 4^{4}b_{4} + 5^{4}b_{5} \bigr) = \frac{\alpha}{6}, \\ &\frac{1}{5!} \bigl(b_{1} + 2^{5}b_{2} + 3^{5}b_{3} + 4^{5}b_{4} + 5^{5}b_{5} \bigr) = \frac{\alpha}{24}, \\ &\frac{1}{6!} \bigl(b_{1} + 2^{6}b_{2} + 3^{6}b_{3} + 4^{6}b_{4} + 5^{6}b_{5} \bigr) = \frac{\alpha}{120}, \\ &\frac{1}{7!} \bigl(b_{1} + 2^{7}b_{2} + 3^{7}b_{3} + 4^{7}b_{4} + 5^{7}b_{5} \bigr) = \frac{\alpha}{720}. \end{aligned} \end{aligned}$$
(27)
Figure 2
figure2

Grid point discretization for left boundary

And resolving it by Matlab software, we can get the results as follows:

$$\begin{aligned} &\alpha = 5,\qquad b_{0} = - \frac{197}{60},\qquad b_{1} = - \frac{5}{12},\qquad b_{2} = 5,\\ & b_{3} = - \frac{5}{3},\qquad b_{4} = \frac{5}{12},\qquad b_{5} = - \frac{1}{20}. \end{aligned}$$

So, we can get the left boundary condition of \(u_{x}\) for \(j = 0,1, \ldots,N_{y}\):

$$ (u_{x})_{0,j} + 5(u_{x})_{1,j} = \biggl( - \frac{197}{60}u_{0,j} - \frac{5}{12}u_{1,j} + 5u_{2,j} - \frac{5}{3}u_{3,j} + \frac{5}{12}u_{4,j} - \frac{1}{20}u_{5,j} \biggr)\Big/h_{x}. $$
(28)

The derivation of the following boundary approximations for the first-order and second-order derivatives is exactly analogous to the above process. The boundary schemes are summarized now.

Right boundary condition of \(u_{x}\) for \(j = 0,1, \ldots,N_{y}\):

$$\begin{aligned} (u_{x})_{N_{x},j} + 5(u_{x})_{N_{x} - 1,j} ={}& \biggl( \frac{197}{60}u_{N_{x},j} + \frac{5}{12}u_{N_{x} - 1,j} - 5u_{N_{x} - 2,j} + \frac{5}{3}u_{N_{x} - 3,j} \\ &{}- \frac{5}{12}u_{N_{x} - 4,j} + \frac{1}{20}u_{N_{x} - 5,j} \biggr)\Big/h_{x}. \end{aligned}$$
(29)

Bottom boundary condition of \(u_{y}\) for \(i=0,1,\ldots,N_{x}\):

$$ (u_{y})_{i,0} + 5(u_{y})_{i,1} = \biggl( - \frac{197}{60}u_{i,0} - \frac{5}{12}u_{i,1} + 5u_{i,2} - \frac{5}{3}u_{i,3} + \frac{5}{12}u_{i,4} - \frac{1}{20}u_{i,5} \biggr)\Big/h_{y}. $$
(30)

Top boundary condition of \(u_{y}\) for \(i = 0,1, \ldots,N_{x}\):

$$\begin{aligned} (u_{y})_{i,N_{y}} + 5(u_{y})_{i,N_{y} - 1} ={}& \biggl( \frac{197}{60}u_{i,N_{y}} + \frac{5}{12}u_{i,N_{y} - 1} - 5u_{i,N_{y} - 2} + \frac{5}{3}u_{i,N_{y} - 3} \\ &{}- \frac{5}{12}u_{i,N_{y} - 4} + \frac{1}{20}u_{i,N_{y} - 5} \biggr)\Big/h_{y} . \end{aligned}$$
(31)

Left boundary condition of \(u_{xx}\) for \(j = 0,1, \ldots,N_{y}\):

$$\begin{aligned} (u_{xx})_{0,j} - 6(u_{xx})_{1,j} ={}& \biggl( - \frac{403}{18}u_{0,j} + 33u_{1,j} - \frac{21}{2}u_{2,j} - \frac{4}{9}u_{3,j} \biggr)\Big/h_{{x}}^{2} \\ &{}+ \biggl[ - \frac{26}{3}(u_{x})_{0,j} - 6(u_{x})_{1,j} + 3(u_{x})_{2,j} \biggr]\Big/h_{x}. \end{aligned}$$
(32)

Right boundary condition of \(u_{xx}\) for \(j = 0,1, \ldots,N_{y}\):

$$\begin{aligned} (u_{xx})_{N_{x},j} - 6(u_{xx})_{N_{x} - 1,j} ={}& \biggl( - \frac{403}{18}u_{N_{x},j} + 33u_{N_{x} - 1,j} - \frac{21}{2}u_{N_{x} - 2,j} - \frac{4}{9}u_{N_{x} - 3,j} \biggr)\Big/h_{{x}}^{2} \\ &{}+ \biggl[\frac{26}{3}(u_{x})_{N_{x},j} + 6(u_{x})_{N_{x} - 1,j} - 3(u_{x})_{N_{x} - 2,j} \biggr]\Big/h_{x} . \end{aligned}$$
(33)

Bottom boundary condition of \(u_{yy}\) for \(i = 0,1, \ldots,N_{x}\):

$$\begin{aligned} (u_{yy})_{i,0} - 6(u_{yy})_{i,1} ={}& \biggl( - \frac{403}{18}u_{i,0} + 33u_{i,1} - \frac{21}{2}u_{i,2} - \frac{4}{9}u_{i,3} \biggr)\Big/h_{{y}}^{2} \\ &{}+ \biggl[ - \frac{26}{3}(u_{y})_{i,0} - 6(u_{y})_{i,1} + 3(u_{y})_{i,2} \biggr]\Big/h_{y}. \end{aligned}$$
(34)

Top boundary condition of \(u_{yy}\) for \(i = 0,1, \ldots,N_{x}\):

$$\begin{aligned} (u_{yy})_{i,N_{y}} - 6(u_{yy})_{i,N_{y} - 1} = {}&\biggl( - \frac{403}{18}u_{i,N_{y}} + 33u_{i,N_{y} - 1} - \frac{21}{2}u_{i,N_{y} - 2} - \frac{4}{9}u_{i,N_{y} - 3} \biggr)\Big/h_{{y}}^{2} \\ &{}+ \biggl[\frac{26}{3}(u_{y})_{i,N_{y}} + 6(u_{y})_{i,N_{y} - 1} - 3(u_{y})_{i,N_{y} - 2} \biggr]\Big/h_{y} . \end{aligned}$$
(35)

In the end, we will derive boundary conditions of the mixed derivative. We can regard the second mixed derivative \(u_{xy}\) as the first partial derivative of \(u_{x}\) (or \(u_{y}\)) with respect to y (or x). Similar to the first-order derivative boundary scheme, by using the 2D Taylor expansions and some tedious calculations (see Appendix 3), we are able to deduce some difference schemes for approximating \(u_{xy}\) for grid points on the boundaries. A group of sixth-order accurate equations on the four boundaries can be given here.

Left boundary condition of \(u_{xy}\) for \(j = 0,1, \ldots,N_{y}\):

$$\begin{aligned} (u_{xy})_{0,j} + \frac{1}{5}(u_{xy})_{1,j} = {}&\biggl[ - \frac{149}{60}(u_{y})_{0,j} + \frac{1723}{300}(u_{y})_{1,j} - 7(u_{y})_{2,j} + \frac{19}{3}(u_{y})_{3,j} \\ &{}- \frac{43}{12}(u_{y})_{4,j} + \frac{23}{20}(u_{y})_{5,j} - \frac{4}{25}(u_{y})_{6,j} \biggr]\Big/h_{x}. \end{aligned}$$
(36)

Right boundary condition of \(u_{xy}\) for \(j = 0,1, \ldots,N_{y}\):

$$\begin{aligned} (u_{xy})_{N_{x},j} - \frac{1}{5}(u_{xy})_{N_{x} - 1,j} = {}&\biggl[\frac{29}{12}(u_{y})_{N_{x},j} - \frac{1877}{300}(u_{y})_{N_{x} - 1,j} + 8(u_{y})_{N_{x} - 2,j} - 7(u_{y})_{N_{x} - 3,j} \\ &{}+ \frac{47}{12}(u_{y})_{N_{x} - 4,j} - \frac{5}{4}(u_{y})_{N_{x} - 5,j} + \frac{13}{75}(u_{y})_{N_{x} - 6,j} \biggr]\Big/h_{x}. \end{aligned}$$
(37)

Top boundary condition of \(u_{xy}\) for \(i = 0,1, \ldots,N_{x}\):

$$\begin{aligned} (u_{xy})_{i,N_{y}} - \frac{1}{5}(u_{xy})_{i,N_{y} - 1} ={}& \biggl[\frac{29}{12}(u_{x})_{i,N_{y}} - \frac{1877}{300}(u_{x})_{i,N_{y} - 1} + 8(u_{x})_{i,N_{y} - 2} - 7(u_{x})_{i,N_{y} - 3} \\ &{}+ \frac{47}{12}(u_{x})_{i,N_{y} - 4} - \frac{5}{4}(u_{x})_{i,N_{y} - 5} + \frac{13}{75}(u_{x})_{i,N_{y} - 6} \biggr]\Big/h_{y}. \end{aligned}$$
(38)

Bottom boundary condition of \(u_{xy}\) for \(i = 0,1, \ldots,N_{x}\):

$$\begin{aligned} (u_{xy})_{i,0} + \frac{1}{5}(u_{xy})_{i,1} ={}& \biggl[ - \frac{149}{60}(u_{x})_{i,0} + \frac{1723}{300}(u_{x})_{i,1} - 7(u_{x})_{i,2} + \frac{19}{3}(u_{x})_{i,3} \\ &{}- \frac{43}{12}(u_{x})_{i,4} + \frac{23}{20}(u_{x})_{i,5} - \frac{4}{25}(u_{x})_{i,6} \biggr]\Big/h_{y}. \end{aligned}$$
(39)

With more than 4 grid points along one direction, the above boundary difference equations are not strictly compact in the traditional sense, but they are necessary to retain the high-order accuracy of the BCD scheme. Nevertheless, we remark that these equations are only used for boundary grid points. The interior difference equations contribute to the major compact structure.

Note that if the Dirichlet boundary condition is replaced by the Neumann boundary condition, the equation (1) can also be solved because the function u is unknown at the boundaries while the values of the first-order derivatives \(u_{x}\) and \(u_{y}\) at the boundaries are known. According to Eqs. (28)–(31), the function u at the boundaries can be calculated by the sixth-order schemes as follows:

$$\begin{aligned} &u_{0,j} = 60 \biggl[ - h_{x}(u_{x})_{0,j} - 5h_{x}(u_{x})_{1,j} - \frac{5}{12}u_{1,j} + 5u_{2,j} - \frac{5}{3}u_{3,j} + \frac{5}{12}u_{4,j} - \frac{1}{20}u_{5,j} \biggr]\Big/197, \end{aligned}$$
(40)
$$\begin{aligned} &u_{N_{x},j} = 60 \biggl[h_{x}(u_{x})_{{N}_{x},j} + 5h_{x}(u_{x})_{{N}_{x} - 1,j} - \frac{5}{12}u_{N_{x} - 1,j} + 5u_{N_{x} - 2,j} - \frac{5}{3}u_{N_{x} - 3,j} \\ &\phantom{u_{N_{x},j} =}{} + \frac{5}{12}u_{N_{x} - 4,j} - \frac{1}{20}u_{N_{x} - 5,j} \biggr]\Big/197, \end{aligned}$$
(41)
$$\begin{aligned} &u_{i,0} = 60 \biggl[ - h_{y}(u_{y})_{i,0} - 5h_{y}(u_{y})_{i,1} - \frac{5}{12}u_{i,1} + 5u_{i,2} - \frac{5}{3}u_{i,3} + \frac{5}{12}u_{i,4} - \frac{1}{20}u_{i,5} \biggr]\Big/197, \end{aligned}$$
(42)
$$\begin{aligned} &u_{i,N_{y}} = 60 \biggl[h_{y}(u_{y})_{i,N_{y}} + 5h_{y}(u_{y})_{i,N_{y} - 1} - \frac{5}{12}u_{i,N_{y} - 1} + 5u_{i,N_{y} - 2} - \frac{5}{3}u_{i,N_{y} - 3} \\ &\phantom{u_{i,N_{y}} =}{} + \frac{5}{12}u_{i,N_{y} - 4} - \frac{1}{20}u_{i,N_{y} - 5} \biggr]\Big/197. \end{aligned}$$
(43)

Iterative procedure

The BCD scheme is decoupled by means of solving the unknown function u and its various derivatives \(u_{x},u_{y},u_{xx},u_{yy},u_{xy}\) separately with an iteration process. A pseudo code of the BCD scheme is listed as follows:

  • Give any initial guess \(u^{(0)},u_{x}^{(0)},u_{y}^{(0)},u_{xx}^{(0)},u_{yy}^{(0)}\) and \(u_{xy}^{0}\)

  • For \(k = 1,2, \ldots \) do

    • Compute \(u_{x}^{(k)}\) by Scheme (59) in Appendix 1 and Schemes (28) and (29).

    • Compute \(u_{y}^{(k)}\) by Scheme (61) in Appendix 1 and Schemes (30) and (31).

    • Compute \(u_{xx}^{(k)}\) by Scheme (60) in Appendix 1 and Schemes (32) and (33).

    • Compute \(u_{yy}^{(k)}\) by Scheme (62) in Appendix 1 and Schemes (34) and (35).

    • Compute \(u_{xy}^{(k)}\) by Scheme (63) in Appendix 1 and schemes (36)–(39).

    • Compute \(u^{(k)}\) by Scheme (25)

  • If \(\Vert F - Lu^{(k)} \Vert < \eta\) is satisfied, then stop.

Here k is iteration number. L is the linear difference operator for representation of the scheme (25). \(\Vert \cdot \Vert \) is a sort of norm. η is the convergence tolerance.

Truncation error analysis

A brief truncation error analysis is given here. For the sake of simplicity, we suppose that \(h_{x}\) and \(h_{y}\) are equal to h, using the Taylor series expansions at point \((x,y)\).

$$\begin{aligned} &u_{x} = \delta_{x}u - \frac{h^{2}}{6}u_{xxx} - \frac{h^{4}}{120}u_{x^{(5)}} - \frac{h^{6}}{5040}u_{x^{(7)}} + O \bigl(h^{8} \bigr), \end{aligned}$$
(44)
$$\begin{aligned} &u_{y} = \delta_{y}u - \frac{h^{2}}{6}u_{yyy} - \frac{h^{4}}{120}u_{y^{(5)}} - \frac{h^{6}}{5040}u_{y^{(7)}} + O \bigl(h^{8} \bigr). \end{aligned}$$
(45)

The original equation (1) is treated as an auxiliary relation that can be differentiated to yield expressions for the third-order derivatives,

$$\begin{aligned} u_{xxx} = {}&\biggl[\frac{1}{a}(f_{x} - bu_{yyx} - b_{x}u_{yy} - cu_{xxy} - c_{x}u_{xy} - pu_{xx} - p_{x}u_{x} - qu_{yx} - q_{x}u_{y} - r_{x}u - ru_{x}) \\ &{}- \frac{a_{x}}{a^{2}}(f - bu_{yy} - cu_{xy} - pu_{x} - qu_{y} - ru) \biggr], \end{aligned}$$
(46)
$$\begin{aligned} u_{yyy} = {}&\biggl[\frac{1}{b}(f_{y} - au_{xxy} - a_{y}u_{xx} - cu_{xyy} - c_{y}u_{xy} - pu_{xy} - p_{y}u_{x} - qu_{yy} - q_{y}u_{y} - r_{y}u - ru_{y}) \\ &{}- \frac{b_{y}}{b^{2}}(f - au_{xx} - cu_{xy} - pu_{x} - qu_{y} - ru) \biggr]. \end{aligned}$$
(47)

Substituting Eqs. (44)–(47) into Eq. (1) and rearranging it,

$$\begin{aligned} &\bar{A}u_{xx} + \bar{B}u_{yy} + \bar{C}u_{xy} + \bar{D}u_{x} + \bar{E}u_{y} + \bar{G}u_{xyy} + \bar{H}u_{xxy} + p\delta_{x}u + q\delta_{y}u \\ &\quad{}- \frac{h^{4}p}{120}u_{x^{(5)}} - \frac{h^{4}q}{120}u_{y^{(5)}} - \frac{h^{6}}{5040}u_{x^{(7)}} - \frac{h^{6}}{5040}u_{y^{(7)}} = F. \end{aligned}$$
(48)

\(\bar{A},\bar{B},\bar{C},\bar{D},\bar{E},\bar{G},\bar{H}\) and F are defined in Eqs. (8)–(15).

To obtain a sixth-order compact formulation for Eq. (48), consider the following approximations for all the derivatives:

$$\begin{aligned} &u_{xx} = 2\delta_{x}^{2}u - \delta_{x}u_{x} + \frac{h^{4}}{360}u_{x^{(6)}} + \frac{h^{6}}{10{,}080}u_{x^{(8)}} + O \bigl(h^{8} \bigr), \end{aligned}$$
(49)
$$\begin{aligned} &u_{yy} = 2\delta_{y}^{2}u - \delta_{y}u_{y} + \frac{h^{4}}{360}u_{y^{(6)}} + \frac{h^{6}}{10{,}080}u_{y^{(8)}} + O \bigl(h^{8} \bigr), \end{aligned}$$
(50)
$$\begin{aligned} &u_{xxy} = \delta_{x}^{2}u_{y} + \delta_{x}^{2}\delta_{y}u - \delta_{x} \delta_{y}u_{x} + \frac{h^{4}}{36}u_{x^{4}y^{3}} + O \bigl(h^{6} \bigr), \end{aligned}$$
(51)
$$\begin{aligned} &u_{yyx} = \delta_{y}^{2}u_{x} + \delta_{y}^{2}\delta_{x}u - \delta_{x} \delta_{y}u_{y} + \frac{h^{4}}{36}u_{y^{4}x^{3}} + O \bigl(h^{6} \bigr), \end{aligned}$$
(52)
$$\begin{aligned} &u_{x^{(5)}} = \frac{360}{7h^{4}} \biggl(u_{x} - \delta_{x}u + \frac{h^{2}}{6}\delta_{x}u_{xx} \biggr) - \frac{3h^{2}}{49}u_{x^{(7)}} + O \bigl(h^{4} \bigr), \end{aligned}$$
(53)
$$\begin{aligned} &u_{y^{(5)}} = \frac{360}{7h^{4}} \biggl(u_{y} - \delta_{y}u + \frac{h^{2}}{6}\delta_{y}u_{yy} \biggr) - \frac{3h^{2}}{49}u_{y^{(7)}} + O \bigl(h^{4} \bigr), \end{aligned}$$
(54)
$$\begin{aligned} &u_{x^{(6)}} = \frac{240}{h^{4}} \biggl(u_{xx} - \delta_{x}^{2}u + \frac{h^{2}}{12}\delta_{x}^{2}u_{xx} \biggr) - \frac{11h^{2}}{252}u_{x^{(8)}} + O \bigl(h^{4} \bigr), \end{aligned}$$
(55)
$$\begin{aligned} &u_{y^{(6)}} = \frac{240}{h^{4}} \biggl(u_{yy} - \delta_{y}^{2}u + \frac{h^{2}}{12}\delta_{y}^{2}u_{yy} \biggr) - \frac{11h^{2}}{252}u_{y^{(8)}} + O \bigl(h^{4} \bigr). \end{aligned}$$
(56)

Substituting Eqs. (49)–(56) into Eq. (48), we have

$$\begin{aligned} &\biggl(\frac{4}{3}\bar{A}\delta_{x}^{2} + \frac{4}{3}\bar{B}\delta_{y}^{2} + \frac{10p}{7} \delta_{x} + \frac{10q}{7}\delta_{y} + \bar{G} \delta_{y}^{2}\delta_{x} + \bar{H} \delta_{x}^{2}\delta_{y} \biggr)u + \biggl( \bar{D}u_{x} - \bar{A}\delta_{x}u_{x} \\ &\quad{}+ \bar{G}\delta_{y}^{2} - \bar{H}\delta_{x} \delta_{y} - \frac{3p}{7} \biggr)u_{x} + \biggl( \bar{E} - \bar{B}\delta_{y} + \bar{H}\delta_{x}^{2} - \bar{G}\delta_{y}\delta_{x} - \frac{3q}{7} \biggr)u_{y} \\ &\quad{}+ \biggl(\frac{2\bar{A}}{3} - \frac{ph^{2}}{14}\delta_{x} + \frac{\bar{A}h^{2}}{18}\delta_{x}^{2} \biggr)u_{xx} + \biggl(\frac{2\bar{B}}{3} - \frac{qh^{2}}{14}\delta_{y} + \frac{\bar{B}h^{2}}{18}\delta_{y}^{2} \biggr)u_{yy} \\ &\quad{}+ \bar{C}u_{xy} + \frac{h^{6}p}{1960}u_{x^{(7)}} - \frac{11h^{6}\bar{A}}{90{,}720}u_{x^{(8)}} + \frac{h^{6}q}{1960}u_{y^{(7)}} - \frac{11h^{6}\bar{B}}{90{,}720}u_{y^{(8)}} \\ &\quad{}+ \frac{\bar{A}h^{6}}{10{,}080}u_{x^{(8)}} + \frac{\bar{B}h^{6}}{10{,}080}u_{y^{(8)}} + \frac{\bar{H}h^{6}}{36}u_{x^{(4)}y^{(3)}} + \frac{\bar{G}h^{6}}{36}u_{x^{(3)}y^{(4)}} \\ &\quad{}- \frac{h^{6}}{5040}u_{x^{(7)}} - \frac{h^{6}}{5040}u_{y^{(7)}} = F. \end{aligned}$$
(57)

Notice that all the derivatives \(u_{x},u_{xx},u_{y},u_{yy},u_{xy}\) are calculated independently by the formulas (76)–(80) in Appendix 4. Substituting their truncation error \(- \frac{h^{6}}{7!}u_{x^{(7)}}, - \frac{2h^{6}}{8!}u_{x^{(8)}}, - \frac{h^{6}}{7!}u_{y^{(7)}}, - \frac{2h^{6}}{8!}u_{y^{(8)}}\) and \(\frac{h^{6}}{960}[u_{x^{(5)}y^{(3)}} + u_{x^{(3)}y^{(5)}}]\) into Eq. (57), respectively, and rearranging it, we have

$$\begin{aligned} \mathrm{Truncation} ={}& \frac{h^{6}}{7!} \bigl[(\bar{A}- \bar{D} -\bar{G}+\bar{H}+3p-1)u_{{x}^{(7)}}+(\bar{B}-\bar{E}+\bar{H}- \bar{G}+3q-1)u_{y^{(7)}}\bigr] \\ &{}+ \frac{2h^{6}}{8!}\biggl[\biggl(\frac{ph^{2}}{14} -\frac{10\bar{A}}{9}- \frac{\bar{A}h^{2 }}{18}\biggr)u_{{x}^{(8)}}+\biggl(\frac{qh^{2}}{14}- \frac{10\bar{B}}{9}-\frac{\bar{B}h^{2}}{18}\biggr) u_{y^{(8)} }\biggr] \\ &{} + \frac{h^{4}}{36}(\bar{H}u_{{x}^{(4)}y^{(3)}}+\bar{G}u_{{x}^{(3)}y^{(4)}})+ \frac{\bar{C}h^{6}}{960} (u_{{x}^{(5)}y^{(3)}}+u_{{x}^{(3)}y^{(5)}}). \end{aligned}$$
(58)

Numerical experiments

In this section, we conduct numerical experiments with three test problems chosen from the literature to test the high-order accuracy of the BCD scheme. All problems are defined on the unit square domain \(\varOmega = (0,1) \times (0,1)\). For all three problems, the right-hand functions f and the Dirichlet boundary conditions are prescribed to satisfy the given analytic solution. We select the hybrid biconjugate gradient stabilized method (BiCGStab(2)) [44] to solve the resulting linear systems in all test problems. All iterative procedures are started with zero initial guesses and are terminated when the Euclidean norm of the residual vector is reduced by 1010. The code is written in Fortran 77 programming language with double precision arithmetic. All computations are run on a personal computer with an Intel (R) core (TM) i3-5005U double 2.0 GHz CPU and 4 GB memory. The error and the convergence rate of the method are computed with the following definition:

$$\mathrm{Error} = \max_{i,j} \bigl\vert u_{i,j} - u(x_{i},y_{j}) \bigr\vert ;\qquad \mathrm{Rate} = \frac{\log (\mathrm{Error}1/\mathrm{Error}2)}{\log (h_{1}/h_{2})}, $$

where \(u(x_{i},y_{j})\) is the exact solution. Error1 and Error2 are the maximum absolute errors estimated for the two different grid step sizes \(h_{1}\) and \(h_{2}\).

Problem 1: With variable coefficients [1, 45]

Consider the following differential equation in the presence of a source term:

$$\bigl[(x + 1)^{2} + y^{2} \bigr]u_{xx} - 2xyu_{xy} + (x + 1)^{2}u_{yy} + (x + 2)u_{x} - yu_{y} = f(x,y). $$

The analytic solution is

$$u=x^{3}y^{2}+x\sin(x)\cos(xy). $$

We notice that Problem 1 has a non-periodic boundary condition. For comparison, the results of the CCD2 scheme [1] are also given. Firstly, we use different mesh sizes from 1/8 to 1/64 to evaluate the computed accuracy order. Table 1 gives the maximum absolute errors and the convergence rate for Problem 1. We can clearly see that the BCD scheme obtains sixth-order accuracy and gets a more accurate solution than the CCD2 scheme. The CCD2 scheme cannot reach sixth-order accuracy because the fourth-order scheme is used for the boundaries computation, which influences the whole computed accuracy.

Table 1 The maximum absolute error and convergence rate of different discretization for Problem 1

Problem 2: With high anisotropy ratio [1]

Consider the following differential equation in the presence of a source term:

$$\bigl[\varepsilon x^{2} + y^{2} \bigr]u_{xx} + 2( \varepsilon - 1)xyu_{xy} + \bigl(x^{2} + \varepsilon y^{2} \bigr)u_{yy} + (3\varepsilon - 1)xu_{x} + (3 \varepsilon - 1)yu_{y} = f(x,y). $$

The analytic solution is

$$u=\sin(\pi x)\sin(\pi y). $$

The second model problem is an anisotropy problem. ε is chosen to reflect the magnitude of the anisotropy. Note that \(\varepsilon = 1\) gives an isotropic equation, and the degree of anisotropy increases when ε becomes smaller. The maximum absolute errors, the convergence rate and CPU time for \(\varepsilon = 10^{ - 1}\) and 10−3, using CCD2 scheme and the BCD scheme, are given in Table 2 and Table 3, respectively. Numerical results show that the maximum absolute errors of the BCD scheme and the CCD2 scheme are almost identical. They are seventh-order accurate and their excellent performances are obviously independent of the anisotropy ratio \(\varepsilon = 10^{ - 1}\) and \(\varepsilon = 10^{ - 3}\). When \(\varepsilon = 10^{ - 1}\), the BCD scheme yields a slightly better solution than the CCD2 scheme. However, when \(\varepsilon = 10^{ - 3}\), the CCD2 scheme gets a slightly better solution than the BCD scheme. We notice that values on the boundaries are zero (periodic boundary conditions), for the CCD2 scheme, the fourth-order scheme for periodic boundary conditions does not influence the results of inner grid points.

Table 2 The maximum absolute error and convergence rate for Problem 2 with \(\varepsilon = 10^{ - 1}\)
Table 3 The maximum absolute error and convergence rate for Problem 2 with \(\varepsilon = 10^{ - 3}\)

In Table 2 and Table 3 it can be shown that the CPU time is related to the number of grid points and anisotropy ratio. We find the same anisotropy ratio in which the number of grid points becomes higher when the CPU time is higher and the same number of grid points with which anisotropy ratio is higher when the CPU time is higher.

Problem 3: With large Reynold number [1, 8]

Consider the following differential equation in the presence of a source term:

$$u_{xx} + \cos (\pi x)\sin (\pi y)u_{xy} + u_{yy} - \operatorname{Re} (1 - x) (1 - 2y)u_{x} + 4\operatorname{Re} xy(1 - y)u_{y} = f(x,y). $$

The analytic solution is

$$u=\sin(\pi x)+\sin(\pi y)+\sin(\pi x)\sin(\pi y). $$

For comparison, we use the BCD, the FOC [8], and the CCD2 schemes [1] to compute the numerical solutions of Problem 3.

Tables 46 give the maximum absolute errors, the convergence rate and CPU time, when \(\operatorname{Re} = 10^{2},10^{4},10^{6}\), respectively. It is seen that the BCD and CCD2 schemes are almost not influenced by the increase of Reynolds number, while the FOC scheme gradually loses its fourth-order accuracy. Numerical results also show that the maximum absolute errors of the BCD scheme and the CCD2 scheme are almost identical. With seventh-order accuracy their excellent performances are obviously independent of the Re numbers. The BCD scheme yields slightly more accurate solution than the CCD2 scheme does. We can also see that the CPU time is related to the Re numbers, which means that Re becomes bigger when the CPU time is higher with the same number of grid points.

Table 4 The maximum absolute error and convergence rate for Problem 3 with \(\operatorname{Re}=10^{2}\)
Table 5 The maximum error and convergence rate for Problem 3 with \(\operatorname{Re}=10^{4}\)
Table 6 The maximum error and convergence rate for Problem 3 with \(\operatorname{Re}=10^{6}\)

Finally, the maximum absolute error and the convergence rate of Problem 1, Problem 2 with \(\varepsilon = 10^{ - 1}\) and Problem 3 with \(\operatorname{Re}=10\) are given in Table 7 when \(h_{x}\) is not equal to \(h_{y}\). Numerical results also show that the BCD scheme can reach its theoretical sixth-order accuracy.

Table 7 The maximum error and convergence rate for Problem 1, Problem 2 with \(\varepsilon = 10^{ - 1}\) and Problem 3 with \(\operatorname{Re}=10\)

Conclusions

In this paper, the BCD scheme is proposed to solve the general two-dimensional linear second-order partial differential equation. A truncation error analysis is done to show that the BCD scheme is sixth-order accuracy for the interior grid points. Besides, the sixth-order accuracy difference schemes are also proposed to compute the first- and second-order derivatives for grid points on the boundaries. The superiority of the present method is that it fully exploits the merits of the explicit compact difference and implicit compact difference methods. At least three important conclusions are obtained. (i) The present method reaches sixth-order accuracy for smooth solution problems, even for those with large first derivative terms or anisotropy problems. (ii) We perform a sixth-order computation for the grid points on the boundaries, while Ref. [1] uses the fourth-order scheme, which decreases the accuracy order of solution for those problems with non-periodic boundary conditions. (iii) Our method is decoupled, i.e., we can solve the unknown function u and its various derivatives separately with an iteration process. Its advantage is that the derivation of the scheme, the algorithm design and programming are simple and easy to operate in the extension to high-dimensional problems. Especially for the problems of complex flow and heat transfer, it is relatively easy to construct a discrete scheme with high precision and for their boundary conditions. Numerical experiments are conducted to demonstrate the accuracy of the present scheme. It is shown that the present method is more accurate than those in the literature.

References

  1. 1.

    Lee, S.T., Liu, J., Sun, H.W.: Combined compact difference scheme for linear second-order partial differential equations with mixed derivative. J. Comput. Appl. Math. 264, 23–37 (2014)

  2. 2.

    Arbogast, T., Wheeler, M., Yotov, I.: Mixed finite elements for elliptic problems with tensor coefficients as cell-centered finite differences. SIAM J. Numer. Anal. 34, 828–852 (1997)

  3. 3.

    Friis, H., Edwards, M., Mykkeltveit, J.: Symmetric positive definite flux-continuous full-tensor finite-volume schemes on unstructured cell-centered triangular grids. SIAM J. Sci. Comput. 31, 1192–1220 (2008)

  4. 4.

    Ge, L., Zhang, J.: High accuracy iterative solution of convection diffusion equation with boundary layers on nonuniform grids. J. Comput. Phys. 171, 560–578 (2001)

  5. 5.

    Gupta, M.M., Manohar, R.P., Stephenson, J.W.: High-order difference schemes for two- dimensional elliptic equations. Numer. Methods Partial Differ. Equ. 1, 71–80 (1985)

  6. 6.

    Ananthakrishnaiah, U., Manohar, R., Stephenson, J.W.: High-order methods for elliptic equation with variable coefficients. Numer. Methods Partial Differ. Equ. 3, 219–227 (1987)

  7. 7.

    Gordin, V.A., Tsymbalov, E.A.: Compact difference scheme for parabolic and Schrödinger-type equations with variable coefficients. J. Comput. Phys. 375, 1451–1468 (2018)

  8. 8.

    Karaa, J.S.: High-order difference schemes for 2D elliptic and parabolic problems with mixed derivatives. Numer. Methods Partial Differ. Equ. 23, 366–378 (2007)

  9. 9.

    Gupta, M.M., Manohar, R.P., Stephenson, J.W.: A single cell high order scheme for the convection-diffusion equation with variable coefficients. Int. J. Numer. Methods Fluids 4, 641–651 (1984)

  10. 10.

    Gupta, M.M.: A fourth order Poisson solver. J. Comput. Phys. 55, 166–172 (1984)

  11. 11.

    Spotz, W.F., Carey, G.F.: A high-order compact formulation for the 3D Poisson equation. Numer. Methods Partial Differ. Equ. 12, 235–243 (1996)

  12. 12.

    Gupta, M.M., Kouatchou, J.: Symbolic derivation of finite difference approximations for the three-dimensional Poisson equation. Numer. Methods Partial Differ. Equ. 14, 593–606 (1998)

  13. 13.

    Wang, J., Zhong, W., Zhang, J.: A general meshsize fourth-order compact difference discretization scheme for 3D Poisson equation. Appl. Math. Comput. 183, 804–812 (2006)

  14. 14.

    Sutmann, G., Steffen, B.: High-order compact solvers for the three-dimensional Poisson equation. J. Comput. Appl. Math. 187, 142–170 (2006)

  15. 15.

    Singer, I., Turkel, E.: Sixth-order accurate finite difference schemes for the Helmholtz equation. J. Comput. Acoust. 14, 339–351 (2006)

  16. 16.

    Turkel, E., Gordon, D., Gordon, R., Tsynkov, S.: Compact 2D and 3D sixth order schemes for the Helmholtz equation with variable wave number. J. Comput. Phys. 232, 272–287 (2013)

  17. 17.

    Dennis, S.C.R., Hudson, J.D.: Compact finite difference approximation to operators of Navier–Stokes type. J. Comput. Phys. 85, 390–416 (1989)

  18. 18.

    Chen, G.Q., Gao, Z., Yang, Z.F.: A perturbational h4 exponential finite difference scheme for the convective diffusion equation. J. Comput. Phys. 104, 129–139 (1993)

  19. 19.

    Radhakrishna Pillai, A.C.: Fourth-order exponential finite difference methods for boundary value problems of convection diffusion type. Int. J. Numer. Methods Fluids 37, 87–106 (2001)

  20. 20.

    Zhang, J., Sun, H.W., Zhao, J.J.: High order compact scheme with multigrid local mesh refinement procedure for convection diffusion problems. Comput. Methods Appl. Mech. Eng. 191, 4661–4674 (2002)

  21. 21.

    Zhang, J.: An explicit fourth-order compact finite difference scheme for three dimensional convection-diffusion equation. Commun. Numer. Methods Eng. 14, 263–280 (1998)

  22. 22.

    Tian, Z.F., Dai, S.Q.: High-order compact exponential finite difference methods for convection-diffusion type problems. J. Comput. Phys. 220, 952–974 (2007)

  23. 23.

    Spotz, W.F., Carey, G.F.: High-order compact scheme for the steady stream-function vorticity equations. Int. J. Numer. Methods Eng. 38, 3497–3512 (1995)

  24. 24.

    Li, M., Tang, T., Fornberg, B.: A compact fourth-order finite difference scheme for the steady incompressible Navier–Stokes equations. Int. J. Numer. Methods Fluids 30, 1137–1151 (1995)

  25. 25.

    Tian, Z.F., Ge, Y.B.: A fourth-order compact finite difference scheme for the steady stream function vorticity formulation of the Navier–Stokes/Boussinesq equations. Int. J. Numer. Methods Fluids 41, 495–518 (2003)

  26. 26.

    Kreiss, H.O., Orszag, S.A., Israeli, M.: Numerical simulation of viscous incompressible flow. Annu. Rev. Fluid Mech. 6, 281–318 (1974)

  27. 27.

    Hirsh, R.S.: Higher order accurate difference solutions of fluid mechanics problems by a compact differencing technique. J. Comput. Phys. 19, 90–109 (1975)

  28. 28.

    Adam, Y.: A Hermitian finite difference method for the solution of parabolic equations. Comput. Math. Appl. 1, 393–406 (1975)

  29. 29.

    Lele, S.K.: Compact finite difference schemes with spectral-like resolution. J. Comput. Phys. 103, 16–42 (1992)

  30. 30.

    Chu, P.C., Fan, C.W.: A three-point combined compact difference scheme. J. Comput. Phys. 140, 370–399 (1998)

  31. 31.

    Fu, D.X., Ma, Y.W., Liu, H.: Upwind compact scheme and application. In: Proceedings of the 5th International Symposium on Computational Fluid Dynamics, vol. 1, pp. 184–190 (1993)

  32. 32.

    Deng, X.G., Zhang, H.X.: Developing high-order accurate weighted compact nonlinear scheme. J. Comput. Phys. 165, 22–44 (2000)

  33. 33.

    Jiang, L., Shan, H., Liu, C.: Weighted compact scheme for shock capturing. Int. J. Comput. Fluid Dyn. 15, 147–155 (2001)

  34. 34.

    Zhong, X., Tatineni, M.: High-order non-uniform grid schemes for numerical simulation of hypersonic boundary-layer stability and transition. J. Comput. Phys. 190, 419–458 (2003)

  35. 35.

    Capdeville, G.: A central WENO scheme for solving hyperbolic conservation laws on non-uniform meshes. J. Comput. Phys. 227, 2977–3014 (2008)

  36. 36.

    Liu, Y., Mrinal, K.S.: A new time-space domain high-order finite-difference method for the acoustic wave equation. J. Comput. Phys. 228, 8779–8806 (2009)

  37. 37.

    Xie, S.S., Yi, S.C., Kwon, T.I.: Fourth-order compact difference and alternating direction implicit schemes for telegraph equations. Comput. Phys. Commun. 183, 552–569 (2012)

  38. 38.

    Liu, X., Zhang, S., Zhang, H., Chi, W.: A new class of central compact schemes with spectral-like resolution I: linear schemes. J. Comput. Phys. 248, 235–256 (2013)

  39. 39.

    Liao, H.L., Sun, Z.Z.: A two-level compact ADI method for solving second-order wave equations. Int. J. Comput. Math. 90, 1471–1488 (2013)

  40. 40.

    Mingham, C.G., Causon, D.M.: A simple high-resolution advection scheme. Int. J. Numer. Methods Fluids 56, 469–484 (2008)

  41. 41.

    Tian, Z.F., Liang, X., Yu, P.X.: A higher order compact finite difference algorithm for solving the incompressible Navier–Stokes equations. Int. J. Numer. Methods Eng. 88, 511–532 (2011)

  42. 42.

    Qin, Q., Xia, Z.A., Tian, Z.F.: High accuracy numerical investigation of double-diffusive convection in a rectangular enclosure with horizontal temperature and concentration gradients. Int. J. Heat Mass Transf. 71, 405–423 (2014)

  43. 43.

    Zhao, B.X., Tian, Z.F.: High-resolution high-order upwind compact scheme-based numerical computation of natural convection flows in a square cavity. Int. J. Heat Mass Transf. 98, 313–328 (2016)

  44. 44.

    Kelly, C.T.: Iterative Methods for Linear and Nonlinear Equations. SIAM, Philadelphia (1995)

  45. 45.

    Berndt, M., Lipnikov, K., Shashkov, M., Wheeler, M.F., Yotov, I.: Superconvergence of the velocity in mimetic finite difference methods on quadrilaterals. SIAM J. Numer. Anal. 43, 1728–1749 (2005)

Download references

Acknowledgements

The authors would like to thank the editors and the referees, whose constructive comments were helpful in improving the quality of this paper.

Availability of data and materials

Not applicable.

Funding

This work was supported in part by the National Natural Science Foundation of China under Grants 11772165 and 11361045, and the National Natural Science Foundation of Ningxia under Grant 2018AAC02003, and the Key Research and Development Program of Ningxia under Grant 2018BEE03007.

Author information

YG defined the research theme. TM designed numerical method and conducted numerical experiments. YG interpreted the results and wrote the paper. All author have seen and approved the final version of the manuscript.

Correspondence to Yongbin Ge.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix 1: The sixth-order schemes of the first- and second-order derivatives as well as the mixed derivative

For the first- and second-order derivatives along the x- and y-directions [30]

$$\begin{aligned} &\frac{7}{16}u_{x1} + u_{x0} + \frac{7}{16}u_{x3} = \frac{15}{16h_{x}}u_{1} - u_{3}) + \frac{h_{x}}{16}(u_{xx1} - u_{xx3}) + O \bigl(h_{x}^{6} \bigr), \end{aligned}$$
(59)
$$\begin{aligned} &{-} \frac{1}{8}u_{xx1} + u_{xx0} - \frac{1}{8}u_{xx3} = \frac{3}{h_{x}^{2}}(u_{1} - 2u_{0} + u_{3}) - \frac{9}{8h_{x}}(u_{x1} - u_{x3}) + O \bigl(h_{x}^{6} \bigr), \end{aligned}$$
(60)
$$\begin{aligned} &\frac{7}{16}u_{y2} + u_{y0} + \frac{7}{16}u_{y4} = \frac{15}{16h_{y}}(u_{2} - u_{4}) + \frac{h_{y}}{16}(u_{yy2} - u_{yy4}) + O \bigl(h_{y}^{6} \bigr), \end{aligned}$$
(61)
$$\begin{aligned} &{-} \frac{1}{8}u_{yy2} + u_{yy0} - \frac{1}{8}u_{yy4} = \frac{3}{h_{y}^{2}}(u_{2} - 2u_{0} + u_{4}) - \frac{9}{8h_{y}}(u_{y2} - u_{y4}) + O \bigl(h_{y}^{6} \bigr). \end{aligned}$$
(62)

For the mixed derivative \(u_{xy}\) [1]

$$\begin{aligned} &(u_{xy})_{0} + \frac{1}{16} \Biggl[\sum _{i = 1}^{4} (u_{xy})_{i} \Biggr] - \frac{1}{32} \Biggl[\sum_{i = 5}^{8} (u_{xy})_{i} \Biggr] \\ &\quad = \frac{9}{16h_{y}} \bigl[(u_{x})_{2} - (u_{x})_{4} \bigr] + \frac{9}{16h_{x}} \bigl[(u_{y})_{1} - (u_{y})_{3} \bigr] \\ &\qquad{}- \frac{9}{32h_{{x}}h_{y}}(u_{5} - u_{6} + u_{7} - u_{8}) + \frac{h_{x}^{6}}{960}u_{x^{(5)}y^{(3)}} + \frac{h_{y}^{6}}{960}u_{x^{(3)}y^{(5)}} + O \bigl(h_{x}^{8} + h_{y}^{8} \bigr). \end{aligned}$$
(63)

Appendix 2: Details of the central difference operators

$$\begin{aligned} &\delta_{x}^{2}u_{0} = \frac{u_{1} - 2u_{0} + u_{3}}{h_{x}^{2}};\qquad \delta_{x}u_{0} = \frac{u_{1} - u_{3}}{2h_{x}}, \\ &\delta_{y}^{2}u_{0} = \frac{u_{2} - 2u_{0} + u_{4}}{h_{y}^{2}};\qquad \delta_{y}u_{0} = \frac{u_{2} - u_{4}}{2h_{y}}, \\ &\delta_{x}^{2}\delta_{y}u_{0} = \frac{u_{5} + u_{6} - u_{7} - u_{8} - 2u_{2} + 2u_{4}}{2h_{x}^{2}h_{y}},\\ & \delta_{y}^{2}\delta_{x}u_{0} = \frac{u_{5} - u_{6} - u_{7} + u_{8} - 2u_{1} + 2u_{3}}{2h_{y}^{2}h_{x}}, \\ &\delta_{x}\delta_{y}u_{0} = \frac{u_{5} - u_{6} + u_{7} - u_{8}}{4h_{x}h_{y}}. \end{aligned}$$

Appendix 3: The sixth-order schemes of the mixed derivative on the boundaries

The sixth-order scheme of left boundary of the mixed derivative may be obtained from a relation of the form

$$\begin{aligned} &(u_{xy})_{0,j} + \alpha (u_{xy})_{1,j} = \biggl(\frac{\partial u_{y}}{\partial x} \biggr)_{0,j} + \alpha \biggl( \frac{\partial u_{y}}{\partial x} \biggr)_{1,j} \\ &\quad= \bigl[a_{0}(u_{y})_{0,j} + a_{1}(u_{y})_{1,j} + a_{2}(u_{y})_{2,j} + a_{3}(u_{y})_{3,j} \\ &\qquad{}+ a_{4}(u_{y})_{4,j} + a_{5}(u_{y})_{5,j} + a_{6}(u_{y})_{6,j} \bigr]/h_{x}, \end{aligned}$$
(64)

where \(j = 0,1, \ldots,N_{y}\), the coefficients \(a_{0},a_{1},a_{2},a_{3},a_{4},a_{5}\) (for the subscript see Fig. 2) and α are derived by matching the Taylor series coefficients of various orders. The detailed derivation process is given here.

Using the Taylor series expansions at point (\(0,j\))

$$\begin{aligned} (u_{y})_{1,j} ={}& (u_{y})_{0,j} + h_{x} \biggl(\frac{\partial u_{y}}{\partial x} \biggr)_{0,j} + \frac{h_{x}^{2}}{2!} \biggl(\frac{\partial^{2}u_{y}}{\partial x^{2}} \biggr)_{0,j} + \frac{h_{x}^{3}}{3!} \biggl(\frac{\partial^{3}u_{y}}{\partial x^{3}} \biggr)_{0,j} \\ &{}+ \frac{h_{x}^{4}}{4!} \biggl(\frac{\partial^{4}u_{y}}{\partial x^{4}} \biggr)_{0,j} + \frac{h_{x}^{5}}{5!} \biggl(\frac{\partial^{5}u_{y}}{\partial x^{5}} \biggr)_{0,j} + \frac{h_{x}^{6}}{6!} \biggl(\frac{\partial^{6}u_{y}}{\partial x^{6}} \biggr)_{0,j} + O \bigl(h_{x}^{7} \bigr), \end{aligned}$$
(65)
$$\begin{aligned} (u_{y})_{2,j} ={}& (u_{y})_{0,j} + 2h_{x} \biggl(\frac{\partial u_{y}}{\partial x} \biggr)_{0,j} + \frac{2^{2}h_{x}^{2}}{2!} \biggl(\frac{\partial^{2}u_{y}}{\partial x^{2}} \biggr)_{0,j} + \frac{2^{3}h_{x}^{3}}{3!} \biggl(\frac{\partial^{3}u_{y}}{\partial x^{3}} \biggr)_{0,j} \\ &{}+ \frac{2^{4}h_{x}^{4}}{4!} \biggl(\frac{\partial^{4}u_{y}}{\partial x^{4}} \biggr)_{0,j} + \frac{2^{5}h_{x}^{5}}{5!} \biggl(\frac{\partial^{5}u_{y}}{\partial x^{5}} \biggr)_{0,j} + \frac{2^{6}h_{x}^{6}}{6!} \biggl(\frac{\partial^{6}u_{y}}{\partial x^{6}} \biggr)_{0,j} + O \bigl(h_{x}^{7} \bigr), \end{aligned}$$
(66)
$$\begin{aligned} (u_{y})_{3,j} ={}& (u_{y})_{0,j} + 3h_{x} \biggl(\frac{\partial u_{y}}{\partial x} \biggr)_{0,j} + \frac{3^{2}h_{x}^{2}}{2!} \biggl(\frac{\partial^{2}u_{y}}{\partial x^{2}} \biggr)_{0,j} + \frac{3^{3}h_{x}^{3}}{3!} \biggl(\frac{\partial^{3}u_{y}}{\partial x^{3}} \biggr)_{0,j} \\ &{}+ \frac{3^{4}h_{x}^{4}}{4!} \biggl(\frac{\partial^{4}u_{y}}{\partial x^{4}} \biggr)_{0,j} + \frac{3^{5}h_{x}^{5}}{5!} \biggl(\frac{\partial^{5}u_{y}}{\partial x^{5}} \biggr)_{0,j} + \frac{3^{6}h_{x}^{6}}{6!} \biggl(\frac{\partial^{6}u_{y}}{\partial x^{6}} \biggr)_{0,j} + O \bigl(h_{x}^{7} \bigr), \end{aligned}$$
(67)
$$\begin{aligned} (u_{y})_{4,j} ={}& (u_{y})_{0,j} + 4h_{x} \biggl(\frac{\partial u_{y}}{\partial x} \biggr)_{0,j} + \frac{4^{2}h_{x}^{2}}{2!} \biggl(\frac{\partial^{2}u_{y}}{\partial x^{2}} \biggr)_{0,j} + \frac{4^{3}h_{x}^{3}}{3!} \biggl(\frac{\partial^{3}u_{y}}{\partial x^{3}} \biggr)_{0,j} \\ &{}+ \frac{4^{4}h_{x}^{4}}{4!} \biggl(\frac{\partial^{4}u_{y}}{\partial x^{4}} \biggr)_{0,j} + \frac{4^{5}h_{x}^{5}}{5!} \biggl(\frac{\partial^{5}u_{y}}{\partial x^{5}} \biggr)_{0,j} + \frac{4^{6}h_{x}^{6}}{6!} \biggl(\frac{\partial^{6}u_{y}}{\partial x^{6}} \biggr)_{0,j} + O \bigl(h_{x}^{7} \bigr), \end{aligned}$$
(68)
$$\begin{aligned} (u_{y})_{5,j} ={}& (u_{y})_{0,j} + 5h_{x} \biggl(\frac{\partial u_{y}}{\partial x} \biggr)_{0,j} + \frac{5^{2}h_{x}^{2}}{2!} \biggl(\frac{\partial^{2}u_{y}}{\partial x^{2}} \biggr)_{0,j} + \frac{5^{3}h_{x}^{3}}{3!} \biggl(\frac{\partial^{3}u_{y}}{\partial x^{3}} \biggr)_{0,j} \\ &{}+ \frac{5^{4}h_{x}^{4}}{4!} \biggl(\frac{\partial^{4}u_{y}}{\partial x^{4}} \biggr)_{0,j} + \frac{5^{5}h_{x}^{5}}{5!} \biggl(\frac{\partial^{5}u_{y}}{\partial x^{5}} \biggr)_{0,j} + \frac{5^{6}h_{x}^{6}}{6!} \biggl(\frac{\partial^{6}u_{y}}{\partial x^{6}} \biggr)_{0,j} + O \bigl(h_{x}^{7} \bigr), \end{aligned}$$
(69)
$$\begin{aligned} (u_{y})_{6,j} = {}&(u_{y})_{0,j} + 6h_{x} \biggl(\frac{\partial u_{y}}{\partial x} \biggr)_{0,j} + \frac{6^{2}h_{x}^{2}}{2!} \biggl(\frac{\partial^{2}u_{y}}{\partial x^{2}} \biggr)_{0,j} + \frac{6^{3}h_{x}^{3}}{3!} \biggl(\frac{\partial^{3}u_{y}}{\partial x^{3}} \biggr)_{0,j} \\ &{}+ \frac{6^{4}h_{x}^{4}}{4!} \biggl(\frac{\partial^{4}u_{y}}{\partial x^{4}} \biggr)_{0,j} + \frac{6^{5}h_{x}^{5}}{5!} \biggl(\frac{\partial^{5}u_{y}}{\partial x^{5}} \biggr)_{0,j} + \frac{6^{6}h_{x}^{6}}{6!} \biggl(\frac{\partial^{6}u_{y}}{\partial x^{6}} \biggr)_{0,j} + O \bigl(h_{x}^{7} \bigr) \end{aligned}$$
(70)

and substituting Eqs. (65)–(70) into Eq. (64), we are able to obtain linear equations as shown below:

$$\begin{aligned} \begin{aligned}& a_{0} + a_{1} + a_{2} + a_{3} + a_{4} + a_{5} + a_{6} = 0, \\ &\frac{1}{2!} \bigl(a_{1} + 2^{2}a_{2} + 3^{2}a_{3} + 4^{2}a_{4} + 5^{2}a_{5} + 6^{2}a_{6} \bigr) = \alpha, \\ &\frac{1}{3!} \bigl(a_{1} + 2^{3}a_{2} + 3^{3}a_{3} + 4^{3}a_{4} + 5^{3}a_{5} + 6^{3}a_{6} \bigr) = \frac{\alpha}{2}, \\ &\frac{1}{4!} \bigl(a_{1} + 2^{4}a_{2} + 3^{4}a_{3} + 4^{4}a_{4} + 5^{4}a_{5} + 6^{4}a_{6} \bigr) = \frac{\alpha}{6}, \\ &\frac{1}{5!} \bigl(a_{1} + 2^{5}a_{2} + 3^{5}a_{3} + 4^{5}a_{4} + 5^{5}a_{5} + 6^{5}a_{6} \bigr) = \frac{\alpha}{24}, \\ &\frac{1}{6!} \bigl(a_{1} + 2^{6}a_{2} + 3^{6}a_{3} + 4^{6}a_{4} + 5^{6}a_{5} + 6^{6}a_{6} \bigr) = \frac{\alpha}{120}, \\ &\frac{1}{7!} \bigl(a_{1} + 2^{7}a_{2} + 3^{7}a_{3} + 4^{7}a_{4} + 5^{7}a_{5} + 6^{7}a_{6} \bigr) = \frac{\alpha}{720}. \end{aligned} \end{aligned}$$
(71)

Resolving it by Matlab software, we can get the results as follows:

$$\begin{aligned} &\alpha = \frac{1}{5},\qquad a_{0} = - \frac{149}{60},\qquad a_{1} = \frac{1723}{300},\qquad a_{2} = - 7,\qquad a_{3} = \frac{19}{3},\\ & a_{4} = - \frac{43}{12},\qquad a_{5} = \frac{23}{20},\qquad a_{6} = - \frac{4}{25}. \end{aligned}$$

So, the sixth-order scheme for the left boundary of the mixed derivative can be written as

$$\begin{aligned} &(u_{xy})_{0,j} + \frac{1}{5}(u_{xy})_{1,j} \\ &\quad= \biggl[ - \frac{149}{60}(u_{y})_{0,j} + \frac{1723}{300}(u_{y})_{1,j} - 7(u_{y})_{2,j} + \frac{19}{3}(u_{y})_{3,j} - \frac{43}{12}(u_{y})_{4,j} \\ &\qquad{}+ \frac{23}{20}(u_{y})_{5,j} - \frac{4}{25}(u_{y})_{6,j} \biggr]\Big/h_{x}. \end{aligned}$$
(72)

The derivation of right boundary scheme for the mixed derivative is exactly analogous to the left boundary. The right boundary scheme is summarized below:

$$\begin{aligned} &(u_{xy})_{N_{x},j} - \frac{1}{5}(u_{xy})_{N_{x} - 1,j} \\ &\quad= \biggl[\frac{29}{12}(u_{y})_{N_{x},j} - \frac{1877}{300}(u_{y})_{N_{x} - 1,j} + 8(u_{y})_{N_{x} - 2,j} - 7(u_{y})_{N_{x} - 3,j} \\ &\qquad{}+ \frac{47}{12}(u_{y})_{N_{x} - 4,j} - \frac{5}{4}(u_{y})_{N_{x} - 5,j} + \frac{13}{75}(u_{y})_{N_{x} - 6,j} \biggr]\Big/h_{x},\quad j = 0,1,2, \ldots,N_{y}. \end{aligned}$$
(73)

In the same way, we can get the sixth-order schemes for approximating the top and bottom boundaries as follows:

$$\begin{aligned} &(u_{xy})_{i,N_{y}} - \frac{1}{5}(u_{xy})_{{i,N_{y} - 1}} \\ &\quad= \biggl[\frac{29}{12}(u_{x})_{i,N_{y}} - \frac{1877}{300}(u_{x})_{i,N_{y} - 1} + 8(u_{x})_{i,N_{y} - 2} - 7(u_{x})_{i,N_{y} - 3} \\ &\qquad{}+ \frac{47}{12}(u_{x})_{i,N_{y} - 4} - \frac{5}{4}(u_{x})_{i,N_{y} - 5} + \frac{13}{75}(u_{x})_{i,N_{y} - 6} \biggr]\Big/h_{x},\quad i = 0,1,2, \ldots,N_{x}, \end{aligned}$$
(74)
$$\begin{aligned} &(u_{xy})_{i,0} + \frac{1}{5}(u_{xy})_{i,1} \\ &\quad= \biggl( - \frac{149}{60}(u_{x})_{i,0} + \frac{1723}{300}(u_{x})_{i,1} - 7(u_{x})_{i,2} + \frac{19}{3}(u_{x})_{i,3} \\ &\qquad{}- \frac{43}{12}(u_{x})_{i,4} + \frac{3}{20}(u_{x})_{i,5} - \frac{4}{25}(u_{x})_{i,6} \biggr)\Big/h_{y},\quad i = 1,2,\ldots,N_{x}. \end{aligned}$$
(75)

Appendix 4: The truncation errors of the sixth-order schemes of the first- and second-order derivatives and the mixed derivative

$$\begin{aligned} &\frac{7}{16}u_{x1} + u_{x0} + \frac{7}{16}u_{x3} = \frac{15}{16h}u_{1} - u_{3}) + \frac{h}{16}(u_{xx1} - u_{xx3}) - \frac{h^{6}}{7!}u_{x^{(7)}} + O \bigl(h^{7} \bigr), \end{aligned}$$
(76)
$$\begin{aligned} &{-} \frac{1}{8}u_{xx1} + u_{xx0} - \frac{1}{8}u_{xx3} = \frac{3}{h^{2}}(u_{1} - 2u_{0} + u_{3}) - \frac{9}{8h}(u_{x1} - u_{x3}) - \frac{2h^{6}}{8!}u_{x^{(8)}} + O \bigl(h^{7} \bigr), \end{aligned}$$
(77)
$$\begin{aligned} &\frac{7}{16}u_{y2} + u_{y0} + \frac{7}{16}u_{y4} = \frac{15}{16h_{y}}(u_{2} - u_{4}) + \frac{h_{y}}{16}(u_{yy2} - u_{yy4}) - \frac{h^{6}}{7!}u_{y^{(7)}} + O \bigl(h^{7} \bigr), \end{aligned}$$
(78)
$$\begin{aligned} &{-} \frac{1}{8}u_{yy2} + u_{yy0} - \frac{1}{8}u_{yy4} = \frac{3}{h^{2}}(u_{2} - 2u_{0} + u_{4}) - \frac{9}{8h}(u_{y2} - u_{y4}) - \frac{2h^{6}}{8!}u_{y^{(8)}} + O \bigl(h^{7} \bigr), \end{aligned}$$
(79)
$$\begin{aligned} &(u_{xy})_{0} + \frac{1}{16} \Biggl[\sum _{i = 1}^{4} (u_{xy})_{i} \Biggr] - \frac{1}{32} \Biggl[\sum_{i = 5}^{8} (u_{xy})_{i} \Biggr] \\ &\quad = \frac{9}{16h} \bigl[(u_{x})_{2} - (u_{x})_{4} \bigr] + \frac{9}{16h} \bigl[(u_{y})_{1} - (u_{y})_{3} \bigr] \\ &\qquad- \frac{9}{32h^{2}}(u_{5} - u_{6} + u_{7} - u_{8}) + \frac{h^{6}}{960}[u_{x^{(5)}y^{(3)}} + u_{x^{(3)}y^{(5)}}] + O \bigl(h^{7} \bigr). \end{aligned}$$
(80)

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

MSC

  • 65N06
  • 65N15
  • 65N22

Keywords

  • BCD scheme
  • Two-dimensional linear partial differential equation
  • Mixed derivative
  • Finite-difference method
  • Higher-order accuracy