Next Article in Journal
Enhancing Model-Based Anticipatory Traffic Signal Control with Metamodeling and Adaptive Optimization
Next Article in Special Issue
Significance of the Coriolis Force on the Dynamics of Carreau–Yasuda Rotating Nanofluid Subject to Darcy–Forchheimer and Gyrotactic Microorganisms
Previous Article in Journal
Hygrothermal Buckling of Smart Graphene/Piezoelectric Nanocomposite Circular Plates on an Elastic Substrate via DQM
Previous Article in Special Issue
A High–Order WENO Scheme Based on Different Numerical Fluxes for the Savage–Hutter Equations
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Enhanced Unconditionally Positive Finite Difference Method for Advection–Diffusion–Reaction Equations

by
Ndivhuwo Ndou
*,
Phumlani Dlamini
and
Byron Alexander Jacobs
Department of Mathematics and Applied Mathematics, University of Johannesburg, Auckland Park, Johannesburg 2006, South Africa
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(15), 2639; https://doi.org/10.3390/math10152639
Submission received: 26 May 2022 / Revised: 10 July 2022 / Accepted: 11 July 2022 / Published: 27 July 2022
(This article belongs to the Special Issue Numerical Methods for Computational Fluid Dynamics)

Abstract

:
In this study, we develop the enhanced unconditionally positive finite difference method (EUPFD), and use it to solve linear and nonlinear advection–diffusion–reaction (ADR) equations. This method incorporates the proper orthogonal decomposition technique to the unconditionally positive finite difference method (UPFD) to reduce the degree of freedom of the ADR equations. We investigate the efficiency and effectiveness of the proposed method by checking the error, convergence rate, and computational time that the method takes to converge to the exact solution. Solutions obtained by the EUPFD were compared with the exact solutions for validation purposes. The agreement between the solutions means the proposed method effectively solved the ADR equations. The numerical results show that the proposed method greatly improves computational efficiency without a significant loss in accuracy for solving linear and nonlinear ADR equations.

1. Introduction

Many problems in science and engineering are modeled by partial differential equations that are often difficult to solve for an exact solution and, in some cases, impossible. Numerical methods are a good alternative in providing approximate solutions close to the exact solution. As a result, several accurate numerical methods, such as the Crank–Nicolson [1], finite element [2], finite volume [3], spectral [4], and nonstandard finite difference [5,6] methods were developed. Developing better numerical methods continues to stimulate much interest among researchers. Motivated by the continued need for better-performing numerical methods, in this work, we propose a novel hybrid method that is based on combining elements of the unconditionally positive finite difference method (UPFD) and the proper orthogonal decomposition method (POD), called the enhanced unconditionally positive finite difference method (EUPFD).
The UPFD was developed by Chen-Charpentier and Kojouharov [7] for the advection–diffusion–reaction equation (ADR), and has since been used by several other researchers [8,9,10]. It is a finite difference-based method that guarantees the positivity of solutions independent of time step and mesh size. Numerical schemes that preserve the positivity of solutions are important in physical applications. To have significant meaning, quantities such as chemical species concentration, population sizes, and neutron numbers require positive solutions. On the other hand, the POD is a powerful technique widely used in statistics and image processing [11,12] to reduce a large number of interdependent variables to a much smaller number of uncorrelated variables while retaining as much possible of the variation in the original variables. By utilizing the POD, the EUPFD involves the extraction of a set of basis functions from the UPFD solution called the snapshot matrix; then, it uses a small subset of leading basis functions to construct state variable approximations. One of the most persistent challenges faced by several numerical methods when solving PDEs is that they require many grid points and numerous iterations to converge to the exact solution. That significantly affects their efficiency in terms of computational speed and memory requirement. The POD has been used to reduce the dimensions of numerical methods, such as the Crank–Nicolson method [13,14,15,16,17,18]. The POD is useful when it is impossible to perform numerical simulations due to large-scale computing requirements.
The POD modes are updated until the EUPFD satisfies the theoretical accuracy requirements. Luo and Sun [19] combined the POD with the finite volume, the finite element, and the finite difference methods to solve Navier–Stokes, Sobolev, Burger’s, and hyperbolic equations. In this work, we extend the POD coupling by hybridising it with the UPFD to obtain a novel numerical method that exhibits higher accuracy with less computing time, fewer degrees of freedom in numerical computations, and reduced truncation error, ensuring the positivity of the solutions.
We test the applicability of the EUPFD on the nonlinear ADR equations given below:
u t + U a u x D 2 u x 2 = f ( t , x , u ) , ( x , t ) [ a , b ] × [ 0 , T ] t > 0 . x Ω u ( 0 , x ) = u 0 ( x ) 0 , u ( a , t ) = u a ( t ) u ( b , t ) = u b ( t ) .
where U a is the advection coefficient, D is the diffusion coefficient, u t ( t , x ) is the rate at which the concentration of substances changes over time, u x ( t , x ) is the advection term, u x x ( t , x ) is the diffusion term, and f ( t , x , u ) is the reaction term or the source [20]. The ADR equation governs the process of advection and diffusion simultaneously. It is used to model exponential travelling waves, absorption of pollutants in soil, semiconductors, modelling of biological systems, and diffusion of neutrons [21,22,23,24]. Among other numerical methods, the UPFD method has been used to solve ADR equations, is stable, accurate, and consistent in rectangular domains, and it guarantees the positivity of the solution that is independent of the step sizes [25]. The Rosenbrock scheme is another interesting approach that preserves solution accuracy and is mostly used to solve stiff ODEs problems. Al’shin, Al’shina, Kalitkin, and Koryagina [26] proposed the complex Rosenbrock schemes for the numerical integration of differential algebraic systems by the ε -embedding method. The method converges quadratically, and the scheme applies even to superstiff systems. The method enables computations to be performed with guaranteed accuracy. However, as always, numerical methods need to be refined and improved to converge faster to the exact solution.
The rest of the paper is organised as follows. In Section 2, we present the UPFD method, and illustrate how it is used to solve linear and nonlinear ADR equations. We also provide the stability and consistency analysis of the UPFD scheme. In Section 3, we formulate the POD basis to optimise the UPFD scheme and this results in the EUPFD method. In Section 4, numerical results are presented to illustrate the efficiency and effectiveness of the EUPFD method to solve the discussed problems. Section 5 provides the conclusion of the study.

2. Unconditionally Positive Finite Difference Method

In this section, we present details of the unconditionally positive finite difference method (UPFD), and illustrate how it is utilized to solve linear and nonlinear ADR equations.
The discretization of the linear and nonlinear ADR equation is obtained by using the derivative schemes given below to obtain the UPFD schemes [7],
u x u i n u i 1 n + 1 Δ x
u x u i n + 1 u i 1 n Δ x
u t u i n + 1 u i n Δ t ,
2 u x 2 u i + 1 n 2 u i n + 1 u i 1 n ( Δ x ) 2 .
where the spatial step size Δ x = b a m 1 , and the grid points are given as x i = a + Δ x ( i 1 ) , 1 i m . Time step size Δ t = T N 1 with the corresponding grid points are given as t n = Δ t ( n 1 ) , 1 n N .
When approximating the first and second space derivatives, the terms in the finite difference schemes are evaluated at different time levels n and n + 1 . This is required to preserve the positivity of the solution. Equation (2) is used when the coefficient of the first space derivative is negative, while Equation (3) is used when the derivative is positive. On the other hand, Equation (5) is used whether the coefficient of the second space derivative is positive or negative.

2.1. Linear Advection–Diffusion–Reaction Equation

In this section, we set f ( t , x , u ) = u , U a = 1 , and D = 1 in Equation (1) to obtain the equation given below.
u t + u x = 2 u x 2 u ,
subject to the following initial and boundary conditions:
u ( x , 0 ) = e x 0 x 6 , u ( 0 , t ) = e t 0 t T , u x ( 6 , t ) = u ( 6 , t ) ,
with the exact solution given by u ( x , t ) = e ( t x ) [7].
Since the coefficient of u x in Equation (6) is positive, we used Equation (3) to find the UPFD scheme. Therefore, the UPFD discretization of Equation (6) is given by
u i n + 1 u i n Δ t + u i n + 1 u i 1 n Δ x = u i + 1 n 2 u i n + 1 + u i 1 n ( Δ x ) 2 u i n + 1 .
Equation (8) can be written as
u i n + 1 = u i n + ( λ + β ) u i 1 n + β u i 1 n 1 + Δ t + λ + 2 β .
where λ = Δ t Δ x and β = Δ t ( Δ x ) 2 .

2.1.1. Stability

To obtain the region of stability of the UPFD scheme, we used the Fourier series analysis of the form u i n = ξ n e j Δ t i Δ x on Equation (9). The amplification factor is then given by
ξ = 1 + ( λ + 2 β ) cos ω 1 + Δ t + λ + 2 β I λ sin ω 1 + Δ t + λ + 2 β
where ω is the phase angle, ω = θ Δ x where θ is the wave number, and Δ t is the spatial step size, and ξ = ξ n + 1 ξ n .
By using the ξ 2 1 in (10), where ξ = ( ( ξ ) ) 2 + ( ( ξ ) ) 2 , the following is obtained.
ξ = 1 + ( λ + 2 β ) cos ω 1 + Δ t + λ + 2 β 2 + λ sin ω 1 + Δ t + λ + 2 β 2
The UPFD method presented here guarantees the positivity of the solutions independent of the time step and mesh size. The UPFD method works with terms that are the sum of a positive and negative function of the unknown, and one or both may be zero. The scheme is positive definite for all values of Δ t , Δ x > 0 , hence, the scheme is unconditionally stable for all Δ x , Δ t > 0 .

2.1.2. Consistency

In this section, we investigate the consistency of Equation (6). We use the Taylor expansion to approximate the u i n + 1 , u i + 1 n , u i 1 n , thus
u i n + 1 u i n + Δ t u t + ( Δ t ) 2 2 2 u t 2 + ( Δ t ) 3 6 3 u t 3 + u i 1 n u i n Δ x u x + ( Δ x ) 2 2 2 u x 2 ( Δ x ) 3 6 3 u x 3 + u i + 1 n u i n + Δ x u x + ( Δ x ) 2 2 2 u x 2 + ( Δ x ) 3 6 3 u x 3 +
The UPFD scheme terms are approximated by using Equation (12), which are then substituted into Equation (8) to obtain the truncation error for the UPFD method. After simplification, we obtain the following.
u t + u x = 2 u x 2 u Δ t + Δ t Δ x + 2 Δ t ( Δ x ) 2 2 u t 2 Δ t 2 + ( Δ t ) 2 2 + ( Δ t ) 2 2 ( Δ x ) + ( Δ t ) 2 ( Δ x ) 2 2 u t 2 ( Δ t ) 2 6 + ( Δ t ) 3 6 + ( Δ t ) 3 6 ( Δ x ) + ( Δ t ) 3 3 ( Δ x ) 2 3 u t 3 + Δ x 2 2 u x 2 ( Δ x ) 2 6 3 u x 3 +
The above scheme is not consistent when Δ t 0 , Δ x 0 ; as a result, Δ t = ( Δ x ) 3 to obtain the following equation.
u t + u x = 2 u x 2 u ( Δ x ) 3 + ( Δ x ) 2 + 2 ( Δ x ) 2 u t 2 ( Δ x ) 3 2 1 + ( Δ x ) 2 + 2 Δ x + ( Δ x ) 3 2 u t 2 ( Δ x ) 6 6 1 + ( Δ x ) 2 + 2 Δ x + ( Δ x ) 3 3 u t 3 + Δ x 2 2 u x 2 ( Δ x ) 2 6 3 x 3 +
when Δ x 0 , Δ t 0 , Equation (14) reduces to Equation (6); hence, the UPFD scheme is consistent when Δ t = ( Δ x ) 3 .

2.2. Nonlinear Advection–Diffusion–Reaction Equation

In this section, we set f ( t , x , u ) = r u ( 1 u ) , and U a = 0 in Equation (1) to obtain the nonlinear reaction diffusion equation given below.
u t D 2 u x 2 = r u ( 1 u ) ( x , t ) [ 0 , 1 ] × [ 0 , T ]
with initial and boundary conditions given by
u ( x , 0 ) = 0.7 e σ ( x x 0 ) 2 , | x x 0 | 0.06 0 , otherwise
u ( 0 , t ) = 0 , 0 t T u ( 1 , t ) = 0 ,
where σ = 80 , x 0 = 0.5 [7].
With the exact solution given as
u ( t , x ) = 1 1 + 1 u ( x , 0 ) u ( x , 0 ) exp 1 6 D 6 D r x exp 5 6 r t + 1 6 D 6 D r x 2
where D = 0.0002 , r = 0.05 .
The discretization of the nonlinear ADR Equation (15) using Equation (5) is given below.
u i n + 1 = ( 1 + r Δ t ) u i n + λ ( u i + 1 n u i n ) 1 + 2 λ + r Δ t u i n .
where λ = D Δ t ( Δ x ) 2 .

2.2.1. Stability

By applying Fourier series analyses of the form u i , n = ξ n e j Δ t i Δ x , and freezing coefficient technique [27] to Equation (18), we obtain the following amplification factor.
ξ = 1 + Δ t r + 2 λ cos ω 1 + 2 λ + r Δ t u max
where by the freezing coefficient technique, u 2 is replace by u u m a x , and u is frozen to a constant u m a x , which represents the maximum value of the solution u.
The scheme is unconditionally stable for all Δ x , Δ t > 0 .

2.2.2. Consistency

Through the consistency of the UPFD scheme [25] by the Taylor expansion to Equation (18), we obtain the following.
u t D 2 u x 2 = r u ( 1 u ) Δ t 2 2 u x 2 ( Δ x ) 3 r u + 2 Δ x D u t ( Δ x ) 3 2 1 + 2 Δ x D + r ( Δ x ) 3 u 2 u t 2 ( Δ x ) 6 6 1 + 2 Δ x D + r ( Δ x ) 3 u 3 u t 3
As Δ x 0 and Δ t 0 , Equation (20) reduces to Equation (15); therefore, the scheme is consistent.

3. Formulation of the POD Basis

In this section, we discuss the POD basis that reduces the degree of freedom for numerical methods [28].
The POD is used to reduce the computational time accumulated in the UPFD method. The EUPFD method is built by extracting a snapshot matrix from the matrix solution of the UPFD method. The snapshot matrix is then used to construct a small subset of leading basis functions, which is an eigenvector generated by singular value decomposition (SVD), to approximate state variables ψ i . The SVD technique is used to decompose a matrix into several component matrices, exposing many of the original matrix’s useful and interesting properties [29]. The POD method seeks a low-dimensional basis that could be used to approximate the state variables well. POD basis functions are typically the left singular vectors of the matrix.
From the standard UPFD solution, denoted by u i n , where ( 1 i m ) , 0 n N , we extract the first L sequence of solutions { u i n } ( n = 1 ) L ( 1 i m , and L N ) as snapshots, yielding the formulated m × L snapshot matrix shown below.
A = u 1 1 u 1 2 · · · · · · u 1 L u 2 1 u 2 2 · · · · · · u 2 L · · · · · · · · · · · · · · · · · · · · · · · · · · · u m 1 u m 2 · · · · · · u m L
where m and L are the mesh points of the snapshot. When the snapshot is tall and skinny, the method of snapshot is an efficient alternative way to compute the POD basis. The POD modes are computed by using the method of snapshots developed by Sirovich [30].
The SVD is then used to factorise snapshot matrix A.
A = U Σ V T = U Σ l × l O l × ( L l ) O ( m 1 ) × l O ( m l ) × ( L l ) V T
where l = r a n k A , Σ l × l = d i a g ( σ 1 , σ 2 , , σ l ) is a diagonal matrix that is generated from the SVD of A as arranged from the decreasing order σ 1 σ 2 σ l > 0 , U = ( ψ 1 , ψ 2 , , ψ m ) is an m × m orthogonal matrix consisting of the eigenvectors of A A T , whereas V = ( ϕ 1 , ϕ 2 , , ϕ L ) is an L × L orthogonal matrix consisting of the orthogonal eigenvectors of A T A and O is a zero matrix [31].
The eigenvalues of A T A and A A T are identical and satisfy Λ j = σ j 2 ( j = 1 , 2 , , l ) . Therefore, we may first find the eigenvalues Λ 1 Λ 2 Λ l > 0 ( l = r a n k A ) for matrices A A T and corresponding eigenvectors ψ j . That means that the following relationship applies.
ψ j = A ϕ j / Λ j , j = 1 , 2 , , l .
Eigenvectors ϕ j ( j = 1 , 2 , , l ) that correspond to the nonzero eigenvalues for matrix A A T are obtained. Therefore,
A M = U Σ V T = U Σ M × M O M × ( L M ) O ( m M ) × M O ( m M ) × ( L M ) V T
where Σ M × M = d i a g ( σ 1 , σ 1 , , σ m ) represents the diagonal matrix that consists of the first M positive singular values of diagonal matrix Σ l × l . The 2-norm of matrix A is defined as follows: A 2 = s u p u L A u 2 / u 2 ( where u 2 is the l 2 norm for vector u).
Theorem 1.
Let ϕ = ( ψ 1 , ψ 2 , , ψ M ) consist of the first M eigenvectors U = ( ψ 1 , ψ 2 , , ψ m ) ; then, we have
A M = i = 1 M σ i ψ i ϕ i T = ϕ ϕ T A .
Proof. 
A M = i = 1 M σ i ψ i ϕ i T = ψ 1 , , ψ M σ 1 · · · · · · · 0 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 0 · · · · · · · σ M ϕ 1 T · · · · · · · · ϕ M T
A = ψ 1 , , ψ l σ 1 · · · · · · · 0 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 0 · · · · · · · σ l ϕ 1 T · · · · · · · · ϕ l T
ϕ ϕ T A = ϕ ψ 1 · · · · · · · · ϕ M T ψ 1 , , ψ l σ 1 · · · · · · · 0 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 0 · · · · · · · σ l ϕ 1 T · · · · · · · · ϕ l T
= ϕ I M O σ 1 · · · · · · · 0 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 0 · · · · · · · σ l ϕ 1 T · · · · · · · · ϕ l T
= ϕ σ 1 · · · 0 · · · 0 · · · · · · · · · · · · · · · · · · 0 · · · σ M · · · σ l ϕ 1 T · · · · · · ϕ l T
= ψ 1 , , ψ M σ 1 · · · · · · · 0 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 0 · · · · · · · σ M ϕ 1 T · · · · · · · · ϕ M T = A M
Thus, by the relationship between the matrix norm and its spectral radius, we have
min r a n k ( B ) M A B 2 , 2 = A A M 2 , 2 = A ϕ ϕ T A 2 , 2 = Λ M + 1
where ϕ = ( ϕ 1 , ϕ 2 , , ϕ M ) consist of the first M eigenvectors U = ( ψ 1 , ψ 2 , , ψ m ) .
If the L column vectors of A are denoted by u n = ( u 1 n , u 2 n , , u m n ) T ( n = 1 , 2 , , L ) we have
u n u M n 2 = ( A ϕ ϕ T A ) ξ n 2 A ϕ ϕ T A 2 , 2 ξ 2 = Λ M + 1 ,
where
u M n = j = 1 M ( ψ j , u n ) ψ j
which represents the projection of u n onto ϕ = ( ϕ 1 , ϕ , , ψ M ) ( ψ j , u n ) is the inner product of ψ j and u n , and ξ n denotes the unit vector with the nth component being 1. Inequality (33) shows that u M n is an optimal approximation u n whose error is no more than Λ M + 1 ; thus, ϕ is just an orthogonal optimal POD base of A. □

3.1. Formulation of the POD to Reduce the Order of the Finite Difference Scheme for the Advection–Diffusion–Reaction Equations

The EUPFD method is built on the basis of POD. The solution vector of the UPFD method is given by u n = ( u 1 n , u 2 n , , u m n ) T ( n = 1 , 2 , , L , L + 1 , , N ) and have a finite difference scheme, as follows:
u n + 1 = u n + Δ t Δ x 2 B u n + Δ t F n
where F n = f 1 n , f 2 n , , f m n and
B = 2 1 0 0 · · · 0 0 1 2 1 0 · · · 0 0 0 1 2 1 · · · 0 0 0 0 1 2 · · · 0 0 · · · · · · 0 0 0 0 · · · 2 1 0 0 0 0 · · · 1 2
Matrix B is a tridiagonal matrix with the following eigenvalues:
Λ j = 2 + 2 cos 2 j 1 π / 2 m + 1 , j = 1 , 2 , , m .
Taking the norm of matrix B, we obtain the following.
B 2 , 2 = | 2 2 cos [ ( 2 m 1 ) π / ( 2 m + 1 ) ] | = | 2 2 cos [ π 2 π / ( 2 m + 1 ) ] | = | 2 + 2 cos [ 2 π / ( 2 m + 1 ) ] | < 4
Replacing u n in Equation (35) with u n = ϕ ϕ T A ξ n ( n = 1 , 2 , , L ) , which is u n = ϕ α n ( n = L + 1 , L + 2 , , N ) , where α n = ϕ T A ξ n , we obtain the EUPFD scheme as follows.
u n = ϕ ϕ T A ξ n , , n = 1 , 2 , , L ϕ α n + 1 = ϕ α n + Δ t Δ x 2 B ϕ α n + Δ t F n , n = L , L + 1 , , N 1
where α n = ( α 1 n , α 2 n , , α M n ) T are vectors that are yet to be determined.
Using orthogonal vectors in ϕ T multiplied by (39), we obtain
α n = ϕ T u n , , , n = 1 , 2 , , L α n + 1 = α n + Δ t Δ x 2 ϕ T B ϕ α n + Δ t ϕ T F n , n = L , L + 1 , , N 1
We obtain the α n ( n = L , L + 1 , , N ) from Equation (40); then, we obtain the EUPFD solution as follows.
u n = ϕ α n , n = 1 , 2 , , N .
Therefore, the EUPFD solution component of Equation (6) is given as follows.
u j , k n = u i n , 0 j J , 0 k K , 1 i = k ( J + 1 ) + j + 1 m = ( K + 1 ) ( J + 1 )

3.2. Error Estimates of the EUPFD for the Advection–Diffusion–Reaction Equation

By finding the norm of Equations (39) and (40), we obtain the following.
u n u n 2 = u n u M n 2 = ( A ϕ ϕ T A ) ξ n 2 Λ M + 1
n = 1 , 2 , , L
Theorem 2
(Accuracy). The errors between solutions u i n from the UPFD scheme and solution u i n from the EUPFD scheme satisfy the following estimates:
| u i n u i n | ( 1 + δ ) n L Λ M + 1 f o r ( L + 1 n N )
where δ = Δ t Δ x 2 B 2 , 2 .
The errors between exact solution u ( x , t ) and solution u m n from the POD-reduced-order FD scheme satisfy the following estimates [31]
| u ( x i , t n ) u i n | = O ( 1 + δ ) n L Λ M + 1 , Δ t , Δ x 2 , 1 i M , 1 n N .
Proof. 
| u n u n | 2 = | u n u M n | 2 = | ( A α α T A ) ϵ n | 2 Λ M + 1 , n = 1 , 2 , , L .
Equation (39) is rewritten as follows.
u n + 1 = u n + Δ t ( Δ x ) 2 + Δ t F n , n = L , L + 1 , , N 1 .
By putting δ = Δ t | B | 2 / ( Δ x ) 2 , we obtain the following simplified equation of Equation (45).
| u n + 1 u n + 1 | 2 ( 1 + δ ) | u n u n | 2
( 1 + δ ) n + 1 L | u L u L | 2
( 1 + δ ) n + 1 L Λ M + 1 , n = L , L + 1 , , N 1 .
Remark 1.
The error terms containing Λ M + 1 are caused by the POD-based reduced-order for the classical FD scheme, which could be used to select the number of the POD basis, i.e., it is necessary to take M such that Λ M + 1 = O ( Δ t , Δ x 2 ) . Whereas E ( n ) = ( 1 + δ ) n L ( L + 1 n N ) are caused by extrapolating iterations that could be used as the guide for renewing the POD basis, i.e., if ( 1 + δ ) n L Λ M + 1 > m a x ( Δ t , Δ x 2 ) it is necessary to update the POD basis. If we take Λ M + 1 that satisfies ( 1 + δ ) n L Λ M + 1 = O ( Δ t , Δ x 2 ) , then the EUPFD scheme converges; thus, we did not have to update the POD basis [31].

3.3. Implementation of the EUPFD Scheme Algorithm for Advection–Diffusion–Reaction Equations

In order to facilitate the use of the EUPFD scheme for the linear and nonlinear ADR equation, the following implementation steps of the algorithm for the EUPFD scheme are useful [31].
Step 1: Standard UPFD computation and extraction of snapshots:
Write the standard UPFD scheme in vector form and find solution vectors u n = ( u 1 n , u 2 n , , u m n ) T ( n = 1 , 2 , , L ) at the few L steps.
Step 2: Snapshot matrix A and eigenvalues of A T A : Formulate snapshot matrix A = ( u i n ) x × L and compute eigenvalues Λ 1 , Λ 2 , , Λ l > 0 ( l = Rank A ) and eigenvectors ϕ j ( j = 1 , 2 , , M ˜ ) of matrix A T A .
Step 3: Choice of POD basis: For error tolerance μ = O ( Δ t , Δ x 2 ) , decide the numbers M M ˜ of POD basis, such that Λ u ( M + 1 ) μ , and formulate the POD bases ϕ = ( ψ 1 , ψ 2 , , ψ M ) (where ψ j = A ϕ j Λ j , j = 1 , 2 , , M ).
Step 4: Solve or compute the EUPFD model:
Solve Equation (40) and use (41) to obtain the reduced-order solution vectors of the EUPFD given in a form of u n = ( u 1 n , u 2 n , , u m n ) , further obtain the component forms u j , k n = u i n , where ( 0 j J , 0 k K , i = k ( J + 1 ) + j + 1 . 1 i m = ( K + 1 ) ( J + 1 ) ) .
Step 5: Check accuracy and renew POD basis to continue:
Set δ = Δ t B 2 , 2 ( Δ x ) 2 . If ( 1 + δ ) n L Λ u ( M + 1 ) μ , then u n = ( u 1 n , u 2 n , , u m n ) T is the solution vectors for the EUPFD scheme that satisfy the accuracy requirement. Else, if ( 1 + δ ) n L Λ u ( M + 1 ) > μ , put u 1 = u ( n L ) , u 2 = u ( n L + 1 ) , , u L = u ( n 1 ) and return to step 2.

4. Numerical Results

This section presents solutions to the linear and nonlinear ADR equations using the UPFD and EUPFD. Exact solutions are also used for comparison purposes. Convergence rates, absolute errors, and computational time were calculated to evaluate the methods’ performance. The numerical and analytical solutions are denoted by u ¯ i , n and u i , n , respectively. The error is denoted by e i , n , and its magnitude is measured by the L -norm given by the formula below.
| | e i , n | | = | | u i , n u ¯ i , n | | = M a x | u i , n u ¯ i , n |
The convergence rate is calculated by using the formula below.
q ( Δ t k ) = l o g 2 ( e k e k + 1 ) l o g 2 ( Δ t Δ t k + 1 ) or q ( Δ x k ) = l o g 2 ( e k e k + 1 ) l o g 2 ( Δ x Δ x k + 1 )
The accuracy of the EUPFD relies on the size of the snapshot, L. Therefore, finding the best snapshot size such that the accuracy is maximal is paramount. To determine the best snapshot size, we first set L = 1 and found the solution. We then produced increments of 1 on L until there was no significant change in the solution. For this, we set up a tolerance as follows.
| | u e x a c t u L | | ϵ , L = 1 , 2 , 3 ,
where u e x a c t is the exact solution, and u L is the solution at the specific value of L. The first value of L that satisfies (51) is the optimal value of L . In this work, we set ϵ to be 10 10 .

4.1. Numerical Results for the Linear Advection–Diffusion–Reaction Equation

The convergence rates of the UPFD and the EUPFD with respect to the time and spatial steps are shown in Table 1 and Table 2. The convergence rates of UPFD and EUPFD decreased with a decrease in time and spatial step sizes. Table 3 compares the exact, UPFD, and the EUPFD solutions at ( t , x ) = 0.008 , 0.05 , 0.016 , 0.1 , and 0.032 , 0.2 , as well as the computational times for the UPFD and EUPFD methods. EUPFD took less computational time to converge to the solution of the linear ADR equation compared to the UPFD.
In Table 4, we compare the infinity norms of the proposed EUPFD with the Crank–Nicolson method in solving the linear ADR equation. For this example, results show that Crank–Nicolson achieved better accuracy. However, Crank–Nicolson did not preserve the positivity of solutions, which is the main focus of this work.
Figure 1a shows the contribution of each POD basis mode. The first 12 modes contained the predominant information where the EUPFD met the theoretical accuracy requirement. The 12 modes were significant in optimizing the linear ADR equation. Figure 1b shows the decreasing error when the number of modes increased.
Figure 2a,b and Figure 3a show the surface plots of the exact, UPFD and EUPFD solutions of linear ADR. Figure 3b shows the increase in error when the POD modes increased.
Figure 4a,b show the absolute errors between the exact solution and EUPFD solution for the linear ADR against time and space, respectively.

4.2. Numerical Results for the Nonlinear Reaction Diffusion Equation

Table 5 and Table 6 show the convergence rates of the UPFD and EUPFD for the nonlinear reaction–diffusion equation with respect to time and spatial steps. In these tables, the convergence rate of the UPFD and the EUPFD decreases with the increasing time step, and increases with the increasing spatial step sizes.
Table 7 shows the comparison of the exact, UPFD, and EUPFD solutions obtained at ( t , x ) = 0.05 , 0.02 , 0.1 , 0.04 , and 0.2 , 0.08 , and the computational times taken by the UPFD and EUPFD methods. The EUPFD took less computational time to converge to the solution of the nonlinear reaction–diffusion equation than the UPFD did.
In this example, the infinity norms of the EUPFD and Crank–Nicolson errors are shown in Table 8. Results show that EUPFD was slightly more accurate than Crank–Nicolson.
Figure 5a,b and Figure 6 shows the surface plots of the exact, UPFD and EUPFD solutions of the nonlinear ADR equation. Figure 6b shows the increase in CPU time when the number with the increase in POD modes.
Figure 7a shows the contribution of each of the POD basis modes. The first 9 modes contain the predominant information where the EUPFD met the theoretical accuracy requirement. The 9 modes were significant in optimising the nonlinear ADR equation.
Figure 7b and Figure 8 shows the absolute error between the exact and EUPFD solutions for the nonlinear ADR against time and space, respectively.

5. Conclusions

In this paper, we presented a new method, the enhanced unconditionally positive finite difference (EUPFD) method. The method uses the POD in conjunction with the unconditionally positive finite difference (UPFD) scheme. We used it to investigate the solutions to the linear and nonlinear diffusion reaction equations. The POD’s goal is to find the UPFD’s low-dimensional approximated solution. Results show that the EUPFD gives a good approximation to the solutions of these problems, and this validated its efficiency and effectiveness. Another remarkable result of the EUPFD is the reduced computational time compared to that of the UPFD. Besides the reduction in computational time and solution positivity that the EUPFD guarantees, only a small number of modes containing the predominant information are required to meet the theoretical accuracy. As the POD modes increased, the error of EUPFD measured against the exact solution significantly decreased. The spatial steps were taken to be Δ x = 0.01 , 0.02 and 0.04 , while the time step was Δ t = 0.025 , 0.0125 and 0.00625 . We had δ < 1 ; thus, we next took 50 snapshots from the UPFD. By performing POD on UPFD, we achieved Λ 9 4 × 10 4 and Λ 35 4 × 10 4 for the linear and nonlinear ADR equations, respectively. As long as the first 9 and 12 POD bases were used, the theoretical accuracy requirement could be met. Since the EUPFD only used 9 and 12 POD modes from the selected 50 classical solutions of the UPFD as the snapshot, this would mean that EUPFD saves computational time, reduces degrees of freedom in numerical computations, alleviates truncation error accumulation, and it preserves the positivity of the solution. These render the EUPFD more efficient and effective in solving linear and nonlinear PDEs. However, the accuracy of the EUPFD was less than that of Crank–Nicolson when solving the linear ADR equation.

Author Contributions

Formal analysis, N.N.; investigation, N.N.; supervision, P.D. and B.A.J.; writing—original draft, N.N.; writing—review and editing, P.D. and B.A.J. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Research Foundation of South Africa under grant numbers 129119 and 127567, and the APC was funded by the University of Johannesburg.

Institutional Review Board Statement

Not Applicable.

Informed Consent Statement

Not Applicable.

Data Availability Statement

Not Applicable.

Acknowledgments

The authors wish to acknowledge the financial support from the National Research Foundation of South Africa and the University of Johannesburg.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

UPFDUnconditionally positive finite difference method
EUPFDEnhanced unconditionally positive finite difference methods
PODProper orthogonal decomposition
CPU timeComputational time
PDEsPartial differential equations
SVDSingular value decomposition
tTime variable
xSpatial variable
Δ x Change in spatial variable
Δ t Change in time variable
U a Advection coefficient
DDiffusion coefficient
u t Rate at which the concentration of substances changes over time
u x Advection term
u x x Diffusion term
ξ Amplification factor
qConvergence rate

References

  1. Crank, J.; Nicolson, P. A practical method for numerical evaluation of solutions of partial differential equations of the heat-conduction type. Math. Proc. Camb. Philos. Soc. 1947, 43, 50–67. [Google Scholar] [CrossRef]
  2. Bathe, K. Finite element method. In Wiley Encyclopedia Of Computer Science and Engineering; Wiley: Hoboken, NJ, USA, 2007; pp. 1–12. [Google Scholar]
  3. Eymard, R.; Gallouët, T.; Herbin, R. Finite volume methods. In Handbook Of Numerical Analysis; Elsevier: Amsterdam, The Netherlands, 2000; Volume 7, pp. 713–1018. [Google Scholar]
  4. Dlamini, P. On Spectral Relaxation and Compact Finite Difference Schemes for Ordinary and Partial Differential Equations; University of Johannesburg: Johannesburg, South Africa, 2015. [Google Scholar]
  5. Mickens, R. Applications of Nonstandard Finite Difference Schemes; World Scientific: Hackensack, NJ, USA, 2000. [Google Scholar]
  6. Angstmann, C.; Henry, B.; Jacobs, B.; McGann, A. Numeric solution of advection–Diffusion equations by a discrete time random walk scheme. Numer. Methods Partial. Differ. Equ. 2020, 36, 680–704. [Google Scholar] [CrossRef] [Green Version]
  7. Chen-Charpentier, B.; Kojouharov, H. An unconditionally positivity preserving scheme for advection–diffusion reaction equations. Math. Comput. Model. 2013, 57, 2177–2185. [Google Scholar] [CrossRef]
  8. Drljača, B.; Savović, S. Unconditionally positive finite difference and standard explicit finite difference schemes for power flow equation. Univ.-Thought-Publ. Nat. Sci. 2019, 9, 75–78. [Google Scholar] [CrossRef]
  9. Saleh, M.; Kovács, E.; Pszota, G. Testing and improving a non-conventional unconditionally positive finite difference method. Multidiszcip. Tudomanyok 2020, 10, 206–213. [Google Scholar] [CrossRef]
  10. Appadu, A. Analysis of the unconditionally positive finite difference scheme for advection-diffusion-reaction equations with different regimes. Aip Conf. Proc. 2016, 1738, 030005. [Google Scholar]
  11. Towne, A.; Schmidt, O.; Colonius, T. Spectral proper orthogonal decomposition and its relationship to dynamic mode decomposition and resolvent analysis. J. Fluid Mech. 2018, 847, 821–867. [Google Scholar] [CrossRef] [Green Version]
  12. Wu, G.; Liang, Y.; Lin, W.; Lee, H.; Lim, S. A note on equivalence of proper orthogonal decomposition methods. J. Sound Vib. 2003, 265, 1103–1110. [Google Scholar] [CrossRef]
  13. Luo, Z.; Teng, F.; Xia, H. A reduced-order extrapolated Crank–Nicolson finite spectral element method based on POD for the 2D non-stationary Boussinesq equations. J. Math. Anal. Appl. 2019, 471, 564–583. [Google Scholar] [CrossRef]
  14. Abbaszadeh, M.; Dehghan, M. A POD-based reduced-order Crank-Nicolson/fourth-order alternating direction implicit (ADI) finite difference scheme for solving the two-dimensional distributed-order Riesz space-fractional diffusion equation. Appl. Numer. Math. 2020, 158, 271–291. [Google Scholar] [CrossRef]
  15. Luo, Z.; Li, H.; Sun, P. A reduced-order Crank–Nicolson finite volume element formulation based on POD method for parabolic equations. Appl. Math. Comput. 2013, 219, 5887–5900. [Google Scholar] [CrossRef]
  16. Luo, Z. A POD-Based Reduced-Order Stabilized Crank–Nicolson MFE Formulation for the Non-Stationary Parabolized Navier–Stokes Equations. Math. Model. Anal. 2015, 20, 346–368. [Google Scholar] [CrossRef]
  17. Luo, Z.; Jiang, W. A reduced-order extrapolated Crank–Nicolson finite spectral element method for the 2D non-stationary Navier-Stokes equations about vorticity-stream functions. Appl. Numer. Math. 2020, 147, 161–173. [Google Scholar] [CrossRef]
  18. Zhou, Y.; Luo, Z. An optimized Crank–Nicolson finite difference extrapolating model for the fractional-order parabolic-type sine-Gordon equation. Adv. Differ. Equ. 2019, 2019, 1. [Google Scholar] [CrossRef] [Green Version]
  19. Luo, Z.; Xie, Z.; Shang, Y.; Chen, J. A reduced finite volume element formulation and numerical simulations based on POD for parabolic problems. J. Comput. Appl. Math. 2011, 235, 2098–2111. [Google Scholar] [CrossRef] [Green Version]
  20. Britton, N. Others Reaction-Diffusion Equations and Their Applications to Biology; Academic Press: Cambridge, MA, USA, 1986. [Google Scholar]
  21. Hao, X.; Liu, L.; Wu, Y. Iterative solution for nonlinear impulsive advection-reaction-diffusion equations. J. Nonlinear Sci. Appl. 2016, 9, 4070–4077. [Google Scholar] [CrossRef] [Green Version]
  22. Liu, B.; Allen, M.; Kojouharov, H.; Chen, B. Others Finite-element solution of reaction-diffusion equations with advection. In Computational Methods In Water Resources XI: WIT Press. 1996, 7, 1–7. [Google Scholar]
  23. Chapwanya, M.; Lubuma, J.; Mickens, R. Nonstandard finite difference schemes for Michaelis–Menten type reaction-diffusion equations. Numer. Methods Partial. Differ. Equ. 2013, 29, 337–360. [Google Scholar] [CrossRef] [Green Version]
  24. Khan, H.; Gómez-Aguilar, J.; Khan, A.; Khan, T. Stability analysis for fractional order advection–reaction diffusion system. Phys. Stat. Mech. Its Appl. 2019, 521, 737–751. [Google Scholar] [CrossRef]
  25. Mphephu, N. Numerical Solution of 1-d Convection-Diffusion-Reaction Equation. Master’s Thesis, University of Pretoria, Pretoria, South Africa, 2013. [Google Scholar]
  26. Al’shin, A.; Al’shina, E.; Kalitkin, N.; Koryagina, A. Rosenbrock schemes with complex coefficients for stiff and differential algebraic systems. Comput. Math. Math. Phys. 2006, 46, 1320–1340. [Google Scholar] [CrossRef]
  27. Wollkind, D.; Segel, L. A nonlinear stability analysis of the freezing of a dilute binary alloy. Philos. Trans. R. Soc. Lond. Ser. Math. Phys. Sci. 1970, 268, 351–380. [Google Scholar] [CrossRef]
  28. Xia, H.; Luo, Z. An optimized finite difference Crank-Nicolson iterative scheme for the 2D Sobolev equation. Adv. Differ. Equ. 2017, 2017, 196. [Google Scholar] [CrossRef] [Green Version]
  29. Stewart, G. On the early history of the singular value decomposition. SIAM Rev. 1993, 35, 551–566. [Google Scholar] [CrossRef] [Green Version]
  30. Sirovich, L. Chaotic dynamics of coherent structures. Phys. Nonlinear Phenom. 1989, 37, 126–145. [Google Scholar] [CrossRef]
  31. Luo, Z.; Chen, G. Proper Orthogonal Decomposition Methods for Partial Differential Equations; Academic Press: Cambridge, MA, USA, 2018; pp. 3–12. [Google Scholar]
Figure 1. (a) POD modes for linear reaction diffusion equation. (b) Number of POD modes vs. error.
Figure 1. (a) POD modes for linear reaction diffusion equation. (b) Number of POD modes vs. error.
Mathematics 10 02639 g001
Figure 2. (a) Surface plot of the exact solution of the linear ADR equation. (b) Surface plot of the UPFD solution of the linear ADR equation.
Figure 2. (a) Surface plot of the exact solution of the linear ADR equation. (b) Surface plot of the UPFD solution of the linear ADR equation.
Mathematics 10 02639 g002
Figure 3. (a) Surface plot of the EUPFD solution of the linear ADR equation. (b) Number of POD modes vs. CPU time for the linear reaction diffusion equation.
Figure 3. (a) Surface plot of the EUPFD solution of the linear ADR equation. (b) Number of POD modes vs. CPU time for the linear reaction diffusion equation.
Mathematics 10 02639 g003
Figure 4. (a) Absolute error between the exact and EUPFD solutions of the linear ADR against time. (b) Absolute error between the exact and EUPFD solutions for the linear ADR against space.
Figure 4. (a) Absolute error between the exact and EUPFD solutions of the linear ADR against time. (b) Absolute error between the exact and EUPFD solutions for the linear ADR against space.
Mathematics 10 02639 g004
Figure 5. (a) Surface plot of the EUPFD solution of the nonlinear ADR equation. (b) Number of POD modes vs. CPU time for the nonlinear reaction diffusion equation.
Figure 5. (a) Surface plot of the EUPFD solution of the nonlinear ADR equation. (b) Number of POD modes vs. CPU time for the nonlinear reaction diffusion equation.
Mathematics 10 02639 g005
Figure 6. (a) Surface plot of the exact solution of the nonlinear reaction diffusion equation. (b) Surface plot of the UPFD solution of the nonlinear reaction diffusion equation.
Figure 6. (a) Surface plot of the exact solution of the nonlinear reaction diffusion equation. (b) Surface plot of the UPFD solution of the nonlinear reaction diffusion equation.
Mathematics 10 02639 g006
Figure 7. (a) Significant POD modes against number of modes. (b) Absolute error between the exact solution and EUPFD solution against time.
Figure 7. (a) Significant POD modes against number of modes. (b) Absolute error between the exact solution and EUPFD solution against time.
Mathematics 10 02639 g007
Figure 8. Absolute error between the exact and EUPFD solutions against space.
Figure 8. Absolute error between the exact and EUPFD solutions against space.
Mathematics 10 02639 g008
Table 1. Convergence rates for the linear ADR equation by the UPFD and EUPFD with respect to Δ t and a fixed Δ x = 0.025 .
Table 1. Convergence rates for the linear ADR equation by the UPFD and EUPFD with respect to Δ t and a fixed Δ x = 0.025 .
q ( Δ t k )
t k UPFDEUPFD
0.001 3.6683.568
0.002 3.5733.448
0.004 3.5303.375
Table 2. Convergence rates for the linear ADR equation by the UPFD and EUPFD with respect to Δ x and a fixed Δ t = 0.001 .
Table 2. Convergence rates for the linear ADR equation by the UPFD and EUPFD with respect to Δ x and a fixed Δ t = 0.001 .
q ( Δ x k )
x k UPFDEUPFD
0.0125 3.2693.320
0.025 3.0013.075
0.05 3.0743.146
Table 3. Numerical results of the linear ADR equation at a fixed Δ x = 0.025 and Δ t = 0.004 .
Table 3. Numerical results of the linear ADR equation at a fixed Δ x = 0.025 and Δ t = 0.004 .
( t , x ) Exact SolutionUPFD SolutionErrorEUPFD SolutionError
0.008 , 0.05 0.9790.9750.0030.9750.003
0.016 , 0.1 0.9380.9280.0100.9280.010
0.032 , 0.2 0.90030.8830.0160.8830.016
Time 0.008816 0.004314
Table 4. Infinity norm results of the linear ADR equation by using the exact, Crank Nicolson, and EUPFD solutions.
Table 4. Infinity norm results of the linear ADR equation by using the exact, Crank Nicolson, and EUPFD solutions.
( t , x ) ExactCrank–NicolsonErrorEUPFDError
u ( : , 0.05 ) 0.92310.92460.00150.90560.0175
u ( : , 0.1 ) 0.96080.96210.00130.90710.0536
u ( : , 0.2 ) 1.00000.99870.00130.90870.0913
Table 5. Convergence rates for the nonlinear diffusion reaction by the UPFD and EUPFD equations with respect to Δ t and a fixed Δ x = 0.01 .
Table 5. Convergence rates for the nonlinear diffusion reaction by the UPFD and EUPFD equations with respect to Δ t and a fixed Δ x = 0.01 .
q ( Δ t k )
t k UPFDEUPFD
0.00625 2.0412.041
0.0125 2.0282.028
0.025 1.983 71.983
Table 6. Convergence rates for the nonlinear diffusion reaction equation by the UPFD and EUPFD with respect to Δ x and a fixed Δ t = 0.025 .
Table 6. Convergence rates for the nonlinear diffusion reaction equation by the UPFD and EUPFD with respect to Δ x and a fixed Δ t = 0.025 .
q ( Δ x k )
x k UPFDEUPFD
0.0005 7.1604.767
0.001 5.4054.320
0.002 3.8783.882
Table 7. Numerical results of the nonlinear ADR equation at a fixed Δ x = 0.01 , Δ t = 0.025 , r = 0.05 and D = 0.002 .
Table 7. Numerical results of the nonlinear ADR equation at a fixed Δ x = 0.01 , Δ t = 0.025 , r = 0.05 and D = 0.002 .
( t , x ) Exact SolutionUPFD SolutionErrorEUPFD SolutionError
0.05 , 0.02 3.191 × 10 9 3.214 × 10 9 2.281 × 10 11 3.214 × 10 9 2.285 × 10 11
0.1 , 0.04 1.488 × 10 8 1.603 × 10 8 1.152 × 10 9 1.603 × 10 8 1.152 × 10 9
0.2 , 0.08 6.508 × 10 8 7.285 × 10 8 7.764 × 10 9 7.285 × 10 8 7.764 × 10 9
Time 0.004314 0.002357
Table 8. Infinity norm results of the nonlinear ADR equation by using the exact, Crank–Nicolson, and EUPFD solutions.
Table 8. Infinity norm results of the nonlinear ADR equation by using the exact, Crank–Nicolson, and EUPFD solutions.
( t , x ) ExactCrank NicolsonErrorEUPFDError
u ( : , 0.02 ) 0.71030.69980.01050.70000.0101
u ( : , 0.04 ) 0.71030.69930.01100.70000.0101
u ( : , 0.08 ) 0.71030.69890.01140.70000.0101
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ndou, N.; Dlamini, P.; Jacobs, B.A. Enhanced Unconditionally Positive Finite Difference Method for Advection–Diffusion–Reaction Equations. Mathematics 2022, 10, 2639. https://doi.org/10.3390/math10152639

AMA Style

Ndou N, Dlamini P, Jacobs BA. Enhanced Unconditionally Positive Finite Difference Method for Advection–Diffusion–Reaction Equations. Mathematics. 2022; 10(15):2639. https://doi.org/10.3390/math10152639

Chicago/Turabian Style

Ndou, Ndivhuwo, Phumlani Dlamini, and Byron Alexander Jacobs. 2022. "Enhanced Unconditionally Positive Finite Difference Method for Advection–Diffusion–Reaction Equations" Mathematics 10, no. 15: 2639. https://doi.org/10.3390/math10152639

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop