SPECTRAL METHODS ON ARBITRARY GRIDS Mark H. Carpenter Research Scientist Aerodynamic and Acoustic Methods Branch NASA Langley Research Center Hampton, VA 368- David Gottlieb Division of Applied Mathematics Brown University Providence, RI 9 Abstract Stable and spectrally accurate numerical methods are constructed on arbitrary grids for partial dierential equations. These new methods are equivalent to conventional spectral methods but do not rely on specic grid distributions. Specically, we show how to implement Legendre Galerkin, Legendre collocation, and Laguerre Galerkin methodology on arbitrary grids. Research supported by AFOSR grant no. 93-9, ARPA grant no. N4-9-J-46, and NSF grant no. DMS-98. The research was also partially supported by the National Aeronautics and Space Administration under NASA Contract No. NAS-948 while the second author was in residence at the Institute for Computer Applications in Science and Engineering (ICASE), NASA Langley Research Center, Hampton, VA 368-. i
Introduction Conventional spectral methods impose rigid requirements on the computational grids used. The grid points are the nodes of Gauss-like quadrature formulas (Gauss, Gauss Radau, or Gauss Lobatto (GL) formulas). These nodes are denser at the boundaries than in the middle of the domain. Although this property is suitable for boundary-layer problems, it may create diculties for other types of problems, particularly those with disparate length scales that occur in multiple regions of the domain (e.g., diusive burning or detonation and reacting mixing layers). The principle reason for the degradation in performance on these disparate problems is that the predetermined node points do not, in general, coincide with the features that are being resolved. Extensive mappings can concentrate the node points into regions more ideally suited for accurate resolution but present a serious limitation for complicated problems. For this reason, spectral multidomain techniques have an obvious advantage for complicated problems []{[3]. Another complication that conventional spectral methods have, is their implementation in complex geometries. Meshes that are predetermined present a signicant constraint. Flexible mesh distributions are easily extended to geometries that are not tensor products of straight lines (to be shown in a later work). Spectral methods that are not constrained to specic nodal points would clearly be more exible than conventional spectral methods. Specically, a distribution of points that more closely approximates the disparate features in the domain could be adopted from the outset. Subsequent adaptation to solution features in the domain need not rely on smooth mappings. In addition, these \arbitrary-grid spectral techniques" could be used in conjunction with multidomain ideas. We focus on formalizing these ideas within the context of spectral techniques. In this paper, we present some ideas for constructing spectral methods with arbitrary grids. We demonstrate these ideas for a case of spectral solutions of hyperbolic equations; however, these ideas can be applied to any partial dierential equation. To illustrate the basic idea, consider the following hyperbolic system of equations in conservation form: @U @t @F(U) x () @x with arbitrary initial and boundary conditions. For spectral methods, a polynomial (in the spatial variable x) of degree N, U N (x; t), and a projection operator I N are sought such that I N " @UN @t @I N F(U N ) @x () Of the spectral techniques, the most popular method is the Chebyshev collocation method, in which I N f(x) collocates f(x) at the Chebyshev GL points j cos( j ). Note that we N
have here two projections; one involves the dierentiation of F (U N ), and the other involves the way that the equation is satised. Thus, the rst application of the operator I N occurs when we approximate @F(U) by the derivative of the interpolation polynomial that interpolates F (U) at the Chebyshev GL quadrature nodes. The second application of I N @x occurs when we satisfy the approximate equation " @UN @I N F(U N ) at the Chebyshev GL points. @t @x The basic premise for unstructured spectral methods is that equation () does not haveto be satised in the same manner in which the operation @I NF(U N ) is carried out. In particular, @x the derivative operation can be carried out by interpolation at any selected points; the equation is satised by either a Galerkin formulation or by a collocation method at a dierent set of points. Most importantly, the equation must be satised correctly. Mathematically speaking, we can replace equation () with where I N 6 J N. I N " @UN @t @J N F(U N ) @x (3) In reference [4], a particular case with this approach has been discussed. The operator J N was dened by the Chebyshev collocation operator, and I N was the Legendre collocation operator. In the constant-coecient case (F (U) U), this method reduces to the Legendre collocation method with an ecient way of calculating the derivative by using Chebyshev collocation points. We now generalize this notion to an arbitrary set of points, which enables us to apply spectral methods in circumstances for which the grid points are not nodes of some Gauss quadrature formula. The method discussed in this paper is dierent from using a transformation to redistribute the grid points. The use of a transformation to redistribute the grid points involves approximation of the solution by a polynomial in the transformed variable; as a result, the approximation is not a polynomial in the original variable. Our method utilizes a polynomial in the original variable. Moreover, the new method can be applied to totally unstructured grids. Finally, it should be noted that the new method has many similarities with spectral elements, although the method of derivation is dierent. For instance, Patera [5] or Korczak et. al [] used global polynomials (Lagrangian interpolants), passed through the Chebyshev collocation points, to obtain spectral elements. However, their work was not generalized to arbitrary grids.
The Dierentiation Matrix for Unstructured Grids Consider the set of points (x ;x ;x ; :::; x N ;x N ), where the points x ;x ; :::; x N are arbitrary. Let f(x) be a function dened everywhere in [ ; ]. The interpolation polynomial f N (x) that collocates f(x) at the points x j is given by f N (x) J N f where the Lagrange polynomials L j (x) are dened by f(x j )L j (x) (4) L(x) (x x )(x x ):::(x x N )(x x N ) (5) L j (x) ( x )L(x) ( x j)(x x j )L (x j ) j N (6) L (x) ( + x)l(x) L() (7) L N (x) ( x)l(x) L( ) (8) The Lagrange polynomial evaluated at the discrete points x k for k 6 j, is equal to ; L j (x k ) j;k. has two alternative repre- We use dj N f (x) df (x) as the approximation to. Note that df N dx dx dx sentations; the rst is obtained by dierentiating (4) as df N (x) dx f(x j )L j(x) (9) The second representation stems from the fact that dj N f (x) dx is a polynomial of degree N ; therefore, df N (x) dx f N(x j )L j (x) () Equations (9) and () are used to relate the grid-point values of the derivative f N(x j ) to those of the function. The most obvious way is to equate the expressions in (9) and () at the grid points x k ( k N) to obtain: f N(x k ) To rewrite expression () in matrix form, we rst denote L j(x k )f(x j ) () ~f [f N(x ); :::; f N(x N )] T ; ~ f [f(x ); :::; f(x N )] T 3
which yields ~f D ~ f () where the dierentiation matrix D is given by D (d j;k ) h L k(x j ) i (3) Another method for expressing the equivalency between (9) and () is to state that the dierence between these expressions (which is identically ) is orthogonal to all polynomials of degree N: Z h f(x j )L j (x) f N (x j)l j (x) i L k (x)dx kn (4) The system of equations that follows from (4) can be rewritten as where m k;j f N (x j) s k;j f(x j ) k N (5) m k;j Z L j (x)l k (x)dx (6) and s k;j Z L j(x)l k (x)dx (7) In the matrix form, equation (5) becomes M f ~ S f ~ (8) where M (m k;j ) j; k N (9) and S (s k;j ) j; k N () Equations (4) and () are dierent manifestations of the same fact: (9) and () are equivalent. Therefore, the dierentiation matrices derived from (4) must be the same as the matrix derived from () (with the assumption that M is invertible): D M S () 4
To prove this directly, we show that MD S () By writing the (i; k) term on the left-hand side of (), we obtain (MD) i;k If we substitute (3) and (6) into (), then we get (MD) i;k Z L i (x) X 4 N m i;j d j;k L j (x)l k(x j ) We now use the fact that every polynomial of degree N is identical with its N-degree interpolation polynomial. Thus, because L k(x) is a polynomial of degree N and L k (x j)l j (x) is its interpolant at the points x j ( j N) then which yields (MD) i;k L j (x)l k(x j )L k(x) Z L i (x)l k (x) s i;k (which is apparent from (7)). This establishes expression (). Thus, we have dened a new method, based on the arbitrary distribution of points, to approximate the derivative of a function. The attractive features of the representation () of the dierentiation matrix are summarized in lemma 3. and lemma 3.: 3 5 Lemma 3.: The matrix M dened in (6) is a symmetric positive-denite matrix. 5
Proof: The fact that M is symmetric follows immediately from the denition (6). In fact, m k;j Z L j (x)l k (x)dx m j;k We must show that M is positive denite. Let ~ V be an N + component vector: Then, ~V T M V ~ ~V (v o ; :::; v N ) i Recall the denition of m i;j from (6). We get ~V T M ~ V Z i v i L i (x) m i;j v i v j Clearly, the equality sign holds only if ~ V is the null vector. v j L j (x)dx (3) Equation (3) can be interpreted in a dierent way. Let v(x) be the polynomial of degree N dened by so that Then, (3) can be rewritten as v(x j )v j jn v(x) v j L j (x) ~V T M ~ V Z v(x) dx (4) Thus, every vector ~ V can be identied with a polynomial v(x) that takes the values of its components at the grid points x j. The vector space norm ~V T M ~ V is equivalent to the function space norm Z v(x) dx Next, we will consider the properties of the matrix S. 6
Lemma 3.: Let S be dened in (7), and let ~ V be dened as before. Then, ~V T S ~ V (v v N ) (5) Proof: We start by showing that S is almost antisymmetric. >From the denition (7) s k;j and integration by parts, we get Z L j(x)l k (x)dx s k;j L j ()L k () L j ( )L k ( ) s j;k We now use the denition of the Lagrange polynomials (6){(8) and note that the boundary terms vanish for 6 j; k 6 N to yield s k;j + s j;k k; j; k;n j;n Thus, ~V T S V ~ k k v j v k s k;j k (v vn) which completes the proof of (5). v j v k (s k;j + s j;k ) v j v k ( k; j; k;n j;n ) 7
As before, equation (5) has a natural interpretation in the polynomial space. Let v(x) be the polynomial of degree N such that v(x j )v j. Then, ~V T S V ~ k k Z v j v k s k;j Z v j v k L k (x)l j(x)dx v(x)v (x)dx [v () v ( )] Note that v() v ; v( ) v N Thus, (5) is an integration-by-parts formula. The last issue that we will discuss in this section is the relationship between dierentiation matrices, based on dierent grid-point distributions. Consider two grids x j and y j (j ; :::; N). Let the Lagrange polynomial L x j (x) be dened as in (6){(8), and let L y j(x) be dened in a similar way, based on the set of points y j. This denes two dierentiation matrices (see ()): D x (d x j;k) h (L x k) (x j ) i (6) and D y (d y j;k )h (L y k ) (y j ) i (7) We now show that the two matrices are similar. Theorem 3.: Dene the matrix T by T (t ij ) h L x j (y i) i (8) Then dene (T ) ij h L y j (x i ) i (9) and D y TD x T (3) 8
Proof:. Because L y k is a polynomial of degree N, If we substitute x y m, then we get L x j (x)l y k (x j)l y k (x) L x j (y m)l y k (x j)l y k (y m) k;m which proves.. Again, the Lagrange polynomials, based on the grid points y j, are polynomials of degree N; therefore, their derivative can be represented as (L y i ) (x) L y i (x j )(L x j ) (x) (3) By the same token, (L x j ) (x) l (L x j ) (x l )L x l (x) (3) Now, we substitute x y m in (3) and (3) to get (L y i ) (y m ) l L y i (x j )(L x j ) (x l )L x l (y m) (33) The left-hand side is the (m; i) elementofd y, whereas the right-hand side is the (m; i) element oft D x T;thus, (3) has been proved. 3 The Legendre Galerkin Method Based on Arbitrary Grids Consider now the linear form of (): U t (x; t) U x (x; t) x (34) U(x; ) f(x) (35) U(;t) g(t) (36) 9
We introduce a new method for the discretization of (34), based on the dierentiation matrix introduced in the last section. Note that the dierentiation matrix uses the arbitrary grid x j. With the new method, we seek a vector ~u [u (t); :::; u N (t)] T that satises where M d~u dt S~u ~e [u g(t)] (37) ~e (;;; :::) T The discussion on imposing the initial condition is deferred until later in the paper because of subtle issues that involve convergence. Here, we generally will not use u j () f(x j ) j N unless the grid points x j have special properties. The structure of the matrices M and S, indicated in (34) and (37), leads immediately to the following stability result: Theorem 4.: The method described in (37) is stable for. Proof: We multiply (37) by ~u T to get ~u T M d~u dt ~u T S~u ~u T ~e [u g(t)] (38) We use the symmetry property for M and the almost skew symmetric property (5) for S to obtain d dt ~ut M~u (u u N) u [u g(t)] (39) For stability, we consider the case g(t) ; from this case we can clearly determine that if, then d dt ~ut M~u (4) and stability exists in the norm induced by the positive-denite matrix M.
The stability result (39) can be represented in a dierent way in view of the equivalency between vectors and polynomials established in (4). Specically, let u N (x; t) beannthdegree polynomial such that u N (x j ;t)u j (t) jn Then, from (4) we see that d dt Z u N (x; t) dx d dt ~ut M~u (u u N ) u [u N(;t) u N ( ;t) ] u N (;t) Thus, for the polynomial u N (x; t) wehave stability in the usual L norm. Now, we examine equation (37) from yet another point of view. By, multiplying (37) by M,we get d~u dt or in view of (), we obtain M S~u M ~e [u g(t)] (4) d~u D~u M ~e [u g(t)]: (4) dt The expression M ~e can be evaluated explicitly. Theorem 4.: Let M be the mass matrix dened in (6). Dene the residual vector ~r by M ~e ~r (r o ; :::; r N ) T Then, r j P N +(x j )+PN(x j ) where P N (x) is the Legendre polynomial of order N. (43)
Proof: We must verify that if ~r satises (43), then the expression M~r ~e is also satised. Substituting (6) into expression (3) yields (M~r) i Z m i;j r j L i (x) Substituting expression (43) into (44) yields Z " P N +(x j )+PN(x j ) (M~r) i L i (x) L j (x) L j (x)r j dx (44) dx (45) Because P N + and P N are polynomials of degree N, they coincide with their Nthdegree interpolation polynomials; therefore, " P N +(x j )+PN(x j ) L j (x) " P N+(x)+P N(x) so that Z " P N +(x)+p (M~r) i L i (x) N(x) dx " " PN + () + P N () PN + ( ) + P N ( ) L i () L i ( ) Z L i (x) " PN + (x)+p N (x) dx Recall that P N ();P N ( )( ) N and that P N and P N + are orthogonal to all polynomials of degree <N; the last two terms in the right-hand side of (46) vanish, and we are left with which proves theorem 4.. (M~r) i L i () i;
Theorem 4. sheds a new light on the connection between the method dened in (37) that uses the arbitrary set of grid points x j and the Legendre Galerkin method. They are the same method. Theorem 4.3: The method dened in (37) is equivalent to the Legendre Galerkin method. Proof: Dene u N (x; t) u j (t)l j (x) where u j (t) are the elements of ~u dened in (37). Then, u N (x; t) satises the error equation " @u N (x; t) @u N(x; t) P N+ (x)+pn(x) [U N (;t) g(t)] (46) @t @x The error equation is satised because both sides of expression (46) are polynomials of degree N. The two sides agree at N + points x j (j ; :::; N) by virtue of (37), which indicates that they are equivalent. Because the right-hand side is orthogonal to all polynomials of degree N that vanish on the boundary x, this error equation is the same equation that is satised by the Legendre Galerkin method [6]. As equation (46) demonstrates, the precise method for imposing the boundary conditions aects the overall behavior of the method. Section 3 shows that two dierentiation operators dened on dierent grids are similar and, thus, have the same eigenvalues. We now show that the modied dierentiation matrix also has this property. Equation (4) produces a modied dierentiation matrix (i.e., a dierentiation matrix that takes into account the boundary conditions): D R where the boundary matrix R is dened as R i;j r i j; (47). 3
Suppose now that we havetwo grids x j, y j (j ; :::; N). We have shown in theorem.3 that D x and D y are similar: D y TD x T where the matrices T and T are dened in (8) and (9). We show now that the same similarity transformation exists for the modied dierentiation matrices. That is, D y R y T (D x R x )T (48) or (with theorem 3.) R y TR x T Consider element (i; j) of the right-hand side: TR x T We recall that i;j l m l m " P r l N + (x l )+PN(x l ) T i;l (R x ) l;m T m;j L x l (y i )r l ;m L y j (x m ) R N (x l ) where R N (x) is a polynomial of degree N and is, therefore, equal to its interpolant. Thus, TR x T i;j R N(y i )L y j (x )R N (y i ) j; which proves that the similarity transformation is valid even for the modied derivative matrix. The Legendre Galerkin method dened by equation (37) is stable; therefore, the initial error is not amplied. However, the eects of initial conditions must be carefully taken into account. We know that polynomials based on arbitrary grid distributions may generally be nonconvergent (the Runge phenomenon). The initial error can be decreased with the number of mesh points N by constructing the Chebyshev interpolation as an initial condition. Thus, let j cos( j N ) j N (49) L (x) ( x )TN(x) (5) L L (x) j(x) (x j )(L ) (5) ( j ) The Chebyshev approximation for the initial condition is, then, C N f(x) 4 f( j )L j(x) (5)
so that the recommended initial approximation will be f(x j ) f( j )L j(x j ) This approximation will provide a convergent approximation for the initial condition. Of course, the Chebyshev approximation is not the only possibility; any other spectral or pseudospectral approximation would do as well. We now briey discuss the issue of implementation. Two methods are available for implementing the arbitrary-grid spectral methods. The rst method is to form the matrices M and S by carrying out explicitly the integrations in (6) and (7). (This technique is utilized in the two examples presented later in the text.) This procedure is done once and for all for every given set of grid points. Then, the equations are solved as described in (37). A more convenient method that does not involve evaluating integrals is to use the dierentiation matrix D dened in (3) and solve the system (4) with the identity M ~e P N +(x j )+P N(x j ) proven in theorem 4.. For a large N, the method that will be the most successful is the one with the least sensitivity to round-o errors. This point has not been fully investigated at this time. Finally, an observation in regard to the maximum allowable time step for the arbitrarygrid spectral schemes. All spatial operators have the same eigenvalues, regardless of the spatial distribution of points (48). same for all schemes. Therefore, the maximum allowable time step is the Stability is a matrix property, and depends on all the points in the distribution. This observation is somewhat counter to the conventional nite-dierence notion, in which the maximum time step is governed by the smallest grid spacing. 4 The Legendre Collocation for Unstructured Grids The Legendre collocation for unstructured grids involves the approximation of the integrals in (6) and (7) by the Gauss-Lobatto-Legendre (GLL) quadrature formula. Let ( ; ; :::; N ; N ) be the nodes of the GLL quadrature formula and! l,lnbe the weights. We dene a new mass matrix M c by M c (i; j) l L j ( l )L k ( l )! l (53) where the L j (x) are the Lagrange polynomials at the points (x ;x ;x ; :::; x N ;x N ). Note that this is an arbitrary set of grid points. 5
The matrix M c may be dierent from M because the GLL formula is exact to order N and L j (x)l k (x) is a polynomial of order N. The matrix M c is, however, a symmetric and positive-denite matrix. By introducing quadrature to equation (7), we dene a new stiness matrix S c as S c (i; j) l L j ( l)l k ( l )! l (54) Note that because of the exactness of the GLL formula, the sum on the right-hand side of (54) is the same as the integral in the right-hand side of (7); therefore, S c S For this reason, the property (5) is true for the stiness matrix S c also. The uniqueness of the dierentiation matrix D also yields which does not contradict the fact that because the matrices S c and S are singular. M c S c M S M c 6 M In the Legendre collocation method of (34) with arbitrary grids, we seek a vector that satises ~u [u (t); :::; u N (t)] T M c d~u dt S c ~u ~e [u g(t)] (55) where ~e (;;; :::) T Alternatively, d~u dt D~u M c ~e [u g(t)] (56) The stability of (55) follows immediately from the fact that M c is symmetric positive denite and S c satises (5). Our aim is to show that (55) is equivalent to the usual Legendre collocation method. 6
Theorem 4.: Then, Let M c be the mass matrix dened in (53). We dene the residual vector ~r by M c ~e ~r (r o ; :::; r N ) T r j P N(x j )( + x j ) N (57) where P N (x) is the Legendre polynomial of order N. Proof: We start by noting that the nodes l of the GLL formula are the zeroes of the polynomial P N (x)( x ) Also, because P N ( + x) is a polynomial of degree N, L j (x)p N(x j )( + x j )P N(x)( + x) Therefore, N (M c ~r) i l l M c (i; j)p N(x j )( + x j ) L j ( l )L i ( l )P N(x j )( + x j )! l L i ( l )P N( l )( + l )! l N ;i which proves the theorem. Equation (56) also can be viewed as shown in the following example. We seek a polynomial (in x) u N (x; t) of the form u N (x; t) 7 u N (x j ;t)l j (x) (58)
such that du N (x k ;t) dt u N (x j ;t)l j(x k ) R N (x k )[u N (;t) g(t)] (59) where R N (x) (+x)p N (x) This approach is equivalent to the Legendre Collocation Method [6]. The extension of the arbitrary-grid Legendre collocation method from the linear case (34) to the solution of the nonlinear case () is immediate. The issue of implementation could be signicant. To avoid computing the points l, the best choice is to use the formulation (56) rather than (55). In this case, M c and S c do not need to be computed. At this stage, note that for the case R N (x) P N (x) we have the Legendre Tau method, with the additional property of an improved time step. However, we do not have the representation of the Legendre Tau method in the form of (55). 5 Unstructured Grids for Unbounded Domains: Laguerre Methods Consider the equation @U @U x< (6) @t @x U(;t) g(t) (6) U(x; ) h(x) Note that the domain is semibounded. Note also that if g(t), then Z d e x U (x; t)dx dt Assume that we have an arbitrary set of grid points (x ;x ; :::; x N ) Z e x U (x; t)dx (6) In the Galerkin procedure, we approximate the derivative of a function f(x) whose values at x j are given by the derivative of its interpolant f N (x). After we dene L(x) (x x ):::(x x N ) (63) 8
we dene the Lagrange polynomials by L j (x) L(x) (x x j )L (x j ) (64) The derivative of the interpolant f N (x) has two equivalent expressions: df N (x) dx f(x j ) dl j(x) dx (65) and df N (x) dx f N(x j )L j (x) (66) In the Galerkin Laguerre method, we express the equivalency between the expressions by Z X N e x " f(x j ) dl j(x) dx fn(x j )L j (x) L k (x)dx k N (67) Equation (67) denes the dierentiation matrix D. In fact, if we dene m k;j (L j ;L k ) (68) and s k;j (L j ;L k) (69) where the scalar product (u; v) is dened as then we get (u; v) Z e x u(x)v(x)dx D M S As before, the dierentiation matrix is unique. The manner in which the matrices M and S are constructed leads immediately to the following lemma. Lemma 6.: The matrix M is symmetric positive denite. The matrix S satises S + S T M diagonal(; ; ; :::; ) (7) 9
Proof: >From the denition of the matrix S, wehave s k;j (L j ;L k) Z e x L j (x)l k(x)dx Z e x L j (x)l k(x)dx Z + e x L j (x)l k (x)dx L j ()L k () By using the denition of the matrix M and the properties of the Lagrange polynomials, we get s k;j i; j; s j;k + m k;j (7) which proves (7). To discretize (6), we introduce the unknown vector ~u [u (t); :::; u N (t)] T that satises M d~u dt S~u ~e [u g(t)] (7) The stability is immediate, as shown in the following lemma. Lemma 6.: Let ~u satisfy (7), with g(t). Then, we have the energy estimate d dt ~ut M~u ~u T M~u ( )u (73) Proof: Equation (73) follows immediately from multiplying (7) by ~u T and using (7).
Lemma 6. implies that the method is stable, provided that. Note that the energy estimate (73) for the approximation is nearly the same as for the dierential equation (64). We still must show that the method described in (7) is equivalent to the Laguerre Galerkin method. We begin by rewriting (7) as d~u M S~u M ~e [u g(t)] (74) dt The key issue is to identify the vector M ~e which is done in the following theorem. Theorem 6.: Let M be the mass matrix dened in (68). Dene the residual vector ~r by M ~e ~r (r o ; :::; r N ) T Then where L () N is the Laguerre polynomial of order N. r j d dx L() N +j xxj (75) Proof: We must verify that ~r satises (75) and that M~r ~e We begin by expanding (M~r) as (M~r) i Z m i;j r j e x L i (x) L j (x)r j dx (76) If we substitute (75) into (76 ), then we get (M~r) i Z e x L i (x) " d L j (x) dx L() N +j xxj dx (77)
Because d dx L() N + is a polynomial of order N, it coincides with its interpolant; therefore, " d L j (x) dx L() N +j xxj d dx L() N +(x) Thus, Z (M~r) i e x L i (x) d dx L() N +(x)dx If we integrate the right-hand side by parts, we get (M~r) i L i ()L () N +() + Z e x L i (x)l () N +(x)dx Z e x L i(x)l () N +(x)dx The last two terms on the right vanish because of the orthogonality ofl (), and the rst term vanishes if i 6 ;thus, (M~r) i i; and the theorem is proven. Another method for getting the Lageurre method on the grid x j is to seek a polynomial u N (x; t) such that du N (x k ;t) dt L j (x k)u N (x j ;t) L N (x k)[u N (x ;t) g(t)] (78) where (LG) N (x) isthe Nth-degree Laguerre polynomial. collocation method. This approach is the Laguerre 6 Numerical Results We now test the previous theoretical results with two numerical examples. The linear equations (34){(36) are solved with f(x) sin(x), g(t) sin[( + t)], and the exact solution U(x; t) sin[(x + t)]. A variety of grids, from Chebyshev to \randomly generated" grids, are used to test the accuracy and stability of the method. For all calculations, 8-bit arithmetic is used to ensure adequate precision.
Figure shows the renement study on ve dierent grids:. Uniform grid x j j N N. Chebyshev grid x j cos( j N ) (j ; :::; N) 3. A linear combination of the uniform grid and Chebyshev grid (i.e, x j :5 j N N + :5 cos( j N )) 4. Chebyshev (i.e., x j cos ( j N )) 5. (Chebyshev) for x and (Chebyshev) for x, where (Chebyshev) is dened by the grid points xj cos ( j N ). The log of the L error, plotted against the number of points in the approximating polynomials is shown in Figure. The problems are run to the physical time T. The convergence is exponential for all cases until machine round o is encountered. These results are consistent with the previous numerical results. (Note that the Chebyshev grid is the least sensitive to round o.) The Legendre Galerkin method dened by equation (37) is stable; therefore, the initial error is not amplied. However, the eects of initial conditions must be carefully taken into account. We know that polynomials based on arbitrary grid distributions generally may be nonconvergent. This property, called the Runge phenomena, is easily demonstrated by approximating the function f(x) +(5x) ( x ) on a uniform grid. The global approximating polynomials oscillate wildly at each end of the domain, which yields a poor approximation in those regions. The Runge phenomena is alleviated by using a grid distribution (like the Chebyshev grid distribution), which clusters points near the boundaries and. Figure illustrates that a Runge-like phenomena exists within the arbitrary-grid spectral methods if special precautions are not taken in the initialization step. In this problem, the linear equations (34){(36) are solved with f(x), g(t), and the exact +[5(x)] +[5(+t)] solution U(x; t). The simulation is run to time T : (a physical time that +[5(x+t)] occurs well before the inuence of the initialization is lost.) (Running to a physical time T yields exponential convergence on all grids.) Convergence is achieved only for the Chebyshev grid distribution. The source of the error in this problem is the failure of the arbitrary grid that approximates the polynomial to converge to the initial condition. For small times (less than convective sweep), erroneous information is left in the domain, and the resulting method is nonconvergent. By changing the problem slightly, however, convergence can be recovered on all grids. 3
To initialize the problem, we must construct an approximation to the initial condition f(x), based on the grid points x j ( j N). We want tokeep the exibility and rigid structure of the original grid distribution; however, the interpolation polynomial, based on the grid points x j, generally is not convergent. Therefore, we use the method outlined in (49) and (5). With this initialization, spectral convergence is recovered. 7 Conclusions A new technique for implementing spectral methods for hyperbolic equations has been developed that does not require grid points that are nodes of some Gauss quadrature formula. For this reason, this method is referred to as an arbitrary-grid spectral method. Both Galerkin and collocation formulations are presented for the conventional Legendre method, and a Galerkin formulation is presented for the conventional Laguerre method. The basis for the stability of the unstructured spectral schemes relies on a weighted energy norm in all cases. Stability is proven for the constant coecient hyperbolic system. All unstructured spectral methods utilize a \weak" imposition of the boundary condition, similar to the technique used in the penalty formulations of the nite element method. With this imposition, the complete dierentiation matrix, including boundary conditions, is similar to (i.e., it has the same eigenvalues) the conventional dierentiation operator; therefore, this matrix behaves similarly. The new formulations are demonstrated on two scalar hyperbolic problems. The arbitrarygrid Legendre Galerkin method is used in both cases. Exponential accuracy is shown in both cases on arbitrary grids. Care must be exercised in the initialization procedure to ensure convergence of the new schemes. 8 Acknowledgments The authors would like to thank Drs. G. Erlebacher, H. O. Kreiss, D. Kopriva, and S. Abarbanel. Their comments and suggestions are greatly appreciated. References [] K. Z. Korczak and A. T. Patera, An isoparametric spectral element method for solution of the Navier-Stokes equations in complex geometry, JCP 6, 36, (986). [] M. Macaraeg and C. L. Streett, A spectral multi-domain technique for viscous compressible reacting ows, J. for Num. Meth. in Fluids 8,, (988). 4
[3] D. A. Kopriva, Multidomain spectral solution of the Euler gas-dynamics equations, JCP 96, 48, (99). [4] W. S. Don and D. Gottlieb, The Chebyshev-Legendre method: Implementing Legendre methods on Chebyshev points, ICASE NASA-CR-9497, SIAM J. on Numerical Analysis 3 59, (994). [5] A. T. Patera, A Spectral Element Method for Fluid Dynamics: Laminar Flow ina Channel Expansion, JCP 54, 468, (984). [6] E. Turkel and D. Gottlieb, Topics in spectral methods, Numerical Methods in Fluid Dynamics, lecture notes in math, Springer-Verlag 7, 5, (985). [7] M.H. Carpenter, D. Gottlieb, and S. Abarbanel, Time-stable boundary conditions for nite-dierence schemes solving hyperbolic systems: methodology and application to high-order compact schemes, JCP,, (994). 5
FIGURE. Convergence of the arbitrary grid Legendre Galerkin method on various grids. FIGURE. Divergence of the arbitrary grid Legendre Galerkin method for improperly imposed initial conditions. 6