Numerical Analysis of Upwind Difference Schemes for Two-Dimensional First-Order Hyperbolic Equations with Variable Coefficients ()
1. Introduction
For the domain
, let
be the boundary of
and
. For a given vector
, we divide
into the following two parts [1]:
(1)
where
is the unit outer normal vector of
. Considering the following two-dimensional first-order hyperbolic equation on
:
(2)
where
is the flow rate and
,
,
,
,
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
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
in (2) is a vector function of
, 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
and
at every node.
Taking two positive integers M and N, let the time step and space step be
, respectively. Denote
,
,
,
,
, and call
a node.
Let
,
.
Considering Equation (2a) at
, we have
(3)
For the first term on the left hand side of Equation (3), applying the forward Euler method and Taylor’s formula, we have
(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
and
. Let
,
,
and consider the following four cases.
Case 1.
.
When
, it is obtained by Taylor’s formula
(5)
and
(6)
Substituting (4)-(6) into (3), we have
(7)
where
(8)
is the local truncation error.
Omitting the truncation error and replacing the exact solution
by the numerical solution
in (7), we obtain the upwind difference scheme of (3)
(9)
Similar to Case 1, we can derive the upwind difference schemes for other cases.
Case 2.
.
When
, the difference scheme of (3) is
(10)
Case 3.
.
When
, the difference scheme of (3) is
(11)
Case 4.
.
When
, the difference scheme of (3) is
(12)
The initial condition and boundary condition (2b)-(2c) are discretized as follows
(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
and
.
Theorem 2.1. When
, the explicit upwind scheme (9)-(13) is stable with respect to the initial value
and the source term f.
Proof. No loss of generality, we assume that
. Let
,
,
.
We first consider the Case 1, in which
. Let
and rewrite (9) as
(14)
Letting
(
,
,
, p and q are integers), and substituting it into (14), we have
Thus, the growth factor is
(15)
Noticing that
, it can be obtained by calculation that
(16)
where
By Von Neumann condition, we let
, i.e.
(17)
Obviously,
holds for any
. So when
, (17) holds for any
. When
, (17) is equavalent to
. Because
we know that
. So when
(18)
(17) holds for any
.
Similarly, for Cases 2-4, the following conditions
(19)
(20)
(21)
are obtained respectively.
Summing up (18)-(21) gives that
(22)
Condition (22) is obtained by taking the variable coefficients as constants. Considering that (2) admits variable coefficients and using the definition of
and
, we write (22) as
(23)
Now we show that (23) is sufficient for the scheme (9)-(13) to be stable.
Using
and
, (9)-(12) can be rewritten as follows
(24)
(25)
(26)
(27)
From (23), we have
. Therefore, we have
(28)
for (24).
Similarly, we can obtain the following inequality
(29)
for (25)-(27). That is, we have the estimation
(30)
for Case 1-Case 4. It can be derived from (30) immediately that
(31)
So the scheme (9)-(13) is stable with respect to
and f.
The proof is completed.

Remark 2.1. It can be seen that when
and
with constants a and b, the condition (23) reduces to
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
is the solution of (2), and
is the solution of the upwind difference scheme (9)-(13). Then when the condition (23) is satisfied, there exists a constant
independent of h and
such that
Proof. Let
,
,
. We can easily obtain the error equations
(32)
where
,
are the truncation errors for Case 1-Case 4, respectively, and
.
Using the similar approach to get (31), we obtain
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
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
, 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
(33)
For the first term on the left hand side of Equation (3), applying the backward Euler method and Taylor’s formula, we have
(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)
(35)
The initial condition and boundary condition (2b)-(2c) are discretized as follows
(36)
Remark 3.1. Note that at the time level
, only two nodes in addition to
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
and the source term f.
Proof. First consider the case in which
. Let
and rewrite (35a) as
(37)
Letting
(
,
,
, p and q are integers), and substituting it into (37), we have
Thus, the growth factor is
(38)
Therefore
(39)
Since
, we easily know that
So for any
, it holds that
(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
and f. We write (35a) as follow
(41)
Assuming that
and noticing that
and
, we have
(42)
Thus, we obtain
(43)
Similarly, we can obtain (43) for (35b)-(35d).
Then, for any n,
, we get
(44)
So the scheme (35)-(36) is unconditionally stable with respect to the initial value
and the source term f.
The proof is completed.

Theorem 3.2. Suppose that
is the solution of (2), and
is the solution of the upwind difference scheme (35)-(36). Then there exists a constant
independent of h and
, such that
Proof. Let
,
,
. We can easily obtain the error equations
(45)
where
,
are the truncation errors for (35), respectively, and
.
Using the similar approach to get (43), we obtain
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
and
with no loss of generality. Thus we have both
and
.
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
and time step
which satisfy the stability condition (23) and partition the time interval
and space domain
.
2) Get initial data
and flow-in boundary data
by (13).
3) For
, suppose that
has been known or obtained beforehand. Then for
, get
explicitly by using the formula (9) according to the sign of
and
(or by other formula in (10)-(12) corresponding to other cases of the sign of
and
).
Algorithm 4.2. Algorithm for the implicit scheme (35)-(36):
1) Choose space step
and time step
and partition the time interval
and space domain
.
2) Get initial data
and flow-in boundary data
by (36).
3) For
, suppose that
has been known or obtained beforehand. For
, obtain
explicitly from
by using (35a) for
. (Similarly, if the sign of
and
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
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:
(46)
The exact solution is
.
Taking the space step
and the time step
, the explicit and implicit upwind schemes proposed in this paper are respectively used to solve problem (46). The discrete
norm is defined as
.
Firstly, we consider the explicit upwind scheme. According to the Theorem 2.1, the stability condition of the explicit upwind scheme for (46) is
. The
-error and
-error and the convergence order of the explicit upwind scheme when
and
are presented in Table 1 and Table 2, respectively. It can be seen from the results that the scheme is stable when
and the convergence rate of the scheme is first order.
![]()
Table 1. Errors and convergence order of explicit upwind scheme with
.
![]()
Table 2. Errors and convergence order of explicit upwind scheme with
.
The
-error and
-error of the explicit upwind scheme when
are presented in Table 3. It can be seen from the results that the scheme is unstable for
, which verifies that the explicit upwind scheme is conditionally stable. The plots of convergence order for the explicit upwind scheme with
and
are presented in Figure 1. Surface plots of the exact solution and the numerical solution with
are presented in Figure 2 and Figure 3.
Next, we consider the implicit upwind scheme. The
-error and
-error and the convergence order of the implicit scheme when
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
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)
; (b)
.
![]()
Figure 2. Exact solution with
.
![]()
Figure 3. Solution of explicit upwind scheme with
.
![]()
Figure 4. Convergence order of implicit scheme for Example 1.
![]()
Figure 5. Exact solution with
.
![]()
Figure 6. Solution of implicit upwind scheme with
.
![]()
Table 3. Errors of explicit upwind scheme with
.
![]()
Table 4. Errors and convergence order of implicit upwind scheme with
.
(47)
where the exact solution is
.
Taking the space step
and the time step
, 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
. The
-error and
-error and the convergence order of the explicit upwind scheme when
and
are presented in Table 5 and Table 6, respectively. It can be seen from the results that the scheme is stable when
and the convergence rate of the scheme is first order. The
-error and
-error of the explicit upwind scheme when
are presented in Table 7. It can be seen from the results that the scheme is unstable for
, which verifies that the explicit
upwind scheme is conditionally stable. The plots of convergence order of the explicit scheme with
and
are displayed in Figure 7. Surface plots of the exact solution and the numerical solution with
are presented in Figure 8 and Figure 9.
![]()
Table 5. Errors and convergence order of explicit upwind scheme with
.
(a)
(b)
Figure 7. Convergence order of explicit scheme for Example 2. (a)
; (b)
.
![]()
Figure 8. Exact solution with
.
![]()
Figure 9. Solution of explicit upwind scheme with
.
![]()
Table 6. Errors and convergence order of explicit upwind scheme with
.
![]()
Table 7. Errors of explicit upwind scheme with
.
Next, we consider the implicit upwind scheme. The
-error and
-error and the convergence order of the implicit upwind scheme when
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
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
.
![]()
Figure 12. Solution of implicit upwind scheme with
.
![]()
(48)
Table 8. Errors and convergence order of implicit upwind scheme with
.
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
and time step
with
and
, we present the numerical solution at different times in Figure 13. We can see from Figure 13 that the wave propagates to left stably.
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).