1 Introduction

Consider the high-dimensional advection equations as follows

(1)

with the initial conditions

$$\begin{aligned}&u(X,0) = \varphi (X),X \in D \end{aligned}$$
(2)

and the following periodic boundary condition

$$\begin{aligned}&u(X,t) = u(X + L,t) \in \partial D \times (0,T] \end{aligned}$$
(3)

For the two-dimensional (2D) advection equation, \(X = (x,y)\) are spatial variables, are the advection coefficients, \(u=u(x,y,t)\) is the unknown function, D is a 2D spatial domain. And for the three-dimensional (3D) advection equation, \(X = (x,y,z)\), , D is a 3D spatial domain.

Advection equation is one of the very important hyperbolic partial differential equations (PDEs), which is widely used in many fields, such as biomathematics, energy development, and aerodynamics, etc. However, because practical problems are usually very complicated, it is often difficult to obtain the exact solutions of them, therefore, it is very necessary and valuable to solve them with numerical methods.

In the past few decades, many scholars have devoted to the development of accurate and stable numerical methods for solving advection equations. Vabishchevich (2019), Vabishchevich (2018) established an unconditionally stable implicit three-level scheme with the second-order accuracy and proposed several two-level schemes for solving the advection equations. Wei and Zhang (2010) proposed a two-parameter display difference scheme for the advection equation and discussed the stability and the calculation accuracy by using Miller theorem, the scheme is stable when the two parameters are non-negative. Erdogan (2014) used exponential fitting method to present a difference scheme. Bourchtein and Bourchtein (2012) constructed a three-level, five-point central leapfrog scheme for the advection equation, but this scheme is conditionally stable. Kim (2003) proposed an upwind leapfrog approach for solving the advection equations, which is non-dissipative and very accurate, and then was extended to higher-order and multiple dimensions. Abarbanel and Chertock (2000) developed a class of finite difference schemes for the hyperbolic initial boundary value problems in one and two space dimensions. They possess the property of strict stability. Sheu and Lee (2003) presented a class of Taylor–Galerkin (TG) finite-element models for solving the first-order hyperbolic equation which admits discontinuities, in which, five parameters were introduced for purposes of controlling stability, monotonicity and accuracy. Sarra (2008) explored the accuracy and eigenvalue stability of symmetric, asymmetric radial basis functions (RBF) collocation methods for solving some model hyperbolic initial boundary value problems in one and two dimensions. Hou and Ge (2019) constructed an unconditionally stable high-order compact difference scheme with the truncation error is \(O({\tau ^4} + {\tau ^2}{h^2} + {h^4})\) to solve the one-dimensional advection equation. Fan (2015) proposed a box scheme of the variable coefficient advection equation and the energy analysis method was used to verify the unconditional stability of the scheme. Montmollin (2000) employed the space-time integrated least squares (STILS) method to solve the pure advection equation and proposed a time-marching method.

For high-dimensional differential equations, using fully implicit difference methods to get a solution, usually, a large linear system at each time step has to be resolved, which would be too expensive to be used in practice. To overcome this difficulty, operator splitting methods were proposed, such as the alternating direction implicit (ADI) (Peaceman and Rechford 1955; Douglas and Kimy 2011) and the local one-dimensional (LOD) (Samarskii 1964) methods. These methods can transfer the high-dimensional problems to some low-dimensional problems, which makes the algorithm much simpler and reduces the amount of calculation. Among splitting methods, various LOD schemes have been developed. For instance, Wang (2011) used the LOD method to obtain a scheme for the 2D non-homogeneous parabolic equations with the second-order accuracy in time direction and the fourth-order accuracy in space direction and temporal accuracy was improved to the fourth-order by using the Richardson extrapolation technique. Wang and Wang (2014) used the Richardson extrapolation algorithms and LOD method to propose two schemes for solving the 2D non-homogeneous diffusion reaction equations. Based on the LOD strategy, Chen and Ge (2018) proposed two kinds high-order finite difference schemes for solving the 2D linear parabolic equation, whose truncation errors are \( O({\tau ^4} + {h^4})\) and \( O({\tau ^6} + {h^6})\), respectively. Xu (2016) constructed two improved LOD schemes for the nonlinear parabolic equations, and gave out the error and stability analysis. Karaa (2005) constructed a high-order LOD difference scheme for solving the 2D parabolic equations with Dirichlet boundary conditions. Zhao et al. (2017) developed two sets of high-order LOD difference schemes to solve the 2D and 3D heat problems with Neumann boundary conditions. On the other hand, ADI method is another commonly used operator splitting method, which has been developed extensively by many authors to solve the parabolic and hyperbolic equations. For more details, readers are referred to Tian (2011), Ge et al. (2018), Sun and Sun (2020), Karaa and Zhang (2004), Karaa (2006), You (2006), Liao and Sun (2013), Dai and Nassar (1998) and the references therein.

In this paper, based on the LOD method, a class of high-order compact difference schemes are introduced for solving the high-dimensional advection equations. In Sect. 2, we propose a high-order compact LOD difference scheme for solving the 2D advection equation, the consistency, stability and convergence are proved. In Sect. 3, we extend the present method to the 3D case. In Sect. 4, numerical experiments are given to demonstrate the accuracy and reliability of the present method. In Sect. 5, some conclusions are given.

2 2D advection equation

Now we consider the 2D advection equation as following

$$\begin{aligned} \frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} + b\frac{{\partial u}}{{\partial y}} = 0, (x,y,t) \in {D_2} \times (0,T] \end{aligned}$$
(4)

with initial condition

$$\begin{aligned} u(x,y,0) = {\varphi _2}(x,y), (x,y) \in {D_2} \end{aligned}$$
(5)

and periodic boundary condition

$$\begin{aligned} u(c,y,t) = u(d,y,t),u(x,c,t) = u(x,d,t), (x,y,t) \in \partial {D_2} \times (0,T] \end{aligned}$$
(6)

where u(xyt) is the unknown function and is assumed to have sufficient smoothness, a and b are the advection coefficients in x and y directions, respectively, \({\varphi _2}(x,y)\) is a smooth known function, \({D_2} = \{ \left. {x,y} \right| c \le x,y \le d\}\), \(\partial {D_2}\) is the boundary of \(D_2\).

2.1 High-order compact LOD scheme

We divide the domain \({D_2} \times (0,T]\) into an \({N^2} \times M\) mesh, with \( h = \frac{{d - c}}{N}\) and \(\tau = \frac{T}{M}\), respectively. \({x_i} = c + ih, {y_j} = c + jh\), for \(i,j = 0,1, \ldots N\) are the ith and jth mesh node. In temporal dimension, the uniform step size \(\tau \) is used, and \({t_n} = n\tau \) is the nth time level. The quantity \(u({x_i},{y_j},{t_n})\) represents the exact solution, while \(u_{i,j}^n\) denotes its approximate solution.

Applying the LOD strategy, we split Eq. (4) into the following one-dimensional equations ideally:

$$\begin{aligned}&\frac{1}{2}\frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} = 0 \end{aligned}$$
(7)
$$\begin{aligned}&\frac{1}{2}\frac{{\partial u}}{{\partial t}} + b\frac{{\partial u}}{{\partial y}} = 0 \end{aligned}$$
(8)

To advance the solution from \({t^n}\) to \({t^{n + 1}}\), we assume that Eq. (7) holds from \({t^n}\) to \({t^{n + \frac{1}{2}}}\) , and Eq. (8) holds from \({t^{n + \frac{1}{2}}}\) to \({t^{n + 1}}\).

Firstly, the points \(u_{i,j}^{n + \frac{1}{2}}\) and \(u_{i,j}^n\) are expanded with Taylor series at the grid point \(({x_i},{y_j},{t_{n + \frac{1}{4}}})\) as follows:

$$\begin{aligned}&u_{i,j}^{n + \frac{1}{2}} = u_{i,j}^{n + \frac{1}{4}} + \frac{\tau }{4}\bigg (\frac{{\partial u}}{{\partial t}}\bigg )_{i,j}^{n + \frac{1}{4}} + \frac{{{{\bigg (\frac{\tau }{4}\bigg )}^2}}}{{2!}}\bigg (\frac{{{\partial ^2}u}}{{\partial {t^2}}}\bigg )_{i,j}^{n + \frac{1}{4}} + \frac{{{{\bigg (\frac{\tau }{4}\bigg )}^3}}}{{3!}}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^3}}}\bigg )_{i,j}^{n + \frac{1}{4}} + O({\tau ^4}) \end{aligned}$$
(9)
$$\begin{aligned}&u_{i,j}^n = u_{i,j}^{n + \frac{1}{4}} - \frac{\tau }{4}\bigg (\frac{{\partial u}}{{\partial t}}\bigg )_{i,j}^{n + \frac{1}{4}} + \frac{{{{\bigg (\frac{\tau }{4}\bigg )}^2}}}{{2!}}\bigg (\frac{{{\partial ^2}u}}{{\partial {t^2}}}\bigg )_{i,j}^{n + \frac{1}{4}} - \frac{{{{\bigg (\frac{\tau }{4}\bigg )}^3}}}{{3!}}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^3}}}\bigg )_{i,j}^{n + \frac{1}{4}} + O({\tau ^4}) \end{aligned}$$
(10)

Combining Eqs. (9) and (10), we can get

$$\begin{aligned} \bigg (\frac{{\partial u}}{{\partial t}}\bigg )_{i,j}^{n + \frac{1}{4}} = 2\frac{{u_{i,j}^{n + \frac{1}{2}} - u_{i,j}^n}}{\tau } - \frac{{{\tau ^2}}}{{96}}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^3}}}\bigg )_{i,j}^{n + \frac{1}{4}} + O({\tau ^4}) \end{aligned}$$
(11)

Similarly, we can obtain

$$\begin{aligned} \bigg (\frac{{\partial u}}{{\partial x}}\bigg )_{i,j}^{n + \frac{1}{4}} = \frac{{u_{i + 1,j}^{n + \frac{1}{4}} - u_{i - 1,j}^{n + \frac{1}{4}}}}{{2h}} - \frac{{{h^2}}}{6}\bigg (\frac{{{\partial ^3}u}}{{\partial {x^3}}}\bigg )_{i,j}^{n + \frac{1}{4}} + O({h^4}) \end{aligned}$$
(12)

Substituting Eqs. (11) and (12) into Eq. (7), we can obtain

$$\begin{aligned} \frac{1}{2}{\delta _t}u_{i,j}^{n+\frac{1}{4}} - \frac{{{\tau ^2}}}{{192}}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^3}}}\bigg )_{i,j}^{n + \frac{1}{4}} + a{\delta _x}u_{i,j}^{n\mathrm{{ + }}\frac{1}{4}} - \frac{{a{h^2}}}{6}\bigg (\frac{{{\partial ^3}u}}{{\partial {x^3}}}\bigg )_{i,j}^{n + \frac{1}{4}} =0+ O({\tau ^4} + {h^4}) \end{aligned}$$
(13)

In which, \({\delta _t}u_{i,j}^{n + \frac{1}{4}} = \frac{{u_{i,j}^{n + \frac{1}{2}} - u_{i,j}^n}}{{\tau /2}}\), \({\delta _x}u_{i,j}^{n + \frac{1}{4}} = \frac{{u_{i + 1,j}^{n + \frac{1}{4}} - u_{i - 1,j}^{n + \frac{1}{4}}}}{{2h}}\). In order to achieve the fourth-order accuracy in both time and space directions, the third derivatives of t and x in Eq. (13) must be discretized with the second-order. And at the same time, in order to ensure the compactness of the scheme, we make the following deformations of Eq. (7):

$$\begin{aligned} \frac{{\partial u}}{{\partial t}} = - 2a\frac{{\partial u}}{{\partial x}}, ~\frac{{{\partial ^2}u}}{{\partial {t^2}}} = 4{a^2}\frac{{{\partial ^2}u}}{{\partial {x^2}}},~\frac{{{\partial ^3}u}}{{\partial {t^3}}} = 4{a^2}\frac{{{\partial ^3}u}}{{\partial {x^2}\partial t}},~\frac{{{\partial ^3}u}}{{\partial {x^3}}} = - \frac{1}{{2a}}\frac{{{\partial ^3}u}}{{\partial {x^2}\partial t}} \end{aligned}$$
(14)

Substituting the expressions of \(\frac{{{\partial ^3}u}}{{\partial {t^3}}}\) and \(\frac{{{\partial ^3}u}}{{\partial {x^3}}}\) above into Eq. (13), we have

$$\begin{aligned} \frac{1}{2}{\delta _t}u_{i,j}^{n + \frac{1}{4}} + a{\delta _x}u_{i,j}^{n + \frac{1}{4}} + \frac{1}{{12}}\bigg ({h^2} - \frac{{{a^2}{\tau ^2}}}{4}\bigg )\bigg (\frac{{{\partial ^3}u}}{{\partial {x^2}\partial t}}\bigg )_{i,j}^{n + \frac{1}{4}} =0+ O({\tau ^4} + {h^4}) \end{aligned}$$
(15)

For Eq. (15), if using the arithmetic average in \({\delta _x}u_{i,j}^{n + \frac{1}{4}}\), namely, \({\delta _x}u_{i,j}^{n + \frac{1}{4}} = {\delta _x}\frac{{u_{i,j}^{n + \frac{1}{2}} + u_{i,j}^n}}{2}\), it will degenerate accuracy of the scheme to be the second-order in time direction. In order to improve the temporal accuracy to be the fourth-order, we use Eqs. (9) and (10) to get

$$\begin{aligned} u_{i,j}^{n + \frac{1}{4}} = \frac{1}{2}\bigg (u_{i,j}^{n + \frac{1}{2}} + u_{i,j}^n\bigg ) - \frac{{{\tau ^2}}}{{32}}\bigg (\frac{{{\partial ^2}u}}{{\partial {t^2}}}\bigg )_{i,j}^{n + \frac{1}{4}} + O({\tau ^4}) \end{aligned}$$
(16)

Then, we can get

$$\begin{aligned} {\delta _x}u_{i,j}^{n + \frac{1}{4}} = \frac{1}{2}{\delta _x}\bigg (u_{i,j}^{n + \frac{1}{2}} + u_{i,j}^n\bigg ) - \frac{{{\tau ^2}}}{{32}}{\delta _x}\bigg (\frac{{{\partial ^2}u}}{{\partial {t^2}}}\bigg )_{i,j}^{n + \frac{1}{4}} + O({\tau ^4}) \end{aligned}$$
(17)

Substituting Eq. (17) into Eq. (15), we have

$$\begin{aligned}&\frac{1}{2}{\delta _t}u_{i,j}^{n + \frac{1}{4}} + \frac{a}{2}{\delta _x}\bigg (u_{i,j}^{n + \frac{1}{2}} + u_{i,j}^n\bigg ) - \frac{{a{\tau ^2}}}{{32}}{\delta _x}\bigg (\frac{{{\partial ^2}u}}{{\partial {t^2}}}\bigg )_{i,j}^{n + \frac{1}{4}} + \frac{1}{{12}}\bigg ({h^2} - \frac{{{a^2}{\tau ^2}}}{4}\bigg )\bigg (\frac{{{\partial ^3}u}}{{\partial {x^2}\partial t}}\bigg )_{i,j}^{n + \frac{1}{4}}\nonumber \\&\quad =0+ O({\tau ^4} + {h^4}) \end{aligned}$$
(18)

Noticing that \( {\delta _x}( \frac{{{\partial ^2}u}}{{\partial {t^2}}})_{i,j}^{n + \frac{1}{4}} = (\frac{{{\partial ^3}u}}{{\partial x\partial {t^2}}})_{i,j}^{n + \frac{1}{4}} + O({h^2})\) , we can obtain

$$\begin{aligned}&\frac{1}{2}{\delta _t}u_{i,j}^{n + \frac{1}{4}} + \frac{a}{2}{\delta _x}\bigg (u_{i,j}^{n + \frac{1}{2}} + u_{i,j}^n\bigg ) - \frac{{a{\tau ^2}}}{{32}}\bigg (\frac{{{\partial ^3}u}}{{\partial x\partial {t^2}}}\bigg )_{i,j}^{n + \frac{1}{4}} + \frac{1}{{12}}\bigg ({h^2} - \frac{{{a^2}{\tau ^2}}}{4}\bigg )\bigg (\frac{{{\partial ^3}u}}{{\partial {x^2}\partial t}}\bigg )_{i,j}^{n + \frac{1}{4}}\nonumber \\&\quad = 0 + O({\tau ^4} + {\tau ^2}{h^2} + {h^4}) \end{aligned}$$
(19)

Then, because of \(\frac{{{\partial ^3}u}}{{\partial x\partial {t^2}}}_{i,j}^{n + \frac{1}{4}} = - 2a(\frac{{{\partial ^3}u}}{{\partial {x^2}\partial t}})_{i,j}^{n + \frac{1}{4}}\) , we have

$$\begin{aligned} \frac{1}{2}{\delta _t}u_{i,j}^{n + \frac{1}{4}} + \frac{a}{2}{\delta _x}\bigg (u_{i,j}^{n + \frac{1}{2}} + u_{i,j}^n\bigg ) + \frac{1}{{12}}\bigg ({h^2} + \frac{{{a^2}{\tau ^2}}}{2}\bigg )\bigg (\frac{{{\partial ^3}u}}{{\partial {x^2}\partial t}}\bigg )_{i,j}^{n + \frac{1}{4}} =0+ O({\tau ^4} + {\tau ^2}{h^2} + {h^4}) \end{aligned}$$
(20)

Using the definitions of \({\delta _t}\) and \({\delta _x}\) , and the Crank–Nicolson method for time derivative in the mixed derivative term \(\frac{{{\partial ^3}u}}{{\partial {x^2}\partial t}}\), we get

$$\begin{aligned}&\frac{{u_{i,j}^{n + \frac{1}{2}} - u_{i,j}^n}}{\tau } + \frac{a}{{4h}}\bigg (u_{i + 1,j}^{n + \frac{1}{2}} - u_{i - 1,j}^{n + \frac{1}{2}} + u_{i + 1,j}^n - u_{i - 1,j}^n\bigg ) \nonumber \\&\quad + \frac{1}{{6\tau }}\bigg ({h^2} + \frac{{{a^2}{\tau ^2}}}{2}\bigg )\bigg (\frac{{u_{i + 1j}^{n + \frac{1}{2}} - 2u_{i,j}^{n + \frac{1}{2}} + u_{i - 1,j}^{n + \frac{1}{2}}}}{{{h^2}}}\nonumber \\&\quad - \frac{{u_{i + 1j}^n - 2u_{i,j}^n + u_{i - 1,j}^n}}{{{h^2}}}\bigg ) = 0+ O({\tau ^4} + {\tau ^2}{h^2} + {h^4}) \end{aligned}$$
(21)

Discarding \(O({\tau ^4} + {\tau ^2}{h^2} + {h^4})\) and multiplying Eq. (21) by \(\tau \) , we can get the high-order compact scheme in x direction,

$$\begin{aligned}&\bigg (\frac{1}{6} + \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i + 1,j}^{n + \frac{1}{2}} + \bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg )u_{i,j}^{n + \frac{1}{2}} + \bigg (\frac{1}{6} - \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i - 1,j}^{n + \frac{1}{2}}\nonumber \\&\quad = \bigg (\frac{1}{6} - \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i + 1,j}^n + \bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg )u_{i,j}^n + \bigg (\frac{1}{6} + \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i - 1,j}^n \end{aligned}$$
(22)

In which, \(\lambda = \frac{\tau }{h}\). Similarly, we can obtain the high-order compact scheme for Eq. (8) in y direction

$$\begin{aligned}&\bigg (\frac{1}{6} + \frac{{b\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j + 1}^{n + 1} + \bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg )u_{i,j}^{n + 1} + \bigg (\frac{1}{6} - \frac{{b\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j - 1}^{n + 1}\nonumber \\&\quad = \bigg (\frac{1}{6} - \frac{{\mathrm{{b}}\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j+1}^{n + \frac{1}{2}} + \bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg )u_{i,j}^{n + \frac{1}{2}} + \bigg (\frac{1}{6} + \frac{{b\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j - 1}^{n + \frac{1}{2}} \end{aligned}$$
(23)

So the high-order compact LOD scheme for the 2D advection equation (4) is written as follows

$$\begin{aligned} \left\{ {\begin{array}{*{20}{c}} \bigg (\frac{1}{6} + \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i + 1,j}^{n + \frac{1}{2}} + \bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg )u_{i,j}^{n + \frac{1}{2}} + \bigg (\frac{1}{6} - \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i - 1,j}^{n + \frac{1}{2}}\\ = \bigg (\frac{1}{6} - \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i + 1,j}^n + \bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg )u_{i,j}^n + \bigg (\frac{1}{6} + \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i - 1,j}^n&{}\\ \bigg (\frac{1}{6} + \frac{{b\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j + 1}^{n + 1} + \bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg )u_{i,j}^{n + 1} + \bigg (\frac{1}{6} - \frac{{b\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j - 1}^{n + 1}\\ = \bigg (\frac{1}{6} - \frac{{\mathrm{{b}}\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j+1}^{n + \frac{1}{2}} + \bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg )u_{i,j}^{n + \frac{1}{2}} + \bigg (\frac{1}{6} + \frac{{b\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j - 1}^{n + \frac{1}{2}} \end{array}} \right. \end{aligned}$$
(24)

Remark 1

The scheme (24) is the fourth-order accuracy in both time and space and is a two-step scheme. Only the value of the initial time step requires to be known, so it does not need to construct the scheme for the computation of start-up time step, like the three-level schemes in Vabishchevich (2018, 2019) and Bourchtein and Bourchtein (2012).

Remark 2

The scheme (24) has only three unknown points and the coefficient matrices of the scheme are tridiagonal, so we can solve the scheme (24) by using the efficient tridiagonal matrix algorithm (TDMA). However, this method requires that the main diagonal elements of the coefficient matrices can not be zero, so we let \(a\lambda ,b\lambda \ne 2\).

2.2 Theory analysis

Theorem 2.1

High-order compact LOD scheme (24) is the fourth-order consistent.

Proof

For the first equation in the scheme (24), using the Taylor series expansions of \(u_{i,j}^{n + \frac{1}{2}}\),\(u_{i + 1,j}^{n + \frac{1}{2}}\),\(u_{i - 1,j}^{n + \frac{1}{2}}\) and \(u_{i - 1,j}^n\) at point \(({x_i},{y_j},{t_n})\), we get

$$\begin{aligned}&u_{i,j}^{n + \frac{1}{2}} = u_{i,j}^n + \frac{\tau }{2}\bigg (\frac{{\partial u}}{{\partial t}}\bigg )_{i,j}^n + \frac{{{\tau ^2}}}{8}\bigg (\frac{{{\partial ^2}u}}{{\partial {t^2}}}\bigg )_{i,j}^n + \frac{{{\tau ^3}}}{{48}}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^3}}}\bigg )_{i,j}^n + \frac{{{\tau ^4}}}{{384}}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^4}}}\bigg )_{i,j}^n + O({\tau ^5}) \end{aligned}$$
(25)
$$\begin{aligned} u_{i + 1,j}^{n + \frac{1}{2}}&= u_{i,j}^n + \frac{\tau }{2}\bigg (\frac{{\partial u}}{{\partial t}}\bigg )_{i,j}^n + h\bigg (\frac{{\partial u}}{{\partial x}}\bigg )_{i,j}^n + \frac{1}{{2!}}\bigg [{\bigg (\frac{\tau }{2}\bigg )^2}\bigg (\frac{{{\partial ^2}u}}{{\partial {t^2}}}\bigg )_{i,j}^n + {h^2}\bigg (\frac{{{\partial ^2}u}}{{\partial {x^2}}}\bigg )_{i,j}^n + \tau h\bigg (\frac{{{\partial ^2}u}}{{\partial t\partial x}}\bigg )_{i,j}^n\bigg ] \nonumber \\&\quad + \frac{1}{{3!}}\bigg [\frac{{{\tau ^3}}}{8}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^3}}}\bigg )_{i,j}^n+ {h^3}\bigg (\frac{{{\partial ^3}u}}{{\partial {x^3}}}\bigg )_{i,j}^n + \frac{{3{\tau ^2}h}}{4}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^2}\partial x}}\bigg )_{i,j}^n + \frac{{3\tau {h^2}}}{2}\bigg (\frac{{{\partial ^3}u}}{{\partial {x^2}\partial t}}\bigg )_{i,j}^n\bigg ]\nonumber \\&\quad + \frac{1}{{4!}}\bigg [\frac{{{\tau ^4}}}{{16}}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^4}}}\bigg )_{i,j}^n + {h^4}\bigg (\frac{{{\partial ^4}u}}{{\partial {x^4}}}\bigg )_{i,j}^n + \frac{{{\tau ^3}h}}{2}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^3}\partial x}}\bigg )_{i,j}^n+ \frac{{3{\tau ^2}{h^2}}}{2}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^2}\partial {x^2}}}\bigg )_{i,j}^n\nonumber \\&\quad + 2{h^3}\tau \bigg (\frac{{{\partial ^4}u}}{{\partial {x^3}\partial t}}\bigg )_{i,j}^n\bigg ] + O\bigg ({\tau ^5} + {\tau ^2}{h^3} + {h^2}{\tau ^3} + {h^4} + h{\tau ^4} + {h^5}\bigg ) \end{aligned}$$
(26)
$$\begin{aligned} u_{i - 1,j}^{n + \frac{1}{2}}&= u_{i,j}^n + \frac{\tau }{2}\bigg (\frac{{\partial u}}{{\partial t}}\bigg )_{i,j}^n - h(\frac{{\partial u}}{{\partial x}})_{i,j}^n + \frac{1}{{2!}}\bigg [\frac{{{\tau ^2}}}{4}\bigg (\frac{{{\partial ^2}u}}{{\partial {t^2}}}\bigg )_{i,j}^n + {h^2}\bigg (\frac{{{\partial ^2}u}}{{\partial {x^2}}}\bigg )_{i,j}^n - \tau h\bigg (\frac{{{\partial ^2}u}}{{\partial t\partial x}}\bigg )_{i,j}^n\bigg ]\nonumber \\&\quad + \frac{1}{{3!}}\bigg [\frac{{{\tau ^3}}}{8}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^3}}}\bigg )_{i,j}^n - {h^3}\bigg (\frac{{{\partial ^3}u}}{{\partial {x^3}}}\bigg )_{i,j}^n - \frac{{3{\tau ^2}h}}{4}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^2}\partial x}}\bigg )_{i,j}^n + \frac{{3\tau {h^2}}}{2}v(\frac{{{\partial ^3}u}}{{\partial {x^2}\partial t}}\bigg )_{i,j}^n\bigg ] \nonumber \\&\quad + \frac{1}{{4!}}\bigg [\frac{{{\tau ^4}}}{{16}}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^4}}}\bigg )_{i,j}^n + {h^4}\bigg (\frac{{{\partial ^4}u}}{{\partial {x^4}}}\bigg )_{i,j}^n - \frac{{{\tau ^3}h}}{2}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^3}\partial x}}\bigg )_{i,j}^n+ \frac{{3{\tau ^2}{h^2}}}{2}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^2}\partial {x^2}}}\bigg )_{i,j}^n\nonumber \\&\quad - 2\tau {h^3}\bigg (\frac{{{\partial ^4}u}}{{\partial {x^3}\partial t}}\bigg )_{i,j}^n\bigg ] + O\bigg ({\tau ^5} + {\tau ^2}{h^3} + {h^2}{\tau ^3} + {h^4} + h{\tau ^4} + {h^5}\bigg ) \end{aligned}$$
(27)
$$\begin{aligned} u_{i + 1,j}^n&= u_{i,j}^n + h\bigg (\frac{{\partial u}}{{\partial x}}\bigg )_{i,j}^n + \frac{{{h^2}}}{2}\bigg (\frac{{{\partial ^2}u}}{{\partial {x^2}}}\bigg )_{i,j}^n + \frac{{{h^3}}}{6}\bigg (\frac{{{\partial ^3}u}}{{\partial {x^3}}}\bigg )_{i,j}^n + \frac{{{h^4}}}{{24}}\bigg (\frac{{{\partial ^4}u}}{{\partial {x^4}}}\bigg )_{i,j}^n + O({h^5}) \end{aligned}$$
(28)
$$\begin{aligned} u_{i - 1,j}^n&= u_{i,j}^n - h\bigg (\frac{{\partial u}}{{\partial x}}\bigg )_{i,j}^n + \frac{{{h^2}}}{2}\bigg (\frac{{{\partial ^2}u}}{{\partial {x^2}}}\bigg )_{i,j}^n - \frac{{{h^3}}}{6}\bigg (\frac{{{\partial ^3}u}}{{\partial {x^3}}}\bigg )_{i,j}^n + \frac{{{h^4}}}{{24}}\bigg (\frac{{{\partial ^4}u}}{{\partial {x^4}}}\bigg )_{i,j}^n + O({h^5}) \end{aligned}$$
(29)

Substituting Eqs. (25)–(28) into Eq.(24), we can obtain

$$\begin{aligned}&\frac{1}{2}\bigg (\frac{{\partial u}}{{\partial t}}\bigg )_{i,j}^n + a\bigg (\frac{{\partial u}}{{\partial x}}\bigg )_{i,j}^n + \frac{\tau }{8}\bigg (\frac{{{\partial ^2}u}}{{\partial {t^2}}}\bigg )_{i,j}^n + \frac{{{\tau ^2}}}{{48}}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^3}}}\bigg )_{i,j}^n + \frac{{{\tau ^3}}}{{384}}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^4}}}\bigg )_{i,j}^n + \frac{{a\tau }}{4}\bigg (\frac{{{\partial ^2}u}}{{\partial t\partial x}}\bigg )_{i,j}^n + \frac{{a{h^2}}}{6}\bigg (\frac{{{\partial ^3}u}}{{\partial {x^3}}}\bigg )_{i,j}^n\nonumber \\&\quad + \frac{{a{\tau ^2}}}{{16}}\bigg (\frac{{{\partial ^3}u}}{{\partial {t^2}\partial x}}\bigg )_{i,j}^n + \frac{{a{\tau ^3}}}{{96}}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^3}\partial x}}\bigg )_{i,j}^n + \frac{{a\tau {h^2}}}{{24}}\bigg (\frac{{{\partial ^4}u}}{{\partial t\partial {x^3}}}\bigg )_{i,j}^n + \frac{{{h^2}}}{{12}}\bigg (\frac{{{\partial ^3}u}}{{\partial t\partial {x^2}}}\bigg )_{i,j}^n + \frac{{\tau {h^2}}}{{48}}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^2}\partial {x^2}}}\bigg )_{i,j}^n\nonumber \\&\quad + \frac{{{a^2}{\tau ^2}}}{{24}}\bigg (\frac{{{\partial ^3}u}}{{\partial t\partial {x^2}}}\bigg )_{i,j}^n + \frac{{{a^2}{\tau ^3}}}{{96}}\bigg (\frac{{{\partial ^4}u}}{{\partial {t^2}\partial {x^2}}}\bigg )_{i,j}^n = O\bigg ({\tau ^4} + \frac{{{\tau ^5}}}{h} + {\tau ^2}{h^2} + {\tau ^3}h + \tau {h^3} + \frac{{{h^5}}}{\tau } + \frac{{{\tau ^6}}}{{{h^2}}} + {h^4}\bigg )\nonumber \\ \end{aligned}$$
(30)

Making use of the relationships in Eqs. (14), (30) is equivalent to

$$\begin{aligned} \frac{1}{2}\bigg (\frac{{\partial u}}{{\partial t}}\bigg )_{i,j}^n + a\bigg (\frac{{\partial u}}{{\partial x}}\bigg )_{i,j}^n = O\bigg ({\tau ^4} + \frac{{{\tau ^5}}}{h} + {\tau ^2}{h^2} + {\tau ^3}h + \tau {h^3} + \frac{{{h^5}}}{\tau } + \frac{{{\tau ^6}}}{{{h^2}}} + {h^4}\bigg ) \end{aligned}$$
(31)

Similarly, we can get

$$\begin{aligned} \frac{1}{2}\bigg (\frac{{\partial u}}{{\partial t}}\bigg )_{i,j}^n + b\bigg (\frac{{\partial u}}{{\partial y}}\bigg )_{i,j}^n = O\bigg ({\tau ^4} + \frac{{{\tau ^5}}}{h} + {\tau ^2}{h^2} + {\tau ^3}h + \tau {h^3} + \frac{{{h^5}}}{\tau } + \frac{{{\tau ^6}}}{{{h^2}}} + {h^4}\bigg ) \end{aligned}$$
(32)

Combining Eqs. (31) and (32), we can get

$$\begin{aligned} \bigg (\frac{{\partial u}}{{\partial t}}\bigg )_{i,j}^n + a\bigg (\frac{{\partial u}}{{\partial x}}\bigg )_{i,j}^n + b\bigg (\frac{{\partial u}}{{\partial y}}\bigg )_{i,j}^n = O\bigg ({\tau ^4} + \frac{{{\tau ^5}}}{h} + {\tau ^2}{h^2} + {\tau ^3}h + \tau {h^3} + \frac{{{h^5}}}{\tau } + \frac{{{\tau ^6}}}{{{h^2}}} + {h^4}\bigg ) \end{aligned}$$
(33)

Thus, the scheme (24) is the fourth-order consistent to the original differential equation (4). In other words, the scheme is the fourth-order accurate in both time and space. Therefore, Theorem 1 is proved. \(\square \)

Theorem 2.2

High-order compact LOD scheme (24) is unconditionally stable.

Proof

In the following, we use the von Neumann method to analyze the stability of the scheme (24).

Let \(u_{i,j}^n = {\eta ^n}{e^{I{\sigma _1}{x_i}}}{e^{I{\sigma _2}{y_j}}}\),\(u_{i,j}^{n + \frac{1}{2}} = {\eta ^{n + \frac{1}{2}}}{e^{I{\sigma _1}{x_i}}}{e^{I{\sigma _2}{y_j}}}\), where \(I = \sqrt{ - 1}\) is imaginary unit, \(\eta \) is the amplitude. \({\sigma _1}\) and \({\sigma _2}\) are the wave numbers in x and y directions, respectively.

For x direction, substituting \(u_{i,j}^n = {\eta ^n}{e^{I{\sigma _1}{x_i}}}{e^{I{\sigma _2}{y_j}}}\) ,\(u_{i,j}^{n + \frac{1}{2}} = {\eta ^{n + \frac{1}{2}}}{e^{I{\sigma _1}{x_i}}}{e^{I{\sigma _2}{y_j}}}\) into Eq. (24), and eliminating \({e^{I{\sigma _1}{x_i}}}{e^{I{\sigma _2}{y_j}}}\) on both sides of the equation, we have

$$\begin{aligned}&\bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg ){\eta ^{n + \frac{1}{2}}} + \bigg (\frac{1}{6} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg ){\eta ^{n + \frac{1}{2}}}\bigg ({e^{I{\sigma _1}h}} + {e^{ - I{\sigma _1}h}}\bigg ) + \frac{{a\lambda }}{4}{\eta ^{n + \frac{1}{2}}}\bigg ({e^{I{\sigma _1}h}} - {e^{ - I{\sigma _1}h}}\bigg )\nonumber \\&\quad = \bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg ){\eta ^n} + \bigg (\frac{1}{6} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg ){\eta ^n}\bigg ({e^{I{\sigma _1}h}} + {e^{ - I{\sigma _1}h}}\bigg ) - \frac{{a\lambda }}{4}{\eta ^{n + 1}}\bigg ({e^{I{\sigma _1}h}} - {e^{ - I{\sigma _1}h}}\bigg ) \end{aligned}$$
(34)

Using the Euler formulas, \({e^{I{\sigma _1}h}} = \cos {\sigma _1}h + I\sin {\sigma _1}h, {e^{ - I{\sigma _1}h}} = \cos {\sigma _1}h - I\sin {\sigma _1}h\), we get

$$\begin{aligned}&\bigg [\bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{a^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _1}h + \frac{{a\lambda I\sin {\sigma _1}h}}{2}\bigg ]{\eta ^{n + \frac{1}{2}}} \nonumber \\&\quad = \bigg [\bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{a^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _1}h - \frac{{a\lambda I\sin {\sigma _1}h}}{2}\bigg ]{\eta ^n} \end{aligned}$$
(35)

Similarly, we can draw

$$\begin{aligned}&\bigg [\bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{b^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _2}h + \frac{{a\lambda I\sin {\sigma _2}h}}{2}\bigg ]{\eta ^{n + 1}}\nonumber \\&\quad = \bigg [\bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{b^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _2}h - \frac{{b\lambda I\sin {\sigma _2}h}}{2}\bigg ]{\eta ^{n + \frac{1}{2}}} \end{aligned}$$
(36)

Substituting Eq. (35) into Eq. (36), we can obtain

$$\begin{aligned} {\begin{array}{l} \bigg [\bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{b^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _2}h + \frac{{a\lambda I\sin {\sigma _2}h}}{2}\bigg ]{\eta ^{n + 1}}\\ = \bigg \{ \bigg [\bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{b^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _2}h - \frac{{b\lambda I\sin {\sigma _2}h}}{2}\bigg ] \\ \times \frac{{\bigg [\bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{a^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _1}h - \frac{{a\lambda I\sin {\sigma _1}h}}{2}\bigg ]}}{{\bigg [\bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{a^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _1}h + \frac{{a\lambda I\sin {\sigma _1}h}}{2}\bigg ]}}\bigg \} {\eta ^n} \end{array}} \end{aligned}$$
(37)

Then, we can get the error amplification factor

$$\begin{aligned} \begin{array}{l} \left| G \right| = \left| {\frac{{{\eta ^{n + 1}}}}{{{\eta ^n}}}} \right| = \left| {\frac{{\bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{a^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _1}h - \frac{{a\lambda I\sin {\sigma _1}h}}{2}}}{{\bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{a^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _1}h + \frac{{a\lambda I\sin {\sigma _1}h}}{2}}}} \right. \\ \left. { \times \frac{{\bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{b^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _2}h - \frac{{b\lambda I\sin {\sigma _2}h}}{2}}}{{\bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg ) + \bigg (\frac{1}{3} + \frac{{{b^2}{\lambda ^2}}}{6}\bigg )\cos {\sigma _2}h + \frac{{b\lambda I\sin {\sigma _2}h}}{2}}}} \right| = 1 \end{array} \end{aligned}$$
(38)

According to the von Neumann stability theorem, when \(\left| G \right| \le 1\), the scheme is stable. We can draw the error amplification factor of the scheme is \(\left| {{G}} \right| = 1\), so the scheme is unconditionally stable. \(\square \)

Theorem 2.3

High-order compact LOD scheme (24) is unconditionally convergent.

Proof

From Theorem 2.1 and Theorem 2.2, we can get the scheme (24) is unconditionally convergent by the Lax equivalence theorem (Smith 1985). \(\square \)

3 Extension to the 3D case

Next, we consider the 3D advection equation as following:

$$\begin{aligned} \frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} + b\frac{{\partial u}}{{\partial y}} + c\frac{{\partial u}}{{\partial z}} = 0,(x,y,z,t) \in {D_3} \times (0,T] \end{aligned}$$
(39)

with initial condition

$$\begin{aligned} u(x,y,z,0) = {\varphi _3}(x,y,z),(x,y,z) \in {D_3} \end{aligned}$$
(40)

and periodic boundary condition

$$\begin{aligned} \begin{array}{l} u(d,y,z,t) = u(e,y,z,t),u(x,d,z,t) = u(x,e,z,t),u(x,y,d,t) = u(x,y,e,t)\\ (x,y,z,t) \in \partial {D_3} \times (0,T] \end{array} \end{aligned}$$
(41)

Where u(xyzt) is the unknown function, which is assumed to have sufficient smoothness. a, b and c are the advection coefficients in x, y and z directions, respectively. \({\varphi _3}(x,y,z)\) is a smooth known function, \({D_3} = \{ \left. {x,y,z} \right| d \le x,y,z \le e\}\), \(\partial {D_3}\) is the boundary of \(D_3\).

Applying the LOD strategy, we split Eq. (39) into the following one-dimensional equations ideally:

$$\begin{aligned}&\frac{1}{3}\bigg (\frac{{\partial u}}{{\partial t}}\bigg ) + a\bigg (\frac{{\partial u}}{{\partial x}}\bigg ) = 0 \end{aligned}$$
(42)
$$\begin{aligned}&\frac{1}{3}\bigg (\frac{{\partial u}}{{\partial t}}\bigg ) + b\bigg (\frac{{\partial u}}{{\partial y}}\bigg ) = 0 \end{aligned}$$
(43)
$$\begin{aligned}&\frac{1}{3}\bigg (\frac{{\partial u}}{{\partial t}}\bigg ) + c\bigg (\frac{{\partial u}}{{\partial z}}\bigg ) = 0 \end{aligned}$$
(44)

To advance the solution from \({t^n}\) to \({t^{n + 1}}\), we assume that Eq. (42) holds from \({t^n}\) to \({t^{n + \frac{1}{3}}}\), Eq. (43) holds from \({t^{n + \frac{1}{3}}}\) to \({t^{n + \frac{2}{3}}}\) and Eq. (44) holds from \({t^{n + \frac{2}{3}}}\) to \({t^{n + 1}}\).

Using the method similar to the 2D advection equation, a high-order compact LOD scheme for the 3D advection equation can be obtained as follows:

$$\begin{aligned} \left\{ {\begin{array}{*{20}{c}} \begin{array}{l} \bigg (\frac{1}{6} + \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i + 1,j,k}^{n + \frac{1}{3}} + \bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg )u_{i,j,k}^{n + \frac{1}{3}} + \bigg (\frac{1}{6} - \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i - 1,j,k}^{n + \frac{1}{3}}\\ = \bigg (\frac{1}{6} - \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i + 1,j,k}^n + \bigg (\frac{2}{3} - \frac{{{a^2}{\lambda ^2}}}{6}\bigg )u_{i,j,k}^n + \bigg (\frac{1}{6} + \frac{{a\lambda }}{4} + \frac{{{a^2}{\lambda ^2}}}{{12}}\bigg )u_{i - 1,j,k}^n \end{array}\\ \begin{array}{l} \bigg (\frac{1}{6} + \frac{{b\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}v)u_{i,j + 1,k}^{n + \frac{2}{3}} + \bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg )u_{i,j,k}^{n + \frac{2}{3}} + \bigg (\frac{1}{6} - \frac{{b\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j - 1,k}^{n + \frac{2}{3}}\\ = \bigg (\frac{1}{6} - \frac{{b\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j + 1,k}^{n + \frac{1}{3}} + \bigg (\frac{2}{3} - \frac{{{b^2}{\lambda ^2}}}{6}\bigg )u_{i,j,k}^{n + \frac{1}{3}} + \bigg (\frac{1}{6} + \frac{{b\lambda }}{4} + \frac{{{b^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j - 1,k}^{n + \frac{1}{3}} \end{array}\\ \begin{array}{l} \bigg (\frac{1}{6} + \frac{{c\lambda }}{4} + \frac{{{c^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j,k + 1}^{n + 1} + \bigg (\frac{2}{3} - \frac{{{c^2}{\lambda ^2}}}{6}\bigg )u_{i,j,k}^{n + 1} + \bigg (\frac{1}{6} - \frac{{c\lambda }}{4} + \frac{{{c^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j,k - 1}^{n + 1}\\ = \bigg (\frac{1}{6} - \frac{{c\lambda }}{4} + \frac{{{c^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j,k - 1}^{n + \frac{2}{3}} + \bigg (\frac{2}{3} - \frac{{{c^2}{\lambda ^2}}}{6}\bigg )u_{i,j,k}^{n + \frac{2}{3}} + \bigg (\frac{1}{6} + \frac{{c\lambda }}{4} + \frac{{{c^2}{\lambda ^2}}}{{12}}\bigg )u_{i,j,k - 1}^{n + \frac{2}{3}} \end{array} \end{array}} \right. \end{aligned}$$
(45)

Remark 3

The scheme (45) is the fourth-order accuracy in both time and space and is a two-step scheme. It involves three unknowns for each time step. We can solve three tridiagonal linear equations by the TDMA algorithm for each time step according to Eq. (45). Because it requires that the main diagonal elements of the coefficient matrices can not be zero, we set \(a\lambda ,b\lambda ,c\lambda \ne 2\).

Remark 4

In Sect. 2, we have proved the consistency, stability and convergence of the 2D high-order compact LOD scheme (24). Similarly, we can proved the scheme (45) is also the fourth-order consistent, unconditionally stable and convergent by using the same method.

4 Numerical experiments

In order to verify the accuracy and reliability of the present method in this article, we select the following five examples to conduct numerical experiments and compare them with the calculated results in the existing literature. All calculations in the article are programmed in Fortran 77 language. We conduct our computations with double precision arithmetic and perform them on a Intel IV/Dual-Core/2.6 GHz private computer with 8 GB memory. The convergence rate can be got by the following formula:

$$\begin{aligned} \mathrm{{Rate}} = \frac{{\log [{E_{{\infty }}}({h_1})/{E_{{\infty }}}({h_2})]}}{{\log ({h_1}/{h_2})}} \end{aligned}$$

In which, \({E_{{\infty }}} = \mathop {\max }\nolimits _{i,j} \left| {u_{i,j}^M - u({x_i},{y_j},{t_M})} \right| \) for 2D, and \({E_{{\infty }}} = \mathop {\max }\nolimits _{i,j,k} \left| {u_{i,j,k}^M - u({x_i},{y_j},{z_k},{t_M})} \right| \) for 3D.

5 Problem 1

We consider the 2D advection equation

$$\begin{aligned} \frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} + b\frac{{\partial u}}{{\partial y}} = 0, 0 \le x,y \le 2,t > 0 \end{aligned}$$

with the initial and periodic boundary conditions

$$\begin{aligned} \begin{array}{l} u(x,y,0) = {e^{\cos [\pi (\frac{x}{a} + \frac{y}{b})]}}\\ u(0,y,t) = u(2,y,t)\\ u(x,0,t) = u(x,2,t) \end{array} \end{aligned}$$

The exact solution is

$$\begin{aligned} u(x,y,t) = {e^{\cos [\pi (\frac{x}{a} + \frac{y}{b} - 2t)]}} \end{aligned}$$
Table 1 Maximum absolute error and convergence rate when \(t = 0.2,a=1,b=1\) for Problem 1
Fig. 1
figure 1

The exact solution (a), the absolute error from the LOD scheme (24) (b), the RHOC scheme (c), the Beam–Warming scheme (d) and comparison of the numerical solutions of the three schemes with the exact solution (e) on \(x=0.5\) when \(\tau =0.05\), \(t=1\), \(N=20\) for Problem 1

Table 1 gives the maximum absolute errors and the convergence rate of the Beam–Warming scheme (Beam and Warming 1976), the RHOC-ADI scheme (Tian 2011) and the LOD scheme (24) with \(\tau = 0.5h,t=0.2,a=b=1\) for Problem 1. Because the RHOC-ADI scheme is the second-order in time and the fourth-order in space, we also compute it with \(\tau ={h^2}\). The data in Table 1 show that the present LOD scheme (24) is the fourth-order in both space and time, which is consistent with our theoretical analysis. While the RHOC-ADI scheme achieves spatial fourth-order accuracy only if \(\tau =O({h^2})\). Otherwise, spatial accuracy is just the second-order if \(\tau =O({h})\). And the computed results(the maximum absolute errors) of the LOD scheme (24) is better (smaller errors) than that of the Beam–Warming scheme and the RHOC-ADI scheme. In Fig. 1(a) gives the exact solution, b–d give the absolute error of the LOD scheme (24), the RHOC-ADI scheme and the Beam–Warming scheme when \(N = 20,t = 1,\tau = 0.05\) for Problem 1. We can see that the absolute error of the LOD scheme (24) is smaller than that of the RHOC-ADI scheme and the Beam–Warming scheme. Figure 1(e) gives comparison of the numerical solutions of the three schemes with the exact solution when \(x=0.5,N = 20,t = 1,\tau = 0.05\) for Problem 1. It shows that the LOD scheme (24) is the closest to the exact solution.

6 Problem 2

We consider the 2D advection equation

$$\begin{aligned} \frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} +b \frac{{\partial u}}{{\partial y}} = 0, 0 \le x,y \le 2,t > 0 \end{aligned}$$

with the initial and periodic boundary conditions

$$\begin{aligned} \begin{array}{l} u(x,y,0) = \sin \bigg [\pi \bigg (\frac{x}{a} + \frac{y}{b}\bigg )\bigg ]\\ u(0,y,t) = u(2,y,t)\\ u(x,0,t) = u(x,2,t) \end{array} \end{aligned}$$

The exact solution is

$$\begin{aligned} u(x,y,t) = \sin \bigg [\pi \bigg (\frac{x}{a} + \frac{y}{b} - 2t\bigg )\bigg ] \end{aligned}$$

Table 2 gives the maximum absolute errors, the convergence rate and the CPU time of the Beam–Warming scheme, the RHOC-ADI scheme and the LOD scheme (24) when \(\tau = 0.5,a=1,b=\frac{1}{2}\) for Problem 2. It is easy to find the computed results of the LOD scheme (24) is superior to the Beam–Warming scheme when \(\tau = 0.5h\) and the RHOC-ADI scheme with \(\tau = {h^2}\). The CPU time of the LOD scheme (24) is less than that of the RHOC-ADI scheme. Because the Beam–Warming scheme is second-order in time and space, its CPU time is less than that of the LOD scheme (24). Figure 2 gives the exact solution (a), the absolute error (b,c,d) when \(N=64,t=1,\tau = 0.01\) and comparison (e) of the numerical solutions of the three schemes with the exact solution when \(x=1,N = 20,t = 2,\tau = 0.05\) for Problem 2. It is not difficult to observe that the error of the LOD scheme (24) is the minimal under the same condition. Besides, we can also see more directly that the numerical solution of the LOD scheme (24) is the closest to the exact solution compared to other two schemes from Fig. 2(e).

Table 2 Maximum absolute error, convergence rate and CPU time(s) when \(t = 0.5,a=1,b= \frac{1}{2}\) for Problem 2
Fig. 2
figure 2

The exact solution (a), the absolute error from the LOD scheme (24) (b), the RHOC scheme (c), the Beam–Warming scheme (d) when \(\tau =0.01\), \(t=1\), \(N=64\) and the numerical solutions of the three schemes with the exact solution (e) on \(N=20,t=2,\tau =0.05,x=1\) for Problem 2

7 Problem 3

We consider the 2D advection equation

$$\begin{aligned} \frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} +b \frac{{\partial u}}{{\partial y}} = 0, c \le x,y \le d,t > 0 \end{aligned}$$

with the initial condition

$$\begin{aligned} \begin{array}{l} u(x,y,0) = {e^{ - \frac{{{{(x - \bar{x})}^2}}}{{2{\sigma ^2}}} - \frac{{{{(y - \bar{y})}^2}}}{{2{\sigma ^2}}}}}\\ \end{array} \end{aligned}$$

The exact solution is

$$\begin{aligned} u(x,y,t) = {e^{ - \frac{{{{(x - \bar{x} - at)}^2}}}{{2{\sigma ^2}}} - \frac{{{{(y - \bar{y} - bt)}^2}}}{{2{\sigma ^2}}}}} \end{aligned}$$

The problem 3 is a Gauss wave case. In fact, it is an initial value problem, so we set the boundary value to be zero in a enough big spatial domain. Table 3 gives the maximum absolute error of the Beam–Warming scheme, the RHOC-ADI scheme and the LOD scheme(24) when \(t = 5,a=0.1,b= 0.1,p=0,q=20,\sigma = 1,\tau = 0.025,(\overline{x} ,\overline{y} )=(4,4)\) for Problem 3. It is easy to find the computed results of the RHOC-ADI scheme and the LOD scheme(24) is better than that of the Beam–Warming scheme. Figure 3 gives the numerical solution of the LOD scheme(24) on \( t=10\) (a, b), \(t=50\) (c, d), \(t=80\) (e, f), \(t=120\) (g, h) when \(N=100,\tau =0.0025,a=0.1,b=0.1,p=0,q=20,\sigma = 1,(\overline{x} ,\overline{y} )=(4,4)\) and compared with the exact solution for Problem 3. Figure 4 gives the numerical solution of the LOD scheme (24) on \( t=100\) (a, b), \(t=200\) (c, d), \(t=400\) (e, f) when \(N=200,\tau =0.1,a=0.1,b=0.1,c=0,d=100,\sigma = 10,(\overline{x} ,\overline{y} )=(30,30)\) and compared with the exact solution for Problem 3. It is not difficult to see that the movement track of the wave. It also can be seen from these figures that the simulation result is well in terms of phase and amplitude. In other words, the numerical solution of the LOD scheme (24) is consistent with the exact solution.

8 Problem 4

We consider the 3D advection equation

$$\begin{aligned} \frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} + b\frac{{\partial u}}{{\partial y}}+ c\frac{{\partial u}}{{\partial z}} = 0,0 \le x,y,z \le 2,t > 0 \end{aligned}$$

with the initial and periodic boundary conditions

$$\begin{aligned} \begin{array}{l} u(x,y,z,0) = \sin \bigg [\pi \bigg (\frac{x}{a} + \frac{y}{b} + \frac{z}{c}\bigg )\bigg ]\\ u(0,y,z,t) = u(2,y,z,t),t> 0\\ u(x,0,z,t) = u(x,2,z,t),t> 0\\ u(x,y,0,t) = u(x,y,2,t),t > 0 \end{array} \end{aligned}$$

The exact solution is

$$\begin{aligned} u(x,y,z,t) = \sin \bigg [\pi \bigg (\frac{x}{a} + \frac{y}{b} + \frac{z}{c} - 3t\bigg )\bigg ] \end{aligned}$$
Table 3 Maximum absolute error when \(t = 5,a=0.1,b= 0.1,c=0,d=20,\sigma = 1,\tau = 0.025,\) \((\overline{x} ,\overline{y} )=(4,4)\) for Problem 3
Fig. 3
figure 3

The exact solution and the numerical solution of the LOD scheme(24) on \( t=10\) (a, b) \(t=50\) (c, d), \(t=80\) (e, f), \(t=120\) (g, h), when \(N=100,\tau =0.0025,a=0.1,b=0.1,c=0,d=20, \sigma = 1,(\overline{x} ,\overline{y} )=(4,4)\) for Problem 3

Fig. 4
figure 4

the exact solution and the numerical solution of the LOD scheme (24) on \( t=100\) (a, b), \(t=200\) (c, d), \(t=400\) (e, f), when \(N=200,\tau =0.1,a=0.1.b=0.1,p=0,q=100,\sigma = 10,(\overline{x} ,\overline{y} )=(30,30)\) for Problem 3

Table 4 gives the maximum absolute errors and the convergence rate of the Beam–Warming scheme, the RHOC scheme and the LOD scheme(45) with \(\tau = 0.5h\) and the RHOC scheme with \(\tau = {h^2}\) when \(t = 0.2,a = \frac{1}{2},b = \frac{1}{3},c = \frac{1}{4}\) for Problem 4. It is known that the LOD scheme(45) is the fourth-order accurate in time and space, so it has higher-order accuracy in time direction compared to the RHOC scheme and the Beam–Warming scheme. In addition, the computed results of the LOD scheme (45) are also better than that of the RHOC scheme and the Beam–Warming scheme. Figure 5 gives the exact solution (a), the absolute error and the contours of Problem 4 from the Beam–Warming scheme (d, g), the RHOC scheme (c, f) and the LOD scheme (45) (b, e) with \(N = 32,t = 1,\tau = 0.1\). It is easy to obverse that the error of the scheme (45) is less than that of the Beam–Warming scheme and the RHOC scheme from Fig. 5(b–d). From Fig. 5(e–g), we can find that the numerical solution of the LOD scheme (45) is consistent with the exact solution, while the RHOC scheme and the Beam–Warming scheme produce relatively big errors.

9 Problem 5

We consider the 3D advection equation

$$\begin{aligned} \frac{{\partial u}}{{\partial t}} + a\frac{{\partial u}}{{\partial x}} + b\frac{{\partial u}}{{\partial y}}+ c\frac{{\partial u}}{{\partial z}} = 0, 0 \le x,y,z \le 2,t > 0 \end{aligned}$$

with the initial and periodic boundary conditions

$$\begin{aligned} \begin{array}{l} u(x,y,z,0) = {e^{\cos [\pi (\frac{x}{a} + \frac{y}{b} + \frac{z}{c})]}}\\ u(0,y,z,t) = u(2,y,z,t),t> 0\\ u(x,0,z,t) = u(x,2,z,t),t> 0\\ u(x,y,0,t) = u(x,y,2,t),t > 0 \end{array} \end{aligned}$$

The exact solution is

$$\begin{aligned} u(x,y,z,t) = {e^{cos[\pi (\frac{x}{a} + \frac{y}{b} + \frac{z}{c} - 3t)]}} \end{aligned}$$
Table 4 Maximum absolute error and convergence rate when \(t = 0.2,a = \frac{1}{2},b = \frac{1}{3}, c = \frac{1}{4}\) for Problem 4

Table 5 gives the maximum absolute errors, convergence rate and CPU time by using the Beam–Warming scheme, the RHOC scheme and the LOD scheme (45) with \(t = 0.5,a = 1,b = 1,c = 1\). It is easy to see that the accuracy and the CPU time of the scheme (45) are better than that of the RHOC scheme. Figure 6 gives the exact solution (a), numerical solution, absolute error and contours of the LOD scheme (b, e, h), the RHOC scheme (c, f, i) and the Beam–Warming scheme (d, g, j) with \(N = 20,t = 1,\tau = 0.05\). It can find that the numerical solution of the LOD scheme (45) is in good agreement with the exact solution through obverse Fig. 6(b–d, h–j). For Fig. 6(e–g), the error of the LOD scheme (45) can achieve \({10^{ - 2}}\), but for the Beam–Warming scheme, and the RHOC scheme, the errors just achieve \({10^{ 0}}\) and \({10^{ - 1}}\). Therefore, the LOD scheme (45) is better in the accuracy compared with the RHOC scheme and the Beam–Warming scheme. Besides, the CPU time of the LOD scheme (45) is less than that of the RHOC scheme.

Fig. 5
figure 5

The exact solution (a), the absolute error and the contours from the LOD scheme (45) (b, e), the RHOC scheme (c, f) and the Beam–Warming scheme (d, g) when \(x=0.5\), \(\tau =0.1\), \(t=1\), \(N=32\) for Problem 4

10 Concluding remarks

In this study, we have proposed two high-order compact LOD difference schemes for solving the 2D and 3D advection equations, respectively. The scheme are two-step, unconditionally stable and have the fourth-order accuracy in both time and space. Firstly, based on the LOD strategy, we separate the 2D equations into two 1D equations. Then, for the 1D equations, the Taylor series expansion and correction for the third derivative in the truncation error remainder of the central difference scheme are used for discretization of time and space. Besides, the consistency, stability and convergence are proved. Afterwards, we extend the present method to the 3D case. At last, the accuracy, convergence and efficiency of the present schemes are validated by some numerical experiments. It shows that the present schemes are more accurate and efficient than those schemes from Tian (2011), Ge et al. (2018) and the Beam–Warming scheme.

Table 5 Maximum absolute error, convergence rate and CPU time(s) when \(t = 0.5,a=1,b=1,c=1\) for Problem 5

During the establishment of the present high-order compact schemes, for the constant coefficient problems, time derivative is approximated with the Crank–Nicolson method combined with its correction of the truncation error remainder. Objective differential equations, e.g., Eqs. (7), (8), (42), (43), are used to treat the higher derivatives in the truncation error terms. However, if we extend the present high-order scheme to the variable coefficient problems, e.g., \(\frac{1}{2}\frac{{\partial u}}{{\partial t}} + a(x,t)\frac{{\partial u}}{{\partial x}} = 0\), we need to approximate the \((\frac{{{\partial ^2}a}}{{\partial {t^2}}})_{i,j}^{n + \frac{1}{2}}\) to the fourth-order. This cannot be achieved with the two-level and three-point stencil. In another words, the scheme would be the second-order instead of the fourth-order in time. Therefore, the method cannot be extended to the variable coefficient problems. On the other hand, the present method requires the unknown function to be sufficiently smooth, at least the third derivatives are continuous. But for the shock wave problems, we know, it does not meet this condition, So the present method also can not be used to catch shocks waves. For this problem, the conservation law should be considered and some special numerical methods should be selected and used. Concerning these two problems, we will continue to study in our follow-up work through using other effective methods.

Fig. 6
figure 6

The exact solution (a), the numerical solution, the absolute error, the contours from the LOD scheme (45) (b, e, h), the RHOC scheme (c, f, i) and the Beam–Warming scheme (d, g, j) when \(\tau = 0.05, t = 1, N= 20\) for Problem 5