Next Article in Journal
Use of Probabilistic Approaches to Predict Cash Deficits
Previous Article in Journal
Linking Pensions to Life Expectancy: Tackling Conceptual Uncertainty through Bayesian Model Averaging
Previous Article in Special Issue
Convergence Criteria of Three Step Schemes for Solving Equations
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Explicit Stable Finite Difference Methods for Diffusion-Reaction Type Equations

1
Department of Fluid and Heat Engineering, University of Miskolc, 3515 Miskolc, Hungary
2
Mechanical Engineering Department, University of Technology, Baghdad 10066, Iraq
3
Institute of Physics and Electrical Engineering, University of Miskolc, 3515 Miskolc, Hungary
*
Author to whom correspondence should be addressed.
Mathematics 2021, 9(24), 3308; https://doi.org/10.3390/math9243308
Submission received: 26 November 2021 / Revised: 13 December 2021 / Accepted: 16 December 2021 / Published: 19 December 2021
(This article belongs to the Special Issue Application of Iterative Methods for Solving Nonlinear Equations)

Abstract

:
By the iteration of the theta-formula and treating the neighbors explicitly such as the unconditionally positive finite difference (UPFD) methods, we construct a new 2-stage explicit algorithm to solve partial differential equations containing a diffusion term and two reaction terms. One of the reaction terms is linear, which may describe heat convection, the other one is proportional to the fourth power of the variable, which can represent radiation. We analytically prove, for the linear case, that the order of accuracy of the method is two, and that it is unconditionally stable. We verify the method by reproducing an analytical solution with high accuracy. Then large systems with random parameters and discontinuous initial conditions are used to demonstrate that the new method is competitive against several other solvers, even if the nonlinear term is extremely large. Finally, we show that the new method can be adapted to the advection–diffusion-reaction term as well.

1. Introduction

We are going to study the following diffusion-reaction equation:
u t = α 2 u K u + q σ u 4 ,
where u is the unknown concentration, while the known parameters are the diffusion coefficient α, the coefficient of the linear reaction term K, and the source of particles q in case of particle diffusion [1]. It is well known that this equation can describe heat transfer as well. In this case, the physical meaning of u is the temperature and α is the thermal diffusivity. If one uses Newton’s law of cooling, then heat transfer by convection can be expressed [2] (Equation (3)) by a term proportional to u a u , where u a is the ambient temperature which can be considered as constant. It means that K u + q can represent conductive heat transfer. Moreover, heat generation by chemical reactions, radioactive decay, etc. can also be incorporated into q. According to the Stefan–Boltzmann law [3] (Chapter 8), the heat transfer due to radiation can be taken into account by a term proportional to u a 4 u 4 , where the proportionality constant includes the surface area and the Stefan–Boltzmann constant, all of which are nonnegative quantities. The u a 4 term can obviously be included into the heat source term q. Therefore, in this paper, we will use the phrase radiation term when we talk about the fourth order term σ u 4 .
At the end of the paper, we will also examine the linear advection–diffusion-reaction equation in its most standard form:
u t = α 2 u x 2 u a u x K u .  
If the medium is not homogeneous, more general forms of the above equations must be used. For example, Equation (1) can be generalized as
u t = 1 c ρ ( k u ) K u + q σ u 4 ,
where, in case of conductive heat transfer, k = k ( r , t ) 0 ,   c = c ( r , t ) > 0 and ρ = ρ ( r , t ) > 0 are the heat conductivity, specific heat and mass density, respectively. The α = k / ( c ρ ) relation holds between these quantities. Besides, K = K ( r , t ) 0 and q = q ( r , t ) are also known functions of the space and time coordinates.
There are plenty of numerical methods to solve these equations, such as several versions of the finite difference methods (FDM) [4,5], finite element methods (FEM) [6] or a combination of these [7]. However, these require the full spatial discretization of the system, thus they can be computationally demanding. Scientists and engineers must also deal with systems where the physical properties such as the heat conductivity can be highly different [8] (p. 15), even in regions of the system which are in the vicinity of each other. This implies that the coefficients such as α or k, and hence the eigenvalues of the problem may have a range of several orders of magnitude, which means that the problem can be rather stiff.
We explained in our previous papers [9,10,11], and also will demonstrate in this paper that the widely used conventional solvers, either the explicit or the implicit ones, have serious difficulties when they are used for these problems. The explicit methods are usually only conditionally stable, so very small time step sizes have to be used [12], especially if the stiffness of the problem is high. This is the main reason that these equations are typically solved by implicit methods, as it has been conducted by Zhang and Zhao [13], Aamoah-Mensah et al. [14], Nana and Munyakazi [15], Aminikhah and Alavi [16], Ali et al. [17] and Singh et al. [18]. The authors of [14] claim that the larger computational cost of implicit methods is compensated by their unrestricted stability. We think that this is perfectly true when the number of cells is small, such as in their study, but when this number is very large, which is almost always the case in two and especially in three space-dimensions, the implicit solvers become extremely slow with huge memory usage.
Nevertheless, the search for and the application of alternative methods are continuous. The most important example are the nonstandard finite difference schemes (NSFD) introduced by Mickens [19], which have been applied by others to different equations containing the diffusion term [20,21,22]. Since the formerly fast increase of the CPU clock frequencies halted more than a decade and a half ago, and the trend towards increasing parallelism in high performance computing is reinforced [23,24], we believe that the easily parallelizable explicit and unconditionally stable methods for numerically solving these equations will have an increasing role in the future. Albeit these methods are less known, some scholars work with them. For example, Karahan used explicit Sauljev-type alternating direction explicit (ADE) method for the advection–diffusion equation [25]. Sanjaya and Mungkasi examined the performance of the same method and found that it is indeed accurate [26]. Pourghanbar et al. used ADE/Sauljev to solve a fully nonlinear PDE [27]. Harley applied the odd-even hopscotch method to the Frank-Kamenetskii reaction-diffusion equation [28]. Then Al-Bayati et al. compared the ADE, the alternating direction implicit (ADI) and the Hopscotch method in the case of the Gray–Scott reaction-diffusion equation [29]. These methods perform quite well in an equidistant and regular mesh, but they heavily rely on these beneficial properties of the mesh.
One of the very few alternatives which can be applied for a general mesh is the unconditionally positive finite difference (UPFD) scheme of Chen-Carpentier and Kojouharov [30]. It is reported that this method is indeed completely stable even for stiff systems [31], but its accuracy is far from being optimal [32], even compared to other first order methods, such as the standard explicit (Euler) FDM method [32,33] or our recently invented constant-neighbor method [31]. In this paper, we construct and test a similar method than the UPFD, but it consists of two stages, and therefore it is significantly more accurate. Our current work was inspired by the so-called theta formulas, where the user can adjust the extent of implicitness by the parameter θ .
The paper is structured as follows. In Section 2, we first introduce the new algorithm for the simplest, one dimensional, equidistant mesh. Then, in Section 2.2, the analytical investigation of the convergence and stability properties of this method is explained. After this, we present the generalization of the algorithm for arbitrary meshes. In Section 3, we begin with the verification of the new method by comparing it to an analytical solution and the heat conduction equation with the radiation term. Then, in Section 3.2 and Section 3.3, two numerical experiments are presented for two space dimensional stiff systems consisting of 12,000 cells without and with the nonlinear radiation term, respectively. In Section 3.4 we make attempts to apply the new method to the advection–diffusion-reaction equation. In Section 4, we summarize the conclusions and sketch our future research plans.

2. The New Method

2.1. Construction of the New Method

In one space dimension, we take x i = i Δ x , i = 0 , , N 1 , which is a common space discretization. Let us fix the time discretization to t n = t 0 + n h , n = 0 , , T , T = ( t fin t 0 ) / h . We introduce the mesh-parameter r = α h Δ x 2 and μ = a h Δ x . The original UPFD method applies the most common [34] (p. 112) spatial discretization of the diffusion term based on the central difference formula, while it applies the backward difference formula for the advection term. However, the time levels are treated in a tricky way [32], such that the neighbors are taken into account fully at the old time level, where their values are known, and only the actual cell is treated implicitly. It means that for example u i 1 n is used instead of u i 1 n + 1 , with which they obtained:
u i n + 1 u i n h = α u i 1 n 2 u i n + 1 + u i + 1 n Δ x 2 a u i n + 1 u i 1 n Δ x K u i n + 1 ,
This can be arranged to a fully explicit form to obtain the following Algorithm 1:
Algorithm 1: The original UPFD
u i n + 1 = u i n + r ( u i 1 n + u i + 1 n ) + μ u i 1 n 1 + 2 r + μ + K h
Now we adapt this method to Equation (1) where a = 0 but σ > 0 . In principle the nonlinear term can be incorporated into this scheme in many different ways. We choose the following treatment: We insert the radiation term at the level of Equation (4) as u i 4 ( t ) u i n + 1 ( u i n ) 3 , which again can be expressed in an explicit form, and with this we obtain the following adaptation of the original UPFD algorithm to Equation (3) (Algorithm 2):
Algorithm 2: UPDF for the diffusion-reaction-radiation Equation (3)
u i n + 1 = u i n + r ( u i 1 n + u i + 1 n ) + q i h 1 + 2 r + K i h + σ h ( u i n ) 3
If r , q i , K i and σ have arbitrary nonnegative values and the values of u at the beginning of the time stapes are nonnegative, then both the numerator and the denominator is nonnegative in this formula. It means that this formula preserves positivity similarly to the original UPFD formula for the strongly nonlinear case as well. As we will see later, its accuracy is not very good, thus we proceed to construct a two-stage method as well.
We are going to combine the UPFD idea with the so called θ -method, which can be applied for the diffusion term in the following way:
u i n + 1 = u i n + r [ θ ( u i 1 n 2 u i n + u i + 1 n ) + ( 1 θ ) ( u i 1 n + 1 2 u i n + 1 + u i + 1 n + 1 ) ] ,
where θ [ 0 , 1 ] . If θ = 1 , this scheme is the forward-time central-space (FTCS) scheme, which is basically the explicit Euler time integration. For smaller values of θ , this formula is implicit, and for θ = 0 , 1 2 one has the implicit (Euler) and the Crank–Nicolson method, respectively [35]. Using the trick above and incorporating the reaction and the source terms we can write:
u i n + 1 = u i n + r [ 2 θ u i n 2 ( 1 θ ) u i n + 1 + u i 1 n + u i + 1 n ] h K i u i n + 1 + h q i + σ u i n + 1 ( u i n ) 3 .
If one takes θ = 0 , the original UPFD treatment is obtained back. The point is that this more general formula can also be easily rearranged to obtain an explicit formula, according to which the new value of the u variable has the following form in the 1D equidistant case (Algorithm 3):
Algorithm 3: Theta-generalization of Algorithm 2
u i n + 1 = ( 1 2 r θ ) u i n + r ( u i 1 n + u i + 1 n ) + h q i 1 + 2 r ( 1 θ ) + h K i + σ h ( u i n ) 3
Since we formally started from an implicit Formula (6) but made it fully explicit, we started to call these methods pseudo-implicit. The main novelty of this paper is that we organize Formula (8) into a two-stage method as follows inspired by the well-known predictor-corrector methods [35,36,37]. The calculation starts with taking a fractional-sized time step using the already known u i n values, and then a full time step is made Algorithm 4.
Algorithm 4: 2-stage pseudo-implicit method for the diffusion-reaction-radiation Equation (1)
Stage 1 .   Take   a   partial   time   step   h 1 = p h , p > 0 using Formula (8) with parameter θ1:
u i pred = ( 1 2 p r θ 1 ) u i n + p r ( u i 1 n + u i + 1 n ) + q i h 1 v 1 K i h 1 u i n 1 + 2 p r ( 1 θ 1 ) + v 2 K i h 1 + σ h 1 ( u i n ) 3
Stage 2. We redefine u i pred by calculating the linear combination with 0 < λ 1 :
u i pred = λ u i pred + ( 1 λ ) u i n
Take a full time step with the (8) formula with parameter θ2:
u i n + 1 = ( 1 2 r θ 2 ) u i n + r ( u i 1 pred + u i + 1 pred ) + q i h K i h ( w 1 u i n + w 2 u i pred ) 1 + 2 r ( 1 θ 2 ) + ( 1 w 1 w 2 ) K i h + σ h ( u i pred ) 2 u i n ,
where v 1 , v 2 , w 1 , w 2 are real numbers which are considered as free parameters. We must mention that the mathematically correct form of (9) would be u i lin = λ u i pred + ( 1 λ ) u i n , but we immediately put down it in the form which is to be used in a computer code to spare memory. We also note that with this treatment of the nonlinear term we obtain a second-order method with very good stability properties, as we will see later.

2.2. Analytical Investigations

We perform the calculations of Algorithm 4 for the linear σ = 0 case. First, we express the new values u i n + 1 by the old values u j n . For this we calculate the linear combination (9) with the Mathematica software. If we use notations κ i = K i h and ψ = 1 θ 1 , then we have
u i pred = λ ( 1 2 p r θ 1 ) u i n + p r ( u i 1 n + u i + 1 n ) + q i p h v 1 p κ i u i n 1 + 2 p r ψ + v 2 p κ i + ( 1 λ ) u i n = [ λ ( 1 2 p r θ 1 v 1 p κ i ) 1 + 2 p r ψ + v 2 p κ i + ( 1 λ ) ] u i n + λ p 1 + 2 p r ψ + v 2 p κ i ( r u i + 1 n + r u i 1 n + h q i ) ,
which yields
u i n + 1 = 1 [ 1 + 2 p r ψ + v 2 p κ i ] [ 1 + 2 r ( 1 θ 2 ) + ( 1 w 1 w 2 ) κ i ] { λ p r 2 u i 2 n + r [ 1 + 2 p r ( ψ λ ) + p κ i [ v 2 λ ( v 1 + v 2 + w 2 ) ] ] u i 1 n + [ 1 2 r θ 2 + 2 p r [ 2 ( r θ 2 1 ) ψ ψ + r λ ] + κ i [ ( 1 + 2 p r ψ ) ( w 1 + w 2 ) p ( v 2 + 2 r ( w 2 λ v 2 θ 2 ) ) ] p κ i 2 [ λ w 2 ( v 1 + v 2 ) v 2 ( w 1 + w 2 ) ] ] u i n + r [ 1 + 2 p r ( ψ λ ) + p κ i [ v 2 λ ( v 1 + v 2 + w 2 ) ] ] u i + 1 n + λ p r 2 u i 2 n + λ h p r q i 1 + h [ 1 + 2 p r ψ + p κ i ( v 2 w 2 λ ) ] q i + λ h p r q i + 1 } .
After spatial discretization as discussed above, Equation (1) for σ = 0 can be written into a brief matrix-form:
d u d t = M u + q .
The system matrix M is tridiagonal (in the one-dimensional case) and it is the sum of two terms related to the diffusion and the linear reaction terms, respectively:
M = M D + M R .
In the equidistant case, these matrices have the following elements:
M i i D = 2 α Δ x 2 , M i , i + 1 D = α Δ x 2 , M i , i 1 D = α Δ x 2 , M i i R = K i .
Let us start with the analysis of the convergence properties of the methods in the one-dimensional case for constant values of the mesh ratio r, in other words, when the equidistant spatial discretization is fixed.
Theorem 1.
For σ = 0 , the order of convergence of the Algorithm 4 is two for the system (6) of linear ODEs:
d u d t = M u + q , u ( t = 0 ) = u 0 ,
where M is defined in (11)–(13), if and only if the conditions
p λ = 1 2 ,
θ 2 = 1 2 ,
2 w 1 + w 2 = 1 ,
v 1 + v 2 = 1 ,
hold, where M is introduced in (11)–(13), while q and u 0 are arbitrary vectors.
Proof. 
We will show that the local error of the numerical solution (10) compared to the analytical solution
u n + 1 = e M h u n + ( e M h 1 ) M 1 Q = ( 1 + M h + M 2 h 2 2 + M 3 h 3 3 ! + ) u n + ( h + M h 2 2 + M 2 h 3 3 ! + ) Q .
of the ODE system (14) is less than second order in the time step size h. Let us introduce the notation β = r / h and express the exact solution in series up to second order in h:
u i n + 1 = 1 + { β u i 1 n [ K i + 2 β ] u i n + β u i + 1 n + q i } h + { β 2 2 u i 2 n [ 2 β 2 + K i β 2 + K i 1 β 2 ] u i 1 n + [ 3 β 2 + 2 β K i + K i 2 2 ] u i n [ 2 β 2 + K i β 2 + K i + 1 β 2 ] u i + 1 n + β 2 2 u i + 2 n + β 2 q i 1 [ β + K i 2 ] q i + β 2 q i + 1 } h 2 + O ( h 3 ) .
If we do the same with the numerical solution (10), we obtain:
u i n + 1 = 1 + { β u i 1 n [ K i + 2 β ] u i n + β u i + 1 n + q i } h + { [ p β 2 λ ] u i 2 n [ 2 β 2 ( 1 θ 2 + p λ ) + K i β ( p w 2 λ + 1 w 1 w 2 ) + K i 1 p β λ ( v 1 + v 2 ) ] u i 1 n + [ 2 β 2 ( 2 2 θ 2 + p λ ) + 2 β K i [ 2 θ 2 w 1 w 2 ( 1 p λ ) ] + K i 2 [ ( 1 w 1 w 2 ) + p w 2 λ ( v 1 + v 2 ) ] ] u i n [ 2 β 2 ( 1 θ 2 + p λ ) + K i β ( p w 2 λ + 1 w 1 w 2 ) + K i + 1 p β λ ( v 1 + v 2 ) ] u i + 1 n + [ p β 2 λ ] u i + 2 n + [ p β λ ] q i 1 [ 2 β ( 1 θ 2 ) + K i ( p w 2 λ + 1 w 1 w 2 ) ] q i + [ p β λ ] q i + 1 } h 2 + O ( h 3 ) .
It can be immediately seen that the two expressions coincide up to first order, but some conditions must be fulfilled for second order equality. From the equality requirement of the coefficients of u i ± 2 n , and q i ± 1 , we have p β 2 λ = β 2 2   and   p β λ = β 2 , thus (15) must hold. The same requirement for q i gives
2 β ( 1 θ 2 ) + K i ( p w 2 λ + 1 w 1 w 2 ) = β + K i 2 ,
which yields (16) and (17) if one uses condition (15). Now we substitute back the conditions obtained until now to the coefficients of u i ± 1 n   and   u i n , and obtain
[ 2 β 2 + K i β 2 + K i ± 1 β 2 ( v 1 + v 2 ) ] = [ 2 β 2 + K i β 2 + K i ± 1 β 2 ] 3 β 2 + 2 K i β + K i 2 2 [ 2 w 1 + ( 1 2 w 1 ) ( v 1 + v 2 ) ] = 3 β 2 + 2 β K i + K i 2 2 ,
which yields (18), and the proof is now complete. □
We note that our original idea was to organize the original UPFD formula into a two-stage method, which means θ 1 = 0 , θ 2 = 0 . With that idea we obtained a new unconditionally positive method, but it was only first and not second order. After Theorem 1 and its proof one can understand the reason of this failure.
Before starting to analyze the stability of the methods, we also note that in the case of the original UPFD Algorithm 1 for K = 0 , the new u i n + 1 values are the convex combinations of the old u j n values which immediately implies not only unconditional stability, but the positivity preserving property, too. If K is increased to any positive number, this latter property still holds since K is in the denominator with a positive sign. However, the new Algorithms 3 and 4 contain the theta-formula for θ 0 , thus they cannot be not positivity-preserving. This is the price we have to pay for second order accuracy.
We are going to use the most standard von Neumann stability analysis (see [38], Chapter 8, as well as [39]) to prove the unconditional stability of the method in the linear case. For this, the u i n values in the expression of u i n + 1 must be replaced by the errors ε i n and the error-function is decomposed into a Fourier series as follows:
ε i n = m E m ( t ) e I k m x , ε i ± 1 n = m E m ( t ) e I k m ( x ± Δ x ) ,
where E m ( t ) is the amplitude of the m-th term e I k m x in the Fourier series of the error and I is the imaginary unit 1 . We omit the m index for the sake of simplicity, and introduce the notation γ = k m Δ x , with which we obtain the following relations:
ε i n + 1 = E ( t + h ) e I k x and ε i 1 n + ε i + 1 n 2 = E ( t ) e I k x ( e I γ + e I γ ) 2 = E ( t ) e I k x cos γ , ε i 2 n + 2 ε i n + ε i + 2 n 2 = 2 E ( t ) e I k x cos 2 γ ,
Using these expressions and simplifying with e I k m x one can obtain the amplification factor, which is defined as G = E ( t + h ) E ( t ) . If this factor is in the closed interval [ 1 , 1 ] for arbitrary time step size h, then the errors cannot be amplified regardless of how large h one uses, which means unconditional stability.
Theorem 2.
If K = 0 and σ = 0 , then Algorithm 3 is unconditionally stable for Equation (1) if and only if θ = 0 .
Proof. 
Performing the substitutions u i n ε i n described above, we obtain the following amplification factor for Algorithm 3:
G = 1 2 r θ + 2 r cos ( γ ) 1 + 2 r ( 1 θ ) .
In the θ = 0 case, G = 1 + 2 r cos ( γ ) 1 + 2 r is obviously between −1 and 1 for any values of γ and any nonnegative r, which implies unconditional stability. On the other hand, if γ = π , we have G = 1 2 r ( 1 + θ ) 1 + 2 r ( 1 θ ) , which is smaller than −1 for r > 1 2 θ , and that implies instability for large time step sizes in the θ > 0 case. □
This statement means that unfortunately we cannot obtain a new unconditionally stable one-stage algorithm with the simple modification of setting the value of θ to a positive number.
For the investigation of stability of Algorithm 4, we substitute back conditions (15)–(18) into (10) to eliminate the p , v 2 , w 2 parameters, set the external source term to zero and the reaction term to the homogeneous K i K . With notations κ = K h and φ = 1 v 1 this we obtain:
u i n + 1 = 1 [ 1 + r λ ψ + κ 2 λ φ ] ( 1 + r + w 1 κ ) { r 2 2 ( u i 2 n + u i + 2 n ) + r [ 1 + r λ ( ψ λ ) + κ 2 λ [ φ 2 λ ( 1 w 1 ) ] ] ( u i 1 n + u i + 1 n ) + ( 1 r r λ [ ( r 2 ) ψ + ψ r λ ] κ 2 2 λ [ λ ( 1 2 w 1 ) φ ( 1 w 1 ) ] + κ [ ( 1 + r λ ψ ) ( 1 w 1 ) 1 2 λ ( φ + r ( 2 λ ( 1 2 w 1 ) φ ) ) ] ) u i n } .
Theorem 3.
If K = 0 , λ + θ 1 = 1 , and the conditions (15)–(18) hold, then Algorithm 3 is unconditionally stable for Equation (1).
Proof. 
We take K = 0 in the previous expression of u i n + 1 , and introduce the notation η = ψ λ = 1 θ 1 λ . With this we obtain
u i n + 1 = r 2 2 ( 1 + r η ) ( 1 + r ) ( u i 2 n + u i + 2 n ) + r ( 1 r + r η ) ( 1 + r η ) ( 1 + r ) ( u i 1 n + u i + 1 n ) + 1 r η r 2 + η r + r 2 ( 1 + r η ) ( 1 + r ) u i n .
This yields the following amplification factor:
G = 1 + r ( 1 + r + η r η ) + 2 r ( 1 + r ( 1 + η ) ) cos ( γ ) + r 2 cos ( 2 γ ) ( 1 + r ) ( 1 + r η )
Since 0 θ 1 1 , and   0 < λ 1 , we have η = 1 θ 1 λ 0 . Now if r , we have
G ( 1 η ) [ 1 2 cos ( γ ) ] + cos ( 2 γ ) η ,
which is guaranteed to be between −1 and 1 if and only if η = 1 , i.e., λ + θ 1 = 1 . Using this assumption, the G function will have a simpler form:
G = 1 + 2 r cos ( γ ) + r 2 cos ( 2 γ ) 1 + 2 r + r 2 ,
which is always in the interval [ 1 , 1 ] due to the triangle inequality. □
Remark 1.
From Equation (21) one can see that if the λ + θ 1 = 1 holds, the value of u i n + 1 does not depend on the parameters θ 1 and λ. So, for the K = 0 case we will use λ = 1 , which implies that the computer do not need to calculate linear combination (9), and the running times will be slightly shorter.
Now we turn our attention to the case when the linear reaction term is nonzero. We will prove the stability of the method with the following parameters:
λ = 1 2 , θ 1 = 1 2 , v 1 = 0 , w 1 = 1 ,
which, if substituted to conditions (15)–(18), yields
p = 1 , θ 2 = 1 2 , v 2 = 1 , w 2 = 1 .
Theorem 4.
If conditions (22) and (23) hold, then Algorithm 3 is unconditionally stable for Equation (1) for arbitrary K 0 .
Proof. 
Applying the assumptions of the theorem to (19) or (20) we obtain
u i n + 1 = 1 ( 1 + r + κ ) 2 { r 2 2 ( u i 2 n + u i 2 n ) + r ( 1 + κ ) ( u i 1 n + u i + 1 n ) + [ 1 + κ ( 1 2 r ) κ 2 2 ] u i n } ,
which yields
G = 2 κ ( 2 + 4 r + κ ) 2 ( 1 + κ + r ) 2 + 2 r ( 1 + κ ) ( 1 + κ + r ) 2 cos ( γ ) + r 2 ( 1 + κ + r ) 2 cos ( 2 γ ) .
The G function is symmetric for γ = π , thus it is enough to examine the 0 γ π interval. First let us examine the limits of G. For r 0 we have
G 2 + 2 κ κ 2 2 ( 1 + κ ) 2 ,
which function has a value of unity if κ = 0 and then it is monotonously decreasing with increasing κ towards the limit value −1/2. For r we have G cos ( 2 γ ) . For κ we have G 1 2 . All of these values are finite and in the interval [ 1 , 1 ] .
Since G is continuous, the limits are finite, the denominator cannot be zero, G is bounded. Now it is enough to examine the condition G [ 1 , 1 ] in the extremal values. We start with the variable γ while keeping the other two variables arbitrary.
G γ = 2 r ( 1 + κ + 2 r cos ( γ ) ) ( 1 + κ + r ) 2 sin ( γ ) ,
thus, extremal values can be present in three cases:
γ 1 = 0 , γ 2 = π 1 + κ + 2 r cos ( γ 3 ) = 0 cos ( γ 3 ) = 1 + κ 2 r .
In the first case,
G | γ 1 = 0 = 2 ( 1 + r ) 2 + 2 κ κ 2 2 ( 1 + κ + r ) 2 = ( 1 + r ) 2 + κ κ 2 / 2 ( 1 + r ) 2 + κ + r κ + κ 2 ,
which is obviously in the interval [ 1 , 1 ] . In the second case,
G | γ 2 = π = ( r 1 ) 2 + κ κ 2 / 2 4 κ r ( 1 + κ + r ) 2 ,
and it can be checked that the equation G | γ 2 = π = 1 and G | γ 2 = π = 1 have no solution for any positive values of r and κ .
The third case gives an extremal value if 2 r 1 + κ . We obtain the following function:
G 3 = G | Cos γ 3 = ( 1 + κ ) / 2 r = 1 / 2 ( κ + r ) 2 1 + 2 ( κ + r ) + ( κ + r ) 2 ,
which can have values only in the interval [ 1 , 1 ] again, which completes the proof. □
Remark 2.
As the | G | function is obviously continuous in its three variables with no singularities, if there is an extremal value above 1 at a point (K*, g*, r*), then there is a neighborhood of (K*, g*, r*) with values of | G | also above 1. Any sufficiently dense set of points ( K i , g j , r k ) would intersect with this neighborhood. Thus, we independently verify the discussion above by examining | G | numerically. We coded three embedded for loops, one to sweep through the values of each of the parameters K, g, and r in the allowed domain as follows
K i = 0.001 × 1.01 i , i = 0 N K , N K = 20 , 000 , g j = 2 j N g 1 , j = 0 N g , N g = 20 , 000 , r k = 0.001 × 1.01 k , k = 0 N r , N r = 20 , 000 .
During this process the value of | G | has been calculated 8 × 10 12 times while K and r reached values larger than 1083, and it was found that | G | does not exceed unity. Although this numerical procedure cannot be considered as an exact proof, we can conclude again that the algorithm is unconditionally stable if the conditions of Theorem 3 hold.
Remark 3.
If we take K 0 arbitrary, then we have proved the unconditional stability of Algorithm 3 only for λ = 1 2 . In fact, it would require enormous energy to thoroughly examine the full multidimensional parameter space. If the λ = 1 2 assumption does not hold, the amplification factor can take values that are smaller than 1 in many cases. However, it does not mean that violating the assumptions always implies unstable behavior. In fact, according to a large number of numerical experiments, the value of G can be below 1 only if both Kh and r have a rather large value, typically larger than 20, and even in these cases G is still close to 1 , for example G = 1.002 , especially if λ is not very close to 0. So, Algorithm 4 has very good stability properties in the practically relevant cases for λ > 0.3 , as we will see in the next section.
Although all the free parameters are fixed due to the analytical considerations, we will still consider λ as a free parameter. It means that with conditions (22)–(23) we have Algorithm 5 with only one free parameter:
Algorithm 5: (Algorithm 4) For the diffusion-reaction-radiation Equation (1)
Stage 1 .   Take   a   partial   time   step   h 1 = h 2 λ , λ > 0 :
u i pred = ( 1 + r ( 1 1 λ ) ) u i n + r 2 λ ( u i 1 n + u i + 1 n ) + q i h 1 1 + r + K i h 1 + σ h 1 ( u i n ) 3
Stage 2. Calculate the linear combination u i pred = λ u i pred + ( 1 λ ) u i n
Take a full time step:
u i n + 1 = ( 1 r ) u i n + r ( u i 1 pred + u i + 1 pred ) + q i h + K i h ( u i pred u i n ) 1 + r + K i h + σ h ( u i pred ) 2 u i n

2.3. Generalization for Arbitrary Grids

In the case when one has a general mesh and the material properties are functions of the space variables, the spatially discretized form of Equation (3) can be generalized as follows:
d u i d t = j i u j u i R i j C i .
here, ui refers to the cells of various shapes and properties with heat capacity Ci., while R i j is the thermal resistance between cells i and j. If we use the notations V i for the volume of the cell, A i j and d i j for the surface between the cells and for the distance between the cell-centers, then these quantities can be calculated approximately as
C i = c i ρ i V i   and   R i j d i j k i j A i j ,
respectively. In our previous papers [9,11] this generalization procedure (which is based on, e.g., Chapter 5 of the book [40]) is explained in more details. Figure 1 can help the reader to visualize these quantities.
In the general case of Equation (3), the nonzero elements of the matrix M D introduced in (13) can be given as:
M i j D = 1 R i j C i , M i i D = j i M i j D .
We introduce the following notations
τ i = 1 M i i D ,   r i = h 2 τ i   and   A i = h j i M i j D u j n = h j i u j n C i R i j ,
where τ i 0 is the characteristic time or time constant of cell i, r i is the generalization of r = α h Δ x 2 = m i i h 2 (the usual mesh ratio in the case of the diffusion equation), and A i reflects the state of the neighbors of cell i. Now we can write the modified UPFD and our pseudo-implicit algorithms in the general case as follows (Algorithm 6):
Algorithm 6: (Algorithm 2) UPDF for the diffusion-reaction-radiation equation, general mesh-form
u i n + 1 = u i n + A i + q i h 1 + 2 r i + K i h + σ h ( u i n ) 3
We emphasize that in Algorithm 7, r i = h 2 τ i in both stages. We stress again that Algorithm 4 is proven to be unconditionally stable only for λ = 1 2 .
Algorithm 7: (Algorithm 4) 2-stage pseudo-implicit method for the diffusion-reaction Equation (1), general-mesh from
Stage 1 .   Take   a   partial   time   step   h 1 = h 2 λ , λ > 0 , with the (26) formula:
u i pred = ( 1 + ( 1 1 λ ) r i ) u i n + A i + q i h 1 1 + r i + K i h 1 + σ h 1 ( u i n ) 3 ,   where   A i = h 1 j i u j n C i R i j .
Stage 2. We redefine u i pred by calculating the linear combination
u i pred = λ u i pred + ( 1 λ ) u i n .
Take a full time step with the (26) formula:
u i n + 1 = ( 1 r i ) u i n + A i + K i h ( u i pred u i n ) + q i h 1 + r i + K i h + σ h ( u i pred ) 2 u i n ,   where   A i = h j i u j pred C i R i j .

3. Numerical Results

3.1. Verification Using an Analitical Solution

We have constructed the following analytical solution of Equation (1) for α = 1 , K = 2 and q ( x , t ) = σ t 4 e 4 x 4 t + e x t :
u exact ( x , t ) = t e x t .
Here we reproduce this analytical solution numerically for ( t , x ) [ 0.5 , 1 ] × [ 1 , 1 ] and σ = 3 . The initial condition
u ( x , t = 0.5 ) = 0.5 e x 0.5 ,
and the Dirichlet boundary conditions at the ends of the interval
u ( x = 1 , t ) = t e 1 t ,   and u ( x = 1 , t ) = t e 1 t
are obtained using the analytical solution. The (global) numerical error is the absolute difference of the numerical solutions u j num produced by the examined method and the reference solution u j ref (which is the analytical solution here) at final time t fin . We use these individual errors of the nodes or cells to calculate the maximum error:
Error ( L ) = max 1 j N | u j ref ( t fin ) u j num ( t fin ) | ,
where the L errors as a function of the time step size h can be seen in Figure 2 for Δ x = 0.02 .
We have solved Equation (1) for several different space and time domains and values of the parameters σ and Δ x , and very similar curves have been produced for those cases as well. The new methods are completely stable, and the UPFD method is first order while the new pseudo-implicit methods are second order in the time step size. We note that in Section 3.4 this equation will be solved for a much larger radiation coefficient σ as well, and it will be demonstrated that for a strongly nonlinear case and in a non-equidistant grid, the parameter λ will be more relevant.

3.2. Comparison with Other Methods for a Large, Extremely Stiff System

In this subsection, we solve Equation (3) in a two space dimensional, topologically rectangle-structured mesh with N = N x × N z cells (see Figure 1 for visualization). The size of the system is fixed to N x = 100 and N z = 120 , thus the total cell number is 12,000. Randomly generated cell capacities and thermal resistances
C i = 10 ( α C β C × r a n d ) , R x , i = 10 ( α R x β R x × r a n d ) , R z , i = 10 ( α R z β R z × r a n d )
following a log-uniform distribution have been used, where the (pseudo)random number rand is generated by MATLAB for each quantity with a uniform distribution in the unit interval (0, 1). In this subsection, K = 0 and σ = 0 , thus we deal with the linear heat equation and M = M D . The exponents have been set to the following values:
α C = α R x = α R z = 3 ,   β C = β R x = β R z = 3 ,
which means that log-uniformly distributed values between 0.001 and 1000 have been given to the capacities and the resistances. Different random values have been generated for the initial conditions u i ( 0 ) = r a n d and the source term q i = 0.2 × r a n d 0.1 as well. The final time of the simulation has been set to t fin = 0.2 .
We consider zero Neumann boundary conditions (isolated system). To implement this, we omit those terms of the sum in Equation (3) which have infinite resistivity in the denominator because of thermal isolation at the boundary. If the (nonzero) smallest and the largest absolute value eigenvalues of the system matrix M, defined in (11)–(13), are denoted by λ MIN and λ MAX , then the stiffness ratio of the system can be given as λ MAX / λ MIN . On the other hand, h MAX FTCS = | 2 λ MAX | exactly gives the maximum possible time step size for the FTCS (explicit Euler) scheme. This threshold is often called the CFL limit and it is valid for the second order explicit Runge–Kutta (RK) methods as well [41]. Above this time step size, the solutions will sooner or later explode due to instability. In the present case, the stiffness ratio is 2.3 × 10 11 and h MAX FTCS = 1.03 × 10 6 , respectively. We will see that this implies serious under-performance of the conventional explicit methods, which are only conditionally stable.
In Section 3.2 and Section 3.3, the reference solution is obtained using the ode15s built-in solver of MATLAB with sufficiently strict error tolerance   Tol = 10 12 (where Tol AbsTol = RelTol ) and therefore high precision. Besides the L error defined in (28), we also use the average error:
Error ( L 1 ) = 1 N 1 j N | u j ref ( t fin ) u j num ( t fin ) | ,
and the so-called energy error:
Error ( E n e r g y ) = 1 j N C j | u j ref ( t fin ) u j num ( t fin ) | ,
which, in case of heat transfer, gives the error in terms of energy.
The performance of the new algorithms was compared with the following methods coded by us. The original UPFD, the CNe [42], the 2-stage linear-neighbor (LNe) [11] and the CpC methods [31], and finally the well-known Heun method, also called as explicit trapezoidal rule, which may be the most common second order RK scheme [43]. Besides these, the well-established and professionally coded MATLAB solvers have been used for comparison purposes, namely:
  • ode45, a fourth (fifth) order Runge–Kutta–Dormand–Prince method;
  • ode23, second (third) order Runge–Kutta–Bogacki–Shampine method;
  • ode113, 1 to 13 order variable-step and variable order VSVO Adams–Bashforth–Moulton solver;
  • ode15s, a 1 to 5 order numerical differentiation formulas with VSVO, designed for stiff problems;
  • ode23s, a second order modified Rosenbrock method;
  • ode23t, uses the trapezoidal rule with a free interpolant;
  • ode23tb, applies a trapezoidal rule in the first stage and a backward differentiation formula in the second one.
It is known that ode45, ode23 and ode113 uses explicit algorithms while the rest are implicit solvers. In case of the MATLAB solvers, the time step sizes cannot be determined directly, thus we set the tolerances instead, starting from an extremely large value, such as Tol = 10 2 until a small minimum value, usually Tol = 10 6 .
For the calculations where running times are measured, a desktop computer with an Intel Core i7-9700 CPU, 16.0 GB RAM is used, while the software is the MATLAB R2020b [44]. The total running time of the algorithms is measured by the built-in tic-toc function of that software.
We have examined the L , L 1 and energy errors as a function of the time step size h and the running time. In Figure 3 we present the L 1 error as a function of h, while in Figure 4 one can see the L 1 errors vs. the total running times. Table 1 collects some results which have been obtained by the numerical schemes coded by us and the “ode” solvers of MATLAB. We set λ = 1 as it is explained in Remark 1.
One can see that the new scheme is slightly more accurate than the LNe and the CpC, and significantly more accurate than the first order UPFD and CNe methods. We note that the Heun method is not present in the figures, because it is convergent only below the CFL limit, which is lower than the time step sizes presented in the case of our methods. The explicit MATLAB solvers ode45 and ode113 were not able to provide any meaningful results and in the case of the ode23, it was a hard work to find those tolerances for which the method works, albeit very slowly. The implicit MATLAB routines performed usually much better, but even they are severely outperformed by the explicit and stable algorithms if running times are considered.

3.3. Comparison with Other Methods for a Large System with Strong Nonlinearity

In the second case study, we set K i = 3 × r a n d , q i = 2 × r a n d and σ = 1000 . The latter coefficient has been chosen so large because we would like to demonstrate the performance of the new method for a strongly nonlinear case, but the values of the variable u are typically between zero and one, thus their fourth power is usually a rather small number. We give new values to the α and β exponents:
α C = 3 ,   β C = 6 ,   α R x = α R z = 3 ,   β R x = β R z = 0 .
We calculate the stiffness ratio and the CFL limit in two different ways, both of them without taking into account the nonlinear term. If we use the full M matrix, we obtain that the stiffness ratio is 7.7 × 10 5 , much smaller than in the previous case, while the CFL limit for the standard FTCS was h M A X E E = 9.76 × 10 4 , which, we stress again, holds for the Heun method as well. If we use only the M D matrix instead of M, the stiffness ratio is 6.8 × 10 9 , while the CFL limit is h M A X E E = 9.75 × 10 4 . The reason behind these numbers is that the eigenvalues close to zero have been significantly increased (in absolute value) by the new reaction term while those with large absolute values remained almost the same.
All other parameters and circumstances, such as the size of the system and the range of the initial values are the same as in the previous subsection. We note that we were not able to adapt our previous methods CNe, LNe and CpC for the K 0 , σ 0 case, nor when the advection term is present, without losing their order of convergence (that is why we started to develop the current methods), thus they are not presented in this and the next subsection. In Figure 5 and Figure 6 the energy and the average errors are presented as a function of the time step size and the total running time, respectively. In Table 2 we report the data that belong to this numerical experiment.
As it is expected, due to the larger CFL limit and weaker stiffness, the conventional explicit methods performed much better than the implicit ones, and especially the ode45 can compete with our methods if high accuracy is required. However, for low and medium accuracy requirements, the new pseudo-implicit method has the best performance.

3.4. Solution of the Advection-Diffusion-Reaction Equation

In the case of the advection–diffusion-reaction Equation (2), we found two meaningful possibilities to discretize the advection term. The first one applies the central difference formula for the first spatial derivative:
u i n + 1 = u i n + r [ 2 θ u i n 2 ( 1 θ ) u i n + 1 + u i 1 n + u i + 1 n ] μ u i + 1 n u i 1 n 2 K h u i n + 1 .
with this we obtain
u i n + 1 = ( 1 2 r θ ) u i n + r ( u i 1 n + u i + 1 n ) μ 2 ( u i + 1 n u i 1 n ) 1 + 2 r ( 1 θ ) + K h .
The second solution is what the original paper [30] proposes: the backward difference formula where the left neighbor is taken at the old, while the actual node is at the new time level:
u i n + 1 = u i n + r [ 2 θ u i n 2 ( 1 θ ) u i n + 1 + u i 1 n + u i + 1 n ] μ ( u i n + 1 u i 1 n ) K h u i n + 1 ,
which yields
u i n + 1 = ( 1 2 r θ ) u i n + r ( u i 1 n + u i + 1 n ) + μ u i 1 n 1 + 2 r ( 1 θ ) + μ + K h .
Both treatments can be applied in the first and in the second stage, thus we have four combinations Algorithms 8–11 as listed below.
Algorithm 8: For the advection–diffusion-reaction equation
Stage 1 .   Take   a   partial   time   step   h 1 = p h , p > 0   using   Formula   ( 30 )   and   λ = 1 2 p :
u i pred = ( 1 2 p r ( 1 λ ) ) u i n + p r ( u i 1 n + u i + 1 n ) p μ 2 ( u i + 1 n u i 1 n ) 1 + r + K h 1
Stage 2 .   Calculate   the   linear   combination   u i pred = λ u i pred + ( 1 λ ) u i n , and using this, take a full time step with the (30) formula:
u i n + 1 = ( 1 r ) u i n + r ( u i 1 pred + u i + 1 pred ) K h ( u i n u i pred ) μ 2 ( u i + 1 n u i 1 n ) 1 + r + K h
Algorithm 9: For the advection–diffusion-reaction equation
Stage 1 .   Take   a   partial   time   step   h 1 = p h , p > 0   using   Formula   ( 31 )   and   λ = 1 2 p :
u i pred = ( 1 2 p r ( 1 λ ) ) u i n + p r ( u i 1 n + u i + 1 n ) + p μ u i 1 n 1 + r + p μ + K h 1
Stage 2. Same as Stage 2 in Algorithm 8.
Algorithm 10: For the advection–diffusion-reaction equation
Stage 1. Same as Stage 1 in Algorithm 8.
Stage 2 .   Calculate   the   linear   combination   u i pred = λ u i pred + ( 1 λ ) u i n , and using this, take a full time step with the (31) formula:
u i n + 1 = ( 1 r ) u i n + r ( u i 1 pred + u i + 1 pred ) K h ( u i n u i pred ) + μ u i 1 n 1 + r + μ + K h
Algorithm 11: For the advection–diffusion-reaction equation
Stage 1. Same as Stage 1 in Algorithm 9.
Stage 2. Same as Stage 2 in Algorithm 10.
We reproduce the following analytical solution of Equation (2) found in the paper of Appadu [32]:
u exact ( x , t ) = e ( α + a K ) t x .
Here we examine the numerical solution for ( t , x ) [ 0 , 0.1 ] × [ 0 , 2 ] and α = 1 , a = 2 , K = 1 . The initial condition is u exact ( x , t = 0 ) , and we considered Dirichlet boundary conditions at the ends of the interval
u ( x = 1 , t ) = t e 1 t ,   and u ( x = 1 , t ) = t e 1 t .
The L errors as a function of the time step size h are presented in Figure 7 for Δ x = 0.02 in the case of the original UPFD algorithm and the new Algorithms 5–8 above.
We found that the UPFD method is first order (as it is expected) while the new pseudo-implicit methods are second order in the time step size. However, the UPFD method and 2 of the new methods (those which use (31) in the second stage) have a problem with consistency. Moreover, there is an optimal time step size h for the given space step size Δ x where some errors cancel each other and the algorithms are very accurate. In connection with the UPFD methods, earlier papers referred to these phenomena [30,32], and now we can see them in the case of the new pseudo-implicit methods as well.

4. Discussion and Summary

In the current paper, we reached our goal to construct a fully explicit and stable numerical algorithm to solve the time-dependent diffusion (or heat) equation with linear and nonlinear reaction terms, where the latter represented heat loss due to radiation. Using the UPFD idea, we organized the theta-formula into a two-stage algorithm, where, in each stage, the latest available u values of the neighbors are used to make the originally implicit theta-formula completely explicit. We analytically proved for the linear case that the obtained method is second order in time step size and unconditionally stable.
For verification, an analytical solution of the nonlinear PDE was used. Then two 2-dimensional stiff systems containing 12,000 cells with discontinuous random parameters and initial conditions were constructed. The performance of the new algorithm as well as several other methods was examined for these systems. According to the numerical results, the new method is quite competitive. It is second order and stable for the nonlinear case as well, and it gives quite accurate results orders of magnitude faster than the professionally optimized MATLAB routines and it is more accurate than all other examined explicit and unconditionally stable methods. Although it is not positivity preserving as the original UPFD algorithm, it is stable for relatively large time step sizes as well, even if the nonlinearity is strong. Moreover, it is easy to implement and can be applied for unstructured grids as well. The conclusion is that this new pseudo-implicit algorithm has the most important advantages of the conventional explicit and the implicit methods at the same time.
In the near future, we are going to search for higher order and thus even more accurate versions of these algorithms and adapt these to nonlinear parabolic equations as well. We also plan to systematically investigate the application of these methods to the advection–diffusion-reaction Equation (2), and, also, to similar nonlinear equations like the Burgers–Fisher and the Burgers–Huxley equations. Moreover, we have started to consider applying these methods to real-life engineering problems, most importantly heat transfer by convection, conduction, and radiation in buildings [45] and solar panels [46], to increase energy-efficiency and therefore to contribute to the prevention of the climate-change.

Author Contributions

Conceptualization, methodology, supervision and resources, E.K.; software, Á.N.; validation, E.K. and H.K.J.; formal analysis (proofs), J.M.; investigation, H.K.J. and A.H.A.; data curation, Á.N.; writing—original draft preparation, E.K. and J.M.; writing—review and editing, Á.N.; visualiza-tion, A.H.A. and H.K.J.; project administration, E.K. and Á.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the EU and the Hungarian State, co-financed by the ERDF in the framework of the GINOP-2.3.4-15-2016-00004 project.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

Data is available at the following link https://github.com/Drendre/Pseudo-Implicit-method-codes-data, accessed on 25 November 2021.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Nikezic, D.; Urosevic, V. Radon transport through concrete and determination of its diffusion coefficient. Radiat. Prot. Dosim. 2007, 128, 516. [Google Scholar] [CrossRef] [Green Version]
  2. Ochoa, G.V.; Sanchez, W.E.; Truyoll, S.D.L.H. Experimental and theoretical study on free and force convection heat transfer. Contemp. Eng. Sci. 2017, 10, 1143–1152. [Google Scholar] [CrossRef]
  3. Holman, J.P. Heat Transfer; McGraw-Hill Science: New York, NY, USA, 2010; ISBN 978-0-07-352936-3. [Google Scholar]
  4. Savović, S.; Djordjevich, A. Numerical solution of the diffusion equation describing the flow of radon through concrete SEQ CHAPTER. Appl. Radiat. Isot. 2008, 66, 552–555. [Google Scholar] [CrossRef]
  5. Suárez-Carreño, F.; Rosales-Romero, L. Convergency and stability of explicit and implicit schemes in the simulation of the heat equation. Appl. Sci. 2021, 11, 4468. [Google Scholar] [CrossRef]
  6. Lima, S.A.; Kamrujjaman; Islam, S. Numerical solution of convection–diffusion–reaction equations by a finite element method with error correlation. AIP Adv. 2021, 11, 085225. [Google Scholar] [CrossRef]
  7. Ivanovic, M.; Svicevic, M.; Savovic, S. Numerical solution of Stefan problem with variable space grid method based on mixed finite element/ finite difference approach. Int. J. Numer. Methods Heat Fluid Flow 2014, 24, 2682–2695. [Google Scholar] [CrossRef]
  8. Lienhard, I.V.; John, H. A Heat Transfer Textbook, 4th ed.; Phlogiston Press: Cambridge, MA, USA, 2017; ISBN 9780971383524. [Google Scholar]
  9. Saleh, M.; Nagy, Á.; Kovács, E. Construction and investigation of new numerical algorithms for the heat equation: Part 3. Multidiszciplináris Tudományok 2020, 10, 349–360. [Google Scholar] [CrossRef]
  10. Nagy, Á.; Saleh, M.; Omle, I.; Kareem, H.; Kovács, E. New stable, explicit, shifted-hopscotch algorithms for the heat equation. Math. Comput. Appl. 2021, 26, 61. [Google Scholar] [CrossRef]
  11. Kovács, E. A class of new stable, explicit methods to solve the non-stationary heat equation. Numer. Methods Partial. Differ. Equ. 2021, 37, 2469–2489. [Google Scholar] [CrossRef]
  12. Savovic, S.; Djordjevich, A. Explicit finite difference solution for contaminant transport problems with constant and oscillating boundary conditions. Therm. Sci. 2020, 24, 2225–2231. [Google Scholar] [CrossRef] [Green Version]
  13. Zhang, J.; Zhao, C. Sharp error estimate of BDF2 scheme with variable time steps for molecular beam expitaxial models without slop selection. J. Math. 2021, 41, 1–19. [Google Scholar]
  14. Amoah-mensah, J.; Boateng, F.O.; Bonsu, K. Numerical solution to parabolic PDE using implicit finite difference approach. Math. Theory Model. 2016, 6, 74–84. [Google Scholar]
  15. Mbroh, N.A.; Munyakazi, J.B. A robust numerical scheme for singularly perturbed parabolic reaction-diffusion problems via the method of lines. Int. J. Comput. Math. 2021, 1–20. [Google Scholar] [CrossRef]
  16. Aminikhah, H.; Alavi, J. An efficient B-spline difference method for solving system of nonlinear parabolic PDEs. SeMA J. 2017, 75, 335–348. [Google Scholar] [CrossRef]
  17. Ali, I.; Haq, S.; Nisar, K.S.; Arifeen, S.U. Numerical study of 1D and 2D advection-diffusion-reaction equations using Lucas and Fibonacci polynomials. Arab. J. Math. 2021, 10, 513–526. [Google Scholar] [CrossRef]
  18. Singh, M.K.; Rajput, S.; Singh, R.K. Study of 2D contaminant transport with depth varying input source in a groundwater reservoir. Water Supply 2021, 21, 1464–1480. [Google Scholar] [CrossRef]
  19. Mickens, R.E. Nonstandard Finite Difference Models of Differential Equations; World Scientific Publishing: Singapore, 1993; ISBN 978-981-02-1458-6. [Google Scholar]
  20. Agbavon, K.M.; Appadu, A.R. Construction and analysis of some nonstandard finite difference methods for the FitzHugh–Nagumo equation. Numer. Methods Partial. Differ. Equ. 2020, 36, 1145–1169. [Google Scholar] [CrossRef]
  21. File, G.; Garoma, H. Numerical solution of singularly perturbed differential difference equations with mixed parameters. J. Math. Model. 2021, 9, 691–705. [Google Scholar] [CrossRef]
  22. Verma, A.K.; Kayenat, S. An efficient Mickens’ type NSFD scheme for the generalized Burgers Huxley equation. J. Differ. Equ. Appl. 2020, 26, 1213–1246. [Google Scholar] [CrossRef]
  23. Reguly, I.Z.; Mudalige, G.R. Productivity, performance, and portability for computational fluid dynamics applications. Comput. Fluids 2020, 199, 104425. [Google Scholar] [CrossRef]
  24. Gagliardi, F.; Moreto, M.; Olivieri, M.; Valero, M. The international race towards Exascale in Europe. CCF Trans. High Perform. Comput. 2019, 1, 3–13. [Google Scholar] [CrossRef] [Green Version]
  25. Karahan, H. Unconditional stable explicit finite difference technique for the advection–diffusion equation using spreadsheets. Adv. Eng. Softw. 2007, 38, 80–86. [Google Scholar] [CrossRef]
  26. Sanjaya, F.; Mungkasi, S. A simple but accurate explicit finite difference method for the advection-diffusion equation. J. Phys. Conf. Ser. 2017, 909, 12038. [Google Scholar] [CrossRef]
  27. Pourghanbar, S.; Manafian, J.; Ranjbar, M.; Aliyeva, A.; Gasimov, Y.S. An efficient alternating direction explicit method for solving a nonlinear partial differential equation. Math. Probl. Eng. 2020, 2020, 9647416. [Google Scholar] [CrossRef]
  28. Harley, C. Hopscotch method: The numerical solution of the Frank-Kamenetskii partial differential equation. Appl. Math. Comput. 2010, 217, 4065–4075. [Google Scholar] [CrossRef]
  29. Al-Bayati, A.Y.; Manaa, S.A.; Al-Rozbayani, A.M. Comparison of Finite Difference Solution Methods for Reaction Diffusion System in Two Dimensions. AL-Rafidain J. Comput. Sci. Math. 2011, 8, 21–36. [Google Scholar] [CrossRef] [Green Version]
  30. Appadu, A.R. Performance of UPFD scheme under some different regimes of advection, diffusion and reaction. Int. J. Numer. Methods Heat Fluid Flow 2017, 27, 1412–1429. [Google Scholar] [CrossRef] [Green Version]
  31. Kovács, E.; Nagy, Á.; Saleh, M. A set of new stable, explicit, second order schemes for the non-stationary heat conduction equation. Mathematics 2021, 9, 2284. [Google Scholar] [CrossRef]
  32. 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]
  33. Savović, S.; Drljača, B.; Djordjevich, A. A comparative study of two different finite difference methods for solving advection–diffusion reaction equation for modeling exponential traveling wave in heat and mass transfer processes. Ric. Mat. 2021, 1–8. [Google Scholar] [CrossRef]
  34. Holmes, M.H. Introduction to Numerical Methods in Differential Equations; Springer: New York, NY, USA, 2007; ISBN 978-0387-30891-3. [Google Scholar]
  35. Wikipedia. Predictor–Corrector Method. Available online: https://en.wikipedia.org/wiki/Predictor-corrector_method (accessed on 16 December 2021).
  36. Shokri, A. The symmetric two-step P-stable nonlinear predictor-corrector meth- ods for the numerical solution of second order initial value problems. Bull. Iran. Math. Soc. 2015, 41, 191–205. [Google Scholar]
  37. Hirsch, C. Numerical Computation of Internal and External Flows, Volume 1: Fundamentals of Numerical Discretization; Wiley: Hoboken, NJ, USA, 1988. [Google Scholar]
  38. Wikipedia. Von Neumann Stability Analysis. Available online: https://en.wikipedia.org/wiki/Von_Neumann_stability_analysis (accessed on 16 December 2021).
  39. Munka, M.; Pápay, J. 4D Numerical Modeling of Petroleum Reservoir Recovery; Akadémiai Kiadó: Budapest, Hungary, 2001; ISBN 9630578433. [Google Scholar]
  40. Muñoz-Matute, J.; Calo, V.M.; Pardo, D.; Alberdi, E.; van der Zee, K.G. Explicit-in-time goal-oriented adaptivity. In Computer Methods in Applied Mechanics and Engineering; Elsevier: Amsterdam, The Netherlands, 2019; Volume 347, pp. 176–200. [Google Scholar] [CrossRef] [Green Version]
  41. Kovács, E. New stable, explicit, first order method to solve the heat conduction equation. J. Comput. Appl. Mech. 2020, 15, 3–13. [Google Scholar] [CrossRef]
  42. Heun’s Method—Wikipedia. Available online: https://en.wikipedia.org/wiki/Heun%27s_method (accessed on 30 July 2021).
  43. MATLAB. R2020b at a Glance. 2020. Available online: https://uk.mathworks.com/products/new_products/release2020b.html (accessed on 16 December 2021).
  44. Chen-Charpentier, B.M.; Kojouharov, H.V. An unconditionally positivity preserving scheme for advection–diffusion reaction equations. Math. Comput. Model. 2013, 57, 2177–2185. [Google Scholar] [CrossRef]
  45. Jumabekova, A.; Berger, J.; Foucquier, A. An efficient sensitivity analysis for energy performance of building envelope: A continuous derivative based approach. Build. Simul. 2021, 14, 909–930. [Google Scholar] [CrossRef]
  46. Matusz-Kalász, D.; Bodnár, I. Operation problems of solar panel caused by the surface contamination. Energies 2021, 14, 5461. [Google Scholar] [CrossRef]
Figure 1. Arrangement of the generalized variables for the case when the mesh is not necessarily regular. The red double arrows are for conduction between cells with capacities C i and C j through the resistances R i j .
Figure 1. Arrangement of the generalized variables for the case when the mesh is not necessarily regular. The red double arrows are for conduction between cells with capacities C i and C j through the resistances R i j .
Mathematics 09 03308 g001
Figure 2. The L errors as a function of time step size h for the numerical solutions of Equation (1) in case of Algorithm 2 and the new pseudo-implicit Algorithm 4 for three different values of parameter λ . This parameter causes only very slight differences, thus the three curves almost coincide.
Figure 2. The L errors as a function of time step size h for the numerical solutions of Equation (1) in case of Algorithm 2 and the new pseudo-implicit Algorithm 4 for three different values of parameter λ . This parameter causes only very slight differences, thus the three curves almost coincide.
Mathematics 09 03308 g002
Figure 3. L1 (average) errors as a function of the time step size of the new pseudo-implicit (PI) algorithm and some other methods for the first, extremely stiff system with K = 0 , σ = 0 .
Figure 3. L1 (average) errors as a function of the time step size of the new pseudo-implicit (PI) algorithm and some other methods for the first, extremely stiff system with K = 0 , σ = 0 .
Mathematics 09 03308 g003
Figure 4. (average) errors as a function of the running time for the first (moderately stiff) system, in the case of the algorithms coded by us as well as of the MATLAB routines.
Figure 4. (average) errors as a function of the running time for the first (moderately stiff) system, in the case of the algorithms coded by us as well as of the MATLAB routines.
Mathematics 09 03308 g004
Figure 5. Energy errors as a function of the time step size for the second (very stiff) system, in the case of the UPFD Algorithm 2, the Heun method and the new PI algorithms.
Figure 5. Energy errors as a function of the time step size for the second (very stiff) system, in the case of the UPFD Algorithm 2, the Heun method and the new PI algorithms.
Mathematics 09 03308 g005
Figure 6. (average) errors as a function of the running time for the second (very stiff) system, in the case of the new algorithms and some other methods.
Figure 6. (average) errors as a function of the running time for the second (very stiff) system, in the case of the new algorithms and some other methods.
Mathematics 09 03308 g006
Figure 7. The L errors as a function of time step size h for the numerical solutions of Equation (1) in case of Algorithm 1 and the new pseudo-implicit Algorithms 8–11 for λ = 1 2 . The thin dashed grey line is proportional to h2 again.
Figure 7. The L errors as a function of time step size h for the numerical solutions of Equation (1) in case of Algorithm 1 and the new pseudo-implicit Algorithms 8–11 for λ = 1 2 . The thin dashed grey line is proportional to h2 again.
Mathematics 09 03308 g007
Table 1. Comparison of different algorithms for the extremely stiff system of twelve thousand cells.
Table 1. Comparison of different algorithms for the extremely stiff system of twelve thousand cells.
Numerical Method Error ( L ) Error ( L 1 ) Energy   Error Running   Time   ( s )  
ode 23 ,   Tol = 10 1 7.15 × 10 3 6.68 × 10 7 1.80 × 10 5 3.04 × 10 5
ode 15 s ,   Tol = 10 2 1.30 × 10 3 7.33 × 10 5 8.79 × 10 0 8.69 × 10 2
ode 23 s ,   Tol = 10 2 4.33 × 10 4 2.37 × 10 5 2.80 × 10 0 3.02 × 10 5
ode 23 t ,   Tol = 10 2 5.71 × 10 4 3.14 × 10 5 3.75 × 10 0 1.00 × 10 3
ode 23 tb ,   Tol = 10 2 4.28 × 10 4 2.33 × 10 5 2.77 × 10 0 9.82 × 10 2
UPFD ,   h = 1 × 10 6 2.20 × 10 3 1.24 × 10 5 4.86 × 10 1 5.65 × 10 1
Heun ,   h = 1 × 10 6 1.23 × 10 11 3.79 × 10 13 4.01 × 10 8 1.05 × 10 2
CNe ,   h = 5 × 10 6 5.85 × 10 3 3.36 × 10 5 1.28 × 10 0 8.28 × 10 0
LNe ,   h = 1 × 10 5 2.70 × 10 3 1.28 × 10 5 3.58 × 10 1 8.07 × 10 0
CpC   p = 1 / 2 ,   h = 2.5 × 10 5 1.21 × 10 2 4.61 × 10 5 1.08 × 10 0 3.17 × 10 0
PI λ = 1 ,   h = 2.5 × 10 5 8.44 × 10 3 3.66 × 10 5 8.62 × 10 1 3.26 × 10 0
PI λ = 1 ,   h = 1 × 10 5 2.54 × 10 3 1.00 × 10 5 2.41 × 10 1 8.19 × 10 0
PI λ = 1 ,   h = 5 × 10 6 9.25 × 10 4 3.41 × 10 6 8.50 × 10 2 1.63 × 10 1
Table 2. Comparison of different algorithms for the very stiff system of ten thousand cells.
Table 2. Comparison of different algorithms for the very stiff system of ten thousand cells.
Numerical Method Error ( L ) Error ( L 1 ) Energy   Error Running   Time   ( s )  
ode 45 ,   Tol = 10 1 4.49 × 10 3 1.57 × 10 6 8.54 × 10 1 4.05 × 10 1
ode 23 ,   Tol = 10 1 7.97 × 10 2 2.25 × 10 6 1.17 × 10 1 1.67 × 10 1
ode 113 ,   Tol = 10 1 9.23 × 10 2 1.07 × 10 5 1.57 × 10 0 1.63 × 10 1
ode 15 s ,   Tol = 10 3 3.14 × 10 4 4.94 × 10 5 4.20 × 10 1 1.65 × 10 3
ode 23 s ,   Tol = 10 4 9.94 × 10 5 2.31 × 10 5 1.93 × 10 1 3.84 × 10 4
ode 23 t ,   Tol = 10 4 6.78 × 10 5 1.78 × 10 5 1.50 × 10 1 1.68 × 10 3
ode 23 tb ,   Tol = 10 4 1.41 × 10 4 5.25 × 10 5 4.48 × 10 1 1.67 × 10 3
UPFD ,   h = 5 × 10 5 1.79 × 10 4 1.22 × 10 5 1.19 × 10 1 8.67 × 10 1
Heun ,   h = 5 × 10 4 1.12 × 10 4 7.85 × 10 6 6.50 × 10 0 3.33 × 10 1
PI   λ = 1 / 3 ,   h = 1.25 × 10 3 3.92 × 10 4 1.53 × 10 5 1.19 × 10 1 1.04 × 10 1
PI   λ = 1 / 2 ,   h = 1.25 × 10 3 3.85 × 10 4 1.29 × 10 5 8.97 × 10 0 1.06 × 10 1
PI   λ = 1 / 2 ,   h = 5 × 10 4 7.76 × 10 5 2.58 × 10 6 1.76 × 10 0 2.65 × 10 1
PI   λ = 1 ,   h = 1.25 × 10 3 4.17 × 10 4 4.70 × 10 5 3.71 × 10 1 1.00 × 10 1
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Jalghaf, H.K.; Kovács, E.; Majár, J.; Nagy, Á.; Askar, A.H. Explicit Stable Finite Difference Methods for Diffusion-Reaction Type Equations. Mathematics 2021, 9, 3308. https://doi.org/10.3390/math9243308

AMA Style

Jalghaf HK, Kovács E, Majár J, Nagy Á, Askar AH. Explicit Stable Finite Difference Methods for Diffusion-Reaction Type Equations. Mathematics. 2021; 9(24):3308. https://doi.org/10.3390/math9243308

Chicago/Turabian Style

Jalghaf, Humam Kareem, Endre Kovács, János Majár, Ádám Nagy, and Ali Habeeb Askar. 2021. "Explicit Stable Finite Difference Methods for Diffusion-Reaction Type Equations" Mathematics 9, no. 24: 3308. https://doi.org/10.3390/math9243308

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