25
Journal of Computational Physics 275 (2014) 459–483 Contents lists available at ScienceDirect Journal of Computational Physics www.elsevier.com/locate/jcp Variational space–time (dis)continuous Galerkin method for nonlinear free surface water waves E. Gagarina a,, V.R. Ambati a , J.J.W. van der Vegt a , O. Bokhove b,a,a Mathematics of Computational Science Group, Dept. of Applied Mathematics, University of Twente, P.O. Box 217, 7500 AE, Enschede, The Netherlands b School of Mathematics, University of Leeds, LS2 9JT, Leeds, United Kingdom a r t i c l e i n f o a b s t r a c t Article history: Received 25 October 2013 Received in revised form 21 May 2014 Accepted 18 June 2014 Available online 26 June 2014 Keywords: Nonlinear water waves Finite element Galerkin method Variational formulation Symplectic time integration Deforming grids A new variational finite element method is developed for nonlinear free surface gravity water waves using the potential flow approximation. This method also handles waves generated by a wave maker. Its formulation stems from Miles’ variational principle for water waves together with a finite element discretization that is continuous in space and discontinuous in time. One novel feature of this variational finite element approach is that the free surface evolution is variationally dependent on the mesh deformation vis-à-vis the mesh deformation being geometrically dependent on free surface evolution. Another key feature is the use of a variational (dis)continuous Galerkin finite element discretization in time. Moreover, in the absence of a wave maker, it is shown to be equivalent to the second order symplectic Störmer–Verlet time stepping scheme for the free-surface degrees of freedom. These key features add to the stability of the numerical method. Finally, the resulting numerical scheme is verified against nonlinear analytical solutions with long time simulations and validated against experimental measurements of driven wave solutions in a wave basin of the Maritime Research Institute Netherlands. © 2014 Published by Elsevier Inc. 1. Introduction The hydrodynamics of water waves in offshore regions of seas and oceans are of significant interest to naval architects and marine engineers. Particularly important is the dynamics of extreme wave phenomena, such as rogue waves, and their effect on offshore structures and ships. Engineers often test prototype models of ships and offshore structures in experimen- tal wave basins with wave makers to mimic realistic maritime environments. For extreme waves it is nontrivial to generate waves with specific properties at certain measurement locations in a wave basin. Numerical modeling of waves is therefore an important complementary activity. A class of water wave problems is described by the Laplace equation for the velocity potential with Neumann and nonlinear free surface boundary conditions. These free surface gravity wave equations are obtained from the Euler equations of fluid motion under the assumptions that the fluid is inviscid and incompressible, and the velocity field irrotational [18]. * Corresponding authors. E-mail addresses: [email protected] (E. Gagarina), [email protected] (V.R. Ambati), [email protected] (J.J.W. van der Vegt), [email protected] (O. Bokhove). http://dx.doi.org/10.1016/j.jcp.2014.06.035 0021-9991/© 2014 Published by Elsevier Inc.

Journal of Computational Physics - University of Twente · validation in Latifah and Van Groesen [23]. The outline of the paper is as follows. In Section 2, we present Miles’ variational

Embed Size (px)

Citation preview

Journal of Computational Physics 275 (2014) 459–483

Contents lists available at ScienceDirect

Journal of Computational Physics

www.elsevier.com/locate/jcp

Variational space–time (dis)continuous Galerkin method for

nonlinear free surface water waves

E. Gagarina a,∗, V.R. Ambati a, J.J.W. van der Vegt a, O. Bokhove b,a,∗a Mathematics of Computational Science Group, Dept. of Applied Mathematics, University of Twente, P.O. Box 217, 7500 AE, Enschede, The Netherlandsb School of Mathematics, University of Leeds, LS2 9JT, Leeds, United Kingdom

a r t i c l e i n f o a b s t r a c t

Article history:Received 25 October 2013Received in revised form 21 May 2014Accepted 18 June 2014Available online 26 June 2014

Keywords:Nonlinear water wavesFinite element Galerkin methodVariational formulationSymplectic time integrationDeforming grids

A new variational finite element method is developed for nonlinear free surface gravity water waves using the potential flow approximation. This method also handles waves generated by a wave maker. Its formulation stems from Miles’ variational principle for water waves together with a finite element discretization that is continuous in space and discontinuous in time. One novel feature of this variational finite element approach is that the free surface evolution is variationally dependent on the mesh deformation vis-à-vis the mesh deformation being geometrically dependent on free surface evolution. Another key feature is the use of a variational (dis)continuous Galerkin finite element discretization in time. Moreover, in the absence of a wave maker, it is shown to be equivalent to the second order symplectic Störmer–Verlet time stepping scheme for the free-surface degrees of freedom. These key features add to the stability of the numerical method. Finally, the resulting numerical scheme is verified against nonlinear analytical solutions with long time simulations and validated against experimental measurements of driven wave solutions in a wave basin of the Maritime Research Institute Netherlands.

© 2014 Published by Elsevier Inc.

1. Introduction

The hydrodynamics of water waves in offshore regions of seas and oceans are of significant interest to naval architects and marine engineers. Particularly important is the dynamics of extreme wave phenomena, such as rogue waves, and their effect on offshore structures and ships. Engineers often test prototype models of ships and offshore structures in experimen-tal wave basins with wave makers to mimic realistic maritime environments. For extreme waves it is nontrivial to generate waves with specific properties at certain measurement locations in a wave basin. Numerical modeling of waves is therefore an important complementary activity.

A class of water wave problems is described by the Laplace equation for the velocity potential with Neumann and nonlinear free surface boundary conditions. These free surface gravity wave equations are obtained from the Euler equations of fluid motion under the assumptions that the fluid is inviscid and incompressible, and the velocity field irrotational [18].

* Corresponding authors.E-mail addresses: [email protected] (E. Gagarina), [email protected] (V.R. Ambati), [email protected] (J.J.W. van der Vegt),

[email protected] (O. Bokhove).

http://dx.doi.org/10.1016/j.jcp.2014.06.0350021-9991/© 2014 Published by Elsevier Inc.

460 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

Free surface gravity water wave equations can also be obtained in a succinct way via Luke’s variational principle [26]or from its dynamical equivalent presented by Miles [30]. In the variational principle, the complete problem is embedded in a single functional. In addition, the variational formulation is associated with conservation of energy and phase space. Improved finite element solutions of the free surface water wave equations can be constructed directly from this variational formulation rather than from a separate weak formulation. Since variational finite element formulations have as main benefit that they provide a natural setting to ensure discrete energy and phase space conservation, they can more naturally lead to stable numerical schemes.

Variational and finite element formulations for free surface waves using potential flow can be found in Kim and Bai [19] and Kim et al. [20]. Their formulation is, however, restricted to an unbounded domain and involves a coordinate transformation to a reference domain. Klopman et al. [21] derived a variational Boussinesq model from Miles’ variational principle (see also [6,12]). More, standard finite element methods for free surface gravity water waves can be found in [27–29,42–45].

Another widely used numerical method for free surface waves using potential flow is the boundary integral method, which started with the work of Longuet-Higgins and Cokelet [25], and Vinje and Brevig [40]. This method has been applied extensively to two dimensional free surface waves, see the surveys of Romate and Zandbergen [33] and Tsai and Yue [37]. Applications in three dimensions (3D) using boundary integral methods are widespread [3,5,9,10,14,17]. A comparison be-tween the work load of boundary and finite element methods is made in Bettess [4], with finite element methods being competitive in anisotropic domains.

More recently, discontinuous Galerkin (DG) methods for elliptic problems have enabled researchers to model free surface water waves with DG methods (see the overview in Arnold et al. [2]). In particular, space–time DG methods, in which time is considered as an additional coordinate and the problem is solved in d +1 space, with d the spatial dimension, are promising for free surface flows with their deforming domains. Space(–time) DG finite element methods for linear free surface wave problems were developed in Van der Vegt and Tomar [38] and for nonlinear flows in Van der Vegt and Xu [39]. The latter approach suffers, however, from instabilities for higher amplitude waves because the coupling between the free surface dynamics and the interior mesh movement is suboptimal. We have overcome this shortcoming by directly discretizing the fluid dynamical variational principle for potential flow water waves.

Numerically solving the nonlinear free surface gravity wave equations poses a number of challenges:

(i) the solution of the governing equations depends on the position of the free surface, which is not known a priori;(ii) the flow domain continuously deforms in time, not only due to the free surface motion, but also due to the presence

of a wave maker;(iii) energy drift needs to be avoided in time in order to minimize numerical decay of wave amplitude (in the unforced

limit); and,(iv) dispersion errors need to be small for accurate capturing of complex wave interactions.

To cope with these challenges, we developed a variational finite element method for nonlinear free surface gravity water waves based on Miles’ variational principle.

In our space-plus-time approach, space is discretized first by considering expansions in terms of continuous basis functions in space. These are substituted directly into Miles’ variational principle. The resulting space discrete variational principle is either autonomous (i.e., with no explicit time dependence) or non-autonomous (i.e., including the explicit time dependence due to the wave maker) in time. Subsequently, we develop a time (dis)continuous Galerkin approach by using discontinuous basis functions in time to discretize this spatially discrete variational principle, by first eliminating the interior degrees of freedom. The result is that the free surface becomes continuous while the (surface) velocity potential remains discontinuous in time. A posteriori, we also establish the time discretization of the interior degrees of freedom. The final result is a space and time discrete variational principle.

By taking variations of this space(–time) discrete variational principle, a system of nonlinear ordinary-differential (or algebraic equations) for the free surface height and the velocity potential is obtained. Besides directly discretizing the variational principle, the central key features that make this discretization robust and stable are as follows:

(i) Variations of the positions of interior nodes of the dynamic mesh must be related variationally to the free surface nodes. If one removes this intrinsic dependence the resulting numerical scheme is prone to be unstable.

(ii) The new variational time discretization deals with the intrinsically coupled dynamical system, both in the autonomous and non-autonomous cases, the latter with driven waves.

These two features appear to contrast with earlier (DG) finite element approaches, and result in a stable numerical scheme with no drift of the discrete energy and preservation of discrete phase space.

For a certain linear approximation of the flow fields in time, our space–time variational finite element method results in a time discretization similar to the symplectic Störmer–Verlet time discretization. In the autonomous case without wave maker, we show that it is a Störmer–Verlet time discretization [15] of the dynamics at the free surface. The latter dy-namics constitute a standard yet nonlinear canonical Hamiltonian system (of ordinary differential equations before time is discretized as well). The first two steps in the time integration scheme are implicit, and the third step is explicit. Hence, the

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 461

Fig. 1. Sketch of the numerical wave basin with water waves generated by a piston wave maker.

variational finite element discretization leads to a system of nonlinear algebraic equations. It is solved by a Newton method yielding a sparse matrix. The sparsity depends directly on the number of nodes surrounding each node in the flow domain. The sparse matrix storage routines and sparse iterative or direct solvers of the PETSc package are used [34–36].

Our variational finite element method is verified against a nonlinear semi-analytical solution by Fenton and Rienecker [8] for horizontally periodic waves and validated against experimental data sets provided by the Maritime Research Institute Netherlands (MARIN). These experiments are conducted using two wave basin configurations, one with a varying bottom and one with a flat bottom. In both cases, waves are generated with a piston type wave maker at one end of the domain. This experimental setup can lead to highly irregular waves as well as wave focussing, in which a slow moving wave train is overtaken by a fast moving wave train. More information on the experiments can be found in [16] and another numerical validation in Latifah and Van Groesen [23].

The outline of the paper is as follows. In Section 2, we present Miles’ variational principle for nonlinear free surface waves and derive the governing equations. In Section 3, the variational finite element method is formulated. Subsequently, the numerical verification and experimental validation are discussed in Section 4. Finally, conclusions are drawn in Sec-tion 5.

2. Variational description of nonlinear inviscid water waves

We consider water waves generated by a wave maker in a two-dimensional wave basin in a vertical plane. This restriction to two dimensions is not essential to our approach. The fluid is assumed to be inviscid, irrotational and incompressible. A sketch of the wave basin is shown in Fig. 1.

The dynamics of water waves are governed by the following variational principle (cf., Miles [30]):

0 = δL(φ,η,φs)dt

:= δ

T∫0

( L∫R(t)

(φs

∂η

∂t− 1

2g(η2 − H2))dx −

L∫R(t)

η(x,t)∫−H(x)

1

2|∇φ|2dzdx −

η(R(t),t)∫−H(R(t))

dR

dtφw dz

)dt, (1)

where (x, z) are the horizontal and vertical coordinates, respectively, ∇ is the gradient operator in the vertical plane, φ(x, z, t) the velocity potential, u := ∇φ the irrotational velocity field, and Ω = {R(t) < x < L, −H(x) < z < η(x, t)} ⊂ R

2

the time dependent flow domain. The boundaries of Ω are the free surface boundary S F : z = η(x, t) with η the free sur-face height, the fixed bed at the bottom S B : z = −H(x) (z = 0 is the fixed reference level of the free surface at rest), a piston wave maker SW : x = R(t) and a solid wall SL : x = L. For brevity’s sake, we define φs(x, t) = φ(x, η(x, t), t), φw(z, t) = φ(R(t), z, t), ηw(t) = η(R(t), t), H w = H(R(t)) and φsw(t) = φ(R(t), η(R(t), t), t). Note that the wave maker moves only horizontally and that the free surface is assumed to be singly-valued.

Taking the variational derivatives with respect to φ, η and φs in (1) yields

0 = δL =T∫

0

(−

∫Ω(t)

∇φ · ∇δφ dxdz −ηw (t)∫

−H w (t)

dR

dtδφw dz

+L∫

R(t)

(∂η

∂tδφs + φs

∂δη

∂t−

(gη + 1

2|∇φ|2s

)δη

)dx − dR

dtφswδηw

)dt. (2)

We simply took the variations with respect to the time-dependent boundary z = η of the domain Ω(t), but could alterna-tively have used a variational analogue of the Reynolds transport theorem as in [12]. Integrating (2) by parts in space using Gauss’ divergence theorem as well as integrating the term φs∂δη/∂t in (2) by parts in time using Leibnitz’s rule yields

462 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

0 = δL =T∫

0

( ∫Ω(t)

∇2φδφ dxdz −∫

∂Ω(t)

n · ∇φδφ dS −ηw (t)∫

−H w (t)

dR

dtδφw dz

+L∫

R(t)

(∂η

∂tδφs −

(∂φs

∂t+ gη + 1

2|∇φ|2s

)δη

)dx +

L∫R(t)

φsδηdx|T0

)dt, (3)

with ∂Ω := S F ∪ S B ∪ SW ∪ SL and n the outward unit normal vector at the boundary ∂Ω , and dS an infinitesimal line element along such a boundary. Due to the integration by parts in time an additional term arises such that the last term in (2), the point at the free surface and wave-maker, cancels. By using the relations

δφs = (δφ)s + (∂φ/∂z)sδη, (4a)∫S F

dS =L∫

R(t)

∣∣∇(z − η)∣∣dx, (4b)

n|S F = ∇(z − η)/∣∣∇(z − η)

∣∣, (4c)

δη(x,0) = δη(x, T ) = 0 (4d)

and after splitting the boundary integrals over the different types of boundary faces, the variations in (3) become

0 = δL =T∫

0

( ∫Ω(t)

∇2φδφ dxdz −∫

S B∪S L

n · ∇φδφ dS

−ηw (t)∫

−H w (t)

(dR

dt−

(∂φ

∂x

)w

)δφw dz +

L∫R(t)

((∂η

∂t+

(∂φ

∂x

)s

∂η

∂x−

(∂φ

∂z

)s

)δφs

−(

∂φs

∂t+ gη + 1

2

(∂φs

∂x

)2

− 1

2

(∂φ

∂z

)2

s

(1 +

(∂η

∂x

)2))δη

)dx

)dt. (5)

Given the arbitrariness of the variations involved in (5), the following dimensional equations of motion emerge

∇2φ = 0 in Ω(t), (6a)dR

dt= ∂φ

∂xat SW (t) : x = R(t), (6b)

n · ∇φ = 0 at S B : z = −H(x) ∪ SL : x = L, (6c)

∂η

∂t+

(∂φs

∂x

)∂η

∂x−

(∂φ

∂z

)s

(1 +

(∂η

∂x

)2)= 0 at S F (t) : z = η(x, t), (6d)

∂φs

∂t+ 1

2

(∂φs

∂x

)2

+ gη − 1

2

(∂φ

∂z

)2

s

(1 +

(∂η

∂x

)2)= 0 at S F (t) : z = η(x, t), (6e)

viz. the Laplace equation with Neumann boundary conditions (at solid walls) and the free surface equations expressed in terms of the surface potential φs and wave height η. Recall that ∂(φs)/∂t �= (∂φ/∂t)s , cf. (4a).

3. Variational finite element formulation

3.1. Tessellation

A point x ∈ R3 in the space–time domain E has coordinates x = (t, x, z). The flow domain Ω(t) at time t is defined as

Ω(t) := {(x, z) ∈ R2 | (t, x, z) ∈ E}. The space–time domain boundary ∂E consists of the hypersurfaces Ω(0) := {x ∈ ∂E | t = 0},

Ω(T ) := {x ∈ ∂E | t = T } and Q := {x ∈ ∂E | 0 < t < T } =: S F ∪ SW ∪ S B ∪ SL × (0, T ).Using the partition 0 ≤ · · · < tn < · · · ≤ tN+1 = T of the time interval (0, T ), we can subdivide the space–time domain E

into space–time slabs En := {x ∈ E | t ∈ (tn, tn+1)} with 0 ≤ n ≤ N . If the space–time boundary faces that are part of Q are restricted to the space–time slab En then we use the superscript n. The remaining boundaries of the space–time slab En are Ωn = Ω(tn) and Ωn+1 = Ω(tn+1).

The tessellation Th is constructed by generating a mesh with quadrilateral elements in the domain Ω(t), yielding the computational domain Ωh(t). The spatial elements are denoted as Kke , with ke the element index in the tessellation. Due

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 463

to the free surface and wave maker motion the nodes of each element K nke

at t = tn in domain Ωh(tn) will move to a new position at t = tn+1, resulting in the spatial element K n+1

keand domain Ωh(tn+1). The mesh deformation due to the domain

boundary motion is unknown a priori and part of the solution. The geometry of the elements is therefore updated during the solution process.

We will consider structured meshes. Nodes at the free surface and wave maker belong, respectively, to the sets NF and NW ; nodes in the domain Ωh are collected in the set NΩh and nodes of the domain excluding the free surface nodes in Ω̄h \ S F , with Ω̄h the closure of Ωh , in the set NΩ̄h

. The domain is split in two parts: in Ω1h : R(t) < x < Lw the nodes in the mesh can move horizontally as well as vertically and in Ω2h : Lw < x < L with Lw < L and −H(x) < z < η(x, t) the nodes in the mesh move only in the vertical.

3.2. Function spaces and approximations

The space for two-dimensional basis functions ϕ̃ on Ω for the potential φ is W 1(Ω) = {ϕ̃ ∈ H1(Ω)} with the standard Sobolev space H1(Ω). The approximation φh to potential φ is φh ∈ W

kp

h = W 1(Ω) ∪ Xkp

h with Xkp

h a finite element space of continuous Lagrange basis functions, and including at least polynomials of degree kp on each element Kke . The free surface S F is parameterized with coordinate x ∈ [R(t), L]. The associated space for the one-dimensional basis functions ϕon x ∈ [R(t), L] for the free surface height η and the free surface potential φs is W 1([R(t), L]) = {ϕ ∈ H1([R(t), L])}.

The nodes of the elements are time dependent, making the standard global basis functions also time dependent, as follows. For simplicity, we use quadrilateral elements with the standard two-dimensional piecewise linear and continuous (global) basis functions ϕ̃ j(x, z, t) in space for the “interior” potential φ(x, z, t). The four local basis functions on a quadri-lateral element Kke are

ψ̂α(ζ1, ζ2) = 1

4(1 ± ζ1)(1 ± ζ2) (7)

on the reference element K̂ = (ζ1, ζ2)T = [−1, 1]2 with local node numbers α = 1, . . . , 4. Physical coordinates and local

reference coordinates are related by a mapping Fke with the same standard shape basis functions

Fke : K̂ → Kke : (ζ1, ζ2) → (x, z) := (xke(α), zke(α))ψ̂α(ζ1, ζ2), (8)

with the four vertex coordinates (xke(α)(t), zke(α)(t)) of Kke at time t , global node number j = ke(α), in which Einstein’s convention of summation over repeated indices (here α) has been used. Similarly, one-dimensional piecewise linear and continuous basis functions ϕl(x, t) in space are used at the free surface, for η(x, t) and φs(x, t). Given free-surface element K̄ks and local node number β , the global free-surface node number l = ks(β). The mapping for each free surface face K̄ks to the reference element K̄ = ζ ∈ [−1, 1] reads

F̄ s : K̄ → K̄ks : ζ → x = xks(β)(t)ψβ(ζ ), (9)

with x-coordinates xks(β)(t) of the two surface nodes. The standard two elemental shape functions with ks the global free-surface element index are ϕks(β)(x(ζ, t), t) = ψβ(ζ ) = 1

2 (1 ± ζ ) with local index β = 1, 2. When reference coordinates are used the time dependence in the formulation appears in the Jacobian of the mapping (see also Appendix A).

The resulting global finite element approximations are

φh(x, z, t) = φ j(t)ϕ̃ j(x, z, t), (10a)

φsh(x, t) = φk(t)ϕk(x, t) and ηh(x, t) = ηl(t)ϕl(x, t), (10b)

in which indices i, j = 1, . . . , Nn concern all nodes of the mesh and indices k, l, r, s = 1, . . . , N f only the free surface nodes (indices r, s are used later). Summation over repeated indices is adopted. Hereafter, nodes indexed by i′, j′ concern all nodes except the free surface ones. Due to the definition in reference coordinates, it follows that (ϕ̃l)s = ϕl , i.e., aligned here by taking ζ2 = 1 (see Appendices A and B).

Following our restriction to a single-valued free surface and a parameterization of the free surface as S F : (x, z = η(x, t)), the x-coordinate of the free surface nodes is a prescribed time-dependent function xk(t) in the x-direction, while the z-coordinate is z = ηh(xk, t). When there is no wave maker motion, the horizontal node positions xi are fixed in time. A consequence of this restriction is that the movements of the vertically-aligned interior nodes are slaved to the corre-sponding free surface nodes at the respective x-location. The computational mesh in the computational flow domain Ω1h(t)is then obtained by moving each node ik according to:

xik (t) = xik (0) + γx,ik R(t) and zik (t) = zik (0) + γz,ikη(xk, t), (11)

with the multiplication factors given by γx,ik := (Lw − xik (0))/Lw and γz,ik := (H(xk) + zik (0))/H(xk). Nodes ik below the respective free surface node k lie on vertical mesh lines. For the free surface node k, we find indeed that zk = η(xk, t)since zk(0) = 0. For the one at the bottom zik (t) = −H(xk) since then zik (0) = −H(xk). When the initial free surface at t = 0 has no elevation, then zk(0) = 0 for nodes at the free surface. So here we have limited the nodes xik (0) and zik (0)

to form a structured mesh. In Ω2h , only the vertical movement in (11) is retained with no horizontal node movement.

464 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

Fig. 2. A sketch is made of the discrete wave basin with a mesh in the area R(t) < x < Lw and −H(x) < z < η(x, t) influenced by the piston wave maker at x = R(t) with both horizontal and vertical mesh movement, and an area Lw < x < L with only vertical mesh movement.

A corresponding sketch of the discretized domain is given in Fig. 2. Our finite element approach permits this limitation to be lifted for a general parameterization S F : (xs(t), zs(t)) given free surface nodes k with positions (xs,k, zs,k).

The consequence of the mesh movement is therefore that the basis functions in (10) depend explicitly on time. Even for the case of unstructured mesh movement, this time dependence can generically be expressed as

ϕ̃ j(x, z, t) = ϕ̃ j(x, z;η, R(t)

)and ϕ j(x, t) = ϕ j

(x; R(t)

). (12)

The vector η(t) has components ηr(t), the vector φ̃(t) components φi′ (t) at interior nodes, and φ components φl(t) at free surface nodes. Hence, basis functions implicitly depend on time through the time dependence of the variables η and explicitly depend on time through the prescribed function R(t) for the piston position. The basis functions on the free surface do therefore not depend on time when R(t) is constant, i.e., in the absence of a wave maker. Hereafter we may not always distinguish these different types of time dependence in the basis functions explicitly.

3.3. Space-plus-time formulation

We demonstrate how the two key challenges (i) and (ii) mentioned in Section 1 are resolved by first discretizing the vari-ational principle (1) in space and subsequently in time. Without any integration by parts or use of Gauss’ law, substitution of expansions (10) into the variational principle (1) yields

0 = δ

T∫0

L(φ̃,φ,η; R(t)

)dt

= δ

T∫0

(Mklφk

dηl

dt− Dklφkηl − 1

2gMklηkηl − 1

2Aijφiφ j − Wmφm

)dt, (13)

with the following matrices and vectors defined as

Mkl(

R(t)) :=

L∫R(t)

ϕkϕldx, Dkl(

R(t)) := −

L∫R(t)

∂ϕl

∂tϕkdx, (14a)

Aij(η(t), R(t)

) :=∫

Ωh(t)

(∇ϕ̃i · ∇ϕ̃ j)dxdz, (14b)

Wm(η1(t), R(t)

) :=η1(t)∫

−H w (t)

dR

dtϕ̃m

∣∣∣∣x=R(t)

dz, (14c)

where η1(t) is the wave height variable on the wave maker, and index m is used for the nodes on the wave maker. The first node with m = 1 lies at the free surface and all other nodes on the wave maker carry index m′ . We will also use index m̃′for these interior wave maker nodes. Note that it may be desirable to discretize the bottom boundary also in a piecewise linear manner. Near the wave maker the bottom is, for simplicity, taken to be flat: H w = H(R(t)) is constant. These different kinds of time dependence have been explicitly indicated in (14) following that dependence in (12). The dependence Aij(η)

signifies that Aij in principle depends on all ηk ’s.Variation of (13) while incorporating (14) yields

0 =T∫

0

((Mkl

dηl

dt− Dklηl − Aikφi − W1δ1k

)δφk −

(d(Mklφk)

dt+ Dklφk + gMklηk + 1

2

∂ Aij

∂ηlφiφ j + ∂Wm

∂η1δ1lφm

)δηl

− (Ai′ j′φi′ + Alj′φl + Wm′δm′ j′)δφ j′)

dt, (15)

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 465

in which the boundary term arising from the integration by parts in time has vanished because we used δηl(0) = δηl(T ) = 0(the first relation says that the variation of the initial condition is zero, while the latter follows similarly by reversing time), and in which δmk is the Kronecker delta symbol: it is one when m = k and zero otherwise. The ordinary differential equations are therefore

δηl : d(Mklφk)

dt+ Dklφk + gMklηk + 1

2

∂ Aij

∂ηlφiφ j + ∂Wm

∂η1δ1lφm = 0 (16a)

δφk : Mkldηl

dt− Dklηl − Aikφi − W1δ1k = 0 (16b)

δφ j′ : Ai′ j′φi′ + Alj′φl + Wm′δm′ j′ = 0, (16c)

with clearly distinguished variations of surface degrees of freedom arising from the arbitrariness of δηl and δφk , and interior ones arising from δφ j′ .

The discretized Laplace equation reveals that we can eliminate the interior degrees of freedom indexed by i′, j′ as follows

φi′ = −Alj′ A−1j′ i′φl − Wm′ A−1

m′ i′ . (17)

Substitution of (17) into the variational principle (13) then leads to Hamiltonian free surface dynamics governed by the following variational principle

0 = δ

T∫0

L(φ,η; R(t)

)dt

= δ

T∫0

(Mklφk

dηl

dt− 1

2gMklηkηl − 1

2Bklφkφl − Dklφkηl − Clφl − F w

)dt, (18a)

in which the Schur complement

Bkl(η, R(t)

) = (Akl − Aki′ A−1

i′ j′ A j′l)

(18b)

of the full matrix Aij emerges as a consequence of this elimination of the interior degrees of freedom, a vector Cl and a function F w , i.e.,

Cl(η, R(t)

) = W1δ1l − Alj′ A−1j′m′ Wm′ and F w(t) = −1

2Wm̃′ A−1

m̃′m′ Wm′ . (18c)

The notation Bkl(η) means that Bkl depends in principle on all surface degrees of freedom η.Variational principle (18) in essence captures a discrete boundary element representation of the dynamics. One can verify

that the dynamics (16), in which the interior degrees of freedom φi′ or φ j′ have been eliminated using (17), follows directly from this free-surface variational principle (18). We never calculate the matrix inverse A−1

i′ j′ explicitly. This inverse is only used to derive the appropriate time stepping scheme in the next step. In the end, we “unfold” the algebraic system again to avoid a direct calculation of this inverse matrix because that is computationally expensive. It is large and depends implicitly and explicitly on time.

The variational principle (18) is a canonical Hamiltonian system

0 = δ

T∫0

(pl

dηl

dt− H

(p,η; R(t)

))dt (19)

with conjugate variables {pl, ηl} = {pl = Mklφk, ηl} and extended (Hamiltonian) function H = Hh + Hna split into the follow-ing Hamiltonian, Hh , and wave maker part, Hna (non-autonomous),

Hh ≡ 1

2gMklηkηl + 1

2Bklφkφl and Hna ≡ Dklφkηl + Clφl + F w . (20)

Without wave maker Hh is time independent and Hna disappears. A standard yet semi-implicit and symplectic finite-difference Störmer–Verlet time integrator [15] would then suffice to discretize (18) for R(t) = 0 (or (19) with Hna = 0).

The explicit time dependence that makes (18) a non-autonomous variational principle stimulated us to develop a discontinuous Galerkin finite element approach in time. In each time slab the DG basis functions ψt (t) are continuous and the associated space is V kt

h = {ψt ∈ Pkt (t ∈ (tn, tn+1))} with Pkt polynomials of degree kt . We will restrict atten-tion to piecewise linear polynomials ψt(t), i.e., kt = 1. We choose the following linear expansions within each time slab t ∈ (tn, tn+1 = tn + tn):

466 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

Fig. 3. Piecewise linear approximation in time of the potential φ , free surface potential φs and wave height η.

ηl(t) = ηn,+l

(tn+1 − t

tn

)+ ηn+1,−

l

(t − tn

tn

)and (21a)

φk(t) = φn+1/2k

2(t − tn)

tn+ φ

n,+k

(tn + tn+1 − 2t)

tn, (21b)

where ηn,±l = limε→0 ηl(tn ± ε), φn,+

k = limε→0 φk(tn + ε) and φn+1/2k = φk(t = tn+1/2). (For symplectic schemes the time

step needs to be fixed, such that tn = t , also in the simulations presented later.) A sketch of these temporal basis functions is given in Fig. 3. These expansions are continuous within the time slab but discontinuous across. Hence, we have to define the delta function arising from the time derivative in the term Mklφkdηl/dt in (18). The contribution of this term can either be posited, introduced by integrating by parts twice while introducing a numerical flux in one step but not the other, or by appealing to the theory of nonconservative products (for hyperbolic systems [7,32,31] or quasi-linear equations [41]). Alternatively, for the variational principles considered this contribution arises as a limit of a continuous Galerkin finite element method in time with even and odd numbered elements in which the odd elements are limited to zero.1 In all these different types of calculations, at node tn+1 an outcome is the contribution:

Mklφkdηl

dt≈ Mn+1,+

kl φn+1,+k

(ηn+1,+

l − ηn+1,−l

), (22)

i.e., Mklφk is evaluated on the future side of node tn+1 and a jump in η across tn+1 emerges. When Mkl is considered continuous in time, i.e., for continuous R(t), then Mn+1,+

kl = Mn+1kl . We will take R(t) continuous.

The other terms in the time integral of (18) are approximated over each time slab such that they are second order in time. The resulting integrals are then approximated by the following quadrature rules:

tn+1∫tn

Mklφkdηl

dtdt ≈ Mn+1/2

kl φn+1/2k

(ηn+1,−

l − ηn,+l

); (23a)

tn+1∫tn

Dklφkηldt ≈ 1

2 tn Dn+1/2

kl φn+1/2k

(ηn,+

l + ηn+1,−l

); (23b)

tn+1∫tn

1

2Mklηkηldt ≈ 1

4 tn Mn+1/2

kl

(ηn,+

k ηn,+l + ηn+1,−

k ηn+1,−l

); (23c)

and,

tn+1∫tn

1

2Bklφkφldt ≈ 1

4 tn(Bn+1/2

kl

(ηn,+) + Bn+1/2

kl

(ηn+1,−))

φn+1/2k φ

n+1/2l , (23d)

1 See Appendix C.

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 467

tn+1∫tn

Clφldt ≈ 1

2 tn(Cn+1/2

l

(ηn,+) + Cn+1/2

l

(ηn+1,−))

φn+1/2l . (23e)

In the first integral, we either approximate Mkl at the mid-time level, or we can view it as an exact evaluation of the entire conjugate variable expanded in a linear way in time. The remaining integrals are approximated using a mid-point rule with φk and time evaluated at t = tn+1/2. Here, Cn+1/2

l (ηn,+) = Cl(ηn,+, R(tn+1/2)), etc. The time derivative of ϕ in Dkl leads

via the chain rule to a partial derivative with respect to R(t) times dR/dt . The latter is either found explicitly or R(t) is approximated and then all expressions are evaluated at tn+1/2. Hence, by combining the resulting approximations derived in (22) and (23) the algebraic, space–time discrete variational principle at the free surface in essence becomes

0 = δ

N∑n=0

L[φn,+,φn+1/2,ηn,+,ηn+1,−]

(24a)

= δ

N∑n=0

Mn+1/2kl φ

n+1/2k

(ηn+1,−

l − ηn,+l

) − tn

2

(Hn+1/2(φn+1/2,ηn,+) + Hn+1/2(φn+1/2,ηn+1,−))

+ δ

N∑n=−1

Mn+1kl φ

n+1,+k

(ηn+1,+

l − ηn+1,−l

), (24b)

with Hn+1/2(φn+1/2, ηn+1,−) = H(φn+1/2, ηn+1,−, tn+1/2).Variation of (24) with respect to the independent variables indicated yields an extension of the symplectic Störmer–

Verlet time integration scheme

δφn+1,+k : ηn+1,+

l = ηn+1,−l (25a)

δηn,+l : Mn+1/2

kl φn+1/2k = Mn

klφn,+k − 1

2 tn ∂ Hn+1/2(φn+1/2,ηn,+)

∂ηn,+l

(25b)

δφn+1/2k : Mn+1/2

kl ηn+1,−l = Mn+1/2

kl ηn,+l + 1

2 tn

(∂ Hn+1/2(φn+1/2,ηn,+)

∂φn+1/2k

+ ∂ Hn+1/2(φn+1/2,ηn+1,−)

∂φn+1/2k

)(25c)

δηn+1,−l : Mn+1

kl φn+1,+k = Mn+1/2

kl φn+1/2k − 1

2 tn ∂ Hn+1/2(φn+1/2,ηn+1,−)

∂ηn+1,−l

. (25d)

We observe that while the finite element expansion in time was originally posed to be discontinuous, the variations enforce ηl to be continuous while φk remains discontinuous in time. Both the choice of the numerical flux (or path) and the quadratures used above were guided by our intention to derive the classic Störmer–Verlet scheme in the absence of explicit time dependence, i.e., here when R(t) = 0.

Finally, the inverse of the matrix Ai′ j′ in the non-constant matrix Bkl and the non-constant vector Cl can be avoided by unfolding the free surface dynamics again to include the interior degrees of freedom. When we use

φn,+i′ = −An+1/2

l j′(ηn,+)

A−1j′ i′

(ηn,+, tn+1/2)φn+1/2

l (26a)

φn+1,−i′ = −An+1/2

l j′(ηn+1,−)

A−1j′ i′

(ηn+1,−, tn+1/2)φn+1/2

l (26b)

at two time levels, the integral of the kinetic energy K in the standard Hamiltonian Hh = K + P = Aijφiφ j/2 + gMklηkηl/2can be rewritten as2

N∑n=0

1

2 tn(K

(φ̃

n,+,φn+1/2,ηn,+, tn+1/2) + K

(φ̃

n+1,−,φn+1/2,ηn+1,−, tn+1/2))

≡N∑

n=0

tn

4

(Bn+1/2

kl

(ηn,+) + Bn+1/2

kl

(ηn+1,−))

φn+1/2k φ

n+1/2l

=N∑

n=0

tn

4

(An+1/2

kl

(ηn,+)

φn+1/2k φ

n+1/2l + An+1/2

kl

(ηn+1,−)

φn+1/2k φ

n+1/2l

2 In (18a) we derived that Aijφiφ j = Bklφkφl using (17) with (18b). Here in (27), starting from (23d), we trace the steps in this derivation back by using (26a) and (26b), respectively.

468 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

+ An+1/2kj′

(ηn,+)

φn+1/2k φ

n,+j′ + An+1/2

kj′(ηn+1,−)

φn+1/2k φ

n+1,−j′

+ An+1/2i′l

(ηn,+)

φn,+i′ φ

n+1/2l + An+1/2

i′l(ηn+1,−)

φn+1,−i′ φ

n+1/2l

+ An+1/2i′ j′

(ηn,+)

φn,+i′ φ

n,+j′ + An+1/2

i′ j′(ηn+1,−)

φn+1,−i′ φ

n+1,−j′

)(27)

after some algebraic manipulations. A similar unfolding can be done for the wave maker term involving Cl but is not required. Hence, it seems that the finite element expansion for the interior degrees of freedom is

φi′ = φn,+i′

(tn+1 − t

tn

)+ φ

n+1,−i′

(t − tn

tn

)(28)

with φn,±i′ = limε→0 φi′ (tn ± ε).

Analogously, we now see that the time integral of the wave maker contribution in (13) is approximated as

T∫0

Wmφmdt ∼=N∑

n=0

tn

2

(W n+1/2

q(ηn,+

q

n+1/2q + W n+1/2

q(ηn+1,−

q

n+1/2q

+ W n+1/2m′

(ηn,+

q

n,+m′ + W n+1/2

m′(ηn+1,−

q

n+1,−m′

), (29)

with interior wave maker nodes m′ , the wave maker node q = 1 at the free surface and W n+1/2m′ (ηn,+

q ) = Wm′ (ηn,+q , tn+1/2),

etc. The vertices on the wave maker are thus evaluated at time tn+1/2.By using approximations (23a)–(23c) for the first three free surface and potential energy terms in (13) and approxima-

tions (27) for the kinetic energy and (29) for the wave maker terms in (13), the space discrete principle (13) becomes the following space–time discrete variational principle

0 = δL[φ̃

n,+, φ̃

n−1,−,φn,+,φn+1/2,ηn,+,ηn+1,−]

= δ

N∑n=0

Mn+1/2kl φ

n+1/2l

(ηn+1,−

k − ηn,+k

) − 1

2 tn Dn+1/2

kl φn+1/2l

(ηn,+

k + ηn+1,−k

)− 1

2 tn(Hn+1/2

h

(φ̃

n,+,φn+1/2,ηn,+) + Hn+1/2

h

(φ̃

n+1,−,φn+1/2,ηn+1,−))

− 1

2 tn((W n+1/2

q(ηn,+

q

) + W n+1/2q

(ηn+1,−

q

))φ

n+1/2q + W n+1/2

m′(ηn,+

q

n+,m′ + W n+1/2

m′(ηn+1,−

q

n+1,−m′

)+

N∑n=−1

Mn+1kl φ

n+1,+l

(ηn+1,+

k − ηn+1,−k

), (30)

with indices k, l ∈ NF , m′ ∈ NW \ NF , i′, j′ ∈ NΩ̄hand q ∈ NF ∩ NW . It consists of sums of discretized integrals and jump

terms over and across the space–time slabs En .

3.4. Dynamics

Taking variations of (30) over the independent variables φn+1/2l , φn,+

l , φn,+i′ , φn+1,−

i′ , ηn,+k and ηn+1,−

k yields an algebraic system for these potential and wave height coefficients:

δφn+1,+l : Mn+1

kl ηn+1,+k = Mn+1

kl ηn+1,−k , (31a)

δφn,+i′ : ∂ Hn+1/2

h (φ̃n,+

,φn+1/2,ηn,+)

∂φn,+i′

= −W n+1/2m′

(ηn,+

q

)δm′i′ , (31b)

δηn,+k :

(Mn+1/2

kl + 1

2 tn Dn+1/2

kl

n+1/2l

= Mnklφ

n,+l − 1

2 tn

(∂ Hn+1/2

h (φ̃n,+

,φn+1/2,ηn,+)

∂ηn,+k

+ ∂W n+1/2q (ηn,+

q )

∂ηn,+q

φn+1/2q δkq + ∂W n+1/2

m′ (ηn,+q )

∂ηn,+q

φn,+m′ δkq

),

(31c)

δφn+1/2l :

(Mn+1/2

kl − 1

2 tn Dn+1/2

kl

)ηn+1,−

k

=(

Mn+1/2kl + 1

2 tn Dn+1/2

kl

)ηn,+

k + 1

2 tn

(∂ Hn+1/2

h (φ̃n,+

,φn+1/2,ηn,+)

∂φn+1/2

+ ∂ Hn+1/2h (φ̃

n+1,−,φn+1/2,ηn+1,−)

∂φn+1/2

)

l l

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 469

+ 1

2 tn(W n+1/2

q(ηn,+

q

) + W n+1/2q

(ηn+1,−

q

))δql, (31d)

δφn+1,−i′ : ∂ Hn+1/2

h (φ̃n+1,−

,φn+1/2,ηn+1,−)

∂φn+1,−i′

= −W n+1/2m′

(ηn+1,−

q

)δm′ i′ , (31e)

δηn+1,−k : Mn+1

kl φn+1,+l =

(Mn+1/2

kl − 1

2 tn Dn+1/2

kl

n+1/2l − 1

2 tn

(∂ Hn+1/2

h (φ̃n+1,−

,φn+1/2,ηn+1,−)

∂ηn+1,−k

+ ∂W n+1/2q (ηn+1,−

q )

∂ηn+1,−q

φn+1/2q δkq + ∂W n+1/2

m′ (ηn+1,−q )

∂ηn+1,−q

φn+1,−m′ δkq

). (31f)

The variations of the potential energy are straightforward:

δ

(1

2gMn+1/2

kl ηnp

k ηnp

l

)= gMn+1/2

kl ηnp

k δηnp

l ,

with np = n, + or np = n + 1, −. The variations of the kinetic energy with respect to the velocity potential include both interior variations φ j′ and free surface ones φl , yielding

δφ K(φ̃

np,φn+1/2,ηnp , tn+1/2) = (

An+1/2l j′

(ηnp

n+1/2l + An+1/2

i′ j′(ηnp

np

i′)δφ

np

j′

+ (An+1/2

lk

(ηnp

n+1/2l + An+1/2

i′k(ηnp

np

i′)δφ

n+1/2k .

Variations of the kinetic energy with respect to the free surface elevation ηl are more complicated to compute since the nodal coordinates (xi, zi) in the mesh change every time step due free surface and piston wave maker movements as described in Appendix B. By introducing

Cn+1/2li j

(ηnp

) = ∂ An+1/2i j (ηnp )

∂ηnp

l

, (32)

we can compute the variations of the kinetic energy with respect to the free surface elevation

δη K(φ̃

np,φn+1/2;ηnp , tn+1/2) = 1

2

(Cn+1/2

ri′ j′(ηnp

np

i′ φnp

j′ + Cn+1/2rlj′

(ηnp

n+1/2l φ

np

j′

+ Cn+1/2ri′k

(ηnp

np

i′ φn+1/2k + Cn+1/2

rlk

(ηnp

n+1/2l φ

n+1/2k

)δη

npr .

Finally, after combining all contributions, the variations of the Hamiltonian can be written as

δHn+1/2h

(φ̃

np,φn+1/2,ηnp

) = (An+1/2

l j′(ηnp

n+1/2l + An+1/2

i′ j′(ηnp

np

i′)δφ

np

j′

+ (An+1/2

lk

(ηnp

n+1/2l + An+1/2

i′k(ηnp

np

i′)δφ

n+1/2k

+(

1

2

(Cn+1/2

ri′ j′(ηnp

np

i′ φnp

j′ + Cn+1/2rlj′

(ηnp

n+1/2l φ

np

j′

+ Cn+1/2ri′k

(ηnp

np

i′ φn+1/2k + Cn+1/2

rlk

(ηnp

n+1/2l φ

n+1/2k

) + gMn+1/2kr η

np

k

)δη

npr . (33)

Likewise, variations of the wave maker contribution yield

δ(W n+1/2

m′(η

npq

np

m′ + W n+1/2q

npq

n+1/2q

) = ∂W n+1/2q (η

npq )

∂ηnpq

φn+1/2q δη

npq + ∂W n+1/2

m′ (ηnpq )

∂ηnpq

φnp

m′ δηnpq

+ W n+1/2q

npq

)δφ

n+1/2q + W n+1/2

m′(η

npq

)δφ

np

m′

= En+1/2q

npq

n+1/2q δη

npq + En+1/2

m′(η

npq

np

m′ δηnpq

+ W n+1/2q

npq

)δφ

n+1/2q + W n+1/2

m′(η

npq

)δφ

np

m′ , (34)

with En+1/2m (η

npq ) := ∂W n+1/2

m (ηnpq )/∂η

npq . As we can see in (31b), (31e), there is no dynamical equation for the interior

velocity potential φi′ at the nodes in the domain. For convenience’ sake, we rename the interior potentials as φni′ := φ

n,+i′ and

φn+1i′ := φ

n+1,−i′ . Since wave height ηh is continuous in time, see (31a), we rename ηn

l := ηn,+l and ηn+1

l := ηn+1,−l . This is not

the case for the symplectic Euler scheme used for water wave simulations in [11], which yields a fully time discontinuous scheme. The stability of our time integration scheme satisfies the standard criterion [15] for the Störmer–Verlet scheme. The

470 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

construction and stability of such (novel) time discontinuous Galerkin finite element schemes are considered in Gagarina [13]. In addition, we rename φn,+

l as φnl .

By introducing variations (33), (34) into (30), the final system of discrete equations for the potential and wave height then becomes⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

(Mn+1/2

kl + 12 tn Dn+1/2

kl

n+1/2l

= Mnklφ

nl − 1

2 tn( 1

2 (Cn+1/2ki′ j′ (ηn)φn

i′φnj′ + Cn+1/2

klj′ (ηn)φn+1/2l φn

j′

+ Cn+1/2ki′s (ηn)φn

i′φn+1/2s + Cn+1/2

kls (ηn)φn+1/2l φ

n+1/2s ) + gMn+1/2

kl ηnl

)− 1

2 tn(En+1/2q (ηn

q)φn+1/2q δkq + En+1/2

m′ (ηnq)φn

m′δkq),

An+1/2i′ j′ (ηn)φn

j′ + An+1/2i′l (ηn)φ

n+1/2l = −W n+1/2

m′ (ηnq)δm′i′ ,⎧⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎩

(Mn+1/2

kl − 12 tn Dn+1/2

kl

)ηn+1

k

= (Mn+1/2

kl + 12 tn Dn+1/2

kl

)ηn

k + tn

2 (W n+1/2q (ηn

q) + W n+1/2q (ηn+1

q ))δql

+ 12 tn(An+1/2

kl (ηn)φn+1/2k + An+1/2

i′l (ηn)φni′ + An+1/2

kl (ηn+1)φn+1/2k + An+1/2

i′l (ηn+1)φn+1i′ ),

An+1/2i′ j′ (ηn+1)φn+1

j′ + An+1/2i′l (ηn+1)φ

n+1/2l = −W n+1/2

m′ (ηn+1q )δm′ i′ ,

Mn+1kl φn+1

l =(

Mn+1/2kl − 1

2 tn Dn+1/2

kl

n+1/2l − 1

2 tn

(1

2

(Cn+1/2

ki′ j′(ηn+1)φn+1

i′ φn+1j′ + Cn+1/2

klj′(ηn+1)φn+1/2

l φn+1j′

+ Cn+1/2ki′s

(ηn+1)φn+1

i′ φn+1/2s + Cn+1/2

kls

(ηn+1)φn+1/2

l φn+1/2s

) + gMn+1/2kl ηn+1

l

)− 1

2 tn(En+1/2

q(ηn+1

q

n+1/2q δkq + En+1/2

m′(ηn+1

q

)φn+1

m′ δkq), (35)

with indices k, l, r, s ∈ NF , i′, j′ ∈ NΩ̄h, m′ ∈ NW \ NF and q ∈ NF ∩ NW . The first and second steps, indicated by curly

brackets, are implicit in time. The third step is explicit. When we consider a wave basin without wave maker, the matrices no longer depend explicitly on time. Upon elimination of the interior degrees of freedom, we have shown that the time integration method becomes the symplectic Störmer–Verlet one [15] for a nonlinear canonical Hamiltonian system. This limit motivated the approximations of the interior potential in the kinetic energy and the quadrature rules chosen for the time integrals of the Hamiltonian. Finally, we solve the implicit equations with an iterative Newton method, with tolerance ε = 10−10. The resulting linear system of equations in this iteration is solved with PETSc’s linear solver KSPSolve.

4. Numerical results

4.1. Verification

4.1.1. Nonlinear Fenton wavesWe first verify our variational finite element method against a nonlinear semi-analytical solution of the free surface

water wave equations using Fenton’s method [8]. In this method a Fourier approximation of the velocity potential and wave height is used at discrete points in a two-dimensional domain with a flat bottom and periodic boundary conditions in the horizontal. The resulting wave solution is a harmonic traveling wave. In this subsection, the equations of motion are solved in nondimensional form, effectively realized by taking “g = 1”.

We initialize the numerical simulation with a harmonic wave solution constructed by using 64 Fourier modes and simu-late for 100 time periods on a regular mesh with 128 × 16 elements. The numerical simulation shows no decay in the wave amplitude, even after 100 time periods. The energy shows no drift, which is confirmed in Fig. 4. A small phase shift in the final wave profile is, however, found when compared with the initial wave profile, which is caused by the dispersion error present in the numerical scheme.

We also performed a series of tests on various meshes to verify the order of accuracy of our finite element discretization. The results are presented in Table 1 and show that the numerical scheme is second order accurate.

4.2. Validation against laboratory data

We have validated the numerical scheme against experimental data provided by the Maritime Research Institute Nether-lands (MARIN). The experimental data are based on recordings of wave height measurements using probes at specific locations in the wave basin. There are two experimental set-ups: the first case concerns several irregular long crested waves, which are propagating over a sloping bottom, and the second test case concerns several wave groups over a flat bottom. We used the open cases classified under numbers 103001 and 202002, as opposed to other, blind cases. In both laboratory cases, a piston type wave maker is installed at the left side of the domain and a beach lies at the right side of

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 471

Fig. 4. Plot of discrete energy difference E(t) − E(0) versus time t over 100 periods, where one period is T p = 4.9636. E(t) is the discrete energy at a given time t . It has bounded fluctuations in time and shows no drift.

Table 1Spatial errors in the L2- and L∞-norms, order of accuracy and deviation of total energy E for Fenton waves at time 10T per = 49.636. Wave height and potential are, respectively, η and φ. Time step t = 0.01551125. The mesh is regular with x = 0.1551121 and z = 0.25.

Mesh size L2 L∞ E

L2-error order L∞-error order E order

x, z, t η 0.052831 – 0.0365923 – 7.E−4 –φ 0.0045161 – 0.0054115 –

x2 , z

2 , t2 η 0.0131235 2.009 0.00900984 2.022 1.7E−4 2.042

φ 0.0007522 2.586 0.00118985 2.185

x4 , z

4 , t4 η 0.00327116 2.004 0.00223324 2.012 4.0E−5 2.087

φ 6.2E−5 3.601 0.00024878 2.258

x8 , z

8 , t8 η 0.00081288 2.009 0.000554157 2.011 1.0E−5 2.0

φ 5.68E−6 3.448 6.418E−5 1.955

Fig. 5. Sketch of the bathymetry for Case 103001 with a beach in the laboratory basin and a wall at the start of the beach in the numerical basin.

the domain. While the piston type wave maker generates waves traveling towards the right, the laboratory beach reduces wave reflection of incoming waves via damping by wave breaking. Our present numerical scheme, instead, has a vertical solid wall on the right. This limits the validity of the numerical simulations till the time when reflected waves start to interfere with the results at the given probe locations. We investigate the capability of the numerical method to deal with (i) a sloping bottom; (ii) waves generated by the irregular movement of the wave maker; and, (iii) wave focussing.

4.2.1. Irregular waves propagating over a sloping bottomFirst, we show a sketch of the bathymetry of the actual and numerical wave basin in Fig. 5. A piston-type wave maker

lies at the left boundary of the domain. The wave maker always starts from rest at x = 0 m and can only move in the horizontal direction. To the right of the wave maker there is a flat bottom with water depth of 0.60 m. At x = 143.41 m a slope of steepness 1:20 starts. It ends at x = 149.41 m at a water depth of 0.30 m. Behind the slope there is a 24 m long flat bottom part. A sloping beach starts at x = 173.41 m. As mentioned, in the numerical simulations the sloping beach is replaced with a vertical wall at x = 173.41 m. In the numerical wave basin, the horizontal mesh movement due to the wave maker gradually diminishes, to vanish for x > Lw = 40 m.

The measured piston motion used in the numerical simulations is shown in Fig. 6. Wave elevations are measured at various probes, with their positions given in Table 2. For Case 103001, the results of the computations for the variable bottom are summarized as follows.

For this test case, the motion of the wave maker, shown in Fig. 6, generates highly irregular waves. A fixed time step, t = 0.00125 s, is used in the numerical simulations with Nx = 12 000 equidistantly distributed points in the horizontal direction. In the vertical direction we have Nz = 10 points distributed exponentially, such that the smallest element lies at the free surface.

A comparison of the experiments and numerical simulations at all available probes is shown in Fig. 7. The experimental (red) and numerical results (blue) generally agree well. The only larger mismatch observed is found in Fig. 7(c, h), presenting

472 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

Fig. 6. Measured wave maker motion for Case 103001.

Table 2Locations of probes for wave height measurements in Case 103001.

Wave probe 1 2 9 12 13 15 17 25

Distance (m) 39.15 78.8 102.12 143.41 146.43 149.41 157.74 172.89

Fig. 7. Comparison of wave heights in the experiment and numerical simulation at all available probe locations for Test Case 103001 with a sloping bottom. The numerical simulation is performed on a mesh of 12 000 × 10 elements with time step t = 0.00125 s. Experiments are in red and numerical simulations in blue. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

results for Probes 9 and 25. The mismatch for Probe 9 is due to a known error in the documented position of this probe, while Probe 25 simply lies too close to the beach or vertical wall.

Since the incoming waves reach the solid wall around t = 110 s, comparisons with experimental data have been made only till t = 120 s, to prevent contamination from the simulated wave reflections off the solid wall. As can be seen for Probe 25 at x = 172.89 m, located close to the reflecting boundary, the comparison stops to be accurate after t = 110 s. To obtain a rough estimate of the time when the reflected waves will reach this probe, we use the frequency relation for linear water waves with ω2 = gk tanh(kH0) and H0 = 0.6 m. As we can see from Fig. 8(a), there are a large number of long waves

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 473

Fig. 7. (continued)

with frequencies around ω = 3/s. The relevant wavenumber is k = 1.362/m. For an average depth H0 = 0.6 m, we obtain a phase velocity cp ≡ ω/k = 2.42 m/s, just short of the fastest, long wave speed cp = √

g H0 ≈ 2.45 m/s. The distance of 173.41 m is then covered in about 70 s at this frequency, which is an adequate time estimate to halt the numerical simulations before they are contaminated by reflections from the end wall.

474 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

Fig. 8. Time spectra of measured wave heights (red) and computed wave heights (blue) at Probes 1, 2 and 9. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

To validate our numerical results further, we compute spectra using a fast Fourier transform (FFT) to analyze the data from the numerical simulations and the laboratory experiments. We consider three probes: Probe 1 at x = 39.15 m located at the beginning of the basin, Probe 2 at x = 78.80 m, and Probe 9 at x = 102.12 m in the middle. We can observe in Fig. 8that the comparison is good for all three probes (despite the known error in the recorded position of Probe 9).

The spectral analysis is also useful to estimate the mesh size and time step before the numerical simulation is performed. Considering the spectra of the laboratory data at the first probe (red) in Fig. 8(a), we see that frequencies up to ω = 11/sare relevant and that the rest can be neglected. After an analysis of wave heights at all the probes (Fig. 8), we stay on the safe side by taking a limiting frequency ω = 15/s. The time period of the shortest wave is then T = 2π/ω = 0.419 s. Taking at least 10 time steps per period, we obtain a time step estimate t = 0.0419 s. Using the linear frequency relation for the intermediate depth H0, we find the corresponding wavenumber k = 22.94/m = 2π/λ. Taking at least 10 points per shortest wave length λ = 0.274 m, we obtain that the required horizontal mesh size is x = 0.0274 m, which gives a number of elements equal to Nx = 173.41/ x ≈ 6500. Snapshots of water waves at various moments in time are presented in Fig. 9.

4.2.2. Wave groups propagating over a flat bottomIn Test Case 202002, the wave basin has a flat bottom and the horizontally-driven wave maker starts from rest at

x = 0 m. The wave basin is 1 m deep and 195.4 m long. The measured piston motion is shown in Fig. 10. Wave elevations are measured at various probes, see Table 3 and Fig. 11. Snapshots of water waves at various moments in time are given in Fig. 12. Measured and computed wave heights at the probes are seen to be in good agreement, from Fig. 11. The piston motion generates a slow moving wave group followed by a fast moving wave group, resulting in wave focussing around t = 109.56 s and x = 50 m, see Fig. 12(c).

Spectral analysis is again used to estimate the required mesh size and time step. We analyzed the laboratory data for all available probes. Considering the spectrum of the second probe (red) placed at x = 20 m, see Fig. 13(a), we note that frequencies up to ω = 11/s are relevant. This limiting frequency corresponds to a time period T = 2π/ω = 0.571 s. With 10 time steps per period, this leads to a time step of t = 0.0571 s. Given the dispersion relation ω = √

gk tanh(kH0) with

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 475

Fig. 9. Snapshots of the simulated domain and horizontal velocity are shown at times t = 60.4 s, t = 114.4 s and t = 122.8 s for the variable bottom Test Case 103001. We observe highly irregular waves generated by the wave maker and reflections due to a solid wall at the right end of the domain. A mesh of 12 000 × 10 elements with time step t = 0.00125 s is used. (a) Complete domain and (b, c) zoom-ins at the free surface. (For interpretation of the colors in this figure, the reader is referred to the web version of this article.)

Fig. 10. Wave maker motion for Case 202002.

depth H0 = 1 m, the corresponding wavenumber k = 2π/λ = 12.34/m. Using 10 points for this wave length λ = 0.509 m, we estimate a horizontal mesh size of x = 0.0509 m. We know, however, from the laboratory experiment that a splash occurs around this probe, so a more restrictive time step follows from the red laboratory spectrum of the fifth probe at x = 50 m. In Fig. 13(c), a peak is observed at ω = 36/s. For this limiting frequency ω = 36/s the time period of the shortest wave is T = 0.1745 s and the wave length is λ = 0.0385 m. The associated time step is t = 0.01745 s and mesh size x = 0.00385 m. The mesh size should thus be much smaller near the fifth probe than near the first probe. In order to estimate the vertical structure, we perform an analysis of linear waves for the peak frequency ω = 36/s. An exponential

476 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

Table 3Location of probes for wave height measurements in Case 202002.

Wave probe number 1 2 3 4 5 6

Distance (m) 10 20 40 49.5 50 54

Fig. 11. Comparison of wave heights in experiments and numerical simulations at all available probe locations for Test Case 202002 with a flat bottom. The numerical simulation is performed on a nonuniform mesh with 6000 × 20 elements and time step t = 0.001 s. Experimental data are shown in red and numerical ones in blue. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

distribution of Nz = 20 points proves to be sufficient, when we resolve the vertical structure of the corresponding linear free mode for ω = 36/s.

To save computing time, we have adapted the mesh to satisfy the mesh size requirements around each probe. At the beginning of the domain x = 0.0509 m is sufficient everywhere, except around x = 50.5 m where we require at least x = 0.00385 m. The parameters for the calculations are selected as: x = 0.01559 m in the first part of the domain and x = 0.0027 m in the splash zone. Initially, the vertical space step ranges from z = 0.098222 near the flat bottom to z = 0.00247959 near the free surface. The time step is taken constant t = 0.001 s. As we can see for the second probe in Fig. 13(a), the comparison between the experimental spectra (red) and those of the numerical simulation (blue) is good. Unfortunately, the numerical simulations do not capture the peak at ω = 36/s seen in the experimental spectrum for the fifth probe, see Fig. 13(c). The origin of this peak in the experimental spectrum remains unclear. In the only other numerical study available on Case 202002 [23], this high frequency part of this spectrum is absent.

5. Conclusions

A new variational finite element method was presented to compute irrotational water wave dynamics. It was based on a finite element discretization of Miles’ variational principle, continuous in space and (dis)continuous Galerkin in time. The key two challenges that have been resolved were:

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 477

Fig. 11. (continued)

(i) Dynamic grid motion was taken into account as an integral part of the variational dynamics, with mesh motion in the interior being slaved to the (hyperbolic and Hamiltonian) free surface dynamics.

(ii) Both forced and free wave dynamics of the spatially (non)autonomous Hamiltonian system were discretized in time in a stable manner by direct use of the (spatially discrete) variational principle.

A variational space (plus time) finite element approach was developed, leading to a nonlinear algebraic system. A space–time discontinuous Galerkin finite-element approach will also lead to our discrete variational principle, provided one uses the right basis functions in unison in space and time. This is also a natural framework to explore the geometric conservation law [24] that presumably underpins our discretization implicitly. The methodology will likely work for a fully space discon-tinuous finite element discretization, as our work on variational DG methods for linear water waves indicates [1]. We used a Newton method to solve the nonlinear algebraic system, in combination with direct solvers available in the PETSc pack-age. The latter gives good performance when the memory for sparse matrix storage is pre-allocated rather than allocated dynamically.

Verification of the numerical discretization against harmonic Fenton waves for 100 time periods demonstrated the ac-curacy of the novel variational finite element method in simulating waves for a long time. A key advantage of this finite element discretization is that the discrete energy shows no drift in time such that there is no reduction in wave height due to artificial, numerical dissipation. Validation of the numerical method with experimental data reveals that the agreement is good and also shows the robustness of the numerical discretization. Furthermore, the numerical scheme is capable of accurately producing the wave focussing phenomena observed in the experimental data provided by the Maritime Institute Netherlands (MARIN). For highly irregular propagating waves the accuracy can be further improved by using a higher order spatial and temporal discretization to obtain a smaller dispersion error.

The numerical validation with the MARIN experiments was somewhat limited because we used reflecting rather than absorbing boundary conditions at the laboratory beach. Interesting variational approaches to solve this boundary issue are: to use a new water wave model we developed [6,12], which includes the nonlinear water wave limit as well as

478 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

Fig. 12. Snapshots of domain and horizontal velocity at different times for the flat bottom Case 202002: a fast moving wave group is overtaking a slow moving wave group, resulting in wave focussing at t = 109.56 s around x = 50.75 m. (a) Complete domain and (b)–(d) zoom-ins at the free surface.

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 479

Fig. 13. Time spectra of measured wave (red) and computed wave heights (blue) for Case 202002 at Probes 2, 3 and 5. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

wave breaking in the form of shallow water bores at the beach, or to employ effective, semi-analytical nonlinear boundary conditions such as developed and used in Kristina et al. [22].

Acknowledgements

It is a pleasure to thank Tim Bunnik from the Maritime Research Institute Netherlands for providing the data sets used in the validation. We acknowledge financial support of the Technology Foundation STW and Netherlands Organisation for Scientific Research (NWO) for the projects “Compatible Mathematical Models for Coastal Hydrodynamics” (NWO project no. 613.000.803) and “Complex wave–current interactions in a numerical wave tank” (STW project no. 08130), resp. Research of J.J.W. v/d V. was partially supported by the High-end Foreign Experts Recruitment Program (GDW20137100168), while the author was in residence at the University of Science and Technology of China. O.B. acknowledges partial support from the Geophysical Fluid Dynamics summer program (NSF0824636) at the Woods Hole Oceanographic Institution in Woods Hole, USA (2012); the Mathematics of Planet Earth program at the Isaac Newton Institute of Mathematical Sciences in Cambridge, UK (2013); and, the workshop Port-Hamiltonian Systems (part of the project ’Control of Partial Differential Equations: A port-Hamiltonian approach’ (DN 63-261), a collaboration between the German Research Foundation DFG and NWO) at the Lorentz Center in Leiden, The Netherlands (2014).

480 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

Appendix A. Evaluation of finite element matrices

In this appendix, we will discuss some aspects of the construction of the finite element matrices. We will assume that the structured mesh with quadrilateral elements is used.

For the evaluation of the matrices in the discrete formulation we first consider the free surface S F of the domain Ωh . The global node number l = ks(β) follows from the element ks and local node number β via assembly. We compute the Jacobian of the surface element transformation (9) as

J̄ks = ∂x

∂ζ= xks(1)(t)

∂ψ1

∂ζ+ xks(2)(t)

∂ψ2

∂ζ= (xks(2)(t) − xks(1)(t))

2= xks (t)

2. (A.1)

This relation shows that the Jacobian is time-dependent in the zone where the nodes change due to the wave maker movement. The gradients of the surface basis functions are equal to(

∂ϕβ

∂t∂ϕβ

∂x

)= 1

| J̄ks |( ∂x

∂ζ− ∂x

∂t

0 1

)(0

∂ψβ

∂ζ

)= 1

| J̄ks |

(− ∂(xks(β)ψβ)

∂t∂ψβ

∂ζ

∂ψβ

∂ζ

). (A.2)

The time derivative of the x-coordinate of a free surface node can now be computed using its dependence on the wave maker position (11) as

∂xks(β)

∂t= γx,iks(β)

dR

dt. (A.3)

This relation shows that the time derivative of the horizontal coordinate is proportional to the wave maker velocity. This allows us to evaluate the time derivative in (A.2) and the matrices Dkl and Mkl in (14).

For each surface element K̄ nks

the contributions to the global matrices Dkl and Mkl in (14) are now computed as follows:

Dβα :=∫K̄

ψβ(γx,ks(1)ψ1 + γx,ks(2)ψ2)∂ψα

∂ζ

dR

dtdζ, (A.4)

Mαβ :=∫K̄

ψαψβ | J̄ks |dζ. (A.5)

We also define the faces K̄km (t) on the piston wave maker SW , given by the vertical domain {R(t)} × [−H, η] and with face number km . Each wave maker face K̄km is connected to reference element K̄ using the transformation F̄ w : K̄ → K̄km defined as

F̄ w : K̄ → K̄km : ζ → z := zkm(β)(t)ψβ(ζ ), (A.6)

where β = 1, 2 denote the local node numbers of element K̄km and the zkm(β)(t)’s the coordinates of the vertices of the wave maker face. We compute the Jacobian of the transformation (A.6) at the nodes l ∈ NW as

Jkm = ∂z

∂ζ= zkm(1)

∂ψ1

∂ζ+ zkm(2)

∂ψ2

∂ζ= 1

2(zkm(2) − zkm(1)) = 1

2 zkm . (A.7)

The local contribution per wave maker face K̄km to the global vector Wm in (14) has an elemental contribution:

Wβ :=∫K̄

dR

dtψβ | Jkm |dζ. (A.8)

Appendix B. Variations of the kinetic energy

The prescribed wave maker motion variations (11) of the x-coordinates of the nodes are zero: δxik = δ(xik (0) +γx,ik R(t)) = γx,ik δ(R(t)) = 0. Variations of the z-coordinates do, however, relate to variations of ηk as

δzik = δ(zik (0) + γz,ikηk

) = γz,ikδηk. (B.1)

The Jacobian matrix of the mapping Fke : K̂ → Kke (i.e., (8)) with vertex coordinates (xke(α), zke(α)) is equal to

Jke =( ∂x

∂ζ1

∂x∂ζ2

∂z∂ζ1

∂z∂ζ2

).

Using (14), variations of the local matrix Aαβ contributing to the global matrix Aij for each element Kke are

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 481

δη Aαβ(η, t) = δη

∫Kke

(∇ϕ̃α · ∇ϕ̃β)dxdz

=∫K̂

1

| Jke |

⎛⎝ ∂ψ̂α∂ζ1

∂ψ̂α∂ζ2

⎞⎠T [2(

∂z∂ζ2

)δzζ2 − ∂z

∂ζ1δzζ2 − ∂z

∂ζ2δzζ1

− ∂z∂ζ1

δzζ2 − ∂z∂ζ2

δzζ1 2(

∂z∂ζ1

)δzζ1

]⎛⎝ ∂ψ̂β

∂ζ1

∂ψ̂β

∂ζ2

⎞⎠

× δ| Jke || Jke |2

⎛⎝ ∂ψ̂α∂ζ1

∂ψ̂α∂ζ2

⎞⎠T [ (∂z∂ζ2

)2 + (∂x∂ζ2

)2 − ∂z∂ζ1

∂z∂ζ2

− ∂x∂ζ1

∂x∂ζ2

− ∂z∂ζ1

∂z∂ζ2

− ∂x∂ζ1

∂x∂ζ2

(∂z∂ζ1

)2 + (∂x∂ζ1

)2

]⎛⎝ ∂ψ̂β

∂ζ1

∂ψ̂β

∂ζ2

⎞⎠dζ1dζ2, (B.2)

with δzζ1 = δ(∂z/∂ζ1), etc.Variations of z still depend on the free surface height via (11), and by using (8) and (11) variations of δzζ1 and δzζ2

become

δzζ1 = −1 − ζ2

4δzke(1) + 1 − ζ2

4δzke(2) + 1 + ζ2

4δz j(3) − 1 + ζ2

4δzke(4)

=(

−γz,ke(1)

1 − ζ2

4− γz,ke(4)

1 + ζ2

4

)δηk +

(γz,ke(2)

1 − ζ2

4+ γz,ke(3)

1 + ζ2

4

)δηk+1,

δzζ2 = −1 − ζ1

4δzke(1) − 1 + ζ1

4δzke(2) + 1 + ζ1

4δzke(3) + 1 − ζ1

4δzke(4)

=(γz,ke(4)

1 − ζ1

4− γz,ke(1)

1 − ζ1

4

)δηk +

(γz,ke(3)

1 + ζ1

4− γz,ke(2)

1 + ζ1

4

)δηk+1. (B.3)

Note that we aligned the first and fourth vertices of the element Kke to be on the same mesh column as the corresponding free surface node k. Similarly, the second and third element vertex are at the same column as the free surface node k +1. The crucial part of these relations is that variations in the free surface are coupled to variations in the mesh. This dependencecannot be ignored in computing the variations of the discrete Miles’ functional. Otherwise, incorrect dynamical equations are obtained, unstable for large amplitude wave motions. Finally, the variation of the Jacobian is given by

δ| Jke | = (∂x/∂ζ1)δzζ2 − (∂x/∂ζ2)δzζ1 . (B.4)

After substitution of (B.3) and (B.4) into (B.2), we can assemble Ckij in (32).Similarly, contributions of the face K̄km at the wave maker to the variation of Wm with respect to wave height η are

equal to

δηWα(ηq, t) = δη

∫K̄km

dR

dtϕαdz =

∫K̄

dR

dtψαδ| Jkm |dζ2, (B.5)

where m = km(α) is the global node number, and the variations of the Jacobian | Jkm | are given by

δη| Jkm | = δη

(1

2(zkm(2) − zkm(1))

)= 1

2(γz,km(2) − γz,km(1))δηq, (B.6)

with q ∈NF ∩NW . Finally, substituting (B.6) into (B.5) allows assembly of contributions in (34).

Appendix C. Jump term due to discontinuous time derivative

There is a straightforward way to derive the contribution of the delta function arising from the time derivative in the term Mklφkdηl/dt in (18).

Consider the time slab from tn to tn+1 with a continuous finite element expansion within the time slab but a discontin-uous one across the time nodes.3 Consider a time node t = tn with values ηL, ηR and φL, φR as (discontinuous) limits to the left and right of this time node tn . Now split each time node into a sufficiently narrow elements around tn−1 and tn+1, such that there is never any overlap with the next narrow element, and use a linear approximation for ql = ηl and quadratic one for the conjugate variables pl = Mklφk in this narrow element. Hence, the overall expansion of the variables is constructed to be continuous again. For convenience we temporarily drop the subscripts l and define the same limit values pL and qL

as above at the left node and the values pR and qR at the right node of this narrow element. The continuity requirements permit the following expansions (as well as other ones)

3 O.B gratefully acknowledges the stimulating remarks on Borel spaces and delta functions from Simon Ruijsenaars in the School of Mathematics at the University of Leeds.

482 E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483

p = pL + (pR − pL)(4τ − 3τ 2) and q = qL + (qR − qL)τ (C.1)

with local coordinate τ = 0.5(t − tn + τ)/ τ in this narrow element spanning t ∈ (tn − τ, tn + τ), such thatp(τ = 0) = pL, p(τ = 1) = pR and q(τ = 0) = qL, q(τ = 1) = qR . Hence, the time integral becomes

1∫0

pdq

dτdτ = pR(qR − qL), (C.2)

defining the jump term (22) in the limit of this narrow element shrinking to zero into node tn . The time integral of the other terms in the variational principle across such a narrow element vanishes in this limit. Other numerical fluxes or paths as well as quadratures can be explored.

References

[1] V.R. Ambati, Forecasting waves and currents: a space–time approach, PhD thesis, University of Twente, Enschede, The Netherlands, 2008.[2] D.N. Arnold, F. Brezzi, B. Cockburn, L.D. Marini, Unified analysis of discontinuous Galerkin methods for elliptic problems, SIAM J. Numer. Anal. 39 (5)

(2002) 1749–1779.[3] J.T. Beale, A convergent boundary integral method for three-dimensional water waves, Math. Comput. 70 (2001) 977–1029.[4] P. Bettess, Operation counts for boundary integral and finite element methods, Int. J. Numer. Methods Eng. 17 (1981) 306–308.[5] J. Broeze, E.F.G. van Daalen, P.J. Zandbergen, A three-dimensional panel method for nonlinear free surface waves on vector computers, Comput. Mech.

13 (1993) 12–28.[6] C. Cotter, O. Bokhove, Water wave model with accurate dispersion and vertical vorticity, J. Eng. Math. 67 (2010) 33–54.[7] G. Dal Maso, P.G. Le Floch, F. Murat, Definition and weak stability of nonconservative products, J. Math. Pures Appl. 74 (6) (1995) 483–548.[8] J.D. Fenton, M.M. Rienecker, A Fourier method for solving nonlinear water-wave problems: application to solitary-wave interactions, J. Fluid Mech. 118

(1982) 411–443.[9] C. Fochesato, F. Dias, A fast method for nonlinear three-dimensional free-surface waves, Proc. R. Soc. A, Math. Phys. Eng. Sci. 462 (2006) 2715–2735.

[10] C.F. Fochesato, S. Grilli, F. Dias, Numerical modeling of extreme rogue waves generated by directional energy focusing, Wave Motion 44 (2007) 395–416.[11] E. Gagarina, J.J.W. van der Vegt, V.R. Ambati, O. Bokhove, A Hamiltonian Boussinesq model with horizontally sheared currents, in: Proc. 3rd Int. Symp.

on Shallow Flows, June 4–6, Iowa, USA, 2012, http://purl.utwente.nl/publications/79724.[12] E. Gagarina, J.J.W. van der Vegt, O. Bokhove, Horizontal circulation and jumps in Hamiltonian wave models, Nonlinear Process. Geophys. 20 (2013)

483–500.[13] E. Gagarina, Variational approaches to water wave simulations, PhD thesis, University of Twente, The Netherlands, 2014, in preparation.[14] E. Guerber, M. Benoit, S.T. Grilli, C. Buvat, A fully nonlinear implicit model for wave interactions with submerged structures in forced or free motion,

Eng. Anal. Bound. Elem. 36 (2012) 1151–1163.[15] E. Hairer, C. Lubich, G. Wanner, Geometric Numerical Integration, second ed., Springer, Berlin, 2006.[16] J. Hennig, C.E. Schmittner, Experimental variation of focussing wave groups for the investigation of their predictability, in: Proc. 28th Int. Conf. OMAE,

May 31–June 5, Hawaii, USA, 2009.[17] T. Hou, P. Zhang, Convergence of a boundary integral method for 3-D water waves, SIAM J. Numer. Anal. 2 (2002) 1–34.[18] R.S. Johnson, A Modern Introduction to the Mathematical Theory of Water Waves, Cambridge University Press, Cambridge, 1997.[19] J.W. Kim, K.J. Bai, A finite element method for two dimensional water wave problems, Int. J. Numer. Methods Fluids 30 (1999) 105–121.[20] J.W. Kim, K.J. Bai, R.C. Ertekin, W.C. Webster, A strongly-nonlinear model for water waves in water of variable depth – the irrotational Green–Naghdi

model, J. Offshore Mech. Arct. Eng. 125 (2003) 25–32.[21] G. Klopman, E. van Groesen, M.W. Dingemans, A variational approach to Boussinesq modelling of fully nonlinear water waves, J. Fluid Mech. 657 (2010)

36–63.[22] W. Kristina, O. Bokhove, E. van Groesen, Effective coastal boundary conditions for tsunami wave run-up over sloping bathymetry, Nonlinear Process.

Geophys. (2014), under revision.[23] A.L. Latifah, E. van Groesen, Coherence and predictability of extreme events in irregular waves, Nonlinear Process. Geophys. 19 (2012) 199–213.[24] M. Lesoinne, C. Farhat, Geometric conservation laws for flow problems with moving boundaries and deformable meshes, and their impact on aeroelastic

computations, Comput. Methods Appl. Mech. Eng. 134 (1996) 71–90.[25] M.S. Longuet-Higgins, E.D. Cokelet, The deformation of steep surface waves on water, I. A numerical method of computation, Proc. R. Soc. Lond. Ser. A,

Math. Phys. Sci. 35 (1976) 1–26.[26] J.C. Luke, A variational principle for a fluid with a free surface, J. Fluid Mech. 27 (2) (1967) 395–397.[27] Q.W. Ma, G.X. Wu, R. Eatock Taylor, Finite element simulation of fully nonlinear interaction between vertical cylinders and steep waves. Part 2:

Methodology and numerical procedure, Int. J. Numer. Methods Fluids 36 (2001) 265–285.[28] Q.W. Ma, G.X. Wu, R. Eatock Taylor, Finite element simulation of fully nonlinear interaction between vertical cylinders and steep waves. Part 1:

Numerical results and validation, Int. J. Numer. Methods Fluids 36 (2001) 287–308.[29] Q.W. Ma, S. Yan, Quasi ALE finite element method for nonlinear water waves, J. Comput. Phys. 212 (2006) 52–72.[30] J.W. Miles, On Hamilton’s principle for surface waves, J. Fluid Mech. 83 (1977) 153–158.[31] S. Rhebergen, Discontinuous Galerkin finite element methods for (non)conservative partial differential equations, PhD thesis, University of Twente,

Enschede, The Netherlands, 2010.[32] S. Rhebergen, O. Bokhove, J.J.W. van der Vegt, Discontinuous Galerkin finite element methods for hyperbolic nonconservative partial differential equa-

tions, J. Comput. Phys. 227 (3) (2008) 1887–1922.[33] J.E. Romate, P.J. Zandbergen, Boundary integral equation formulations for free-surface flow problems in two and three dimensions, Comput. Mech. 4 (4)

(1989) 267–282.[34] B. Satish, D.G. William, McInnes C. Lois, B.F. Smith, Efficient management of parallelism in object oriented numerical software libraries, in: E. Arge,

A.M. Bruaset, H.P. Langtangen (Eds.), Modern Software Tools in Scientific Computing, Birkhäuser, 1997, pp. 163–202.[35] B. Satish, B. Kris, D.G. William, K. Dinesh, G.K. Matthew, McInnes C. Lois, B.F. Smith, Z. Hong, PETSc web page, http://www.mcs.anl.gov/petsc, 2001.[36] B. Satish, B. Kris, E. Victor, D.G. William, K. Dinesh, G.K. Matthew, McInnes C. Lois, B.F. Smith, Z. Hong, PETSc users manual, NL-95/11 – revision 2.1.5,

Argonne National Laboratory, 2004, http://www-unix.mcs.anl.gov/petsc.[37] W. Tsai, D. Yue, Computations of nonlinear free-surface flows, Annu. Rev. Fluid Mech. 28 (1996) 249–278.[38] J.J.W. van der Vegt, S.K. Tomar, Discontinuous Galerkin method for linear free surface gravity waves, J. Sci. Comput. 22 (2005) 531–567.

E. Gagarina et al. / Journal of Computational Physics 275 (2014) 459–483 483

[39] J.J.W. van der Vegt, Y. Xu, Space–time discontinuous Galerkin method for nonlinear water waves, J. Comput. Phys. 224 (2007) 17–39.[40] T. Vinje, P. Brevig, Numerical simulation of breaking waves, Adv. Water Resour. 4 (1981) 77–82.[41] A.I. Volpert, The spaces BV and quasilinear equations, Mat. Sb. (N.S.) 73(115) (2) (1967) 255–302 (in Russian); translated in Math. USSR Sb. 2 (2)

(1967) 225–267.[42] G.Z. Wang, C.X. Wu, Interactions between fully nonlinear water waves and cylinder arrays in a wave tank, Ocean Eng. 37 (2010) 400–417.[43] G.Z. Wang, C.X. Wu, A brief summary of finite element method applications to nonlinear wave–structure interactions, J. Mar. Sci. Appl. 10 (2011)

127–138.[44] J.H. Westhuis, The numerical simulation of nonlinear water waves in a hydrodynamic model test basin, PhD thesis, University of Twente, Enschede,

The Netherlands, 2001.[45] G.X. Wu, Z.Z. Hu, Simulation of nonlinear interactions between waves and floating bodies through a finite-element based numerical tank, Proc. R. Soc.

Lond. Ser. A 460 (2004) 2797–2817.