Stability Analysis 2023
Stability Analysis 2023
Research Article
Open Access. © 2024 the author(s), published by De Gruyter. This work is licensed under the Creative Commons Attribution 4.0 International License.
2 Appanah Rao Appadu and Hagos Hailu Gidey
[16] worked on the remainder analysis approach of finite of k and check if ∣ξ ∣ ≤ 1 for stability. We then increase k
difference methods. The relative phase error is a measure of gradually until ∣ξ ∣ ≤ 1 no longer holds. In the second
the dispersive character of a numerical method [17]. The approach, we use the technique of Hindmarsh et al.
relative phase error is a ratio that measures the velocity [25]. We fix Δx , Δy ,D 1 , D 2 to obtain the amplification factor
of the computed waves to that of the physical waves [17]. ξ in terms of k , xi , yj . Then, we obtain 3D plots of ∣ξ ∣ vs
Appadu [18] used the LW, Crank–Nicolson, and x ∈ [0, 1] vs y ∈ [0, 1] and obtain range of values of k for
a nonstandard finite difference scheme to solve a one- which ∣ξ ∣ ≤ 1 .
dimensional advection–diffusion equation with constant This article is organised as follows. We describe the two
coefficients. Two optimisation techniques based on mini- numerical experiments in Section 2. In Section 3, we derive
misation of dispersion error were implemented to find the the three methods, namely Lax–Wendroff, Du-Fort–Frankel
optimal value of the time step size when the spatial step and nonstandard finite difference method (NSFD) methods
size is chosen as h = 0.02 , and this is validated using some to solve Problem 1. Section 4 is devoted to derivation and
numerical experiments. Appadu et al. [8] used three numer- study of stability of the methods to solve Problem 2. Sections
ical methods to solve two problems described by advec- 5 and 6 provide the numerical results from Problems 1 and 2,
tion–diffusion equations with specified initial and boundary respectively. Section 7 highlights the salient features of this
conditions. Two test problems were considered. The first test article.
problem considered has steep boundary layers near x = 1 ,
and this is a challenging problem as many schemes are
plagued by non-physical oscillation near steep boundaries.
The regions of stability of forward-time central space 2 Numerical experiments
(FTCS) and LW schemes discretising the 1D advection–dif-
fusion equation given by [19]: We solve the 2D nonconstant coefficient advection–diffu-
∂C ∂C ∂2 C sion equation given by:
+a = α 2, (1)
∂t ∂x ∂x ∂C ∂ ∂ ⎛ ∂2 C ⎞ ⎛⎜ ∂2C ⎞⎟
c2 1 1 − c2 α Δt + (uC ) + (vC ) = D 1 + D
⎜
2
⎟
, (2)
are 2 ≤ s ≤ 2 and 0 < s ≤ 2 , respectively, where s = Δx 2 ∂t ∂x ∂y ⎝ ∂x 2 ⎠ ⎝ ∂y 2 ⎠
a Δt
and c = Δx . We note that a is the coefficient of advection
where D 1 and D 2 are the constants and u and v are the
and α is the coefficient of diffusion.
nonconstants.
Hutomo et al. [20] used Du-Fort–Frankel scheme in
order to solve some nonconstant coefficient advection–
diffusion equations on regular and irregular grids. They
considered five numerical experiments, out of which 2.1 Problem 1 [20]
only one of them has exact solution. However, no detailed
proof of the stability of the Du-Fort–Frankel is given. We solve Eq. (2), where
In this work, we derive three methods to solve two
problems described by nonconstant coefficient advection– ⎛ α⎞
u (x ) = D 1 β −
⎜ + pe −βx ,
⎟ (3)
diffusion equation. Exact solution is known for only one ⎝ 2β ⎠
of the problems considered. Obtaining the stability of
⎛ α⎞
numerical methods for advection–diffusion equation is v ( y ) = D 2γ −
⎜ + qe −γy ,
⎟ (4)
⎝ 2γ ⎠
not straightforward and there were several attempts in
the past by various authors and some of the previously with the following parameters:
published studies [15,21–25]. Complication arises for non-
α = − 0.029, β = 0.5, γ = 0.5, p = 0.05, q = 0.05,
constant coefficient advection–diffusion equations. In this
current work, the amplification factor is a function of xi , D 1 = 0.004, and D 2 = 0.004.
yj , ωx , ω y , Δx , Δy , k , ui , j , and vi , j and the constants D 1 and The exact solution is given by [20]:
D 2 . Two approaches are used in order to obtain the range
of values of for stability. In the first approach, we fix C (x , y , t ) = e αt + βx + γy , (5)
D 1 , D 2 , Δx , Δy and select some values of xi ∈ [0, 1] and and the boundary conditions are deduced from exact solu-
yj ∈ [0, 1]. We then obtain 3D plots of the modulus of tion. Dirichlet boundary conditions are used at the bound-
amplification factor ξ vs ωx ∈ [− π , π ] vs ω y ∈ [− π , π ] at aries. The domains are x , y ∈ [0, 1] and t ∈ (0, T ]. We
some selected value of k , starting with a very small value choose the spatial step sizes in the x and y directions as
Nonconstant coefficient advection–diffusion equations 3
Δx = Δy = 0.05. For the domain selected, the range of both where ϕ and are the temporal and spatial weighting factors.
1−u
u and v is 0.06 to 0.08, and this can be easily obtained using To obtain the LW scheme, we use ϕ = 0 and χ = 2 . Thus,
any suitable numerical software such as Maple. We have the LW scheme when used to discretise Eq. (6) is [6,26]
decided to obtain profiles at short and longer time propa-
Cin + 1 − Cin n n
⎡ Ci − Ci − 1 Cin+ 1 − Cin− 1 ⎤
gation, and this is why we chose T as 1.0 and 5.0. + u⎢c + (1 − c )
k ⎣ Δx 2Δx ⎥⎦
Cin+ 1 − 2Cin + Cin− 1
2.2 Problem 2 [20] −D = 0,
(Δx )2
uk
In this numerical experiment, we solve Eq. (2) where the where c = Δx .
nonconstant coefficient advection terms are given by: Suppose we have a 1D nonconstant coefficient advec-
u(x , y ) = 0.01 + 0.005x − 0.005y , tion–diffusion equation of the form:
v(x , y ) = − 0.01 − 0.005x + 0.005y , ∂C ∂ ∂2 C
+ (uC ) − D 2 = 0,
with domain x , y ∈ [0, 1] and the constants ∂t ∂x ∂x
D 1 = D 2 = 0.0004 . The initial condition is given by: where u = u(x ) and D is a constant. This equation can be
⎧ 10, if x = 0.5, y = 0.5 written as:
C (x , y , t = 0) = ⎨
⎩ 1, otherwise . ∂C ∂C ∂u ∂2 C
+u + C − D 2 = 0. (7)
The boundary conditions are as follows: ∂t ∂x ∂x ∂x
C (x = 0, y , t ) = C (x = 1, y , t ) = 1, When Eq. (7) is discretised using the LW scheme, the fol-
C (x , y = 0, t ) = C (x , y = 1, t ) = 1. lowing discretisations are used:
There is no exact solution for this problem. We display the ∂C Cin + 1 − Cin
results at times T = 1 and T = 5 using Δx = Δy = 0.05. ≈ ,
∂t k
n n
∂C Ci − Ci − 1 Cin+ 1 − Cin− 1
≈ ci + (1 − ci ) ,
∂x Δx 2Δx
3 Derivation and stability analysis ∂2C Cin+ 1 − 2Cin + Cin− 1
≈ ,
of the three methods for ∂x 2 (Δx )2
Problem 1 where ci =
u ik
Δx
. This gives the following scheme:
k ⎢⎣ ⎝ Δx ⎠ ⎝ 2Δx ⎠⎦⎥
(8)
n n n
We first obtain the family of explicit and implicit schemes
∂u ⎛ Ci + 1 − 2Ci + Ci − 1 ⎞
+ Cin −D ⎜ ⎟
= 0.
in order to discretise the constant coefficient advection– ∂x i ⎝ (Δx )2 ⎠
diffusion equation [18]: Eq. (2) can be rewritten as follows:
∂C ∂C ∂2 C
+u − D 2 = 0. (6) ∂C ∂u ∂C ∂v ∂C
∂t ∂x ∂x + C+u + C+v
∂t ∂x ∂x ∂y ∂y
The family of methods is given by: (9)
⎛ ∂2 C ⎞ ⎛ ∂2 C ⎞
Cin + 1 − Cin = D1 ⎜
2
+ D 2⎜ 2 ⎟ .
⎟
⎝ ∂x ⎠ ⎝ ∂y ⎠
k
⎧1 − ϕ⎡ Cin − Cin− 1 Cin+ 1 − Cin− 1 ⎤ The following approximations are used when Eq. (9) is
+ u⎨ ( 1 − χ ) + χ discretised using LW scheme:
⎩ Δx ⎢⎣ Δx 2Δx ⎥⎦
ϕ⎡ Cin + 1 − Cin−+1 1 Cin++1 1 − Cin−+1 1 ⎤⎫
+ (1 − χ ) +χ
Δx ⎢⎣ Δx 2Δx ⎥⎦⎬⎭
⎡1 − ϕ n
− D⎢ (C − 2Cin + Cin− 1)
⎣ (Δx )2 i + 1
ϕ ⎤
+ (C n + 1 − 2Cin + 1 + Cin−+1 1)⎥ = 0,
(Δx )2 i + 1 ⎦
4 Appanah Rao Appadu and Hagos Hailu Gidey
n+1 n
∂C Ci , j − Ci , j The LW scheme when used to solve Problem 1 is given by:
≈ ,
∂t k Cin, j+ 1 − Cin, j
∂C
n n
k Ci , j − Ci − 1, j + p( − β )e −βxiCin, j + q( − γ)e −γyjCin, j
≈ ui , j k
∂x Δx Δx n n
⎡ k Ci , j − Ci − 1, j ⎛
n n
n n
k ⎞ Ci + 1, j − Ci − 1, j ⎤
⎛ k ⎞ Ci + 1, j − Ci − 1, j + ui⎢ui + 1 − ui ⎥⎦
+ 1 − ui , j , ⎣ Δx Δx ⎝ Δx ⎠ 2Δx
⎝ Δx ⎠ 2Δx (10)
n n n n
n n n ⎡ k Ci , j − Ci , j − 1 ⎛ k ⎞ Ci , j + 1 − Ci , j − 1 ⎤
∂2C Ci + 1, j − 2Ci , j + Ci − 1, j + vj ⎢vj + 1 − vj ⎜ ⎟
≈ , ⎣ Δx Δy ⎝ Δy ⎠ 2Δy ⎥⎦
∂x 2 (Δx )2
n n Cin+ 1, j − 2Cin, j + Cin− 1, j Cin, j + 1 − 2Cin, j + Cin, j − 1
∂C k Ci , j − Ci , j − 1 = D1 + D2 ,
≈ vi , j (Δx )2 (Δy )2
∂y Δy Δy
n n
⎛ k ⎞ Ci , j + 1 − Ci , j − 1 where
+ ⎜1 − vi , j ⎟ ,
⎝ Δy ⎠ 2Δy ⎛ α⎞
n n n ui = D 1 β −
⎜ + pe −βxi ,
⎟ (11)
∂2C Ci , j + 1 − 2Ci , j + Ci , j − 1 ⎝ 2β ⎠
≈ .
∂y 2 (Δy )2
⎛ α⎞
vj = D 2γ −
⎜ + qe −γyj .
⎟ (12)
⎝ 2γ ⎠
Figure 3: 3D plots of ∣ξ∣ vs ωx ∈ [‒π , π ] vs ω y ∈ [‒π , π ] when xi = yj = 1 Figure 4: 3D plots of ∣ξ∣ vs ωx ∈ [‒π , π ] vs ω y ∈ [‒π , π ] when
and using Δx = Δy = 0.05 and k = 0.12, 0.14 , and 0.15: (a) k = 0.12 , (b) xi = yj = 0.5 and using Δx = Δy = 0.05 and k = 0.001, 0.01 , and 0.1: (a)
k = 0.14 , and (c) k = 0.15 (showing unstability). k = 0.001 , (b) k = 0.01 , and (c) k = 0.1 .
Nonconstant coefficient advection–diffusion equations 7
On rearrangement, we obtain
1
Cin, j+ 1 = {(1 − 2Bx − 2By )Cin, j− 1
1 + 2Bx + 2By
⎛ uik ⎞ ⎛ uik ⎞
+ + 2Bx Cin− 1, j + − + 2Bx Cin+ 1, j
⎝ Δx ⎠ ⎝ Δx ⎠
(16)
⎛ vjk ⎞ ⎛ vjk ⎞
+ ⎜ + 2By Cin, j − 1 + −
⎟ ⎜+ 2By Cin, j + 1 ⎟
⎝ Δy ⎠ ⎝ Δy ⎠
⎡k k n ⎤ ⎫
− ⎢ (u i + 1 − u i − 1 ) + (vj + 1 − vj − 1)⎥Cin, j ⎬,
⎣ Δx Δy ⎦ ⎭
kD kD
where Bx = (Δx )12 and By = (Δy)22 .
The amplification factor ξ satisfies the following equation:
1 ⎧
ξ= ⎨(1 − 2Bx − 2By )ξ −1
1 + 2Bx + 2By ⎩
⎛ uik ⎞ ⎛ uik ⎞
+ + 2Bx e −Iωx + − + 2Bx e Iωx
⎝ Δx ⎠ ⎝ Δx ⎠
(17)
⎛ vjk ⎞ ⎛ vjk ⎞
+ ⎜ + 2By ⎟e −Iω y + ⎜− + 2By ⎟e Iω y
⎝ Δy ⎠ ⎝ Δy ⎠
⎡k k ⎤⎫
− ⎢ (u i + 1 − u i − 1 ) + (vj + 1 − vj − 1)⎥⎬.
⎣ Δx Δy ⎦⎭
0.001 Yes
0.01 Yes
0.1 Yes
0.16 Yes
0.17 No
0.18 No Figure 6: Plots of the modulus of amplification factors vs ωx vs ω y when
Δx = Δy = 0.05 and k = 0.01 : (a) ∣ξ1∣ vs ωx vs ω y and (b) ∣ξ2∣ vs ωx vs ω y .
Nonconstant coefficient advection–diffusion equations 9
n+1 n
∂C Ci , j − Ci , j (21) is used. There is no need to obtain the stability of NSFD
≈ , using von Neumann stability analysis. We can just check if
∂t ϕ (k )
n n the conditions for which NSFD replicates positivity of the
∂C Ci , j − Ci − 1, j
≈ , continuous model.
∂x ψ(Δx )
n n n
∂2C Ci + 1, j − 2Ci , j + Ci − 1, j
≈ ,
∂x 2 (ψ(Δx ))2
n n
∂C Ci , j − Ci , j − 1
≈ ,
4 Derivation and stability analysis
∂y ψ(Δy )
n n n
of the three methods for
∂2C Ci , j + 1 − 2Ci , j + Ci , j − 1
∂y 2
≈
(ψ(Δy ))2
, Problem 2
where ψ(Δx ) = exp(Δx ) − 1 and ϕ(k ) = exp(k ) − 1 . This gives
the NSFD scheme as: 4.1 LW scheme
2 i , j + 1 ⎝ ψ(Δx ) 2 ⎠ i − 1, j
⎛ ϕ (k ) D2 ⎞ n
+ ⎜vj + ⎟C .
⎝ ψ(Δy ) 2 ⎠ i,j− 1
n n
⎡ k Ci , j − Ci − 1, j ⎡ k 1 − e −Iωx
Cin, j+ 1 = Cin, j − 0.01kCin, j − ui , jk ⎢ui , j ξ = 1 − 0.01k − ui , jk ⎢ui , j
⎣ Δx Δx ⎣ Δx Δx
n n
k ⎞ Ci + 1, j − Ci − 1, j ⎤ ⎛ k ⎞ 2I sin(ωx ) ⎤
⎛ + 1 − ui , j
+ 1 − ui , j ⎥⎦ ⎝ Δx ⎠ 2Δx ⎦⎥
⎝ Δx ⎠ 2Δx (24)
⎡ k Cin, j − Cin, j − 1 ⎡ k 1 − e −Iω y ⎛ k ⎞ 2I sin ω y ⎤
− vi , jk ⎢vi , j + ⎜1 − vi , j ⎟
− vi , jk ⎢vi , j ⎣ Δy Δy ⎝ Δy ⎠ 2Δy ⎥⎦
⎣ Δy Δy
n n D 1k D 2k
⎛ k ⎞ Ci , j + 1 − Ci , j − 1 ⎤ + 2
(2 cos(ωx ) − 2) + (2 cos(ω y ) − 2) .
+ 1 − vi , j ⎟
⎜ (Δx ) (Δy )2
⎝ Δy ⎠ 2Δy ⎥⎦
D 1k To find range of values of k when Δx = Δy = 0.05, we
+ (C n − 2Cin, j + Cin− 1, j ) use the approach of Hindmarsh et al. [25].
(Δx )2 i + 1, j
Case 1
D 2k n
+ (C − 2Cin, j + Cin, j − 1) . We fix ωx = π and ω y = π . We substitute ui , j and vi , j in
(Δy )2 i , j + 1
terms of xi and yj and replace Δx and Δy by 0.05 in Eq. (24)
The amplification factor is given by: to obtain
ξ = 1 − 1.29k − 1,600 k 2(0.01 + 0.005xi − 0.005yj )2 .
+ 0.02k 2ωy2 ( − xi + yj ) + 0.1kω y (xi − yj ) Solving for ∣ξ ∣ ≤ 1 with k > 0, we obtain 0 < k ≤ 200.
Hence, the intersection of the two inequalities gives
− 0.005k 2ωx2(xi2 + yj2 ) + 0.01xiyj k 2(ωx2 + ωy2 )
the region of the stability as 0 < k ≤ 1.16.
+ 0.2Ik ( − ωx + ω y ) + 0.1kωx ( − xi + yj )
− 0.005k 2ωy2 (xi2 + yj2 ) − 0.16k (ωx2 + ωy2 ) . 4.2 Du-Fort–Frankel method
This gives
The scheme is given by:
Figure 12: Plot of numerical solution vs x vs y using Du-Fort–Frankel at Figure 13: Plot of numerical solution vs x vs y using NSFD at times T = 1
time T = 5 using Δx = Δy = 0.05 some values of k : (a) k = 0.01 and and T = 5 using Δx = Δy = 0.05 and k = 1.249 × 10‒3 : (a) T = 1 and
(b) k = 0.001 . (b) T = 5 .
Nonconstant coefficient advection–diffusion equations 13
4 i + 1, j 4 i , j + 1 ⎝ ψ(Δx ) 4 ⎠ i − 1, j
⎛ ϕ (k ) D2 ⎞ n 5 Numerical results for Problem 1
+ ⎜vi , j + ⎟C ,
⎝ ψ(Δy ) 4 ⎠ i,j− 1
where D 1 = D 2 = 0.0004 . We fix Δx = Δy = 0.05, and this We choose to display results at times, say T = 1 and T = 5.
We fix Δx = Δy = 0.05 and run experiment with k = 0.01
gives k = ln(1 + 0.25 × 0.052) ≃ 6.25 × 10−4 .
and k = 0.001 for both LW and Du-Fort–Frankel methods,
Using these values, the coefficient of Cin, j is 0.9992, coef-
whereas the time step for the NSFD is fixed at k =
ficient of Cin− 1, j is
ln(1 + 0.5(0.052)) ≃ 1.249 × 10−3 . We obtain reasonable
3.2190 × 10−4 + 6.0951 × 10−5xi − 6.0951 × 10−5yj , results as shown in Figures 9–19. From those results
and the coefficient of Cin, j − 1 is 7.8099 × 10−5 − 6.0951 × obtained, it is observed that the LW method gives best
10−5xi + 6.0951 × 10−5yj . We obtain the plots of coefficients approximation followed by NSFD and Du-Fort–Frankel,
of Cin− 1, j and Cin, j − 1 versus x ∈ [0, 1] versus y ∈ [0, 1] in respectively.
Figure 8, and we observe that these coefficients are all Plots of numerical profiles vs x ∈ [0, 1] vs y ∈ [0, 1] at
T = 1 and T = 5 are displayed in Figures 9–13. Plots of
Table 2: Rate of convergence in space when the three methods are used
to solve Problem 1 at time 0.1
1 10
0.9
9
0.8
8
0.7
7
0.6
0.5 6
y
0.4
5
0.3
4
0.2
3
0.1
0 2
0 0.2 0.4 0.6 0.8 1
(a) x
1 5.5
0.9 5
0.8
4.5
0.7
4
0.6
3.5
0.5
y
3
0.4
2.5
0.3
2
0.2
0.1 1.5
0 1
0 0.2 0.4 0.6 0.8 1
(b) x
1 5.5
0.9 5
0.8
4.5
0.7
4
0.6
3.5
0.5
y
3
0.4
2.5
0.3
2
0.2
0.1 1.5
0 1
0 0.2 0.4 0.6 0.8 1
(c) x
Figure 22: Contour plots of numerical solution using LW vs x vs y using Figure 23: Surface plots of numerical solution using LW vs x vs y using
Δx = Δy = 0.05 and some values of k at time T = 1 : (a) initial, (b) LW Δx = Δy = 0.05 and some values of k at time T = 5 : (a) LW using k = 0.01 ,
using k = 0.01 , and (c) LW using k = 0.1 . (b) LW using k = 0.1 , and (c) LW using k = 1 .
18 Appanah Rao Appadu and Hagos Hailu Gidey
1 1.8
0.9
1.7
0.8
1.6
0.7
1.5
0.6
0.5 1.4
y
0.4
1.3
0.3
1.2
0.2
1.1
0.1
0 1
0 0.2 0.4 0.6 0.8 1
(a) x
1 1.8
0.9
1.7
0.8
1.6
0.7
1.5
0.6
0.5 1.4
y
0.4
1.3
0.3
1.2
0.2
1.1
0.1
0 1
0 0.2 0.4 0.6 0.8 1
(b) x
1 1.7
0.9
1.6
0.8
0.7 1.5
0.6
1.4
0.5
y
1.3
0.4
0.3 1.2
0.2
1.1
0.1
0 1
0 0.2 0.4 0.6 0.8 1
(c) x
1 10
0.9
9
0.8
8
0.7
7
0.6
0.5 6
y
0.4
5
0.3
4
0.2
3
0.1
0 2
0 0.2 0.4 0.6 0.8 1
(a) x
1 5.5
0.9 5
0.8
4.5
0.7
4
0.6
3.5
0.5
y
3
0.4
2.5
0.3
2
0.2
0.1 1.5
0 1
0 0.2 0.4 0.6 0.8 1
(b) x
1 5.5
0.9 5
0.8
4.5
0.7
4
0.6
3.5
0.5
y
3
0.4
2.5
0.3
2
0.2
0.1 1.5
0 1
0 0.2 0.4 0.6 0.8 1
(c) x
Figure 27: Surface plots of numerical solution using Du-Fort–Frankel vs x
Figure 26: Surface and contour plots of numerical solution using Du- vs y using Δx = Δy = 0.05 and some values of k at time T = 5 : (a)
Fort–Frankel vs x vs y using Δx = Δy = 0.05 and some values of k at time k = 0.01 , (b) k = 0.1 , and (c) k = 1 .
T = 1 : (a) initial, (b) k = 0.01 , and (c) k = 0.1 .
20 Appanah Rao Appadu and Hagos Hailu Gidey
1 1.9
0.9 1.8
0.8
1.7
0.7
1.6
0.6
1.5
0.5
y
1.4
0.4
1.3
0.3
1.2
0.2
0.1 1.1
0 1
0 0.2 0.4 0.6 0.8 1
(a) x
1 1.9
0.9 1.8
0.8
1.7
0.7
1.6
0.6
1.5
0.5
y
1.4
0.4
1.3
0.3
1.2
0.2
0.1 1.1
0 1
0 0.2 0.4 0.6 0.8 1
(b) x
1 1.9
0.9 1.8
0.8
1.7
0.7
1.6
0.6
1.5
0.5
y
1.4
0.4
1.3
0.3
1.2
0.2
0.1 1.1
0 1
0 0.2 0.4 0.6 0.8 1
(c) x
1 10
0.9
9
0.8
8
0.7
7
0.6
0.5 6
y
0.4
5
0.3
4
0.2
3
0.1
0 2
0 0.2 0.4 0.6 0.8 1
(a) x
1 5.5
0.9 5
0.8
4.5
0.7
4
0.6
3.5
0.5
y
3
0.4
2.5
0.3
2
0.2
0.1 1.5
0 1
0 0.2 0.4 0.6 0.8 1
(b) x
1 1.8
0.9 1.7
0.8 1.6
0.7 1.5
0.6 1.4
0.5 1.3
y
0.4 1.2
0.3 1.1
0.2 1
0.1 0.9
0 0.8
0 0.2 0.4 0.6 0.8 1
(c) x
Figure 30: Contour plots of numerical solution using NSFD vs x vs y Figure 31: Plots of numerical results vs x ∈ [0, 1] vs y ∈ [0, 1] using LW
using Δx = Δy = 0.05 and k ≃ 1.249 × 10‒3 at time T = 1 and T = 5 : (a) when Δx = Δy = 0.05 at time T = 10: (a) LW when k = 0.5 , (b) LW when
initial, (b) NSFD at T = 1 , and (c) NSFD at T = 5 . k = 1 , and (c) LW when k = 2 .
22 Appanah Rao Appadu and Hagos Hailu Gidey
absolute errors and relative errors vs x vs y are depicted in 1D advection–diffusion equation is not straightforward and
Figures 14 and 19. We also show numerically based on here, complication arises as we are considering 2D noncon-
Figure 20 that LW is unstable at T = 40 when k = 0.15625, stant coefficient advection–diffusion equation. However, we
and Δx = Δy = 0.05, and this provides some validation to the have managed to obtain the range of values of k for stability
stability region obtained on page 5, subsection 3.1 (k ≤ 0.14 ). of LW and Du-Fort–Frankel schemes using von Neumann
Information about the relative errors is obtained from stability analysis coupled with other techniques. Third, in
Figures 17–19. At T = 1 , all the three schemes are efficient. the case of NSFD, since we are dealing with non-negative
Maximum relative errors using LW, NSFD, and Du-Fort–Frankel variables, we obtain the condition for which the scheme repli-
are 0.025, 0.3, and 2.5%, respectively. At T = 5, only LW and cates positivity of the solution of the continuous model and
NSFD have maximum relative error less than 5%. Maximum this is not too time-consuming to achieve. Fourth, the numer-
relative errors using LW, NSFD and Du-Fort–Frankel are ical rate of convergence of the three methods is obtained. We
0.008, 1.5, and 10, respectively, at T = 5. compare the CPU times of the three algorithms when used to
To compute numerically the rate of convergence, solve Problem 1. Moreover, we display the results of Problem
we choose time T = 0.1. For the LW scheme, we chose to 2 using the three methods and observe that some dispersive
k oscillations are present in the solutions from the Du-
work with h2
as constant. Thus, starting with k = 0.05 and
Fort–Frankel scheme.
Δx = Δy = 0.05, k is divided by 22 whenever the spatial step
Future work will involve the use of LW and NSFD
size is divided by 2. From Table 2, we deduce that the numer-
schemes to solve some real-life problems dealing with irre-
ical rate of convergence in space for the LW and Du-For-
gular grids and other coefficients of dissipation.
t–Frankel methods is two, while that for NSFD is one.
7 Conclusion
References
In this article, three finite difference schemes, LW, Du-
Fort–Frankel, and NSFD, were constructed and used to [1] Parlange JY. Water transport in soils. Annual Rev Fluid Mechanics.
solve a 2D advection–diffusion equation with nonconstant 1980;12(1):77–102.
coefficients. Two problems were considered whereby one [2] Tian ZF and Yu P. A high-order exponential scheme for solving 1D
has an exact solution. First, for the problem with exact unsteady convection-diffusion equations. J Comput Appl Math.
2011;235(8):2477–91.
solution, we deduce that the LW is the most efficient
[3] Kumar RK, Price JE, Sargent NS, and Tarin D. Binding of 125I-
scheme followed by NSFD and least performing scheme labelled concanavalin A by cells from spontaneously arising murine
is Du-Fort–Frankel. Secondly, it is known that the stability mammary carcinomas and experimentally induced metastases.
analysis of standard finite difference schemes discretising Anticancer Res. 1983;3(5):343–6.
Nonconstant coefficient advection–diffusion equations 23
[4] Szymkiewicz R. Numerical modeling in open channel hydraulics. [18] Appadu AR. Numerical solution of the 1D advection-diffusion
Vol. 83. Dordrecht: Springer Science & Business Media, 2010. equation using standard and nonstandard finite difference
[5] Sommeijer BP and Kok J. Implementation and performance of the schemes. J Appl Math. 2013;2013:734374.
time integration of a 3D transport model. Int J Numer Meth Fluids. [19] Appadu AR. Optimized composite finite difference schemes for
1995;20(3):213–31. atmospheric flow modeling. Numer Meth Partial Differ Equ.
[6] Dehghan M. Numerical solution of the three-dimensional advec- 2019;35(6):2171–92.
tion-diffusion equation. Appl Math Comput. 2004;150(1):5–19. [20] Hutomo GD, Kusuma J, Ribal A., Mahie AG, Aris N. Numerical solution
[7] Thongmoon M, McKibbin R. A comparison of some numerical of 2D advection-diffusion equation with variable coefficient using Du-
methods for the advection-diffusion equation. Res Lett Inf Math Fort–Frankel method. in: Journal of Physics : Conference Series. Vol.
Sci. 2006;10:49–62. 1180. Bristol, United Kingdom: IOP Publishing; 2019. p. 012009.
[8] Appadu AR, Djoko JK, Gidey HH. A computational study of three [21] Fromm J. The time dependent flow of an incompressible viscous
numerical methods for some advection-diffusion problems. Appl fluid. Methods Comput Phys. 1964;3:346–82.
Math Comput. 2016;272:629–47. [22] Siemieniuch J, Gladwell I. Analysis of explicit difference methods for
[9] Appadu AR, Djoko JK, Gidey HH. Performance of some finite dif- a diffusion-convection equation. Int J Numer Meth Eng.
ference methods for a 3D advection-diffusion equation. Revista de 1978;12(6):899–916.
la Real Academia de Ciencias Exactas, Físicas y Naturales. Serie A. [23] Rigal A. Stability analysis of explicit finite difference schemes for the
Matemáticas. 2018;112(4):1179–210. Navier-Stokes equations. Int J Numer Meth Eng. 1979;14(4):617–20.
[10] Takacs LL. A two-step scheme for the advection equation with [24] Clancy RM. A note on finite differencing of the advection-diffusion
minimized dissipation and dispersion errors. Monthly Weather Rev. equation. Monthly Weather Review. 1981;109(8):1807–9.
1985;113(6):1050–65. [25] Hindmarsh AC, Gresho PM, Griffiths DF. The stability of explicit
[11] Courant R, Friedrichs K, Lewy H. Über die partiellen euler time-integration for certain finite difference approximations
Differenzengleichungen der mathematischen Physik. Math of the multi-dimensional advection-diffusion equation. Int J Numer
Annalen. 1928;100(1):32–74. Meth Fluids. 1984;4(9):853–97.
[12] Von Neumann J, Richtmyer RD. A method for the numerical cal- [26] Lax PD. Difference schemes with high-order of accuracy for solving
culation of hydrodynamic shocks. J Appl Phys. 1950;21(3):232–7. hyperbolic equations. Commun Pure Appl Math. 1964;17:381.
[13] Kreiss H-O. Stability theory for difference approximations of mixed [27] Smith R, Tang Y. Optimal and near-optimal advection-diffusion
initial boundary value problems. I. Math Comput. finite-difference schemes. V. Error propagation. Proc R Soc London
1968;22(104):703–14. Ser A Math Phys Eng Sci. 2001;457(2008):803–16.
[14] Winnicki I, Jasinski J, Pietrek S. New approach to the Lax–Wendroff [28] Du Fort EC, Frankel SP. Stability conditions in the numerical treat-
modified differential equation for linear and nonlinear advection. ment of parabolic differential equations. Math. Comp.
Numer Meth Partial Differ Equ. 2019;35(6):2275–304. 1953;17:35–152. doi: 10.1090/S0025-5718-1953-0059077-7
[15] Hirt CW. Heuristic stability theory for finite-difference equations. [29] Kojouharov HV, Cheni BM. Nonstandard methods for advection-
J Comput Phys. 1968;2(4):339–55. diffusion-reaction. Applications of Nonstandard Finite Difference
[16] Ru-xun L, Zhao-hui Z. The remainder-effect analysis of finite dif- Schemes. Singapore: World Scientific; 2000. p. 55.
ference schemes and the applications. Appl Math Mechanics. [30] Mickens RE, Washington TM. A note on a positivity preserving
1995;16:87–96. nonstandard finite difference scheme for a modified parabolic
[17] Morton KW, Mayers DF. Numerical solution of partial differential reaction-advection-diffusion PDE. J Differ Equ Appl.
equations. Cambridge: Cambridge University Press; 1994. 2020;26(11–12):1423–7.