You are on page 1of 20

COMPUTATIONAL MECHANICS

New Trends and Applications


S. Idelsohn, E. O nate and E. Dvorkin (Eds.)
c CIMNE, Barcelona, Spain 1998
A SPECTRAL ELEMENT SEMI-LAGRANGIAN METHOD
FOR THE SHALLOW WATER EQUATIONS ON
UNSTRUCTURED GRIDS
Francis X. Giraldo
Naval Research Laboratory
Monterey, CA 93943 USA
e-mail: giraldo@nrlmry.navy.mil, web page: http://www.nrlmry.navy.mil/giraldo
Key Words: Semi-Lagrangian Method, Shallow Water equations, Spectral Element
Method, Unstructured Grid
Abstract. The purpose of this paper is twofold: to give a brief yet comprehensive descrip-
tion of the spectral element and semi-Lagrangian methods, and to introduce a new method
arrived at by fusing both of these impressive methods. The practical aspects of both meth-
ods are described in detail by their implementation on the 2D shallow water equations.
These equations have been used customarily to develop new numerical methods for weather
prediction models because they exhibit the same wave behavior as the more complex 3D
atmosphere and ocean equations. The spectral element method is essentially a higher or-
der nite element method that exhibits spectral convergence provided that the solution is
a smooth function. The semi-Lagrangian method traces the characteristic curves of the
solution and, consequently, is very well suited for resolving the non-linearities introduced
by the advection operator of the uid dynamics equations. By using the basis functions
of the spectral element method as the interpolation functions for the semi-Lagrangian
method, one can create a truly local method that can be used in conjunction with un-
structured/adaptive grid generation and can be ported quite naturally to parallel computer
architectures. Results for the fully non-linear 2D shallow water equations are presented
thus showing the benets of this new scheme.
1
Francis X. Giraldo
1 INTRODUCTION
The spectral element method combines the benets extracted from both the spectral
method and the nite element method. The spectral element method can be described
as a method that can automatically generate any order polynomial basis function, as in
the spectral method, while allowing for the geometrical exibility enjoyed by the nite
element method. The prosperity of the spectral element method can be attributed to
the fact that any order polynomial can be generated automatically, concurrently with
their numerical integration rules. In fact, the collocation points are the Gauss quadrature
points for the integration rules. In addition, the basis functions are orthogonal which
means that we can obtain diagonal mass matrices. There is also no need to dene the
basis functions explicitly because we can dene implicit relations a priori for the inner
products of the functions and their derivatives. It is also worth mentioning that since the
collocation points are not equi-spaced, one can automatically generate staggered grids by
using varying order polynomials for the dierent variables as is done in
6
, which satises
the Babuska-Brezzi condition.
The advective terms in the governing equations of uid motion present formidable
challenges to many discretization methods including Galerkin methods. These terms make
the operator non-self-adjoint and as a result, prevents the optimization of these methods.
By combining the time derivative and the advective terms into the Lagrangian derivative
and then discretizing the resulting operator, we can circumvent many of the diculties;
this is the semi-Lagrangian method. This method not only increases the solution accuracy
but also allows for much larger time steps therefore making it potentially more ecient
than Eulerian methods.
2 SHALLOW WATER EQUATIONS
2.1 Spectral Element Method
The 2D shallow water equations are dened as

t
+ (u) = 0
u
t
+u u +

x
fv =
2
u
v
t
+u v +

y
+fu =
2
v
where they represent the conservation of mass, and horizontal and vertical momentum,
respectively. The weak formulation of these equations in physical coordinates x and y is
written as
_

j
d

j
t

_

k
d u
k

j
+
_

(N u)
i
d = 0
2
Francis X. Giraldo
_

j
d
u
j
t
+
_

k
d u
k
u
j
+
_

j
x
d
j

i

j

k
d f
k
v
j
= v
_

i

j
d u
j
+
_

(N u)
i
d
_

j
d
v
j
t
+
_

k
d u
k
v
j
+
_

j
y
d
j
+
_

i

j

k
d f
k
u
j
= v
_

i

j
d v
j
+
_

(N v)
i
d
where N is the unit normal vector. The mappings from physical to computational space
yields the following matrices
M
ijkl
=
_

j
d =
_
+1
1
_
+1
1
|J| h
i
() h
j
() h
k
() h
l
() dd
A
u
ijklmn
=
_

j
x

k
d =
_
+1
1
_
+1
1
|J| h
i
() h
j
()
h
k

() h
l
() h
m
() h
n
()

x
dd
A
v
ijklmn
=
_

j
y

k
d =
_
+1
1
_
+1
1
|J| h
i
() h
j
() h
k
()
h
l

() h
m
() h
n
()

y
dd
P
u
ijkl
=
_

j
x
d =
_
+1
1
_
+1
1
|J| h
i
() h
j
()
h
k

() h
l
()

x
dd
P
v
ijkl
=
_

j
y
d =
_
+1
1
_
+1
1
|J| h
i
() h
j
() h
k
()
h
l

()

y
dd
C
ijklmn
=
_

k
d =
_
+1
1
_
+1
1
|J| h
i
() h
j
() h
k
() h
l
() h
m
() h
n
() dd
D
ijkl
=
_

i
x

j
x
+

i
y

j
y
d =
_
+1
1
_
+1
1
|J|
h
i

() h
j
()
h
k

() h
l
()
_

x
_
2
dd
+
_
+1
1
_
+1
1
|J| h
i
()
h
j
()

h
k
()
h
l

()
_

y
_
2
dd
G
u
ijklmn
=
_

i
x

j

k
d =
_
+1
1
_
+1
1
|J|
h
i

() h
j
() h
k
() h
l
() h
m
() h
n
()

x
dd
G
v
ijklmn
=
_

i
y

j

k
d =
_
+1
1
_
+1
1
|J| h
i
()
h
j

() h
k
() h
l
() h
m
() h
n
()

y
dd
where M is the mass, A
u
and A
v
the advection, P
u
and P
v
the pressure, C the Coriolis,
D the diusion, and G
u
and G
v
the terms which arise from Greens theorem, and R the
3
Francis X. Giraldo
boundary terms. The 2D shallow water equations can now be written in the following
matrix form
M
ijkl

kl
t
G
u
ijklmn
u
mn

kl
G
v
ijklmn
v
mn

kl
= 0
M
ijkl
u
kl
t
+A
u
ijklmn
u
mn
u
kl
+A
v
ijklmn
v
mn
u
kl
+P
u
ijkl

kl
C
ijklmn
f
mn
v
kl
= D
ijkl
u
kl
M
ijkl
v
lk
t
+A
u
ijklmn
u
mn
v
kl
+A
v
ijklmn
v
mn
v
kl
+P
v
ijkl

kl
+C
ijklmn
f
mn
u
kl
= D
ijkl
v
kl
for i, k, m = 0, ..., N and j, l, n = 0, ..., M. The shallow water equations can now be
written as a vector system of coupled ordinary dierential equations as
dU
dt
= H(U)
where
U =
_

u
v
_

_
and
H(U) =M
1
ijkl
_

_
G
u
ijklmn
u
mn

kl
+G
v
ijklmn
v
mn

kl
A
u
ijklmn
u
mn
u
kl
A
v
ijklmn
v
mn
u
kl
P
u
ijkl

kl
+C
ijklmn
f
mn
v
kl
D
ijkl
u
kl
A
u
ijklmn
u
mn
v
kl
A
v
ijklmn
v
mn
v
kl
P
v
ijkl

kl
C
ijklmn
f
mn
u
kl
D
ijkl
v
kl
_

_ .
The spatial accuracy is determined by the order of the basis functions and will be of
order O(N + 1). As an example, for N = 1 we have linear elements, but second order
spatial accuracy. The element basis functions are the Legendre cardinal functions
h
i
() =
(1
2
)L

N
()
N(N + 1)L
N
(
i
)(
i
)
(1)
where L
N
is the Nth order Legendre polynomial and L

N
is its derivative, and the mapping
from physical space to computational space is achieved by the transformation
=
2
x
2
x
1
(x x
1
) 1, x [x
1
, x
2
] (2)
where x
1
and x
2
are the physical coordinates dening the spectral element. The Legendre
cardinal functions have the following properties
h
i
(
j
) =
_
1 if i = j
0 if i = j
(3)
4
Francis X. Giraldo
and
h
i

(
j
) =
_

_
L
N
(
i
)
Ln(
j
)(
i

j
)
if i = j
0 if i = j = 0, N

N(N+1)
4
if i = j = 0
+
N(N+1)
4
if i = j = N
(4)
which simplies the implementation of the spectral element method because we do not
have to construct the basis functions explicitly.
The coordinates within an element are approximated by the basis functions as
x =
N

i=0
M

j=0
x
ij
h
i
()h
j
()
and so its derivative can be approximated by
x

=
N

i=0
M

j=0
x
ij
h
i

()h
j
()
where N and M represent the number of grid points in the and directions. The
remainder of the derivatives are obtained following the same procedure. Note that the
extension to three dimensions is immediately obvious from the two dimensional case.
To keep the algorithm as general and as automatic as possible, we evaluate the integrals
numerically. Therefore, the mass matrix can be evaluated as
M
ijkl
=
Q

q=0
R

r=0
|J(
q
,
r
)| w
qr
h
i
(
q
)h
j
(
r
)h
k
(
q
)h
l
(
r
)
where Q and R represent the number of Legendre-Gauss-Lobatto quadrature points in
the and directions. Note that the mass matrix only contains polynomials of the order
2N. However this is not the maximum polynomial order contained in the equations. The
Coriolis matrix C
ijklmn
contains polynomials of the order 3N and so we require at least
Q =
3N+1
2
quadrature points. These quadrature rules guarantee the exact integration of
all of the matrices in the equations.
The matrix J(, ) is the Jacobian of the transformation from physical to computational
space and relates the ratio of areas of the element between the two spaces. In order to
describe the Jacobian, we begin with the chain rule
dx =
x

d +
x

d
dy =
y

d +
y

d
5
Francis X. Giraldo
where the Jacobian is then dened as
|J| =

.
For general grids in 2D, we have x = x(, ) , y = y(, ) and
|J| =
x

where the derivatives are obtained numerically from the basis functions.
2.2 Spectral Element Semi-Lagrangian Method
Semi-Lagrangian methods belong to the general class of upwinding methods. These
methods incorporate characteristic information into the numerical scheme. The La-
grangian form of the 2D shallow water equations is dened as
d
dt
+ u = 0 (5)
du
dt
+

x
fv =
2
u
dv
dt
+

y
+fu =
2
v
x
t
= u,
y
t
= v (6)
where
d
dt
denotes the total derivative and is dened as
d
dt
=

t
+u

x
+v

y
.
The weak formulation of these equations is given as
_

j
d
d
j
dt

_

k
d u
k

j
+
_

(N u)
i
d = 0
_

j
d
du
j
dt
+
_

j
x
d
j

i

j

k
d f
k
v
j
= v
_

i

j
d u
j
+
_

(N u)
i
d
_

j
d
dv
j
dt
+
_

j
y
d
j
+
_

i

j

k
d f
k
u
j
= v
_

i

j
d v
j
+
_

(N v)
i
d
6
Francis X. Giraldo
in terms of the physical coordinates x and y, where N is the unit normal vector. After
mappings from physical to computational space we can write the Lagrangian form of the
2D shallow water equations in the following matrix form
M
ijkl
d
kl
dt
G
u
ijklmn
u
mn

kl
G
v
ijklmn
v
mn

kl
= 0
M
ijkl
du
kl
dt
+P
u
ijkl

kl
C
ijklmn
f
mn
v
kl
= D
ijkl
u
kl
M
ijkl
dv
lk
dt
+P
v
ijkl

kl
+C
ijklmn
f
mn
u
kl
= D
ijkl
v
kl
for i, k, m = 0, ..., N and j, l, n = 0, ..., M. Note that the matrices are dened in a similar
manner to the Eulerian case. The Lagrangian form of the shallow water equations can
now be written as the vector system of coupled ordinary dierential equations
dU
dt
=

H(U)
where once again
U =
_

u
v
_

_
and now the right hand side vector is given by

H(U) =M
1
ijkl
_

_
G
u
ijklmn
u
mn

kl
+G
v
ijklmn
v
mn

kl
P
u
ijkl

kl
+C
ijklmn
f
mn
v
kl
D
ijkl
u
kl
P
v
ijkl

kl
C
ijklmn
f
mn
u
kl
D
ijkl
v
kl
_

_
where

H(U) = H(U(x , t t)) are the interpolations at the departure points
(x , t t). Integrating (6) by the mid-point rule we get
= t u
_
x

2
, t +
t
2
_
(7)
which denes a recursive relation for the trajectories. There are other options but this
approach works extremely well and is quite ecient. There are also some important issues
involving the implementation of the semi-Lagrangian that ought to be mentioned.
We still need to consider how we are going to interpolate the values of H at departure
points. Interpolation is required because in general, the departure points will not fall
on grid points but rather between them. Typically, the interpolations are constructed
one of three ways: Lagrange, Hermite or spline polynomials. The diculty with these
methods is that they require some structure in the grid (i.e., curvilinear coordinates)
which would be quite limiting in 2D where the elements may not have a true structure.
7
Francis X. Giraldo
(A caveat is in order here: cubic splines can be constructed from unstructured data, but
these methods are generally impractical for CFD type computations because they are
prohibitively expensive). The incentive for combining the spectral element method with
the semi-Lagrangian method is due to the high order polynomials of the spectral element
method that are also locally dened within each element. We can determine in which
spectral element a given departure point lies, and then use the basis functions within the
element to construct the interpolation required by the semi-Lagrangian method. Since
the order of the basis functions are typically high order, the interpolation will be of a
suciently high order to ensure the high order spatial and temporal accuracy of the
numerical scheme.
Since the Legendre cardinal basis functions have to be able to interpolate any departure
point, they have to be constructed explicitly. The Legendre cardinal basis functions can
be written using the denition for Lagrange polynomials
h
i
() =
N

j = 0
j = i
_

j

j
_
(8)
and its derivatives are
h
i

() =
N

k = 0
k = i
N

j = 0
j = i
_
1

k
_

_

j

j
_
(9)
where the
i
,
j
,
k
are the permutations of the Legendre-Gauss-Lobatto (collocation)
points. These two relations are very general and valid for any order Legendre cardinal basis
function and can be used quite easily to generate the desired interpolating polynomial for
the semi-Lagrangian method.
The boundary condition requires that the departure point of the semi-Lagrangian
method remain within the domain. On a sphere, the conditions used are those of period-
icity. Periodicity can also be used here but the exact solution requires that the function
vanish at innity. However, the velocity elds do not guarantee that the departure points
will lie within the domain and so we must devise some method by which to check whether
the departure point is in the interior of the domain.
As is done in typical unstructured mesh generation, the boundary array is stored in
a counterclockwise direction. For a multiply-connected domain, the interior boundaries
are stored clockwise. This strategy ensures that the interior of the domain always lies
to the left of each boundary segment. Therefore, the rst step requires taking the cross
product of the vector dening the boundary segment

x
1
x
2
= (x
2
x
1
) with the vector

x
1
x
d
= (x
d
x
1
). Thus, if

x
1
x
2

x
1
x
d
< 0
8
Francis X. Giraldo
then the orthogonal vector is pointing in the negative z direction. In other words, the
resulting vector points into the paper, meaning that the departure point x
d
is to the
right of the boundary segment and hence outside of the domain. When this condition is
encountered, the intersection point of the boundary vector

x
1
x
2
and the departure point
vector

x
d
is found. The vectors can be written parametrically as
x = x
1
+s(x
2
x
1
) and x = o +t(x
d
o)
where o is the origin, and s and t are the parametric variables. Thus the linear system
to be solved is the following
_
(x
2
x
1
) x
d
(y
2
y
1
) y
d
_ _
s
t
_
=
_
x
1
y
1
_
where a valid intersection occurs if and only if (s, t) [0, 1].
The element containing the departure point must also be found. For general grids, the
best approach is to use a quadtree data structure. For the icosahedral grids used as one
test case in this paper, the data structure described in
4
should be used. But once we
isolate the element claiming the departure point, we still need to determine its coordinates
in terms of the computational space. Equation (7) will only give the coordinates of the
departure point in terms of the physical space. We can write the coordinates in physical
space of the departure point using the basis functions in the form
x
d
=
N

i=0
M

j=0
x
ij
h
i
(
d
)h
j
(
d
)
and by virtue of Newtons method, we can write the iterative scheme for the roots (
d
,
d
)
as
F
k+1
= F
k
+F
k
(
k
d
,
k
d
) (d, d) = 0
where
F =
N

i=0
M

j=0
x
ij
h
i
(
d
)h
j
(
d
) x
d
.
This leads to the solutions
d =
_
_
F
k
1
F
k
1

F
k
2
F
k
2

_
_
_
_
F
k
1

F
k
1

F
k
2

F
k
2

_
_
, d =
_
_
F
k
1

F
k
1
F
k
2

F
k
2
_
_
_
_
F
k
1

F
k
1

F
k
2

F
k
2

_
_
where

k+1
d
=
k
d
+d,
k+1
d
=
k
d
+d
9
Francis X. Giraldo
which only requires 5 iterations at most. Thus if (
k+1
d
,
k+1
d
) [1, 1], then we can be sure
that the departure point is contained within this element. Upon obtaining the departure
point in terms of computational space coordinates the interpolation can be obtained using
the basis functions of the element.
3 TIME DISCRETIZATION
A general family of explicit and implicit, one-step and multi-step time discretization
schemes for the ordinary dierential equation
dU
dt

U
t
= H(U)
where U is a vector quantity, can be given by the relation
(1 +) U
n
U
n1
= t
_
H
n+1
(U) + (1 + ) H
n
(U)
_
(10)
t
_
H
n1
(U) + H
n2
(U)
_
where U
n
= U
n+1
U
n
and U
n1
= U
n
U
n1
. For = 0, we get explicit methods
and implicit for 0 < 1. For , = 0 we get one-step methods, and multi-step methods
otherwise. The multi-step 3rd order explicit Adams-Bashforth (AB) scheme is obtained
by the parameters = = 0, =
16
12
, =
5
12
and the one-step 2nd order implicit Crank-
Nicholson (CN) by =
1
2
, = = = 0. Note that for the multi-step methods, another
scheme must be used until we have a sucient number of time levels required by the
multi-step method. This other scheme should probably be a one-step method and must
be at least of the same order of accuracy as the multi-step method. A popular choice is
to use the following general family of Runge-Kutta schemes
U
k+1
=
t
K k + 2
H(U
k
) for k = 0, ..., K 1
where U
k+1
= U
k+1
U
n
and U
0
= U
n
. For the explicit methods, we need not worry
about the non-linearity of the problem, but for the implicit methods we have to consider
this case. A straightforward approach is to consider a local linearization of the non-linear
quantities. Therefore, taking a Taylor series expansion, we get
H
n+1
(U) = H
n
(U) +H
n
(U) U
n
which yields a second order approximation to the non-linear terms. Of course we can
go to higher approximations but in this paper only 3rd order explicit and 2nd order
implicit schemes are considered. Applying this expansion to (10) we arrive at the following
linearized general time discretization scheme
[(1 +) t H
n
(U) ] U
n
= U
n1
+ t [(1 + ) H
n
(U)] (11)
t
_
H
n1
(U) + H
n2
(U)
_
10
Francis X. Giraldo
which may now be solved by any of the banded or iterative methods generally used for
systems of linear equations.
4 NUMERICAL EXPERIMENTS
For the numerical experiments, the following terms are used in order to compare the
performance of each scheme: the L
2
error norm,

L
2
=
_

(
exact
)
2
d
_

2
exact
d
(12)
and the rst and second moments of mass
M
1
=
_

d
_

exact
d
M
2
=
_

2
d
_

2
exact
d
. (13)
The L
2
error norm compares the root mean square percent error of the numerical and
exact solutions, while the rst moment measures the percent mass of the system, and the
second moment measures the amount of dampening inherent in the numerical scheme.
The ideal scheme should yield an error norm of zero and rst and second moments of one.
4.1 Rotating Gaussian Hill
4.1.1 Problem Statement
Method N N
E

L
2
M
1
M
2
SEM 1 10 1.2647 1.0894 1.0084
(h-type) 1 20 1.0455 0.9858 0.9991
1 40 0.6633 1.0013 1.0006
1 60 0.4047 1.0002 1.0009
SEM 1 10 1.2647 1.0894 1.0084
(p-type) 2 10 0.3949 0.9885 0.9871
4 10 0.0267 0.9989 1.0007
6 10 0.0009 1.0000 0.9997
SEM-SLM 1 10 0.9412 0.4529 0.0211
2 10 0.6015 1.0119 0.4666
4 10 0.0738 1.0002 1.0448
6 10 0.0017 0.9999 0.9994
Table 1: Results for the rotating Gaussian hill for the spectral element and spectral element
semi-Lagrangian methods for = 0.5 on a structured grid with the AB scheme.
The exact solution for this test case is
(x, y, t) =

2
o

2
o
+ 2t
e

[
x
2
+y
2
]
2(
2
o
+2t)
11
Francis X. Giraldo
u(x, y, t) = +y
v(x, y, t) = x
where
o
=
1
8
, (x
o
, y
o
) = (
1
2
, 0), (x, y) [1, 1] and
x = x x
o
cos t y
o
sin t, y = y +x
o
sin t y
o
cos t.
The initial conditions are
(x, y, 0) = e

[
(xxo)
2
+(yyo)
2
]
2
2
o
u(x, y, 0) = +y
v(x, y, 0) = x
and the boundary conditions are
(x, y, t) 0 for (x, y) .
Method N N
E

L
2
M
1
M
2
SEM 1 10 0.8455 1.0000 1.0789
(h-type) 1 20 0.2720 1.0000 1.0002
1 40 0.0354 1.0000 1.0000
1 60 0.0078 1.0000 1.0000
SEM 1 10 0.8455 1.0000 1.0789
(p-type) 2 10 0.0473 1.0000 0.9995
4 10 0.0098 1.0000 1.0000
6 10 0.0022 1.0000 1.0000
SEM-SLM 1 10 0.9433 0.8668 0.0422
2 10 0.6024 0.9986 0.4686
4 10 0.0739 1.0000 1.0448
6 10 0.0017 1.0000 0.9994
Table 2: Results for the rotating Gaussian hill for the spectral element and spectral element
semi-Lagrangian methods for = 0.5 on a structured grid with the CN scheme.
The proceeding sections show the results of this test case for the spectral element and
spectral element semi-Lagrangian methods on two types of unstructured grids. Table
1 shows the results on an uniform structured grid with the AB scheme. The methods
all perform well but since this scheme is fully explicit, the time steps must obey the
CFL condition. Tables 2 and 3 show the results on an uniform structured grid with the
CN scheme. Tables 1 and 2 illustrate how powerful the SEM can be when used as a
12
Francis X. Giraldo
Method N N
E

L
2
M
1
M
2
SEM 1 40 0.54 0.0354 1.0000 1.0000
(h-type) 1 40 1.09 0.0874 0.9999 1.0000
1 40 2.19 0.2597 0.9999 1.0000
1 60 0.52 0.0107 1.0000 1.0000
1 60 1.05 0.0333 0.9999 1.0000
1 60 2.11 0.1189 0.9999 1.0000
SEM 4 10 0.51 0.0091 1.0001 1.0000
(p-type) 4 10 1.02 0.0310 1.0001 1.0000
4 10 2.04 0.1166 0.9999 1.0000
6 10 0.52 0.0019 0.9999 1.0000
6 10 1.04 0.0076 0.9998 1.0000
6 10 2.08 0.0305 0.9999 1.0000
SEM-SLM 4 10 0.51 0.0737 0.9997 1.0447
4 10 1.02 0.0489 1.0000 1.0291
4 10 2.04 0.0196 1.0001 1.0057
6 10 0.52 0.0017 1.0000 0.9994
6 10 1.04 0.0011 1.0000 0.9996
6 10 2.08 0.0009 0.9999 0.9999
Table 3: Results for the rotating Gaussian hill for the spectral element and spectral element
semi-Lagrangian methods for various on a structured grid with the CN scheme.
p-type method (i.e., when the polynomial order N is increased rather than the number
of elements N
E
). Table 3 shows how the methods are aected by increasing the Courant
number () and hence the time step. The SEM-SLM method performs better at these
larger thereby making this method more ecient.
4.1.2 Icosahedral Grid
The icosahedral grid used in this test case is the planar analog of the icosahedral
triangular grid on the sphere presented in
4
. In the spherical case, the initial icosahedron
contains 12 grid points and 20 equilateral triangles; whereas in the planar case, the initial
grid is a hexagon containing 7 grid points and 6 equilateral triangles. Upon generating
the rened grid as is described in
4
the resulting triangles are then subdivided to form
quadrilaterals in order for the spectral element discretization to be used.
In order to split the triangles into quadrilaterals, we nd the midpoints of each of the
triangle edges and form quadrilaterals by connecting these midpoints to the centroid of
the triangle. A schematic of this process is illustrated in gure 1.
Figure 2 shows the grid and contours for the spectral element method with three grid
renements (N
ref
= 3) where each element has a polynomial order N = 1. Figure 3 shows
the result for the semi-Lagrangian spectral element method with N
ref
= 1 and N = 4.
13
Francis X. Giraldo
1 2
3
1 2
3
4
5
6
Figure 1: The subdivision of a triangle into 3 quadrilaterals. In this case, since the triangle is
equilateral, the 3 quads will also be exactly the same size.
Figure 2: The grid and contours for the rotating Gaussian hill for the spectral element method
on an icosahedral grid with N = 1, N
ref
= 3, = 2.11, and the CN scheme.
In gure 3, one can see the traces of the background or parent triangular elements. The
blue lines denote the spectral elements and the red lines denote the collocation points. In
addition, the quadrilateral decomposition of the triangles forms the Voronoi polygons of
the grid points. This occurs because the triangulation of this collection of grid points is in
fact the Delaunay triangulation which is the well known dual of the Voronoi (or Dirichlet)
tessellation. This can be seen much more easily in gure 2, where the grid tiles represent
the Voronoi polygons with the grid points as their centroids.
This icosahedral grid has a very ecient data structure associated with it that can be
used for searching. The other benecial property of this grid is that all the quadrilateral
elements are exactly the same size because the parent triangles are equilateral. This is an
important property if an uniform representation throughout the domain is desired which
is usually the case for geophysical ows on the surface of the sphere where grid biasing is
typically undesirable. However, if totally unstructured grids are desired as is the case with
adaptive grids in computational uid dynamics, will this strategy work? The following
section addresses this case.
14
Francis X. Giraldo
Figure 3: The grid and contours for the rotating Gaussian hill for the spectral element semi-
Lagrangian method on an icosahedral grid with N = 4, N
ref
= 1, = 2.84, and the CN
scheme.
4.1.3 Unstructured Grid
Figure 4 and 5 show the grid and contours for both methods using an unstructured
grid with N = 4. The unstructured grid generator is described in
3
. However, this
grid generator creates only triangles and so the triangles have to be subdivided into
quadrilaterals as illustrated by gure 1. After the quadrilaterals have been constructed,
the collocation points are then generated along the boundaries of the elements rst, and
then in the interior. This approach ensures that the edge collocation points are continuous
across the neighboring elements.
Figure 4: The grid and contours for the rotating Gaussian hill for the spectral element
method on an unstructured grid with N = 4, = 4.54, and the CN scheme.
The results for this example show that the spectral element method does indeed work
even on such an irregular grid as the one presented here but that it does not work too
well for this Courant number ( = 12.86) as the stability analysis illustrates in
5
.
However, the combination of spectral elements with the semi-Lagrangian method yields
an extremely accurate result even when large Courant numbers are used (see gure 5).
This example truly shows the power and exibility of the proposed strategy of combining
the spectral element method with the semi-Lagrangian method.
15
Francis X. Giraldo
Figure 5: The grid and contours for the rotating Gaussian hill for the spectral element semi-
Lagrangian method on an unstructured grid with N = 4, = 4.54, and the CN scheme.
4.2 Rossby Soliton Wave
4.2.1 Problem Statement
This problem describes an equatorially trapped Rossby soliton wave
2
. The exact
solution is given by
(x, y, t) =
(0)
+
(1)
u(x, y, t) = u
(0)
+u
(1)
v(x, y, t) = v
(0)
+v
(1)
where the superscripts (0) and (1) denote the zeroth and rst order asymptotic solutions
of the shallow water equations, respectively. They are given by

(0)
=
_
9 + 6y
2
4
_
e

y
2
2
u
(0)
=

(2y) e

y
2
2
v
(0)
=
_
3 + 6y
2
4
_
e

y
2
2
and

(1)
= c
(1)

9
16
_
5 + 2y
2
_
e

y
2
2
+
2

(1)
(y)
u
(1)
= c
(1)

9
16
_
3 + 2y
2
_
e

y
2
2
+
2
U
(1)
(y)
v
(1)
=

V
(1)
(y)
16
Francis X. Giraldo
where (, t) = Asech
2
B, = x c t, A = 0.771 B
2
, B = 0.394, and c = c
(0)
+ c
(1)
where c
(0)
=
1
3
and c
(1)
= 0.395 B
2
as given in
7
. The variable is the solution to the
equation

+
n

+
n

3
= 0
which is the famous Korteweg-de Vries equation that yields soliton solutions. The shallow
water equations can be simplied into this equation using the method of multiple scales
as presented in
1
. Finally, the remaining terms are given by
_
_
_

(1)
(y)
U
(1)
(y)
V
(1)
(y)
_
_
_ = e

y
2
2

n=0
_
_
_

n
u
n
v
n
_
_
_H
n
(y)
where H
n
(y) are the Hermite polynomials and
n
, u
n
, v
n
are the Hermite series coecients
given in
2
.
4.2.2 Structured Grid
Table 4 shows the results on a structured grid with the AB scheme. These results
show that the SEM-SLM works better than the h-type SEM and only slightly better than
the p-type SEM. In the rotating Gaussian hill, the SEM-SLM AB scheme also showed
little or no gain over the p-type SEM. The power of the SEM-SLM is evident at large
Courant numbers (or time steps). However, the AB scheme is explicit and even when
used with the SLM, the method must obey ODE rather than PDE stability restrictions.
ODE stability restrictions are more lenient than the PDE restrictions, but they must be
adhered to nonetheless. The SEM-SLM with the CN scheme in time is currently under
development. This approach should prove to be far better than the SEM particularly at
very large Courant numbers as the analysis in
5
suggests.
4.2.3 Unstructured Grid
Table 5 shows the results on an unstructured grid with the AB scheme. These results
illustrate that the SEM works rather well on this unstructured/adaptive grid. The SEM-
SLM also gives good results but the real advantages of the SEM-SLM are not evident in
this example because the AB scheme is a fully explicit method. Because it is explicit,
small time steps must be used in order to maintain the stability of the scheme. The SEM-
SLM CN scheme ought to give far better results. At the very least we hope to achieve
the same level of accuracy of the SEM while using much larger time steps.
17
Francis X. Giraldo
Method N N
x
E
N
y
E

L
2
u
L
2
v
L
2
T
L
2
M
1
M
2
SEM 1 32 16 1.2686 1.0216 1.5135 1.1607 1.3676 0.7570
(h-type) 1 64 32 0.5667 0.5519 1.0100 0.5833 1.0972 0.9335
1 128 64 0.2406 0.2446 0.5078 0.2584 1.0326 0.9785
SEM 1 32 16 1.2686 1.0216 1.5135 1.1607 1.3676 0.7570
(p-type) 2 32 16 0.1188 0.1514 0.2456 0.1431 0.9989 1.0000
4 32 16 0.1137 0.1169 0.2679 0.1250 1.0113 0.9932
SEM-SLM 1 32 16 1.0302 0.9017 1.2623 0.9775 0.7304 0.3901
2 32 16 0.1838 0.2000 0.3512 0.2013 0.9472 0.9075
4 32 16 0.1128 0.1172 0.2673 0.1247 1.0089 0.9911
Table 4: Results for the Rossby soliton wave problem at t=40 for the spectral element and
spectral element semi-Lagrangian methods on a structured grid with
t
x
=
1
15
and the AB
scheme.
Method N N
E

L
2
u
L
2
v
L
2
T
L
2
M
1
M
2
SEM 1 2100 0.4707 0.4731 0.9701 0.5011 1.0649 0.9556
(p-type) 2 2100 0.1150 0.1236 0.3035 0.1319 1.0097 0.9938
4 2100 0.1137 0.1169 0.2679 0.1250 1.0113 0.9932
SEM-SLM 1 2100 0.5386 0.5335 0.8973 0.5547 0.6846 0.5274
2 2100 0.1461 0.1520 0.3346 0.1607 0.9759 0.9360
4 2100 0.1131 0.1168 0.2650 0.1146 1.0008 0.9998
Table 5: Results for the Rossby soliton wave problem at t=40 for the spectral element and
spectral element semi-Lagrangian methods on an unstructured grid with
t
N
=
1
10
and the AB
scheme.
Figure 6: The grid and contours for the Rossby soliton wave at t=40 for the spectral element
semi-Lagrangian method on an unstructured grid with N = 1, N
E
= 2100,
t
N
=
1
10
, and the
AB scheme.
18
Francis X. Giraldo
Figure 7: The grid and contours for the Rossby soliton wave at t=40 for the spectral element
semi-Lagrangian method on an unstructured grid with N = 2, N
E
= 2100,
t
N
=
1
10
, and the
AB scheme.
Figure 8: The grid and contours for the Rossby soliton wave at t=40 for the spectral element
semi-Lagrangian method on an unstructured grid with N = 4, N
E
= 2100,
t
N
=
1
10
, and the
AB scheme.
5 CONCLUSIONS
The spectral element method and the semi-Lagrangian method are described in detail.
They are applied to the 2D shallow water equations in order to show the practical aspects
of the implementation of the methods. A new method is introduced whereby the spectral
element method and the semi-Lagrangian method are combined. The main attraction
of this method (SEM-SLM) is that it uses the basis functions of the spectral element
method as the interpolating polynomial for the semi-Lagrangian calculation of the depar-
ture points. This makes the method quite local in that the interpolation and calculations
are all performed in an element per element basis. This property is very important par-
ticularly if we have an interest in implementing the method with unstructured/adaptive
grids and on parallel computers.
The results for the rotating Gaussian hill show that the spectral element semi-Lagrangian
method (SEM-SLM) yields extremely accurate solutions even while using large Courant
numbers and on dierent types of grids, that is, as long as an implicit method (the CN
scheme) is used. The icosahedral grid results are quite encouraging particularly because
this grid has proven to be quite promising for applications on the sphere
4
. The results
for the unstructured grid show that the spectral element semi-Lagrangian method yields
very good results regardless of the size of the Courant number.
19
Francis X. Giraldo
The results for the Rossby soliton wave show that the spectral element method still
works rather well even with such unstructured grids but the semi-Lagrangian version of
the method is disappointing, at least when used in conjunction with the AB scheme.
However, this idea needs to be considered further and the development of the SEM-SLM
with the CN scheme is currently underway. At the very least, we hope to achieve the same
level of accuracy as the SEM but while using much larger time steps thereby increasing
the eciency of the numerical method.
ACKNOWLEDGMENTS
I would like to thank the sponsor, the Oce of Naval Research (ONR), and the program
manager, the Naval Research Laboratory (NRL), for supporting this work through pro-
gram element PE-0602435N. I would also like to thank Tim Hogan of NRL for allowing
me the opportunity to explore these new methods.
REFERENCES
[1 ]John P. Boyd, Equatorial Solitary Waves. Part 1: Rossby Solitons, Journal of
Physical Oceanography, 10, 1699-1717, (1980).
[2 ] John P. Boyd, Equatorial Solitary Waves. Part 3: Westward-Traveling Modons,
Journal of Physical Oceanography, 15, 46-54, (1985).
[3 ] Francis X. Giraldo, Eciency and Accuracy of Lagrange-Galerkin Methods on
Unstructured Adaptive Grids, Mathematical Modelling and Scientic Computing,
8, (1997).
[4 ] Francis X. Giraldo, Lagrange-Galerkin Methods on Spherical Geodesic Grids, Jour-
nal of Computational Physics, 136, 197-213, (1997).
[5 ] Francis X. Giraldo, The Lagrange-Galerkin Spectral Element Method on Unstruc-
tured Quadrilateral Grids, Journal of Computational Physics, submitted (December,
1997).
[6 ] Mohamed Iskandarani, Dale B. Haidvogel, and John P. Boyd, Staggered Spectral
Element Model with Application to the Oceanic Shallow Water Equations, Inter-
national Journal for Numerical Methods in Fluids, 20, 393-414, (1995).
[7 ] Beth Wingate and Dale Haidvogel, Equatorial Rossby Soliton, (Notes), Unpub-
lished, (1994).
20

You might also like