Chebyshev spectral methods for quasigeostrophic shallow ... · Chebyshev spectral methods for...
Transcript of Chebyshev spectral methods for quasigeostrophic shallow ... · Chebyshev spectral methods for...
Chebyshev spectral methods for quasigeostrophicshallow-water flow
Duncan Sutherland
School of Mathematics and Statistics University of Sydney
ANZIAM 2010
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 1 / 13
Motivation
Formation and maintenance of jetsI A jet is a high energy elongated
flow. Eg: Jetstreams on Earth
Potential vorticity (PV) staircasesI PV profiles of alternating steep
and gentle gradients. By theinvertibility principle, thiscorresponds to thin, high velocityeasterly jets and wide, lowvelocity westerly jets.
Investigation of stability of jetsover topography.
I Ocean (or atmospheric) currentsare often unstable and the role ofthe ocean floor topography is notfully understood.
−10 −5 0 5 10−5
−4
−3
−2
−1
0
1
2
3
4
5
Averaged potential vorticityS
patia
l dire
ctio
n−4 −2 0 2
−5
−4
−3
−2
−1
0
1
2
3
4
5
Average velocity
Spa
tial d
irect
ion
Top: http://cubanology.com/JetStream.jpg,found by Theo Vo.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 2 / 13
Motivation
Formation and maintenance of jetsI A jet is a high energy elongated
flow. Eg: Jetstreams on Earth
Potential vorticity (PV) staircasesI PV profiles of alternating steep
and gentle gradients. By theinvertibility principle, thiscorresponds to thin, high velocityeasterly jets and wide, lowvelocity westerly jets.
Investigation of stability of jetsover topography.
I Ocean (or atmospheric) currentsare often unstable and the role ofthe ocean floor topography is notfully understood.
−10 −5 0 5 10−5
−4
−3
−2
−1
0
1
2
3
4
5
Averaged potential vorticityS
patia
l dire
ctio
n−4 −2 0 2
−5
−4
−3
−2
−1
0
1
2
3
4
5
Average velocity
Spa
tial d
irect
ion
Top: http://cubanology.com/JetStream.jpg,found by Theo Vo.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 2 / 13
Motivation
Formation and maintenance of jetsI A jet is a high energy elongated
flow. Eg: Jetstreams on Earth
Potential vorticity (PV) staircasesI PV profiles of alternating steep
and gentle gradients. By theinvertibility principle, thiscorresponds to thin, high velocityeasterly jets and wide, lowvelocity westerly jets.
Investigation of stability of jetsover topography.
I Ocean (or atmospheric) currentsare often unstable and the role ofthe ocean floor topography is notfully understood.
−10 −5 0 5 10−5
−4
−3
−2
−1
0
1
2
3
4
5
Averaged potential vorticityS
patia
l dire
ctio
n−4 −2 0 2
−5
−4
−3
−2
−1
0
1
2
3
4
5
Average velocity
Spa
tial d
irect
ion
Top: http://cubanology.com/JetStream.jpg,found by Theo Vo.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 2 / 13
Quasigeostrophic flow in a channel
A channel geometry is a simple approximation to the motivating problems,in the case of a shallow atmosphere or considering ocean flow.Stream-function vorticity equations with added terms due to the rotatingframe, called the β-effect.
q = ∇2ψ − L−2D ψ + f0 + βy potential vorticity,
∇2ψ − L−2D ψ = −ω ω is the relative vorticity
∂ω
∂t= J(ψ, ω) + β
∂ψ
∂y, J(ψ, ω) =
∂ψ
∂x
∂ω
∂y− ∂ψ
∂y
∂ω
∂x(1)
ψ(x ,−1) = α1, ψ(x , 1) = α2
ψ(−L
2, y) = ψ(
L
2, y) ω(−L
2, y) = ω(
L
2, y)
LD is the Rossby deformation length, the length scale at which rotationaleffects are as significant as gravitational (or buoyancy effects).
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 3 / 13
Spatial Collocation and discretisation
The equations are Fourier transformed in streamwise x−direction using Mpoints, with wavenumbers k. Chebyshev collocation with N points is usedin the channel y−direction. This gives the following equations:
∂ω
∂t= J(ψ, ω) + β
∂ψ
∂y
∂ψ
∂y− (k2 − L−2
D )ψ = −ω (2)
ψ(x ,−1) = α1, ψ(x , 1) = α2
The hats denote Fourier transform. The nonlinear term is evaluated by thestandard pseudospectral technique. The derivatives are evaluated byFourier or Chebyshev transform and then the product is evaluated in thephysical domain. Timestepping is by Adams-Bashforth O(2) orRunge-Kutta methods O(4).
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 4 / 13
Chebyshev discretisation
This section examines the Poisson’s equation relating ψ and ω
∂2ψ
∂y2− (k2 − L−2
D )ψ = −ω upon transforming into the Chebyshev domain:
N∑n=0
a(2)n Tn −
N∑n=0
K 2anTn = −N∑
n=0
fnTn where: K 2 = k2 − L−2D (3)
N∑n=0
(−1)nan = α1,
N∑n=0
an = α2.
The an and fn are the Chebyshev-Fourier coefficients of ψ and ω
respectively. a(2)n is the Chebyshev-Fourier coefficient of the second
derivative.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 5 / 13
Fast Helmholtz solver
Using the recurrence relation between the Chebyshev polynomials it can beshown that the discretisation of Poisson’s equation gives aquasipentadiagonal matrix system:
cn−1a(p)n−1 = a
(p)n+1 + 2na
(p−1)n n ≥ 1, Recurrence relation
a(2)n + K 2an = −fn n = 1, · · · ,N − 1 from Poisson’s equation∑
n even
an =α1 + α2
2,
∑n odd
an =α2 − α1
2Simplifying BCs
K 2cn−2an−2
4n(n − 1)−(
1 +K 2en+2
2(n2 − 1)
)an +
K 2en+4an+2
4n(n + 1)
= − cn−2fn−2
4n(n − 1)+
en+2fn2(n2 − 1)
− en+4fn+2
4n(n + 1), (4)
where en =
0 n > 0
1 n = 0and cj =
2 j = 0,
1 j = 1, 2, · · ·.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 6 / 13
Fast Helmholtz solver
The matrix equation considered inthis section is:
γ0a0 + γ2a2 + · · ·+ γNaN = g0,
γ1a1 + γ3a3 + · · ·+ γN−1aN−1 = g1,
pnan−2 + qnan + rnan+2 = Fn
n = 2, · · · ,N − 2,
pNaN−2 + qNaN = FN ,
pN−1aN−3 + qN − 1aN−1 = FN−1.
In the case of Dirichlet conditions,γn = 1 ∀n, for Neumann conditionsγn = n2.
0 5 10 15
0
2
4
6
8
10
12
14
16
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 7 / 13
Thual algorithmTo solve this matrix equation efficiently a recursion relation algorithm dueto Thual is employed, see Peyret 2001.
Consider the pure tri-diagonal case using the Thomas algorithm. Thismethod is Gaussian elimination followed by back substitution. Aforward sweep eliminates one diagonal and a simplified backwardssubstitution method gives the solution. Because of the structure, theoperations count is linear.
This structure is similar, notice that the even indexed and oddindexed elements are independent.
Substituting a recurrence relation, with starting values from the rowswith only two variables allows a first sweep and eliminates onediagonal.
A second recurrence relation with starting values deduced from thetwo full rows allows a second sweep, giving the solution.
So that numerical errors do not propagate the matrix is required to bediagonally dominant.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 8 / 13
Hyperviscosity
Motivated by the doubly periodic case, the high modes are subject to aGaussian like filter approximating viscous diffusion. This is done forstability reasons.
ωn = ωn exp(−ν(k2 + l2)pδt)
kij =2πi
Mi = 0, · · · ,N − 1 ∀j ,
lij =πij
Ni = 0, · · · ,N − 1 j = 0, · · · ,M − 1 0
20
40
60
800
20
40
60
80
0
0.5
1
Chebyshev wavenumberFourier wavenumber
Am
plitu
de o
f filt
er
The tilde denote Fourier-Chebyshev coefficient. p is the hyperviscouspower, typically 2. ν is the hyperviscous coefficient.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 9 / 13
Test case: Rossby waveA Rossby wave satisfying the boundary conditions is an exact solution ofthe problem.
ω = sin(kπx − σt) sin(lπy), σ =−kβ
π(k2 + l2)− L−2D
wavespeed
Time integration over one period of the Rossby wave on a 64× 64 pointsquare grid,the looping is artificial. Black line is exact solution. The errorover several periods is approximately 6× 10−8.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 10 / 13
Test case: Modon
A modon is an exact solution in the infinte domain, which have interestingbehaviour in collisions.
Head on collision between two modons, one half the amplitude of theother. Note that this interaction is similar to soliton behaviour. A squaregrid of 128 points was used.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 11 / 13
Limitations and extensions
The Chebyshev code is diffusive. There is a high resolution near theboundary but less resolution in the middle of the channel. Comparedto contour dynamics methods, where contour values rather than gridvalues are evolved, a gridded scheme will poorly resolve filamentarybehaviour.
The hyperviscous filtering isn’t rigorously justified.
This is a single geometry, extension to irregular domains is difficult.
Extension to viscous problemI Stability problems. Typically the solution is influence matrix
techniques, using O(2) linear multistep methods in timeI Would be nice to have O(4) single step schemesI Hybrid contour advection method
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 12 / 13
References and Acknowledgements
Pedlosky, J. (1986) Geophysical fluid dynamics, 2nd ed.Springer-Verlag New York
Peyret, R. (2001) Spectral methods for incompressible viscous flows.Springer-Verlag New York.
Gottlieb, D. and Orszag, S. A. (1977) Numerical analysis of spectralmethods SIAM Philadelphia
Dang-Vu,H. (1993), J. Comp. Phys. V104, pp211-220.
Canuto, C, Hussaini, M, Quarteroni, A, Zang, T.A,(1988) Spectralmethods in fluid dynamics, Springer-Verlag New York.
Thual, O. (1986) PhD Thesis.
Trefethen, L.N, (2000) Spectral methods in Matlab. SIAMPhiladelphia.
Thanks to my supervisor A/Prof Charlie Macaskill, and also to Theo Vo.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 13 / 13
Questions
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 14 / 13
Appendix slides
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 13 / 13
The β-plane
The Coriolis parameterf = 2Ω sin(ϕ) is the localcomponent of the Earth’s rotation,for a particular latitude, ϕ.
A simple approximation to f is toignore latitudinal variation, givesf = 2Ω sin(ϕ0), this is called thef−plane approximation.
The β-plane approximation is toTaylor expand f around some y0
and keep the linear termf = f0 + β(y − y0)
Modified from http://mitgcm.org/public/pelican/online documents/img194.png
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 13 / 13
Chebyshev collocation
Chebyshev polynomials Tn = cos(n cos−1(x)) are used to satisfy theboundary conditions
Runge phenomenon is minimised by selecting the collocation points asx = cos( jπ
N−1 ) for j = 0, · · ·N − 1
FFT can be used to transform back and forth between physical spaceand Chebyshev coefficient space
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 13 / 13
Matrix equation solution
This may be solved in O(N) operations by using the following recurrencerelations:
an+2 = Xnan + Yn n = 0, · · · ,N − 2 (5)
Xn−2 =−pn
qn + rnXn; Yn−2 =
fn − rnYn
qn + rnXn
XN−2 = −pN
qN,
YN−2 =fNqN,
XN−3 = −pN−1
qN−1,
YN−3 =fN−1
qN−1.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 13 / 13
Matrix equation solution
Now write:
an = θnal + λn n = 1, · · · ,N l =
0 n even
1 n odd. (6)
Notice that if n = 0, 1 then θl = 1 and λl = 0. Substituting equation (6)into equation (4) yields:
θn+2 = Xnθn; λn+2 = Xnλn + Yn (7)
a0 =g0 −
∑Nn=0
n evenγnλn∑N
n=0 γnθn, a1 =
g1 −∑N
n=0n odd
γnλn∑Nn=0 γnθn
. (8)
For numerical errors not to propagate, the matrix is required to bediagonally dominant (such as this case).
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 13 / 13
Details of simulations
Inital condtions: Two modons.Adams-Bashforth timesteppingPlots every 100 timestepsGrid size 128 squareLength of channel 2Timestep constant 0.01Number of timesteps 10400β = 1Fr = 0.4p = 4‘Width’ of modon 0.3 units.ν = 1.7× 10−18
Homogenous BCs.
Inital condition: Rossby wave.Runge-Kutta timesteppingPlots every:100Grid size: 64Length of channel: 2Timestep constant: 0.01Number of timesteps 2500β = 10Fr = 0.01No hyperviscous filtering.Homogenous BCs.
Duncan Sutherland (Usyd) Chebyshev Methods ANZIAM 2010 13 / 13