On di•usive methods and exponentially fitted techniquesis second-order accurate in space....

28
On diusive methods and exponentially fitted techniques J.I. Ramos 1 Departamento de Lenguajes y Ciencias de la Computaci on, E.T.S. Ingenieros Industriales, Universidad de M alaga, Plaza El Ejido, s/n, 29013 M alaga, Spain Abstract Liouville’s transformations are employed to reduce a one-dimensional, time-depen- dent convection–diusion–reaction operator to a diusion–reaction one which upon a control-volume, second-order accurate discretization results in the same finite dierence methods as those of exponentially fitted techniques. Two variants of these techniques are considered depending on the continuity and/or smoothness of the analytical albeit approximate solution to the ordinary dierential equations that result upon discreti- zation of the time variable, time linearization, and piecewise spatial linearization of linear equations. It is shown that these exponential techniques include those of Allen and Southwell, Il’in, and El-Mistikawy and Werle for steady, linear convection–diu- sion operators, and are linearly stable and monotonic. It is also shown that exponen- tially fitted techniques account for the characteristic times of reaction, diusion and residence, and the time step employed in the discretization of the time variable, can use adaptive refinement techniques, and can account for the convection, diusion and re- action, the convection and diusion, the reaction and diusion, and the diusion pro- cesses. However, the latter three require iterative techniques to find the numerical solution. Ó 1999 Elsevier Science Inc. All rights reserved. Keywords: Diusive methods; Exponentially fitted techniques; Compact schemes; Modified equations; Splines 1. Introduction Many numerical techniques, e.g., finite dierence, finite element and spectral methods, have been developed for convection–diusion equations [1–4] Applied Mathematics and Computation 103 (1999) 69–96 1 E-mail: [email protected]. 0096-3003/99/$ – see front matter Ó 1999 Elsevier Science Inc. All rights reserved. PII:S0096-3003(98)10040-1

Transcript of On di•usive methods and exponentially fitted techniquesis second-order accurate in space....

  • On diusive methodsand exponentially ®tted techniques

    J.I. Ramos 1

    Departamento de Lenguajes y Ciencias de la Computaci�on, E.T.S. Ingenieros Industriales,Universidad de M�alaga, Plaza El Ejido, s/n, 29013 M�alaga, Spain

    Abstract

    Liouville's transformations are employed to reduce a one-dimensional, time-depen-

    dent convection±diusion±reaction operator to a diusion±reaction one which upon a

    control-volume, second-order accurate discretization results in the same ®nite dierence

    methods as those of exponentially ®tted techniques. Two variants of these techniques

    are considered depending on the continuity and/or smoothness of the analytical albeit

    approximate solution to the ordinary dierential equations that result upon discreti-

    zation of the time variable, time linearization, and piecewise spatial linearization of

    linear equations. It is shown that these exponential techniques include those of Allen

    and Southwell, Il'in, and El-Mistikawy and Werle for steady, linear convection±diu-

    sion operators, and are linearly stable and monotonic. It is also shown that exponen-

    tially ®tted techniques account for the characteristic times of reaction, diusion and

    residence, and the time step employed in the discretization of the time variable, can use

    adaptive re®nement techniques, and can account for the convection, diusion and re-

    action, the convection and diusion, the reaction and diusion, and the diusion pro-

    cesses. However, the latter three require iterative techniques to ®nd the numerical

    solution. Ó 1999 Elsevier Science Inc. All rights reserved.

    Keywords: Diusive methods; Exponentially ®tted techniques; Compact schemes; Modi®ed

    equations; Splines

    1. Introduction

    Many numerical techniques, e.g., ®nite dierence, ®nite element and spectralmethods, have been developed for convection±diusion equations [1±4]

    Applied Mathematics and Computation 103 (1999) 69±96

    1 E-mail: [email protected].

    0096-3003/99/$ ± see front matter Ó 1999 Elsevier Science Inc. All rights reserved.PII: S0 0 96 -3 0 03 (9 8 )1 00 4 0- 1

  • because of the important role that these equations play in transport phe-nomena. For example, there has been a variety of ®nite dierence schemes forthese equations based on central, upwind and hybrid discretizations for theconvection terms at high Peclet numbers [5,6], cublic splines [7] and compact-operator approximations [8]. Some of these approximations give rise to non-monotonic methods and result in oscillatory solutions at high Peclet numbers.In order to obtain monotonic approximations, total-variation diminishing(TVD) and essentially non-oscillatory (ENO) methods have been developed inthe past so that the numerical solution preserves its monotonicity and satis®esan entropy condition.

    Other developments in the numerical analysis of convection±diusionequations at high Peclet numbers include characteristic-®nite dierence meth-ods which are operator-splitting techniques whereby the convection±diusionoperator is split into a sequence of convection and diusion ones. The con-vection operator method may be solved exactly in terms of the characteristiccurves, whereas the diusion one can be discretized by means of, for example,second-order accurate formulae in space. Unfortunately, since the character-istic curves rarely coincide with the points of a ®xed grid where the diusionoperator is usually solved, interpolation is required to determine the nodalvalues of the dependent variables at the ®xed grid with the consequent possibleloss of conservation properties. This can easily be understood by consideringthe following one-dimensional, time-dependent (scalar) convection±diusionequation

    ocot u oc

    ox D o

    2cox2

    ; 1where t is time, x is the spatial coordinate, u is the speed, D is the diusioncoecient, c is the dependent variable, and u and D are assumed to be con-stant.

    If operator-splitting techniques are employed to determine the solution ofEq. (1), the convection±diusion operator of this equation is replaced by thefollowing sequence of operators:

    ocot u oc

    ox 0; 2

    ocot D o

    2cox2

    ; 3and the solution of Eq. (2) is

    c cxÿ ut; 4i.e., c is constant along the characteristic lines xÿ ut const.

    If one introduces the transformation t; x ! s; g where t s and g gt; x into Eq. (1), and selects g ut ÿ x, then Eq. (1) can be transformed into

    70 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • ocos D o

    2cog2

    ; 5which does not include convection terms and, therefore, its solution is notsubjected to mesh Peclet number limitations. Unfortunately, the independentvariable g is a function of time. The transformation t; x ! s; g is a La-grangian one.

    In this paper, we shall ®rst be concerned with diusive methods which havebeen proposed to eliminate the convection terms in Eq. (1) [9]. These methodscan be reduced to the one-dimensional capacity-lumped version of the two-stepTaylor±Galerkin ®nite element method [10] if an ad hoc change is made in thatscheme. Furthermore, we shall show that these methods correspond toLiouville's transformations, and that, for steady ¯ows, the ®nite dierencediscretization of the equations resulting from diusive techniques coincide withexponentially ®tted methods. We shall then develop C0- and C1-exponentially®tted methods for one-dimensional, time-dependent convection±diusion±re-action equations and generalize the results obtained by the author previously[11]. In particular, we shall show that the Allen and Southwell [12] and Il'in [13]methods for one-dimensional, steady, linear convection±diusion equations areparticular cases of the C0-techniques presented here, and that the Allen±Southwell±Il'in techniques can be improved upon by linearizing the sourceterm. Moreover, we shall show that the C0- and C1-exponentially ®ttedmethods presented here for one-dimensional, time-dependent convection±dif-fusion±reaction equations account for both the characteristic residence, reac-tion and diusion times and the time step employed in the discretization of thetime derivative, and develop four dierent exponentially ®tted techniqueswhich account for the convection, diusion and reaction processes, diusionand reaction processes, convection and diusion processes, and only diusionprocesses. The last three of these methods usually require iterative techniquesto provide accurate solutions.

    The accuracy of the exponentially ®tted methods presented in this paper isassessed as a function of the time step and grid spacing for dierent approxi-mations of the source terms and compared with those of central, upwind, three-point compact, cubic splines and modi®ed cubic splines methods inAppendix A.

    2. Liouville's transformations and diusive methods

    If u and D are constant in Eq. (1), the introduction of c pxx into Eq. (1)followed by the elimination of the term ox=ox results in

    ocot D o

    oxp2

    oox

    cp2

    � �� �; 6

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 71

  • where

    p exp u2D

    x� �

    : 7Eq. (6) is written in conservation-law form and does not contain a convectionterm.

    If the same transformation, i.e., c pxx, is employed in Eq. (1), but nowthe term containing x is eliminated, one can easily show that this equation canbe transformed into

    ocot D o

    oxp

    oox

    cp

    � �� �; 8

    where

    p Du

    expuD

    x� �

    : 9Eq. (8) is written in conservation-law form and does not contain a convectionterm. Furthermore, it can be concluded from the above derivations that theLiouville transformation is not unique. However, both Eq. (6) and Eq. (8) canalso be written as

    exp ÿ uD

    x� � oc

    ot D o

    oxexp ÿ u

    Dx

    � � ocox

    � �; 10

    which is the equation governing diusive methods [9].

    Remark 1. If Eq. (1) contains a source term S in its right-hand side, then theequation corresponding to Eq. (10) would contain the same source termmultiplied by the exponential function which appears in that equation. Notethat Eq. (10) is written in conservation-law or variational form since theexponential function in its left-hand side can be included in the time derivative;therefore, this equation can be easily solved by means of ®nite element methodsand contains a Petrov±Galerkin-like weighting function that multiplies thetime derivative term.

    3. Control-volume discretization of diusive methods

    If Eq. (10) is integrated in the control-volume xiÿ1=2; xi1=2 where i denotesthe ith grid point and h xi1 ÿ xi is constant, one can easily obtain

    cn1i ÿ cnik

    h D exp ÿ uh2D

    � �oci1=2

    oxÿ exp uh

    2D

    � �ociÿ1=2

    ox

    � �; 11

    which can also be written, after using second-order accurate discretizations ofthe spatial derivatives, as

    72 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • ÿ kDh2

    exp ÿ uh2D

    � �cn1i1 1 2

    kDh2

    coshuh2D

    � �cn1i

    ÿ kDh2

    expuh2D

    � �cn1iÿ1 cni ; 12

    which corresponds to a strictly diagonally dominant matrix.For steady state problems, Eq. (12) can be written as

    exp ÿ uh2D

    � �ci1ÿ exp ÿ uh

    2D

    � � exp uh

    2D

    � �� �ci exp uh

    2D

    � �ciÿ1 0;

    13which, for u > 0 and uh=2D� 1, yields ci ciÿ1, i.e., an upwind or donor-cellmethod (cf. Appendix A). On the other hand, for juh=2Dj � 1, Eq. (13) yieldsciÿ1 ÿ 2ci ci1 0 which corresponds to a central dierence discretization ofthe diusion terms. Moreover, the linear equation (13) has a solution of theform ci Cri where C is a constant, and r 1 and r expuh=D which in-dicate that the solution of Eq. (13) is non-oscillatory.

    If the discrete values of c in Eq. (13) are replaced by their continuouscounterparts and a Taylor series expansion of the resulting equation is carriedout, then one can easily obtain

    ÿ c0 ÿ h2

    6c000 uh

    2D

    � �2c0 D

    uc00 Dh

    2

    12uciv Oh4 0; 14

    where the primes denote dierentiation with respect to x, so that the methodis second-order accurate in space. However, the critical issue is the accuracyof the method for a ®xed Peclet number, i.e., P uh=D, as the mesh is re-®ned. For example, for P � 1, the method behaves as a ®rst-order accurateone.

    The implicit method of Eq. (12) has an ampli®cation factor

    wn1

    wn

    ���� ���� 1b2 1 2kDh2 cosh P2

    ÿ �1ÿ cos ahÿ �2� �1=2 ; 15which is always less than one so that the implicit discretization of Eq. (10) isalways linearly stable according to the Fourier±von Neumann analysis, andwhere

    b 2kDh2

    sinhP2

    � �sin ah; cni wn expjaih 16

    and a is the wavenumber.

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 73

  • 4. Exponentially ®tted techniques

    If the time derivative in Eq. (1) is discretized while the spatial coordinate isconstant, Eq. (1) is transformed into the two-point boundary-value problem

    Dkd2cdx2ÿ uk dc

    dxÿ c cn; 17

    where cn depends on x, and the solution of Eq. (17) can be written as

    c A expkxÿ xi B expkÿxÿ xi; 18for x 2 xiÿ1; xi1; where

    k u2D u

    2D

    � �2 1

    Dk

    � �1=2; 19

    kÿ u2Dÿ u

    2D

    � �2 1

    Dk

    � �1=2; 20

    and A and B can determined by means of the method of variation of param-eters as

    A A0 1Dkk ÿ kÿ

    Z xxiÿ1

    cn expÿkxÿ xi dx; 21

    B B0 ÿ 1Dkk ÿ kÿ

    Z xxiÿ1

    cn expÿkÿxÿ xi dx; 22

    where A0 and B0 are constants whose values are determined from the con-ditions

    cxiÿ1 ciÿ1; cxi ci; cxi1 ci1; 23so that one obtains

    ci1 ÿ expkh ÿ expkÿh

    expÿkh ÿ expÿkÿh ciÿ1

    exp�

    ÿkÿh expkh ÿ expkÿh

    expÿkh ÿ expÿkÿh ÿ expkÿh�

    ci

    bi ai exp�

    ÿkÿh expkh ÿ expkÿh

    expÿkh ÿ expÿkÿh ÿ expkÿh�; 24

    where

    ai 1Dkk ÿ kÿ

    Z xixiÿ1

    cn expÿkxÿ xi dx

    ÿ 1Dkk ÿ kÿ

    Z xixiÿ1

    cn expÿkÿxÿ xi dx; 25

    74 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • bi expkh

    Dkk ÿ kÿZ xi1

    xiÿ1cn expÿkxÿ xi dx

    ÿ expkÿh

    Dkk ÿ kÿZ xi1

    xiÿ1cn expÿkÿxÿ xi dx; 26

    which indicate that the solution of Eq. (1) has been reduced to numericalquadrature (cf. Eqs. (25) and (26)) and to the solution of a tridiagonal matrix(cf. Eq. (24)) at each time step. Moreover, if cn is assumed to be constant inxiÿ1; xi1 and equal to cni , then

    ai cni

    Dkk ÿ kÿ1

    kexpkh ÿ 1ÿ � 1

    kÿ1ÿ expkÿh

    � �; 27

    bi cni expkh

    Dkkk ÿ kÿ expkh ÿ expÿkhÿ �

    cni expkÿh

    Dkkÿk ÿ kÿ expÿkÿh ÿ expkÿh : 28

    Eqs. (19), (20) and (24) clearly indicate that exponentially ®tted methods ac-count for the time derivative term in the numerical solution of the originalconvection±diusion equation (cf. Eq. (1)).

    For steady state problems, it can be easily shown that exponentially ®ttedmethods yield Eq. (13) and, therefore, they are identical to diusive tech-niques.

    5. Generalized Liouville's transformations and diusive methods

    In the previous sections, it was assumed that u and D are constant. Here, it issupposed that the velocity and diusion coecients are functions of x only.Furthermore, instead of considering Eq. (1), we shall consider the following(scalar) transport equation written in conservation-law form

    ocot o

    oxuc o

    oxD

    ocox

    � �: 29

    If the transformation c pxx is employed in Eq. (29) and one eliminates theterm ox=ox, it is easily shown that the resulting equation is

    ocot o

    oxp2D2

    oox

    cp2D

    � �� �; 30

    where

    px 1D1=2

    exp

    Zu

    2Ddx

    � �: 31

    Therefore, Eq. (30) coincides with Eq. (6) if u and D are constant.

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 75

  • On the other hand, if the same transformation as before, i.e., c pxx, isused and the term in x is eliminated, then one can obtain

    ocot o

    oxpD

    oox

    cp

    � �� �; 32

    where

    px expZ

    uD

    dx;� �

    : 33

    Therefore, Eq. (32) coincides with Eq. (8) if u and D are constant, and bothEq. (30) and Eq. (32) do not contain convection terms and can be discretizedby means of the control-volume formulation presented in Section 3 for dif-fusive methods. Alternatively, these equations may be discretized by meansof exponentially ®tted techniques as indicated in Section 4 and the nextsections.

    Two kinds of exponentially ®tted methods for general one-dimensionalconvection±diusion±reaction equations were developed by the author [11],i.e., C0- and C1-methods depending on the interval in which the partial dif-ferential equations are solved in an analytical albeit approximate form. In C0-methods, the interval where the equation is solved is xiÿ1; xi1 subject tocontinuity conditions of the dependent variable at the grid points iÿ 1, i andi 1. By way of contrast, in C1-methods, the dierential equation is solved inxiÿ1; xi subject to both continuity conditions at the grid points iÿ 1 and i and

    continuity of the ®rst-order derivative at the ith grid point. In both methods,the time variable was ®rst discretized while the spatial coordinate was main-tained continuous. This has the advantage that, upon time discretization,Eq. (1) becomes an elliptic two-point boundary-value problem for which thereare many results regarding the existence and uniqueness of the solution.Moreover, in multidimensional problems, factorization methods may be usedto reduce a multidimensional problem to a sequence of one-dimensional ones[14], and the numerical solution of the latter may be obtained by means of themethods presented in the next section.

    6. C0-exponentially ®tted methods

    Consider Eq. (1) with a source term S in its right-hand side, i.e.,

    ocot u oc

    ox D o

    2cox2 St; x; c 34

    and assume that u, D and S are functions of t and x. In addition, let us as-sume that S is also a function of c. If the time derivative in Eq. (1) is dis-cretized by means of an implicit procedure, the resulting equation can bewritten as

    76 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • ÿ kD d2c

    dx2 ku du

    dx c kS cn; 35

    where, for example, c cn1x; k is the time step, and a similar equation can beobtained if the trapezoidal rule is used to discretize the time derivative.

    For the sake of convenience, Eq. (35) will be written hereon in non-di-mensional form as

    ÿ �c00 bxc0 dxc P x; c; 36where the primes denote dierentiation with respect to x, and x, c, S, u and Dhave non-dimensionalized with respect to the length of the intervalL; c0; S0; u0 and D0, respectively, and the quantities with the subscript zeroare constants. The results of this non-dimensionalization indicate thatx 2 0; 1, and

    � D0Lu0

    ; bx uD0Du0

    ; dx LD0ku0D

    ; 37

    Px; c S0D0Lu0Dc0

    SS0 LD0

    ku0D; 38

    where we have introduced � to indicate that the results presented here arealso valid for high Peclet numbers or problems that have thin boundarylayers or are singular in the language of perturbation techniques, dx rep-resents the ratio between the characteristic residence time L=u0 and the timestep k, and P x; c includes the ratio of the residence time to the characteristicreaction time c0=S0 and the ratio of the characteristic residence time to thetime step.

    6.1. Liouville transformation

    The Liouville transformation c pxx where

    px exp 12�

    Zbx dx

    � �; 39

    reduces Eq. (36) to

    ÿ �px00 dp bp0 ÿ �p00ÿ �x P x; c; 40which does not contain ®rst-order derivatives and which can be solved bymeans of the exponentially ®tted methods presented in this paper.

    6.2. The Allen and Southwell±Il'in method

    Allen and Southwell [12] and Il'in [13], instead of considering Eq. (36), dealtwith

    ÿ �c00 bxc0 Qx 41

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 77

  • in the interval xiÿ1; xi1 with a constant spacing h, i.e., they assumed that P isnot a function of c, and discretized the above dierential equation by means ofupwind and central dierences for the convection terms as

    ÿ �h2

    d2ci bih 1ÿ aD0 aD ci Qi; 42where

    d2ci ci1 ÿ 2ci ciÿ1; 43D0ci ci1 ÿ ciÿ1

    2; D ci ci ÿ ciÿ1: 44

    Eq. (42) can be written as

    ÿ �h2 abi

    2h

    � �d2ci bih D0ci Qi; 45

    upon noticing that

    D ci D0ci ÿ 12

    d2ci Oh3; 46where abi=2h is an arti®cial viscosity. In order to determine the value of aand, therefore, the value of the arti®cial viscosity, Allen and Southwell [12] andIl'in [13] solved the linear dierence equation (45) analytically for Q 0 forwhich the roots of the characteristic equation obtained upon substituting ci Cri in Eq. (45) are r 1 and r exp R where R bih=� provided that theseroots are such that the solution of the dierence equation coincides with that ofthe dierential equation (cf. Appendix A). Under these conditions, they foundthat

    a coth R2ÿ 2

    R: 47

    The value of a of upwind parameter determined in this fashion was then em-ployed in the discretization of Eq. (41) which can be written as

    ciÿ1 exp Rÿ 1 exp Rci ci1 hQibi exp Rÿ 1; 48

    which is exactly the same expression as that of the analytical solution ofEq. (41) provided that Qx is assumed to be equal to Qi in the intervalxiÿ1; xi1 [15].

    It is important to indicate that the Allen±Southwell±Il'in method uses anupwind parameter which depends only on the convection and diusion pro-cesses and assumes that the source term Q has a constant value equal to Qi inxiÿ1; xi1 , but does not account for the in¯uence of either P when P is a

    function of c, or dxc in determining the value of a. This may be a seriousdrawback in convection±diusion±reaction equations characterized by fastreaction terms.

    78 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • 6.3. Improvement of the Allen±Southwell±Il'in method

    Eq. (41) with Qx can be solved analytically in the interval xiÿ1; xi1 bymeans of the method of variation of parameters as in Section 4 subject tocontinuity conditions at the grid point iÿ 1, i and i 1. This analytical solu-tion requires numerical quadrature because Q is a function of x. However, ifQx is linearized in the above interval and replaced by Qi Jixÿ xi Oh2where h denotes the spatial step size and J dQ=dx, then Eq. (36) can besolved in closed form in xiÿ1; xi1 to yield

    c A B exp bi xÿ xi�

    � � bixÿ xi cixÿ xi2; 49

    where

    ci Qi2bi

    ; bi Qi 2�ci

    bi; 50

    and A and B are constants which can be determined from the conditions

    cxiÿ1 ciÿ1; cxi ci; cxi1 ci1; 51

    to obtain the following three-point stencil ®nite dierence equation

    ciÿ1 ÿ ci bihiÿ1 ÿ cih2iÿ1exp ÿ bihiÿ1

    ÿ �ÿ 1 ci1 ÿ ci ÿ bihi ÿ cih2iexp bihi�ÿ �ÿ 1 ; 52where hi xi ÿ xiÿ1.

    For equal spacings, it is easily shown that Eq. (52) becomes

    bxc0 ÿ �c00 ÿ Qx Oh2; 53

    i.e., the method is second-order accurate in space and this is the same accuracyas that of the Allen±Southwell±Il'in technique of the previous section. There-fore, the linearization of Qx does not improve the accuracy, although theeects of J are included in the ®nite dierence equation. The reason for the nogain in accuracy when Q is linearized is that Qi is already a centered approx-imation to Qx in the symmetric interval xi ÿ h; xi h and xÿ xi is an oddfunction in that interval.

    6.4. A new C0-exponentially ®tted method

    As stated previously, one of the main drawbacks of the methods presentedin the two previous subsections is that they assume that P is only a function ofx. In this section, it is assumed that P is a non-linear function of both x and c,

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 79

  • so that the discretization with respect to time of Eq. (34) together with the timelinearization of the non-linear terms allow us to write the following approxi-mation

    ÿ �c00 bxc0 dx ÿ J nc P x; cn ÿ J ncn � Rx; cnx; 54where J oP=oc and cn are functions of x.

    Eq. (54) is a linear ordinary dierential equation with variable coecientswhose solution may not be easily determined analytically. However, if fol-lowing the analysis presented in the two previous sections, the coecients andthe right-hand side of this equation are assumed to be equal to their values atthe ith grid point, then a constant coecient equation is obtained whose so-lution can be written as

    cx A exp kxÿ xiÿ � B exp kÿxÿ xi Ridi ÿ J ni ; 55

    where

    k bi2� bi

    2�

    � �2 di ÿ J

    ni

    !1=2; 56

    kÿ bi2�ÿ bi

    2�

    � �2 di ÿ J

    ni

    !1=2; 57

    and A and B are constants which are to be determined from Eq. (51).Eq. (51) results in the following ®nite dierence equation

    ciÿ1 ÿ Ti Ti ÿ ciexpÿkhexpÿkÿh ÿ expÿkh

    ci1 ÿ Ti Ti ÿ ciexpkhexpkÿh ÿ expkh ; 58

    whose accuracy is Ok; h2, and

    Ti Ridi ÿ J ni: 59

    An advantage of the C0-exponentially ®tted method presented here comparedwith those of the two previous sections is that it accounts for the non-linearitiesof the source term P . In addition, the method accounts for the in¯uence of thereaction terms on the spatial distribution of c through the values of k and kÿ

    (cf. Eqs. (56) and (57)).

    Remark 2. It can be easily shown that if P and cn are replaced by

    Px; c P xi; cni J ni cÿ ci oPox

    � �ni

    xÿ xi; 60

    cn cni ocox

    � �ni

    xÿ xi; 61

    80 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • respectively, in Eq. (54) rather than by P x; c P xi; cni J ni cÿ cni and cnias it was done previously, the resulting equation can also be integrated an-alytically, yields a three-point stencil, and has an Ok; h2 accuracy, i.e., it hasthe same accuracy as if one does not linearize P (or S) and cn with respectto x.

    In Eq. (54), we accounted for the convection, reaction and diusion pro-cesses in the left-hand side of that equation. In the next three remarks, otherexponentially ®tted methods based on the convection and diusion, diusionand reaction, and diusion processes are developed.

    Remark 3. If Eq. (54) is written as

    ÿ �c00 bxc0 P x; cn J ncÿ cn ÿ dxc � Rx 62and the coecients and right-hand side of this equation are assumed to beconstant and equal to their values at xi, then the analytical solution of theresulting equation is

    cx A B expkxÿ xi Ribi xÿ xi; 63where

    k bi�; 64

    and A and B are constants which are to be determined from Eq. (51).Use of Eq. (51) results in the following ®nite dierence equation

    ciÿ1 ÿ ci Rih=biexpÿkh ÿ 1

    ci1 ÿ ci ÿ Rih=biexpkh ÿ 1 ; 65

    whose accuracy is Ok; h2, and whereRi P ni J ni ci ÿ cni ÿ dici: 66

    Remark 4. If Eq. (54) is written as

    ÿ �c00 dx ÿ J nc P x; cn J ncn ÿ bxc0 � Rx 67and both the coecients and the right-hand side of this equation are assumedto be constant and equal to their values at xi, then the analytical solution of theresulting equation is

    cx A sinhkxÿ xi B coshkxÿ xi Ridi ÿ J ni; 68

    where

    k di ÿ Jni

    � �1=2; Ri P xi; cni ÿ J ni cni ÿ bic0i; 69

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 81

  • and A and B are constants which are to be determined from Eq. (51). If, inaddition, c0i is approximated by c0in, then use of Eq. (51) yields

    ciÿ1 ci1 ÿ 2coshkhci 2 Ridi ÿ J ni1ÿ coshkh; 70

    whose accuracy is Ok; h2.If c0i is not approximated by c0in, then Eq. (70) must be solved in an iterative

    manner since Ri depends on c0i.

    Remark 5. If Eq. (54) is written as

    ÿ �c00 P x; cn J ncÿ cn ÿ bxc0 ÿ dxc � Rx; 71and both the coecients and the right-hand side of this equation are assumedto be constant and equal to their values at xi, then the analytical solution of theresulting equation is

    cx A Bxÿ xi ÿ Ri2�xÿ xi2; 72

    where A and B are constants which are to be determined from Eq. (51). If, inaddition, c0i and ci are approximated by c0in and cni in R, then use of Eq. (51)yields

    ciÿ1 ci1 ÿ 2ci ÿRih2

    �; 73

    whose accuracy is Ok; h2.If c0i and ci in R are not approximated by c0in and cni , respectively, then

    Eq. (73) must be solved in an iterative manner since Ri depends on c0i and ci.In Eqs. (54), (62), (67) and (71), we accounted for the operators associated

    with convection, diusion and reaction, diusion and convection, diusion andreaction, and diusion only, respectively, which contain second±order spatialderivatives. We intentionally excluded the ®rst-order convection operator be-cause it would not allow us to satisfy Eq. (51) if considered by itself or with thereaction terms.

    7. C1-exponentially ®tted methods

    In Ref. [11], the author developed a family of C1-exponentially ®ttedmethods for ordinary dierential equations which are extended here to solveEq. (34) numerically. These methods dier from the C0-exponentially ®ttedones presented in the previous section in that (i) Eq. (54) which is a method oflines technique is solved in xiÿ1; xi subject to continuity of the dependentvariables at the grid points iÿ 1 and i, and (ii) the solutions of Eq. (54) inxiÿ1; xi and xi; xi1 are required to have the same ®rst-order derivative at xi.

    82 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • Consider Eq. (54) which corresponds to a time-linearization of Eq. (34) butwhere the coecients and right-hand side are functions of x. If Eq. (54) islinearized in space with respect to the left point of the interval xiÿ1; xi, theresulting linearization can be written as

    ÿ �c00 biÿ1c0 diÿ1 ÿ J niÿ1ÿ �

    c Riÿ1 Hiÿ1xÿ xiÿ1 Liÿ1cn ÿ cniÿ1;74

    where H oR=ox and H oR=oc, and cn is a function of x. As stated inRemark 2, the last two terms in the right-hand side of Eq. (74) do notaect the accuracy of the scheme and, therefore, they will be neglectedhereon.

    The solution of Eq. (74) in the interval xiÿ1; xi can be written ascx Aiÿ1 expkiÿ1xÿ xi Biÿ1 expkÿiÿ1xÿ xi

    aiÿ1xÿ xiÿ1 biÿ1; 75where

    ai Hni

    di ÿ H ni; bi

    1

    di ÿ J niRiÿ1 ÿ biJ

    ni

    di ÿ J ni

    � �; 76

    kiÿ1 and kÿiÿ1 are given by Eqs. (56) and (57), and Aiÿ1 and Biÿ1 are to be de-

    termined from

    cxiÿ1 ciÿ1; cxi ci; 77

    as

    Biÿ1 ciÿ1 ÿ ci expÿkiÿ1h aiÿ1hÿ biÿ11ÿ expÿkiÿ1h

    expÿkÿiÿ1h ÿ expÿkiÿ1h; 78

    Aiÿ1 ci expÿkÿiÿ1h ÿ ciÿ1 ÿ aiÿ1h biÿ11ÿ expÿkÿiÿ1h

    expÿkÿiÿ1h ÿ expÿkiÿ1h: 79

    In exactly the same manner, one can determine the solution of the linearizationof Eq. (54) about xi in the interval xi; xi1; and matching of the ®rst-orderderivative of the solutions in xiÿ1; xi and xi; xi1 provide the following three-point stencil

    ki expÿkÿi h ÿ kÿi expÿki hexpÿkÿi h ÿ expÿki h

    ci1

    Ui expÿkiÿ1 kiÿ1hUiÿ1ci

    kiÿ1 expÿkiÿ1h ÿ kÿiÿ1 expÿkÿiÿ1h

    expÿkÿiÿ1h ÿ expÿkiÿ1hciÿ1

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 83

  • ai ki ÿ kÿi h

    expÿkÿi h ÿ expÿki hÿ 1

    � � aiÿ1 1 hk

    ÿiÿ1 expÿkÿiÿ1h ÿ kiÿ1 expÿkiÿ1h

    expÿkÿiÿ1h ÿ expÿkiÿ1h� �

    bikÿi 1ÿ expÿki h ÿ ki 1ÿ expÿkÿi h

    expÿkÿi h ÿ expÿki h biÿ1

    Viÿ1expÿkÿiÿ1h ÿ expÿkiÿ1h

    ; 80

    where

    Ui kÿi ÿ ki

    expÿkÿi h ÿ expÿki h; 81

    Vi ki expÿki h1ÿ expÿkÿi h ÿ kÿi expÿkÿi h1ÿ expÿki h:82

    Remark 6. The C1-exponentially ®tted method presented above accounts forthe convection, diusion and reaction terms. Other C1-techniques whichaccount for convection and diusion, diusion and reaction, and diusion onlycan also be developed as in Remarks 3±5, respectively. The resulting methodswould be iterative since c and/or c0 would appear in the right-hand sides ofthese operators.

    7.1. Accuracy of C1-exponentially ®tted methods

    The accuracy of the C1-exponentially ®tted methods presented in this sectioncan be easily determined by replacing the discrete values ci by their continuouscounterparts, i.e., cxi, and expanding the resulting equation in Taylor seriesexpansions around xi. The result of this expansion indicates that the methodpresented above is Oh2. However, in order to both compare C0- and C1-methods and assess the eects of the space linearization, we shall consider herethe following equation

    c00 Sx; 83which can be easily obtained from Eq. (54).

    When Eq. (83) is discretized by means of a C0-exponentially ®tted method,one can easily obtain

    c00 ÿ Sx ÿ h2

    12civ Oh4; 84

    i.e., C0-exponentially ®tted methods are second-order accurate in space.However, when a C1-exponentially ®tted technique is applied to Eq. (83), oneobtains the following three-point ®nite dierence equation

    84 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • ci1 ÿ 2ci ciÿ1 h2

    2Siÿ1 Si h

    3

    62Hiÿ1 Hi; 85

    which, upon using Taylor's series expansion, yields

    c00 ÿ Sx ÿ h2

    12H 0 civ Oh3; 86

    if the source term is approximated in xi; xi1 by Sx Si Hixÿ xi Oh2with H dS=dx, and

    c00 ÿ Sx ÿ h2

    H 0 h2

    12civ Oh3; 87

    if the source term is approximated in xi; xi1 by Sx Si Oh. Therefore, inorder to achieve second-order spatial accuracy with C1-exponentially ®ttedtechniques, the source terms must be approximated linearly in each subinter-val. However, as noted in Remark 2, the coecients of the dierential equationmay be taken as frozen at one of the ends of the interval. If these coecientswere approximated linearly in each interval, one would obtain linear ordinarydierential equations with variable (linear) coecients whose solution couldnot, in general, be found analytically.

    If, in Eq. (85), the terms in H are discretized by means of forward dier-ences, this equation becomes

    ci1 ÿ 2ci ciÿ1 h2

    6Siÿ1 4Si Si1; 88

    which is related to a compact discretization of the source term, and includes theeects of the reaction terms at three dierent grid points. Compact discreti-zations and comparisons between the exponentially ®tted methods developedin this paper and other ®nite dierence techniques such as central schemes andcubic splines are presented in the Appendix for a steady-state convection±diusion equation with constant coecients.

    Remark 7. If in Eq. (87) one uses the (original) Eq. (83), one can easilyobtain

    c00 Sx ÿ h2

    6S00 Oh4; 89

    or

    c00 h2

    6civ Sx Oh4; 90

    which imply that one can reduce the truncation errors by solving, instead of theoriginal equation, the following modi®ed one

    c00 1 h2

    6

    � �Sx Oh4; 91

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 85

  • which can be discretized by means of the exponentially ®tted techniques pre-sented in this paper.

    Remark 8. The ®nite dierence equations provided by C0- and C1-exponen-tially ®tted methods are identical for Eq. (34) with a source term S in theright-hand side of this equation if D; u and S are constant, or S is a linearfunction of c.

    Remark 9. When C1-exponentially ®tted methods are applied to the followingconvection-diusion equation

    ÿ �c00 bxc0 Sx; 92one can easily obtain the following ®nite dierence formula

    biÿ1�

    1

    1ÿ exp ÿ biÿ1h�

    ÿ � ciÿ1ÿ biÿ1

    1

    1ÿ exp ÿ biÿ1h�

    ÿ � bi�

    1

    exp bih�

    ÿ �ÿ 1 !

    ci bi�

    1

    exp bih�

    ÿ �ÿ 1 ci1 Siÿ1

    biÿ11ÿ hbiÿ1

    1

    1ÿ exp ÿ biÿ1h�

    ÿ � ! Sibi

    hbi�

    1

    exp bih�

    ÿ �ÿ 1ÿ 1 !

    ;

    93whose accuracy is only Oh because the source terms have been approxi-mated by their values at xiÿ1 and xi in the intervals xiÿ1; xi and xi; xi1,respectively. However, if the source terms are approximated by linear equa-tions in these intervals, i.e., Sx Si Hixÿ xi in xi; xi1, one can easilyobtain

    biÿ1�

    1

    1ÿ exp ÿ biÿ1h�

    ÿ � ciÿ1ÿ biÿ1

    1

    1ÿ exp ÿ biÿ1h�

    ÿ � bi�

    1

    exp bih�

    ÿ �ÿ 1 !

    ci bi�

    1

    exp bih�

    ÿ �ÿ 1 ci1 bi

    hbi�

    1

    exp bih�

    ÿ �ÿ 1ÿ 1 !

    cibih2

    1

    exp bih�

    ÿ �ÿ 1 biÿ1 1 ÿ biÿ1h

    1

    1ÿ exp ÿ biÿ1h�

    ÿ �!

    ciÿ1h 2ÿbiÿ1h�

    1

    1ÿ exp ÿ biÿ1h�

    ÿ � !; 94whose accuracy is Oh2 and where

    86 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • ci Hi2bi

    ; bi Sibi �Hi

    b2i; H dS

    dx: 95

    On the other hand, if the linearization of Sx in xiÿ1; xi and xi; xi1 is per-formed about xi and xi, respectively, rather than about xiÿ1 and xi, respectively,then one can easily obtain the following ®nite dierence expression

    biÿ1�

    1

    exp ÿ biÿ1h�

    ÿ �ÿ 1 ciÿ1ÿ biÿ1

    1

    exp ÿ biÿ1h�

    ÿ �ÿ 1ÿ bi� 1exp bih�ÿ �ÿ 1 !

    ci ÿ bi�

    1

    exp bih�

    ÿ �ÿ 1 ci1 ÿ Si

    biÿ11 biÿ1h

    1

    exp ÿ biÿ1h�

    ÿ �ÿ 1 !

    Sibi

    1

    ÿ bih

    1

    exp bih�

    ÿ �ÿ 1!;

    96whose accuracy is Oh.

    If the values of bx and Sx in Eq. (92) are approximated by bL and SL,respectively, in xiÿ1; xi and by bR and SR, respectively, in xi; xi1, then one canobtain the following expression

    bL�

    1

    exp ÿ bLh�

    ÿ �ÿ 1 ciÿ1ÿ bL

    1

    exp ÿ bLh�

    ÿ �ÿ 1ÿ bR� 1exp ÿ bRh�

    ÿ �ÿ 1 !

    ci ÿ bR�

    1

    exp bRh�

    ÿ �ÿ 1 ci1 ÿ SL

    bL1 bLh

    1

    exp ÿ bLh�

    ÿ �ÿ 1 !

    SRbR

    1

    ÿ bRh

    1

    exp bRh�

    ÿ �ÿ 1!;

    97and, if SL and bL are approximated, respectively, by

    SL 12Siÿ1 Si; bL 1

    2biÿ1 bi; 98

    then one obtains the El-Mistikawy and Werle method [16]. This method wasdeveloped by means of a compact implicit technique and is Oh2 or Ch2 ac-curate where C is independent of � and h, and this is the largest orderachievable for a three-point scheme.

    Remark 10. The exponential nature of the C0- and C1-methods presented heremakes them very suitable for singular perturbation problems characterized byboundary and/or transition layers where the gradients of the solution are large,and for grid adaptation or re®nement. For example, if the arc length of thesolution is used as the parameter to de®ne the grid spacing, the location of thegrid points could be determined as

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 87

  • iNPZ xi

    0

    xx dxZ 1

    0

    xx dx;�

    i 0; 1; . . . ;NP; 99

    where NP denotes the number of (®xed) grid points and

    xx 1 ocox

    � �2 !1=2: 100

    Alternatively, one can make the transformation g gx such that

    gx Z x

    0

    xx dxZ 1

    0

    xx dx;�

    101

    whose Jacobian is J xg and rewrite Eq. (34) in terms of g. Then, upon timediscretization and time linearization, the resulting ordinary dierential equa-tion could be solved by means of the exponentially ®tted methods presented inthis paper. Note that the exponentially ®tted methods presented here allow todetermine xx in a piecewise analytical albeit approximate manner.

    Remark 11. The main advantages of the C0- and C1-methods presented herecompared with the characteristic-®nite dierence techniques brie¯y describedin the Introduction are that (i) they provide piecewise analytical albeitapproximate solutions, (ii) they do not require splitting of the convection±diusion±reaction operator into a sequence of simpler operators and, there-fore, do not require intermediate boundary conditions [17], and (iii) they doaccount for all the time scales of the partial dierential equation, i.e., thecharacteristic convection, diusion and reaction times. However, their maindisadvantage lies in the fact that exponentially ®tted techniques involveexponential functions in their three-point ®nite dierence formulas which maycause over¯ow and under¯ow at high Peclet numbers.

    Remark 12. If c is a an nth dimensional vector in Eq. (34) and b is a matrix,then Eq. (62) represents a system of linear (variable-coecient) second-orderordinary dierential equations which become constant-coecient ones uponapproximating the coecients and right-hand side in that equation by constantand linear functions of x, respectively. In order to integrate analytically theresulting equation, one can ®rst introduce C Qc where Q is an orthogonalmatrix, i.e., QTQ I and I is the identity matrix, and then premultiply thatequation by QT so that one can obtain

    ÿ �C00 TiC0 QT Ri; 102where Q depends on xi and Ti QTbiQ is a triangular matrix if b is a matrix orTi bi if b is a scalar because of Schur's normal form theorem. If T is an uppertriangular matrix, then one can solve Eq. (102) analytically starting from thelast component of the vector C in a backward manner so that the solution of

    88 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • the kth component of C, i.e., Ck, depends on those of Cj for j k 1; . . . ; n.Unfortunately, the work required to obtain the analytical solutions to all thecomponents of Eq. (102) may be prohibitive. However, whenever b is a matrix,one can approximate b by a diagonal one and the o-diagonal elements may bepassed to the right-hand side of Eq. (62); in this case, it is easy to obtain theanalytical solution to the resulting Eq. (62). Moreover, if b is approximated bya triangular matrix, one can use backward substitution to obtain the analyticalsolutions to all the components of c in a similar manner to the one describedabove.

    If b and d are matrices in Eq. (54), one can still use Schur's normal formtheorem but cannot triangularize the matrices bi and di ÿ J ni with the sameorthogonal matrix Q. Therefore, for nth dimensional systems of ordinary dif-ferential equations, it is more convenient to consider the diusion and reaction,the diusion and convection, and diusion operators rather than the convec-tion, diusion and reaction operators as in Eq. (62) in order to obtain ana-lytical solutions to the piecewise linearized ordinary dierential equationsarising from C0- and C1-techniques. If, however, b and d are scalars, one cansolve the piecewise linearization of Eq. (62) in an analytical fashion because theuse of Schur's normal form theorem results in a system of uncoupled linearordinary dierential equations in each interval.

    8. Conclusions

    Liouville's transformations have been used to reduce convection±diusionequations to diusion ones, and the latter have been discretized by means of acontrol-volume formulation which is second-order accurate in space. It hasbeen shown that such a discretization is identical to that of C0- and C1-ex-ponentially ®tted methods when the convection speed and the diusion co-ecient are constant. It has also been shown that the Liouvilletransformation is not unique and that it can be generalized for cases wherethe convection speed and the diusion coecient are functions of the spatialcoordinate.

    It has also been shown that the Allen±Southwell±Il'in exponentially ®ttedmethods which were developed for steady convection±diusion equations withconstant coecients are particular cases of the C0-exponentially ®tted tech-niques presented in this paper. However, the latter account for the eects ofboth the time discretization and the time linearization of the non-linear sourceterms on the numerical solution of advection±diusion±reaction equations.Moreover, it has been shown that the Allen±Southwell±Il'in exponentially®tted methods can be easily improved by accounting for the linearization of thesource term with respect to the spatial coordinate, although such an im-provement does not increase the order of accuracy.

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 89

  • For one-dimensional, non-linear, time-dependent, convection±reaction±diusion equations, it has been shown that, upon the discretization of the timederivative, a two-point boundary-value problem is obtained. Furthermore,upon time linearization, it is shown that the resulting ordinary dierentialequation is linear and can be integrated analytically by means of the method ofvariation of parameters and, therefore, the problem can be reduced to one ofnumerical quadrature. In order to obtain analytical albeit approximate of theseordinary dierential equations, several C1-exponentially ®tted techniqueswhich require continuity of the dependent variables and of their ®rst-orderspatial derivatives have been developed. These techniques are not unique. Infact, three C1-exponentially ®tted methods have been proposed depending onwhether the operators for convection and diusion, diusion and reaction, andonly diusion are considered. The latter corresponds to a quadratic interpol-ation of the solution. However, the most important conclusion which has beenreached in this paper regarding C1-exponentially ®tted methods is that they canonly achieve second-order spatial accuracy if the source term is expanded inTaylor series expansion and the linear terms of this expansion are kept; oth-erwise, only ®rst-order accuracy can be obtained.

    It has also been shown that the El-Mistikawy and Werle exponentially ®ttedmethod is a particular case of the C1-techniques presented in this paper, andcorresponds to a special discretization of the source terms in steady convec-tion±diusion±reaction equations whose coecients and source term are onlyfunctions of the spatial coordinate.

    The exponentially ®tted methods developed in this paper have been appliedto a one-dimensional, linear, convection±diusion equation and compared withthose generated by central dierences, upwind or donor-cell dierences, cubicsplines, and three-point compact methods. The results of this comparison in-dicate that exponentially ®tted methods yield discrete monotonic solutionswhich tend to the analytical one as the mesh is re®ned, whereas upwindmethods introduce large arti®cial viscosities at high Peclet numbers, and cen-tral dierences, cubic splines and compact methods have oscillatory solutionsat high Peclet numbers. As a consequence, the exponentially ®tted methodspresented in this paper can be used to analyze problems with steep gradients,initial, boundary and transition layers because of their exponential nature.They can also be used in multidimensional problems if the time variable is ®rstdiscretized and the resulting partial dierential equation is then time linearized,and the multidimensional operator is factorized in terms of one-dimensionalones. The piecewise linearization of these operators followed by their analyticalintegration results in the exponentially ®tted techniques presented in this paper.

    The main advantage of the methods presented in this paper is that theyaccount in an exponentially manner for the characteristic residence (convec-tion), diusion and reaction times and the time step employed in the calcula-tions. Moreover, all these methods are based on the discretization of the time

    90 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • variable and the time linearization of the resulting dierential equation. Due toits exponentially nature and the fact that their ®nite dierence equations de-pend on the convection, diusion and reaction processes and/or time-depen-dence of the solution, it is relatively easy to develop adaptive techniques forexponentially ®tted methods which concentrate the grid points where they aremost needed, i.e., where there are steep gradients of the dependent variables.

    Acknowledgements

    The research reported in this paper was supported by Project PB94-1494from the D.G.I.C.Y.T. of Spain and ESPRIT Project 9602 (Parallel Com-puting Initiative).

    Appendix A

    In this appendix, exponentially ®tted methods are compared with othertechniques for the numerical solution of the following convection±diusionequation

    �c00 ÿ c0 0; 103which has the following exact solution:

    c A D exp x�

    � �: 104

    Exponentially ®tted methods. Since Eq. (103) is linear, its discretizations bymeans of C1- and C0-exponentially ®tted techniques are identical and can bewritten as

    ÿ uiÿ1 expR uiexpR 1 ÿ ui1 0; 105which has the following solution:

    ui Cri1 Dri2; 106where

    r1 1; r2 expR; R h�: 107

    Therefore, exponentially ®tted methods provide a three-point dierence for-mula which is non-oscillatory and tends to the exact solution as i!1 for a®xed interval 0; L.

    A truncation error analysis of Eq. (105) shows that

    c0 ÿ �c00 11 R=2

    h2

    6�2c0 ÿ 3�

    2c00

    � �Oh4; 108

    which indicates that exponentially ®tted methods are second-order accurate.

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 91

  • Second-order central dierences. If, in Eq. (103), the derivatives are ap-proximated by second-order accurate ®nite dierence formulas then

    ÿ 1 R2

    � �uiÿ1 2ui R

    2ÿ 1

    � �ui1 0; 109

    whose analytical solution may be written as Eq. (106) with

    r1 1; r2 2 R2ÿ R ; 110

    which indicate that r2 becomes negative for R > 2. Therefore, for R > 2, centraldierence approximations to the convection terms provide oscillatory solutionswhose amplitude increases as x increases.

    A truncation error analysis of Eq. (109) shows that

    c0 ÿ �c00 ÿ h2

    6c000 Oh3; 111

    which indicates that central dierence methods are second-order accurate.Upwind or donor-cell discretizations. If the convection terms in Eq. (103) are

    approximated by a ®rst-order accurate, upwind or donor-cell discretization,the resulting ®nite dierence expression can be written as

    ÿ 1 Ruiÿ1 R 2ui ÿ ui1 0; 112whose analytical solution may be written as Eq. (106) with

    r1 1; r2 1 R; 113which shows that, since both r1 and r2 are positive, the numerical solutionpreserves the monotonicity of the analytical solution to the dierential equa-tion. However, the accuracy of this method is only Oh compared with Oh2for exponentially ®tted and central dierences. In fact, a truncation erroranalysis of Eq. (112) shows that

    c0 ÿ �c00 1 R2

    � � Oh; 114

    which indicates that donor-cell or upwind methods are ®rst-order accurate andintroduce an arti®cial diusion coecient equal to R=2 which is larger than thephysical diusion for R > 2. This arti®cial diusion can be somewhat elimi-nated by performing a modi®ed equation analysis similar to one carried withcubic splines in this appendix.

    Three-point compact discretizations. Eq. (103) can be written as

    F �G; F c0; G c00; 115where the ®rst- and second-order derivatives can be discretized by means of thefollowing three-point compact dierence formulas

    92 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • Gi1 10Gi Giÿ1 12h2 ci1 ÿ 2ci ciÿ1 Oh4; 116

    Gi1 4Gi Giÿ1 3h Fi1 ÿ Fiÿ1 Oh4; 117

    Fi1 4Fi Fiÿ1 3h ci1 ÿ ciÿ1 Oh4; 118

    Gi1 ÿ Giÿ1 2h Fi1 ÿ 2Fi Fiÿ1 Oh3; 119

    which together with Eq. (115) applied at the grid points iÿ 1; i and i 1provide a system of seven equations for nine unknowns. After some algebra,this system can be reduced to the following ®nite dierence equation

    ci1 ÿ 2ci ciÿ1 R R2 1224

    ci1 ÿ ciÿ1; 120

    whose solution can be written as Eq. (106) where

    r1 1; r2 24 RR2 12

    24ÿ RR2 12 : 121

    The absolute value of r2 is always greater than one. Therefore, the solutionassociated with r2 is oscillatory. Moreover, a truncation error analysis ofEq. (118) and Eq. (116) indicates that

    F c0 ÿ h4

    180cv; G c00 ÿ h

    4

    240cvi; 122

    so that the discretization of Eq. (115) by means of three-point compact oper-ator methods is fourth-order accurate. Unfortunately, the poor linear stabilitycharacteristics of these methods associated with central discretizations makesthem unsuitable for high Peclet numbers or convection-dominated ¯ows unlessupwinding is used [8].

    Cubic splines. Cubic splines interpolate c piecewise in intervals so that theinterpolants are continuous and coincide with the values of ci at the inter-polation points. Their ®rst- and second-order derivatives are continuous at theinterpolation points but are not necessarily identical to c0 and c00, respectively,at these points.

    The equation of a cubic spline in xi; xi1 can be written as

    sx 16hixi1 ÿ x3Mi xÿ xi3Mi1� �

    1hicixi1 ÿ x ci1xÿ xi ÿ hi

    6Mixi1 ÿ x Mi1xÿ xi;

    123where M s00 and hi xi1 ÿ xi.

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 93

  • If s and M denote the ®rst- and second-order derivatives of the spline, then itcan be easily shown that [18]

    Miÿ1 4Mi Mi1 6h2 ciÿ1 ÿ 2ci ci1; 124

    siÿ1 4si si1 3h ci1 ÿ ciÿ1; 125

    si1 ÿ siÿ1 h2Mi Mi1; 126

    si h3

    Mi h6

    Miÿ1 1h ci ÿ ciÿ1; 127

    which together with (cf. Eq. (103))

    si �Mi; 128yield

    Rÿ 2ci1 4ci ÿ 2 Rciÿ1 0; 129which coincides with a central discretization of the convection and diusionterms of Eq. (103) (cf. Eq. (109)).

    Eqs. (124) and (125) are analogous to those of the three-point compactoperator method presented above.

    A truncation error analysis of Eq. (129) shows that

    h2

    �c0 ÿ �c00 h

    4

    12civ Oh5; 130

    which indicates that cubic splines are second-order accurate. It must be notedthat Eq. (103) has been used in the derivation of the previous truncation errors.This is not strictly correct, for the truncation errors are an indication of thedierence between the original dierential equation to be solved and the dif-ferential equation truly represented by the ®nite dierence equation.

    Modi®ed equations arising from cubic splines. The truncation errors arising incubic splines can somewhat be eliminated if, instead of solving the originalEq. (103), one solves the following modi®ed equation

    c0 �c00 �h2

    12civ; 131

    which is the original Eq. (103) except that the leading-order truncation errorshave been added to its right-hand side with opposite sign (cf. Eq. (130)).

    If the fourth-order derivative in Eq. (131) is approximated by a second-order ®nite dierence expression at xi, one obtains

    c0i �

    12Mi1 10Mi Miÿ1; 132

    94 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96

  • where the right-hand side corresponds to a compact discretization (cf.Eq. (116)). If we now replace the left-hand side of Eq. (132) by si, we have

    si �12Mi1 10Mi Miÿ1; 133

    which together with Eqs. (124)±(127) can be used to obtain the ®nite dierenceequation for modi®ed cubic splines. This ®nite dierence equation involvesmore than three grid points and, therefore, it diers from the expressionsemployed in three-point compact discretizations for the ®rst- and second-orderderivatives. Moreover, the use of a modi®ed equation provides fourth-orderaccurate ®nite dierence equations but the cubic splines are no longer validdespite the fact that Eqs. (124)±(127) still hold.

    The modi®ed equation approach employed here can also be used to re-duce the truncation errors of other discretizations such as, for example,donor-cell methods. However, it is important to indicate that the originaldierential equation should not be used in the dierential equation trulyrepresented by the ®nite dierence expression because the latter includestruncation errors.

    References

    [1] K.W. Morton, Numerical Solution of Convection-Diusion Problems, Chapman & Hall, New

    York, 1996.

    [2] H.-G. Roos, M. Stynes, L. Tobiska, Numerical Methods for Singularly Perturbed Dierential

    Equations, Springer, New York, 1996.

    [3] J.J.H. Miller, E. O'Riordan, G.I. Shishkin, Fitted Numerical Methods for Singular

    Perturbation Problems, World Scienti®c, Singapore, 1996.

    [4] D. Funaro, Spectral Elements for Transport-Dominated Equations, Springer, New York,

    1997.

    [5] D.B. Spalding, A novel ®nite dierence formulation for dierential expressions involving ®rst

    and second derivatives, Int. J. Numer. Meth. Eng. 4 (1972) 551±559.

    [6] S.V. Patankar, Numerical Heat Transfer and Fluid Flow, Hemisphere, New York, 1980.

    [7] S.G. Rubin, P.K. Khosla, Higher-order numerical solutions using cubic splines, AIAA J. 14

    (1976) 851±858.

    [8] I. Christie, Upwind compact ®nite dierence schemes, J. Comput. Phys. 59 (1985) 353±368.

    [9] M. Fortes, Time-adaptive schemes for explicit solutions to one-dimensional convection-

    diusion problems, in: C. Taylor, J.T. Cross (Eds.), Numerical Methods in Laminar and

    Turbulent Flow, vol. 10, Pineridge Press, Swansea, UK, 1997, pp. 1047±1058.

    [10] O.C. Zienkiewicz, R.L. Taylor, The Finite Element Method, vol. 2, Solid and Fluid Mechanics

    and Non-linearity, McGraw-Hill, New York, 1991.

    [11] J.I. Ramos, C.M. Garc�õa-L�opez, Non-standard ®nite dierence methods for ode's and 1-Dpde's based on piecewise linearization, Appl. Math. Comput. 86 (1997) 11±36.

    [12] D.N. de G. Allen, R.V. Southwell, Relaxation methods applied to determine motion, in two

    dimensions, of a viscous ¯uid past a ®xed cylinder, Q. J. Mech. Appl. Math. 8 (1955) 129±

    145.

    [13] A.M. Il'in, A dierence scheme for a dierential equation with a small parameter aecting the

    highest derivative, Mat. Zametki 6 (1969) 237±248.

    J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96 95

  • [14] J.I. Ramos, Linearization methods for reaction-diusion equations: Multidimensional

    problems, Appl. Math. Comput. 88 (1997) 225±254.

    [15] G. Birkho, E.C. Gartland, R.E. Lynch, Dierence methods for solving convection-diusion

    equations, Comput. Math. Appl. 19 (1990) 147±160.

    [16] T.M. El-Mistikawy, M.J. Werle, Numerical method for boundary layers with blowing-The

    exponential box scheme, AIAA J. 16 (1978) 749±751.

    [17] J.I. Ramos, C.M. Garc�õa-L�opez, Intermediate boundary conditions in operator-splitting

    techniques and linearization methods, Appl. Math. Comput. 94 (1998) 113±136.

    [18] C. de Boor, A Practical Guide to Splines, Springer, New York, 1978.

    96 J.I. Ramos / Appl. Math. Comput. 103 (1999) 69±96