An Explicit Finite Difference Method
T M A K Azad1 and L S Andallah2
1Department of Computer Science & Engineering, University of Liberal Arts Bangladesh, Dhaka-1209,
2Department of Mathematics,
Jahangirnagar University, Savar, Dhaka-1342, Bangladesh E-mail: [email protected]
Abstract—This paper presents a one dimensional advection diffusion equation (ADE) as a simple mathematical model for the estimation of river water pollution. The numerical solution of ADE is obtained by using explicit centered difference scheme with FTBSCS techniques for prescribed initial and boundary data which may be used to predict the contaminant concentration levels in a river. Numerical results for the scheme are compared in terms of accuracy by error estimation with an exact solution of the ADE, and also the numerical features of the rate of convergence are presented graphically. Computational result verifies the qualitative behavior of the solution of ADE for various considerations of the parameters.
Keywords—Advection Diffusion Equation, Finite Difference Scheme, Exact Solution, Stability Condition, Water pollution, Rate of Convergence.
University of Liberal Arts Bangladesh All rights reserved.
Manuscript received on 25 October 2015 and accepted for publication on 10 November 2015.
1.
I
NTRODUCTIONiver water pollution can be modeled using one di- mensional advection–diffusion equation (ADE).
This equation reflects physical phenomena where in the diffusion process particles are moving with cer- tain velocity from higher concentration to lower concen- tration. It is a partial differential equation of parabolic type, derived on the principle of conservation of mass using Fick’s 1st law. Due to the growing surface and sub- surface hydro-environment degradation and the air pol- lution, the advection–diffusion equation has drawn sig- nificant attention of hydrologists, civil engineers and ma- thematical modelers. The analytical/numerical solutions along with an initial condition and two boundary condi- tions help to understand the contaminant or pollutant concentration distribution behavior through an open me- dium like air, rivers, lakes and porous medium like aqui- fer. It has wide applications in other disciplines too, like soil physics, petroleum engineering, chemical engineering and biosciences.
Many researchers have already been worked on it.
Ogata and Banks [7] obtained an analytical solution of the one dimensional ADE by reducing the original ADE into a diffusion equation by applying moving coordinates.
Banks and Ali[12] obtained an analytical solution of the one dimensional ADE by reducing the original ADE into a diffusion equation by introducing another dependent variable. Atul Kumar, Dilip Kumar Jaiswal and Naveen Kumar [6] presented an analytical solution of the one di- mensional ADE by reducing the original ADE into a dif- fusion equation by using Laplace transformation tech- nique. Agusta and Bamingbola [8] studied on the numeri-
cal treatment of the mathematical model for water pollu- tion. This study was examined by various mathematical models invoving water pollution. The authors used the implicit centered difference scheme in space and a for- ward difference scheme in ti
mefor the evaluation of the generalized transport equa- tion.ChangiunZhu, LipingWa and Sha Li [20] presented a numerical simulation of hybrid finite analytic methods for ground water pollution. Changjun and Shuwen [21]
made a numerical simulation on river water pollution by using grey differential model. They corrected the model in finding the truncation error and found that the ob- tained results from the grey model are excellent and rea- sonable. Thongmoon and Mckibbin [14] compared some numerical methods for the advection-diffusion equation.
They reported that the finite difference methods (FTCS, Crank Nicolson) give better point-wise solutions than the spline methods. M. M. Rahman, L.S. Andallah [22] pre- sented a simulation of water pollution by finite difference method. They estimated and analyzed the extent of water pollution at different time and points.
In the present paper our intention is to investigate ma- thematical models and subsequent numerical methods to predict the contaminant concentration levels in a river at different time and different points of water bodies.
2.G
OVERNINGequation
The one-dimensional advection-diffusion equation (1) is considered as water pollution model is given as
R
A
+ = … … … . (1)
where c represents the solute concentration [ML-3] at the point x, along longitudinal direction at time t, D is the solute dispersion, if it is independent of position and time, is called dispersion coefficient [L2T-1], t = time [T]; x
= distance [L] and, u is the mean flow velocity [LT-1] as- sumed to be constant.
Appended with initial condition ( , 0) = ( )0≤ <
and boundary conditions
( = 0, ) = ( ) 0 < ≤ ( = , ) = ( ) 0 < ≤
the ADE formulates an initial boundary value problem (IBVP).
2.1ADVECTION DIFFUSION EQUATION AND ITS DERIVATION
For our model we assumed that the advection-diffusion equation may be a good first approximation to model the river pollution levels. It was also assumed that the river had a uniform cross-sectional area. Therefore, the river was assumed to be linear or one-dimensional (a pipe with a uniform cross-sectional area).
x=0 x=a x=b x=1
A one-dimensional river cross-section with arbitrary interior and end points at x=0 and x=1.
The advection-diffusion equation in one dimension is given by
= − + … … … … (2)
where, the parameters are defined as follows- c is the con- centration, x is the position on the river, t is the amount of time that passes, D is the diffusion factor, u is the velocity of the river, and f is the source or sink. The dimensions of the terms and coefficients in the equation are as follows-
= , = , =
, = , = and = .
The derivation of equation (1) is as follows-
The time rate of change in concentration amount of contaminants due to a tributary in the interval from point a to point b in the river is represented by
( , ) … … … . . (3)
whereA is the cross-sectional area of the river and f0 is the source/sink.The total amount of contaminant in the river on the interval (a, b), is given by
( , ) … … … (4)
The flux in concentration across a plane due to diffu- sion is the amount of concentration that passes through this plane due to the diffusion process. According to Fick’s Law of Diffusion, the concentration flux due to dif- fusion across any cross-section at a point a is proportional to the product of the cross-sectional area and the concen- tration gradient cx. The flux in concentration due to diffu- sion at the points a andb with cx being the concentration gradient is given by respectively.
− , ( , ) ( , ) … … … (5) and
− , ( , ) ( , ) … … … (6)
The concentration flux due to advection across any cross-section at point x is proportional to the product of the velocity, cross-sectional area, and concentration. By conservation of mass, we have
time rate of change = diffusion flux at (x=a) - diffusion flux at (x=b) + advection flux at(x=a) - advection flux at ( x=b) + sources or sinks,
or equivalently,
=− ( , ) ( , ) + , ( , ) ( , ) + ( , )− ( , )
+ ( , ) … … … (7)
Now, divide through by A and let ( ( f0 /A) = f ). Using the fundamental theorem of calculus,
( ) = ( )− ( ) … … … (8) the result is
[( ) −( ) + ( ) − ] = 0 … … … (9) The choices of points a and b are arbitrary, so the integral equation is written as the partial differential equ- ation
−( ) + ( ) = … … … (10)
Assume that there is no source or sinks holds ( f = 0 ) and let D and u be constants. The final equation appears as
+ − = 0
Implies that
+ = … … … . (11)
2.2ANALYTICAL SOLUTION
By coordinate transformation, the exact solution of the advection-diffusion equation in unbounded is given by [1]
( , ) =
√4 −( – ( + ))
4 … … … (12)
where, M = mass of the pollutant
A = cross sectional area perpendicular to x
with the initial condition c(x,0)=(M/A)(x), where (x) is the Dirac delta function.
3. N
UMERICALM
ETHOD FORG
OVERNING EQUATION We consider the one–dimensional water pollution model problem as an initial and boundary value problem.+ = … … … … (13)
With initial condition
( , ) = ( ); ≤ ≤ and boundary conditions
( , ) = ( ) ; ≤ ≤ ( , ) = ( ) ; ≤ ≤
Finite difference techniques for solving the one dimen- sional advection diffusion equation can be considered according to the number of spatial grid points involved, the number of time levels used, whether they are explicit or implicit nature.
In Mathematics, the finite difference methods (FDM) are numerical methods for solving differential equations by approximating them with difference equations, in which finite differences approximate the derivatives.
FDMs are thus discretization methods.
Today, FDMs are the dominant approach to numerical solutions of partial differential equations. Our goal is to approximate solutions to differential equations. i.e. to find a function (or some discrete approximation to this functions) which satisfies a given relationship between various of its derivatives on some given region of space/and or time, along with some boundary conditions along the edges of this domain. In general, this is a diffi- cult problem and rarely an analytic formula can be found for the solution. A finite difference method proceeds by replacing the derivatives in the differential equation by the finite difference approximations. This gives a large algebraic system of equation to be solved in place of the differential equation, something that is easily solved on a computer.
3.1EXPLICIT CENTERED DIFFERENCE SCHEME BY
FTBSCS TECHNIQUES
Consider the model equation + = … … … (14) In order to develop the scheme, we discretize the x-t plane by choosing a mesh width hx space size and a time step size kt. The finite difference methods, we will develop, produce approximations ∈ to the solution
( , ) in the discrete points by
= ℎ, = 0, 1, 2, 3, … … …
= , = 0, 1, 2, 3, … … …
Let the solution ( , ) be denoted by and its approx- imate value by .
By Explicit upwind time difference formula
= −
∆ … … … (15) Next use the backward space difference formula
= −
∆ … … … (16) And centered space difference formula
= −2 +
∆ … … … (17)
Substituting equations (15 - 17) into equation (14) and rearrange according the time level, lead to
−
∆ + −
∆ = −2 +
∆ Which leads to
= − ∆
∆ ( − ) + ∆
∆ ( −2 + )
∴ = ∆
∆ + ∆
∆ + 1− ∆
∆ −2 ∆
∆
+ ∆
∆ Implies to
= ( +)∗ + (1− −2∗)∗ + ∗ … … … (18) In which
= ∆
∆ , = ∆
∆
3.2STABILITY CONDITIONS FOR THE SCHEME BY FTBSCS
TECHNIQUES
The explicit centered difference scheme for (14) is given by
= ( +)∗ + (1− −2∗)∗ + ∗ … … … (19) In which
= ∆
∆ , = ∆
∆ The equation (19) implies that if
0≤ +≤1… … … (i) 0≤1− −2≤1 … … … (ii)
0≤≤1 … … … (iii)
then the new solution is a convex combination of the two previous solutions. That is, the solution at new time-step (n+1) at a spatial node i is an average of the solutions at the previous time-step at the spatial-nodes i-1, i and i+1.
This means that the extreme value of the new solution is the average of the extreme values of the previous two solutions at the three consecutive nodes. Therefore, the new solution continuously depends on the initial value
, = 1, 2, 3, … … … . .
(ii) implies ≤1−2≤1 + … … … (iv) (i) implies−≤ ≤1−
∴ −≤ ≤1−2by (iv) Therefore,
the conditions are 0≤≤1 and −≤ ≤1−2
That is,0≤ ∆
∆ ≤1 and − ∆
∆ ≤ ∆
∆ ≤1−2 ∆
∆ are the st ability conditions of (19).
4. A
LGORITHM FOR THE NUMERICAL SOLUTION To find the numerical solution of the model, we have to accumulate some variables which are offered in the fol- lowing algorithm.Input:nx and ntare the number of spatial and temporal mesh points respectively.
t, the right end of (0, T) x , the right end point of (0, b)
C , the initial concentration density, apply as initial condition
C , left hand boundary condition C , right hand boundary condition D, diffusion rate
u, velocity
Output:C(x, t), the solution matrix
Initialization: = , the temporal grid size
= , the spatial grid size
= ∗ ,the courant number
= ∗
( ) (peclet number)
Step 1. Calculation for concentration profile of explicit centered difference scheme
forn=1 to nt fori=2 to nx
( + 1, ) = (+)∗ ( , −1) + (1−−2∗)∗ ( , ) +∗ ( , + 1)
end end
Step 2: output C(x, t) Step 3: Figure Presentation Step 4: Stop
5. C
OMPUTATIONALR
ESULTS5.1.ERROR ESTIMATION AND CONVERGENCE
We have discussed two types of explicit finite difference schemes in the previous sections.
Now, we compute the relative error of the explicit differ ence scheme by using FTBSCS technique which is defined by the relative error in L −norm as
=∥ − ∥
∥ ∥ . … … … (20)
where, is the exact solution and is the numerical solu- tion computed by the finite difference scheme by FTBSCS techniques for time ∈[0, 6].
The following figure 5.1 shows the convergence of rel- ative error by the scheme FTBSCS techniques.
Numerical computation of ADE is presented by using explicit finite difference methods by FTBSCS techniques and compared with an exact solution of the ADE. A good agreement between the numerical solutions and the ana- lytical solutions are obtained and the error becomes clear
when using large size step for time. The choice of smaller discretization parameters (δtand δx) produce less errors.
However we can say that FTBSCS techniques show the stable and accurate solutions for the advection diffusion equation.
Figure 5.1 Rate of Numerical feature of Convergence.
5.2NUMERICAL SIMULATION AND RESULTS DISCUSSIONS
This section presents the numerical simulation results for pollutant transportation in river water with increasing water flow velocity and increasing diffusion coefficient.
To test the accuracy of the numerical scheme by FTBSCS technique for the ADE, we implement the model for some artificial data for the transport of the pollutant in the river water. Our aim is to show that for the water pollution, any substance with bigger diffusion results a wider pollu- tant front or a bigger diffusion distance. For different coefficients ranging from 9m2/s to 25 m2/s, as shown in figures 5.2 to 5.4.
Problem description: Estimation of pollutant in a river of length=600 m=0.6 km at all time t = 1min to t = 6 min.
If u =1 m/s = 3.6 km/h and D = 25 m2/s at time from 1 min to 6 min, for the numerical scheme FTBSCS technique is shown in Figure 5.2. Which shows that the pollutant distribution within the described domain.
0 50 100 150 200
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014
Convergence of Relative Error for FTBSCS
Temporal co-ordinate (t)
Relative Erro
r
Figure 5.2:1D ADE with u = 1 m/s = 3.6 km/h and D = 9 m2/s.
The curve marked by “solid line” shows the concentra- tion profile for 1 minute (left), the curve visible by “dash line” represents the concentration profile for 2 mi- nutes(left). The curve “dot line” shows the concentration profile for 3 minutes, the curve visible by “dash-dot line”
represents the concentration profile for 4 minutes, The
“solid line” curve shows the concentration profile for 5 minutes (right) and the curve visible by “dash line”
represents the concentration profile for 6 minutes(right).
We have seen that the pollutant concentration is increas- ing with respect to time increasing.
Now, we observe the following different figures for different diffusion coefficients and for different velocities.
If u = 1 m/s = 3.6 km/h and varying the diffusion rate a time t = 6 min, the solution appeared is given below:
Figure 5.3:1D ADE with u=1 m/s=3.6 km/h and varying the diffusion rate at time 6 min.
If D = 9 m2/s and varying the velocity at time 6 min, the solution appeared is given below:
Figure 5.3:1D ADE with diffusion D = 9 m2/s = 3.6 km/h and varying the velocity at time 6 min.
If varying both velocity and diffusion coefficient at time 6 min, the solution appeared is given below:
Figure 5.4:1D ADE with varying both the velocity and diffusion at time 6 min.
As we know the stability conditions of the scheme by FTBSCS technique are 0≤ ∆
∆ ≤1and − ∆
∆ ≤ ∆
∆ ≤1− 2 ∆
∆ , this course of action will be continued until this sta- bility conditions are satisfied. From this conditions, we have the diffusivity coefficient ranges from D = 9 m2/s to 25 m2/s and the velocity ranges from 1 m/s to 1.4 m/s.
6. C
ONCLUSIONIn this paper, analytical solutions and numerical solutions for 1D advection diffusion equation, with an initial condi- tion and two boundary conditions, have been presented.
The ADE has been considered as model equation for es- timation of water pollution by using explicit finite differ- ence scheme (FTBSCS techniques). We have computed
0 100 200 300 400 500 600
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Spatial co-ordinate (x)
Mass fraction(cn
)
Numerical solution of 1D ADE taking u=1 m/s, D=16 m2/s
1 min 2 min 3 min 4 min 5 min 6 min
0 100 200 300 400 500 600
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Spatial co-ordinate (x)
Mass fraction(cn)
Numerical solution of 1D ADE at different diffusion rate
u=1 m/s, D=9 m2/s u=1 m/s, D=16 m2/s u=1 m/s, D=25 m2/s
0 100 200 300 400 500 600
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Spatial co-ordinate (x)
Mass fraction(cn)
Numerical solution of 1D ADE at different velocity
u=1 m/s, D=9 m2/s u=1.2 m/s, D=9 m2/s u=1.4 m/s, D=9 m2/s
0 100 200 300 400 500 600
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Spatial co-ordinate (x)
Mass fraction(cn
)
Numerical solution of 1D ADE varying both the velocity and diffusion rate
u=1 m/s, D=9 m2/s u=1.2 m/s, D=16 m2/s u=1.4 m/s, D=25 m2/s
relative errors for the scheme which shows a good rate of convergence of the numerical scheme. So, the scheme (FTBSCS techniques) for ADE is stable and consistent.
Also, we have presented the numerical solutions graphically by varying the value of velocity and value of diffusion coefficient. The graphical presentations are veri- fying the qualitative behavior of the solutions of ADE for various considerations of the parameters. The results show that the water pollutions are spreading with vary- ing the diffusion term and advection term with respect to time and space.
This method can be extended for higher dimensional ADE as a water pollution model which demands the fur- ther study.
REFERENCES
[1] Scott A. Socolofsky& Gerhard H. Jirka, “Environmental Fluid Mechanics”, part 1, 2nd Edition, 2002.
[2] John D. Anderson JR, “Computational Fluid Dynamics”.
[3] Yijun Liu, “Introduction to the Finite Element Method”, lecture Notes; University of Cincinnati, U.S.A.
[4] Anderson, Mary P., and William W. Woessner. “Applied Groundwater Modeling, Simulation of Flow and Advective- Transport”. Academic Press Inc., San Diego, 1992. pp: 6-68.
[5] Bender, Edward A. “An Introduction to Mathematical Modeling”.
John Wiley &Sons Inc., New York, 1978. pp: 1-140.
[6] Atul Kumar, Dilip Kumar Jaiswal and Naveen Kumar,“Analytical solution of one dimensional Advection diffusion equation with variable coefficients in a finite domain”, J.Earth Syst. Sci.118, No.5, pp: 539-549, October 2009.
[7] Ogata A, Banks RB.,”A Solution of the differential equation of longitudinal dispersion in porous media”, US Geological Survey, Paper 1961; 411-A; 1961.
[8] F.B. Agusto and O. M. Bamingbola, “Numerical Treatment of the Mathematical Models for Water Pollution”, Research Journal of Applied Sciences 2(5), pp: 548-556, 2007.
[9] Young-San Park, Jong-JinBaik,”Analytical solution of the advec- tion diffusion equation for a ground level finite area source”, At- mospheric Environment 42, 9063-9069, 2008.
[10] Al-Niami A N S and Ruston K R 1977, “Analysis of flow against dispersion in porous media”, J.Hydrol. 3387-97.
[11] Aral M M and Liao B 1996, “Analytical solutions for two- dimensional transport equation with time-dependent dispersion coefficients; J. Hydrol. Engg. 1(1), pp: 20-32.
[12] Banks R B and Ali J 1964, “Dispersion and adsorption in porous media flow”, J. 90, pp: 13- 31.
[13] Nicholas J.Higham, “Accuracy and stability of Numerical Algo- rithms”, Society of Industrial and Applied Mathematics, Phila- delphia, 1996.
[14] M. Thongmoon and R. Mckibbin, “A comparison of some nu- merical methods for the advection-diffusion equation”, Int. Math.
Sci. 2006, Vol. 10, pp: 49-52.
[15] L.F. Leon, P.M. Austria, “Stability Criterion for Explicit Scheme on the solution of Advection-Diffusion Equation”, Maxican Insti- tute of Water Technology.
[16] Randall J. Leveque, “Numerical methods for conservation laws”, second edition, 1992, Springer.
[17] Donea J, Guilinai S, Laval H. Quartpelle, “Time accurate solu- tion of advection-diffusion problems by finite elements”. Comput Methods ApplMechEng 1984; 45; pp: 123-45.
[18] S G Ahmed, “A Numerical Algorithm for solving Advection- Diffusion Equation with Constant and Variable Coefficients”.
Department of Engineering Physics and Mathematics, Faculty of Engineering,Zagazig University, Egypt.
[19] Romao, Silva and Moura, “Error analysis in the numerical solu- tion of 3D convection diffusion equation by finite difference me- thods”. Thermal technology, vol-08, pp: 12-17, 2009.
[20] Changiun Zhu, LipingWa and Sha Li, “A numerical Simulation of Hybrid Finite Analytic Methods For Ground Water Pollution”.
Advanced Materials Research Vol. 121-122(2010),pp: 48-51.
[21] Changjun Zhu and Shuwen Li, “A numerical Simulation of River Water Pollution using Grey Differential Model”. Journal of Com- puter, No.9, September 2010.
[22] M. M. Rahman, L.S. Andallah, “Simulation of Water Pollution by Finite Difference Method”, IJRT International Journal of Re- search in Information Technology, Volume 2, Issue 1, January 2014, pp: 17-24.
T. M. Abul Kalam Azad was born on February 15, 1966 in Sirajgonj, Bangladesh. He received his M.Phil degree on Ring Theory, M.Sc and B.Sc (Hons) degrees from the Department of Mathematics, Raj- shahi University. He has been working in the Department of Com- puter Science and Engineering, University of Liberal Arts Bangla- desh (ULAB), Dhaka from 2010 as a full time faculty. Previously, he worked at home, ‘Rajshahi University of Engineering & Technology (RUET)’, and abroad. Now, he is doing his PhD degree on Computa- tional fluid dynamics in the Department of Mathematics, Jahangirna- gar University. He has published a number of papers in peer- reviewed international and national journals. He is a life member of Bangladesh Mathematical Society.
Laek Sazzad Andallah was born on July 12, 1967 in Nilphamari, Bangladesh. He received his PhD degree on Applied Mathematics from TU Ilmenau Institute, Germany and M.Sc degree on industrial Mathematics from University of Kaiserslautern, Germany. He re- ceived his M.Sc and B.Sc (hons) degrees from the Department of Mathematics, Jahangirnagar University. He joined at the Department of Mathematics, Jahangirnagar University on 1992 as teaching as- sociate. Now, he is working in the same department as a professor.
He has published a number of papers in peer-reviewed international and national journals and presented original research articles in numerous international conferences. He received various scholar- ships, research and travel grants as recognition of his research works. He is a member of Bangladesh Mathematical Society.