24
Numerical Algorithms (2005) 38: 173–196 Springer 2005 The use of Chebyshev polynomials in the space–time least-squares spectral element method Bart De Maerschalck a and Marc I. Gerritsma b a Von Karman Institute for Fluid Dynamics, Waterloosesteenweg 72, 1640 Sint-Genesius-Rode, Belgium E-mail: [email protected] b Aerospace Engineering, Delft University of Technology, Kluyverweg 1, 2629 HS Delft, The Netherlands E-mail: [email protected] Received 31 March 2003; accepted 3 May 2004 Chebyshev polynomials of the first kind are employed in a space–time least-squares spec- tral element formulation applied to linear and nonlinear hyperbolic scalar equations. No sta- bilization techniques are required to render a stable, high order accurate scheme. In parts of the domain where the underlying exact solution is smooth, the scheme exhibits exponential convergence with polynomial enrichment, whereas in parts of the domain where the under- lying exact solution contains discontinuities the solution displays a Gibbs-like behavior. An edge detection method is employed to determine the position of the discontinuity. Piecewise reconstruction of the numerical solution retrieves a monotone solution. Numerical results will be given in which the capabilities of the space–time formulation to capture discontinuities will be demonstrated. Keywords: Chebyshev polynomials, hyperbolic equations, least-squares spectral element method, shock capturing AMS subject classification: 65M12, 65M70, 41A50, 65P40 1. Introduction The least-squares spectral element method (LSQ-SEM) was first presented by Chan [10] and Lin [22] at Boeing Company. Independently, the LSQ-SEM was de- veloped and analyzed by Proot and Gerritsma [25–27]. The method combines the least- squares formulation as described in [1–8] and [14–19] with a spectral element approx- imation as described in [9,20]. Up till now a Legendre basis has been used, but an extension to Chebyshev polynomials is straightforward. Chebyshev polynomials have the advantage over Legendre functions that the Gauss–Lobatto-points and the Gauss– Lobatto weights are analytically available, in contrast to the Legendre formulation where both the points and the weights have to be determined numerically. Recently, the LSQ- SEM has been applied in a space–time approximation to linear and nonlinear hyperbolic scalar equations [23].

The Use of Chebyshev Polynomials in the Space?Time Least-Squares Spectral Element Method

  • Upload
    marc-i

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Numerical Algorithms (2005) 38: 173–196 Springer 2005

The use of Chebyshev polynomials in the space–timeleast-squares spectral element method

Bart De Maerschalck a and Marc I. Gerritsma b

a Von Karman Institute for Fluid Dynamics, Waterloosesteenweg 72, 1640 Sint-Genesius-Rode, BelgiumE-mail: [email protected]

b Aerospace Engineering, Delft University of Technology, Kluyverweg 1, 2629 HS Delft, The NetherlandsE-mail: [email protected]

Received 31 March 2003; accepted 3 May 2004

Chebyshev polynomials of the first kind are employed in a space–time least-squares spec-tral element formulation applied to linear and nonlinear hyperbolic scalar equations. No sta-bilization techniques are required to render a stable, high order accurate scheme. In parts ofthe domain where the underlying exact solution is smooth, the scheme exhibits exponentialconvergence with polynomial enrichment, whereas in parts of the domain where the under-lying exact solution contains discontinuities the solution displays a Gibbs-like behavior. Anedge detection method is employed to determine the position of the discontinuity. Piecewisereconstruction of the numerical solution retrieves a monotone solution. Numerical results willbe given in which the capabilities of the space–time formulation to capture discontinuities willbe demonstrated.

Keywords: Chebyshev polynomials, hyperbolic equations, least-squares spectral elementmethod, shock capturing

AMS subject classification: 65M12, 65M70, 41A50, 65P40

1. Introduction

The least-squares spectral element method (LSQ-SEM) was first presented byChan [10] and Lin [22] at Boeing Company. Independently, the LSQ-SEM was de-veloped and analyzed by Proot and Gerritsma [25–27]. The method combines the least-squares formulation as described in [1–8] and [14–19] with a spectral element approx-imation as described in [9,20]. Up till now a Legendre basis has been used, but anextension to Chebyshev polynomials is straightforward. Chebyshev polynomials havethe advantage over Legendre functions that the Gauss–Lobatto-points and the Gauss–Lobatto weights are analytically available, in contrast to the Legendre formulation whereboth the points and the weights have to be determined numerically. Recently, the LSQ-SEM has been applied in a space–time approximation to linear and nonlinear hyperbolicscalar equations [23].

174 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

Spectral methods perform best when the underlying exact solution is sufficientlysmooth and therefore spectral methods have mainly been used in elliptic/parabolic prob-lems. The use of spectral methods in hyperbolic problems which allow for discontinuoussolutions ‘traditionally has been viewed as problematic’ [12], and therefore very littlework has been done.

According to Laney [21], the linear advection equation and the nonlinear Burgersequation are the building blocks in computational gasdynamics, where the linear advec-tion equation models entropy waves exhibiting contact discontinuities and the nonlinearBurgers equation models the nonlinear interaction of waves with different wave numberswhich may lead to the development of shocks and expansion fans.

The outline of this paper is as follows. In section 2 the space–time least-squaresformulation is presented on the continuous level. In section 3 the nodal representationby means of Chebyshev polynomials is discussed. In section 4 the LSQ-SEM results ob-tained with Chebyshev polynomials for linear equations (section 4.1), which correspondsto the modelling of entropy waves in gasdynamics, are given. The nonlinear case, whichcorresponds to the other waves in gasdynamics, is treated in section 4.2. It will be shownthat the least-squares spectral element method has the potential to correctly approximatethe nonlinear solution. However, the conditions under which the correct weak solutionis approximated, depends strongly on the type of linearization. In section 5 the enhancededge detection methods, developed by Gelb and Tadmor [11], is applied to the oscilla-tory numerical solution, to determine the shock position. Using piecewise reconstructionin the smooth parts of the solution renders monotonous solutions. The conclusions arepresented in section 6.

2. The least-squares formulation

The least-squares method is based on minimization of the residual in a weightedL2-norm. The linear advection equation is given by

∂u

∂t+ a

∂u

∂x= 0, 0 � x � L, a > 0, t � 0, (1)

with

u(0, x) = u0(x) and u(t, 0) = f (t). (2)

Because the functions in H 1 which satisfy the initial and boundary conditions do notform a linear function space, we take any function u ∈ H 1 which satisfies the initial andboundary conditions and set u = u + u. The problem can then be written in terms of u

as∂u

∂t+ a

∂u

∂x= −∂u

∂t− a

∂u

∂x= g(t, x), 0 � x � L, a > 0, t � 0, (3)

with

g(t, x) = −∂u

∂t− a

∂u

∂x, u(0, x) = 0 and u(t, 0) = 0. (4)

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 175

The function u does belong to the linear function space V0(�) given by

V0(�) = {u ∈ H 1(�) | u(0, x) = 0 and u(t, 0) = 0

}. (5)

The space–time least-squares formulation is then given by:Find u ∈ V0(�) which minimizes the functional:

J (u) = 1

2

∥∥∥∥∂u

∂t+ a

∂u

∂x− g(t, x)

∥∥∥∥2

L2w

= 1

2

∫�

(∂u

∂t+ a

∂u

∂x− g(t, x)

)2

w(x, t) d�, (6)

where the domain � = [0, L]× [0, T ], w(x, t) > 0 is a strictly positive weight functionand g is the function defined in (4). In order to show that minimization of the residualactually leads to an approximation of the exact solution, we need the following a prioriestimate.

Lemma (Coercivity). There exists a constant C > 0 independent of u ∈ V0(�) suchthat

C‖u‖H 1(�) �∥∥∥∥∂u

∂t+ a

∂u

∂x

∥∥∥∥L2(�)

, ∀u ∈ V0(�). (7)

Proof. The proof of this lemma is a direct consequence of the Poincaré–Friedrichsinequality. �

Assuming that u ∈ V0(�) is a minimizer of the functional J we can set up anequivalent formulation using variational analysis. If u is a minimizer, then

d

dεJ (u + εv)

∣∣∣∣ε=0

=(

∂u

∂t+ a

∂u

∂x− g,

∂v

∂t+ a

∂v

∂x

)L2

w

= 0, ∀v ∈ V0(�). (8)

This can be written in a more compact notation as

(Lu,Lv)L2w

= (g, Lv)L2w, (9)

where the inner product is defined as

(f, g)L2w(�) =

∫�

fgw d�, w > 0, (10)

and the differential operator L is given by

L = ∂

∂t+ a

∂x. (11)

Formulation (9) will be used in the discretization of the advection equation. Note thatif we interchange u and v in the inner product on the left hand side of (9), the equationremains the same. Therefore, the least-squares formulation is symmetric. Using (7) and

176 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

the fact that that w � 1 (which will be the case for the weight function associated withChebyshev polynomials) we obtain

‖Lu‖2L2

w� ‖Lu‖2

L2 � C2‖u‖2H 1(�)

, (12)

which means that the formulation is also positive definite.Numerically, we restrict the infinite-dimensional function space V0(�) to finite-

dimensional subspaces, denoted by V h0 (�). The numerical solution then follows from

minimizing the functional J over a smaller space and the formulation becomes: Finduh ∈ V h

0 (�) such that(Luh,Lvh

)L2

w(�)= (

g,Lvh)L2

w(�), ∀vh ∈ V h

0 (�). (13)

If the exact solution of the linear advection equation is a member of H 1(�), then thecoercivity relation gives us the following result, where we use the fact that L is linearand the weight function w(x, t) � 1∥∥u − uh

∥∥H 1(�)

� 1

C

∥∥Lu − Luh∥∥

L2(�)= 1

C

∥∥g − Luh∥∥

L2(�)� 1

C‖R‖L2

w(�). (14)

So minimizing the residual in the L2w-norm indeed minimizes the error in the H 1-norm.

If the exact solution is not an element of H 1(�) we use the fact that for two-dimensional problems (one spatial and one temporal dimension) H 1(�) is compactlyembedded in L2(�) in the L2-norm, so every function in L2(�) can be approximatedarbitrarily accurately in the L2-norm. This is not the case in the L∞-norm which explainsthe oscillatory behavior when the space–time least-squares approximation is applied toproblems with discontinuities.

3. Chebyshev polynomials

In the previous section a brief introduction to the least-squares approach wasgiven. Now we turn to the finite-dimensional subspace, V h

0 (�), mentioned previously.In the spectral element method, the whole computational domain is divided into non-overlapping subdomains �i called spectral elements. These spectral elements are thenmapped onto a standard domain [−1, 1] × [−1, 1]. Within this standard element theapproximate solution is expanded in space–time basis functions:

uh(t, x) = uN,M(t, x) =N∑

i=0

M∑j=0

uhi,j hi(x)hj (t), (15)

where the basis functions hi(s) (s is either x or t in the above expansion) are Lagrangianinterpolants through the Chebyshev–Gauss–Lobatto points [9,24]. The basis functionsare explicitly given by

hi(s) = (−1)N+1+i (1 − s2)T ′N(s)

ciN2(s − si), (16)

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 177

where c0 = cN = 2, and ci = 1 otherwise. The function TN(s) denotes the Chebyshevpolynomial of the first kind of degree N .

Chebyshev polynomials of the first kind are defined by [24]

Tn(s) = cos nθ, where s = cos θ. (17)

The Chebyshev–Gauss–Lobatto points are given explicitly as

sj = − cosjπ

N, j = 0, . . . , N. (18)

The derivative of the Lagrangian basis functions (16), evaluated at the Chebyshev–Gauss–Lobatto points (18) are given by

dhj

ds

∣∣∣∣si

= Dij =

−2N2 + 1

6i = j = 0,

ci

cj

(−1)i+j+N1

si − sj

i �= j ,

− si

2(1 − s2i )

0 < i = j < N ,

2N2 + 1

6i = j = N .

(19)

The integrals in (13) are evaluated numerically using Gauss–Lobatto integration:∫ 1

−1f (x)w(x) dx =

∫ 1

−1

f (x)√1 − x2

dx ≈N∑

j=0

f (xj )wj , (20)

with wj the N + 1 Chebyshev–Gauss–Lobatto weights:

wi =

π

2Nfor i = 0 or i = N ,

π

Nelsewhere.

(21)

4. Application of LSQ-SEM to hyperbolic problems

Numerical schemes to solve hyperbolic problems usually take the direction of thewave velocity into account. Since the least-squares approach leads to a symmetric for-mulation this is no longer necessary. The main question therefore is: how well doesthe least-squares spectral element formulation perform in problems which have a strongdirectional dependence? In order to answer this question LSQ-SEM will be applied tolinear and nonlinear hyperbolic problems.

178 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

4.1. Results for the linear advection equation

The first test case consists of a linear advection problem given by

∂u

∂t+ a

∂u

∂x= 0, 0 � x � L, t � 0, (22)

with

u(0, x) = u0(x) and u(t, 0) = u(t, L). (23)

The exact solution of this problem is given by

u(t, x) = u0(x − at). (24)

So the initial profile is convected with a constant speed through the computational do-main. The physical relevance of this model problem is that it models entropy waves ingasdynamics.

The following test cases will be considered:

• The linear advection of a smooth cosine function on a periodic domain is given by

u0(x) = 1

2

(1 − cos(2πx)

), 0 � x � L = 1. (25)

The solution is infinitely smooth so we do not expect spurious wiggles. Furthermore,since the solution is infinitely smooth we expect exponential convergence with poly-nomial enrichment (increasing the polynomial degree). In order to assess the stability,calculations for various Courant numbers, also known as the Courant–Friedrichs–Lewy or CFL-number, will be presented with

CFL = aNLt

MLx

, (26)

where Lt is the size of the spectral element in the temporal direction and Lx is thesize of the spectral element in the spatial direction. M and N denote the polynomialdegree in the temporal and spatial direction, respectively.

• The linear advection of a square wave on a periodic domain:

u0(x) ={

1 for 0.25 � x � 0.75,

0 elsewhere.(27)

In this case the length of the domain is set to L = 4. This solution is discontinuousand we do not expect exponential convergence with polynomial enrichment. Further-more, we expect wiggles around the discontinuities similar to the wiggles we observearound a discontinuity in approximation theory.

Figure 1 shows the results for the advection of the cosine function for differentCFL-numbers. The solution is plotted at a fixed time level T = 10. A detail of thespace–time spectral element grid that is used to advance the solution in time is shownin figure 2. This is an equispaced rectangular spectral element mesh consisting of ten

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 179

(a) (b)

(c)

Figure 1. Numerical results for the linear advection equation with initial cosine function at a fixed timelevel T = 10 for different CFL-numbers: (a) CFL = 0.1, (b) CFL = 0.9, (c) CFL = 5 (Nc/UL = 10,

N = M = 5).

Figure 2. Spectral element space–time slab with number of elements per unit length Nc/UL = 10 and orderN = M = 5.

180 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

Table 1Numerical results for the linear advection equation with initial co-sine function at a fixed time level T = 10 and T = 100, for different

CFL-numbers (Nc/UL = 10, N = M = 5).

CFL Time T = 10 Time T = 100‖ε‖L2

w(�) ‖ε‖L2(�) ‖ε‖L2w(�) ‖ε‖L2(�)

0.1 9.33e−6 7.45e−6 9.34e−5 7.45e−50.9 7.02e−7 5.41e−7 6.74e−6 5.36e−65 4.24e−3 3.41e−3 4.24e−2 3.38e−2

elements per unit length in the x-direction, denoted by Nc/UL, and one spectral elementin the temporal direction. Only one time-slab is used in the temporal direction and thesolution at time t = T is obtained by taking the final solution from a previous time-slab as initial condition for the current time-slab. The polynomial degree in the spatialand temporal direction is kept constant, N = M = 5. The CFL-number is changed bychanging the size of the spectral element in the temporal direction, Lt .

Figure 1 demonstrates that there is no need to add dissipative terms to stabilize thescheme. This makes the scheme low diffusive, which is particularly important for theapproximation of the Navier–Stokes equations and for long time integration. Figure 3shows the results at time T = 100. Notice the low diffusion error: the exact amplitude isapproximated very well. Only in case of CFL = 5 one notices a difference in amplitudeand a slight dispersion error can be observed. For CFL = 0.1 and CFL = 0.9 the least-squares spectral element approach is highly accurate even after long time integration.

Table 1 shows the error measured in both the weighted and the unweightedL2-norm. The weighted L2-norm is defined as the sum of the errors in each element �e

‖ε‖2L2

w(�e)=

∑e

∫ 1

−1

(uh(ξ) − uex(ξ))2√1 − ξ 2

dξ, (28)

with uex the exact solution and ξ the local coordinate according to the iso-parametriccoordinate transformation that maps each element into a standard element of dimension[−1 1]. The weighted L2-norm over the whole domain is defined as the root of the sumof the error over all the elements. For the unweighted L2-norm one can write

‖ε‖2L2(�)

= ‖ε‖20 =

∑e

∫ L

0

(uh(x) − uex(x)

)2dx. (29)

When we apply the method to the initial square hill, spurious Gibbs phenomenaare expected. A detail of the solution for the square hill for different CFL-numbers isplotted in figure 4 with the errors given in table 2. From the plots one observes that rightin front of and right behind the discontinuities the approximate solution contains spu-rious oscillations. However, looking at the results after long time integration, figure 5,one notices that the amplitude of the oscillations does not tend to grow. The oscillationsare restricted to the direct neighborhood of the discontinuities. No smearing of the dis-continuities occurs. This also might be observed in figure 6 where the solution is plotted

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 181

(a) (b)

(c)

Figure 3. Numerical results for the linear advection equation with initial cosine function at a fixed timelevel T = 100, for different CFL-numbers: (a) CFL = 0.1, (b) CFL = 0.9, (c) CFL = 5 (Nc/UL = 10,

N = M = 5).

as a contour plot in a space–time domain. The white lines indicate the position of thediscontinuities with their spurious oscillations. It is obvious that these lines are almostparallel to each other and do not separate significantly. Note, however, that a major partof the space–time solution domain remains unpolluted.

From the results for the initial square wave it is obvious that the least-squares spec-tral element method is nonmonotone. The spurious oscillations pollute the solution neardiscontinuities. Even for very fine meshes with high interpolation order some peaks willshow up, see, for instance, figure 7.

What is important to notice is that the approach is unconditionally stable withoutthe need for artificial diffusion. Since the spurious oscillations are only located close tothe discontinuities, there is the possibility of retrieving the location of the discontinuityand reconstructing a monotone approximation from the least-squares solution as will beshown in section 5.

182 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

(a)

(b)

Figure 4. Numerical results for the advection of the square wave. Results shown at a fixed time levelT = 10, for different CFL-numbers: (a) CFL = 0.1, (b) CFL = 0.9 (Nc/UL = 10, N = M = 5).

Table 2Numerical results for the linear advection of a square wave at afixed time level T = 10 and T = 102, for different CFL-numbers

(Nc/UL = 10, N = M = 5).

CFL Time T = 10 Time T = 102‖ε‖L2

w(�) ‖ε‖L2(�) ‖ε‖L2w(�) ‖ε‖L2(�)

0.1 1.36e−1 1.30e−1 2.13e−1 1.82e−10.9 1.26e−1 1.20e−1 1.75e−1 1.35e−1

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 183

(a)

(b)

Figure 5. Numerical results for the advection of the square wave. Results shown at a fixed time levelT = 102, for different CFL-numbers: (a) CFL = 0.1, (b) CFL = 0.9 (Nc/UL = 10, N = M = 5).

4.2. Results for nonlinear hyperbolic scalar equations

The least-squares spectral element method will be applied to the one-dimensionalinviscid Burgers equation

∂u

∂t+ ∂u2

∂x= 0, with 0 � x � L, t � 0, (30)

184 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

Figure 6. Space–time contour plot, linear advection of a square wave, CFL = 0.9, Nc/UL = 10, N = M =5.

Figure 7. Solution for the initial square wave on a fine high order mesh; Nc/UL = 50, N = M = 10,CFL = 0.9, T = 10, ‖ε‖L2

w(�) = 7.92e−2 and ‖ε‖L2(�) = 4.94e−2.

with as initial condition a single cosine hill

u0(x) ={

1

2

(1 − cos(πx)

)for 0 � x � 2,

0 elsewhere.(31)

Since this equation is nonlinear, linearization of the quadratic term is required. Twotypes of linearization have been used: Newton’s method and Picard iteration.

When uk is the approximation of (30) linearized with respct to uk−1, and δu =uk − uk−1 is called the difference between the two consecutive iteration steps, then one

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 185

can neglect the higher order terms of δu and linearize (30) by

∂uk

∂t+ 2

(uk−1 ∂uk

∂x+ uk ∂uk−1

∂x− uk−1 ∂uk−1

∂x

)= 0. (32)

To find the discrete solution uk of (32) in the least-squares sense means: Find uk whichminimizes the following functional:

J(uk

) = 1

2

∥∥∥∥∂uk

∂t+ 2

(uk−1 ∂uk

∂x+ uk ∂uk−1

∂x− uk−1 ∂uk−1

∂x

)∥∥∥∥2

L2w

. (33)

This expression is called the nonconservative Newton least-squares formulation. Thenonconservative Picard linearised formulation only takes the first two terms of (32) intoaccount:

∂uk

∂t+ 2uk−1 ∂uk

∂x= 0. (34)

The functional (33) then reduces to

J(uk

) = 1

2

∥∥∥∥∂uk

∂t+ 2uk−1 ∂uk

∂x

∥∥∥∥2

L2w

. (35)

For both linearized equations minimization of the functional J (uk) in the least-squaressense leads to an algebraic positive definite system of the form

Auk = f , (36)

with uh the solution vector containing the unknown coefficients. The stiffness matrix A

and the force vector f depend on the previous iteration step (for Picard only A will bedependent). Therefore (36) will have to be solved several times in each time step.

It is also possible to use the LSQ-SEM in a conservative formulation. This can bedone by defining a dummy variable v(t, x) with v = u2. Inserting this into (30) oneobtains a conservative form of the Burgers equation

∂u

∂t+ ∂v

∂x= 0,

v − u2 = 0.

(37)

The least-squares approach of this system can be obtained by minimizing the functional

J (u, v) = 1

2

∥∥∥∥∂u

∂t+ ∂v

∂x

∥∥∥∥2

L2w

+ 1

2

∥∥v − u2∥∥2

L2w. (38)

186 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

Table 3Results for the Burgers equation with initial cosine hill (T = 2, CFL = 1, Nc/UL = 10, N =

M = 4).

Scheme ‖ε‖L2w(�) ‖ε‖L2(�) �xs [%] Nt Ntot α Fig.

Newton, conservative 5.53e−2 3.96e−2 0.24 37 411 0.25 8(a)Newton, nonconservative 1.88e−1 1.40e−1 0.61 34 634 0.25 8(b)Picard, conservative 6.87e−2 4.65e−1 0.24 39 3687 0.25 8(c)Picard, nonconservative 2.46e−1 2.13e−1 2.26 37 721 0.25 8(d)

A system of equations is obtained by substituting u = u+ ε1u and v = v + ε2v and takethe limit of the partial derivatives of J with respect to ε1 and ε2:

limε1,2→0

∂ε1J (u + ε1u, v + ε2v) = 0 ∀u ∈ H 1(�),

limε1,2→0

∂ε2J (u + ε1u, v + ε2v) = 0 ∀v ∈ H 1(�).

(39)

Figure 8 and table 3 show the results of the different linearization procedures andformulations for the LSQ-SEM at the fixed time level T = 2. During all calculations theCFL-number is kept constant, where for the invisid Burgers equation as given in (30) theCFL-number is defined as

CFL = |2u|maxLt

Lx

N

M, (40)

with u the known solution on the lower side of each new timeslab.�xs is the measured distance between the exact position of the shock discontinuity

and the predicted position of the discontinuity in the LSQ-SEM solution:

�xs = |xs − xsexact |L

× 100%. (41)

Capturing the discontinuity in the approximate solution is rather complicated since adiscontinuous solution is not in H 1(�). We will come back to this topic in the nextsection. It is expected that the error in the shock position, �xs, will dominate theL2-error. Different formulations and different linearization schemes will lead to dif-ferent shock positions. In table 3 α is a relaxation factor. After each iteration step thenew solution uk is obtained using the solution from the previous iteration uk−1:

uk = αuk−1 + (1 − α)uk, with 0 � α � 1. (42)

Nt in table 3 is the number of time-steps while Ntot is the total number of iterations. Thisis the sum of the number of iterations of over all time-steps. Within each time-step thesolution is iteratively solved until ‖Rk‖∞ � 10−5, with ‖Rk‖∞ = max(uk − uk−1).

At first sight it seems that the conservative Newton LSQ-SEM formulation per-forms best based on accuracy, shock positioning and CPU time, table 3. However, ifone increases the polynomial degree, the conservative scheme hardly converges unless

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 187

Figure 8. Burgers equation with initial cosine hill, T = 2, CFL = 1, Nc/UL = 10, N = M = 4.

Table 4Results for the Burgers equation with initial cosine hill in the nonconserva-tive Picard formulation for different interpolation degrees (T = 2, CFL = 1,

Nc/UL = 10).

N = M ‖ε‖L2w(�) ‖ε‖L2(�) �xs [%] Nt Ntot α Fig.

4 2.46e−1 2.13e−1 2.26 37 721 0.25 10(a)5 1.80e−1 1.46e−1 1.40 37 904 0.25 10(b)6 1.50e−1 1.02e−1 0.24 38 1112 0.40 10(c)8 1.10e−1 5.94e−2 0.12 39 1559 0.50 10(d)

10 5.29e−2 3.80e−2 0.19 39 2099 0.60 10(e)12 6.54e−2 5.04e−2 0.20 39 5583 0.80 10(f)

an unreasonable high relaxation factor α is used, while the nonconservative Newton for-mulation no longer correctly locates the discontinuity as shown in figure 9. Only Picardin the nonconservative formulation seems to overcome these problems. For this formu-lation results are given in figure 10 and table 4. When increasing the polynomial degree,the position of the shock converges to the exact discontinuity location.

188 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

Figure 9. Burgers equation with initial cosine hill, Newton’s method for the nonconservative formulation,T = 2, CFL = 1, Nc/UL = 10, N = M = 5.

Figure 11 shows the LSQ-SEM solution in space–time for the Burgers equationwhen the nonconservative Picard formulation is used. This figure, together with fig-ure 6, shows the ability to capture discontinuities which are not aligned to the grid. Thewhite band around the singularities is a result of the local Gibbs phenomenon. Note thatsince no dissipative terms have been added to the weak solution in order to stabilize themethod, no smearing of the shocks occurs.

5. Determination of the location of discontinuities

The results for the linear and the nonlinear hyperbolic scalar equations presentedabove demonstrate that the least-squares spectral element method is high order accuratein the smooth parts of the solution, but exhibits Gibbs-like oscillations near disconti-nuities in the solution or its derivatives. Despite the fact that the method converges inthe L2-norm, with nonconservative Picard iteration, the residual in the minimax-norm isO(1). Recently it has been proven that the oscillatory behavior around discontinuities isnot just noise, but contains sufficient information to reconstruct an exponentially conver-gent approximation everywhere in the computational domain, provided that the locationof the discontinuity is known, i.e. the Gibbs phenomenon can be overcome completely[12,13].

In order to determine from the oscillatory numerical solution the location of thediscontinuity, the enhanced edge detection method developed by Gelb and Tadmor [11]is used. The idea is to expand the numerical solution in a filtered conjugate Fourier sum[11]

SσN

[uh

](x) =

N∑k=1

σ

(k

N

)(ak sin kx − bk cos kx), (43)

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 189

Figure 10. Burgers equation with initial cosine hill, Picard iteration for the nonconservative formulation(see also table 4), T = 2, CFL = 1, Nc/UL = 10.

which converges faster than the unfiltered Fourier representation (σ = 1) to the singularsupport of f (x) for N → ∞. The factor σ is called the concentration factor. For smoothfunctions f , the generalized conjugate Fourier sum converges to zero. Here SN [f ](x) isthe Fourier projection given by

190 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

Figure 11. Space–time contour plot, Burgers equation with initial cosine hill, nonconservative Picard LSQ-SEM, CFL = 1, Nc/UL = 10, N = M = 6.

SN [f ](x) = a0 +N∑

k=1

(ak cos kx + bk sin kx). (44)

Instead of applying the generalized conjugate Fourier sum to the Fourier projection, itwill now be applied to Fourier interpolant IN through the numerical solution. Withthe use of the particular choice σ = σ r(ξ) = −πrξ r , which for odd r’s equals thedifferentiated Fourier partial sums, the filtered conjugate Fourier representation withr = 2p + 1 is given by

Iσ 2p+1

N

[uh

](x) = (−1)p π(2p + 1)

N2p+1

d2p+1

dx2p+1IN

[uh

](x). (45)

For the particular choice p = 0 one obtains

I0N

[uh

](x) = π

N

duh

dx. (46)

It is proven [11] that SN converges pointwise to

limN→∞

I0N

[uh

](x) = lim

ε→0

(uh(x + ε) − uh(x − ε)

) := [u](x). (47)

So in regions where the solution is continuous this expression tends to converge to zeroand near discontinuities this expression will yield a finite nonzero value. The location ofa discontinuity is then determined from the value x = xs for which SN has a sharp peak.

For finite values of N the expression I0N [uh](x) will be very oscillatory with a

more pronounced maximum near the discontinuity. By amplification of scales [11] the

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 191

location of the discontinuity can be filtered out of the spurious oscillations in I0N for

finite values of N . Therefore define

TN(x) = Nq/2(I0N

[uh

](x)

)q →{

Nq/2([

uh](x)

)qif x = xs,

O(N−q/2

)elsewhere,

(48)

where xs denotes the position of the discontinuity. The enhanced edge detection methodnow sets

IeN

[uh

](x) =

{I0

N

[uh

](x) if

∣∣TN(x)∣∣ > Jcrit,

0 if∣∣TN(x)

∣∣ < Jcrit.(49)

Here Jcrit is an O(1) threshold parameter which signifies the critical (minimal) amplitudenecessary for jumps to be detected. One has to bear in mind, however, that the polyno-mial degrees used to solve the differential equation are considered high in comparisonto standard finite element methods, but are very low in comparison to the polynomialdegrees used by Gelb and Tadmor. As it turns out, Ie

N gives a good indication of thelocation of the discontinuity, but its value does not predict the amplitude of the discon-tinuity correctly. However, a good indicator of the shock position is all we need in thiswork. Results of the concentration method and its enhancement are shown in figure 12.The result of the enhanced concentration method is demonstrated in figure 13 for thenumerical solution of figure 10(c). By applying the edge detection algorithm describedabove to the derivative of the numerical solution, discontinuities in the first derivative(kinks) can be detected. This has not been done for the Burgers equation. Once the dis-continuities have been detected, it is possible to reconstruct the solution in the piecewisesmooth subdomains defined by the position of the edges and the boundary conditionsas described in [13]. Figure 14 shows the result of the piecewise reconstruction methodapplied to the original LSQ-SEM solutions as presented in figure 10. Figure 15 showsthe result of the reconstruction method for the solution of figure 11. The shock in thespace–time domain is now presented by a sharp edge.

From the plots one can notice that application of the reconstruction method indeedimproves the accuracy of the solution and renders a monotone solution. Table 5 showsthe change in error before and after the reconstruction method has been applied. The lastcolumn shows the results of the product of the jump in the solution times the distancebetween the exact discontinuity and the detected edge. One can notice that the order ofthe error and this product only differ slightly. This shows that the L2-error is dominatedby the error in the shock position.

6. Conclusions

In this paper the space–time least-squares spectral element formulation usingChebyshev polynomials has been discussed. The method turns out to be unconditionallystable without the necessity to introduce dissipative terms, but accuracy requires a suf-ficiently small time step as shown in figure 3. In contrast to conventional schemes for

192 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

(a)

(b)

Figure 12. Results of the concentration method and enhancement (q = 5) applied to the solution in fig-ure 10(c); plot (a): graph of I0

N(x) given by (46); plot (b): function TN(x) obtained by amplification of

I0N

(x) as demonstrated in (48), with q = 5.

hyperbolic equations, increasing the polynomial degree in the presence of singularitiesleads to more accurate solutions as is demonstrated in figures 7 and 10.

The above results demonstrate that the space–time formulation presented in itscurrent form is capable to approximate the correct weak solution. However, the properapproximation depends strongly on the linearization method employed.

The fact that different linearized schemes lead to different solutions is to beavoided. In the results presented above the exact solution is known and therefore theproper linearization scheme can be selected immediately. The above schemes cannot beused for general nonlinear equations for which the exact solution is not known a priori.The reason that different schemes lead to different numerical approximations is due to

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 193

Figure 13. Result of the edge detection method. The pointed node indicates the position of the shock.

Table 5Comparison of the L2-error for the Burgers test case of figure 10 before and after ap-

plying piecewise reconstruction.

N = M Before After Vs × �xs‖ε‖L2

w(�) ‖ε‖L2(�) ‖ε‖L2w(�) ‖ε‖L2(�)

4 2.46e−1 2.13e−1 2.31e−1 1.97e−1 5.89e−25 1.79e−1 1.45e−1 2.03e−1 1.74e−1 3.64e−26 1.50e−1 1.02e−1 7.01e−2 5.51e−2 6.38e−38 1.10e−1 5.94e−2 1.24e−1 7.08e−2 3.18e−3

10 5.28e−2 3.80e−2 5.08e−2 3.66e−2 4.79e−312 6.54e−2 5.04e−2 6.57e−2 5.02e−2 5.27e−3

the fact that the space in which the residuals are represented is too small. This requiresthe introduction of two finite-dimensional spaces; the first in which the approximate so-lution is represented, in this case the space spanned by Chebyshev polynomials, and asecond space in which the residuals are represented.

If the residual space is enlarged sufficiently, all schemes discussed in section 4produce the same, correct approximation to the weak solution. This is still ongoing re-search and results will be published in future papers. Since the dimensions of the residualspace are not specific to the use of Chebyshev polynomials to represent the discrete so-lution, no attempt has been made to incorporate this theory in this paper. The results

194 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

Figure 14. Piecewise reconstruction method applied to the solutions of figure 10.

presented in this paper show that the least-squares spectral element method is merelycapable to approximate weak solutions of nonlinear hyperbolic equations. These resultsalso demonstrate that further research is necessary to ensure that the discrete solutionconverges to the correct weak solution.

B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method 195

Figure 15. Space–time contour plot, Burgers equation with initial cosine hill, nonconservative Picard LSQ-SEM with piecewise reconstruction method. CFL = 1, Nc/UL = 10, N = M = 6.

The spurious oscillations that are produced when the solution becomes singular forthe Burgers equations remain bounded and localized in the least-squares formulation,just like in the linear case. No nonlinear interaction between the spurious oscillationstakes place, which eventually pollutes the whole solution as is the case for the Galerkinspace–time formulation without damping.

The ability to predict the location of the shock from the oscillatory numerical solu-tion and to reconstruct a monotone solution in a post-processing step allows one to de-velop globally higher order accurate numerical schemes for nonlinear hyperbolic equa-tions. It has been shown that the error in the reconstructed solution is dominated by theerror in the position of the discontinuity.

The ability to use high order methods to produce monotone solutions in hyperbolicequations offers great potential in solving problems in gasdynamics, such as the Eulerequations.

References

[1] P. Bochev, Z. Cai, T.A. Manteuffel and S.F. McCormick, Analysis of velocity-flux first order systemleast-squares principles for the Navier–Stokes equations: Part I, SIAM J. Numer. Anal. 35 (1998)990–1009.

[2] P. Bochev, T.A. Manteuffel and S.F. McCormick, Analysis of velocity-flux first order system least-squares principles for the Navier–Stokes equations: Part II, SIAM J. Numer. Anal. 36 (1999) 1125–1144.

[3] P.B. Bochev, Analysis of least-squares finite element methods for the Navier–Stokes equations, SIAMJ. Numer. Anal. 34 (1997) 1817–1844.

196 B. De Maerschalck, M.I. Gerritsma / Least-squares spectral element method

[4] P.B. Bochev, Finite element methods based on least-squares and modified variational principles, Tech-nical Report, POSTECH (2001).

[5] P.B. Bochev and M.D. Gunzburger, A least-squares finite element method for the Navier–Stokes equa-tions, Appl. Math. Lett. 6 (1993) 27–30.

[6] P.B. Bochev and M.D. Gunzburger, Analysis of least-squares finite element methods for the Stokesproblem, Math. Comp. 63 (1994) 479–506.

[7] P.B. Bochev and M.D. Gunzburger, Least-squares finite element methods for the velocity–pressure–stress formulation of the Stokes equations, Comput. Methods Appl. Mech. Engrg. 126 (1995) 267–287.

[8] P.B. Bochev and M.D. Gunzburger, Finite element methods of least-squares type, SIAM Rev. 27(1998) 789–837.

[9] C. Canuto, M.Y. Hussaini, A. Quarteroni and T.A. Zang, Spectral Methods in Fluid Dynamics,Springer Series in Computational Physics (Springer, Berlin, 1987).

[10] D.C. Chan, Least-squares spectral element methods for the simulation of unsteady fluid dynamicand wave propagation phenomena, http://www.llnl.gov/CASC/calendar/chan.html(1997).

[11] A. Gelb and E. Tadmor, Enhanced spectral viscosity approximations for conservation laws, Appl.Numer. Math. 33 (2000) 3–21.

[12] D. Gottlieb and J.S. Hesthaven, Spectral methods for hyperbolic problems, J. Comput. Appl. Math.128 (2001) 83–131.

[13] D. Gottlieb and C.W. Shu, On the Gibbs phenomenon and its resolution, SIAM Rev. 39 (1997) 644–668.

[14] B.N. Jiang, A least-squares finite element method for incompressible Navier–Stokes problems, Inter-nat. J. Numer. Methods Fluids 14(7) (1992) 843–859.

[15] B.N. Jiang, The Least-Squares Finite Element Method, Theory and Applications in ComputationalFluid Dynamics and Electromagnetics (Springer, Berlin, 1998).

[16] B.N. Jiang, On the least-squares method, Comput. Methods Appl. Mech. Engrg. 152 (1998) 239–257.[17] B.N. Jiang and C.L. Chang, Least-squares finite elements for the Stokes problem, Comput. Methods

Appl. Mech. Engrg. 78 (1990) 297–311.[18] B.N. Jiang, T.L. Lin and L.A. Povinelli, Large-scale computation of incompressible viscous flow by

least-squares finite element method, Comput. Methods Appl. Mech. Engrg. 114 (1994) 213–231.[19] B.N. Jiang and L.A. Povinelli, Least-squares finite element method for fluid dynamics, Comput. Meth-

ods Appl. Mech. Engrg. 81 (1990) 13–37.[20] G.E. Karniadakis and S.J. Spencer, Spectral/hp Element Methods for CFD (Oxford Univ. Press, Ox-

ford, 1999).[21] C.B. Laney, Computational Gasdynamics (Cambridge Univ. Press, Cambridge, 1998).[22] W.H. Lin, A least-squares spectral element method for sound propagation in acoustic ducts, J. Acoust.

Soc. Amer. 104 (1998) 3111–3114.[23] B. De Maerschalck, Space–time least-squares spectral element method for unsteady flows – applica-

tion and evaluation for linear and nonlinear hyperbolic scalar equations, http://www.hsa.lr.tudelft.nl/∼ marc/ST-LSQSEM.pdf (2003).

[24] J.C. Mason and D.C. Handscomb, Chebyshev Polynomials (Chapman and Hall/CRC, 2003).[25] M.M.J. Proot, The least-squares spectral element method – theory, implementation and application to

incompressible flows, Ph.D. thesis, TU Delft (2003).[26] M.M.J. Proot and M.I. Gerritsma, A least-squares spectral element formulation for the Stokes prob-

lem, J. Sci. Comput. 17 (2002) 285–296.[27] M.M.J. Proot and M.I. Gerritsma, Least-squares spectral elements applied to the Stokes problem,

J. Comput. Phys. 181 (2002) 454–477.