28
INTERNATIONAL JOURNAL FOR NUMERICAL METHODS IN FLUIDS Int. J. Numer. Meth. Fluids 201; 1:1 Prepared using fldauth.cls [Version: 2000/07/27 v1.0] A triangular spectral/hp discontinuous Galerkin method for modelling 2D shallow water equations C. Eskilsson 1,2 and S.J. Sherwin 2* 1 Water Environment Transport, Chalmers University of Technology, SE-412 96 G¨ oteborg, Sweden 2 Department of Aeronautics, Imperial College London, London SW7 2AZ, UK SUMMARY We present a spectral/hp element discontinuous Galerkin model for simulating shallow water flows on unstructured triangular meshes. The model uses an orthogonal modal expansion basis of arbitrary order for the spatial discretisation and a third-order Runge-Kutta scheme to advance in time. The local elements are coupled together by numerical fluxes, evaluated using the HLLC Riemann solver. We apply the model to test cases involving smooth flows and demonstrate the exponentially fast convergence with regard to polynomial order. We also illustrate that even for results of “engineering * Correspondence to: Department of Aeronautics Imperial College London London SW7 2AZ, UK Telephone: +44 (0)20 7594 5052 Fax: +44 (0)20 7584 8120 E-mail: [email protected] Copyright c 201 John Wiley & Sons, Ltd.

A triangular spectral/hp discontinuous Galerkin method for

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A triangular spectral/hp discontinuous Galerkin method for

INTERNATIONAL JOURNAL FOR NUMERICAL METHODS IN FLUIDS

Int. J. Numer. Meth. Fluids 201; 1:1 Prepared using fldauth.cls [Version: 2000/07/27 v1.0]

A triangular spectral/hp discontinuous Galerkin method for

modelling 2D shallow water equations

C. Eskilsson1,2 and S.J. Sherwin2∗

1 Water Environment Transport, Chalmers University of Technology,

SE-412 96 Goteborg, Sweden

2 Department of Aeronautics, Imperial College London,

London SW7 2AZ, UK

SUMMARY

We present a spectral/hp element discontinuous Galerkin model for simulating shallow water flows

on unstructured triangular meshes. The model uses an orthogonal modal expansion basis of arbitrary

order for the spatial discretisation and a third-order Runge-Kutta scheme to advance in time. The

local elements are coupled together by numerical fluxes, evaluated using the HLLC Riemann solver.

We apply the model to test cases involving smooth flows and demonstrate the exponentially fast

convergence with regard to polynomial order. We also illustrate that even for results of “engineering

∗Correspondence to:

Department of Aeronautics

Imperial College London

London SW7 2AZ, UK

Telephone: +44 (0)20 7594 5052

Fax: +44 (0)20 7584 8120

E-mail: [email protected]

Copyright c© 201 John Wiley & Sons, Ltd.

Page 2: A triangular spectral/hp discontinuous Galerkin method for

2 C. ESKILSSON AND S.J. SHERWIN

accuracy” the computational efficiency increases with increasing order of the model and time of

integration. The model is found to be robust in the presence of shocks where Gibbs oscillations can

be suppressed by slope limiting. Copyright c© 201 John Wiley & Sons, Ltd.

key words: discontinuous Galerkin method; spectral/hp discretisation; shallow water equations

1. INTRODUCTION

In many hydrodynamic applications of interest to hydraulic, coastal and ocean engineering the

characteristic length scale of the problem is large compared to the vertical scale. In this case

the flow can be regarded as uniform in depth and approximated by the shallow water equations

(SWE). The SWE are a two-dimensional system of nonlinear partial differential equations of

hyperbolic type.

The body of literature on numerical modelling of the SWE is vast and covers all types of

numerical methods. The models used in coastal and hydraulic engineering are generally of low-

order – possibly with shock-capturing – e.g. [1, 2, 3], while in oceanographic and atmospheric

sciences the numerical algorithms are predominantly of high-order, e.g. the quadrilateral nodal

spectral element models of Ma [4] and Iskandarani et al. [5]. High-order Galerkin Finite Element

(FE) methods have the appealing property of combining the geometrical flexibility of h-type

finite element methods with the high accuracy of the p-type spectral methods. The above

mentioned spectral element models have been shown to exhibit exponentially fast convergence

for smooth waves on staggered [5] and unstaggered [4] meshes. In this approaches a nodal

quadrilateral spectral/hp element methods was applied using a Lagrange polynomial basis

through the gauss-Lobatto-Legendre quadrature points. This method has a discrete diagonal

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 3: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 3

mass matrix, if a slight under integration is applied, which is significant for the efficiency of the

method. Within triangular subdomains modal or hierarchical basis are often applied. However

for modal spectral/hp element discretisations using a classical Galerkin formulation the mass

matrix is not diagonal which severely limits the efficiency of the implementation. Nevertheless,

as demonstrated in this paper, this problem can be overcome by using a discontinuous Galerkin

formulation.

In this study we therefore will solve the SWE using a modal triangular spectral/hp

discontinuous Galerkin (DG) method following the Runge-Kutta DG method developed by

Cockburn and Shu and co-workers, e.g. [6, 7, 8]. The key feature of the DG method is that

solutions are allowed to be discontinuous over elemental boundaries, while the elements are

coupled using numerical fluxes similar to the finite volume technique. Of course, in the presence

of discontinuities such as shocks, Gibbs oscillations arise if the polynomial expansions employed

are linear or higher, but – in contrast to classical continuous Galerkin methods – the oscillations

generally do not appear to pollute the whole solution or cause the solution to “blow-up”.

Further the Gibbs oscillations can be suppressed by slope limiting [9, 7, 10]. In addition to

allowing shocks to form and propagate in the domain, the DG method gives stable solutions for

equal order approximations [11] and staggered meshes or mixed approximations are therefore

unnecessary.

The DG method has been applied to the SWE for simulating flows involving shocks,

such as dam-break flows and oblique hydraulic jumps [12, 13, 14]. These three studies used

essentially low-order approximation on unstructured triangular meshes and suppressed any

Gibbs oscillations by applying limiting procedures. Previous high-order DG SWE models are

the nodal spectral element methods of Dupont [15] and Giraldo et al. [16]. Dupont used

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 4: A triangular spectral/hp discontinuous Galerkin method for

4 C. ESKILSSON AND S.J. SHERWIN

triangular elements in which the expansion basis was made up from a product of 1D Legendre

polynomials with triangular truncation. Giraldo et al. solved the SWE on the sphere using

curvilinear quadrilaterals. The elemental solution was approximated by a nodal Lagrange

polynomial, constructed from a tensor product of 1D Legendre cardinal functions, giving a

diagonal mass matrix if under integration was performed. The exponential convergence of the

two models were confirmed by numerical tests. In addition, Giraldo et al. investigated the

effect of solving the equations in divergence form rather than in Green’s form. Although it

was shown that the Green’s formulation provided more accurate solutions, the difference was

found negligible for the test cases considered.

The paper is organised as follows. In section 2 we outline the governing equations. The

numerical model is presented in section 3, and applied to several test cases in section 4.

Finally, in section 5 we summarise the study and present our conclusions.

2. GOVERNING EQUATIONS

The 2D SWE, expressed in terms of conservative variables, is written in conservation form as

∂U

∂t+ ∇ · F(U) = S(U) , (1)

where F(U) = [E(U),G(U)]T

and

U =

H

uH

vH

, E =

uH

u2H + gH2/2

uvH

, G =

vH

uvH

v2H + gH2/2

. (2)

Here H(x, y, t) = ζ(x, y, t)+d(x, y) is the total water depth, d(x, y) is the still water depth and

ζ(x, y, t) is the free surface elevation; u(x, y, t) and v(x, y, t) are the depth-averaged velocities

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 5: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 5

in the x- and y-direction, respectively, and g is the acceleration due to gravity. The source

term S accounts for forcing due to friction, bed slopes and Coriolis effects and is defined as

S =

0

gH (S0x− Sfx

) + fv

gH(

S0y− Sfy

)

− fu

, (3)

where S0xand S0y

are the bed slopes in the x- and y-direction, respectively. The Coriolis

parameter f is given by the β-plane approximation, i.e. f = f0 + βy. The friction losses are

estimated by the Manning law

Sfx=uM2

√u2 + v2

H4/3, Sfy

=vM2

√u2 + v2

H4/3, (4)

where M is the Manning number.

Considering the homogeneous equations, the SWE can be quasi-linearised as

∂U

∂t+∂E

∂U

∂U

∂x+∂G

∂U

∂U

∂y= 0 , (5)

where the Jacobians of the flux functions can be evaluated as

∂E(U)

∂U=

0 1 0

c2 − u2 2u 0

−uv v u

,∂G(U)

∂U=

0 0 1

−uv v u

c2 − v2 0 2v

, (6)

in which c =√gH is the wave speed. Defining an arbitrary unit vector s = [sx, sy]

T, we obtain

the following Jacobian matrix

∂ (F(U) · s)∂U

=

0 sx sy

(c2 − u2)sx − uvsy 2usx + vsy usy

−uvsx + (c2 − v2)sy vsx usx + 2vsy

, (7)

with eigenvalues

λ1 = usx + vsy − c, λ2 = usx + vsy, λ3 = usx + vsy + c . (8)

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 6: A triangular spectral/hp discontinuous Galerkin method for

6 C. ESKILSSON AND S.J. SHERWIN

The matrices of corresponding right (R = [r1, r2, r3]) and left (L = [l1, l2, l3]T]) eigenvectors

are

R =

1 0 1

u− csx sy u+ csx

v − csy −sx v + csy

, (9)

and

L =1

2c

usx + vsy + c −sx −sy

2c(−usy + vsx) 2csy −2csx

−usx − vsy + c sx sy

, (10)

respectively.

3. DISCONTINUOUS GALERKIN MODEL

3.1. Galerkin formulation

The computational domain Ω is divided into N non-overlapping triangular elements denoted

by Te of characteristic size he and with boundary ∂Te such that

Ω =

N⋃

e=1

Te. (11)

Multiplying eq. (1) by a smooth function q(x) and integrating over the element Te we obtain:

Te

∂Ui

∂tqi dx +

Te

(∇ · F(U))i qi dx =

Te

S(U)i qi dx . (12)

Integrating the second term in eq. (12) by parts gives

Te

∂Ui

∂tqi dx −

Te

(F(U) · ∇)i qi dx +

∂Te

(F(U) · n)i qi ds =

Te

S(U)i qi dx , (13)

where n = (nx, ny)T is the outward unit normal to Te. The discrete Galerkin approximation

is obtained by replacing q with a test function qδ ∈ Vδ as well as approximating the exact

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 7: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 7

solution U with Uδ ∈ Vδ, where the discrete space Vδ is defined as

Vδ =

qδ ∈ L2(Ω) : qδ|Te∈ PP (Te), ∀Te

. (14)

Here PP (Te) is the space of polynomials of degree at most P in the element Te. To allow

information to propagate between elements, as the elements are discontinuous at the elemental

boundaries, we replace the boundary flux F(U) that appears in the third term of eq. (13) with

an upwind numerical flux, to be discussed later. We denote the numerical flux with F(U).

Thus we write the DG formulation (after analytically integrating by parts once more to obtain

the divergence form): Find Uδ ∈ Vδ such that ∀qδ ∈ Vδ

Te

∂Uδi

∂tqδi dx +

Te

(∇ · F(Uδ))i qδi dx

+

∂Te

((

F(Uδ) − F(Uδ))

· n)

iqδi ds =

Te

S(Uδ)i qδi dx . (15)

For computational convenience we prefer the divergence form since it involves inner products

of the same forms as classical continuous Galerkin schemes.

3.2. Expansion basis and collapsed coordinate system

We use the hierarchical and orthogonal basis functions proposed independently by Proriol,

Koornwinder and Dubiner [17, 18, 19], which is a warped product of a one-dimensional tensor

and a two-dimensional tensor. We start by introducing the one-to-one mapping from global

Cartesian coordinates (x, y) to local Cartesian coordinates (ξ1, ξ2) denoted as

(x, y) = χe(ξ1, ξ2) . (16)

The mapping of the triangular domain Te into the standard triangle Tst is given by χ−1e (Te) =

Tst, where the standard triangle is defined by

Tst = (ξ1, ξ2)| − 1 ≤ ξ1, ξ2; ξ1 + ξ2 ≤ 0 . (17)

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 8: A triangular spectral/hp discontinuous Galerkin method for

8 C. ESKILSSON AND S.J. SHERWIN

Collapsedcoordinate

system

Cartesiancoordinate

system( )( )

2221

1 ,1211 ηξηηξ =−−+=

( )( ) 22

2

11 ,1

11

2 ξηξξη =−

−+=

( )1,1−

( )1,1 −( )1,1 −−

11 =η01 =η11 −=η

( )1,1

( )1,1 −−

( )1,1−

( )1,1 −

11 =η01 =η11 −=η

Figure 1. The standard triangle in Cartesian and collapsed coordinates.

As the standard triangular domain is not independently bounded by the coordinates (ξ1, ξ2),

we introduce the so-called collapsed coordinate system (η1, η2) [20]. The transformation from

(ξ1, ξ2) → (η1, η2) is given by:

η1 = 2(1 + ξ1)

(1 − ξ2)− 1 , η2 = ξ2 . (18)

The standard triangle can now be defined in terms of collapsed coordinates as

Tst = (η1, η2)| − 1 ≤ η1, η2 ≤ 1 , (19)

which has independent limits. The transformation to collapsed coordinate system can be

interpreted as a mapping to a standard quadrilateral region (see Fig. 1). The orthogonal

expansion modes φpq are defined using warped tensors

φpq(ξ1, ξ2) = ψap(η1)ψ

bpq(η2) . (20)

If Pα,βp (z) denotes the pth order Jacobi polynomial, the principal functions ψa

i (z) and ψbij(z)

are defined as

ψai (z) = P 0,0

i (z) , ψbij(z) =

(

1 − z

2

)i

P 2i+1,0j (z) . (21)

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 9: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 9

pq

p

p

aψp(η1)q

ξ1

ξ2

ψpq(η2)b∼ ∼

φpq(ξ1,ξ2) = ψp(η1) ψpq(η2)a b~ ~

Figure 2. Construction of the p-type expansion basis.

The construction of the two-dimensional expansion basis is illustrated in Fig. 2. In addition

to giving rise to an orthogonal mass matrix, the use of the collapsed coordinate system means

that integrals over the domain Te can be evaluated as the product of two one-dimensional

integrals. We can therefore use Gauss-Lobatto quadrature in the ξ1-direction and Gauss-

Radau quadrature in the ξ2-direction, in order to avoid incorporating any information from

the geometrically singular vertex (ξ1 = −1, ξ2 = 1). Note that even though there are two

transformations, (x, y) → (ξ1, ξ2) and (ξ1, ξ2) → (η1, η2), the second transformation can be

incorporated in the quadrature weights and therefore does not have to be computed explicitly.

Finally, we write the approximate solution within an element Uδ as

Uδ(x, t) =

P∑

p=0

P∑

q=0

Upq(t)φpq (ξ1, ξ2) , x ∈ Te , (22)

where Upq(t) contains the local degrees of freedom of expansion coefficients and the trial

functions φpq (ξ1, ξ2) (and also the test functions) are described by eq. (20).

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 10: A triangular spectral/hp discontinuous Galerkin method for

10 C. ESKILSSON AND S.J. SHERWIN

3.3. Numerical flux

As mentioned above integrals over the domain Te are evaluated using Gauss-Lobatto and

Gauss-Radau quadrature rules. However, using the Gauss-Lobatto or Gauss-Radau quadrature

when estimating the surface integral would mean having to estimate a 2D flux at the end points

(corresponding to the vertices). Hence, it is advantageous to use Gauss quadrature points as

the end points are not included. Computing the flux at a Gauss point on the edge corresponds

to solving a 1D Riemann problem in the normal direction to the edge.

In the context of DG SWE models previously both the Roe and HLL approximate solvers

have been successfully applied [14, 12], with equivalent results [12]. Alternatively, the numerical

flux can be evaluated using the simpler but more dissipative Lax-Friedrich flux [13, 16]. In the

case of smooth flows even straightforward averaging have been reported to work [15].

For high-order DG methods the most widely used numerical flux is the Lax-Friedrich flux,

as the importance of the choice of flux appears to decrease with increasing expansion order [8].

However, in the case of shocks the application of the generalized slope limiter will lower the

approximation within the element to linear and so that the Lax-Friedrich flux might prove too

dissipative. In this study we have therefore adopted the HLLC approximate Riemann solver

in conjunction with the two-rarefaction assumption [3].

Introducing the rotation matrix and its inverse

T =

1 0 0

0 nx ny

0 −ny nx

, T−1 =

1 0 0

0 nx −ny

0 ny nx

, (23)

we subsequently define Q = TUδ = [H,Hu,Hv]T; where u and v are the velocities in the

direction normal and tangential to the edge, respectively. The 1D flux at a Gauss point can

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 11: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 11

LS RS*S

x

t

RQLQ

L*Q R*Q

Figure 3. Three wave structure of the HLLC approximate Riemann solver.

be written

F(Uδ) · n = T−1E(Q) . (24)

The HLLC solver [3] is based on three wave speed estimates as illustrated in Fig. 3, where

the subscripts L and R stand for the left- and right-hand side of the element boundary. We

estimate the wave speeds as [3]:

SL = uL −√

gHL sL , (25a)

SR = uR +√

gHR sR , (25b)

S∗ =SLHR (uR − SR) − SRHL (uL − SL)

HR (uR − SR) −HL (uL − SL), (25c)

where

S(L,R) =

(

H2∗ +H∗H(L,R)

)

/(

2H2(L,R)

)

if H∗ > H(L,R) ,

1 if H∗ ≤ H(L,R) ,

(26)

and in which H∗ is given by the two-rarefaction Riemann solver:

H∗ =1

g

(

1

2(√

gHL +√

gHR) +1

4(uL − uR)

)2

. (27)

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 12: A triangular spectral/hp discontinuous Galerkin method for

12 C. ESKILSSON AND S.J. SHERWIN

After the wave speeds have been computed the HLLC flux is given by:

E(Q) =

E(QL) if SL ≥ 0 ,

E(QL) + SL (Q∗L −QL) if SL ≤ 0 ≤ S∗ ,

E(QR) + SR (Q∗R −QR) if S∗ ≤ 0 ≤ SR ,

E(QR) if SR ≤ 0 ,

(28)

where Q∗L and Q∗R are obtained from

Q∗(L,R) = H(L,R)

(

S(L,R) − u(L,R)

S(L,R) − S∗

)

1

S∗

v(L,R)

. (29)

3.4. Boundary conditions

For all element edges aligned on a domain boundary we assign a dummy edge and enforce the

boundary conditions via the Riemann solver.

At a wall boundary we assume slip condition: (u, v) · n = 0. This is enforced by setting

ζR = ζL , uR = −uL , vR = vL , (30)

assuming that the local edge is the left state and the dummy edge is the right state, respectively.

At inflow boundaries, we set the values at the dummy edge to the a priori known values

and so the condition is enforced weakly throught the characteristic variables. In the case

where reflected outgoing waves appear at the inflow boundary, we apply the non-reflecting

flux function [21] which is found to work satisfactorily for higher p if the outgoing waves are

reasonably normal to the boundary. For outflow boundaries, if the flow can be expected to be

reasonably close to the normal direction, the values at the dummy edge is set equal to the

undisturbed initial state.

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 13: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 13

3.5. Time stepping

The time stepping is carried out using the explicit third-order Runge-Kutta scheme described

in [6]. Writing the semi-discrete equations as ∂tUδ = Lδ(Uδ), advancing from time level n to

n+ 1 are computed in three steps:

1. U(1)δ = Un

δ + ∆tLδ(Unδ ) , (31a)

2. U(2)δ =

3

4Un

δ +1

4

(

U(1)δ + ∆tLδ(U

(1)δ )

)

, (31b)

3. Un+1δ =

1

3Un

δ +2

3

(

U(2)δ + ∆tLδ(U

(2)δ )

)

. (31c)

The restriction on the time step is of order O(P−2), since the growth of the eigenvalue of the

advection operator is O(P 2) [20].

3.6. Slope limiting

When simulating shocks we apply the generalized slope limiter, ΛΠh, of Cockburn and

Shu [8] after each Runge-Kutta substep. The ΛΠh limiter works on the linear part of the

approximation. In order to determine when to limit our solution we compute the jump between

elements for the linear part of the approximation. If the jump is larger than a prescribed

tolerance the approximation is lowered locally to second-order and the limiter is invoked.

The notation of the limiting is illustrated in Fig. 4, where bi refer to the barycenters of

the triangles Ti, i = 0, 1, 2, 3. The mid-point of the edges of the element to be limited, T0, are

indicated by mi, i = 1, 2, 3. The nonnegative coefficients αi and βi depend on mi and the

geometry, e.g.:

m1 − b0 = α1(b1 − b0) + β1(b2 − b0) , (32)

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 14: A triangular spectral/hp discontinuous Galerkin method for

14 C. ESKILSSON AND S.J. SHERWIN

Figure 4. Notation for limiting.

and for linear functions, denoted by the subscript 1, we subsequently get

A(m1, T0) ≡ U1(m1) − UT0= α1

(

UT1− UT0

)

+ β1

(

UT2− UT0

)

≡ B(m1, T0) . (33)

Here UTiis the mean value of Uδ in Ti, which for the modal basis adopted in this work is

simply equal to U00(Ti) (the first modal expansion coefficient).

The limiting is performed on the characteristic fields. Considering the Jacobian

∂F(

UT0

)

∂U· mi − b0

|mi − b0|, (34)

and recalling eqs. (9-10), we obtain the corresponding R and L matrices. Left multiplying

A(mi, T0) and B(mi, T0) with L generates the characteristic fields.

As discussed in [8] limiting consists of computing the quantities

δi = m (LA(mi, T0), νLB(mi, T0)) , (35)

where ν > 1 is an auxiliary parameter (set equal to 2). The modified minmod function, m, is

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 15: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 15

defined as

m(a1, a2) =

a1 , if |a1| ≤M(∆x)2 ,

m(a1, a2) , otherwise ,

(36)

in which M is a constant (set equal to 50), ∆x is a measure of the element size and m is the

standard minmod function

m(a1, a2) =

smin(|a1|, |a2|) , if s = sign(a1) = sign(a2) ,

0 , otherwise .

(37)

We then return to the original space by left multiplying δi with R: ∆i = Rδi. Now, we can

write the limited solution in T0 as

ΛΠhU1 =(

U00 + ˜U00

)

φ00 + ˜U01φ01 + ˜

U10φ10 , (38)

where [10]

˜U00 =

1

3(∆1 + ∆2 + ∆3) , (39a)

˜U01 = −1

3(2∆1 − ∆2 − ∆3) , (39b)

˜U10 =

1

2(∆2 − ∆3) . (39c)

Clearly ˜U00 must be zero in order to keep the mean of T0 unchanged. If ˜

U00 6= 0 then ∆i are

adjusted as suggested in [8] by calculating:

pos =

3∑

i=1

max(0,∆i) , neg =

3∑

i=1

max(0,−∆i) , (40)

and

θ+ = min

(

1,neg

pos

)

, θ− = min

(

1,pos

neg

)

. (41)

We then compute

∆i = θ+ max(0,∆i) − θ− max(0,−∆i) , (42)

and employ ∆i instead of ∆i in eqs. (39a-c).

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 16: A triangular spectral/hp discontinuous Galerkin method for

16 C. ESKILSSON AND S.J. SHERWIN

4. COMPUTATIONAL EXAMPLES

4.1. Standing wave

We demonstrate the exponential convergence of the model by considering the simple case of a

linear standing wave in a rectangular frictionless basin, with the analytical solution:

H(x, y, t) = d+ a cos(kx) cos(ωt) , (43a)

u(x, y, t) = aω

kdsin(kx) sin(ωt) , (43b)

v(x, y, t) = 0 , (43c)

where a is the amplitude, k the wave number and ω the frequency such that ω2 = gdk2. The

dimensions of the basin are 200 × 100 m and the still water depth is set to d = 10 m. We

compute one wave period for a standing wave of wavelength L = 400 m with a = 0.2 m, using

the linearised SWE with the Coriolis parameter set to zero. The time step is chosen sufficiently

small so temporal error is negligible compared to spatial error. In Table I we present the error

and order of accuracy for in the L2 and L∞ norms. It is seen that the convergence – when

in the asymptotic range – is optimal and of order O(hP+1) in both the L2 and L∞ norms

for both odd and even P . Thus, in the case of p-type refinement we obtain exponentially fast

convergence, as illustrated in Fig. 5.

4.2. Equatorial Kelvin and Rossby waves

Here we solve the SWE, including Coriolis forces, in non-dimensional variables (denoted with

asterisks):

x =r

E1/4x∗ , t =

E1/4

2Ωt∗ , ζ = d0ζ

∗ , (u, v) =1√gd0

(u∗, v∗) , f =2Ω

E1/4y∗ , (44)

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 17: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 17

Table I. Error and order of convergence for the H-component

N = 16 N = 64 N = 256

Norm P error error order error order

L2 1 5.9368E-01 1.1036E-01 2.43 2.4301E-02 2.18

2 2.3578E-02 2.9446E-03 3.00 3.6933E-04 3.00

3 1.1690E-03 7.2890E-05 4.00 4.5704E-06 4.00

4 4.5379E-05 1.4247E-06 4.99 4.4809E-08 4.99

L∞ 1 1.2106E-02 3.8632E-03 1.65 1.0287E-03 1.91

2 1.5059E-03 2.1294E-04 2.82 2.5690E-05 3.05

3 9.8556E-05 6.7661E-06 3.86 4.3254E-07 3.97

4 5.0395E-06 1.7785E-07 4.82 5.4439E-09 5.03

P

Err

or

0 1 2 3 4 510-10

10-8

10-6

10-4

10-2

100

102

L∞

L2

Figure 5. Exponential convergence in the case of p-type refinement (N = 64).

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 18: A triangular spectral/hp discontinuous Galerkin method for

18 C. ESKILSSON AND S.J. SHERWIN

where E = 4Ω2r2(gd0)−1 is the Lamb parameter, r is the radius of the earth, Ω = 2π day−1

is the angular frequency of the earth’s rotation and d0 is the equivalent depth for a reduced

gravity model. Using an equivalent depth of 0.40 m, the length scale becomes 295 km and the

time scale 1.71 days [22]. For convenience we drop the asterisks for the rest of this section.

First we use the linearised SWE to simulate a linear equatorial Kelvin wave, with the analytic

solution:

H(x, y, t) = 1 + exp

(

−y2

2

)

exp

(

− (x+ 5 − t)2

2

)

, (45a)

u(x, y, t) = exp

(

−y2

2

)

exp

(

− (x+ 5 − t)2

2

)

, (45b)

v(x, y, t) = 0 . (45c)

The equatorial Kelvin wave propagates eastward in a rectangular basin of size 20 × 10 non-

dimensional units with constant depth and semi-periodic boundaries. Setting the friction to

zero, the Kelvin wave propagates unchanged (see Fig. 6). Integrating for 10 and 100 time units,

the CPU times for obtaining an “engineering accuracy” of 10 % and a “scientific accuracy”

of 1 % relative error – using different polynomial orders and time steps – are presented in

Table II. Note that when obtaining the values presented in Table II, for simplicity, we have

used structured uniform triangular meshes. Note also that for these large errors we are usually

not in the asymptotic range of convergence. Nevertheless, from Table II it is evident that the

model becomes increasingly efficient with increasing order in the limit of long-time integration.

Secondly, we consider the case of a westward travelling solitary Rossby wave using the

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 19: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 19

0

0.05

0.1

ζ

-10

-5

0

5

10

x

-5

0

5

y

YX

Z(a)

0

0.05

0.1

ζ

-10

-5

0

5

10

x

-5

0

5

y

YX

Z(b)

Figure 6. Propagation of an equatorial Kelvin wave (64 elements of order 14).

(a) Initial condition and (b) at t = 10.

Table II. CPU time in sec. for obtaining a fixed relative error of the H-

component (using a single 2GHz Pentium IV processor).

Relative Integration P = 2 P = 4 P = 6

error time CPU N CPU N CPU N

10 % 10 1.1E+00 144 3.7E-01 36 3.3E-01 16

100 5.2E+01 400 1.0E+01 64 1.3E+01 36

1 % 10 3.2E+01 1296 2.1E+00 100 1.3E+00 36

100 4.5E+02 1600 6.0E+01 196 3.1E+01 64

nonlinear SWE. The zeroth order initial conditions are given by [22]:

H(x, y, 0) = 1 + Γ(x)

(

3 + 6y2

4

)

exp

(

−y2

2

)

, (46a)

u(x, y, 0) = Γ(x)

(−9 + 6y2

4

)

exp

(

−y2

2

)

, (46b)

v(x, y, 0) =∂Γ(x)

∂x2y exp

(

−y2

2

)

, (46c)

where Γ(x) = 0.771 a2 sech2(ax) and where a is the parameter determining the amplitude of

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 20: A triangular spectral/hp discontinuous Galerkin method for

20 C. ESKILSSON AND S.J. SHERWIN

XY

Z

(a)

XY

Z

(c)

XY

Z

(b)

XY

Z

(d)

Figure 7. Propagation of an equatorial Rossby solitary wave. (a) Initial surface

elevation, (b) after 10 time units, (c) after 20 time units and (d) after 40 time

units.

the solitary wave (set to 0.395). We discretized the 48×16 unit basin into 96 elements of order

8 and integrate for 40 time units using 1 000 time steps. All boundaries are treated as walls.

Figure 7 shows the evolution of the wave. Initially the wave lose some mass as an eastward

propagating Kelvin wave, which is caused by the use of non-exact initial condition [4]. The

computed phase velocity is −0.77 ms−1, in good agreement with the analytical value of −0.78

ms−1. The result is in accordance with results obtained by high-order continuous Galerkin

models [4, 5].

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 21: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 21

0

2

4

6

8

10

12

Waterdepth

[m]

050

100150

200x [m] 0

50

100

150

200

y[m

]

(a)

0

2

4

6

8

10

12

Waterdepth

[m]

050

100150

200x [m] 0

50

100

150

200

y[m

]

(c)

0

2

4

6

8

10

12

Waterdepth

[m]

050

100150

200x [m] 0

50

100

150

200

y[m

]

(b)

0

2

4

6

8

10

12

Waterdepth

[m]

050

100150

200x [m] 0

50

100

150

200

y[m

]

(d)

Figure 8. Dam-break problem. Non-limited solutions. (a) Initial state. Water

depth at t = 7.2 s: (b) 214 elements of 4th order, (c) 214 elements of 6th order

and (d) 436 elements of 6th order.

4.3. Dam-break

The instantaneous failure of an anti-symmetric dam is a standard test case for shock-capturing

SWE models. The computational domain consists of a 200 × 200 m region with a 10 m wide

dam. The dam runs parallel to the y-axis, centred at x = 100 m, while the breach is 75 m

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 22: A triangular spectral/hp discontinuous Galerkin method for

22 C. ESKILSSON AND S.J. SHERWIN

wide and centred at y = 125 m. The bottom is horizontal and frictionless. The water depth is

10 m upstream of the dam and 5 m downstream, see Fig. 8a. The fluid is initially at rest and

at the upstream (x = 0 m) and downstream (x = 200 m) boundaries the water depth is held

constant to the initial values. All other boundaries are treated as walls.

The domain is discretized into 214 elements and we simulate up to 7.2 s after the dam-break

using a time step of 0.01 s. In Fig. 8(b-c) we show the results using 4th and 6th order expansions

without limiter, respectively. We observe a bore travelling downstream and a rarefaction wave

travelling upstream. The results are, in general, similar to results presented in the literature

[2, 24, 23] with the exception of the Gibbs oscillations inevitably produced by a high-order

method without limiting. The solution is initially improved by the increase of polynomial

order. However, after the solution is properly resolved the oscillations increase with increasing

order, and no further benefit is obtained from p-type refinement. In addition, without any

limiter the oscillations also increased when h-type refinement is performed, as seen from Fig.

8d. Nevertheless, the oscillations are confined to just the neighbouring elements and do not

degrade the general solution away from the shock.

Figure 9 shows limited solutions of the same problem using 436 and 3502 elements of 3rd

order. The limiter is invoked if the jump in water depth normalised with the mean water depth

is larger than 0.01. We see that upstream of the dam the solution has not been limited to any

larger extent in either of the two simulations. The shock transition takes in general two to

three elements – which for the coarse mesh gives a very wide shock. A close look on Fig. 9

reveals that there still are some minor oscillation present in both simulations, but on the whole

the oscillations have been suppressed by the limiter.

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 23: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 23

0

2

4

6

8

10

12

Waterdepth

[m]

050

100150

200x [m] 0

50

100

150

200

y[m

]

(a)

0

2

4

6

8

10

12

Waterdepth

[m]

050

100150

200x [m] 0

50

100

150

200

y[m

]

(b)

Figure 9. Dam-break problem. Limited solutions. Water depth at t = 7.2 s:

(a) 436 elements of 3rd order and (b) 3502 elements of 3rd order.

4.4. Harbour problem

Here we illustrate the model’s ability to handle complex geometries with the more practical

application of wave disturbance in an harbour. Consider the realistic port layout presented in

Fig. 10. The layout is based on the Port of Visby, located on the island Gotland in the Baltic

Sea, with the simplification that the break-waters are modelled to be fully reflective. During

autumn storms waves with periods up to 9 s and heights over 4.5 m can attack the harbour

from the direction indicated in Fig. 10a. As might be expected from the layout, problems are

most severe at berth no. 5. The wave induced motions of the ferry usually moored at this berth

can be so large it has to be moved to another berth in order to avoid damages on the RoRo

ramps, causing disruption of the cargo handling in the port.

In this simulation however, we illustrate the less severe case of a sinusoidal waves with a

period of 10.1 s and heights of 0.5 m penetrates the harbour. For this case we have applied a

uniform bottom friction with a Manning number of M = 0.031. The water is initially assumed

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 24: A triangular spectral/hp discontinuous Galerkin method for

24 C. ESKILSSON AND S.J. SHERWIN

x

y

0 500 1000 15000

500

1000

1500

(a)

Berth no. 5

1

3

1

2

3

3

3

3

3

3

3

33 3

3

1. Generating boundary2. Open boundary3. Wall boundary

3

Wave direction

x

y

0 500 1000 15000

500

1000

1500

d-2-3-4-5-6-7-8-9-10

(b)

Figure 10. Harbour layout. (a) Mesh and boundary conditions, (b) depth.

to be motionless. Figure 11 shows a snapshot of the the surface elevation after running the

model for 500 s using elements of polynomial order 5. At berth no. 5 the maximum wave height

during the simulation is roughly 0.35 m. If the outer break-water is elongated with 200 m –

as intended in the original layout, but abandoned for economic reasons – the wave height is

decreased to approximately 0.25 m.

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 25: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 25

X

YZ

Figure 11. Snapshot of surface elevation after 500 s.

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 26: A triangular spectral/hp discontinuous Galerkin method for

26 C. ESKILSSON AND S.J. SHERWIN

5. CONCLUSIONS

We have presented a high-order discontinuous Galerkin method for simulating 2D shallow

water flows on unstructured triangular domains. The model employs orthogonal modal

basis functions in space and a third-order Runge-Kutta scheme in time. The model was

shown to exhibit optimal convergence, O(hP+1), for smooth problems. Thus, we obtain the

expected exponential convergence in the case of p-type refinement, in accordance with previous

continuous high-order Galerkin models [4, 5]. The exponential convergence, in combination

with the diagonal mass matrix due to the orthogonal expansion basis, gives a computationally

efficient model. The efficiency is seen to increase with increasing order of the model and time

of integration – even for results of engineering accuracy.

The DG approach allows for discontinuous solutions, as illustrated with the dam-break test

case, which lead to Gibbs oscillations in the absence of any artificial viscosity, filter or limiter. In

contrast to classical continuous methods, however, the oscillations generally do not pollute the

whole solution or cause “blow-ups”. We removed the oscillations by applying the generalised

slope limiter. As the slope limiter lower the approximation order to linear at the vicinity of a

shock, it should ideally be combined with h-refinement to avoid losing accuracy upstream of

the shock.

The model’s geometrical flexibility and usefulness for “real-life” applications was

demonstrated considering wave disturbance in a harbour with complicated geometry. However,

due to the non-dispersive properties of the SWE the restriction of the water depth to wave

length ratio is too severe for many applications in coastal engineering. In order to relax the

restriction and allow simulation of dispersive waves Boussinesq-type equations can be used,

and present work is directed towards extending the SWE model to incorporate dispersive

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 27: A triangular spectral/hp discontinuous Galerkin method for

SPECTRAL/HP DGM FOR SWE 27

terms.

REFERENCES

1. Abbott MB. Computational Hydraulics, Elements of the Theory of Free Surface Flows. Pitman, London,

1979.

2. Chaudry, MH. Open-Channel Flow. Pretice Hall, New Jersey, 1993.

3. Toro EF. Shock-Capturing Methods for Free Surface Flows. Wiley, Chichester, 2001.

4. Ma H. A spectral element basin model for the shallow water equations. Journal of Computational Physics

1993; 109:133–149.

5. Iskandarani M, Haidvogel DB, Boyd JP. A staggered spectral element model with application to the oceanic

shallow water equations. International Journal for Numerical Methods in Fluids 1995; 20:393–414.

6. Cockburn B, Lin S-Y, Shu C-W. TVB Runge-Kutta local projection discontinuous Galerkin finite element

method for conservation laws III: one-dimensional systems. Journal of Computational Physics 1989; 84:90–

113.

7. Cockburn B, Shu C-W. TVB Runge-Kutta local projection discontinuous Galerkin finite element method

for conservation laws V: multidimensional systems. Journal of Computational Physics 1998; 141:199–224.

8. Cockburn B, Shu C-W. Runge-Kutta discontinuous Galerkin methods for convection-dominated problems.

Journal of Scientific Computing 2001; 16(3):173–261.

9. Biswas R, Devine KD, Flaherty JE: Parallel, adaptive finite element methods for conservation laws. Applied

Numerical Mathematics 1994; 14:255–283.

10. Burbeau P, Sagaut P, Bruneau Ch-H. A problem-independent limiter for high-order Runge-Kutta

discontinuous Galerkin methods. Journal of Computational Physics 2001; 169:111–150.

11. Lomtev I. A Discontinuous Galerkin Spectral/hp Element Method for Compressible Navier-Stokes

Equations. PhD thesis, Brown University, 1998.

12. Schwanenberg D, Kongeter J. A discontinuous Galerkin method for the shallow water equations with

source terms. In Discontinuous Galerkin Methods, Cockburn B, Karniadakis GE, Shu C-W (eds). Springer:

Heidelberg, 2000; 289–309.

13. Li H, Liu RX. The discontinuous Galerkin finite element method for the 2d shallow water equations.

Mathematics and Computers in Simulation 2001;56:171–184.

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls

Page 28: A triangular spectral/hp discontinuous Galerkin method for

28 C. ESKILSSON AND S.J. SHERWIN

14. Aizinger V, Dawson C. A discontinuous Galerkin method for two-dimensional flow and transport in shallow

water. Advances in Water Resources 2002; 25:67–84.

15. Dupont, F. Comparison of Numerical Methods for Modelling Ocean Circulation in Basins with Irregular

Coasts. PhD thesis, McGill University, 2001.

16. Giraldo FX, Hesthaven JS, Warburton T. Nodal high-order discontinuous Galerkin methods for the

spherical shallow water equations. Journal of Computational Physics 2002; 181:499–525.

17. Proriol J. Sur une famille de polynomes a deux variables orthogonaux dans un triangle, C.R. Acad. Sci

Paris 1957 257: 2459.

18. Koornwinder T. Two-variable analogues of the classical orthogonal polynomials. In Theory and

Applications of Special Functions 1975; Academic Press, San Diego.

19. Dubiner M. Spectral methods on triangles and other domains. Journal of Scientific Computing 1991;

6(4):345–390.

20. Karniadakis, G.Em., Sherwin, S.J. Spectral/hp element methods for CFD. Oxford University Press, US,

1999.

21. Sanders BF. Non-reflecting boundary flux function for finite volume shallow-water models. Advances in

Water Resources 2002; 25:195–202.

22. Boyd JP. Equatorial solitary waves. Part I: Rossby solitons. Journal of Physical Oceanography 1980;

10:1699–1717.

23. Wang J-W, Liu R-X. A comparative study of finite volume methods on unstructured meshes for simulation

of 2D shallow water wave problems. Mathematics and Computers in Simulation 2000;53:171–184.

24. Zoppou C, Roberts S. Numerical solution of the two-dimensional unsteady dam break. Applied

Mathematical Modelling 2000; 24:457–475.

Copyright c© 201 John Wiley & Sons, Ltd. Int. J. Numer. Meth. Fluids 201; 1:1–1

Prepared using fldauth.cls