Advection Through Irregular Grids - University of …dfg/dsloan.pdf · Advection Through Irregular...

71
0.5 setgray0 0.5 setgray1 Advection Through Irregular Grids David F Griffiths & Mohammed Babatin with thanks to Phil Gresho [email protected] Mathematics Division David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 1/28

Transcript of Advection Through Irregular Grids - University of …dfg/dsloan.pdf · Advection Through Irregular...

0.5

setgra

y0

0.5

setgra

y1

0.5

setgra

y.9

50.5

setgra

y.2

5

Advection Through Irregular Grids

David F Griffiths

&

Mohammed Babatin

with thanks to Phil Gresho

[email protected]

Mathematics Division

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 1/28

Outline

• Regular grids, dispersion & Group velocity.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 2/28

Outline

• Regular grids, dispersion & Group velocity.

• Smoothly varying gridsMapped grids: xj = G(j/N), (G ∈ C ∩ PD)Kreiss & Oliger (73), Giles & Thompkins (83, 85), Vichnevetsky (87, 89).Lighthill (78), Whitham (74)

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 2/28

Outline

• Regular grids, dispersion & Group velocity.

• Smoothly varying gridsMapped grids: xj = G(j/N), (G ∈ C ∩ PD)Kreiss & Oliger (73), Giles & Thompkins (83, 85), Vichnevetsky (87, 89).Lighthill (78), Whitham (74)

• Sensitivity to grid perturbations, Gresho & Sani (98).1D analogue of unstructured grids.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 2/28

The Problem

The PDE:

ut + ux = 0, 0 < x ≤ 1, t > 0

with periodic BCs.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 3/28

The Problem

The PDE:

ut + ux = 0, 0 < x ≤ 1, t > 0

with periodic BCs.

The Methods:Finite Difference/ Finite element discretizations in space such that theylead to systems of ODEs

Mu + Au = 0,

where:M is symmetric p.d.A is skew–symmetric.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 3/28

The Problem

The PDE:

ut + ux = 0, 0 < x ≤ 1, t > 0

with periodic BCs.

The Methods:Finite Difference/ Finite element discretizations in space such that theylead to systems of ODEs

Mu + Au = 0,

where:M is symmetric p.d.A is skew–symmetric.

We then have the energy conservation:

d

dxu

T Mu = 0.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 3/28

The Simplest Method

We use a grid of N points:

0 = x0 ≤ x1 ≤ · · · ≤ xN = 1

and define the grid sizes: hj = xj − xj−1.

FDM

(xj+1 − xj−1)uj + uj+1 − uj−1 = 0,

j = 0 : N with periodic BCs.

• 2nd order FD approximation to G′(s)ut + us = 0, i.e. ut + ux = 0 with x = G(s).

• Lumped linear FEM.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 4/28

Trick 1

On a uniform grid of size h:

ut + ux = 0 ⇒ 2huj + uj+1 − uj−1 = 0

Define : vj(t) = (−1)juj(t)

vt − vx = 0 ⇐ 2hvj − (vj+1 − vj−1) = 0

Hence, vj approximates the pde with phase speed −1. The pde is a 1–way waveequation but the method allows waves in both directions.We can perform a similar trick with most methods—we have to identify the eigenvectorcorresponding to stationary solutions (Mathai, 95).

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 5/28

Trick 1

On a uniform grid of size h:

ut + ux = 0 ⇒ 2huj + uj+1 − uj−1 = 0

Define : vj(t) = (−1)juj(t)

vt − vx = 0 ⇐ 2hvj − (vj+1 − vj−1) = 0

Hence, vj approximates the pde with phase speed −1. The pde is a 1–way waveequation but the method allows waves in both directions.

0.20.4

0.60.8

1

0

0.2

0.4

−0.50

0.51

Solution u

0.20.4

0.60.8

1

0

0.2

0.4

−0.50

0.51

Solution v

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 5/28

Uniform Grid: Modified equation

The FDM 2huj + uj+1 − uj−1 = 0 is a 4th order approximation of

ut + ux +1

6h2uxxx = 0.

This has fundamental solutions given by Airy functions (Hedstrom (75))

Ai(x) =1

−∞

exp i(kx −1

3k3)dk.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 6/28

Uniform Grid: Modified equation

When u(x, 0) is a δ–function at x = x0,

u(x, t) =

2

h2t

� 1/3

Ai

2

h2t

� 1/3

(x − t − x0)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1−40

−20

0

20

40Modified equation: Airy function and its image

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1−40

−20

0

20

40Numerical solution at t = 0.4

uj for x > 1/2, (−1)juj for x < 1/2.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 6/28

Uniform Grid: Modified equation

When w(x, t) =

xu(x, t)dt (IC is a step function), wj(t) = h

�Ji=j ui(t):

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.5

1

1.5Modified equation: step response

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.5

1

1.5Numerical solution at t = 0.4

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 6/28

The Dispersion Relation

On a uniform grid (h), this method has fundamental solutions of the form

uj(t) = eiΘj(t), Phase Function : Θj(t) = 2πkxj − ωt,

where ω (the frequency) is related to k (the wavenumber)by the dispersion relation

ω =sin 2πkh

h, |k| ≤ N/2

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 7/28

The Dispersion Relation

On a uniform grid (h), this method has fundamental solutions of the form

uj(t) = eiΘj(t), Phase Function : Θj(t) = 2πkxj − ωt,

where ω (the frequency) is related to k (the wavenumber)by the dispersion relation

ω =sin 2πkh

h, |k| ≤ N/2

Note that ω is a solution of the eigenvalue problem (Mu + Au = 0)

ωMv = (−iA)v

(iA is Hermitian, so ω is real).

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 7/28

The Dispersion Relation

On a uniform grid (h), this method has fundamental solutions of the form

uj(t) = eiΘj(t), Phase Function : Θj(t) = 2πkxj − ωt,

where ω (the frequency) is related to k (the wavenumber)by the dispersion relation

ω =sin 2πkh

h, |k| ≤ N/2

Note that ω is a solution of the eigenvalue problem (Mu + Au = 0)

ωMv = (−iA)v

(iA is Hermitian, so ω is real).

The pde has corresponding solutions u(xj , t) = ei(2πkxj−ωt) when

ω = 2πk

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 7/28

Dispersion Relations: Examples

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

k h

ω h k = N/4

k = N/3Lumped linear FElinear FE

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 8/28

Dispersion Relations: Examples

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

k h

ω h k = N/4

k = N/3Lumped linear FElinear FE

0 0.5 1 1.5 2 2.5 30

0.5

1

1.5

2

2.5

3

k h

ω h

FD methods of orders 2, 4, ..., 10, 20, 40

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 8/28

Dispersion Relations: Examples

0 0.5 1 1.5 2 2.5 30

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

k h

ω h k = N/4

k = N/3Lumped linear FElinear FE

0 0.5 1 1.5 2 2.5 30

0.5

1

1.5

2

2.5

3

k h

ω h

FD methods of orders 2, 4, ..., 10, 20, 40

0 2 4 6−5

0

5

k h

ω h

0 1 2 3 4 5 60

1

2

3

4

5Quadratic FEM

0 1 2 3−10

−5

0

5

10

k h

ω h

0 2 4 6 80

2

4

6

8

10Cubic FEM

For FEM of degree n, the dispersion relation is pn = 0, where (Mathai (95))

p1(r) = (2 + cos θ)r − 3 sin θ, θ = 2πkh

p2(r) = (3 − cos θ)r2 + 8 sin θ − 20(1 − cos θ),

p3(r) = (4 + cos θ)r3 − 15 sin θr2 − 30(4 + 3 cos θ)r + 210 sin θ,

As n → ∞, FDM −→ pseudo–spectral method (Fornberg (87))

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 8/28

Wavepackets

A wavepacket is defined by

u(x, t) = A(x, t)eiΘ(x,t),

where A is a slowly varying function of x and t, and

• Θ(x, t) = 2πkx − ωt, for constant coefficients / uniform grid,

• ∂tΘ = −ω and ∂xΘ = 2πk for varying coefficients / irregular grid

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 9/28

Wavepackets

A wavepacket is defined by

u(x, t) = A(x, t)eiΘ(x,t),

where A is a slowly varying function of x and t, and

• Θ(x, t) = 2πkx − ωt, for constant coefficients / uniform grid,

• ∂tΘ = −ω and ∂xΘ = 2πk for varying coefficients / irregular grid

0 0.2 0.4 0.6 0.8 1−1

−0.5

0

0.5

1Wavepacket, k = 15

20 40 60 80 1000

5

10

15|FFT|, N = 100 grid points

The IC is a wavepacket, its FFT is localized to a few wavenumbers, so the solution isconfined to a low dimensional subspace spanned by the corresponding eigenvectors.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 9/28

Wavepacket Analysis

With grid mapping: xj = G(sj), sj = jh, we substitute

uj(t) = Aj(t)eiΘj (t),

into the FDM and use

∂tΘ = −ω, ∂sΘ = 2πk.

The leading term in the result gives

ω =2 sin(Θj+1 − Θj−1)/2

hj+1 + hj=

2 sin 2πhkj

hj+1 + hj,

where kj is the mean wavenumber on (sj−1, sj+1).k varies to compensate for variation in h so that ω is constant.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 10/28

Wavepacket Analysis II

First term:

ω =2 sin 2πhk(sj)

hj+1 + hj.

The second asymptotic term in the wavepacket analysis leads to

At + cgAx = 0,

cg = cos 2πhk(x) =1

∂ω

∂k(x)

is the Group velocity.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 11/28

Wavepacket Analysis II

First term:

ω =2 sin 2πhk(sj)

hj+1 + hj.

The second asymptotic term in the wavepacket analysis leads to

At + cgAx = 0,

cg = cos 2πhk(x) =1

∂ω

∂k(x)

is the Group velocity.ExampleWe take a wavepacket with N = 200, k = 28 and superimpose on thenumerical solutions the curves defined by

x = cos 2πhk(x)

with starting wavenumbers 23,28, 33 and starting values x(0) chosen to 10, 0,−10 gridpoints from the packet centre, respectively.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 11/28

Numerical Results: linearly varying grid

0.10.2

0.30.4

0.50.6

0.70.8

0.91

0

0.2

0.4

0.6

0.8

1

−0.5

0

0.5

N = 200, k = 28: linearly increasing grid

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

xt

ContoursPredicted paths

Right figure shows contours of |A|.The analysis predicts the location and spread of the wavepacket but accuracy falls off ast increases.As the packet moves to the right, hj increases ⇒ kj must increase to keep ω constant.

However, the group velocity → 0 as kjhj → 14

(the peak of the dispersion relation),i.e., it predicts that the packet comes to rest (where it remains).We need a more sophisticated approach - our model only allows “one–way” waves.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 12/28

Staggered Grid Approach

We saw earlier that (−1)juj(t) is a solution whenever uj(t) is a solution. This suggeststhat we relabel the grid variables in an odd–even pattern

u0, v1, u2, . . . , u2j , v2j+1, . . .

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 13/28

Staggered Grid Approach

We saw earlier that (−1)juj(t) is a solution whenever uj(t) is a solution. This suggeststhat we relabel the grid variables in an odd–even pattern

u0, v1, u2, . . . , u2j , v2j+1, . . .

We the suppose that

u2j(t) = A2j(t) exp(iΘ2j(t))

v2j+1(t) = B2j+1(t) exp(iΘ2j+1(t)).

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 13/28

Staggered Grid Approach

We saw earlier that (−1)juj(t) is a solution whenever uj(t) is a solution. This suggeststhat we relabel the grid variables in an odd–even pattern

u0, v1, u2, . . . , u2j , v2j+1, . . .

We the suppose that

u2j(t) = A2j(t) exp(iΘ2j(t))

v2j+1(t) = B2j+1(t) exp(iΘ2j+1(t)).

These lead to the same dispersion relation as before together with the PDEs

At + cos 2πhk(x)Bx = 0

Bt + cos 2πhk(x)Ax = 0

A + B is constant along x = cos 2πhk(x)

A − B is constant along x = − cos 2πhk(x)

(h = 1/N ). We solve these with the BC v(x∗) = 0 where x∗ is where k(x∗) = N/4.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 13/28

Piecewise constant grid example

t = 0

Coarse

A−B = constantFine

A+B = constant

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 14/28

Piecewise constant grid example

0.10.2

0.30.4

0.50.6

0.70.8

0.91

0

0.2

0.4

0.6

0.8

−0.50

0.5

N = 200, k = 28

0 20 40 60 80 100 120 140 160 180 2000

0.005

0.01

Grid sizes

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 14/28

Piecewise constant grid: Analysis

Grid: hj =h j ≤ M

H M < jh = 1/n, H = 1/N .

The corresponding eigenvalue problem gives

j < M : 2ihωuj + uj−1 − uj−1 = 0,⇒ ω =sin 2πkh

h

j > M : 2iHωuj + uj−1 − uj−1 = 0,⇒ ω =sin 2πKH

H

Given k, we can only solve for K when |ωH| < 1.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 15/28

Piecewise constant grid: Analysis

Grid: hj =h j ≤ M

H M < jh = 1/n, H = 1/N .

The corresponding eigenvalue problem gives

j < M : 2ihωuj + uj−1 − uj−1 = 0,⇒ ω =sin 2πkh

h

j > M : 2iHωuj + uj−1 − uj−1 = 0,⇒ ω =sin 2πKH

H

Given k, we can only solve for K when |ωH| < 1.

N/2 n/2

N

n

|ω H|>1

|ω H|<1

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 15/28

Low Frequencies

200 grid points, h = 1/n, H = 1/N , N = 125, n = 250.

uj =exp(2πikh) j < M

exp(2πiKH) j > M

N/2 n/2

N

n

|ω H|>1

|ω H|<1

−1

−0.5

0

0.5

181=31.2345

−1

−0.5

0

0.5

123=108.5047

0 20 40 60 80 100 120 140 160 180 2000

0.005

0.01

Grid sizes

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 16/28

High Frequencies, Evanescent Modes

h = 1/n, H = 1/N , N < ω < n

uj =exp(2πikh) j < M

ijr±j j > M

r = ωH +

ω2H2 − 1, (r > H/h)

The support of each eigenvector is essentially confined to the fine grid.Thus, a wavepacket initiated on the fine grid and carrying a sufficiently highwavenumber, will be confined to the grid for all time.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 17/28

High Frequencies, Evanescent Modes

h = 1/n, H = 1/N , N < ω < n

uj =exp(2πikh) j < M

ijr±j j > M

r = ωH +

ω2H2 − 1, (r > H/h)

The support of each eigenvector is essentially confined to the fine grid.Thus, a wavepacket initiated on the fine grid and carrying a sufficiently highwavenumber, will be confined to the grid for all time.

N/2 n/2

N

n

|ω H|>1

|ω H|<1

−1

−0.5

0

0.5

3=249.784

N = 125, n = 250

0 20 40 60 80 100 120 140 160 180 2000

0.005

0.01

Grid sizes

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 17/28

High Frequencies, Evanescent Modes

h = 1/n, H = 1/N , N < ω < n

uj =exp(2πikh) j < M

ijr±j j > M

r = ωH +

ω2H2 − 1, (r > H/h)

The support of each eigenvector is essentially confined to the fine grid.Thus, a wavepacket initiated on the fine grid and carrying a sufficiently highwavenumber, will be confined to the grid for all time.

N/2 n/2

N

n

|ω H|>1

|ω H|<1

−1

−0.5

0

0.5

77=172.7069

N = 125, n = 250

0 20 40 60 80 100 120 140 160 180 2000

0.005

0.01

Grid sizes

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 17/28

Partial Reflection/Transmission

With a wavepacket, those frequencies above cutoff will be reflected, while those belowwill be transmitted:

0 20 40 60 80 100 120 1400

50

100

150

200

250

cuto

ff

Dispersion relations

0.10.2

0.30.4

0.50.6

0.70.8

0.91

0

0.2

0.4

0.6

0.8

−0.50

0.5

N = 200, k = 28

0 20 40 60 80 100 120 140 160 180 2000

0.005

0.01

Grid sizes

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 18/28

Gradual Transition

h ≤ hj ≤ H, linear variation.

= 1/N

Trick 2: A similarity transformation with the diagonal matrix diag(1, i,−1,−i, 1, . . . )

converts the Hermitian matrix iA to a symmetric matrix:

iD

��

��

0 1 0 −1

−1 0 1 0

0 −1 0 1

1 0 −1 0

��

��

DH =

��

��

0 1 0 1

1 0 1 0

0 1 0 1

1 0 1 0

��

��

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 19/28

Gradual Transition

h ≤ hj ≤ H, linear variation.

= 1/N

Trick 2: Define uj(t) = e−iωtijvj(t) so that (hj + hj+1)uj + uj−1 − uj−1 = 0

becomes

2ω(hj + hj+1)vj = vj+1 + vj−1

which is a 2nd order FD approximation of

v′′(s) =a(s − s0)

a = 4(H − h)ω/

�2, s0 =(1 − ωh)/

H′ω, H(s) = Nh(s)

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 19/28

Gradual Transition

h ≤ hj ≤ H, linear variation.

= 1/N

Trick 2: This has solution v(s) = Ai(a1/3(s − s0)),where Ai(·) is the Airy function(y′′ = xy).

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 19/28

Gradual Transition

h ≤ hj ≤ H, linear variation.

= 1/N

Trick 2: This has solution v(s) = Ai(a1/3(s − s0)),where Ai(·) is the Airy function(y′′ = xy).

0 20 40 60 80 100 120 140 160 180 2000

5

Grid size hj−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

Eigenvector V19

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 19/28

Gradual Transition

h ≤ hj ≤ H, linear variation.

= 1/N

Trick 2: This has solution v(s) = Ai(a1/3(s − s0)),where Ai(·) is the Airy function(y′′ = xy).The eigenvector penetrates further into the coarse grid as ω decreases:

0 20 40 60 80 100 120 140 160 180 2000

5

Grid size hj

−1

−0.5

0

V1

−1

0

1 V19

−1

0

1 V61

−1

0

1 V121

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 19/28

Grid Sensitivity

We now turn our attention to the sensitivity of solutions to perturbations in the grid:

xj = jh + εhgj , j = 0 : N

with g0 = gN = 0, ε < 1/2 and |gj | < 1. The perturbations gj may come from amapping : gj = g(jh), or they might be “random” numbers from [−1, 1].The approximation of ut + ux = 0 then leads to the eigenvalue problem

ωM(ε)v = A(ε)v

where,M is symmetric p.d.A is Hermitian (we have replaced −iA by A).

We assume that

M(ε) = M + εM + . . . , A(ε) = A + εA + . . . ,

Henceforth, M , A, etc will denote M(0), A(0), resp.In FEM, M is linear in ε and A is independent of ε.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 20/28

Examples: Lumped LFEM

N = 80, t = 20. Both examples below use two grids, a uniform grid and the sameperturbed grid.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 21/28

Examples: Lumped LFEM

N = 80, t = 20. Both examples below use two grids, a uniform grid and the sameperturbed grid. In the first, the grid perturbation has no effect

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1−1.5

−1

−0.5

0

0.5

1

1.5u

0(t)

ueps

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 21/28

Examples: Lumped LFEM

N = 80, t = 20. Both examples below use two grids, a uniform grid and the sameperturbed grid.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1−1.5

−1

−0.5

0

0.5

1

1.5

u0(t)

ueps

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 21/28

Perturbation I

Define the matrices

Λ(ε) = diag(ω1, . . . , ωN ), X(ε) = [v1, . . . , vN ],

containing the eigenvalues & eigenvectors so

XH (ε)A(ε)X(ε) = Λ(ε)

and we suppose that the eigenvectors are normalized so that

XH(ε)M(ε)X(ε) = I.

We develop series

Λ(ε) = Λ + εΛ + · · ·

X(ε) = X(I + εR + · · · )

We write

M = XHMX, etc.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 22/28

Perturbation II

We find

λj =

Ajj −

Mjjλj

Rjk =λk

Mjk −

Ajk

λj − λk, λj 6= λk

The solution of the system Mu + Au = 0 is then

u(t; ε) = u(t; 0) + εX(−e−iΛtΛt + Re−iΛt + e−iΛtRH)u(0) + O(ε2)

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 23/28

Perturbation II

We find

λj =

Ajj −

Mjjλj

Rjk =λk

Mjk −

Ajk

λj − λk, λj 6= λk

The solution of the system Mu + Au = 0 is then

u(t; ε) = u(t; 0) + εX(−e−iΛtΛt + Re−iΛt + e−iΛtRH)u(0) + O(ε2)

• We will generally get the largest perturbations when λj 6= 0,

• Difficulty defining Rjk when there are multiple eigenvalues. Suppose that the

corresponding eigenspace is spanned by a subset X of columns of X. We have

to choose the basis in such a way that the diagonal of X(

MΛ −

A)X is zero.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 23/28

Unimodal Perturbations

We now suppose that the grid perturbations are generated by a Fourier mode ofwavenumber r:

gj = sin 2πrj/N.

This means that we can evaluate the terms

M and

A: in the following, we will always

have A = 0.Linear FEM

We find

M = 0 and so Λ(ε) = Λ + O(e2).

The critical terms in perturbing the solutions are due to R: this has nonzero terms only inthe two diagonals distance ±r from the main diagonal (akin to the sidebands of Sloan &

Mitchell (86) in nonlinear instability): X(ε) = X(I + εR + . . . )

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 24/28

Unimodal Perturbations

We now suppose that the grid perturbations are generated by a Fourier mode ofwavenumber r:

gj = sin 2πrj/N.

This means that we can evaluate the terms

M and

A: in the following, we will always

have A = 0.Linear FEM

We find

M = 0 and so Λ(ε) = Λ + O(e2).

The critical terms in perturbing the solutions are due to R: this has nonzero terms only inthe two diagonals distance ±r from the main diagonal (akin to the sidebands of Sloan &

Mitchell (86) in nonlinear instability): X(ε) = X(I + εR + . . . )

0 0 ∗ 0 0 0

0 0 0 ∗ 0 0

∗ 0 0 0 ∗ 0

0 ∗ 0 0 0 ∗

0 0 ∗ 0 0 0

0 0 0 ∗ 0 0

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 24/28

Application: Linear FEM

To apply these results,

• for each grid mode r ∈ [1, N/2] we compute the two largest elements of |R|

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 25/28

Application: Linear FEM

To apply these results,

• for each grid mode r ∈ [1, N/2] we compute the two largest elements of |R|

• the locations of these maxima will specify which modes (columns of X) in theinitial data are affected. The magnitudes depend on the separation ofeigenvalues:

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 25/28

Application: Linear FEM

To apply these results,

• for each grid mode r ∈ [1, N/2] we compute the two largest elements of |R|

• the locations of these maxima will specify which modes (columns of X) in theinitial data are affected. The magnitudes depend on the separation ofeigenvalues:

Linear FEM j

ω

3.5 N

− 3.5 N

N/2 N

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 25/28

Application: Linear FEM

To apply these results,

• for each grid mode r ∈ [1, N/2] we compute the two largest elements of |R|

• the locations of these maxima will specify which modes (columns of X) in theinitial data are affected. The magnitudes depend on the separation ofeigenvalues:

0 5 10 15 20 25 30 35 400

10

20

30

40

5 10 15 20 25 30 350

50

100

150

200

max(max(|ℜ (R)|))

r

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 25/28

Application: Linear FEM

To apply these results,

• for each grid mode r ∈ [1, N/2] we compute the two largest elements of |R|

• the locations of these maxima will specify which modes (columns of X) in theinitial data are affected. The magnitudes depend on the separation ofeigenvalues:

0 5 10 15 20 25 30 35 400

10

20

30

40

5 10 15 20 25 30 350

50

100

150

200

max(max(|ℜ (R)|))

r

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

0

0.2

0.4

0.6

0.8

1

U

x

N=80, LFEM

u0=F

1u

0(t)

ueps

−0.01

0

0.01Term 1

−0.05

0

0.05

Term 2 + Term 3

10 20 30 40 50 60 70 80−5

0

5

j

FF

T(g

)

Fourier transform of random grid

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 25/28

Application: Linear FEM

To apply these results,

• for each grid mode r ∈ [1, N/2] we compute the two largest elements of |R|

• the locations of these maxima will specify which modes (columns of X) in theinitial data are affected. The magnitudes depend on the separation ofeigenvalues:

0 5 10 15 20 25 30 35 400

10

20

30

40

5 10 15 20 25 30 350

50

100

150

200

max(max(|ℜ (R)|))

r

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.2

0.4

0.6

0.8

1

U

Random grid modified by removing offending mode 36

x

u0=F

1u

0(t)

ueps

−2

0

2

x 10−3 Term 1

−5

0

5

x 10−3 Term 2 + Term 3

10 20 30 40 50 60 70 80−5

0

5

j

FF

T(g

)

Fourier transform of random grid

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 25/28

Application: Linear FEM

To apply these results,

• for each grid mode r ∈ [1, N/2] we compute the two largest elements of |R|

• the locations of these maxima will specify which modes (columns of X) in theinitial data are affected. The magnitudes depend on the separation ofeigenvalues:

0 5 10 15 20 25 30 35 400

10

20

30

40

5 10 15 20 25 30 350

50

100

150

200

max(max(|ℜ (R)|))

r We conclude that the linear FEM isprone to wiggles when the grid has particular high frequency components

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 25/28

Lumped Linear FEM

This is more complicated since the results depend on the parity of N

• N odd: simple eigenvalues

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 26/28

Lumped Linear FEM

This is more complicated since the results depend on the parity of N

• N odd: simple eigenvalues

• N a multiple of 4: λN/4 and λ3N/4 are simple, the remainder double.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 26/28

Lumped Linear FEM

This is more complicated since the results depend on the parity of N

• N odd: simple eigenvalues

• N a multiple of 4: λN/4 and λ3N/4 are simple, the remainder double.

• N not a multiple of 4: all eigenvalues double.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 26/28

Lumped Linear FEM

This is more complicated since the results depend on the parity of N

• N odd: simple eigenvalues

• N a multiple of 4: λN/4 and λ3N/4 are simple, the remainder double.

• N not a multiple of 4: all eigenvalues double.

0 5 10 15 20 25 30 35 400

10

20

30

40N = 79, FDM

k

5 10 15 20 25 30 350

10

20

30

40

50

max(max(|ℜ (R)|))

rDavid F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 26/28

Lumped Linear FEM

This is more complicated since the results depend on the parity of N

• N odd: simple eigenvalues

• N a multiple of 4: λN/4 and λ3N/4 are simple, the remainder double.

• N not a multiple of 4: all eigenvalues double.

5 10 15 20 25 30 35

5

10

15

20

25

30

35

40N = 80, FDM

k

5 10 15 20 25 30 350

10

20

30

40max(max(|ℜ (R)|))

rDavid F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 26/28

Lumped Linear FEM

This is more complicated since the results depend on the parity of N

• N odd: simple eigenvalues

• N a multiple of 4: λN/4 and λ3N/4 are simple, the remainder double.

• N not a multiple of 4: all eigenvalues double.

−1.5

−1

−0.5

0

0.5

1

1.5DFM, N = 80, t=20, r = 36, ε = 2−6.6

U

u0(t)

ueps

−0.5

0

0.5

Term 1

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1−4−2

024

x 10−3 Term 2 + Term 3

x

10 20 30 40 50 60 70 800

2

4

6

j

FF

T(u

0)

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 26/28

Quadratic FEM

5

10

15

20

25

30

35

40N = 79, QFEM (consistent mass)

k

5 10 15 20 25 30 350

50

100

150

max(max(|ℜ (R)|))

r

This shows that wiggles will only be stimulated if the initial data is sufficiently rich inwavenumbers > 14 and there are high frequency components in the grid perturbation.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 27/28

Quadratic FEM

5 10 15 20 25 30 35

5

10

15

20

25

30

35

40N = 80, QFEM (lumped mass)

k

5 10 15 20 25 30 350

100

200

300

400

500

600max(max(|ℜ (R)|))

r

For Lumped Quadratic FEMs, the situation is not quite so favourable. The wavenumbersinvolved from the IC are lower.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 27/28

Summary

• Fourier Analysis and the ideas of dispersion and group velocity can begeneralized to smoothly varying grids via wavepackets.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 28/28

Summary

• Fourier Analysis and the ideas of dispersion and group velocity can begeneralized to smoothly varying grids via wavepackets.

• Waves can get trapped in regions of high grid refinement unless they can beresolved by the coarse grids. This applies also to advection–diffusion with smalldiffusion (Shishkin grids) (G, Gresho & Silvester, 04).

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 28/28

Summary

• Fourier Analysis and the ideas of dispersion and group velocity can begeneralized to smoothly varying grids via wavepackets.

• Waves can get trapped in regions of high grid refinement unless they can beresolved by the coarse grids. This applies also to advection–diffusion with smalldiffusion (Shishkin grids) (G, Gresho & Silvester, 04).

• Methods that have multiple eigenvalues on uniform grids are particularly sensitiveto grid perturbations.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 28/28

Summary

• Fourier Analysis and the ideas of dispersion and group velocity can begeneralized to smoothly varying grids via wavepackets.

• Waves can get trapped in regions of high grid refinement unless they can beresolved by the coarse grids. This applies also to advection–diffusion with smalldiffusion (Shishkin grids) (G, Gresho & Silvester, 04).

• Methods that have multiple eigenvalues on uniform grids are particularly sensitiveto grid perturbations.

• Quadratic FEMs appear not to be sensitive to perturbations.

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 28/28

Summary

• Fourier Analysis and the ideas of dispersion and group velocity can begeneralized to smoothly varying grids via wavepackets.

• Waves can get trapped in regions of high grid refinement unless they can beresolved by the coarse grids. This applies also to advection–diffusion with smalldiffusion (Shishkin grids) (G, Gresho & Silvester, 04).

• Methods that have multiple eigenvalues on uniform grids are particularly sensitiveto grid perturbations.

• Quadratic FEMs appear not to be sensitive to perturbations.

• Thank you for yourattention!

David F Griffiths, Dundee University http://www.maths.dundee.ac.uk/dfg – p. 28/28