You are on page 1of 4

International Journal of Heat and Mass Transfer 55 (2012) 4291–4294

Contents lists available at SciVerse ScienceDirect

International Journal of Heat and Mass Transfer


journal homepage: www.elsevier.com/locate/ijhmt

Finite difference solution of the one-dimensional advection–diffusion equation


with variable coefficients in semi-infinite media
Svetislav Savović a,⇑, Alexandar Djordjevich b
a
Faculty of Science, R. Domanovića 12, 34000 Kragujevac, Serbia
b
City University of Hong Kong, 83 Tat Chee Avenue, Kowloon, Hong Kong, China

a r t i c l e i n f o a b s t r a c t

Article history: One-dimensional advection–diffusion equation with variable coefficients in semi-infinite media is solved
Received 1 March 2012 using explicit finite difference method for three dispersion problems: (i) solute dispersion along steady
Accepted 29 March 2012 flow through inhomogeneous medium, (ii) temporally dependent solute dispersion along uniform flow
Available online 18 April 2012
through homogeneous medium, and (iii) solute dispersion along temporally dependent unsteady flow
through inhomogeneous medium. The continuous point source of uniform nature is considered at the
Keywords: origin of the medium. Results are compared to analytical solutions reported in the literature and good
Advection–diffusion equation
agreement was found. We have shown that explicit finite difference method is effective and accurate
Finite difference method
for solving advection–diffusion equation with variable coefficients in semi-infinite media, which is espe-
cially important when arbitrary initial and boundary conditions are required.
Ó 2012 Elsevier Ltd. All rights reserved.

1. Introduction analytical solutions of hydro-dynamic dispersion are available only


for special cases [2–6]. Numerical solutions have to be obtained for
With respect to the importance of hydro-dynamic dispersion realistic engineering problems [7–10].
process studies in water quality management and pollution con- Most of the secondary pollutants formed in the air, surface
trol, particularly in aquifers, dispersion has been referred to as a water, or groundwater by chemical interactions among primary
hydraulic mixing process by which waste concentrations are atten- pollutants (emitted from the source) and normal medium constit-
uated while the waste pollutants are being transported down- uents cause dispersion of solute particles along uniform flow to be
stream. The concentration distribution in space and time is time dependent. Moreover, some large subsurface formations
described by a partial differential equation of parabolic type exhibit variable dispersivity properties as a function of time and/
known as the advection–diffusion equation. This equation is simi- or distance along uniform flow. It may also happen with a certain
larly important in studies of soil physics, bio-physics, petroleum tracer (e.g. fertilizer nutrients or pesticides) for its ability to diffuse
engineering, and chemical engineering, to name a few. For exam- along a uniform flow of the medium (soil column) to be increasing
ple, it could be used to assess concentration levels, at a particular or decreasing with time, thus further emphasising the time-
location and in a particular season, of male gametophytes (pollen dependent character of the process. Hence, one-dimensional
grains) of parthenium (carrot grass) or other air pollutants includ- advection–diffusion equation with variable coefficients [11] is
ing suspended particulate matter that cause bronchial disorders. solved in this work in semi-infinite media using explicit finite
The same equation could also be used to determine concentration difference method. The solution is given for three dispersion prob-
levels of toxic, reactive or radioactive pollutants (such as those lems: (i) solute dispersion along steady flow through inhomoge-
from uranium ore) causing serious depletion of water organisms neous medium, (ii) temporally dependent solute dispersion along
(flora and fauna) in a downstream body of a water [1]. Such studies uniform flow through homogenous medium, and (iii) solute dis-
play an important role in the understanding and implementation persion along temporally dependent unsteady flow through inho-
of the remedial environmental management. mogeneous medium. Such studies can facilitate, among others,
In the context of pollution dispersion along groundwater, this degradation-assessments of air and water environments, including
equation has been solved analytically and numerically using appro- underground hydro-environments, that are subject to the advec-
priate initial and boundary conditions. Even in one-dimension, tive diffusive transport of pollutant tracers from point sources. A
smokestack or drainage outlet in a riverbed, are examples of these
point sources. Problems extending beyond manmade pollution
⇑ Corresponding author. Fax: +381 34 335040. could similarly be analyzed, like the salt water intrusion, or
E-mail address: savovic@kg.ac.rs (S. Savović). evapotranspiration.

0017-9310/$ - see front matter Ó 2012 Elsevier Ltd. All rights reserved.
http://dx.doi.org/10.1016/j.ijheatmasstransfer.2012.03.073
4292 S. Savović, A. Djordjevich / International Journal of Heat and Mass Transfer 55 (2012) 4291–4294

2. Advection–diffusion equation where m is a coefficient having dimension reciprocal to time. Hence,


D0 and u0 in Eq. (2) may be referred to as the initial dispersion coef-
A one-dimensional advection–diffusion partial differential ficient and uniform velocity, respectively, whereas m may be con-
equation is [11]: sidered proportional to ðu20 =D0 Þ. For the initial condition (4) and
  boundary conditions (5) and (6), analytical solution of advection–
@Cðx; tÞ @ @Cðx; tÞ
¼ Dðx; tÞ  uðx; tÞCðx; tÞ ð1Þ diffusion equation (2) is [11]:
@t @x @x " ! !#
x   x
C0  u0 T
f ðmtÞ u0 x þ u0 T
f ðmtÞ
where C(x, t) is the dispersing solute concentration at position x Cðx; tÞ ¼ erfc pffiffiffiffiffiffiffiffiffi þ exp erfc pffiffiffiffiffiffiffiffiffi
along the longitudinal direction at time t. When D and u are con-
2 2 D0 T D0 f ðmtÞ 2 D0 T
stants, they are then called dispersion coefficient and uniform flow ð9Þ
velocity, respectively. Eq. (1) can be rewritten as:
where T can be written in terms of t using the following transforma-
 
@Cðx; tÞ @ @Cðx; tÞ tion for an expression of f(mt):
¼ D0 f1 ðx; tÞ  u0 f2 ðx; tÞCðx; tÞ ð2Þ Z
@t @x @x t
dt
T¼ ð10Þ
In the above equation, D0 and u0 are constants whose dimensions 0 f ðmtÞ
depend upon the expressions f1(x, t) and f2(x, t). Analytical solutions
of Eq. (2) have been reported recently for the following three hydro-
2.3. Dispersion along unsteady flow through inhomogeneous medium
dynamic dispersion problems [11]: (i) solute dispersion through
inhomogeneous medium, (ii) temporally dependent solute disper-
To predict the concentration along an unsteady flow through
sion along uniform and steady flow, and (iii) dispersion along un-
inhomogeneous medium, it is assumed here that the inhomogene-
steady flow through inhomogeneous medium. These solutions
ity causes a linear increase in velocity defined by Eq. (3), and that
pertain to the semi-infinite medium that is solute free initially. A
dispersion is proportional to square of the velocity [16]. Moreover,
continuous point source of uniform nature is then introduced at
as flow varies with time, dispersion has a similar temporal depen-
the origin of the medium.
dence. Therefore, the following expressions in (1) are considered in
degenerate forms [11]:
2.1. Dispersion through inhomogeneous medium
f1 ðx; tÞ ¼ f ðmtÞð1 þ axÞ2 and f 2 ðx; tÞ ¼ f ðmtÞð1 þ axÞ ð11Þ
The inhomogeneity of the medium causes variation in the flow In the case with a uniform input and for the initial condition (4) and
velocity. A variation of increasing nature has been considered by boundary conditions (5) and (6), the solution is the same as that for
Rt
Kumar et al. [11]. It is also assumed that the dispersion parameter (7). The only difference is that T ¼ 0 f ðmtÞdt replaces the time
is proportional to square of the velocity. Thus for Eq. (2), it is: variable t.

f1 ðx; tÞ ¼ ð1 þ axÞ2 and f 2 ðx; tÞ ¼ ð1 þ axÞ ð3Þ


3. Numerical method
1
where the parameter a with dimension of (length) accounts for
the medium inhomogeneity. The initially solute-free state of the Analytical solutions of advection–diffusion equations with lim-
semi-infinite medium implies the following initial condition: ited initial and boundary conditions have limited applicability and
are very lengthy. Employing numerical methods does not have
Cðx; tÞ ¼ 0; x P 0; t¼0 ð4Þ
such limitations and also offers flexibility, especially for arbitrary
Because a continuous input concentration is introduced at the ori- initial distribution and boundary conditions [13,14].
gin, whereas the concentration gradient at infinity is assumed to In order to use the explicit difference method to solve Eq. (2),
be zero, the following boundary conditions are obtained: this equation is first rewritten in the following form:
 
Cðx; tÞ ¼ C 0 ; x ¼ 0; t>0 ð5Þ @Cðx; tÞ @f1 ðx; tÞ @Cðx; tÞ
¼ D0  u0 f2 ðx; tÞ þ D0 f1 ðx; tÞ
@Cðx; tÞ @t @x @x
¼ 0; x ! 1; tP0 ð6Þ
@x @ 2 Cðx; tÞ @f2 ðx; tÞ
  u0 Cðx; tÞ ð12Þ
Analytical solution of the advection–diffusion equation (2) under @x2 @x
these conditions is [11]: Procedure for solving Eq. (12) using explicit finite difference meth-
     od (EFDM) will be shown next. To facilitate verification, this will be
C0 lnð1 þ axÞ pffiffi lnð1 þ axÞ pffiffi
Cðx; tÞ ¼ ð1 þ axÞ1 erfc pffiffiffiffiffiffiffiffi  b t þ ð1 þ axÞd erfc pffiffiffiffiffiffiffiffi þ b t done on the same three dispersion problems that were recently
2 2a D0 t 2a D0 t
solved analytically by Kumar et al. [11].
ð7Þ

where 3.1. Dispersion through inhomogeneous medium


sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
x20 u0 þ aD0 u0 For the case of a solute dispersion with f1(x, t) = (1 + ax)2,
x0 ¼ ðau0  a2 D0 Þ; b ¼ þ au0 ¼ pffiffiffiffiffiffi and d ¼
4a2 D0 2 D0 aD0 through an inhomogeneous, semi-infinite, and initially solute-free
medium with f2(x, t) = (1 + ax), in the presence of a continuous in-
put concentration at the origin of the domain, and with the vanish-
2.2. Temporally dependent dispersion along uniform and steady flow
ing concentration gradient in the infinity (6) [11], Eq. (12) can be
written as:
Temporally dependent solute dispersion from a continuous
uniform point source is considered along a uniform and steady
@Cðx; tÞ @Cðx; tÞ
longitudinal flow in a semi-infinite, homogeneous, and initially ¼ ½ð1 þ axÞð2aD0  u0 Þ þ D0 ð1 þ axÞ2
solute-free medium. As in the previous studies [10,12]: @t @x
@ 2 Cðx; tÞ
f1 ðx; tÞ ¼ f ðmtÞ and f 2 ðx; tÞ ¼ 1 ð8Þ   u0 aCðx; tÞ ð13Þ
@x2
S. Savović, A. Djordjevich / International Journal of Heat and Mass Transfer 55 (2012) 4291–4294 4293

As already stated, the EFDM is applied to solve the diffusion Eq. The initial condition (4) and boundary conditions (5) and (6) can in
(13). The central difference scheme was used to represent the term the finite difference form be expressed by Eqs. (16)–(18),
ð@ 2 Cðx; tÞ=@x2 Þ and ð@Cðx; tÞ=@xÞ and a forward difference scheme for respectively.
the derivative term ð@Cðx; tÞ=@tÞ [15]. With these substitutions, If, on the other hand, f1(x, t) = f(mt) = (1 + mt)1, then Eq. (12) in
Eq. (13) transforms into: its final-difference form can be expressed as:
C i;jþ1 ¼ ðEi  F i ÞC i1;j þ ð1  2Ei  GÞC i;j þ ðEi þ F i ÞC iþ1;j ð14Þ C i;jþ1 ¼ ðM i;j  Ni;j ÞC i1;j þ ð1  2Mi;j  Pj ÞC i;j þ ðMi;j
where indexes i and j refer to the discrete step lengths Dx and Dt for þ Ni;j ÞC iþ1;j ð23Þ
the coordinate x and time t, respectively, and where
where
D0 ð1 þ axi Þ2 Dt ð2aD0  u0 Þð1 þ axi ÞDt
Ei ¼ ; Fi ¼ ; G ¼ u0 aDt ð15Þ
Dx2 2Dx D0 ð1 þ axi Þ2 Dt ð2aD0  u0 Þð1 þ axi ÞDt
M i;j ¼ ; Ni;j ¼ ;
Eq. (14) represents a formula for Ci,j+1 at the (i, j + 1)th mesh point in ð1 þ mt j ÞDx2 ð1 þ mt j Þ2Dx
ð24Þ
terms of known values along the jth time row. The truncation error u0 aDt
Pj ¼
for the difference Eq. (5) is O(Dt, Dx2). Using a small-enough value ð1 þ mt j Þ
of Dt and Dx, the truncation error can be reduced until the accuracy
The initial condition (4) and boundary conditions (5) and (6) in the
achieved is within the error tolerance [15].
finite difference form in this case are given by Eqs. (16)–(18),
The initial condition (4) for Eq. (13) can be expressed in the
respectively.
finite difference form as:
C i;0 ¼ 0; x P 0; t¼0 ð16Þ
4. Numerical and analytical results
Boundary conditions (5) and (6) rewritten in the finite difference
form are: Numerical solutions of the first problem obtained by solving Eq.
(13) using EFDM are shown in Fig. 1 for the same set of input data
C 0;j ¼ C 0 ; x ¼ 0; t>0 ð17Þ previously used by Kumar et al. [11] C0 = 1.0, D0 = 0.71 km2/year,
C N;j ¼ C N1;j ; x ! x1 ; tP0 ð18Þ u0 = 0.60 km/year and a = 1 km1. The concentration values are
shown in longitudinal region 0 6 x 6 1 km at different times. In
where N = x1/Dx is the grid dimension in the x direction and x1 is
Eq. (18), we used x1 = 20 km as the distance at which there is no
the distance in direction x at which oC/ox = 0 (x1 replaces x ? 1
further change in the concentration C(x, t) (the same value for x1
in Eq. (3)).
is used for all three problems analyzed). Increasing x1 further
affected the solution only slightly but greatly increased the grid
3.2. Temporally dependent dispersion along uniform and steady flow
size and, therefore, the computation time. In the numerical calcu-
lations, the step lengths Dz = 0.1 km and Dt = 0.0001 year have
In the case with a temporally dependent solute dispersion from
been used to achieve the stability of the finite difference scheme.
a continuous uniform point source along a uniform and steady flow
In Fig. 1, filled squares represent analytical solution (7) of the
in a longitudinal semi-infinite homogeneous and initially solute
advection–diffusion Eq. (2). A good agreement between the numer-
free medium, the following form of the advection–diffusion equa-
ical and analytical solution is obtained. The deviations are less than
tion (12) is obtained considering that f1(x, t) = f(mt) = exp(mt) in (8)
0.05% (the same accuracy has been achieved in all the three prob-
[11]:
lems analyzed).
@Cðx; tÞ @Cðx; tÞ @ 2 Cðx; tÞ Fig. 2 shows the numerical solution for the second problem ob-
¼ u0 þ D0 expðmtÞ ð19Þ
@t @x @x2 tained by solving Eq. (13) using EFDM. The input data was C0 = 1.0,
D0 = 1.71 km2/year, u0 = 1.60 km/year and m = 0.1 year1 [11]. In
Eq. (19) in the finite difference form can be written as:
the numerical calculations, the step lengths Dz = 0.1 km and
C i;jþ1 ¼ ðHj  IÞC i1;j þ ð1  2Hj ÞC i;j þ ðHj þ IÞC iþ1;j ð20Þ Dt = 0.00001 year have been used to achieve the stability of the fi-
nite difference scheme.
where
Fig. 3 shows the numerical solution for the third problem ob-
D0 expðmtj ÞDt u0 Dt tained by solving Eq. (13) using EFDM, where f(mt) = 1  sin(mt)
Hj ¼ ; I¼
Dx2 2Dx is assumed. The concentration values are shown in longitudinal
The initial condition (4) and boundary conditions (5) and (6) in the region 0 6 x 6 1 km for different times. The following input data
finite difference form in this case are given in Eqs. (16)–(18),
1.0
respectively.
0.9
0.8 t=0.7 (yr)
3.3. Dispersion along unsteady flow through inhomogeneous medium t=1.0 (yr)
0.7
t=1.3 (yr)
0.6
Assuming an unsteady flow through an inhomogeneous med-
c/c0

ium that varies with time as f1(x, t) = f(mt) = (1  sin(mt)), for the 0.5
linear and quadratic relations defined by (3) [11,16], Eq. (12) can 0.4
t=0.1 (yr) t=0.4 (yr)
be written in its final-difference form as: 0.3
0.2
C i;jþ1 ¼ ðJ i;j  K i;j ÞC i1;j þ ð1  2J i;j  Lj ÞC i;j þ ðJ i;j þ K i;j ÞC iþ1;j ð21Þ
0.1
where 0.0
0.0 0.2 0.4 0.6 0.8 1.0
2
D0 ð1 þ axi Þ ð1  sin mt j ÞDt ð2aD0  u0 Þð1 þ axi Þð1  sin mt j ÞDt x (km)
J i;j ¼ ; K i;j ¼ ;
D x2 2Dx
Fig. 1. Numerical solution for the solute dispersion with uniform input along a flow
Lj ¼ u0 að1  sin mt j ÞDt
of velocity u = u0(1+ax) and D / u2, for a = 1.0 km1. Solid squares represent
ð22Þ analytical solution.
4294 S. Savović, A. Djordjevich / International Journal of Heat and Mass Transfer 55 (2012) 4291–4294

1.0 and m = 10 year1. It can be observed from Figs. 3 and 4 that a


t=0.50 (yr) t=0.65 (yr) slower increase in solute concentration along unsteady flow
0.9
0.8 through an inhomogeneous medium is obtained in the case when
0.7 f(m, t) is the inverse function of time relative to the case when
0.6 f(m, t) is a periodic function of time.
t=0.35 (yr) It is evident that any expressions deemed appropriate for f1(x, t)
0.5 t=0.2 (yr)
c/c0

0.4
t=0.05 (yr) and f2(x, t) may be employed in Eq. (2) in place of the ones used
above to illustrate the explicit finite difference approach to model-
0.3
ing of three problems of hydro-dynamic dispersion.
0.2
0.1
0.0 5. Conclusion
0.0 0.2 0.4 0.6 0.8 1.0
x (km) Numerical solutions using explicit finite difference method are
obtained for one-dimensional advection–diffusion equation with
Fig. 2. Numerical solution for the temporally dependent dispersion from a uniform
variable coefficients in semi-infinite media for three dispersion
input and along a uniform flow for f(mt) = exp(mt), for m = 0.1 year1. Solid squares
represent analytical solution. problems: (i) solute dispersion along steady flow through inhomo-
geneous medium, (ii) temporally dependent solute dispersion along
uniform flow through homogenous medium, and (iii) solute disper-
1.0
sion along temporally dependent unsteady flow through inhomoge-
0.9
neous medium. The continuous point source of uniform nature is
0.8 t=0.8 (yr)
t=1.1 (yr) considered at the origin of the medium. Results are compared to ana-
0.7 lytical solutions reported in the literature and good agreement was
t=1.4 (yr)
0.6 found. The explicit finite difference method used in this work for
0.5 solving advection–diffusion equation with variable coefficients in
c/c0

0.4 semi-infinite media can be used with arbitrary initial and boundary
t=0.2 (yr) t=0.5 (yr)
0.3 conditions as well as with variations of dispersion and velocity.
0.2
0.1
Acknowledgment
0.0
0.0 0.2 0.4 0.6 0.8 1.0
The work described in this paper was supported by the Serbian
x (km)
Ministry of Education and Science under Grant No. 171011.
Fig. 3. Concentration distribution pattern of uniform continuous input along a
sinusoidally varying, unsteady flow f(mt) = 1  sin(mt), for m = 10.0 year1, through
References
inhomogeneous medium. Solid squares represent analytical solution.

[1] C.S. Rao, Environmental Pollution Control Engineering, 3rd reprint, 1995, Wiley
Eastern Ltd., New Delhi.
1.0
[2] E.H.Ebach, R. White, Mixing of fluids flowing through beds of packed solids, J.
0.9 Am. Inst. Chem. Eng. 4 (1958) 161–164.
0.8 [3] V.A. Fry, J.D. Istok, R.B. Guenther, Analytical solutions to the solute transport
equation with rate-limited desorption and decay, Water Resour. Res. 29 (1993)
0.7 3201–3208.
t=0.8 (yr)
0.6 t=1.1 (yr) [4] C. Lin, W.P. Ball, Analytical modeling of diffusion-limited contamination and
decontamination in a two-layer porous medium, Adv. Water Resour. 21 (1998)
0.5
c/c0

t=1.4 (yr) 297–313.


0.4 [5] J.S. Chen, C.W. Liu, C.M. Liao, Two-dimensional Laplace-transformed power
t=0.2 (yr) series solution for solute transport in a radially convergent flow field, Adv.
0.3
t=0.5 (yr) Water Resour. 26 (2003) 1113–1124.
0.2 [6] S. Neelz, Limitations of an analytical solution for advection–diffusion with
0.1 variable coefficients, Commun. Numer. Methods Eng. 22 (2006) 387–396.
0.0 [7] H. Karahan, Implicit finite difference techniques for the advection–diffusion
0.0 0.2 0.4 0.6 0.8 1.0 equation using spreadsheets, Adv. Eng. Software 37 (2006) 601–608.
[8] Q. Huang, G. Huang, H. Zhan, A finite element solution for the fractional
x (km) advection–dispersion equation, Adv. Water Resour. 31 (2008) 1578–1589.
[9] C. Zhao, S. Valliappan, Transient infinite element for contaminant transport
Fig. 4. Concentration distribution pattern of uniform continuous input along a problems, Int. J. Numer. Methods Eng. 37 (1994) 113–1158.
temporally dependent, unsteady flow f(mt) = (1 + mt)1, where m = 10.0 year1, [10] C. Zhao, S. Valliappan, Numerical modelling of transient contaminant migration
through inhomogeneous medium. Solid squares represent analytical solution. problems in infinite porous fractured media using finite/infinite element
technique: theory, Int. J. Numer. Anal. Methods Geomech. 18 (1994) 523–541.
[11] A. Kumar, D.K. Jaiswal, N. Kumar, Analytical solutions to one-dimensional
was used C 0 = 1.0 and D 0 = 0.71 km2 /year, u 0 = 0.6 km/year, advection–diffusion equation with variable coefficients in semi-infinite media,
J. Hydrol. 380 (2010) 330–337.
a = 1 km1 and m = 10 year1 [11]. In numerical calculations, step
[12] D.K. Jaiswal, A. Kumar, N. Kumar, R.R. Yadav, Analytical solutions for
lengths were Dz = 0.1 km and Dt = 0.0001 year to achieve the sta- temporally and spatially dependent solute dispersion of pulse type input
bility of the finite difference scheme. It can be seen from Figs. 1 concentration in one-dimensional semi-infinite media, J. Hydroenviron. Res. 2
and 3 that almost the same solute concentration profiles are (2009) 254–263.
[13] S. Savović, J. Caldwell, Finite difference solution of one-dimensional Stefan
obtained for the first and third problem, with slightly longer times problem with periodic boundary conditions, Int. J. Heat Mass Transfer 46
in the latter case. In fact, the influence of the sinusoidal unsteadi- (2003) 2911–2916.
ness in the solute transport along inhomogeneous medium results [14] S. Savović, J. Caldwell, Numerical solution of Stefan problem with time-
dependent boundary conditions by variable space grid method, Therm. Sci. 13
in only a slight delay in the development of the solute concentration (2009) 165–174.
profiles in comparison to the case without this unsteadiness. [15] J.D. Anderson, Computational Fluid Dynamics, McGraw-Hill, New York, 1995.
Fig. 4 shows the numerical solution for the third problem ob- [16] A.E. Scheidegger, The Physics of Flow through Porous Media, University of
Toronto Press, Toronto, 1957.
tained by solving Eq. (13) using EFDM, where f(mt) = (1 + mt)1

You might also like