A First-Order System Approach for Diffusion Equation. I. Second-Order Residual-Distribution Schemes

Similar documents
Consider a function f we ll specify which assumptions we need to make about it in a minute. Let us reformulate the integral. 1 f(x) dx.

lecture 26: Richardson extrapolation

Finite Difference Methods Assignments

Polynomial Interpolation

Order of Accuracy. ũ h u Ch p, (1)

LIMITATIONS OF EULER S METHOD FOR NUMERICAL INTEGRATION

5 Ordinary Differential Equations: Finite Difference Methods for Boundary Problems

The Laplace equation, cylindrically or spherically symmetric case

Polynomial Interpolation

1 Upwind scheme for advection equation with variable. 2 Modified equations: numerical dissipation and dispersion

ERROR BOUNDS FOR THE METHODS OF GLIMM, GODUNOV AND LEVEQUE BRADLEY J. LUCIER*

Dedicated to the 70th birthday of Professor Lin Qun

Copyright c 2008 Kevin Long

MATH745 Fall MATH745 Fall

A h u h = f h. 4.1 The CoarseGrid SystemandtheResidual Equation

Explicit Hyperbolic Reconstructed Discontinuous Galerkin Methods for Time-Dependent Problems

Chapter 5 FINITE DIFFERENCE METHOD (FDM)

Inf sup testing of upwind methods

Exercises for numerical differentiation. Øyvind Ryan

Finite Difference Method

New Streamfunction Approach for Magnetohydrodynamics

SECTION 3.2: DERIVATIVE FUNCTIONS and DIFFERENTIABILITY

A = h w (1) Error Analysis Physics 141

Average Rate of Change

2.8 The Derivative as a Function

WYSE Academic Challenge 2004 Sectional Mathematics Solution Set

Notes on wavefunctions II: momentum wavefunctions

Differentiation in higher dimensions

Pre-Calculus Review Preemptive Strike

Physically Based Modeling: Principles and Practice Implicit Methods for Differential Equations

HOMEWORK HELP 2 FOR MATH 151

arxiv: v1 [math.na] 3 Nov 2011

Journal of Computational and Applied Mathematics

LIMITS AND DERIVATIVES CONDITIONS FOR THE EXISTENCE OF A LIMIT

Numerical Differentiation

How to Find the Derivative of a Function: Calculus 1

Mass Lumping for Constant Density Acoustics

Recall from our discussion of continuity in lecture a function is continuous at a point x = a if and only if

The derivative function

CS522 - Partial Di erential Equations

Math 102 TEST CHAPTERS 3 & 4 Solutions & Comments Fall 2006

Exam 1 Review Solutions

Lecture XVII. Abstract We introduce the concept of directional derivative of a scalar function and discuss its relation with the gradient operator.

1 Calculus. 1.1 Gradients and the Derivative. Q f(x+h) f(x)

Quaternion Dynamics, Part 1 Functions, Derivatives, and Integrals. Gary D. Simpson. rev 01 Aug 08, 2016.

Arbitrary order exactly divergence-free central discontinuous Galerkin methods for ideal MHD equations

Cubic Functions: Local Analysis

Implicit-explicit variational integration of highly oscillatory problems

Stability properties of a family of chock capturing methods for hyperbolic conservation laws

arxiv: v2 [cs.na] 22 Dec 2016

Math 2921, spring, 2004 Notes, Part 3. April 2 version, changes from March 31 version starting on page 27.. Maps and di erential equations

5.74 Introductory Quantum Mechanics II

Continuity and Differentiability of the Trigonometric Functions

Fast Explicit and Unconditionally Stable FDTD Method for Electromagnetic Analysis Jin Yan, Graduate Student Member, IEEE, and Dan Jiao, Fellow, IEEE

1 The concept of limits (p.217 p.229, p.242 p.249, p.255 p.256) 1.1 Limits Consider the function determined by the formula 3. x since at this point

Lecture 15. Interpolation II. 2 Piecewise polynomial interpolation Hermite splines

Optimal parameters for a hierarchical grid data structure for contact detection in arbitrarily polydisperse particle systems

MAT244 - Ordinary Di erential Equations - Summer 2016 Assignment 2 Due: July 20, 2016

NUMERICAL DIFFERENTIATION. James T. Smith San Francisco State University. In calculus classes, you compute derivatives algebraically: for example,

Higher Derivatives. Differentiable Functions

Jian-Guo Liu 1 and Chi-Wang Shu 2

THE STURM-LIOUVILLE-TRANSFORMATION FOR THE SOLUTION OF VECTOR PARTIAL DIFFERENTIAL EQUATIONS. L. Trautmann, R. Rabenstein

Lecture 10: Carnot theorem

Combining functions: algebraic methods

1watt=1W=1kg m 2 /s 3

Introduction to Derivatives

A Mixed-Hybrid-Discontinuous Galerkin Finite Element Method for Convection-Diffusion Problems

Superconvergence of energy-conserving discontinuous Galerkin methods for. linear hyperbolic equations. Abstract

Preface. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Flavius Guiaş. X(t + h) = X(t) + F (X(s)) ds.

Quantum Mechanics Chapter 1.5: An illustration using measurements of particle spin.

LECTURE 14 NUMERICAL INTEGRATION. Find

Material for Difference Quotient

5.1 We will begin this section with the definition of a rational expression. We

4. The slope of the line 2x 7y = 8 is (a) 2/7 (b) 7/2 (c) 2 (d) 2/7 (e) None of these.

Krazy Katt, the mechanical cat

arxiv: v1 [math.na] 7 Mar 2019

The Krewe of Caesar Problem. David Gurney. Southeastern Louisiana University. SLU 10541, 500 Western Avenue. Hammond, LA

Differential Calculus (The basics) Prepared by Mr. C. Hull

MAT 145. Type of Calculator Used TI-89 Titanium 100 points Score 100 possible points

GRID CONVERGENCE ERROR ANALYSIS FOR MIXED-ORDER NUMERICAL SCHEMES

Digital Filter Structures

2.1 THE DEFINITION OF DERIVATIVE

Solution. Solution. f (x) = (cos x)2 cos(2x) 2 sin(2x) 2 cos x ( sin x) (cos x) 4. f (π/4) = ( 2/2) ( 2/2) ( 2/2) ( 2/2) 4.

Chapter 2 Limits and Continuity

Robotic manipulation project

Simulations of the turbulent channel flow at Re τ = 180 with projection-based finite element variational multiscale methods

A Hybrid Mixed Discontinuous Galerkin Finite Element Method for Convection-Diffusion Problems

AN EFFICIENT AND ROBUST METHOD FOR SIMULATING TWO-PHASE GEL DYNAMICS

Time (hours) Morphine sulfate (mg)

A method of Lagrange Galerkin of second order in time. Une méthode de Lagrange Galerkin d ordre deux en temps

The Dynamic Range of Bursting in a Model Respiratory Pacemaker Network

Discontinuous Galerkin Methods for Relativistic Vlasov-Maxwell System

Differential equations. Differential equations

Notes on Multigrid Methods

Divergence Formulation of Source Term

A Demonstration of the Advantage of Asymptotic Preserving Schemes over Standard Finite Volume Schemes

arxiv: v3 [math.na] 15 Dec 2009

Poisson Equation in Sobolev Spaces

REVIEW LAB ANSWER KEY

Transcription:

A First-Order System Approac for Diffusion Equation. I. Second-Order Residual-Distribution Scemes Hiroaki Nisikawa W. M. Keck Foundation Laboratory for Computational Fluid Dynamics, Department of Aerospace Engineering, University of Micigan, FXB Building, 130 Beal Avenue, Ann Arbor, MI 48109-140, USA Abstract In tis paper, we embark on a new strategy for computing te steady state solution of te diffusion equation. Te new strategy is to solve an equivalent first-order yperbolic system instead of te second-order diffusion equation, introducing solution gradients as additional unknowns. We sow tat scemes developed for te first-order system allow O() time step instead of O( ) and converge very rapidly toward te steady state. Moreover, tis extremely fast convergence comes wit te solution gradients (viscous stresses/eat fluxes for te Navier-Stokes equations) simultaneously computed wit te same order of accuracy as te main variable. Te proposed scemes are formulated as residual-distribution scemes (but can also be identified as finite-volume scemes), directly on unstructured grids. We present numerical results to demonstrate te tremendous gains offered by te new diffusion scemes, driving te rise of explicit scemes in te steady state computation for diffusion problems. Key words: diffusion first-order system fast convergence large time step residual distribution unstructured grids 1 Introduction In tis paper, we embark on a new strategy for computing te steady state solution to te diffusion equation, u t = ν(u xx + u yy ), (1.1) were ν is a positive diffusion coefficient. Te new strategy is based on te following first-order system: u t = ν (p x + q y ), p t = (u x p)/t r, q t = (u y q)/t r, (1.) were T r may be called a relaxation time. Tis is in fact a relaxation system, often called te yperbolic eat equations, asymptotically equivalent to te original diffusion equation as T r 0 [1,, 3]. Tere ave been many attempts to develop numerical metods for suc relaxation systems [1, 4, 5, 6], wit a particular focus on te stiffness problem: an explicit time step, t = O(T r ) 0, is proibitively restricted due to an extremely small relaxation time; an implicit treatment of te stiff source term could degrade te solution accuracy [7]. Altoug based on te same equations, a new strategy is radically different from tese relaxation metods. Te key is to realize te fact tat te first-order system is equivalent to te diffusion equation at te steady state (u t = p t = q t = 0) for any T r : 0 = ν (p x + q y ), 0 = (u x p)/t r, 0 = (u y q)/t r, 0 = ν (p x + q y ), p = u x, q = u y, 0 = ν (u xx + u yy ). (1.3) 1

Ten, as far as te steady state computation is concerned, te relaxation time T r is a free parameter, and te stiffness is no longer an issue. In sort, we gain te freedom to coose T r to avoid te stiffness by giving up te time accuracy. Tis is te key idea of te new strategy. And we will see in due course tat tis simple idea paves te way for te rise of explicit scemes in te steady state computation for diffusion problems, and also brings a dramatic cange in te way an advection sceme and a diffusion sceme are combined for advection-diffusion problems. In developing numerical scemes for te first-order diffusion system (1.), we focus on te residual-distribution (or fluctuation-splitting) metod. Tis is partly because te present study was originally motivated by te need to develop diffusion scemes in te framework of te residual-distribution metod, and also because tis metod as superior features especially for unstructured grids. Tis is a metod based on nodal degrees of freedom and cell-residuals in te same spirit of te cell-vertex scemes [8], but its development as been almost exclusively for triangular unstructured grids. It as been developed extensively for problems dominated by advection and wave propagation because of te ability to reflect multidimensional pysics of te governing equations [9, 10, 11, 1, 13, 14]. But on te oter and, its application to diffusion problems ad long been almost untouced, apparently because diffusion is an isotropic process and does not benefit particularly from suc a multidimensional capability. In fact, it as been a standard practice to discretize te viscous term by te Galerkin metod and simply add to te existing residual-distribution Euler code to construct a Navier-Stokes code [15, 16, 17]. It was pointed out in [18] owever tat suc a strategy deteriorated te formal accuracy of te sceme due to an incompatibility of te two discretizations, especially in regions were advection and diffusion effects are equally important. Ten, in [18], a first-order system approac was introduced as a basis for developing uniformly accurate scemes for te advection-diffusion problems. But witout te time derivatives and te relaxation time, it only discusses te spatial discretization and no details on te metod to compute te steady state solution is given. In tis paper, we introduce te time derivatives and te relaxation time to write te first-order system as a set of evolution equations as in (1.), and develop a class of residual-distribution scemes for computing te steady state solution. In so doing, we take full advantage of aving an arbitrary relaxation time. We will sow in particular tat we can develop a class of scemes tat allow an O() time step, were is a mes size, instead of te conventional O( ) time step. Tis is a tremendous gain, and sows a great potential for promoting te use of explicit metods for steady state computations in diffusion problems for wic O( ) time step as always been te major obstacle for using explicit metods (even for steady calculations) and te motivation for resorting to oter metods suc as implicit metods. Moreover, tis rapid convergence comes wit solution gradients computed wit te equal order of accuracy as te solution u. Tis not only eliminates te need of post-processing to compute te pysical quantity of interest suc as viscous stresses or eat fluxes, but also provides suc quantities wit excellent accuracy wereas te post-processed quantities often lose te order of accuracy by at least one. We also pay a particular attention to te relation wit te Galerkin discretization. Te Galerkin discretization does not precisely fit in te framework of residualdistribution (altoug can be arranged as if it is), but rater surprisingly it is sown to emerge as a special case of te proposed scemes. Altoug tis paper is largely concerned wit te residual-distribution metod, finite-difference or finite-volume scemes can also be developed based on te same first-order system. We believe tat it can be done straigtforwardly and te description of te one-dimensional residual-distribution scemes in tis paper will provide a guide for developing tese scemes. Te first-order system, altoug in a sligtly different form, as often been utilized for developing diffusion scemes in finite-element metods: te mixed finite-element metod [19] or te least-squares finite-element metod [0]. But te focus tere is rater on accuracy, and te metod to obtain te steady state solution is not paid a particular attention, wic makes it ard to compare te present approac wit. Also, in te discontinuous Galerkin metod, te first-order system is utilized for a proper discretization of diffusion terms [1]. Te same approac was taken also in te spectral finite-volume metod []. In tese metods, because of te discontinuous nature of te numerical solution, te gradient variables are explicitly solved locally and eliminated by direct substitution back into te diffusion term. Terefore, te first-order system disappears at te end of te discretization. In te case of te residual-distribution metod, tis is not possible because te solution data is continuous, and terefore we end up wit a globally coupled system of equations. In effect, we will be solving tis global system iteratively by marcing in time until convergence. Tis owever sould not be taken as a disadvantage because tis is ow te residual-distribution scemes acieve second-order accuracy at te steady state witout reconstruction. Also tis makes it possible to acieve a rapid convergence to te steady state wit O() time step in te first-order system approac wit te gradient variables directly available on boundary nodes were suc information is particularly valuable (e.g., skin friction/eating rate). We set out in Section te residual-distribution metod in relation to diffusion problems. Describing te

Preprint accepted for publication in Journal of Computational Pysics, 007-07 Figure 1: Continuous piecewise linear data representation. Figure : Distribution of cell-residuals and te dual control volume. difficulties wit te diffusion equation, we finally arrive at te first-order system approac. We ten begin to develop a class of residual-distribution scemes for te first-order system. In Section 3 we describe te development and te analysis of te new scemes in one dimension. It is ten extended to two dimensions in Section 4. In Section 5, we sow tat te first-order system approac can be used to derive dissipation terms for scalar diffusion scemes. In Section 6, we present numerical results to demonstrate te accuracy and te convergence properties of te new scemes for bot one-dimensional and two-dimensional problems. Residual-Distribution Metod and Diffusion Equation.1 Residual-Distribution Metod in One Dimension We call metods residual-distribution if tey can be factored into te two steps, residual evaluation and distribution. Consider computing te steady state solution of te one-dimensional conservation law, u t + f x = q. (.1) To discretize, we generate a set of nodes {J} wit coordinates x j distributed arbitrarily over te domain of interest, and store te solution at eac node (u j, p j ), j {J} assuming te piecewise linear variation over eac cell (see Figure 1). Tis defines a set of cells {C} of size x C = x j+1 x j. Ten, for eac cell, we evaluate te cell-residual (or fluctuation) φ C as an integral value of te steady part of te equation, φ C = C (f x q) dx = (f j+1 f j ) + q j+1 + q j (x j+1 x j ), (.) were te source term as been evaluated by te trapezoidal rule. Note tat te source term approximation as been deliberately cosen to be exact for linear q, in order to be compatible wit te accuracy of te oter term. Tis defines a measure of te error in satisfying te steady equation over te cell. If tis does not vanis, we must cange te nodal solutions to reduce te error. Tis brings te second step, i.e., distribution. We determine fractions of φ C to be distributed to te nodes on te left and te rigt, φ C j and φ C j+1 by φ C j = β C j φ C, φ C j+1 = β C j+1φ C, (.3) were β C j and βj+1 C are distribution coefficients tat satisfy β C j + β C j+1 = 1 (.4) for conservation. Having done tis for all cells, we ave te following semi-discrete equation, wit L and R indicating te left and rigt cells of node j, du j = 1 [ φ L j + φ R ] 1 [ j = β L j j φ L + βj R φ R], (.5) j were j = (x j+1 x j 1 )/, wic we integrate until we reac te steady state. Te key to construct a successful sceme is, of course, te coice of te distribution coefficient βj C. Tis is were te pysics of te 3

equation plays an important role. For example, for yperbolic equations, an upwind sceme is constructed by te following distribution coefficients: βj C = 1 ) (1 ac a C, βj+1 C = 1 ) (1 + ac a C, (.6) were a C = ( f/ u) C wic may be evaluated using te Roe linearization, f j+1 f j = a C (u j+1 u j ) [3]. In fact, wit tese coefficients, te semi-discrete equation (.5) can be written as were F j+ 1 du j = 1 [ ] F j+ 1 F j j 1 + ˆq j, (.7) = 1 (f j+1 + f j ) + ac (u j+1 u j ) (.8) ] q j + q j 1 x L + βj R q j+1 + q j x R. (.9) ˆq j = 1 j [β L j Tis can be interpreted as a finite-volume sceme wit a rater complicated source term discretization wic would be simply ˆq j = q j in te finite-volume metod. Hence, te residual distribution sceme and te finitevolume sceme are identical except for te source term discretization. Note tat te sceme is second-order accurate at a steady state. Tis is true for any bounded distribution coefficients on general non-uniform grids. Tis is because te nodal residual is a weigted average of cell-residuals tat vanis individually for exact linear solutions of te conservation law. Tis property is called residual property and one of te reasons for te superior accuracy of te residual-distribution scemes on irregular grids. Tis is particularly advantageous over te finite-difference and te finite-volume scemes for advection-diffusion problems were nonuniform grids are desirable to efficiently resolve narrow transition regions suc as boundary layers. If implemented as a finite-volume sceme wit ˆq j = q j, te sceme will be only first-order accurate at a steady state due to te lack of te residual property. To recover te second-order accuracy, te source term must be discretized in suc a way tat te steady equation f x = q (.10) is satisfied wit second-order accuracy at a steady state. Tis can be done by using te residual distribution formulation wic gives a proper discretization suc as (.9), or by using oter tecniques specific to te finitevolume metod (see [4] and references terein). In particular, a metod in [5] is capable of producing a finite-volume sceme in te form (.8) wit (.9).. Residual-Distribution Metod in Two Dimensions Now, in two dimensions, consider again solving te conservation law, u t + f x + g y = q. (.11) We begin by dividing te domain of interest into a set of triangles {T }, wit a set of nodes {J}, and store te solution values at nodes. We ten proceed as in one dimension, first to evaluate te cell-residual. For eac triangular cell T {T } wit vertices {i T } = {1,, 3}, we evaluate a local cell-residual, φ T, φ T = (f x + g y q) dxdy, (.1) wic becomes, for a piecewise linear approximation of f, g, and q, T φ T = (fx T + gy T )S T + q 1 + q + q 3 S T = 1 3 (f i, g i ) n i + q 1 + q + q 3 S T, (.13) 3 i {i T } were f T x and g T y denote constant derivatives over te triangle, S T is te area of te triangle, {i T } denotes a set of nodes tat form te triangle, and n i is te scaled inward normal vector of te edge opposite to node i (see 4

Preprint accepted for publication in Journal of Computational Pysics, 007-07 Figure 3: Distribution of a non-zero cell-residual to te set of vertices {i T } = {1,, 3}. Figure 4: Median dual cell around node j in te set of triangles saring tat node {T j }. Figure 4). Note tat te source term approximation as been deliberately cosen, as in one dimension, to be compatible wit te accuracy of te oter term. We now move on to distribute te cell-residual to te nodes. We determine a fraction φ T i of φ T to be distributed to node i of triangle T by φ T i = β T i φ T i {i T }, (.14) (see Figure 3) were β T j is a distribution coefficient wit te property βi T = 1 (.15) i {i T } for conservation. Again, it is te distribution coefficient tat reflects te pysics of te governing equations. Tere as been extensive researc work on te distribution coefficients almost exclusively for yperbolic problems, and today various upwind scemes are available (see [9, 6] for example). Note tat te upwind sceme in two dimensions is not unique even for a linear problem, and tat residual-distribution scemes cannot always be reprased as a finite-volume sceme. Tis means tat te residual-distribution scemes are fundamentally different from te finite-volume scemes, and te connection between te two metods begins to blur in iger dimensions. It is important to note tat te cell-residual (.13) vanises for exact linear solutions, noting will be distributed ten, and te solution is preserved as a result. So, we ave te residual property, and it is independent of te sape of te cell. Tis is a great advantage especially for unstructured grids. And as in one dimension, te sceme is terefore second-order accurate at te steady state for bounded distribution coefficients [11]. Note tat tis is no longer true if we evaluate te source term separately by a point value as is done in te finite-volume scemes, and te sceme will ten be only first-order accurate. In tis study, we do not consider tis option. Finally, accumulating te partial residuals distributed at node j, we arrive at te following semi-discrete form: du j = 1 S j T {T j } φ T j, (.16) were S j is te median dual cell area around node j, and {T j } denotes a set of triangles saring te node (see Figure 4). We ten integrate tis in time to reac te steady state..3 Galerkin Discretization of Diffusion Equation In applying te residual-distribution metod to te diffusion equation wic involves second-order derivatives, we immediately notice tat a cell-residual cannot be defined over a cell because it vanises identically for 5

piecewise linear solutions. One way to overcome tis difficulty is to discretize te diffusion term directly at a node by te Galerkin metod, and ten write te result as a sum of te contributions from te nearby cells as if it is residual-distribution. Consider te one-dimensional diffusion equation, u t = νu xx. (.17) We assume a uniform grid = x j+1 x j, and apply te Galerkin metod: multiply te equation by te piecewise linear basis function tat takes 1 at node j, and 0 at nodes j 1, and j + 1, and ten integrate by parts from x = x j 1 to x = x j+1. Ten, lumping te left and side, we obtain te following semi-discrete equation: wic can be written as du j = ν (u j+1 u j + u j 1 ), (.18) du j = 1 [ [ φ R j + φ L ] 1 ν (uj+1 u j ) j = ν (u ] j u j 1 ), (.19) so tat we find tat te contributions to te nodes witin cell C are defined as φ C j = ν(u j+1 u j ), φ C j+1 = ν(u j+1 u j ). (.0) In tis form, te sceme can be implemented in te residual-distribution framework. However, it is clear tat te contributions witin a cell sum up to zero: φ C = φ C j + φc j+1 = 0. Hence te cell-residual does not exist, and in tis sense te Galerkin sceme is not residual-distribution. Similarly, te two-dimensional diffusion equation (1.1) can be easily discretized by te Galerkin metod. Or equivalently, we can directly integrate te diffusion term over a set of triangles {T j }: first convert te integral to te line integral around {T j } by te divergence teorem, and ten evaluate it wit te constant gradient over eac triangular cell. In eiter way, we arrive at te following discretization: S j du j = ν T {T j } u T n T j, (.1) were n T j is te scaled inward normal vector of te edge opposite to node j of triangle T (see Figure 4). Ten, we find from tis tat te contribution to node i witin cell T is defined as φ T i = ν ut n T j, (.) wic owever again sums up to zero over te cell because n T 1 +n T +n T 3 = 0, and terefore no cell-residual exists. Tis migt seem a natural consequence because te diffusion term identically vanises over te cell for piecewise linear solutions, but in fact, it as been sown tat tis is true for any basis functions [7]. Cell-residuals are necessary for a sceme to be residual-distribution and even vital for te advection-diffusion scemes in wic cell-residuals for te entire equation are sougt. It seems opeless to ave cell-residuals for te Galerkin sceme, but we will discover later tat cell-residuals for te Galerkin sceme do exist; tey emerge, rater surprisingly and paradoxically in a way, out of te residual-distribution scemes tat we propose in tis paper..4 Residual-Distribution for Diffusion Equation It is possible to evaluate a cell-residual for te diffusion term if te solution gradient is available at nodes. In one dimension, we may reconstruct te gradient at node j, (u x ) j, by a simple finite-difference approximation, and evaluate te cell-residual as φ C = C (u x ) j = u j+1 u j 1, (.3) νu xx dx = ν [(u x ) j+1 (u x ) j ]. (.4) 6

Tis does not vanis identically and terefore can drive te cange of te nodal solutions. Similarly in two dimensions, we can reconstruct te gradients at nodes, and ten evaluate cell-residuals for te diffusion term. Tis type of sceme was studied in [1, 7, 8] and in [13] for quadrilateral grids. To distribute te cell-residual, in [13, 18, 7], equal weigts are proposed to reflect te isotropic nature of diffusion, and in [1, 8] were te advection-diffusion problems are considered, upwind coefficients are used for te entire cell-residual. Te resulting sceme is genuinely residual-distribution: it as te residual property and can be naturally combined wit an advection sceme for te advection-diffusion problems. But te sceme is no longer compact because te stencil as been extended by way of reconstruction. For example, in order for te sceme to be second-order accurate, te cell-residual must be evaluated wit second-order accuracy. Tis requires at least a quadratic reconstruction, tus demanding a very large stencil especially in two dimensions. Even worse, it is pointed out in [13] tat tese scemes (wit bounded distribution coefficients) always suffer from a lack of dissipation for ig-frequency error modes for bot triangular and quadrilateral grids. Certainly, tese scemes need some form of dissipation, but deriving a dissipation term for te scalar diffusion sceme turns out to be a nontrivial task. But we will discover a form of dissipation from te new diffusion scemes we develop in tis paper. We will discuss tis in more details in Section 5..5 First-Order System Approac We now propose a new strategy: we carry te gradient p as unknown and solve te first-order system instead, t u t = ν p x, p t = (u x p)/t r, (.5) were T r is a free parameter. Tis is ten equivalent to te diffusion equation, u t = ν u xx, at te steady state were exactly we seek te solution. Wit te first-order system, since tere appear only first-order derivatives, te cell-residuals can be evaluated straigtforwardly wit second-order accuracy witout reconstruction as we store all variables (u, p) at nodes. In sort, we can now develop compact scemes. And tis is true not only for te residual-distribution scemes but also for finite-difference or finite-volume scemes, simply because we no longer need to discretize te second-order derivative wic generally requires an extended stencil. Tis is one of te advantages of solving te first-order system instead of te second-order diffusion equation. In fact, in general, tere are a number of advantages for solving first-order systems in place of equations wit iger derivatives: compact stencils, stiffness made local, ease of functional decomposition, and so on. An extensive discussion on te use of first-order systems in computational fluid dynamics is given by Van Leer [9]. Here, we focus on te aspects particular to te first-order diffusion system. Te first-order system (.5) is identical to te yperbolic eat equations: asymptotically equivalent to te original diffusion equation as T r = O(ν) 0; correctly modeling te sort time beavior of eat flows (a solution to te paradox of te infinite eat propagation) [1,, 3]. Difficulties in solving tis system lies in te stiff source term, p T r, on te rigt and side of te second equation. Because T r is typically an extremely small quantity, an explicit time step, t = O(T r ) 0, is proibitively restrictive. But an implicit treatment of te stiff source term could degrade te solution accuracy unless it is strongly coupled wit te flux computation [7, 30, 31]. Te same difficulties are sared wit oter pysical models of interest, suc as rarefied gas dynamics or radiation ydrodynamics. Hence, numerical metods for solving tese relaxation systems ave been extensively studied [1, 4, 5, 6], wit a particular focus on te same stiffness problems. But te stiffness is not an issue in our case because te system is equivalent to te diffusion equation for any T r at te steady state, and te steady state solution is exactly wat we are interested in. Tis makes te development of numerical scemes a lot easier tan te relaxation metods. It is interesting to note tat te removal of te stiffness comes at te expense of correct transient beavior. Tis is similar to te local preconditioning tecnique [3, 33, 34, 35]. In tis tecnique, by altering te transient property of te time-dependent system (losing time accuracy), one attempts to optimize te condition number (te ratio of te maximum to te minimum wave speeds) in order to maximize te effect of error propagation tereby accelerating te convergence toward te steady state. Te stiffness ere is caused by a large condition number, and tis is made to close to 1 as muc as possible by multiplying te spatial part of te time-dependent system by a preconditioning matrix. In fact, te first-order system (.5) can be interpreted as a preconditioned system of te yperbolic eat equations. Suppose we ave te yperbolic eat equations wit te relaxation time ɛ 1, ( ) ( ) ( ) ( ) u 0 ν u 0 =. (.6) p 1/ɛ 0 p p/ɛ 7 x

Tis is a pysically correct time-dependent system. Now, it is easy to see tat multiplying te rigt and side by te following preconditioning matrix: ( ) 1 0, (.7) 0 ɛ/t r were T r is a free parameter, we obtain te first-order system (.5). In effect, te preconditioning matrix replaces te relaxation time ɛ by a free parameter T r. Te system no longer describes a pysically correct evolution of eat flows, but it is not stiff any more and still yields a correct solution at te steady state. Altoug te meaning of stiffness is sligtly different, in bot cases, te key idea is tat we remove stiffness by discarding correct time-dependent beavior. It is important to note tat altoug analytically te steady state solution does not depend on ν, te transient solution depends on it. But numerically, te dependency on ν can be eliminated by a suitable definition of te time step. In fact, for scalar scemes directly solving te diffusion equation, suc as te Galerkin sceme and te distribution sceme based on te gradient reconstruction, a time integration wit time step t 1 ν will cancel te effect of ν, and te convergence toward te steady state will be independent of ν. Or simply but equivalently, it is always possible in te diffusion equation to eliminate ν by a suitable time scaling. Tis is a natural and desirable property for steady state computations. In te case of te first-order system, te same can be true if te entire rigt and side is proportional to ν. Tis is possible by setting T r 1 ν, and terefore we set T r = L r ν, (.8) were te lengt scale L r as been introduced for te sake of dimensional consistency. Ten, in view of te relaxation approac [1], te solution to te first-order system tends to stay in te frozen limit, i.e., obey te yperbolic system rater tan te diffusion equation for small ν. For large ν, te relaxation time T r becomes small, but in tis case te solution sould reac te steady state quickly anyway. Tis seems to indicate tat te relaxation time is adjusted so as to keep te system strongly yperbolic toward te steady state for arbitrary ν. As for te value of L r, we may simply take L r = 1 so tat te system becomes symmetric: ( ) ( ) ( ) ( ) u 0 ν u 0 =. (.9) p ν 0 p νp t Tis is a good coice, but certainly may not be te best. We sall see later tat te best value of L r depends on te type of te sceme and also on te purpose for wic te sceme is employed. Note tat te equations we are trying to solve sould now be completely yperbolic. But we expect tat te solution is smoot because it will satisfy te diffusion equation eventually at te steady state. Tis can be a great advantage because all tecniques developed for yperbolic problems can be applied witout any special mecanisms to capture discontinuities (of course suc a mecanism may elp wen an initial solution contains some irregularity). In oter words, we can only focus on te accuracy rater tan oter qualitative properties suc as monotonicity. It may seem, by te way, tat te isotropic nature of diffusion seems to ave disappeared, but as we sall see later it remains in te disguise of a set of waves traveling isotropically. We are now ready to develop numerical scemes for te first-order diffusion system. We continue to focus on te residual-distribution metod in te rest of te paper, but te first-order system approac can equally apply to oter metods. In one dimension, tis can be clearly seen in te finite-difference formula arising from te new diffusion scemes we present in te next section. 3 New Diffusion Scemes in One Dimension In tis section, we design a class of residual-distribution scemes for one-dimensional diffusion problems based on te equivalent first-order system. In te first subsection, we define te one-dimensional first-order diffusion system and discuss te property of te system. In te second subsection, we develop a class of residualdistribution scemes for te first-order system. In particular, we will discover tat te Galerkin sceme turns out to be a special case of te proposed sceme. In te tird subsection, we sow tat some of te scemes allow O() time step for explicit time integration toward te steady state. In te fourt subsection, Fourier analysis follows were L r is defined to minimize te damping factor of te sceme, and tis completes te design of te new scemes. Ten, in te following subsection, we sow from a truncation error analysis tat te sceme is second-order accurate for all variables. x 8

3.1 First-Order Diffusion System We consider te one-dimensional diffusion problem: u t = ν u xx in Ω = [0, 1], (3.1) were ν > 0, and bot u(0) and u(1) are given as boundary conditions. Our interest is to obtain te steady state solution to tis problem. We ten consider solving te following first-order system: u t = ν p x, p t = (u x p)/t r, (3.) or written in te vector form, U t + AU x = Q, (3.3) were [ U = [u, p] t, A = 0 ν 1/T r 0 ], Q = [0, p/t r ] t, (3.4) wit T r = Lr ν. It sould be remembered tat tis system is equivalent to te original equation only in te steady state. In fact, te solution beaves very differently in te transient pase. In particular, we find tat te eigenvalues of te matrix A are ± ν/t r wic are real (and called frozen speed in te relaxation system [1]), and terefore we see tat te first-order system as an advective caracter tat is not at all present in te original diffusion problem. Indeed, te matrix A is diagonalizable wit te matrix of te rigt eigenvectors R, [ ] Lr L R = r (3.5) 1 1 as [ R 1 0 AR = Λ = 0 ν/t r ]. (3.6) Te view as now been totally switced from diffusion to advection, and ence te type of scemes we need are advection scemes rater tan central-difference scemes tat are generally considered suitable for diffusion. But tis does not mean tat te isotropic nature of te diffusion equation is totally lost. It manifests itself as a pair of two waves traveling in te opposite directions at te same speed, wic is isotropic as a wole. 3. Discretization For simplicity, but witout loss of generality, we consider a uniform grid over a domain of interest wit te mes size = x j+1 x j, j {J}. We store te solution as well as te gradient at eac node (u j, p j ), j {J}, and ten, wit two boundary conditions available for u only, te task is to compute te steady state solution {u j } at te interior nodes and {p j } at all nodes. Note tat te number of unknowns is now exactly equal to te number of cell-residuals. If tere are N c cells, we ave N c cell-residuals, and (N c + 1) unknowns. But because of te two boundary conditions (weter Diriclet or Neumann), te actual number of unknowns is (N c + 1) = N c, i.e., te same as te number of cell-residuals. Tis means tat all te cell-residuals can be driven to zero exactly at te steady state, implying te existence of a unique solution for linear problems. Tis is not possible for scalar scemes wic distribute a single cell-residual for νu xx evaluated wit reconstructed nodal gradients. Tis is because in tat case we ave N c cell-residuals for (N c + 1) = N c 1 degrees of freedom, i.e., always overdetermined. We begin by evaluating te cell-residual, wic is now a vector quantity, over cell C = [x j, x j+1 ] as Φ C = xj+1 Assuming te piecewise linear variation of U over te cell, we obtain x j ( AU x + Q) dx. (3.7) Φ C = A U C + Q C, (3.8) 9

were U C = U j+1 U j and Q C = (Q j+1 + Q j )/. We ten distribute tis to te nodes, by a distribution coefficient wic is now a matrix B C j giving a fraction of Φ C distributed to node j, were for conservation we must ave Φ C j = B C j Φ C, Φ C j+1 = B C j+1φ C, (3.9) B C j + B C j+1 = I, I = [ 1 0 0 1 ]. (3.10) Te precise form of B C j is left open for a moment. Having done te distribution for all cells, we ave te following semi-discrete equation at eac node: du j = 1 j [ Φ L j + Φ R j ] = 1 j [ B L j Φ L + B R j Φ R], (3.11) were L and R denote te cells on te left and rigt of node j respectively, and j is te measure of te dual control volume centered at x j wic is identical to te mes size for uniform grids. We ten integrate tis in time until we reac te steady state. Note tat we can use tis sceme directly on non-uniform grids, simply by replacing te mes size by te variable mes size C in te definition of te distribution matrices and setting j = ( L + R )/. We now define te distribution matrix Bj C. Te distribution matrix must be defined to reflect te pysics of te governing equation: isotropic for diffusion or upwind for advection. In our case, te equations we are solving is not te diffusion equation anymore, but te equivalent first-order system wic is yperbolic wit te wave speeds ± ν/t r. We expect also tat te solution is smoot because it finally becomes te solution of te diffusion equation, and terefore tere is no need to incorporate discontinuity-capturing mecanisms in te sceme. Ten, for simplicity, we employ te Lax-Wendroff distribution sceme, also known as Ni s sceme in te context of residual-distribution [36], wic is second-order accurate for smoot solutions. Te sceme can be derived as follows. Consider te time expansion of te solution U n+1 j U n j + tu t + 1 t U tt = U n j + t ( 1 + t ) t U t. (3.1) By using te equation itself, but partially ignoring te effect of te source term for simplicity, we can write ( U n+1 j U n j + t 1 t ) A x ( AU x + Q), (3.13) wic is approximated as U n+1 j U n j + t = U n j + t [ 1 ( Φ L j + ΦR j ) [( 1 + t A Tis implies tat te distribution matrix is defined as B C j = 1 I τ A, ) ( t Φ R A j / Φ L j / )] ( 1 Φ L j + t ) A Φ R j (3.14) ]. (3.15) BC j+1 = 1 I + τ A, (3.16) were t as been replaced by a time-like parameter τ wic does not ave to be equal to te actual time step because we are only interested in te steady state. Even if we take τ to be te actual time step, te sceme will not be time accurate because we ave ignored te effect of te source term in te above derivation. Moreover, it is even pointless to develop time accurate scemes for te first-order system because it is not equivalent to te diffusion equation for time dependent problems unless T r 0. We point out tat te sceme can be interpreted as a sum of te central distribution and a least-squares minimization term. Te dissipation term can be derived by minimizing te residual in te least-squares norm, e.g. following te least-squares finite-element metod [0] or based on a discrete minimization formulation [37]. In [6], tis type of approac was used to derive a stabilization term in te residual-distribution scemes. 10

Te parameter τ can be tougt of as a cell time step, and te sceme will be conservative as long as it is constant over te cell. Te simplest coice would ten be te ratio of te mes size to te wave speed ν/t r, giving τ = k C, (3.17) were k C is a cell CFL number wic is taken to be 1 to maximize te effect of error propagation over te cell. We remark also tat in te previous work [18, 7], it is argued tat diffusion is an isotropic process and terefore it is natural to distribute te residual wit equal weigts, B C j = B C j+1 = [ 1/ 0 0 1/ ]. (3.18) But in practice tis sceme is not dissipative enoug to damp ig frequency errors, and in particular te igest frequency error cannot be damped at all [13]. Te proposed sceme overcomes tis problem by aving a dissipation term added to te isotropic distribution coefficient. Note owever tat tis is not by design but rater a natural consequence of solving te first-order system instead of te diffusion equation. Te isotropic nature of diffusion is automatically incorporated by way of applying a suitable advection sceme, wic typically comes wit some form of dissipation, for te first-order system tat is yperbolic and wose waves travel isotropically. In fact, te proposed sceme can be sown to be an upwind sceme. To see tis, consider te distribution matrices (3.16) wit τ =, B C j = 1 I 1 ν/t r A, B C j+1 = 1 I + 1 ν/t r A. (3.19) Since A can be diagonalized, we ave Bj C = 1 [ I 1 0 R ν/t r 0 ν/t r Bj+1 C = 1 [ I + 1 0 R ν/t r 0 ν/t r ] [ R 1 0 0 = R 0 1 ] [ R 1 1 0 = R 0 0 ] R 1, (3.0) ] R 1, (3.1) wic sows tat te solution mode wit te negative wave speed is distributed to te left; te mode associated wit te positive wave speed is distributed to te rigt. Tis is noting but upwinding. An interesting observation is tat te coice τ = makes te distribution matrix singular, creating a nullspace tat implies one-sided distribution, i.e., upwind. Tis interpretation applies also in iger dimensions and may be used to ceck if a given sceme as an upwinding caracter. It sould be noted owever tat tis is a rater special case were te Lax-Wendroff sceme and te upwind sceme coincide to eac oter. Tis is because te eigenvalues of te matrix A are of te equal magnitude wit opposite signs, i.e., equal modulus. In general, an upwind sceme for a system is constructed by defining τ as a matrix suc as τ = A 1. (3.) If all eigenvalues are equal in magnitude, tis reduces to a scalar. Tis is exactly te case for te first-order diffusion system. We now sow tat te new residual-distribution sceme is closely related to te Galerkin sceme. Expand te rigt and side of te semi-discrete equation (3.11) wit (3.16) for arbitrary τ to get du j dp j = 1 (ν p L + ν p R ) + τν [ u R p T R ( u L p L )] [( r = ν 1 τ ) pj+1 p j 1 + τ ] u j+1 u j + u j 1 T r T r, (3.3) 1 = [( u L p T L ) + ( u R p R )] + τ r [ν p R ν p L ] T r = 1 [ 1 T r (u j+1 u j 1 ) 1 ] (p L + p R ) + τν p j+1 p j + p j 1 T r, (3.4) 11

were p L = p j p j 1, p R = p j+1 p j, p L = (p j + p j 1 )/, and p R = (p j+1 + p j )/; similarly for u. It is ten immediate tat te coice τ = T r (3.5) decouples te variables and yields te Galerkin sceme for u j. Hence, te Galerkin sceme emerges as a special case of our residual distribution sceme. Te cell-residual for te Galerkin sceme turns out to be associated not wit te original diffusion equation but wit te first-order system. Terefore, implemented tis way, te Galerkin sceme as te residual property: if te cell-residual Φ T for te first-order system vanises, no updates will be sent to te nodes. Because of te decoupling, it is possible to solve for u j first, and ten compute p j, wic means tat tis sceme is simply te Galerkin sceme for u j combined wit implicit reconstruction or compact differentiation. Also note from (3.3) and (3.4) tat te proposed sceme can be implemented as a tree-point finitedifference sceme or even a finite-volume sceme wose interface flux can easily be identified. But as mentioned in Section.1, in one dimension, te finite-volume scemes and te residual-distribution scemes are identical except for te treatment of source terms: te finite-volume sceme typically evaluates te source term directly by te cell average wile te residual-distribution sceme evaluates te source term by te trapezoidal rule on eac cell and weigts tem by te distribution coefficients. Ten, te residual-distribution sceme as te residual property wereas te finite-volume sceme does not. Tis limits te accuracy of te finite-volume sceme to first-order. To improve te accuracy, metods to ensure te residual property for finite-volume scemes [4, 5] must be employed. In te case of te first-order diffusion system, te source term is inevitable, and terefore te finite-volume sceme will be first-order accurate unless te source term is discretized so as to ave te residual property. Te sceme above is certainly one of tose aving tis property. In te rest of te paper, we focus on two coices of τ: and T r. Te latter implements te Galerkin sceme as a residual-distribution sceme, and may be preferred in some cases. But we will sow next tat te former as a great advantage over te latter particularly for steady calculations. 3.3 O() Time Step To reac te steady state, we integrate te semi-discrete equation (3.11) in time until te solution stops canging. Any time integration sceme can be employed for tis purpose. In any case, te time step is restricted by te maximum modulus of te eigenvalues of te coefficient matrix C j of te sceme written in te following form: du j = C j 1 U j 1 + C j U j + C j+1 U j+1. (3.6) By expanding te rigt and side of (3.11) wit (3.16), we find τν C j = 0 T r 0 τν/ + 1/ T r. (3.7) Clearly, te maximum modulus of te eigenvalues is τν/ +1/ T r. Ten, for example, in te case of te forward Euler time integration, te time step t is restricted by t T r τν/ + 1/. (3.8) For te purpose of converging to te steady state, we simply take it as an equality to maximize te time step. For small, tis is approximately t T r τν, (3.9) and for τ = T r, tis will give te well-known severe stability limit for te Galerkin sceme, 1 t ν. (3.30)

On te oter and, for te coice τ = wit T r = Lr, we obtain t ν = L r ν. (3.31) Tis is remarkable. Te time step is proportional to instead of. Tis means tat te number of time steps required to reac te steady state increase linearly wit te mes size. Tis is a great advantage over te conventional scemes. Of course, tis is true only if L r = O(1). But we will see later tat tere is a case were L r can be defined as suc. Finally, we point out tat te condition (3.31) is noting but te CFL condition for an advection equation wit te advection speed ν/t r. As a matter of fact, O() time step is typical for advection scemes. Tis means tat O() time step is not someting special to te residual-distribution scemes but rater special to te first-order system approac, and terefore we certainly can ave it also for te finite-difference or te finite-volume scemes. 3.4 Fourier Analysis Consider a Fourier mode of pase angle (or nondimensional wave number) β [0, π], U β = e iβx/ U 0, (3.3) were U β = (u β, p β ) and U 0 = (u 0, p 0 ). Inserting tis into te original diffusion equation (3.1), we obtain were du β = λ d u β, (3.33) On te oter and, for te first-order system (3.), we obtain were Te eigenvalues of tis matrix are For small β, we find λ d = ν β. (3.34) du β M fos = = M fos U β, (3.35) 0 ν iβ iβ T r [ λ fos = 1 1 ± T r λ fos = 1 T r 1 4νT r β ν ( β 1 + νt ) r β + O(β 6 ), 1 T r + ν β + ν T r 4 β4 + O(β 6 ),. (3.36) ]. (3.37) (3.38) in wic te first eigenvalue accurately represents te diffusion operator wit second-order accuracy. Tis sows tat te difference between te first-order system and te diffusion equation is of O(β ) for small β. Note tat te eigenvalues can be complex. Tis appens wen 13 β > β cr, β cr = νt r, (3.39)

and te Fourier mode wit β > β cr begins to propagate. Recall tat we take T r = L r ν, ten we ave β cr = L r, (3.40) and so it is independent of ν. For te Lax-Wendroff sceme, (3.11) wit (3.16), we obtain te following equation: were Te eigenvalues are For small β, we find M = τν (1 cos β) T r i sin β T r du β λ = τν T r sin β 1 T r cos β ± 1 T r = MU β, (3.41) iν T r (τ T r ) sin β τν T r (1 cos β) 1 T r (1 + cos β) ν ν [ β + 1 4 T r 3ν(τ T r ) ] β 4 + O(β 6 ), T r λ = 1 + 1 [ 1 T r T r 4 ν(τ T ] r) β + O(β 4 ).. (3.4) cos 4 β + ν (τ T r) sin β. (3.43) (3.44) wic, compared wit (3.38), confirms itself tat te sceme is indeed second-order accurate for te first-order system, and consequently second-order accurate for te diffusion equation as well. First we consider te case τ = T r. In tis case, te eigenvalues simplify to λ = 4ν sin β, 4ν sin β 1 T r cos β, (3.45) wic are always real and tus te errors are purely damped. Te damping property of te sceme depends on te coice of L r. Suppose tat we employ te forward Euler time integration. Ten, te eigenvalues g 1 and g of te amplification matrix of te fully discrete equation G = I + t M were t = are given by T r τν/ +1/ 8 g 1 = 1 β 4 + (/L r ) sin, g = 4 (/L r) β 4 + (/L r ) cos. (3.46) If we compare tis wit te point Jacobi iteration applied to solving u xx = 0 u n+1 j = u n j + ω ( u n j+1 u n j + u n ) j 1, (3.47) were ω is a relaxation factor 0 ω 1, wose amplification factor is given by [38] we immediately find wic we write, introducing L r = k, 14 ω = 1 ω sin β, (3.48) 1 1 + 1 4 (/L r), (3.49) ω = 1 1 + k. (3.50)

It is well known tat ω = 3 gives te optimal damping for ig frequency errors (π/ β π) and makes te sceme an effective smooter for multigrid [38]. Tis is acieved in our sceme by taking k = 1/, giving L r =. (3.51) In tis case, g 1 1 3 is guaranteed for π/ β π, and it is clear from (3.46) tat we ave also g 1 3 for te entire frequency. Terefore, te sceme is a good smooter not only for u j but also for te oter variable. However, if te sceme is used simply to iterate toward te steady state, tis is not optimal. We sould use te largest possible relaxation factor wic corresponds to k 0. Practically, we may take any small number suc as k = 0.01. But as we sall see later, if k is too small, we encounter an accuracy problem: te sceme reduces to first-order accurate for p j. Experimentally, we found tat k = 0. would not suffer from tis problem: L r = 0.4. (3.5) Tis means tat tis sceme is not well suited for iterating toward te steady state. Now, we consider te case τ =. In tis case, te eigenvalues can be complex, and it is better to be complex. If complex, te eigenvalues are complex conjugates, tus aving te same damping factor and propagation speed. Tere is no possibility tat eiter u j or p j will converge muc quicker tan te oter. Also, te damping is muc more effective in te complex branc tan te real branc tat approximates te diffusion operator for low frequency modes. Tis can be seen in Figure 5 in wic te real part of te eigenvalues are plotted against te pase angle. For all scemes and te equations, te eigenvalues are real for low frequency modes and make a second-order contact wit te eigenvalue of te exact diffusion operator. Tis part, being closer to 0 tan te complex branc in general, is a reason for slow convergence and we wis to avoid it. We will terefore coose L r suc tat te eigenvalues are complex for all discrete error modes (β π). For τ = is negative if = L r ν, te expression inside te square root in (3.43) is quadratic in L r. It is easy to sow tat tis L r 4 ( 1 + 1 sin π ), (3.53) were we ave set β = π to ensure tat we ave complex eigenvalues for all possible discrete error modes. In fact, in Figure 5, te lowest discrete mode (β = π) is indicated by te vertical line, and we see tat it passes troug te branc point as designed. Note tat tis L r is not O() but O(1) because L r 4 ( 1 + 1 sin π ) 1 π + 4 + O( ), (3.54) and so, as we claimed earlier, O() time step is guaranteed for L r tat satisfies te condition (3.53). An optimal value of L r can be derived by minimizing te amplification factor for te fastest convergence. For te forward Euler time integration, te eigenvalues of te amplification matrix of te fully discrete equation are complex conjugates wose magnitude g is given by Let L r = 4 g = [(L r/) + cos β] [(L r /) 1] [(L r /) + 1]. (3.55) ( ) 1 + 1 K and K 1, ten we find for small, sin π g = 1 π K (3 cos β) + O( ). (3.56) It is ten obvious tat K = 1 gives te minimum and terefore we set ( ) L r = 1 + 1 4 sin π, (3.57) 15

Re(λ) 0 τ = 0 Exact First Order System 1 τ = / ( ν / Tr ) 1/ τ = Tr 3 4 Exact ν u xx 5 0 β = π 1 β 3 Im(λ) 1 0.8 0.6 0.4 0. 0 0. 0.4 0.6 0.8 1.5 1.5 1 0.5 0 Re(λ) Figure 5: Re(λ) for = 0. and ν = 0.05. T r = L r ( ν) wit, for a comparison purpose, L r = 4 1 + 1 sin π for all. Re(λ) for τ = 0 eventually becomes 0 at β = π. Figure 6: Polar plots of te eigenvalues for τ = 0 (stars) and for τ = wit te optimal L r (circles). Te eigenvalues were sampled from te range π β π wit = 0. and ν = 0.05. or we can use te following simple approximation: L r = 1 6 + 4, (3.58) wic satisfies te condition (3.53) for < 1 3. Taking advantage of te propagation as an additional means to remove te error, tis sceme takes a full advantage of te yperbolic caracter of te first-order diffusion system, and it is terefore well suited for iterating toward te steady state. Te polar plot of te eigenvalues of tis sceme and te purely isotropic sceme is sown in Figure 6. Bot scemes allow te error modes to propagate, but te one wit nonzero τ (te upwind sceme) as muc better damping. 3.5 Truncation Error Expand smoot functions u and p around node j, and substitute into (3.11) wit (3.16) to obtain were or component-wise du j = [ I τ ] A x r + O( ), (3.59) r = [νp x, (u x p)/t r ] t, (3.60) du j dp j = ν p x + τν T r (u x p) x + O( ), (3.61) = (u x p)/t r + τν T r (p x ) x + O( ). (3.6) We remark tat te sceme as te residual vector r as a factor in te truncation error, wic vanises at te steady state and second-order accuracy is obtained. Tis is a property sared wit te residual-based compact sceme [39]. In a way, residual-distribution is an alternative form of implementing te compact scemes. 16

To get more insigt, suppose tat te smoot solutions are exact solutions to te discrete equations in te steady state ( duj = dpj = 0). Ten, tey satisfy For τ = T r, we obtain 0 = ν p x + τν (u x p) x + O( ), T r (3.63) 0 = (u x p)/t r + τν (p x ) x + O( ). T r (3.64) 0 = νu xx + O( ), (3.65) 0 = (u x p)/t r + ν (p x ) x + O( ), (3.66) wic clearly sows tat te solution u converges to te solution of te original diffusion equation wit secondorder accuracy. We write te second equation by expanding T r = L r ν wit L r = k, 0 = 4νk (u x p) + ν (p x ) x + O( ). (3.67) For k = O(1), tis sows tat te numerical solution converges to te solution of u x p = 0 wit second-order accuracy. But if k = O(), te sceme is not consistent, solving a wrong equation. Also, as k 0, it converges to te solution of 0 = ν (p x ) x + O( ). (3.68) Tis sows tat te sceme is not consistent, not solving u x p = 0 nor even νp x = 0. But fortunately in one dimension, te sceme is in fact consistent but only first-order accurate. Tis is because for one-dimensional problems, not only te nodal residuals but also te cell-residuals wic approximate νp x vanis at te steady state. Tis ensures at a node tat p x = O(), tus te sceme is consistent and first-order accurate. Tis is te accuracy problem mentioned in te previous subsection. On te oter and, for τ = = L r ν, we obtain 0 = ν p x + ν L r (u x p) x + O( ), (3.69) 0 = ν L (u x p) + ν (p x ) x + O( ). (3.70) r L r For L r = O(1) wic is te case of (3.57), tis sows clearly tat te numerical solution converges to te solution of te first-order system (3.) as 0. By eliminating te first-order terms using te equations temselves, we find 0 = νp x ν 4 (p x) x + O( ), (3.71) 0 = (u x p) 4 (u x p) x + O( ), (3.7) wic sows tat te solution converges wit second-order accuracy. Finally, we point out tat by setting L r = we recover te Galerkin sceme wic corresponds to τ = T r wit L r =, i.e., te two coices of τ are not independent of eac oter. 3.6 Boundary Conditions As mentioned earlier, wit two boundary conditions, te number of unknowns exactly matces te number of cell-residuals, and tus for a linear problem tere exists a unique solution. Te boundary conditions can be eiter te Diriclet type were u j is specified or te Neumann type were p j is specified. In any case, only one value is specified on eac boundary. Tis can be interpreted also as a caracteristic condition. Since te first-order system is yperbolic wit two caracteristics running to te left and te rigt, tere is always one caracteristic coming into te domain from troug te boundary, and terefore we need to specify one value on te boundary. 17