Professional Documents
Culture Documents
net/publication/230354478
CITATIONS READS
11 461
1 author:
Halil Karahan
Pamukkale University
46 PUBLICATIONS 821 CITATIONS
SEE PROFILE
All content following this page was uploaded by Halil Karahan on 09 January 2020.
147
148 KARAHAN
modified equivalent partial differential equation for The application of them is carried out in different
solving one-dimensional ADE. Later, the authors fields of engineering problems such as in the solutions
extended their method to solve two-dimensional of partial differential equations [14], one-dimensional
ADE [2]. The upwind scheme of Spalding [3] transient heat-conduction problems [15], free-surface
and the flux-corrected scheme [4] are available for seepage problems [16], steady-state groundwater
the solution of the depth-averaged form of the applications [17,18], transient groundwater applica-
ADE. Another widely used approach is split-operator tions [19], and groundwater parameter estimation
approach [5,6], in which the advection and diffusion [20].
terms are solved by two different numerical methods. In advectiondiffusion modeling on a spread-
Numerical studies show that the use of central sheet it is not necessary to write out an equation in
differencing for the convective terms of the ADE all cells to carry out iterative calculations. Using
results in negative species concentration. Lam [7] copy and paste features of the spreadsheets, finite
pointed out that the central difference approximation differences method (FDM) equation can be copied to
overestimate the advective flux so much that if often other cells without writing the equations to all cells
causes a negative concentration to appear in the individually. When the equation pasted to all cells of
neighboring cells. the solution domain, iterative calculation is started. It
Leonard [8] introduced an upstream interpolation is carried out until the given number of iteration is
method, namely QUICK (Quadratic Upstream Inter- finished or maximum convergence criterion has been
polation Convective Kinematics) for one-dimensional met.
unsteady flow to prevent negative species concen- Solution of ADE is quite difficult in terms of time
trations. Later, Leonard [9] improved this scheme, dimension in the governing equations. Inclusion
eliminating the wiggles completely by introducing of time dimension in ADE may lead to an increase
exponential integration into regions with sharp fronts. in the CPU time if conventional methods are used.
The upwind or donor cell method introduced by However, advectiondiffusion modeling problems
Gentry et al. [10] is generally used. may be solved based on spreadsheet calculations
Sommerijer and Kok [11] improved a finite since spreadsheets eliminate the matrix algebra to
differences model for the numerical solution of three vector form.
dimensional-ADE based on various time-integration The main objective of this study is to develop a
techniques. This model was validated by comparing user-friendly and flexible advectiondiffusion model-
the results obtained with analytical solutions in the ing simulation algorithm using ADE with the FDM.
case of transport of a Gaussian pulse in unsteadies a Thus ADE Spreadsheet Simulation (ADESS) model is
non-uniform flow. Sankaranarayanan et al. [12] has proposed. The results of the model are validated with
used a third-order upwind difference scheme as given the analytical solutions.
by Kowalik and Murty [13] for the advective terms of By changing only the weighting parameter in
ADE. the proposed model, according to three-different
However, previously mentioned techniques have schemes, the ADE is solved with ADESS and the
difficulty in solving the problem due to the need results can be examined simultaneously with the
for extensive matrix algebra at each time step. spreadsheet interface. Thus, the effects of the model
The development of computer technology may ease parameters (such as u, Dt, Dx, D) to the results can
solving the ADE in different areas. One of the best easily be examined graphically.
tools for solving the ADE is spreadsheet. There are
many advantages of spreadsheets such as having
numerical and visual feedback, fast calculating MATHEMATICAL MODEL
capabilities. One of the most important advantages
of spreadsheets is its graphical interface. The The mathematical model is given as:
solution obtained through the spreadsheet can easily
be plotted at the same worksheet. Any changes in the @c @c @2c
þu ¼D 2; 0 < x < L; 0 < t T ð1Þ
input parameters of the solution domain will be @t @x @x
directly reflected to the graphical representation of with initial conditions
the solutions. Spreadsheets are user-friendly and easy
to programmer. cðx; 0Þ ¼ f ðxÞ; 0xL ð2Þ
Spreadsheets have an increasing popularity in and boundary conditions
engineering problems. Several studies have been
carried out using spreadsheets for the last 10 years. cð0; tÞ ¼ gðtÞ; 0<tT ð3aÞ
WEIGHTED FINITE DIFFERENCE TECHNIQUES 149
cðL; tÞ ¼ hðtÞ; 0<tT ð3bÞ (Dx) is the Courant number and Pe ¼ (uDx)/(D) is the
Peclet number.
where f, g, and h are known functions, while the A von Neumann stability of Equation (5) yields
function c is unknown. u is the velocity in x direction [21] the stability condition
and D is the dispersion coefficient. Note that u and " #
D are considered to be positive constant values. ðCrÞ2 Cr y Cr ð1 Cr yÞ
Little progress has been made so far to solve the ð6Þ
2 Pe 2
one-dimensional ADE with analytical methods when
u and D constant. So much effort has been put into The modified equivalent partial differential equation
developing stable and accurate numerical solutions of of this method is in the following form [22].
Equation (1). In the present study, various weighted 2
finite difference techniques have been simulated using @c @c uDx @ c
þu Dþ ðy CrÞ
spreadsheets. @t @x 2 @x2
3
uðDxÞ2 Cr 2 @ c
þ 16 3Cr y þ 2ðCrÞ
NUMERICAL SOLUTION 6 Pe @x3
þ 0ððDxÞ3 Þ ¼ 0
The solution of the problem is covered by a mesh of
ð7Þ
grid-lines
Note that the amount of numerical diffusion is
xi ¼ iDx . . . ; i ¼ 0; 1; 2; . . . ; M
independent of the values of (Cr/Pe), although the
range of values of Cr change with Pe.
tn ¼ nDt . . . ; n ¼ 0; 1; 2; . . . ; N
and they are parallel to the space and time coordinate The FTCS (Forward Time Centered
axes. The constant spatial and temporal grid-spacing Space)-Type Scheme
are Dx ¼ L/M and Dt ¼ T/N. Assume that y ¼ 0 in Equation (5) and it may be
Consider the following approximations of the written as the following FTCS-type finite difference
derivatives in the ADE which incorporate a weight formula in solving the ADE.
y as follows:
1 Cr
@c cði; n þ 1Þ cði; nÞ cði; n þ 1Þ ¼ 2 þ Cr cði 1; nÞ
¼ ð4aÞ 2 Pe
@t Dt
Cr 1 Cr
n cði; nÞ cði 1; nÞ þ 12 cði; nÞ þ 2 Cr cði þ 1; nÞ
@c Pe 2 Pe
u ¼u y
@x Dx ð8Þ
cði þ 1; nÞ cði 1; nÞ o Then the scheme is stable with (9)
þð1 yÞ ð4bÞ " #
2Dx
ðCrÞ2 Cr 1
ð9Þ
2 Pe 2
@2c cði 1; nÞ 2cði; nÞ þ cði þ 1; nÞ
D 2¼D ð4cÞ
@x ðDxÞ2 It is shown that the truncation error of Equation (8) is
0{(Dx)2, Dt}.
This gives the weighted explicit finite-difference
formula
The Upwind Scheme
1 Cr
cði; n þ 1Þ ¼ 2 þ Crð1 þ yÞ cði 1; nÞ If assuming y ¼ 1 in Equation (5) may be written the
2 Pe
following upwind-type finite difference formula to
Cr
þ 12 Cr y cði; nÞ solve the ADE.
Pe
Cr
1 Cr cði; n þ 1Þ ¼ þ Cr cði 1; nÞ
þ 2 Crð1 yÞ cði þ 1; nÞ Pe
2 Pe
ð5Þ Cr Cr
þ 12 Cr cði; nÞ þ cði þ 1; nÞ
Pe Pe
for 1 i M1 and 1 n N1, where Cr ¼ (uDt)/
ð10Þ
150 KARAHAN
which is stable for (11) and Wendroff [23]. The Lax and Wendroff scheme is
" #
ðCrÞ2 Cr Cr ð1 CrÞ stable for a larger range of values of the Courant
ð11Þ number than the upwind method.
2 Pe 2
þu D 2þ 16 ð16Þ
@t @x @x 6 Pe
# " 2 where H3, which is an intersection of the eight column
2 @ c
3
uðDxÞ3 Cr Cr (H) and third row (3), represents the concentration
ðCrÞ 2 12
@x3 24ðCrÞ Pe Pe in cell. Related terms are used in solving Equation
# (5) has been shown in Equation (16) as a spreadsheet
Cr @4c format. Before starting the ADESS model, it is firstly
þ12 Cr 2 3Cr 2 þ 4Cr 4 þ 0ððDxÞ4 Þ ¼ 0
Pe @x4 necessary to enter the initial and boundary condition
ð15Þ values. In this respect, initial values given in Figure 1
are entered to the F column and boundary conditions
Note that the choice y ¼ Cr will eliminate numerical are to the first and last cell of the H column. After that,
diffusion. This technique was first developed by Lax Equation (16) is written to the H3 cell and the
WEIGHTED FINITE DIFFERENCE TECHNIQUES 151
analytical solution of the problem to the I3 cell. After values and for the LaxWendroff scheme, the error is
the completion of this process, the formulas in the H3 obtained in between 1.9 1033.6 103. More-
and I3 cells are copied and pasted to the relevant cells over for the different Dt values, in order to determine
in the H and I columns with the help of a basic macro the performance of the ADESS model, the FTSC,
and the calculation is started. Upwind and LaxWendroff techniques are applied
The values obtained for the calculated time step and the results obtained for the x ¼ 0.5, T ¼ 1 s are
are copied and pasted to the G column which shows summarized in Table 1.
the values in the previous time step and this procedure As can be seen in Table 1, the LaxWendroff
is repeated until the time index in the outer loop scheme gives the best result for all the Dt and Courant
reaches the N value, as shown in Figure 2. numbers and there is not a significant change on
the results for the different Courant numbers and
the value closest to the analytical solution can be
NUMERICAL APPLICATIONS obtained for y ¼ Cr ¼ 1/6. The sensitivity of the other
methods changes significantly when compared with
The application of the ADESS model is carried out the Courant number. When it is not possible to find
using two examples. Note that both examples have a solution for the Courant
1 and the Upwind,
analytical solution that are taken from Refs. [12] and LaxWendroff schemes, the amount of error gets
[24]. bigger in FTSC.
Example 1 Example 2
The analytical solution to the one-dimensional The analytical solution to the one-dimensional
advectiondiffusion in a region bounded by advectiondiffusion of a Gaussian pulse of unit
0 x 1 is taken from Ref. [24] and given as: height, centered at x ¼ 1 in a region bounded by
" # 0 x 9 as given by Noye and Tan [1] is
0:025 ðx þ 0:5 tÞ2 " #
cðx; tÞ ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi exp
0:000625 þ 0:02t ð0:00125 þ 0:04tÞ 1 ðx xo utÞ2
cðx; tÞ ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffi exp ð18Þ
4t þ 1 Dð4t þ 1Þ
ð17Þ
The values of the various parameters are D ¼ 0.01, where u is the velocity in the x direction, xo is the
m2/s, u ¼ 1 m/s. The grid space and time step are taken center of the initial Gaussian pulse, D is the diffusion
to be Dx ¼ 0.02 m and Dt ¼ 0.004 s, respectively. coefficient in the x direction, and t is the time co-
The ADESS model has been solved for the ordinate. The values of the various parameters used
different y values and the results have been shown in are D ¼ 0.005, m2/s, u ¼ 0.8 m/s, and the Gaussian
Figure 3a,b. pulse of unit height centered at x ¼ 1. The space step
While the coefficient of the diffusion term and time step are taken to be 0.025 m and 0.0125 s,
decreases for the Equation (7) y ¼ 0 (FTSC scheme) respectively. The distribution of the Gaussian pulse at
as shown in Figure 3a, the model results are bigger t ¼ 5 s is computed using the analytical solution and
than the analytical results. For the y ¼ 1 (Upwind compared with the concentration distribution obtained
scheme) this coefficient gets bigger and the model using the numerical solution as shown in Figure 4.
results are obtained smaller than the analytical The results are given in Figure 4a,c. The problem
solutions. is solved by using a third-order upwind difference
As for the same input values, the FTSC model scheme using Ref. [12]. There is not a significant
gives closer results to the analytical solution. As for difference between the ADESS results and the Ref.
the y ¼ Cr (LaxWendroff scheme), seen in Equation [12]. However, when the problem is solved with the
(15), the numerical diffusion is prevented and the LaxWendrof scheme, a result which is in good
analytical solutions are in good agreement with the agreement with the analytical solution is obtained, as
ADESS results (see Fig. 3b). can be seen in Figure 4c.
When the LaxWendroff scheme is used for
the x ¼ 0.5, T ¼ 1 s value, the difference between
the ADESS results and the analytical solution is CONCLUSIONS
obtained as 6.3 104 and this value is reported to
be 2.9 103 in Ref. [24]. The error values are This study uses a spreadsheets to solve one dimen-
examined for the different time steps and grid space sional ADE, which uses FDM and thus proposes
WEIGHTED FINITE DIFFERENCE TECHNIQUES 153
Figure 3 (a) Comparison of analytical and numerical solutions (FTSC and Upwind scheme) for
Example 1. (b) Comparison of analytical and LaxWendroff scheme for Example 1.
Figure 4 (a) Comparison of analytical and FTSC scheme for transport of one-dimensional
Gaussian pulse. (b) Comparison of analytical and Upwind scheme for transport of one-dimensional
Gaussian pulse. (c) Comparison of analytical and LaxWendroff scheme for transport of one-
dimensional Gaussian pulse.
ADESS model. In the ADESS model, the weighting analytical solution in literature have been solved as an
parameter (y) value, a result can be obtained for three example.
different explicit schemes. In order to test the ADESS In the two examined examples, the FTSC gives
model, two problems which have a numerical and smaller numerical results than the analytical solution.
WEIGHTED FINITE DIFFERENCE TECHNIQUES 155
However, as for the Upwind scheme it has been [9] B. P. Leonard, Simple high accuracy resolution
determined that the model results are bigger than the program for convective modeling of discontinuities,
analytical results. Moreover, as for the same input Int J Numer Methods Fluids 8 (1988), 12911318.
values, the FTSC model is determined to give closer [10] R. A. Gentry, R. E. Martin, and B. J. Daly, An Eulerian
results to the analytical solution when compared with differencing method for unsteady compressible flow
problems, J Comput Phys 8 (1966), 5576.
the Upwind scheme. While the numerical diffusion is
[11] B. P. Sommeijer and J. Kok, Implementation
prevented as for the y ¼ Cr (LaxWendroff scheme), and performance of the time integration of a 3D
the ADESS results and the analytical results show a numerical transport model, Int J Numer Methods
good agreement for the two examples. The amount of Fluids 21 (1995), 349367.
error is shown to be smaller when the ADESS model [12] S. Sankaranarayanan, N. J. Shankar, and H. F. Cheong,
results are compared with the examples in literature Three-dimensional finite difference model for trans-
With the change of the input parameters in the port of conservative pollutants, Ocean Eng 25 (1998),
ADESS model, the change in the model results can 425442.
easily be observed graphically. Thus, the effect of the [13] Z. Kowalik and T. S. Murty, Numerical modeling of
model parameters on the model accuracy, stability can ocean dynamics, World Scientific, Singapore, 1993.
be seen visually. [14] M. Hagler, Spreadsheet solution of partial differential
equations, IEEE Trans Educ E-30 (1987), 130
While the FDM schemes used in this study are
134.
explicit, the iterative calculation property which is one [15] Z. Gvirtzman and Z. Garfunkel, Numerical solutions
of the important properties of spreadsheets is not used. for one-dimensional heat-conduction equation using a
By using this important property of spreadsheets, spreadsheet, Comput Geosci 22 (1996), 11471158.
implicit solution schemes can be simulated similarly. [16] J. P. Bardet and T. Tobita, A practical method for
The future study should be on this issue. solving free-surface seepage problems, Comput
Geotech 29 (2002), 45475.
[17] T. N. Olsthoorn, The power of electronic worksheet:
REFERENCES Modeling without special programs, Ground Water
23 (1985), 381390.
[1] B. J. Noye and H. H. Tan, A third-order semi-implicit [18] M. P. Anderson and E. S. Bair, ‘‘The power of
finite difference method for solving the one- spreadsheet models. MODFLOW 2001 and Other
dimensional convection-diffusion equation, Int Modeling’’, Odysseys Proceedings, International
J Numer Methods Eng 26 (1988), 16151629. Ground Water Modeling Center, Colorado School of
[2] B. J. Noye and H. H. Tan, Finite difference methods for Mines 2001, pp 815822.
the two-dimensional advection diffusion equation, Int [19] H. Karahan and M. T. Ayvaz, Time-dependent ground-
J Numer Methods Fluids 9 (1989), 7598. water modeling using spreadsheet, Comput Appl Eng
[3] D. B. Spalding, A novel finite difference formulation Educ 13 (2005), 192199.
for differential expression involving both first [20] H. Karahan and M. T. Ayvaz, Groundwater parameter
and second derivatives, Int J Numer Methods Fluids estimation by optimization and dual reciprocity finite
4 (1972), 551559. differences method, J Porous Media 8 (2005),
[4] J. B. Boris and D. L. Book, Flux corrected for transport 211223.
algorithm that works, J Comput Phys 11 (1973), [21] A. C. Hindmarsh, P. M. Gresho, and D. F. Griffiths,
3869. The stability of explicit Euler time-integration for
[5] R. J. Sobey, Fractional step algorithm for estuarine certain finite difference approximations of the advec-
mass transport, Int J Numer Methods Fluids 3 (1983), tiondiffusion equation, Int J Numer Methods Fluids
567581. 4 (1984), 853897.
[6] Y. S. Li and C. P. Chen, An efficient split operator [22] R. F. Warming and B. J. Hyett, The modified equation
scheme for 2D advection diffusion equation using approach to the stability and accuracy analysis of
finite elements and characteristics, Appl Math Model finite difference methods, J Comput Phys 14 (1974),
13 (1989), 248253. 159179.
[7] D. C. L. Lam, Computer modeling of pollutant [23] P. D. Lax and B. Wendroff, Difference shemes
transport in Lake Erie, Water Pollut 25 (1975), 75 with high order of accuracy for solving hyperbolic
86. equations, Commun Pure Appl Math 17 (1964),
[8] B. P. Leonard, A stable and accurate convective 381398.
modeling procedure based on upstream formulation, [24] M. Dehghan, Weighted finite difference techniques for
Comput Methods Appl Mech Eng 19 (1979), 59 one dimensional advectiondiffusion equation, Appl
98. Math Comput 147 (2004), 307319.
156 KARAHAN
BIOGRAPHY