Numerical Analysis of Upwind Difference Schemes for Two-Dimensional First-Order Hyperbolic Equations with Variable Coefficients
Abstract: In this paper, we consider the initial-boundary value problem of two-dimensional first-order linear hyperbolic equation with variable coefficients. By using the upwind difference method to discretize the spatial derivative term and the forward and backward Euler method to discretize the time derivative term, the explicit and implicit upwind difference schemes are obtained respectively. It is proved that the explicit upwind scheme is conditionally stable and the implicit upwind scheme is unconditionally stable. Then the convergence of the schemes is derived. Numerical examples verify the results of theoretical analysis.

1. Introduction

For the domain $\Omega =\left(0,L\right)×\left(0,L\right)$, let $\partial \Omega$ be the boundary of $\Omega$ and $\stackrel{¯}{\Omega }=\Omega \cup \partial \Omega$. For a given vector $c=\left(a\left(x,y\right),\text{\hspace{0.17em}}b\left(x,y\right)\right)$, we divide $\partial \Omega$ into the following two parts [1]:

$\left\{\begin{array}{l}{\left(\partial \Omega \right)}_{-}=\left\{\left(x,y\right)\in \partial \Omega :c\cdot n\le 0\right\}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\left(\text{flow}\text{\hspace{0.17em}}\text{in}\right),\\ {\left(\partial \Omega \right)}_{+}=\left\{\left(x,y\right)\in \partial \Omega :c\cdot n>0\right\}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\left(\text{flow}\text{\hspace{0.17em}}\text{out}\right),\end{array}$ (1)

where $n$ is the unit outer normal vector of $\partial \Omega$. Considering the following two-dimensional first-order hyperbolic equation on $\Omega$ :

$\begin{array}{l}\left(\text{a}\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\frac{\partial u}{\partial t}+a\left(x,y\right)\frac{\partial u}{\partial x}+b\left(x,y\right)\frac{\partial u}{\partial y}=f\left(x,y,t\right),\text{\hspace{0.17em}}\left(x,y\right)\in \Omega \{\left(\partial \Omega \right)}_{-},\text{\hspace{0.17em}}0 (2)

where $c=\left(a\left(x,y\right),\text{\hspace{0.17em}}b\left(x,y\right)\right)$ is the flow rate and $a\left(x,y\right)$, $b\left(x,y\right)$, $f\left(x,y,t\right)$, ${u}_{0}\left(x,y\right)$, $g\left(x,y,t\right)$ are known functions which are smooth enough.

Hyperbolic equations are widely used in natural sciences and engineering such as fluid mechanics, light propagation, gas dynamics, etc. This kind of equations admits solutions propagating along with the characteristics [2] and depending on the initial data locally. These properties must be taken into account in order to obtain a stable numerical solution. Many numerical methods have been applied to hyperbolic equations [3] - [10]. In [3] [4] upwind difference schemes were used to solve one-dimensional and two-dimensional hyperbolic equations with constant coefficient and stability analysis was conducted by Fourier method. Greg [5] studied the semi-discrete central upwind Rankine-Hugoniot schemes for hyperbolic systems of conservation laws. Zhao et al. [6] [7] proposed some hybrid WENO schemes for hyperbolic conservation laws. Kurganov et al. [8] [9] presented semi-discrete central upwind schemes for nonconvex hyperbolic conservation laws and shallow water equations, respectively. Discontinuous Galerkin schemes for hyperbolic laws were considered in [10]. Some high-order difference schemes were considered in [11] for first-order hyperbolic equations with variable coefficients, but the direction of flow rate was not taken into account. Chen et al. [12] proposed dissipative spectral element method for first-order linear hyperbolic equation with variable coefficients in two dimensions. Among the aforementioned methods, upwind difference methods are typical ones which depend on the direction of the flow rate to provide stable as well as easily implementable schemes. Especially in many practical applications, first-order hyperbolic equations with variable coefficients in two or three dimensions are needed to describe more complex problems. Upwind difference methods will be more efficient in such applications. However, there is little work about the detailed discussions of upwind difference schemes for two- or three-dimensional hyperbolic equations with variable coefficients. Therefore, in this paper, full-discrete explicit and implicit upwind difference schemes are formulated and analyzed for two-dimensional first-order hyperbolic equations with variable coefficients. The stability analysis of these schemes is conducted by using Fourier method and maximum technique, which shows that the explicit upwind difference scheme is conditionally stable and the implicit one is unconditionally stable. A convergence rate of $O\left(\tau +h\right)$ is proved for these schemes. Numerical examples are provided to verify the theoretical results.

The rest of the paper is arranged as follows. In Section 2 and Section 3 we formulate explicit and implicit upwind schemes for the two-dimensional first-order hyperbolic problem (2), and conduct the stability and convergence analysis. The implementation details of the method are given in Section 4 and numerical examples are given in Section 5. Conclusions and the future work plans are presented in Section 6.

2. Explicit Upwind Scheme

In this section, we will develop and analyze an explicit upwind difference scheme for problem (2).

2.1. Formulation of Difference Scheme

Noticing that the flow rate $c=\left(a\left(x,y\right),\text{\hspace{0.17em}}b\left(x,y\right)\right)$ in (2) is a vector function of $\left(x,y\right)$, we need to consider the direction of it node by node in the spatial mesh in order to discrete the spatial derivative upwind. This will lead to four cases according to the sign of $a\left(x,y\right)$ and $b\left(x,y\right)$ at every node.

Taking two positive integers M and N, let the time step and space step be $h=\frac{L}{M},\text{\hspace{0.17em}}\tau =\frac{T}{N}$, respectively. Denote ${x}_{j}=jh$, ${y}_{k}=kh$, $0\le j,\text{\hspace{0.17em}}k\le M$, ${t}_{n}=n\tau$, $0, and call $\left({x}_{j},{y}_{k},{t}_{n}\right)$ a node.

Let ${\stackrel{¯}{\Omega }}_{h}=\left\{\left({x}_{j},{y}_{k}\right)|\text{\hspace{0.17em}}0\le j\le M,0\le k\le M\right\}$, ${\stackrel{¯}{\Omega }}_{\tau }=\left\{{t}_{n}|\text{\hspace{0.17em}}0\le n\le N\right\}$.

Considering Equation (2a) at $\left({x}_{j},{y}_{k},{t}_{n}\right)$, we have

$\begin{array}{l}\frac{\partial u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial t}+a\left({x}_{j},{y}_{k}\right)\frac{\partial u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial x}+b\left({x}_{j},{y}_{k}\right)\frac{\partial u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial y}\\ =f\left({x}_{j},{y}_{k},{t}_{n}\right).\end{array}$ (3)

For the first term on the left hand side of Equation (3), applying the forward Euler method and Taylor’s formula, we have

$\frac{\partial u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial t}=\frac{u\left({x}_{j},{y}_{k},{t}_{n+1}\right)-u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\tau }-\frac{\tau }{2}\frac{{\partial }^{2}u\left({x}_{j},{y}_{k},{t}_{n+1}\right)}{\partial {t}^{2}}+O\left({\tau }^{2}\right).$ (4)

The second and third terms on the left hand side of Equation (3) will be discretized by upwind difference method according to the sign of $a\left({x}_{j},{y}_{k}\right)$ and $b\left({x}_{j},{y}_{k}\right)$. Let ${a}_{j,k}=a\left({x}_{j},{y}_{k}\right)$, ${b}_{j,k}=b\left({x}_{j},{y}_{k}\right)$, ${f}_{j,k}^{n}=f\left({x}_{j},{y}_{k},{t}_{n}\right)$ and consider the following four cases.

Case 1. ${a}_{j,k}\ge 0,\text{\hspace{0.17em}}{b}_{j,k}\ge 0$.

When ${a}_{j,k}\ge 0,\text{\hspace{0.17em}}{b}_{j,k}\ge 0$, it is obtained by Taylor’s formula

$\frac{\partial u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial x}=\frac{u\left({x}_{j},{y}_{k},{t}_{n}\right)-u\left({x}_{j-1},{y}_{k},{t}_{n}\right)}{h}+\frac{h}{2}\frac{{\partial }^{2}u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial {x}^{2}}+O\left({h}^{2}\right)$ (5)

and

$\frac{\partial u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial y}=\frac{u\left({x}_{j},{y}_{k},{t}_{n}\right)-u\left({x}_{j},{y}_{k-1},{t}_{n}\right)}{h}+\frac{h}{2}\frac{{\partial }^{2}u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial {y}^{2}}+O\left({h}^{2}\right).$ (6)

Substituting (4)-(6) into (3), we have

$\begin{array}{l}\frac{u\left({x}_{j},{y}_{k},{t}_{n+1}\right)-u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\tau }+{a}_{j,k}\frac{u\left({x}_{j},{y}_{k},{t}_{n}\right)-u\left({x}_{j-1},{y}_{k},{t}_{n}\right)}{h}\\ \text{ }+{b}_{j,k}\frac{u\left({x}_{j},{y}_{k},{t}_{n}\right)-u\left({x}_{j},{y}_{k-1},{t}_{n}\right)}{h}=f\left({x}_{j},{y}_{k},{t}_{n}\right)+{R}_{j,k}^{n}\left(u\right),\end{array}$ (7)

where

$\begin{array}{c}{R}_{j,k}^{n}\left(u\right)=-\frac{\tau }{2}\frac{{\partial }^{2}u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial {t}^{2}}+\frac{h}{2}\frac{{\partial }^{2}u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial {x}^{2}}\\ \text{\hspace{0.17em}}\text{ }+\frac{h}{2}\frac{{\partial }^{2}u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\partial {y}^{2}}+O\left({h}^{2}+{\tau }^{2}\right)\end{array}$ (8)

is the local truncation error.

Omitting the truncation error and replacing the exact solution $u\left({x}_{j},{y}_{k},{t}_{n}\right)$ by the numerical solution ${U}_{j,k}^{n}$ in (7), we obtain the upwind difference scheme of (3)

$\begin{array}{l}\frac{{U}_{j,k}^{n+1}-{U}_{j,k}^{n}}{\tau }+{a}_{j,k}\frac{{U}_{j,k}^{n}-{U}_{j-1,k}^{n}}{h}+{b}_{j,k}\frac{{U}_{j,k}^{n}-{U}_{j,k-1}^{n}}{h}={f}_{j,k}^{n},\\ \text{\hspace{0.17em}}1\le j,k\le M,\text{\hspace{0.17em}}0\le n\le N-1.\end{array}$ (9)

Similar to Case 1, we can derive the upwind difference schemes for other cases.

Case 2. ${a}_{j,k}\le 0,\text{\hspace{0.17em}}{b}_{j,k}\le 0$.

When ${a}_{j,k}\le 0,\text{\hspace{0.17em}}{b}_{j,k}\le 0$, the difference scheme of (3) is

$\begin{array}{l}\frac{{U}_{j,k}^{n+1}-{U}_{j,k}^{n}}{\tau }+{a}_{j,k}\frac{{U}_{j+1,k}^{n}-{U}_{j,k}^{n}}{h}+{b}_{j,k}\frac{{U}_{j,k+1}^{n}-{U}_{j,k}^{n}}{h}={f}_{j,k}^{n},\\ \text{\hspace{0.17em}}0\le j,k\le M-1,\text{\hspace{0.17em}}0\le n\le N-1.\end{array}$ (10)

Case 3. ${a}_{j,k}\ge 0,\text{\hspace{0.17em}}{b}_{j,k}\le 0$.

When ${a}_{j,k}\ge 0,\text{\hspace{0.17em}}{b}_{j,k}\le 0$, the difference scheme of (3) is

$\begin{array}{l}\frac{{U}_{j,k}^{n+1}-{U}_{j,k}^{n}}{\tau }+{a}_{j,k}\frac{{U}_{j,k}^{n}-{U}_{j-1,k}^{n}}{h}+{b}_{j,k}\frac{{U}_{j,k+1}^{n}-{U}_{j,k}^{n}}{h}={f}_{j,k}^{n},\\ \text{\hspace{0.17em}}1\le j\le M,\text{\hspace{0.17em}}0\le k\le M-1,\text{\hspace{0.17em}}0\le n\le N-1.\end{array}$ (11)

Case 4. ${a}_{j,k}\le 0,\text{\hspace{0.17em}}{b}_{j,k}\ge 0$.

When ${a}_{j,k}\le 0,\text{\hspace{0.17em}}{b}_{j,k}\ge 0$, the difference scheme of (3) is

$\begin{array}{l}\frac{{U}_{j,k}^{n+1}-{U}_{j,k}^{n}}{\tau }+{a}_{j,k}\frac{{U}_{j+1,k}^{n}-{U}_{j,k}^{n}}{h}+{b}_{j,k}\frac{{U}_{j,k}^{n}-{U}_{j,k-1}^{n}}{h}={f}_{j,k}^{n},\\ \text{\hspace{0.17em}}0\le j\le M-1,\text{\hspace{0.17em}}1\le k\le M,\text{\hspace{0.17em}}0\le n\le N-1.\end{array}$ (12)

The initial condition and boundary condition (2b)-(2c) are discretized as follows

$\begin{array}{l}{U}_{j,k}^{0}={u}_{0}\left({x}_{j},{y}_{k}\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}0\le j,k\le M,\\ {U}_{j,k}^{n}=g\left({x}_{j},{y}_{k},{t}_{n}\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\left({x}_{j},{y}_{k}\right)\in {\left(\partial \Omega \right)}_{-},\text{\hspace{0.17em}}0\le n\le N.\end{array}$ (13)

Combining (9)-(13), the explicit upwind difference scheme for problem (2) is formulated.

2.2. Stability and Convergence Analysis

Since the coefficients in problem (2) are variable, we need first to apply the local fixed coefficient method or the apparent variable coefficient method to derive a stability condition and then prove that it is sufficient for the scheme (9)-(13) to be stable. The methods we use mainly include Fourier analysis and maximum technique.

Let ${U}^{n}=\left\{{U}_{j,k}^{n},\text{\hspace{0.17em}}0\le j,k\le M\right\}$ and ${‖{U}^{n}‖}_{\infty }=\underset{0\le j,k\le M}{\mathrm{max}}|{U}_{j,k}^{n}|$.

Theorem 2.1. When $\frac{\tau }{h}\underset{0\le jh,kh\le L}{\mathrm{max}}\left(|{a}_{j,k}|+|{b}_{j,k}|\right)\le 1$, the explicit upwind scheme (9)-(13) is stable with respect to the initial value ${U}^{0}$ and the source term f.

Proof. No loss of generality, we assume that ${a}_{j,k}\ne 0$. Let ${r}_{j,k}={a}_{j,k}\frac{\tau }{h}$, ${s}_{j,k}={b}_{j,k}\frac{\tau }{h}$, ${c}_{j,k}=\frac{{b}_{j,k}}{{a}_{j,k}}$.

We first consider the Case 1, in which ${r}_{j,k}>0,\text{\hspace{0.17em}}{s}_{j,k}\ge 0,\text{\hspace{0.17em}}{c}_{j,k}\ge 0$. Let $f=0$ and rewrite (9) as

${U}_{j,k}^{n+1}=\left(1-{r}_{j,k}-{s}_{j,k}\right){U}_{j,k}^{n}+{r}_{j,k}{U}_{j-1,k}^{n}+{s}_{j,k}{U}_{j,k-1}^{n}.$ (14)

Letting ${U}_{j,k}^{n}={v}^{n}{\text{e}}^{i\alpha jh}{\text{e}}^{i\beta kh}$ ( $i=\sqrt{-1}$, $\alpha =\frac{2p\pi }{L}$, $\beta =\frac{2q\pi }{L}$, p and q are integers), and substituting it into (14), we have

${v}^{n+1}=\left(1-{r}_{j,k}-{s}_{j,k}+{r}_{j,k}\left(\mathrm{cos}\alpha h-i\mathrm{sin}\alpha h\right)+{s}_{j,k}\left(\mathrm{cos}\beta h-i\mathrm{sin}\beta h\right)\right){v}^{n}.$

Thus, the growth factor is

$G\left(\alpha h,\beta h\right)=1-{r}_{j,k}-{s}_{j,k}+{r}_{j,k}\left(\mathrm{cos}\alpha h-i\mathrm{sin}\alpha h\right)+{s}_{j,k}\left(\mathrm{cos}\beta h-i\mathrm{sin}\beta h\right).$ (15)

Noticing that ${s}_{j,k}={c}_{j,k}{r}_{j,k}$, it can be obtained by calculation that

${|G\left(\alpha h,\beta h\right)|}^{2}=A{r}_{j,k}^{2}+B{r}_{j,k}+1,$ (16)

where

$A=2\left(1+{c}_{j,k}\right)\left[\left(1-\mathrm{cos}\alpha h\right)+{c}_{j,k}\left(1-\mathrm{cos}\beta h\right)\right]+{c}_{j,k}\left[-1+\mathrm{cos}\left(\alpha h+\beta h\right)\right],$

$B=-2\left[\left(1-\mathrm{cos}\alpha h\right)+{c}_{j,k}\left(1-\mathrm{cos}\beta h\right)\right].$

By Von Neumann condition, we let ${|G\left(\alpha h,\beta h\right)|}^{2}\le 1$, i.e.

$\begin{array}{l}A{r}_{j,k}^{2}+B{r}_{j,k}\le 0.\hfill \end{array}$ (17)

Obviously, $B\le 0$ holds for any $\alpha ,\text{\hspace{0.17em}}\beta$. So when $A\le 0$, (17) holds for any ${r}_{j,k}>0$. When $A>0$, (17) is equavalent to $0<{r}_{j,k}\le -\frac{B}{A}$. Because

$-\frac{B}{A}=\frac{\left(1-\mathrm{cos}\alpha h\right)+{c}_{j,k}\left(1-\mathrm{cos}\beta h\right)}{\left(1+{c}_{j,k}\right)\left[\left(1-\mathrm{cos}\alpha h\right)+{c}_{j,k}\left(1-\mathrm{cos}\beta h\right)\right]+{c}_{j,k}\left[-1+\mathrm{cos}\left(\alpha h+\beta h\right)\right]},$

$-1+\mathrm{cos}\left(\alpha h+\beta h\right)\le 0,$

we know that $-\frac{B}{A}\ge \frac{1}{1+{c}_{j,k}}>0$. So when

$0<{r}_{j,k}\le \frac{1}{1+{c}_{j,k}},$ (18)

(17) holds for any $\alpha ,\text{\hspace{0.17em}}\beta$.

Similarly, for Cases 2-4, the following conditions

$-\frac{1}{1+{c}_{j,k}}\le {r}_{j,k}<0,\text{\hspace{0.17em}}\text{\hspace{0.17em}}{a}_{j,k}<0,\text{\hspace{0.17em}}{b}_{j,k}\le 0,$ (19)

$0<{r}_{j,k}\le \frac{1}{1-{c}_{j,k}},\text{\hspace{0.17em}}\text{\hspace{0.17em}}{a}_{j,k}>0,\text{\hspace{0.17em}}{b}_{j,k}\le 0,$ (20)

$-\frac{1}{1-{c}_{j,k}}\le {r}_{j,k}<0,\text{\hspace{0.17em}}\text{\hspace{0.17em}}{a}_{j,k}<0,\text{\hspace{0.17em}}{b}_{j,k}\ge 0$ (21)

are obtained respectively.

Summing up (18)-(21) gives that

$|{r}_{j,k}|\le \frac{1}{1+|{c}_{j,k}|}.$ (22)

Condition (22) is obtained by taking the variable coefficients as constants. Considering that (2) admits variable coefficients and using the definition of ${r}_{j,k}$ and ${c}_{j,k}$, we write (22) as

$\frac{\tau }{h}\underset{0\le jh,kh\le L}{\mathrm{max}}\left(|{a}_{j,k}|+|{b}_{j,k}|\right)\le 1.$ (23)

Now we show that (23) is sufficient for the scheme (9)-(13) to be stable.

Using ${r}_{i,k}$ and ${s}_{i,k}$, (9)-(12) can be rewritten as follows

${U}_{j,k}^{n+1}=\left(1-|{r}_{j,k}|-|{s}_{j,k}|\right){U}_{j,k}^{n}+|{r}_{j,k}|{U}_{j-1,k}^{n}+|{s}_{j,k}|{U}_{j,k-1}^{n}+\tau {f}_{j,k}^{n},$ (24)

${U}_{j,k}^{n+1}=\left(1-|{r}_{j,k}|-|{s}_{j,k}|\right){U}_{j,k}^{n}+|{r}_{j,k}|{U}_{j+1,k}^{n}+|{s}_{j,k}|{U}_{j,k+1}^{n}+\tau {f}_{j,k}^{n},$ (25)

${U}_{j,k}^{n+1}=\left(1-|{r}_{j,k}|-|{s}_{j,k}|\right){U}_{j,k}^{n}+|{r}_{j,k}|{U}_{j-1,k}^{n}+|{s}_{j,k}|{U}_{j,k+1}^{n}+\tau {f}_{j,k}^{n},$ (26)

${U}_{j,k}^{n+1}=\left(1-|{r}_{j,k}|-|{s}_{j,k}|\right){U}_{j,k}^{n}+|{r}_{j,k}|{U}_{j+1,k}^{n}+|{s}_{j,k}|{U}_{j,k-1}^{n}+\tau {f}_{j,k}^{n}.$ (27)

From (23), we have $|{r}_{j,k}|+|{s}_{j,k}|\le 1$. Therefore, we have

$\begin{array}{c}|{U}_{j,k}^{n+1}|\le \left(1-|{r}_{j,k}|-|{s}_{j,k}|\right)|{U}_{j,k}^{n}|+|{r}_{j,k}||{U}_{j-1,k}^{n}|+|{s}_{j,k}||{U}_{j,k-1}^{n}|+\tau |{f}_{j,k}^{n}|\\ \le \left(1-|{r}_{j,k}|-|{s}_{j,k}|\right){‖{U}^{n}‖}_{\infty }+|{r}_{j,k}|{‖{U}^{n}‖}_{\infty }+|{s}_{j,k}|{‖{U}^{n}‖}_{\infty }+\tau |{f}_{j,k}^{n}|\\ \le {‖{U}^{n}‖}_{\infty }+\tau {‖{f}^{n}‖}_{\infty }\end{array}$ (28)

for (24).

Similarly, we can obtain the following inequality

$|{U}_{j,k}^{n+1}|\le {‖{U}^{n}‖}_{\infty }+\tau {‖{f}^{n}‖}_{\infty }$ (29)

for (25)-(27). That is, we have the estimation

${‖{U}^{n+1}‖}_{\infty }\le {‖{U}^{n}‖}_{\infty }+\tau {‖{f}^{n}‖}_{\infty }$ (30)

for Case 1-Case 4. It can be derived from (30) immediately that

${‖{U}^{n}‖}_{\infty }\le {‖{U}^{0}‖}_{\infty }+n\tau \underset{0\le n\le N}{\mathrm{max}}{‖{f}^{n}‖}_{\infty }\le {‖{U}^{0}‖}_{\infty }+T\underset{0\le n\le N}{\mathrm{max}}{‖{f}^{n}‖}_{\infty }.$ (31)

So the scheme (9)-(13) is stable with respect to ${U}^{0}$ and f.

The proof is completed.

Remark 2.1. It can be seen that when $a\left(x,y\right)\equiv a$ and $b\left(x,y\right)\equiv b$ with constants a and b, the condition (23) reduces to

$\frac{\tau }{h}\left(|a|+|b|\right)\le 1,$

which is just the CFL condition of upwind difference scheme for two-dimensional hyperbolic equations with constant coefficients [3]. This indicates that the condition (23) is compatible with the constant coefficients case and is an appropriate one.

Now we derive the convergence rate of the scheme (9)-(13) based on the maximum technique and the condition (23).

Theorem 2.2. Suppose that $u\left(x,y,t\right)\in {C}^{2}\left(\stackrel{¯}{\Omega }×\left[0,T\right]\right)$ is the solution of (2), and $\left\{{U}_{j,k}^{n}|\text{\hspace{0.17em}}0\le j,\text{\hspace{0.17em}}k\le M,\text{\hspace{0.17em}}0\le n\le N\right\}$ is the solution of the upwind difference scheme (9)-(13). Then when the condition (23) is satisfied, there exists a constant $C>0$ independent of h and $\tau$ such that

$\underset{0\le n\tau \le N}{\mathrm{max}}{‖{u}^{n}-{U}^{n}‖}_{\infty }\le C\left(\tau +h\right).$

Proof. Let ${E}_{j,k}^{n}={u}_{j,k}^{n}-{U}_{j,k}^{n}$, $0\le j,k\le M$, $0\le n\le N$. We can easily obtain the error equations

$\begin{array}{l}{E}_{j,k}^{n+1}=\left(1-|{r}_{j,k}|-|{s}_{j,k}|\right){E}_{j,k}^{n}+|{r}_{j,k}|{E}_{j-1,k}^{n}+|{s}_{j,k}|{E}_{j,k-1}^{n}+\tau {R}_{j,k}^{1,n},\\ {E}_{j,k}^{n+1}=\left(1-|{r}_{j,k}|-|{s}_{j,k}|\right){E}_{j,k}^{n}+|{r}_{j,k}|{E}_{j+1,k}^{n}+|{s}_{j,k}|{E}_{j,k+1}^{n}+\tau {R}_{j,k}^{2,n},\\ {E}_{j,k}^{n+1}=\left(1-|{r}_{j,k}|-|{s}_{j,k}|\right){E}_{j,k}^{n}+|{r}_{j,k}|{E}_{j-1,k}^{n}+|{s}_{j,k}|{E}_{j,k+1}^{n}+\tau {R}_{j,k}^{3,n},\\ {E}_{j,k}^{n+1}=\left(1-|{r}_{j,k}|-|{s}_{j,k}|\right){E}_{j,k}^{n}+|{r}_{j,k}|{E}_{j+1,k}^{n}+|{s}_{j,k}|{E}_{j,k-1}^{n}+\tau {R}_{j,k}^{4,n},\end{array}$ (32)

where ${E}_{j,k}^{0}=0$, ${R}_{j,k}^{1,n},{R}_{j,k}^{2,n},{R}_{j,k}^{3,n},{R}_{j,k}^{4,n}$ are the truncation errors for Case 1-Case 4, respectively, and $|{R}_{j,k}^{s,n}|\le C\left(\tau +h\right),\text{\hspace{0.17em}}s=1,2,3,4$.

Using the similar approach to get (31), we obtain

${‖{E}^{n}‖}_{\infty }\le C\left(\tau +h\right),\text{\hspace{0.17em}}0\le n\le N.$

The proof is completed.

3. Implicit Upwind Scheme

The explicit upwind difference scheme proposed in the previous section is easy to implement. But the conditional stability may limit the application of the scheme in practice. For example, when very small space step h is needed, the time step $\tau$ must be taken very small also in order to keep the stability condition. In this section we propose an implicit upwind difference scheme which is unconditionally stable for problem (2). Instead of the forward Euler method, the backward Euler method is used to the time derivative in (2a) and at the same time the upwind method is used to the space derivatives. The unconditional stability of the implicit scheme is obtained by using Fourier method and maximum technique. Since there is no restriction between the size of h and $\tau$, large time step can be used when it is necessary. So the implicit upwind difference scheme is more universal.

3.1. Formulation of Difference Scheme

Now we consider Equation (2a) at the node $\left({x}_{j},{y}_{k},{t}_{n+1}\right)$

$\begin{array}{l}\frac{\partial u\left({x}_{j},{y}_{k},{t}_{n+1}\right)}{\partial t}+a\left({x}_{j},{y}_{k}\right)\frac{\partial u\left({x}_{j},{y}_{k},{t}_{n+1}\right)}{\partial x}+b\left({x}_{j},{y}_{k}\right)\frac{\partial u\left({x}_{j},{y}_{k},{t}_{n+1}\right)}{\partial y}\\ =f\left({x}_{j},{y}_{k},{t}_{n+1}\right).\end{array}$ (33)

For the first term on the left hand side of Equation (3), applying the backward Euler method and Taylor’s formula, we have

$\frac{\partial u\left({x}_{j},{y}_{k},{t}_{n+1}\right)}{\partial t}=\frac{u\left({x}_{j},{y}_{k},{t}_{n+1}\right)-u\left({x}_{j},{y}_{k},{t}_{n}\right)}{\tau }-\frac{\tau }{2}\frac{{\partial }^{2}u\left({x}_{j},{y}_{k},{t}_{n+1}\right)}{\partial {t}^{2}}+O\left({\tau }^{2}\right).$ (34)

Then by using the upwind approach we have used to derive the scheme (9)-(12), we obtain the following implicit upwind difference scheme for (2)

$\begin{array}{l}\left(\text{a}\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\frac{{U}_{j,k}^{n+1}-{U}_{j,k}^{n}}{\tau }+{a}_{j,k}\frac{{U}_{j,k}^{n+1}-{U}_{j-1,k}^{n+1}}{h}+{b}_{j,k}\frac{{U}_{j,k}^{n+1}-{U}_{j,k-1}^{n+1}}{h}={f}_{j,k}^{n+1},\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}1\le j,k\le M,\text{\hspace{0.17em}}0\le n\le N-1,\text{\hspace{0.17em}}{a}_{j,k}\ge 0,\text{\hspace{0.17em}}{b}_{j,k}\ge 0,\\ \left(\text{b}\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\frac{{U}_{j,k}^{n+1}-{U}_{j,k}^{n}}{\tau }+{a}_{j,k}\frac{{U}_{j+1,k}^{n+1}-{U}_{j,k}^{n+1}}{h}+{b}_{j,k}\frac{{U}_{j,k+1}^{n+1}-{U}_{j,k}^{n+1}}{h}={f}_{j,k}^{n+1},\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}0\le j,k\le M-1,\text{\hspace{0.17em}}0\le n\le N-1,\text{\hspace{0.17em}}{a}_{j,k}\le 0,\text{\hspace{0.17em}}{b}_{j,k}\le 0,\end{array}$

$\begin{array}{l}\left(\text{c}\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\frac{{U}_{j,k}^{n+1}-{U}_{j,k}^{n}}{\tau }+{a}_{j,k}\frac{{U}_{j,k}^{n+1}-{U}_{j-1,k}^{n+1}}{h}+{b}_{j,k}\frac{{U}_{j,k+1}^{n+1}-{U}_{j,k}^{n+1}}{h}={f}_{j,k}^{n+1},\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}1\le j\le M,\text{\hspace{0.17em}}0\le k\le M-1,\text{\hspace{0.17em}}0\le n\le N-1,\text{\hspace{0.17em}}{a}_{j,k}\ge 0,\text{\hspace{0.17em}}{b}_{j,k}\le 0,\\ \left(\text{d}\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\frac{{U}_{j,k}^{n+1}-{U}_{j,k}^{n}}{\tau }+{a}_{j,k}\frac{{U}_{j+1,k}^{n+1}-{U}_{j,k}^{n+1}}{h}+{b}_{j,k}\frac{{U}_{j,k}^{n+1}-{U}_{j,k-1}^{n+1}}{h}={f}_{j,k}^{n+1},\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}0\le j\le M-1,\text{\hspace{0.17em}}1\le k\le M,\text{\hspace{0.17em}}0\le n\le N-1,\text{\hspace{0.17em}}{a}_{j,k}\le 0,\text{\hspace{0.17em}}{b}_{j,k}\ge 0.\end{array}$ (35)

The initial condition and boundary condition (2b)-(2c) are discretized as follows

$\begin{array}{l}{U}_{j,k}^{0}={u}_{0}\left({x}_{j},{y}_{k}\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}0\le j,k\le M,\\ {U}_{j,k}^{n}=g\left({x}_{j},{y}_{k},{t}_{n}\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\left({x}_{j},{y}_{k}\right)\in {\left(\partial \Omega \right)}_{-},\text{\hspace{0.17em}}0\le n\le N.\end{array}$ (36)

Remark 3.1. Note that at the time level ${t}_{n+1}$, only two nodes in addition to $\left({x}_{j},{y}_{k}\right)$ are used in x-direction and y-direction in each formula of (35). This makes it possible that the scheme (35)-(36) can be implemented explicitly from the flow-in boundary node by node. We will explain it in detail in Section 4.

3.2. Stability and Convergence Analysis

We present unconditional stability and convergence of the scheme (35)-(36) in Theorem 3.1 and Theorem 3.2, respectively.

Theorem 3.1. The implicit upwind scheme (35)-(36) is unconditionally stable with respect to the initial value ${U}^{0}$ and the source term f.

Proof. First consider the case in which ${a}_{j,k}\ge 0,\text{\hspace{0.17em}}{b}_{j,k}\ge 0$. Let $f=0$ and rewrite (35a) as

${U}_{j,k}^{n+1}+{r}_{j,k}\left({U}_{j,k}^{n+1}-{U}_{j-1,k}^{n+1}\right)+{s}_{j,k}\left({U}_{j,k}^{n+1}-{U}_{j,k-1}^{n+1}\right)={U}_{j,k}^{n}.$ (37)

Letting ${U}_{j,k}^{n}={v}^{n}{\text{e}}^{i\alpha jh}{\text{e}}^{i\beta kh}$ ( $i=\sqrt{-1}$, $\alpha =\frac{2p\pi }{L}$, $\beta =\frac{2q\pi }{L}$, p and q are integers), and substituting it into (37), we have

${v}^{n+1}+{r}_{j,k}{v}^{n+1}\left(1-\left(\mathrm{cos}\alpha h-i\mathrm{sin}\alpha h\right)\right)+{s}_{j,k}{v}^{n+1}\left(1-\left(\mathrm{cos}\beta h-i\mathrm{sin}\beta h\right)\right)={v}^{n}.$

Thus, the growth factor is

$\begin{array}{l}G\left(\alpha h,\beta h\right)\\ =\frac{1}{1+{r}_{j,k}+{s}_{j,k}-{r}_{j,k}\mathrm{cos}\alpha h-{s}_{j,k}\mathrm{cos}\beta h+i\left({r}_{j,k}\mathrm{sin}\alpha h+{s}_{j,k}\mathrm{sin}\beta h\right)}.\end{array}$ (38)

Therefore

$\begin{array}{l}{|G\left(\alpha h,\beta h\right)|}^{2}\\ =\frac{1}{{\left(1+{r}_{j,k}+{s}_{j,k}-{r}_{j,k}\mathrm{cos}\alpha h-{s}_{j,k}\mathrm{cos}\beta h\right)}^{2}+{\left({r}_{j,k}\mathrm{sin}\alpha h+{s}_{j,k}\mathrm{sin}\beta h\right)}^{2}}.\end{array}$ (39)

Since ${r}_{j,k}\ge 0,\text{\hspace{0.17em}}{s}_{j,k}\ge 0$, we easily know that

$\begin{array}{l}1+{r}_{j,k}+{s}_{j,k}-{r}_{j,k}\mathrm{cos}\alpha h-{s}_{j,k}\mathrm{cos}\beta h\\ =1+{r}_{j,k}\left(1-\mathrm{cos}\alpha h\right)+{s}_{j,k}\left(1-\mathrm{cos}\beta h\right)\ge 1.\end{array}$

So for any ${r}_{j,k}\ge 0,\text{\hspace{0.17em}}{s}_{j,k}\ge 0$, it holds that

${|G\left(\alpha h,\beta h\right)|}^{2}\le 1.$ (40)

Similarly, we can obtain (40) for (35b)-(35d). Therefore, the growth factor satisfies the Von Neumann condition.

Now we prove the unconditional stability of the scheme (35)-(36) with respect to ${U}_{0}$ and f. We write (35a) as follow

$\left(1+{r}_{j,k}+{s}_{j,k}\right){U}_{j,k}^{n+1}-{r}_{j,k}{U}_{j-1,k}^{n+1}-{s}_{j,k}{U}_{j,k-1}^{n+1}={U}_{j,k}^{n}+\tau {f}_{j,k}^{n+1}.$ (41)

Assuming that $|{U}_{{j}_{0},{k}_{0}}^{n+1}|={‖{U}^{n+1}‖}_{\infty }$ and noticing that ${r}_{j,k}\ge 0$ and ${s}_{j,k}\ge 0$, we have

$\begin{array}{c}{‖{U}^{n+1}‖}_{\infty }=\left(1+{r}_{{j}_{0},{k}_{0}}+{s}_{{j}_{0},{k}_{0}}\right){‖{U}^{n+1}‖}_{\infty }-{r}_{{j}_{0},{k}_{0}}{‖{U}^{n+1}‖}_{\infty }-{s}_{{j}_{0},{k}_{0}}{‖{U}^{n+1}‖}_{\infty }\\ \le \left(1+{r}_{{j}_{0},{k}_{0}}+{s}_{{j}_{0},{k}_{0}}\right)|{U}_{{j}_{0},{k}_{0}}^{n+1}|-{r}_{{j}_{0},{k}_{0}}|{U}_{{j}_{0}-1,{k}_{0}}^{n+1}|-{s}_{{j}_{0},{k}_{0}}|{U}_{{j}_{0},{k}_{0}-1}^{n+1}|\\ \le |\left(1+{r}_{{j}_{0},{k}_{0}}+{s}_{{j}_{0},{k}_{0}}\right){U}_{{j}_{0},{k}_{0}}^{n+1}-{r}_{{j}_{0},{k}_{0}}{U}_{{j}_{0}-1,{k}_{0}}^{n+1}-{s}_{{j}_{0},{k}_{0}}{U}_{{j}_{0},{k}_{0}-1}^{n+1}|\\ =|{U}_{{j}_{0},{k}_{0}}^{n}+\tau {f}_{{j}_{0},{k}_{0}}^{n+1}|\le {‖{U}^{n}‖}_{\infty }+\tau {‖{f}^{n+1}‖}_{\infty }.\end{array}$ (42)

Thus, we obtain

${‖{U}^{n+1}‖}_{\infty }\le {‖{U}^{n}‖}_{\infty }+\tau {‖{f}^{n+1}‖}_{\infty }.$ (43)

Similarly, we can obtain (43) for (35b)-(35d).

Then, for any n, $1\le n\le N$, we get

${‖{U}^{n}‖}_{\infty }\le {‖{U}^{0}‖}_{\infty }+n\tau \underset{0\le n\le N}{\mathrm{max}}{‖{f}^{n}‖}_{\infty }\le {‖{U}^{0}‖}_{\infty }+T\underset{0\le n\le N}{\mathrm{max}}{‖{f}^{n}‖}_{\infty }.$ (44)

So the scheme (35)-(36) is unconditionally stable with respect to the initial value ${U}^{0}$ and the source term f.

The proof is completed.

Theorem 3.2. Suppose that $u\left(x,y,t\right)\in {C}^{2}\left(\stackrel{¯}{\Omega }×\left[0,T\right]\right)$ is the solution of (2), and $\left\{{U}_{j,k}^{n}|\text{\hspace{0.17em}}0\le j,\text{\hspace{0.17em}}k\le M,\text{\hspace{0.17em}}0\le n\le N\right\}$ is the solution of the upwind difference scheme (35)-(36). Then there exists a constant $C>0$ independent of h and $\tau$, such that

$\underset{0\le n\tau \le N}{\mathrm{max}}{‖{u}^{n}-{U}^{n}‖}_{\infty }\le C\left(\tau +h\right).$

Proof. Let ${E}_{j,k}^{n}={u}_{j,k}^{n}-{U}_{j,k}^{n}$, $0\le j,k\le M$, $0\le n\le N$. We can easily obtain the error equations

$\begin{array}{l}\left(1+|{r}_{j,k}|+|{s}_{j,k}|\right){E}_{j,k}^{n+1}-|{r}_{j,k}|{E}_{j-1,k}^{n+1}-|{s}_{j,k}|{E}_{j,k-1}^{n+1}={E}_{j,k}^{n}+\tau {R}_{j,k}^{1,n+1},\\ \left(1+|{r}_{j,k}|+|{s}_{j,k}|\right){E}_{j,k}^{n+1}-|{r}_{j,k}|{E}_{j+1,k}^{n+1}-|{s}_{j,k}|{E}_{j,k+1}^{n+1}={E}_{j,k}^{n}+\tau {R}_{j,k}^{1,n+1},\\ \left(1+|{r}_{j,k}|+|{s}_{j,k}|\right){E}_{j,k}^{n+1}-|{r}_{j,k}|{E}_{j-1,k}^{n+1}-|{s}_{j,k}|{E}_{j,k+1}^{n+1}={E}_{j,k}^{n}+\tau {R}_{j,k}^{1,n+1},\\ \left(1+|{r}_{j,k}|+|{s}_{j,k}|\right){E}_{j,k}^{n+1}-|{r}_{j,k}|{E}_{j+1,k}^{n+1}-|{s}_{j,k}|{E}_{j,k-1}^{n+1}={E}_{j,k}^{n}+\tau {R}_{j,k}^{1,n+1},\end{array}$ (45)

where ${E}_{j,k}^{0}=0$, ${R}_{j,k}^{1,n},\text{\hspace{0.17em}}{R}_{j,k}^{2,n},\text{\hspace{0.17em}}{R}_{j,k}^{3,n},\text{\hspace{0.17em}}{R}_{j,k}^{4,n}$ are the truncation errors for (35), respectively, and $|{R}_{j,k}^{s,n}|\le C\left(\tau +h\right),\text{\hspace{0.17em}}s=1,2,3,4$.

Using the similar approach to get (43), we obtain

${‖{E}^{n}‖}_{\infty }\le C\left(\tau +h\right),\text{\hspace{0.17em}}0\le n\le N.$

The proof is completed.

4. Implementation Details of the Method

In this section, we give details about how to implement the method of this work. In order to describe the algorithm for the explicit scheme (9)-(13) and the implicit scheme (35)-(36) simply and clearly, we assume that the flow-in boundary is $\left\{\left(x,y\right):x=0,\text{\hspace{0.17em}}0\le y\le L\right\}$ and $\left\{\left(x,y\right):y=0,\text{\hspace{0.17em}}0\le x\le L\right\}$ with no loss of generality. Thus we have both $a\left(x,y\right)\ge 0$ and $b\left(x,y\right)\ge 0$.

We provide the algorithms for the explicit scheme (9)-(13) and the explicit scheme (35)-(36) in the following Algorithm 4.1 and Algorithm 4.2, respectively.

Algorithm 4.1. Algorithm for the explicit scheme (9)-(13):

1) Choose space step $h=L/M$ and time step $\tau =T/N$ which satisfy the stability condition (23) and partition the time interval $\left[0,T\right]$ and space domain $\Omega$.

2) Get initial data $\left\{{U}_{j,k}^{0},\text{\hspace{0.17em}}0\le j,k\le M\right\}$ and flow-in boundary data $\left\{{U}_{0,k}^{n},\text{\hspace{0.17em}}{U}_{j,0}^{n},\text{\hspace{0.17em}}0\le j,k\le M,\text{\hspace{0.17em}}n=0,1,\cdots ,N\right\}$ by (13).

3) For $n=0,1,\cdots ,N-1$, suppose that $\left\{{U}_{j,k}^{n},\text{\hspace{0.17em}}0\le j,k\le M\right\}$ has been known or obtained beforehand. Then for $1\le j,k\le M$, get ${U}_{j,k}^{n+1}$ explicitly by using the formula (9) according to the sign of ${a}_{j,k}\ge 0$ and ${b}_{j,k}\ge 0$ (or by other formula in (10)-(12) corresponding to other cases of the sign of ${a}_{j,k}$ and ${b}_{j,k}$ ).

Algorithm 4.2. Algorithm for the implicit scheme (35)-(36):

1) Choose space step $h=L/M$ and time step $\tau =T/N$ and partition the time interval $\left[0,T\right]$ and space domain $\Omega$.

2) Get initial data $\left\{{U}_{j,k}^{0},\text{\hspace{0.17em}}0\le j,k\le M\right\}$ and flow-in boundary data $\left\{{U}_{0,k}^{n},\text{\hspace{0.17em}}{U}_{j,0}^{n},\text{\hspace{0.17em}}0\le j,k\le M,\text{\hspace{0.17em}}n=0,1,\cdots ,N\right\}$ by (36).

3) For $n=0,1,\cdots ,N-1$, suppose that $\left\{{U}_{j,k}^{n}\right\}$ has been known or obtained beforehand. For $k=1,2,\cdots ,M$, obtain ${U}_{j,k}^{n+1}$ explicitly from $\left\{{U}_{j-1,k}^{n+1},{U}_{j,k-1}^{n+1},{U}_{j,k}^{n}\right\}$ by using (35a) for $j=1,\cdots ,M$. (Similarly, if the sign of ${a}_{j,k}$ and ${b}_{j,k}$ is one of other three cases, the corresponding formula in (35) is used.)

It can be seen that the upwind difference schemes we have proposed in this work are easy to be implemented as well as are efficient. Especially, the implicit scheme (35)-(36) does not require any restriction between h and $\tau$ and can be implemented actually explicitly. So they are suited for the simulation of waves propagation in real-world application.

5. Numerical Experiment

In this section we give three numerical examples. In the first two examples, we consider two problems for which the exact solutions are given in order to verify the stability and convergence rate of the proposed schemes. In the third example, we consider a problem which is more realistic in sense that the initial data is nonsmooth and the exact solution is not given beforehand. The propagation performance of the wave is illustrated by using the proposed implicit upwind scheme.

Example 1. Consider the following initial-boundary value problem of two dimensional first-order hyperbolic problem:

$\begin{array}{l}\left(\text{a}\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\frac{\partial u}{\partial t}+\frac{\partial u}{\partial x}+\frac{\partial u}{\partial y}=0,\text{\hspace{0.17em}}\text{\hspace{0.17em}}0 (46)

The exact solution is $u\left(x,y,t\right)=\mathrm{sin}\pi \left(x-t\right)+\mathrm{sin}\pi \left(y-t\right)$.

Taking the space step $h=\frac{1}{M}$ and the time step $\tau =\frac{1}{N}$, the explicit and implicit upwind schemes proposed in this paper are respectively used to solve problem (46). The discrete ${l}^{2}$ norm is defined as $‖{U}^{n}‖={\left\{\underset{j,k=0}{\overset{M}{\sum }}\text{ }\text{ }{h}^{2}{\left({U}_{j,k}^{n}\right)}^{2}\right\}}^{\frac{1}{2}}$.

Firstly, we consider the explicit upwind scheme. According to the Theorem 2.1, the stability condition of the explicit upwind scheme for (46) is $r=s=\frac{\tau }{h}\le \frac{1}{2}$. The ${l}^{\infty }$ -error and ${l}^{2}$ -error and the convergence order of the explicit upwind scheme when $r=s=\frac{1}{3}$ and $r=s=\frac{1}{2}$ are presented in Table 1 and Table 2, respectively. It can be seen from the results that the scheme is stable when $r=s\le \frac{1}{2}$ and the convergence rate of the scheme is first order.

Table 1. Errors and convergence order of explicit upwind scheme with $r=s=\frac{1}{3}$.

Table 2. Errors and convergence order of explicit upwind scheme with $r=s=\frac{1}{2}$.

The ${l}^{\infty }$ -error and ${l}^{2}$ -error of the explicit upwind scheme when $r=s=1$ are presented in Table 3. It can be seen from the results that the scheme is unstable for $r=s=1>\frac{1}{2}$, which verifies that the explicit upwind scheme is conditionally stable. The plots of convergence order for the explicit upwind scheme with $r=s=\frac{1}{3}$ and $r=s=\frac{1}{2}$ are presented in Figure 1. Surface plots of the exact solution and the numerical solution with $r=s=\frac{1}{3}$ are presented in Figure 2 and Figure 3.

Next, we consider the implicit upwind scheme. The ${l}^{\infty }$ -error and ${l}^{2}$ -error and the convergence order of the implicit scheme when $r=s=1$ are shown in Table 4. The results show that the implicit upwind scheme is unconditional stable and converges at a rate of first order. The plots of convergence order of the implicit scheme are given in Figure 4. Surface plots of the exact solution and the numerical solution with $r=s=1$ are presented in Figure 5 and Figure 6.

Example 2. In this example, we consider the following initial-boundary value problem of two-dimensional first-order hyperbolic equation with variable coefficients:

(a)(b)

Figure 1. Convergence order of explicit scheme for Example 1. (a) $r=s=\frac{1}{3}$ ; (b) $r=s=\frac{1}{2}$.

Figure 2. Exact solution with $h=\frac{1}{{2}^{5}}$.

Figure 3. Solution of explicit upwind scheme with $h=\frac{1}{{2}^{5}}$.

Figure 4. Convergence order of implicit scheme for Example 1.

Figure 5. Exact solution with $h=\frac{1}{{2}^{5}}$.

Figure 6. Solution of implicit upwind scheme with $h=\frac{1}{{2}^{5}}$.

Table 3. Errors of explicit upwind scheme with $r=s=1$.

Table 4. Errors and convergence order of implicit upwind scheme with $r=s=1$.

$\begin{array}{l}\left(\text{a}\right)\frac{\partial u}{\partial t}+\mathrm{sin}\left(x\right)\frac{\partial u}{\partial x}+\mathrm{sin}\left(y\right)\frac{\partial u}{\partial y}=\mathrm{sin}\left(x\right)\mathrm{sin}\left(y\right)\left[\mathrm{cos}\left(t\right)+\mathrm{sin}\left(t\right)\mathrm{cos}\left(x\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}+\mathrm{sin}\left(t\right)\mathrm{cos}\left(y\right)\right],\text{\hspace{0.17em}}\text{\hspace{0.17em}}0 (47)

where the exact solution is $u\left(x,y,t\right)=\mathrm{sin}\left(t\right)\mathrm{sin}\left(x\right)\mathrm{sin}\left(y\right)$.

Taking the space step $h=\frac{\pi }{M}$ and the time step $\tau =\frac{1}{N}$, the explicit and implicit upwind schemes proposed in this paper are respectively used to solve problem (47).

Firstly, we consider the explicit upwind scheme. According to Theorem 2.1, the condition under which the explicit upwind scheme of (47) is stable is $\frac{\tau }{h}\le \frac{1}{2}$. The ${l}^{\infty }$ -error and ${l}^{2}$ -error and the convergence order of the explicit upwind scheme when $\frac{\tau }{h}=\frac{1}{2\pi }$ and $\frac{\tau }{h}=\frac{1}{\pi }$ are presented in Table 5 and Table 6, respectively. It can be seen from the results that the scheme is stable when $\frac{\tau }{h}\le \frac{1}{2}$ and the convergence rate of the scheme is first order. The ${l}^{\infty }$ -error and ${l}^{2}$ -error of the explicit upwind scheme when $\frac{\tau }{h}=\frac{2}{\pi }$ are presented in Table 7. It can be seen from the results that the scheme is unstable for $\frac{\tau }{h}=\frac{2}{\pi }>\frac{1}{2}$, which verifies that the explicit

upwind scheme is conditionally stable. The plots of convergence order of the explicit scheme with $\frac{\tau }{h}=\frac{1}{2\pi }$ and $\frac{\tau }{h}=\frac{1}{\pi }$ are displayed in Figure 7. Surface plots of the exact solution and the numerical solution with $\frac{\tau }{h}=\frac{1}{2\pi }$ are presented in Figure 8 and Figure 9.

Table 5. Errors and convergence order of explicit upwind scheme with $\frac{\tau }{h}=\frac{1}{2\pi }$.

(a)(b)

Figure 7. Convergence order of explicit scheme for Example 2. (a) $\frac{\tau }{h}=\frac{1}{2\pi }$ ; (b) $\frac{\tau }{h}=\frac{1}{\pi }$.

Figure 8. Exact solution with $h=\frac{1}{{2}^{5}}$.

Figure 9. Solution of explicit upwind scheme with $h=\frac{1}{{2}^{5}}$.

Table 6. Errors and convergence order of explicit upwind scheme with $\frac{\tau }{h}=\frac{1}{\pi }$.

Table 7. Errors of explicit upwind scheme with $\frac{\tau }{h}=\frac{2}{\pi }$.

Next, we consider the implicit upwind scheme. The ${l}^{\infty }$ -error and ${l}^{2}$ -error and the convergence order of the implicit upwind scheme when $\frac{\tau }{h}=\frac{1}{\pi }$ are shown in Table 8. The results show that the implicit upwind scheme is unconditional stable and converges at a rate of first order. The plots of convergence order of the implicit scheme are displayed in Figure 10. Surface plots of the exact solution and the numerical solution with $\frac{\tau }{h}=\frac{1}{\pi }$ are presented in Figure 11 and Figure 12.

Example 3. We consider the following initial-boundary value problem of two-dimensional first-order hyperbolic equation with variable coefficients:

Figure 10. Convergence order at net ratios $\frac{\tau }{h}=\frac{1}{\pi }$.

Figure 11. Exact solution with $h=\frac{1}{{2}^{5}}$.

Figure 12. Solution of implicit upwind scheme with $h=\frac{1}{{2}^{5}}$.

$\begin{array}{l}\left(\text{a}\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\frac{\partial u}{\partial t}+\mathrm{sin}\left(\pi x\right)\frac{\partial u}{\partial x}+\mathrm{sin}\left(\pi y\right)\frac{\partial u}{\partial y}=0,\text{\hspace{0.17em}}\text{\hspace{0.17em}}0 (48)

Table 8. Errors and convergence order of implicit upwind scheme with $\frac{\tau }{h}=\frac{1}{\pi }$.

Notice that in (48) the initial function is nonsmooth and the exact solution is not given beforehand. So it is more realistic. We study the wave propagation by using the implicit upwind scheme proposed in this paper.

Taking space step $h=\frac{1}{M}$ and time step $\tau =\frac{1}{N}$ with $M={2}^{5}$ and $N=M$, we present the numerical solution at different times in Figure 13. We can see from Figure 13 that the wave propagates to left stably.

(a)(b)(c)(d)(e)(f)

Figure 13. The numerical solution at different time t. (a) t = 0.000; (b) t = 0.2188; (c) t = 0.4063; (d) t = 0.5938; (e) t = 0.7813; (f) t = 1.0000.

6. Conclusions

The upwind difference method is based on the direction of the flow and so can provide efficient simulation of wave propagation in real world. In this paper, we applied this method to solve the two-dimensional first-order hyperbolic equation with variable coefficients, constructing full-discrete explicit and implicit upwind difference schemes, respectively. We illustrated that both schemes are easy to be implemented in practice. By using the local fixed coefficient method and maximum technique, we proved the conditional stability of the explicit scheme and the unconditional stability of the implicit scheme, respectively. In addition, we derived the optimal first-order convergence of these schemes both in space and time. The efficiency of our schemes is presented theoretically as well as numerically through a few examples.

Since the method of this work is of first order both in space and time, we can consider the high-order upwind difference method for two-dimensional first-order hyperbolic equations with variable coefficients in the future, such as the compact difference method. Also, the extension of the method of this work to three-dimensional problems is also under consideration.

Acknowledgements

The authors would like to thank editors and referees for their valuable advice for the improvement of this article.

Funding

The work is supported by Shandong Provincial Natural Science Foundation, China (ZR2017MA020).

Cite this paper: Sun, Y. and Yang, Q. (2021) Numerical Analysis of Upwind Difference Schemes for Two-Dimensional First-Order Hyperbolic Equations with Variable Coefficients. Engineering, 13, 306-329. doi: 10.4236/eng.2021.136023.
References

[1]   Li, R.H., Chen, Z.Y., Wu, W., et al. (2000) Generalized Difference Methods for Differential Equations. Marcel Dekker Inc., New York.
https://doi.org/10.1201/9781482270211

[2]   Evans, L.C. (2010) Partial Differential Equations. American Mathematical Society, Providence, Rhode Island.
https://doi.org/10.1090/gsm/019

[3]   Thomas, J.W. (1997) Numerical Partial Differential Equations: Finite Difference Methods. Springer-Verlag, Berlin.

[4]   Li, R.H. and Liu, B. (2009) Numerical Solution of Differential Equation. Higher Education Press, Beijing.

[5]   Garg, N.K., Kurganov, A., Liu, Y., et al. (2021) Semi-Discrete Central-Upwind Rankine-Hugoniot Schemes for Hyperbolic Systems of Conservation Laws. Journal of Computational Physics, 428, 110078.
https://doi.org/10.1016/j.jcp.2020.110078

[6]   Zhao, Z., Zhu, J., Chen, Y.B., Qiu, J.X., et al. (2019) A New Hybrid WENO Scheme for Hyperbolic Conservation Laws. Computers and Fluids, 179, 422-436.
https://doi.org/10.1016/j.compfluid.2018.10.024

[7]   Zhao, Z., Chen, Y.B., Qiu, J.X., et al. (2020) A Hybrid Hermite WENO Scheme for Hyperbolic Conservation Laws. Journal of Computational Physics, 405, 109175.
https://doi.org/10.1016/j.jcp.2019.109175

[8]   Kurganov, A., Petrova, G., Popov, B., et al. (2007) Adaptive Semidiscrete Central-Upwind Schemes for Nonconvex Hyperbolic Conservation Laws. Siam Journal on Scientific Computing, 29, 2381-2401.
https://doi.org/10.1137/040614189

[9]   Kurganov, A. and Petrova, G. (2009) Central-Upwind Schemes for Two-Layer Shallow Water Equations. Siam Journal on Scientific Computing, 31, 1742-1773.
https://doi.org/10.1137/080719091

[10]   Schncke, G., Krais, N., Bolemann, T., Gassner, G.J., et al. (2020) Entropy Stable Discontinuous Galerkin Schemes on Moving Meshes for Hyperbolic Conservation Laws. Journal of Scientific Computing, 82, 69.
https://doi.org/10.1007/s10915-020-01171-7

[11]   Fan, X.F. (2015) High-Order Difference Schemes for the First-Order Hyperbolic Equations with Variable Coefficients. Master’s Dissertation, Southeast University, Nanjing.

[12]   Chen, L. and Ma, H.P. (2013) Dissipative Spectral Element Method for First-Order Linear Hybperbolic Equation. Communication on Applied Mathematics and Computation, 27, 491-500.

Top