Professional Documents
Culture Documents
————————————————————–
Volume 25 No. 1 2012, 1-15
Abstract: This paper aims to extend the Taylor series obtaining expres-
sions for the discretization of the derivatives of first and second order accu-
rate O(∆x6 ) using central differences. The convection-diffusion-reaction (CDR)
equation with variable coefficients and Robin boundary conditions was chosen,
aiming several numerical comparisons and analysis of some special points in the
computational domain, the derivative of the first order (convective term) was
extended through the backward and forward differences, both O(∆x3 ). Two
numerical applications with analytical solution using the L∞ norm validate the
computational code and facilitate the analysis of results.
1. Introduction
In the last decades, heat transfer and fluid mechanics problems have been an-
alyzed in terms of different numerical schemes. Of these, the Finite Element
Method retains flexibility and ease in dealing with complex domains, which, to
be divided often generates a non-ordered matrix causing a high computational
time (see [2]; [4]), and the high computational cost caused by the calculation of
integrals that generate the coefficients of the main matrix (see [5]; [6]). Now,
the Finite Difference Method replace the partial derivatives that appear in the
governing equations by the algebraic difference quotients yielding an ordered
matrix which can be resolved by any linear system solution method, using only
non-zero coefficients of the matrix, usually highly sparse (see [7]).
In this work, a special contribution is the Taylor series expansion of the
derivatives of the first and second order, the convective and diffusive terms,
respectively, with the accuracy of O(∆x6 ), for solving convection-diffusion-
reaction problems with variable coefficients and with Robin condition, notably
in convective situations that have dominant oscillations in the numerical ma-
jority of numerical methods in the literature, when unrefined meshes are used.
Thus an expression for the first derivative of T with backward finite diffe-
rence of O(∆x3 ) will be:
∂T 11Ti − 18Ti−1 + 9Ti−2 − 2Ti−3
= + O(∆x3 ) (13)
∂x i 6∆x
Similarly, an expression for finite difference forward of O(∆x3 ) will be:
∂T −11Ti + 18Ti+1 − 9Ti+2 + 2Ti+3
= + O(∆x3 ) (14)
∂x i 6∆x
To find expressions for the central difference of O(∆x6 ) is must expand the
Taylor series for points i + 2 and i + 3 as follows:
(2∆x2 ) ∂ 2 T (2∆x3 ) ∂ 3 T
∂T
Ti+2 = Ti + (2∆x) + + + . . . (15a)
∂x i 2 ∂x2 i 3! ∂x3 i
(3∆x2 ) ∂ 2 T (3∆x3 ) ∂ 3 T
∂T
Ti+3 = Ti + (3∆x) + + + . . . (15b)
∂x i 2 ∂x2 i 3! ∂x3 i
3. Model Equation
∂ 2 T (x) ∂T (x)
k(x) + u(x) + D(x)T (x) = f (x) in Ω = [0, 1], (19a)
∂x2 ∂x
∂T (0)
AT + B =C (19b)
∂x
∂T (1)
ET + G =H (19c)
∂x
4. Formulation
For numerical solution of the problem described in equation (19a-c), four for-
mulations have been proposed and are described below.
Case 1: Dividing the domain into NNodes nodes and considering
∆x = 1/(N N odes − 1), we have:
Node 1: Forward difference O(∆x2 ) (boundary condition in x = 0):
3B 2B B
A− Ti + Ti+1 + − Ti+2 = C
2∆x ∆x 2∆x
Node 2: Forward difference O(∆x2 ) in the first derivative and Central dif-
ference O(∆x2 ) in the second derivative:
k 2k 3u2 k 2u2 u
2
Ti + − − + D Ti+1 + + T i+2 + − T4 = fi+1
∆x2 ∆x2 2∆x ∆x2 ∆x 2∆x
International Journal of Applied Mathematics (ISSN 1311-1728)
Volume 25, Issue 1 (2012), 1 − 15
Edition: proofread version (page-numbers may vary!)
CENTRAL DIFFERENCE METHOD OF O(∆x6 ) IN... 7
Node 3: Forward difference O(∆x3 ) in the first derivative and Central difference
O(∆x4 ) in the second derivative:
k 4k 5k 11u3
− T1 + T2 + − − + D T3
12∆x2 3∆x2 2∆x2 6∆x
4k 3u3 k 3u3 u
3
+ 2
+ T4 + − 2
− T 5 + T6 = f3
3∆x ∆x 12∆x 2∆x 3∆x
Node 4 to N N odes − 3: Forward difference O(∆x3 ) in the first derivative and
Central difference O(∆x6 ) in the second derivative:
k 3k 3k
Ti−3 + − Ti−2 + Ti−1
90∆x2 20∆x2 2∆x2
49k 11ui 3k 3ui
+ − − + D Ti + + Ti+1
18∆x2 6∆x 2∆x2 ∆x
3k 3ui k ui
+ − − Ti+2 + + Ti+3 = fi
20∆x2 2∆x 90∆x2 3∆x
Node N N odes−2: Forward difference O(∆x3 ) in the first derivative and Central
difference O(∆x4 ) in the second derivative:
u
N N odes−2
k 3uN N odes−2
− TN N odes−5 + − + TN N odes−4
3∆x 12∆x2 2∆x
4k 3uN N odes−2
+ − TN N odes−3
3∆x2 ∆x
5k 11uN N odes−2
+ − 2
+ + D TN N odes−2
2∆x 6∆x
4k k
+ TN N odes−1 + − TN N odes = fN N odes−2
3∆x2 12∆x2
Node N N odes−1: Forward difference O(∆x3 ) in the first derivative and Central
difference O(∆x2 ) in the second derivative:
u
N N odes−1
3uN N odes−1
− TN N odes−4 + − TN N odes−3
3∆x 2∆x
k 3uN N odes−1
+ 2
− TN N odes−2
∆x 2∆x
2k 11uN N odes−1
+ − + + D TN N odes−1
∆x2 6∆x
k
+ TN N odes = fN N odes−1
∆x2
International Journal of Applied Mathematics (ISSN 1311-1728)
Volume 25, Issue 1 (2012), 1 − 15
Edition: proofread version (page-numbers may vary!)
CENTRAL DIFFERENCE METHOD OF O(∆x6 ) IN... 9
Case 4: This case is different from the previous central nodes, Node 4 to
N N odes − 3, where the first derivative is discretized using central difference of
O(∆x6 ) in this manner:
k ui −3k 3ui 3k 3ui
− Ti−3 + + Ti−2 + − Ti−1
90∆x2 60∆x 20∆x2 20∆x 2∆x2 4∆x
49k 3k 3ui −3k 3ui
+ − 2
+ D Ti + 2
+ Ti+1 + 2
− Ti+2
18∆x 2∆x 4∆x 20∆x 20∆x
k ui
+ + Ti+3 = fi
90∆x2 60∆x
5. Numerical Application
log(E1 /E2 )
CR = (20)
log(∆x1 /∆x2 )
where E1 and E2 are average absolute errors (AAE) correspond to grids with
mesh sizes ∆x1 and ∆x2 , respectively.
Here, two applications will be proposed. In the first it is a convective-
diffusive case which will be varied in the convection coefficient in order to an-
alyze the efficiency of the method in highly convective situations. Finally, a
second application in the case of convection-diffusion with variable coefficients
and Robin condition will be tested and analyzed.
In this case, the following equation and boundary conditions are employed:
dT d2 T dT (1)
γ − = 0 in Ω = [0, 1], T (0) = 5 and = 10
dx dx2 dx
which analytical solution is given by T (x) = (c/γ)exp(γx) + d, where c =
10/exp(γ) and d = 5 − (c/γ).
In this application, for convection coefficient values at γ = 1, 10 and 100,
was fixed the thermal conductivity value in k = 1. For γ = 1 we have a
diffusion dominant case. For this situation, considering rough meshes with
∆x = 1/10, ∆x = 1/20 or ∆x = 1/40, all cases showed reasonable results
according to Table 1, destacking the cases 3 and 4, the which to ∆x = 1/20,
already have results of about 10−4 . However, such as the problem it becomes
dominant, Tables 2 and 3, the results for rough meshes are unsatisfactory.
For this case we adopt the following equation and boundary conditions:
d2 T
1 dT
k 2 + = x + 1 in Ω = [0, 1],
dx 1 + x dx
dt(0) dT (1)
T (0) − k = 1 and T (1) = =1
dx dx
which analytical solution is given by
1 1 1
!!
(x + 1)3 (x + 1)1− k 21− k
2− k 20
T (x) = +D − − + 1−
3(2k + 1) k−1 k−1 k 3(2k + 1)
Here, the convective and source terms are variable and the Robin boundary
conditions, where the condition at x = 0 depends on the conductivity coefficient
k, which, in this application, varies for values 2, 2×10−1 and 2×10−2 . For k = 2,
Table 5, we have a situation like the one presented in Table 1, i.e, the diffusive
dominant case. Note that for a mesh with ∆x = 1/10 is possible to achieve
a standard order error of 10−4 . When k = 2 × 10−1 does not happen, since
the problem becomes convection dominant, increase the number of oscillations
so that a mesh with ∆x = 1/10 the accuracy is only 10−4 (k = 2) to 10−1 for
k = 2 × 10−1 , in cases 1 and 2, Table 6. In Table 7, where k = 2 × 10−2 to
∆x = 1/10, ∆x = 1/20, ∆x = 1/40 and ∆x = 1/80 the numerical oscillations
are very significant in four cases. From Table 7, an accuracy of order 10−4 was
only achieved by cases 3 and 4 in a mesh with ∆x = 1/500, the same is not
true in cases 1 and 2 in the meshes proposed in this paper. Table 8 shows the
convergence rate of the results presented in Table 6. Note that it is significantly
higher in cases 3 and 4, the same had already occurred in an application 1.
6. Conclusions
In this work, four formulations using the Finite Difference Method have been
proposed. In general, in all cases, the diffusion dominant problems, good results
were achieved. However, the dominant convective problems, cases 3 and 4 had
the best results. It is noteworthy that cases 1 and 3 showed divergence in
their results in an application, in which case, in which meshes used unrefined
form. The literature shows that convection dominant problems cause numerical
oscillations especially for unrefined meshes. However, in this work, the use of
central differences in the first and second derivative, cases 2 and 4, showed
reasonable results even for coarse meshes, to the point that, in case 4, have
accuracy of order 10−2 (for ∆x = 1/40). In future work, this technique will be
implemented for two and three-dimensional and nonlinear problems.
Acknowledgments
The present work was supported by the National Council of Scientific Deve-
lopment and Technology, CNPq, Brazil (Proc. 500382/2011-5) and Mato Grosso
Research Foundation, Fapemat, Brazil (Proc. 292470/2010).
References
[5] E.C. Romão, L.F.M. Moura, J.B.C. Silva, Analysis of error in the solution
of the 2-D diffusion equation by finite element methods, TEMA Tend. Mat.
Apl. Comput., 9, No. 2 (2008), 287-298.
[6] E.C. Romão, M.D. Campos, L.F.M. Moura, Application of Galerkin and
least-squares finite element method in the solution of 3D Poisson and
Helmholtz equations, Computers and Mathematics with Applications, 62
(2011), 4288-4299.
[7] W.F. Spotz, G.F. Carey, A high-order compact formulation for the 3D
Poisson equation, Numerical Methods Partial Differential Equations, 12
(1996), 235-243.