5.1 Introduction

Water waves are ubiquitous on Earth, propagating on the free surface or interface between water and air, under the restoring influence of gravity. Water waves emerge when a (flat) water surface at rest is disturbed, e.g., when a stone is thrown in a quiescent pond, and the restoring force of gravity leads to wave propagation, the axisymmetric ripples with wave crests and throughs emanating after the stone has perturbed the water surface. When the acceleration vector due to gravity is locally (nearly) constant and unidirectional, the surface at rest will be (nearly) flat, while on larger planetary scales the free surface at rest will be curved, normal to the acceleration vector of gravity. We will consider water waves on smaller scales, on the order of centimetres to a few kilometres, thereby focussing on the scales of water-wave motion in laboratory channels, on ponds and lakes, near the shore and on fully-developed seas (cf. the photos in Figs. 5.1, 5.2, 5.3 and 5.4). The mathematical modelling of water waves, considered here, has a long history in fluid dynamics.

Fig. 5.1
figure 1

a Rendering of a breaking wave in a vertical Hele-Shaw cell with water and air: it is a 2 mm–narrow cell with overall dimensions \(0.7\times 0.002 \times 0.24\) m\(^3\) in which wave frequencies are used of circa 1 Hz (image courtesy: Wout Zweers, see also Bokhove et al. 2014; Thornton et al. 2014). Displayed is the time evolution of the overturning and splashing waterline as function of x and t. b A series of solitary water waves generated by lifting a sluice gate between different water levels is shown in a channel with approximate dimensions \(45\times 2\times 1.2\) m\(^3\), initially at rest, cf. Bokhove et al. (2011), Bokhove and Kalogirou (2016)

Predictive models for water-wave propagation started to emerge after the incompressible Euler or Navier-Stokes equations were formulated. Typically, for both linear and nonlinear water-wave motion, the inviscid Navier-Stokes or Euler equations for an incompressible liquid (water) with a free surface and either an active or a passive gas (air) are considered to model water waves. Modelling of water waves focussed first mainly on linear wave propagation. We will, however, almost exclusively consider nonlinear water-wave dynamics even though we have used linear, exact solutions to verify our nonlinear numerical models in their small-amplitude limits. One of the first nonlinear models studied was the Korteweg-De-Vries (or KdV) equation (Drazin and Johnson 1989). It is an asymptotic subset of the three-dimensional potential-flow water-wave equations. These latter equations are, in turn, an exact subset of the incompressible Euler equations with a free surface, for the restricted case in which the three-dimensional velocity \(\textbf{u}=\boldsymbol{\nabla }\phi \) is expressed in terms of a velocity potential \(\phi \). Here, both the velocity \(\textbf{u}\) and the velocity potential \(\phi \) depend on the horizontal coordinates x and y, the vertical coordinate z, aligned in the opposite direction of the acceleration vector of gravity \(\textbf{g}=(0,0,-g)^T\), and time t, with \(g=9.81\) m/s\(^2\) the value near the Earth’s surface. This nonlinear KdV–equation was derived in 1895 together with its famous solitary-wave or soliton solution, the famous sech–soliton by Korteweg and De Vries (Drazin and Johnson 1989). Both the KdV–equation and the potential-flow water-wave equations are inviscid and have a rich mathematical and geometric structure intimately related to conservation laws and the phase-space dynamics of these systems (Drazin and Johnson 1989).

Fig. 5.2
figure 2

Photo courtesy V. Zwart

Crossing waves near shorelines often show wave amplification with Mach stems, which may lead to localised wave breaking (as occurred for the cross-wave/Mach-stem in the foreground). Such shallow-water waves can be modelled approximately with the Kadomtsev-Petviashvili equation (Kadomtsev and Petviashvili 1970; Kodema 2010) or “two-dimensional KdV-equation”, see also Ablowitz and Curtis (2013), Gidel et al. (2017).

Fig. 5.3
figure 3

Photo O.B

Nonlinear unbroken waves start to shoal and break on the beach south of Newcastle.

Fig. 5.4
figure 4

Photograph of the Severn Bore, with a crest that is partially an unbroken solitary wave/undular bore in deep water and partially a spilling breaker along the shallow river bank, by the late D. Howell Peregrine, some of whose photographs and slides O.B. inherited. This photo was used as basis for one of the “Posters in the London Underground”, i.e., for the “maths makes waves” poster

The geometric structure of such water-wave equations is the continuum or field extension of the geometric structure in classical mechanics; the latter mechanics was developed by Euler, Lagrange and Hamilton in the 17 and 18th centuries (Lanczos 1970; Marsden and Ratiu 1994). Classical mechanics concerns interacting mechanical or particle systems and results in a finite number of ordinary differential equations with functions of time. In contrast, the degrees-of-freedom (dofs) in space are infinite for fields, such as the velocity potential \(\phi =\phi (x,y,z,t)\) and the water depth \(h=h(x,y,t)\), and the dynamics are governed by partial differential equations. Here \(z=h(x,y,t)\) is the nonoverturning free surface above the flat-bottom topography located at \(z=0\). We will use h(xyt) later.

To introduce Hamilton’s equations, consider the basic dynamics of a particle with mass m moving in one spatial dimension with position q(t) and momentum p(t) in an external potential V(q). It is succinctly captured in the variational principle (VP)

$$\begin{aligned} 0= & {} \lim _{\varepsilon \rightarrow 0} \int _0^T \frac{L(q+\varepsilon \delta q,p+\varepsilon \delta p)-L(q,p)}{\varepsilon }\,\,\textrm{d}t = \delta \int _0^T L(q,p)\,\textrm{d}t \end{aligned}$$
(5.1a)
$$\begin{aligned}\equiv & {} \delta \int _0^T p \dot{q} -H(p,q)\,\textrm{d}t \equiv \delta \int _0^T p \dot{q}-\frac{1}{2} p^2/m - V(q)\,\textrm{d}t\end{aligned}$$
(5.1b)
$$\begin{aligned}= & {} \int _0^T (\dot{q}-p/m)\delta p -\left( \dot{p} + \partial V(q)/\partial q\right) \delta q\,\textrm{d}t + (p\delta q)|_{t=0}^{t=T} \end{aligned}$$
(5.1c)

with Lagrangian L(qp), Hamiltonian H(pq) and final time T. Note that we also defined the functional derivative of the functional \(\int _0^T L(q,p)\,\textrm{d}t\) and used integration by parts in time. Given the arbitrariness of the variations \(\delta q\) and \(\delta p\) and by using end-point conditions \(\delta q(0)=\delta q(T)=0\), the two contributions in the integrand (5.1c) at \(t=0\) and \(t=T\) are pointwise zero (in time). From (5.1c), we therefore obtain Hamilton’s equations of motion (Lanczos 1970; Marsden and Ratiu 1994) as a first-order system in time:

$$\begin{aligned} \dot{q} = \frac{\partial {H}}{\partial {p}} = p/m\qquad \text {and}\quad \dot{p} = F(q) \equiv - \frac{\partial {H}}{\partial {q}}= -\frac{\partial {V}}{\partial {q}} \end{aligned}$$
(5.2)

with the central force F(q) derived as the negative derivative of the potential V(q). Combining (5.2) yields Newton’s law of motion for a single particle in an external and central force, i.e.: \(m\ddot{q}=F(q)=-V'(q)\). Hamilton’s or Hamiltonian dynamics extends to more general mechanical and multi-particle systems in higher dimensions in which generalised coordinates \(\textbf{q}(t)\) and generalised momenta \(\textbf{p}(t)\) emerge for finite-dimensional systems, cf. Lanczos (1970), Marsden and Ratiu (1994). The reason to highlight such a straightforward example is that for infinite-dimensional systems such as water-wave hydrodynamics, these generalised coordinates and momenta will be replaced by fields. Despite this additional complexity, such an intrinsic structure of the variational principle (5.1) will be shown to be similar, and to remain recognisable, to that one for water-wave dynamics. For water-wave dynamics, the development of geometric and Hamiltonian dynamics took off with the works of Benney and Luke (1964), Luke (1967), Zakharov (1968) and Miles (1977) in the 1960 and 1970s. The work by Luke (1967) will be our starting point for describing water-wave dynamics.

A finite-dimensional example that is more closely related to the “pre-Luke” VP that we will present shortly in Sect. 5.2 is the following. Consider two nonlinear oscillators/springs moving in one dimension, denoted by \(x=q_i\) (for \(i=1,2\)), with spatial coordinates \(q_1=q_1(t),y_1=0\) and \(q_2=q_2(t),y_2=L\) or \(\textbf{q}=(q_1,q_2)^T\) with generalised momenta \(\textbf{p}=(p_1,p_2)^T\) and lateral y-direction, coupled together such that their separation is fixed by \(\sqrt{(q_1-q_2)^2+L^2}= R\) with \(R>L>0\) constant. Based on specific initial conditions, we take \(q_1=q_2+A\) with \(A=\sqrt{R^2-L^2}\). By again using suitable endpoint conditions, an example of a constrained VP and its variations is

$$\begin{aligned} 0 =&\delta \int _0^T p_1 \dot{q}_1+p_2\dot{q_2}-\frac{1}{2} p_1^2/m_1-\frac{1}{2} p_2^2/m_2 - \frac{1}{3} k_1 |q_1|^3 - \frac{1}{3} k_2 |q_2|^3 \nonumber \\&\qquad \qquad \qquad \quad +P(q_1-q_2-A)\,{\mathrm d}t\end{aligned}$$
(5.3a)
$$\begin{aligned} =&\int _0^T (\dot{q}_1-p_1/m_1) \delta p_1+(\dot{q}_2-p_2/m_2)\delta p_2-(\dot{p}_1+k_1 q_1|q_1|-P)\delta q_1\nonumber \\&\qquad -(\dot{p}_2+k_2 q_2|q_2|+P)\delta q_2 +(q_1-q_2-A)\delta P \,{\mathrm d}t \end{aligned}$$
(5.3b)

with a Lagrange multiplier or “pressure” \(P=P(t)\) (Lanczos 1970; Marsden and Ratiu 1994) imposing the constraint \(q_1-q_2-A=0\), spring constants \(k_{1,2}>0\) and masses \(m_{1,2}\). The resulting equations of motion follow directly from (5.3) using the arbitrariness of the variations \(\delta \textbf{q},\delta \textbf{p}\) as

$$\begin{aligned} \delta q_1:~&\dot{p}_1+k_1 q_1|q_1|-P= 0,\quad \delta q_2: \dot{p}_2+k_2 q_2|q_2|+P=0,\end{aligned}$$
(5.4a)
$$\begin{aligned} \delta p_1:~&\dot{q}_1= p_1/m_1,\quad \delta p_2: \dot{q}_2= p_2/m_2,\quad \delta P: q_1-q_2-A = 0. \end{aligned}$$
(5.4b)

The multiplier P is determined by taking twice the time derivative of the constraint yielding, first, that \(p_1/m_1-p_2/m_2=0\) and, second, that \(P = (m_1+m_2)(k_1 q_1|q_1|/m_1-k_2 q_2|q_2|/m_2)/(m_1 m_2)\). This model is readily tested numerically by using a sympletic integrator (Leimkühler and Reich 2009), with a forward timestep for \(\textbf{p}\) and a backward timestep for \(\textbf{q}\), that uses the update of \(\textbf{p}\) after first calculating the multiplier P. Initial conditions need to satisfy the constraint as well as \(p_1/m_1=p_2/m_2\). The timestepping described maintains these constraints exactly, which can be readily verified.

Taking Luke’s variational principle as starting point may be a surprise since Luke states himself that “No satisfactory solution seems known for the general problem of finding suitable Lagrangian functions. For the water wave problem, in particular, the pressure function used in (1) is more productive than the traditional form of the Lagrangian, \(L^{*}\), equal to kinetic minus potential energy” (Luke 1967). Luke found his variational principle presumably by insight. Cotter and Bokhove (2010) have, in contrast, shown that one can derive Luke’s variational principle systematically from a Hamilton’s action principle consisting of kinetic minus potential energy, with pairs of generalised field coordinates and conjugate momenta. There are several advantages for using such geometric formulations of hydrodynamics for water waves and, in particular, for coupling deep or intermediate water-wave dynamics to either moving structures such as elastic beams, buoys or ships or different, shallow-water hydrodynamic models. These advantages are based on the following “principles”:

  • The first principle is that, when damping and wave breaking are absent, the appropriate (coupled) models should contain a conservative limit.

  • The second principle is that conservative, coupled wave-structure or coupled deep- and shallow-water systems should in a relatively straightforward manner consist of the sum of the variational principles of the separate systems. As a consequence the combined system remains consistent without spurious energy losses or gains.

  • The third principle is that we directly discretise these (nonlinear and/or coupled) systems consistently in space and time, to obtain a space-time discrete algebraic variational (finite-element) system. Its variation then “semi-automatically” yields a stable and robust numerical scheme for advanced water-wave modelling.

We will employ finite-element methods (FEM) because the weak formulation inherent in FEM closely matches the weak formulation of variational principles. It is therefore a relatively small step—involving the finite-element expansion of the variables involved, their substitution and integration—to turn the relevant variational principle for continuum water-wave dynamics into a spatially discrete or space-time discrete variational principle. Variation of the latter algebraic principle then yields the final discretisation to be implemented. To facilitate the development of such variational discretisations, we have employed Firedrake “...an automated system for the portable solution of partial differential equations using the finite element method” to implement our numerical discretisations in an efficient manner (Rathgeber et al. 2016).

The beauty of water-wave dynamics lies in part in the abundance of water-wave phenomena surrounding us. We can, and most likely do, all observe water-wave motion on a daily basis. In what follows, we will both show photographs of water-wave phenomena (as in Figs. 5.1, 5.2, 5.3 and 5.4 using images from O.B.’s laboratory experiments and photographs from other people) as well as a range of numerical simulations from numerical models obtained following the above “principles”, including simulation results from Bokhove and Kalogirou (2016) , Gagarina et al. (2014, 2016), Gidel et al. (2017), Gidel (2018).

This chapter has the following outline. Luke’s VP is derived, as opposed to posited, in Sect. 5.2. In Sect. 5.3, Luke’s VP is transformed from a time-dependent domain with a free surface and wavemaker to a fixed reference domain, resulting in Miles’ VP in a transformed domain. Miles’ VP then forms the basis to discuss three compatible numerical discretisations, directly based on the VP. Numerical results of two of the methods are compared and validated against wavetank experiments in Sect. 5.3.2, before we consider a novel discretisation of a third method in detail. A novel derivation of the variational coupling between a potential-flow water-wave model and a shallow-water model on the beach is investigated in Sect. 5.4, with illustrative numerical results. We conclude in Sect. 5.5 and finish with some future research directions.

5.2 Derivation of Luke’s Variational Principle

In Cotter and Bokhove (2010), the starting point is a Lagrangian density \(L_{incr}\) consisting of the kinetic energy minus potential energy of a compressible fluid weakly constrained to be incompressible:

$$\begin{aligned} L_{incr} = \frac{1}{2} D|\textbf{u}|^2-g D (z-H_0)+P(1-D) \end{aligned}$$
(5.5)

with scaled density \(D=D(x,y,z,t)\) such that density \(\rho =\rho _0 D\) with constant water density \(\rho _0\) and scaled pressure \(P=p/\rho _0\) enforcing the constraint \(1-D=0\). To instill dynamics, “Lin” constraints (named after C.C. Lin) were imposed on the space-time integral of \(L_{incr}\), i.e., the continuity equation \(\partial _tD+\boldsymbol{\nabla }\cdot (D\textbf{u})=0\) was enforced with a Lagrange multiplier \(\phi \) and the kinematic condition for a single-valued free-surface was enforced by another Lagrange multiplier. By taking variations with respect to the velocity \(\textbf{u}\) it turns out that potential flow becomes a consequence, i.e. one derives that \(\textbf{u}=\boldsymbol{\nabla }\phi \). After subsequent substitution of this relation \(\textbf{u}=\boldsymbol{\nabla }\phi \) back into this Lin-constrained variational principle, the following “pre-Luke” variational principle (Cotter and Bokhove 2010) is shown to emerge:

$$\begin{aligned} 0 =&\delta \int _0^T \mathcal{L}_{p}[\phi ,\tilde{\phi },D,h]\,{\mathrm d}{t}\end{aligned}$$
(5.6a)
$$\begin{aligned} =&\delta \int _0^T \int _{\varOmega _H}\int _0^h D\partial _t \phi +\frac{1}{2} D|\boldsymbol{\nabla }\phi |^2+g D (z-H_0) + P(D-1)\, {\mathrm d}{z}\,{\mathrm d}{x}\,{\mathrm d}{y}\,{\mathrm d}{t} \end{aligned}$$
(5.6b)

with \(\tilde{\phi }(x,y,t)=\phi \left( x,y,h(x,y,t),t\right) \) in a domain with a flat bottom at \(z=0\), vertical channel walls (for the moment), horizontal extent \(\varOmega _H\) and vertical extent \(z\in [0,h]\), and a free surface at rest residing at \(z=H_0\). Similar to the basic example with Hamilton’s equations (5.2), variation of (5.6) yields Hamilton’s equations,

$$\begin{aligned} \delta P:&\quad D=1\end{aligned}$$
(5.7a)
$$\begin{aligned} \delta D:&\quad \partial _t\phi +\frac{1}{2}|\boldsymbol{\nabla }\phi |^2+ g (z-H_0) = -P\end{aligned}$$
(5.7b)
$$\begin{aligned} \delta \phi :&\quad \partial _t D+\boldsymbol{\nabla }\cdot (D\boldsymbol{\nabla }\phi ) = 0\end{aligned}$$
(5.7c)
$$\begin{aligned} \delta h:&\quad \partial _t\phi +\frac{1}{2}|\boldsymbol{\nabla }\phi |^2+ g (h-H_0) = 0\quad \textrm{at}\quad z=h\end{aligned}$$
(5.7d)
$$\begin{aligned} \delta \tilde{\phi }:&\quad \partial _th+\boldsymbol{\nabla }\phi \cdot \boldsymbol{\nabla }h= \partial _z\phi \quad \text {at}\quad z=h, \end{aligned}$$
(5.7e)

in which we have used the constraint \(D=1\) at the free surface already, integration by parts in time with end-point conditions \(\delta \phi (x,y,z,0)=\delta \phi (x,y,z,T)=0\) (see Appendix 1), Gauss’ law with \(\hat{\textbf{n}}\cdot \boldsymbol{\nabla }\phi =0\) at solid walls with the relevant outward normal \(\hat{\textbf{n}}\), and with outward normal \(\hat{\textbf{n}}=(-\boldsymbol{\nabla }h,1)^T/\sqrt{(1+|\boldsymbol{\nabla }h|^2)}\) at the free surface located at \(z=h(x,y,t)\).

The structure of (5.6) and (5.7) is the same as in (5.1) and (5.2), or as in (5.3) and (5.4), with the fields \(\{\phi ,\tilde{\phi }\}\) playing the role of generalised coordinates \(\textbf{q}\) and fields \(\{D,h\}\) playing the role of generalised momenta \(\textbf{p}\). Pre-Luke’s variational principle (5.6) does, however, have an additional constraint \(D-1=0\) relative to (5.1), but this is akin to the constraint \(q_1-q_2-A=0\) and Lagrange multiplier P in (5.3). After applying the constraint \(D=1\), Hamilton’s equations (5.7) reduce to the well-known potential-flow water-wave equations with Laplacian \(\boldsymbol{\nabla }_{}^2\phi =0\) from (5.7c), dynamic boundary condition (5.7d) and kinematic boundary condition (5.7e), but we have an additional equation defining the fluid pressure P via (5.7b). By imposing constraint \(D=1\) directly onto pre-Luke’s variational principle (5.6), we find Luke’s variational principle

$$\begin{aligned} 0 =&\delta \int _0^T \mathcal{L}[\phi ,\tilde{\phi },h]\,{\mathrm d}{t} = \delta \int _0^T \int _{\varOmega _H}\int _0^h \partial _t \phi +\frac{1}{2} |\boldsymbol{\nabla }\phi |^2+g (z-H_0)\,{\mathrm d}{z}\,{\mathrm d}{x}\,{\mathrm d}{y}\,{\mathrm d}{t} \end{aligned}$$
(5.8)

with, as Luke (1967) stressed in his remark quoted in the introduction, the (negative and scaled) pressure as integrand. The disadvantage of (5.8) in contrast to (5.6) is that it does not provide an explicit expression for the pressure P. For fluid-structure interactions involving water waves coupled to dynamic structures, this implies that there is no explicit mathematical expression for the value of the pressure on either the structure or at the waterline.

5.3 Transformed Luke’s/Miles’ Variational Principles with Wavemaker

In these more complex situations with fluids and structures as well as for numerical purposes, it is advantageous to transform the time-dependent domain to new coordinates in a fixed domain. Such a transformation is considered next and, to simplify the exposition, only within a two-dimensional domain \((x,z)\in \varOmega \).

Consider water waves modelled as incompressible potential flow. The domain is bounded on the left side by a wavemaker at \(x=W(z,t)\), from below by a flat bottom at \(z=0\), on the right side by a solid wall at \(x=L_s\) and from above by a free surface parametrised as \(\textbf{X}_s=(X,Z)\). Here \(H_0\) is the position of the free surface at rest for the case with the left boundary at \(x=W(z,t)=0\). The free surface is allowed to overturn as long as domain \(\varOmega \) stays singly-connected during the time interval \(t\in [0,T]\) considered. The solenoidal velocity is now defined as \(\textbf{u}=(u,w)=\boldsymbol{\nabla }_{}\phi \equiv (\partial _x,\partial _z)\phi (x,z,t)\). Starting from Luke’s variational principle (5.8) restriced to a vertical plane, the water-wave dynamics then arises from

$$\begin{aligned} 0 =&\delta \int _0^T \iint _{\varOmega } \partial _t\phi +\frac{1}{2}|\boldsymbol{\nabla }_{}\phi |^2+g (z-H_0) \,{\mathrm d}x\,{\mathrm d}z \,{\mathrm d}t. \end{aligned}$$
(5.9)

As in Bridges and Donaldson (2011), we transform the space-time domain with \((x,z)\in \varOmega \) and \(t\in [0,T]\) to a cuboid \(\xi \in [0,L_s],\eta \in [0,H_0],\tau \in [0,T]\) with \(\tau =t\), while we have added a wavemaker. The required transformations are

$$\begin{aligned} \partial _t =&\partial _\tau +\frac{J_1}{|J|}\partial _\xi +\frac{J_2}{|J|}\partial _\eta ,\quad \partial _x = \frac{z_\eta }{|J|}\partial _\xi -\frac{z_\xi }{|J|}\partial _\eta ,\quad \partial _z = -\frac{x_\eta }{|J|}\partial _\xi +\frac{x_\xi }{|J|}\partial _\eta , \end{aligned}$$
(5.10a)

in which the determinantal minors

$$\begin{aligned} |J| =&x_\xi z_\eta -x_\eta z_\xi ,\quad J_1 = x_\eta z_\tau -x_\tau z_\eta ,\quad J_2 = x_\tau z_\xi -x_\xi z_\tau \end{aligned}$$
(5.10b)

arise from the three-dimensional space-time Jacobian

$$\begin{aligned} J =&\left( \begin{array}{ccc} x_\xi &{} x_\eta &{} x_\tau \\ z_\xi &{} z_\eta &{} z_\tau \\ 0 &{} 0 &{} 1 \end{array} \right) . \end{aligned}$$
(5.10c)

Under transformations (5.10), Luke’s variational principle (5.9) becomes

$$\begin{aligned} 0 =&\delta \int _0^T \int _0^{L_s} \int _0^{H_0} (x_\xi z_\eta -x_\eta z_\xi ) \partial _\tau \phi + (x_\eta z_\tau -x_\tau z_\eta ) \partial _\xi \phi + (x_\tau z_\xi -x_\xi z_\tau ) \partial _\eta \phi \nonumber \\&+\frac{1}{2\,J|} \left( (x_\eta ^2+z_\eta ^2)|\partial _\xi \phi |^2-2(x_\xi x_\eta +z_\xi z_\eta )\partial _\xi \phi \partial _\eta \phi + (x_\xi ^2+z_\xi ^2)|\partial _\eta \phi |^2 \right) \nonumber \\&\qquad \qquad +|J| g (z-H_0) \,{\mathrm d}\xi \,{\mathrm d}\eta \,{\mathrm d}\tau . \end{aligned}$$
(5.11)

Using (5.10b), it is straightforward to derive the geometric conservation law

$$\begin{aligned} \partial _\tau |J|+ \partial _\xi J_1+\partial _\eta J_2 =&0, \end{aligned}$$
(5.12)

whence, by combining (5.11) and (5.12), we obtain

$$\begin{aligned} 0 =&\delta \int _0^T \int _0^{L_s}\int _0^{H_0} \partial _\tau (|J|\phi )+ \partial _\xi (J_1\phi )+ \partial _\eta (J_2\phi )+\nonumber \\&\frac{1}{2\,J|}\left( (x_\eta ^2+z_\eta ^2)|\partial _\xi \phi |^2-2(x_\xi x_\eta +z_\xi z_\eta )\partial _\xi \phi \partial _\eta \phi + (x_\xi ^2+z_\xi ^2)|\partial _\eta \phi |^2 \right) \nonumber \\&\qquad \qquad \quad +|J| g (z-H_0) \,{\mathrm d}\xi \,{\mathrm d}\eta \,{\mathrm d}\tau . \end{aligned}$$
(5.13)

The above is the same as in Bridges and Donaldson (2011) but, due to the new wavemaker condition \(x=W(z,\tau )\) at \(\xi =0\), new terms emerge when we integrate, term-by-term, \(\partial _\tau (|J|\phi )+ \partial _\xi (J_1\phi )+ \partial _\eta (J_2\phi )\) in the variational principle (5.13). This demands that we adapt but also slightly extend the derivation given in Bridges and Donaldson (2011). The first integral term in (5.13) can be manipulated to yield

$$\begin{aligned}&\delta \int _0^{H_0} \int _0^{L_s} \int _0^T \partial _\tau (|J|\phi ) \,{\mathrm d}\tau \,{\mathrm d}\xi \,{\mathrm d}\eta = \int _0^{H_0} \int _0^{L_s} \phi \left( (\delta x)_\xi z_\eta +x_\xi (\delta z)_\eta \right. \nonumber \\&\qquad \quad \left. -(\delta x)_\eta z_\xi -x_\eta (\delta z)_\xi \right) |_{\tau =0}^{\tau =T} + |J|\delta \phi |_{\tau =0}^{\tau =T}\,{\mathrm d}\xi \,{\mathrm d}\eta \nonumber \\&\qquad = \int _0^{H_0} \int _0^{L_s}\left( \phi \partial _\xi (z_\eta \delta x - x_\eta \delta z )+\phi \partial _\eta ( x_\xi \delta z - z_\xi \delta x ) \right) |_{\tau =0}^{\tau =T}\,{\mathrm d}\xi \,{\mathrm d}\eta = 0, \end{aligned}$$
(5.14)

where we have used end-point conditions \(\delta \phi |_{\tau =0}=\delta \phi |_{\tau =T}=0\), \(\delta x|_{\tau =0}=\delta x|_{\tau =T}=0\) and \(\delta z|_{\tau =0}=\delta z|_{\tau =T}=0\). The second integral term in (5.13) becomes

$$\begin{aligned} \int _0^{L_s}\int _0^{H_0} \partial _\xi \left( (x_\eta z_\tau -x_\tau z_\eta )\phi \right) \,{\mathrm d}\xi \,{\mathrm d}\eta =&\int _0^{H_0} (x_\eta z_\tau -x_\tau z_\eta )\phi |_{\xi =0}^{\xi = L_s}\,{\mathrm d}\eta \nonumber \\ =&\underline{\int _0^{H_0} z_\eta \partial _\tau W \phi |_{\xi =0}\,{\mathrm d}\eta }, \end{aligned}$$
(5.15)

since at \(\xi =L_s\) also \(x=L_s\), and therefore \(x_\eta |_{\xi =L_s}=x_{\tau }|_{\xi =L_s}=0\), while at \(\xi =0\) one has \(x=W(z,\tau )\) such that \(x_\eta =\partial _z W z_\eta \), \(x_\tau =\partial _\tau W+\partial _z W z_\tau \) and \(x_\eta z_\tau -x_\tau z_\eta = -z_\eta \partial _\tau W\). The third integral term in (5.13) becomes

$$\begin{aligned} \int _0^{L_s}\int _0^{H_0} \partial _\eta \left( (x_\tau z_\xi -x_\xi z_\tau )\phi \right) \,{\mathrm d}\xi \,{\mathrm d}\eta =&\int _0^{L_s} (x_\tau z_\xi -x_\xi z_\tau )\phi |_{\eta =0}^{\eta =H_0}\,{\mathrm d}\xi \nonumber \\ =&\underline{\int _0^{L_s} (x_\tau z_\xi -x_\xi z_\tau )|_{\eta =H_0}\tilde{\phi }\,{\mathrm d}\xi }, \end{aligned}$$
(5.16)

since \(z=0\) at \(\eta =0\) and thus \(z_{\xi }|_{\eta =0}=z_{\tau }|_{\eta =0}=0\). The outcome is therefore that there are two surface contributions, underlined in (5.15) and (5.16), one at the moving free surface \(\eta =H_0\) and one at the moving wavemaker \(\xi =0\). The gravitational energy is also transformed as follows

$$\begin{aligned}&\int _0^{L_s}\int _0^{H_0} (x_\xi z_\eta - x_\eta z_\xi ) g (z-H_0)\,{\mathrm d}\xi \,{\mathrm d}\eta \nonumber \\&\qquad = \int _0^{L_s}\int _0^{H_0} \partial _\eta \left( x_\xi (\frac{1}{2}\,g z^2-gH_0 z)\right) -\partial _\xi \left( x_\eta (\frac{1}{2}\,g z^2-g H_0 z)\right) \,{\mathrm d}\xi \,{\mathrm d}\eta \nonumber \\&\qquad = \int _0^{L_s} x_\xi \frac{1}{2}\,g z^2-g H_0 z|_{\eta =0}^{\eta =H_0}\,{\mathrm d}\xi -\int _0^{H_0} x_\eta \frac{1}{2}\,g z^2 - g H_0 z|_{\xi =0}^{\xi =L_s}\,{\mathrm d}\eta \nonumber \\&\qquad = \int _0^{L_s} x_\xi g(\frac{1}{2} z^2-H_0 z)|_{\eta =H_0}\,{\mathrm d}\xi + \int _0^{H_0} x_\eta g (\frac{1}{2} z^2-H_0 z)|_{\xi =0}\,{\mathrm d}\eta , \end{aligned}$$
(5.17)

again using the conditions at \(\xi =L_s\) as well as \(z=0\) at \(\eta =0\).

Hence, for a domain with a flap-type wavemaker at \(\xi \) and a free surface at \(\eta =H_0\), Luke’s variational principle in transformed coordinates (5.13) becomes Miles’ variational principle in transformed coordinates

$$\begin{aligned} 0 =&\delta \int _0^T \int _0^{L_s}\Bigl (x_\tau z_\xi -x_\xi z_\tau )\tilde{\phi }+x_\xi g (\frac{1}{2} z^2-H_0 z)\Bigr )|_{\eta =H_0}\,{\mathrm d}\xi \nonumber \\&\qquad +\int _0^{H_0} \Bigl (z_\eta \partial _\tau W \phi + x_\eta g (\frac{1}{2} z^2-H_0 z)\Bigr )|_{\xi =0} \, {\mathrm d}\eta +\mathcal{K}\,{\mathrm d}\tau \nonumber \\ \equiv&\delta \int _0^T \int _0^{L_s}\Bigl (x_\tau z_\xi -x_\xi z_\tau )\tilde{\phi }+x_\xi g (\frac{1}{2} z^2-H_0 z)\Bigr )|_{\eta =H_0}\,{\mathrm d}\xi \nonumber \\&\qquad +\int _0^{H_0} \Bigl (z_\eta \partial _\tau W \phi + x_\eta g (\frac{1}{2} z^2-H_0 z)\Bigr )|_{\xi =0} \, {\mathrm d}\eta \nonumber \\&\qquad +\int _0^{L_s}\int _0^{H_0} \frac{1}{2\,J|}\left( (x_\eta ^2+z_\eta ^2)|\partial _\xi \phi |^2-2(x_\xi x_\eta +z_\xi z_\eta )\partial _\xi \phi \partial _\eta \phi \right. \nonumber \\&\qquad \qquad \qquad \left. + (x_\xi ^2+z_\xi ^2)|\partial _\eta \phi |^2 \right) \,{\mathrm d}\xi \,{\mathrm d}\eta \,{\mathrm d}\tau \end{aligned}$$
(5.18)

with kinetic energy \(\mathcal{K}\).

The challenge in the variation of Miles’ variational principle (5.18) is that it results in variations of the variables \(\{\phi ,x,z\}\) whereas \(\{x,z\}\) can only be independent at the free surface and partially independent at the moving wavemaker. Bridges and Donaldson (2011) provide an overview of models for the motion of \(x(\xi ,\eta ,\tau )\) and \(z(\xi ,\eta ,\tau )\), including (nonlinear) elliptical solvers for \(\{x,z\}\) driven by the moving boundaries. Variation of the (nonlinear) elliptic solvers will lead to linear equations, for \(\{\delta x,\delta z\}\), that relate the variations in the interior to the independent variations at the moving boundaries, denoted by \(\{X,Z\}\). It is shown in Bridges and Donaldson (2011) that \(\delta \mathcal{K}/\delta x=\delta \mathcal{K}/\delta z=0\) in the interior, after one uses the transformed elliptic equation for \(\phi \) in the interior. The motion of \(\{x,z\}\) can in certain cases be specified and in other cases be imposed via Lagrange multipliers, the latter which has neither been explored thoroughly in an analytical way nor in a numerical way. Consequently, the entire variation of (5.18) will lead to variations of only the variables \(\{\phi ,\tilde{\phi },X,Z\}\). The numerical integration with finite-element methods (FEM) of (5.18) including (regular) mesh motion was explored for the first time in Gagarina et al. (2012, 2014) and Gidel (2018).

5.3.1 FEM and Mesh Motion

Hitherto, two numerical approaches have been developed and applied to evaluate and discretise (5.18) for domains with a piston wavemaker such that the boundary condition on the left-side of the channel becomes \(x=W(z,t)=R(t)\). In the first approach, marked by I, two variations have been developed and employed. The difference is that in variation I.A, a continuous Galerkin FEM is used with, e.g., quadrilateral elements in the vertical \(\{x,z\}\)–plane, while in variation I.B a Galerkin FEM is used in the horizontal plane and higher-order Lagrange polynomials in one element in the vertical, in the transformed space and in three dimensions.

Variation I.A uses a space-time finite-element discretisation of Miles’ variational principle in a two-dimensional \(\{x,z\}\in [R,L_s]\times [0,h]\)–plane, so without explicitly transforming it to the fixed reference domain in (5.18). The nodes of the (quadrilateral) mesh are moved in a regular fashion. In \(\{x,z\}\in [R,L_w]\times [0,h]\), with \(L_w<L_s\), the nodes are moved in the horizontal and vertical according to the method of lines, and in a linear fashion, such that the horizontal nodal movement at \(L_w\) is zero and is R(t) on the piston wavemaker and, similarly, zero at the bottom at \(z=0\) and h(xt) at the non-overturning free surface. For \(x>L_w\) nodes are only moving in the vertical. This prescription of the node movement implies that \(\delta x=0\) and that \(\delta z\) is uniquely and in a linear manner determined in terms of \(\delta h\). The variation of the space-discrete variational principle then directly yields the discrete equations of motion. The detailed methodology is described in Gagarina et al. (2014, 2016).

Variation I.B in essence uses (5.18) with explicit expressions for the motion of x and z. We extend the description in Gidel (2018), where the wavemaker is a piston \(W(z,t)=R(t)\), here to the general waveflap expression \(x=W(z,t)\). The first transformation is from \(\{x,z,t\}\) to \(\{\chi ,\tilde{z}=z,\tilde{t}=t\}\) with \(\chi \in [0,L_w]\) and

$$\begin{aligned} x = \frac{W(\tilde{z},\tilde{t})L_w + \chi \left( L_w-W(\tilde{z},\tilde{t}) \right) }{L_w}. \end{aligned}$$
(5.19)

The second transformation is from \(\{\chi =\xi ,\tilde{z},\tilde{t}=\tau \}\) to \(\{\xi =\chi ,\eta ,\tau \}\) with

$$\begin{aligned} x(\xi ,\eta ,\tau ) =&\frac{\xi \bigl (L_w-W(\eta h/H_0,\tau )\bigr )+W(\eta h/H_0,\tau )L_w}{L_w}~\text {and}~ z(\xi ,\eta ,\tau ) = \frac{\eta h}{H_0}, \end{aligned}$$
(5.20)

where \(h=h(\xi ,\tau )\). Expressions (5.20) can be substituted into (5.18), with \(\delta x\) and \(\delta z\) uniquely and in a linear manner determined in terms of \(\delta h\). The next step differs from variation I.A: first (Lagrange) polynomials are used in the variational principle to eliminate the vertical \(\eta \)–dependence by integration over these polynomials, leading to several predetermined matrices and vectors. It results in a reduced variational principle in terms of the horizontal spatial dimensions and time. Even though in the above we illustrated the approach in one horizontal dimension, Gidel (2018) extended the derivation to three dimensions and uses a priori an explicit coordinate transformation instead of the generic one developed to arrive at (5.18). The results are, by default, the same. Subsequently, this variational principle in the horizontal plane, based on polynomial expansions with one element in the vertical, is discretised using continuous Galerkin finite elements, on, e.g., quadrilateral elements in the horizontal. The variation of the now fully space-discrete variational principle then directly yields the space-discrete equations of motion. Both symplectic Euler and Störmer-Verlet time-stepping schemes, extended to include wave-forcing terms, have then been used to arrive at space-time discrete equations of motion. Alternatively, one can use (dis)continuous Galerkin finite-element methods in time (Bokhove and Kalogiro 2016; Gagarina et al. 2016) to first discretise the space-discrete variational principle in time as well, which variation subsequently leads to the same space-time discrete equations of motion. Approach I.B has been implemented in Firedrake (Rathgeber et al. 2016), such that the variations of the VP are essentially directly implemented in weak form, cf. the actual mathematical formulations. In Firedrake, details of the finite-element implementation are to a large extent hidden from the user, including matrix definitions, matrix assembly, nonlinear solvers, parallelisation (via MPI) and preconditioning.

In the second approach, marked by II, Miles’ variational principle (5.18) is discretised in space using a continuous Galerkin FEM and two nonlinear elliptic solvers, one each for x and z, are used to determine \(\{x(\xi ,\eta ,\tau ),z(\xi ,\eta ,\tau )\}\). These nonlinear elliptic solvers and the gradients of x and z in (5.18) are discretised using finite-difference approximations and solved with an iterative successive overrelation method. Dirichlet boundary conditions for x and z are used at solid-wall boundaries and at the free surface one sets \(x=X\) and \(z=Z\). The variations of this finite-difference approximation of the nonlinear elliptic solvers for x and z are linear in \(\delta x\) and \(\delta z\). This therefore again relates all interior domain variations of \(\delta x,\delta z\), as in the previous approach I.A and I.B, in a linear fashion to the (free-)surface evariations \(\delta X,\delta Z\). The equations for the variables \(\{X,Z\}\) and \(\phi (\xi ,H_0,\tau )\) (at the free surface) are then stepped forward as conjugate variable pairs in time using a symplectic Störmer-Verlet time integrator, cf. Gagarina et al. (2012).

The results of these two approaches are geometric space-time discretisations of the potential-flow water-wave equations. We appear to be the first to have developed such an approach in a completely systematic and geometric manner. The advantage of such geometric space-time integrators above classical nongeometric ones is that there is no artifical numerical damping. For long-time simulations, wave-amplitudes are therefore preserved. A disadvantage may be that one has to use a partially implicit numerical discretisation, which is more costly to implement. Another disadvantage is that energy and motion cannot escape to smaller and smaller scales because there is no subgrid-scale parameterization integrated in the discretisation. It depends on the numerical application at hand whether such a geometric approach is desirable or not.

Rogue waves are anomalously high waves, with at least twice the wave amplitude of the ambient sea (Dysthe et al. 2008). Their occurrance at sea is rare and difficult to predict, both statistically and deterministically. Understanding the occurrence of rogue waves is important because they have damaged or destroyed ships as well as maritime and coastal structures, see Nikolkina and Didenkulova (2011) for an overview of rogue-wave maritime disasters. Following our approach, we have successfully simulated these rogue-wave interactions in long-time simulations, also for a Benney-Luke approximation of the potential water-wave models, cf. Gagarina et al. (2014), Bokhove & Kalogirou (2016), Gidel et al. (2017), Gidel (2018). Some of these numerical results will be presented in Sect. 5.3.2.

Fig. 5.5
figure 5

Figure 11, taken from Gagarina et al. (2014) taken with permission

Free surface h(xt) at various locations x as function of time t for numerical simulations using approach I.A (Störmer-Verlet scheme, denoted by SV: solid black lines) versus six experimental-probe measurements (red solid lines) in MARIN’s wave tank a)-to-f) at \(x=(10,20,40,49.5,50,54)\) m.

Fig. 5.6
figure 6

Figure 3.20 from Gidel (2018) used with permission

Free surface h(xt) at various locations x as function of time t for numerical simulations using approach I.B (Symplectic Euler, denoted by SE: solid blue lines; SV: green dashed line) versus six experimental-probe measurements (black solid lines) in MARIN’s wave tank at \(x=(10, 20, 40, 49.5, 50, 54)\) m as indicated.

5.3.2 Numerical Results: Comparison with Wave-Tank Experiments

The first two numerical approaches are compared with data from wave-tank experiments which have been collected at the Maritime Research Institute Netherlands (MARIN). MARINs Case 202002 is considered, which is one case in the suite of experimental test cases reported (Bunnik 2010). The wavetank at hand is 195.4 m long with a piston wavemaker at \(x=R(t)\) and the water depth at rest is 1 m. The set-up is symmetric such that the experiments are effectively two dimensional in a vertical cross-section. Simulations are stopped before any wave reflections from the end of the tank are having an effect. The wavemaker signal is such that a rogue wave arises via wave focussing at circa \(t=109.5\) s and \(x=50\) m.

Fig. 5.7
figure 7

Time spectra at probes 2, 3 and 5 at \(x=(20,40,50)\) m for simulation approach I.A (blue lines) and the experiments (red lines) displayed as amplitude versus frequency (Fig. 13, from Gagarina et al. (2014), used with permission)

In approach I.A, using data from a probe around \(x=50\) m, the (finest) mesh size and timestep are determined based on linear wave-dispersion estimates, and are found to be \(\varDelta x = 0.00385\) m and \(\varDelta t = 0.001\) s. An exponential distribution of 20 mesh points is used in the vertical. In approach I.B, the numerical wave basin is 120 m long with a uniform mesh. The mesh size \(\varDelta x = 0.01\) m and timestep \(\varDelta t=0.001\) s are again based on linear wave-dispersion estimates. Nine Lagrange degrees-of-freedom are taken into account in the vertical. The comparison between each simulation and the experimental data is shown as a time series in Figs. 5.5 and 5.6, while the corresponding Fourier spectra can be seen in Figs. 5.7 and 5.8, respectively. Both simulation approaches compare favourably with the experimental data and, hence, with another. The codes for Approach I.B have been parallised, a nearly automatic feature within the Firedrake FEM environment.

Fig. 5.8
figure 8

After Fig. 3.21 from Gidel (2018), used with permission

Time spectra at probes 1-to-6 simulation for approach I.A. for the experiments, and simulations with SE and SV, as indicated.

5.3.2.1 Third Approach

The third and novel geometrical approach to discretise (5.18) is developed next. It concerns the second principle stated in the introduction: that the variational principle of coupled models is the sum of the two variational principles. The first variational principle involved will be Miles’ VP but, for simplicity, limited to the case with no variations in \(\delta x\), and the second variational principle concerns the motion of z, renamed to \(\bar{z}\), with the interior motion driven by the free-surface motion.

Rather than imposing the relation between \(\{\delta x,\delta z\}\) and \(\delta h\) or \(\{\delta X,\delta Z\}\) explicitly, as in the first two numerical approaches summarised above, additional equations for x and z will be imposed using Lagrange multipliers. We illustrate the approach for a simplified version of (5.18), i.e., one without wavemaker such that \(W(z,t)=0\), and with \(x=\xi \) such that \(\delta x=0\) and \(\xi \in [0,L_s]\). One can either impose the constraint solution \(z(\xi ,\eta ,\tau )-\eta Z(\xi ,\tau )/H_0=0\), cf. (5.20), directly using a Lagrange multiplier \(\lambda =\lambda (\xi ,\eta ,t)\), or one can impose the constraint differential equation \(\bar{z}_{\eta \eta }=0\) with boundary condition \(\bar{z}(\xi ,0,\tau )=0\) by adding additional interior integrals \(\frac{1}{2}(\bar{z}_\eta )^2+\lambda (z-\bar{z})\) and a boundary integral \(\lambda _0(Z-z)\), thus indirectly imposing the “Dirichlet” boundary condition \(\bar{z}|_{\eta =H_0}=Z\). Consequently, we take \(\delta \bar{z}(\xi ,0,\tau )=\delta \bar{z}(\xi ,H_0,\tau )=0\). The latter second-order equation has, of course, the first constraint as solution: i.e., \(\bar{z}(\xi ,\eta ,\tau ) = \eta Z(\xi ,\tau )/H_0\). In essence what we do, is glueing two different variational principles together, one for the dynamics given in (5.18) and one for the \(\bar{z}\)–movement i.e. \(0=\delta \int _0^{H_0}\frac{1}{2}(\bar{z}_\eta ^2)\,{\mathrm d}\eta \). The approach in Bridges and Donaldson (2011) suggests to impose partial differential equations for z via a Lagrange multiplier \(\lambda \), but the determination of the boundary conditions for \(\lambda \) has proven cumbersome and was left unresolved. Via the method outlined above, essentially renaming z into \(\bar{z}\) before weakly equating them as shown in detail below, we avoid the issues surrounding the definition of boundary conditions for \(\lambda \) because we impose the (numerical) solution for \(\bar{z}\). Before stating the augmented VP, we give a brief example of the idea and why it can work numerically.

Consider the second variational principle in isolation

$$\begin{aligned} 0&= \delta \bigl ( \int _0^{H_0}\frac{1}{2}(\bar{z}_\eta )^2+\lambda (z-\bar{z}) \,{\mathrm d}\eta + \lambda _0({z}-a)|_{\eta =H_0}\bigr )\end{aligned}$$
(5.21a)
$$\begin{aligned}&= \int _0^{H_0} \bar{z}_{\eta }\delta \bar{z}_{\eta }-\lambda \delta \bar{z}+(z-\bar{z})\delta \lambda + \lambda \delta z \,{\mathrm d}\eta +\bigl (\lambda _0\delta z+(z-a)\delta \lambda _0\bigr )|_{\eta =H_0} \end{aligned}$$
(5.21b)
$$\begin{aligned}&= \int _0^{H_0}-(\bar{z}_{\eta \eta }+\lambda )\delta \bar{z}+(z-\bar{z})\delta \lambda + \lambda \delta z \,{\mathrm d}\eta \nonumber \\&\qquad \qquad \qquad +\bigl (\bar{z}_\eta \delta \bar{z}+\lambda _0\delta z+(z-a)\delta \lambda _0\bigr )|_{\eta =H_0}-(\bar{z}_\eta \delta \bar{z})|_{\eta =0}, \end{aligned}$$
(5.21c)

with test function \(\delta \bar{z}|_{\eta =0,H_0}=0\), \(\bar{z}(\eta =0)=0\) and a a constant, yielding

$$\begin{aligned}&\bar{z}_{\eta \eta }+\lambda =0,~ \lambda =0,~ z=\bar{z}, ~ \delta \lambda _0\!\!: z|_{\eta =H_0}=a,~ \delta {z}|_{\eta =H_0}\!\!:\lambda _0=0. \end{aligned}$$
(5.21d)

For illustrative purposes, to discretise (5.21), we use continuous Galerkin finite-element expansions with piecewise linear basis functions \(w_i(\eta )\), e.g. \(\bar{z}\approx w_i\bar{z}_i\) and \({z}\approx w_i{z}_i\) for indices \(i,j=1,\dots , N\), with \(i,j=1\) at \(\eta =0\), \(i,j=N\) at \(\eta =H_0\) and \(i',j'=2,\dots ,N-1\), while using the Einstein summation convention for repeated indices. The variables and their variations belong to the following function spaces \(\delta \bar{z}\in W^1_{0,H_0}\), \(\{\bar{z},\delta z, z\}\in W_0^1\) and \(\lambda \in W^1\) with \(W^1\) the standard Sobolev space \(H^1(\eta \in [0,H_0])\) and with the subscripts on \(W^1\) indicating where the variables belonging to that space are zero. The weak form (5.21b) yields that \(\lambda =0\) and \(z=\bar{z}\) and thus is seen to be equivalent to the weak form \(\int _0^{H_0}z_\eta \delta z_\eta \,{\mathrm d}\eta =0\), and its boundary conditions, as intended by design. The finite-element spaces follow by restriction to the space of first-order polynomials on each element (here rods) with \(C^0\)–continuity. More explicitly, by direct substitution of the above expansions into the weak formulation (5.21b), and after defining mass and “Laplacian” matrices \(M_{ij}=\int w_i(\eta )w_j(\eta )\,{\mathrm d}\eta \) and \(A_{ij}=\int w_i'(\eta ) w_j'(\eta ) \,{\mathrm d}\eta \), we find that

$$\begin{aligned}&A_{i'j}\bar{z}_{j} - M_{i'j}\lambda _{j}= 0,\quad M_{ij} \lambda _j = 0\Longrightarrow M_{i'j}\lambda _j = 0,\nonumber \\&M_{ij}(\bar{z}_j-z_j) = 0\Longrightarrow z_j = \bar{z}_j,\quad \bar{z}_N=a, \end{aligned}$$
(5.22)

yielding that \(\sum _{j'=2}^{N-1} A_{i'j'}\bar{z}_{j'} = -A_{i'N} a\), which is exactly what a direct continuous Galerkin finite-element discretisation with piecewise linear basis functions of \(\bar{z}_{\eta \eta }=0\) with Dirichlet conditions \(\bar{z}=0\) and \(\bar{z}=a\) at \(\eta =0,H_0\) would yield. The example shows that it is required to introduce different variables \(\bar{z}\) and z because variations \(\delta \bar{z}\) and \(\delta z\) obey different conditions at \(\eta =H_0\), but results are what one obtains in a classic FEM.

Similarly, we add the weak formulation of a differential equation for \(\bar{z}\), the interior link \(\lambda (z-\bar{z})\) and the free-boundary link \(\lambda _0(Z-z)\) to the water-wave variational principle with Lagrange multipliers \(\lambda (\xi ,\eta ,\tau )\) and \(\lambda _0(\xi ,\tau )\). At the free surface, define \(\tilde{\phi }\equiv \phi (\xi ,H_0,\tau )\). Variations of a simplified yet extended version of (5.18) become

$$\begin{aligned} 0 =&\delta \int _0^T \int _0^{L_s}\Bigl (-Z_\tau \tilde{\phi }+g (\frac{1}{2} Z^2-H_0 Z)+\lambda _0(Z-z)\Bigr )\bigr |_{\eta =H_0} \,{\mathrm d}\xi \nonumber \\&\quad +\int _0^{L_s}\int _0^{H_0} \frac{1}{2}\bigr ( z_\eta |\partial _\xi \phi |^2-2 z_\xi \partial _\xi \phi \partial _\eta \phi + \frac{(1+z_\xi ^2)}{z_\eta }|\partial _\eta \phi |^2 \bigl )\nonumber \\&\qquad \qquad + \frac{1}{2}(\bar{z}_\eta )^2+\lambda (z-\bar{z}) \,{\mathrm d}\xi \,{\mathrm d}\eta \,{\mathrm d}\tau \end{aligned}$$
(5.23a)
$$\begin{aligned} =&\int _0^T \int _0^{L_s}\bigl ( (\partial _\tau \tilde{\phi }+g(Z-H_0)+\lambda _0)\delta Z -Z_\tau \delta \tilde{\phi }-\lambda _0 \delta z+(Z-z)\delta \lambda _0 \bigr )\bigr |_{\eta =H_0}\,{\mathrm d}\xi \nonumber \\&\qquad + \int _0^{L_s}\int _0^{H_0} z_\eta \partial _\xi \phi \partial _\xi \delta \phi -z_\xi (\partial _\xi \phi \partial _\eta \delta \phi +\partial _\eta \phi \partial _\xi \delta \phi ) +\frac{(1+z_\xi ^2)}{z_\eta }\partial _\eta \phi \partial _\eta \delta \phi \nonumber \\&\qquad +\frac{1}{2}|\partial _\xi \phi |^2\delta z_\eta -\partial _\xi \phi \partial _\eta \phi \delta z_\xi +\frac{z_\xi \delta z_\xi }{z_\eta }|\partial _\eta \phi |^2 -\frac{1}{2}\frac{(1+z_\xi ^2)\delta z_\eta }{z_\eta ^2}|\partial _\eta \phi |^2 \nonumber \\&\qquad \qquad +\bar{z}_\eta \delta \bar{z}_\eta +\lambda (\delta z-\delta \bar{z}) +(z-\bar{z})\delta \lambda \,{\mathrm d}\xi \,{\mathrm d}\eta \,{\mathrm d}\tau \end{aligned}$$
(5.23b)
$$\begin{aligned} =&\int _0^T \int _0^{L_s}\Bigl ( \bigl (\partial _t\tilde{\phi }+g(Z-H_0)+\lambda _0\bigr )\delta Z + (Z-z)|_{\eta =H_0} \delta \lambda _0\nonumber \\&\qquad \qquad + \bigl (\frac{1}{2}|\partial _\xi \phi |^2 -\frac{1}{2} \frac{(1+z_\xi ^2)}{z_\eta ^2}|\partial _\eta \phi |^2-\lambda _0\bigr )|_{\eta =H_0}\delta z\nonumber \\&\qquad \qquad -\bigl (Z_\tau +\partial _\xi \phi z_\xi -\frac{(1+z_\xi ^2)}{z_\eta }\partial _\eta \phi \bigr )\delta \phi \Bigr )\bigr |_{\eta =H_0}\,{\mathrm d}\xi \nonumber \\ +&\int _0^{L_s}\int _0^{H_0} \left( -\partial _\xi (z_\eta \partial _\xi \phi ) +\partial _\xi (z_\xi \partial _\eta \phi )+\partial _\eta (z_\xi \phi \partial _\xi \phi ) -\partial _\eta \bigl (\frac{(1+z_\xi ^2)}{z_\eta }\partial _\eta \phi \bigr )\right) \delta \phi \nonumber \\&+\left( -\partial _\eta \bigl (\frac{1}{2}|\partial _\xi \phi |^2\bigr ) +\partial _\xi (\partial _\xi \phi \partial _\eta \phi ) -\partial _\xi \bigl (\frac{z_\xi }{z_\eta }|\partial _\eta \phi |^2\bigr ) \right. \nonumber \\&\left. +\partial _\eta \bigl (\frac{1}{2}\frac{(1+z_\xi ^2)}{z_\eta ^2}|\partial _\eta \phi |^2\bigr ) +\lambda \right) \delta z -(\bar{z}_{\eta \eta }+\lambda )\delta \bar{z}+(z-\bar{z})\delta \lambda \,{\mathrm d}\xi \,{\mathrm d}\eta \,{\mathrm d}\tau , \end{aligned}$$
(5.23c)

in which we used the end-point conditions \(\delta \bar{z}(\xi ,\eta ,0)=\delta \bar{z}(\xi ,\eta ,T)=0\) and \(\delta \bar{z}(\xi ,0,t)=\delta \bar{z}(\xi ,H_0,t)=0\), and solid-wall boundary conditions at \(\xi =0,L_s\). The resulting equations of motion then follow via (5.23c) from the arbitrariness of the respective variations:

$$\begin{aligned} \delta Z:&~\partial _\tau \tilde{\phi }+g(Z-H_0) + \lambda _0 = 0\quad \text {at}\quad \eta =H_0\end{aligned}$$
(5.24a)
$$\begin{aligned} \delta z|_{\eta =H_0}:&~ \lambda _0= \frac{1}{2} |\partial _\xi \phi |^2-\frac{1}{2} \frac{(1+z_\xi ^2)}{z_\eta ^2}|\partial _\eta \phi |^2\quad \text {at}\quad \eta =H_0\end{aligned}$$
(5.24b)
$$\begin{aligned} \delta \tilde{\phi }:&~ Z_\tau +\partial _\xi \phi z_\xi = \frac{(1+z_\xi ^2)}{z_\eta }\partial _\eta \phi \quad \text {at}\quad \eta =H_0\end{aligned}$$
(5.24c)
$$\begin{aligned} \delta \phi :&~\partial _\xi (z_\eta \partial _\xi \phi ) -\partial _\xi (z_\xi \partial _\eta \phi )-\partial _\eta (z_\xi \partial _\xi \phi ) +\partial _\eta \bigl (\frac{(1+z_\xi ^2)}{z_\eta }\partial _\eta \phi \bigr ) = 0\end{aligned}$$
(5.24d)
$$\begin{aligned} \delta z:&~ \lambda = \partial _\eta \bigl (\frac{1}{2}|\partial _\xi \phi |^2\bigr ) -\partial _\xi (\partial _\xi \phi \partial _\eta \phi ) +\partial _\xi \bigl (\frac{z_\xi }{z_\eta }|\partial _\eta \phi |^2\bigr ) \nonumber \\&\qquad \qquad -\partial _\eta \bigl (\frac{1}{2}\frac{(1+z_\xi ^2)}{z_\eta ^2}|\partial _\eta \phi |^2\bigr ) = 0\end{aligned}$$
(5.24e)
$$\begin{aligned} \delta \bar{z}:&~ \bar{z}_{\eta \eta }+\lambda = 0\end{aligned}$$
(5.24f)
$$\begin{aligned} \delta \lambda :&~ \bar{z} = z\end{aligned}$$
(5.24g)
$$\begin{aligned} \delta \lambda _0:&~ z = Z\quad \text {at}\quad \eta =H_0. \end{aligned}$$
(5.24h)

Using the elliptic equation (5.24d) for \(\phi \) into (5.24e) one derives, as noted, that \(\lambda =0\). The solution of \(\bar{z}_{\eta \eta }=0\) stated earlier is readily found using \(\bar{z}_{\eta =H_0}=Z\) and \(\bar{z}(\xi ,0,t) = 0\). It is helpful to figure out a consistent time integration by first discretising time for (5.24). We leave that to the reader and instead directly give a complete space-time discretisation.

Time discretisation and weak formulation: To establish a time discretisation and in addition a suitable weak formulation, one starts from the second expression (5.23b), by discretising time using a first-order symplectic Euler scheme. The velocity potential is partitioned as follows: \(\phi ={\phi }_1+\mathrm {\varphi }\) with \(\phi _1(\xi ,\eta ,\tau )=\tilde{\phi }(\xi ,\tau )\tilde{\varphi }(\eta )\) such that \(\tilde{\varphi }_1(H_0)=1\), \(\tilde{\varphi }_1(0)=0\) and \(\varphi (\xi ,H_0,t)=0\) such that \(\varphi \) is clearly the interior contribution. This partitioning of the velocity potential is similar to the partitioning used in Kristina et al. (2014) for a different variational coupling problem. The function spaces of the variables are the following:

$$\begin{aligned}&\{ \tilde{\phi }(\xi ,\tau ), Z(\xi ,\tau ),\lambda _0(\xi ,\tau ) \} \in W^1(\eta =H_0)\cap X_h^k,\nonumber \\&\{ \phi _1(\xi ,\eta ,\tau ),\mathrm {\varphi }(\xi ,\eta ,\tau ), z(\xi ,\eta ,\tau ),\bar{z}(\xi ,\eta ,\tau ),\lambda (\xi ,\eta ,\tau ) \} \in W^1(\varOmega )\cap X_h^k \end{aligned}$$
(5.25)

with \(W^1(\varOmega )\) the space of test functions and \(X_h^k\) the polynomials of order k on each element of a triangulation \(\mathcal{T}_h=\{K\}\). This space \(W^1(\varOmega )\) is the standard Sobolev space \(H^1\) with test function \(w\in H^1\), and in the two-dimensional case \(||w||_{\eta =c}=0\) at the appropriate Dirichlet boundary with \(c=0\) or \(c=H_0\) and \(||\cdot ||_{\eta =c}\) is the \(L^2(\eta =c)\)–norm at \(\eta =c\). All functions are \(C^0\)–continuous, thus comprising a classical continuous Galerkin finite-element discretisation. In the implicit, predictor step, based on all arbitrary variations as test functions, except the one for \(\delta Z\), the unknowns \(Z^{n+1}=z^*|_{\eta =H_0},\lambda _0\) and \(\bar{z}^*,z^*,\mathrm {\varphi }^*,\lambda \) are jointly determined from

$$\begin{aligned} 0=&\int _0^T \int _0^{L_s}\bigl (-\frac{(Z^{n+1}-Z^n)}{\varDelta \tau }\delta {\phi }_1-\lambda _0 \delta z+(Z^{n+1}-z^*)\delta \lambda _0 \bigr )|_{\eta =H_0}\,{\mathrm d}\xi \nonumber \\&\quad + \int _0^{L_s}\int _0^{H_0} z^*_\eta \partial _\xi \phi \partial _\xi \delta \varphi -z^*_\xi (\partial _\xi (\varphi ^*+\phi _1^n)\partial _\eta \delta \varphi +\partial _\eta (\varphi ^*+\phi _1^n)\partial _\xi \delta \varphi )\nonumber \\&\qquad \qquad +\frac{(1+(z^*_\xi )^2)}{z^*_\eta }\partial _\eta (\varphi ^*+\phi _1^n)\partial _\eta \delta \varphi \,{\mathrm d}\eta \,{\mathrm d}\xi \nonumber \\&+ \int _0^{L_s}\int _0^{H_0} z^*_\eta \partial _\xi (\varphi ^*+\phi _1^n)\partial _\xi \delta \phi _1 -z^*_\xi (\partial _\xi (\varphi ^*+\phi _1^n)\partial _\eta \delta \phi +\partial _\eta (\varphi ^*+\phi _1^n)\partial _\xi \delta \phi _1)\nonumber \\&\qquad \qquad +\frac{(1+(z^*_\xi )^2)}{z^*_\eta }\partial _\eta (\varphi ^*+\phi _1^n)\partial _\eta \delta \phi _1\nonumber \\&\qquad \qquad +\frac{1}{2}|\partial _\xi (\varphi ^*+\phi _1^n)|^2\delta z_\eta -\partial _\xi (\varphi ^*+\phi _1^n)\partial _\eta (\varphi ^*+\phi _1^n)\delta z_\xi \nonumber \\&\qquad \qquad +\frac{z^*_\xi \delta z_\xi }{z^*_\eta }|\partial _\eta (\varphi ^*+\phi _1^n)|^2 -\frac{1}{2}\frac{(1+(z^*_\xi )^2)\delta z_\eta }{(z^*_\eta )^2}|\partial _\eta (\varphi ^*+\phi _1^n)|^2 \nonumber \\&\qquad \qquad +\bar{z}^*_\eta \delta \bar{z}_\eta +\lambda (\delta z-\delta \bar{z}) +(z^*-\bar{z}^*)\delta \lambda \,{\mathrm d}\xi \,{\mathrm d}\eta \,{\mathrm d}\tau . \end{aligned}$$
(5.26a)

Note that \({\phi }_1^n\) is evaluated at the known, current time \(t^n\) and that \(z^*,\bar{z}^*,\lambda ,\lambda _0\) and \(\mathrm {\varphi }^*\) are all aid variables. The latter highlights that the (discretised) elliptic equation for \(\varphi \) is rephrased as a Poisson problem with \({\mathrm {\varphi }}=0\) at the free surface rather than phrased as a (discretised) Laplace equation for \(\phi \). Similarly, \(\bar{z}^*\) is solved weakly via an elliptic equation, with Dirichlet boundary conditions, with the one at the free surface enforced via both Lagrange multipliers \(\lambda _0\) and \(\lambda \). In the corrector step, based on the arbitrary variations \(\delta Z\) as test functions, \(\tilde{\phi }^{n+1}\) (underlined below) is solved using

$$\begin{aligned} 0=&\int _0^T \int _0^{L_s}\left( \bigl ( \frac{(\underline{\tilde{\phi }^{n+1}}-\tilde{\phi }^n)}{\varDelta \tau }+g(Z^{n+1}-H_0)+{\lambda _0} \bigr )\delta Z \right) \bigr |_{\eta =H_0}\,{\mathrm d}\xi \,{\mathrm d}\tau , \end{aligned}$$
(5.26b)

while again using the current value of the free-surface potential, i.e. \(\tilde{\varphi }^n\), as well as the updates of variable \(Z^{N+1},\lambda _0\) and the aid variables \(\mathrm {\varphi }^*,\lambda \) and \(z^*\), which were all solved in the previous, implicit predictor step. It is clear that the predictor step contains the nonlinearities while the corrector step is linear in the unknowns. The above set-up for the time integration is in essence similar to the one in Gidel (2018) (cf. her expression (3.55)). The extension to mesh motion in two dimensions can proceed along similar lines of reasoning.

5.4 Coupling Water Waves to Shallow-Water Beach Hydraulics

In this section, the second principle stated in the introduction will be explored in a more physically motivated example for a model in which Miles’ VP holds in a deep or intermediate water-depth region and a shallow-water model is used in a beach region (in which waves can break), cf. Figs. 5.3 and 5.4. It turns out that in Eulerian coordinates the only VP for shallow-water dynamics is one involving Clebsch variables. In one spatial dimension, shallow-water dynamics involves two fields: the water depth \(h=h(x,t)\) and the horizontal velocity \(u=u(x,t)\). In two dimensions, it involves three fields \(h=h(x,y,t)\), \(u=u(x,y,t)\) and an additional lateral velocity field \(v=v(x,y,t)\). A description in terms of Clebsch variables involves four fields because the velocity is in that description rewritten as \(u=\partial _x\tilde{\phi }+\pi \partial _x l\) with parcel label \(l=l(x,t)\) and its conjugate \(h\pi \) with \(\pi =\pi (x,t)\), as well as h and its conjugate \(\tilde{\phi }\). These take over the role of q and p in the examples in the introduction. In two spatial dimensions, the derivative \(\partial _x(\cdot )\) is replaced by a two-dimensional gradient.

Rather than using Miles’ VP, we use an extension of the potential-flow model in Cotter and Bokhove (2010), which contains both the three-dimensional potential-flow limit as well as the (horizontally) two-dimensional, depth-averaged shallow-water limit with surface velocities u and v. Hence, this new model contains the vertical component of the vorticity, \(\partial _x v-\partial _y u\), while the other vortical components are, by construction, absent. We will consider a symmetric version of this model with no y–derivatives, except that the label reads \(l(x,t)+y\), such that \(v(x,t) = \partial _y\phi (x,z,t)+\pi (x,t)\partial _y\left( l(x,t)+y\right) = \pi (x,t)\). The vorticity then becomes \(\partial _x v\).

The VP of the symmetric and coupled systems consists of the sum of the two VPs for the separate systems, with the extended potential-flow motion residing in \(x\in [0,L_c]\) with topography \(z=b(x)\), and the shallow-water motion residing in \(x\in [L_c,x_w(t)]\) with \(x_w=x_w(t)\) the dynamic waterline point on the beach with fixed bottom topography \(z=b(x)\). This “coupled VP” in Eulerian coordinates, with now \(\phi (x,z,t)=\varphi (x,z,t)+\tilde{\phi }(x,t)\) and \(\varphi \left( x,z=h(x,t),t\right) =0\), thus reads

$$\begin{aligned} 0 =\;&\delta \int _0^T \mathcal{L}[\mathrm {\varphi },\tilde{\phi },h,l,\pi ] \,{\mathrm d}t \equiv \delta \int _0^T \int _0^{L_c} \tilde{\phi }\partial _t h + l \partial _t(h \pi )-\frac{1}{2}\,g (h+b)^2+g h H_0\,{\mathrm d}x\nonumber \\&\quad -\int _{b(x)}^{b(x)+h(x,t)}\!\!\frac{1}{2} |\boldsymbol{\nabla }\mathrm {\varphi }+(u,v,0)^T|^2\,{\mathrm d}z \,{\mathrm d}x\nonumber \\&\quad +\int _{L_c}^{x_w(t)} \tilde{\phi }\partial _t h + l \partial _t(h \pi )-\frac{1}{2}\,h (u^2 +v^2)-\frac{1}{2}\,g (h+b)^2+g h H_0 \,{\mathrm d}x \,{\mathrm d}t\\ =&\int _0^T\!\!\!\! \int _0^{L_c}\!\!\!\!\!\!\! \left( \partial _t h+\partial _x( h \bar{u}) \right) \delta \tilde{\phi } -( \partial _t\tilde{\phi }+\pi \partial _t l+ \frac{1}{2}|\boldsymbol{\nabla }\mathrm {\varphi }+\textbf{u}|^2+g(h+b-H_0) )|_{z=b+h}\delta h\nonumber \\&\quad - h (\partial _t l +\bar{u}\partial _x l+v)\delta \pi +\left( \partial _t( h \pi )+\partial _x(h \bar{u} \pi ) \right) \delta l\nonumber \\&\quad +(\partial _xb(\partial _x\mathrm {\varphi }+u)-\partial _z\mathrm {\varphi })|_{z=b}\delta \mathrm {\varphi }|_{z=b} -\int _{b(x)}^{b(x)+h(x,t)}\!\!\!\!(\partial _{xx}\mathrm {\varphi }+\partial _{zz}\mathrm {\varphi }+\partial _x u) \delta \mathrm {\varphi }\,{\mathrm d}z\,{\mathrm d}x \nonumber \\&\qquad -\underline{ \left( (h\bar{u})(\delta \tilde{\phi }+\pi \delta l)\right) |_{x=L_c^-} } + \underline{ \left( (h u)(\delta \tilde{\phi }+\pi \delta l) \right) |_{x=L_c^+} }\nonumber \end{aligned}$$
(5.27a)
$$\begin{aligned}&-\underline{ \int _{b(x)}^{b(x)+h(x,t)}\!\!\!\!(\partial _x\varphi +u)\delta \varphi \,{\mathrm d}z}\,|_{x\rightarrow L_c^{-}} +\int _{L_c}^{x_w}\!\!\!\! \left( \partial _t h+\partial _x( h u )\right) \delta \tilde{\phi } -(\partial _t\tilde{\phi }+\pi \partial _t l+B)\delta h \nonumber \\&\qquad - h (\partial _t l +u\partial _x l+v)\delta \pi +\left( \partial _t( h \pi )+\partial _x(h u \pi )\right) \delta l \,{\mathrm d}x\, {\mathrm d}t \end{aligned}$$
(5.27b)

with \(u=\partial _x\tilde{\phi }+\pi \partial _x l\) and \(v=\pi \) for \(x\in [0,x_w]\), Bernoulli function \(B=(u^2+v^2)/2+g (h+b-H_0)\), (surface) velocity \(\textbf{u}=\textbf{u}(x,t)=(u,v,0)^T\) for \(x\in [0,x_w]\), depth-averaged zonal flux \(h \bar{u}=\int _{b(x)}^{b(x)+h(x,t)}\partial _x\mathrm {\varphi }+u\,{\mathrm d}z\) for \(x\in [0,L_c]\), and by using end-point conditions \(\delta h(x,0)=\delta h(x,T)=\delta (h\pi )(x,0)=\delta (h\pi )(x,T)=0\) and \(h(x_w,t)=0\) at the moving waterline \(x_w(t)\). The resulting equations of motion in terms of the Clebsch variables, following directly from the arbitrariness of variations in (5.27b), are:

$$\begin{aligned} \delta \tilde{\phi }:~&\partial _t h+\partial _x( h \bar{u} ) = 0,\nonumber \\ \delta h:~&\partial _t\tilde{\phi }+\pi \partial _t l+\frac{1}{2}|\boldsymbol{\nabla }\mathrm {\varphi }+\textbf{u}|^2+g(h+b-H_0) = 0,\nonumber \\ \delta \pi :~&\partial _t l +\bar{u}\partial _x l+v = 0,\nonumber \\ \delta l:~&\partial _t( h \pi )+\partial _x(h \bar{u} \pi ) = 0,\nonumber \\ \delta \mathrm {\varphi }:~&\partial _{xx}\mathrm {\varphi }+\partial _{zz}\mathrm {\varphi }+ \partial _x u = 0 \end{aligned}$$
(5.28)

in deep water for \(x\in [0,L_c]\), with no normal flow \(\partial _xb(\partial _x\mathrm {\varphi }+u)-\partial _z\mathrm {\varphi }=0\) at the bottom \(z=b\), and

$$\begin{aligned} \delta \tilde{\phi }: \partial _t h+\partial _x( h u ) =&0,\quad \delta h: \partial _t\tilde{\phi }+\pi \partial _t l+B = 0,\nonumber \\ \delta \pi : \partial _t l +u\partial _x l+v =&0,\quad \delta l: \partial _t( h \pi )+\partial _x(h u \pi ) = 0 \end{aligned}$$
(5.29)

in shallow water for \(x\in [L_c,x_w]\). Using the latter equation set and the definitions of u and \(v=\pi \), and then by differentiating the Bernoulli equation with respect to x, it is straightforward to verify that the usual (symmetric) momentum equations emerge, i.e., \(\partial _t u-v\partial _x v+\partial _x B=0\) and \(\partial _t v+u\partial _x v=0\). Hence, this is a reduction from the four equations and variables in (5.29) to three equations for three variables. Likewise, the deep-water system (5.28) can be reduced to the variables \(\{h,u,v,\mathrm {\varphi }\}\), for details see Cotter and Bokhove (2010), Gagarina et al. (2013). The coupling between the two systems is contained in the underlined terms in (5.27), concerning fluxes at \(x=L_c\) that need to balance:

$$\begin{aligned} \lim _{x\rightarrow L_c^+}(h u) \,\delta \tilde{\phi } =&\lim _{x\rightarrow L_c^-}\left( \int _{b(x)}^{b(x)+h(x,t)}(\partial _x\varphi +u)\delta \mathrm {\varphi }\,{\mathrm d}z+h\bar{u} \, \delta \tilde{\phi }\right) ,\nonumber \\ \lim _{x\rightarrow L_c^+} (h u) \pi \,\delta l =&\lim _{x\rightarrow L_c^-} h\bar{u} \pi \, \delta l. \end{aligned}$$
(5.30)

Coupling between a full, deep-to-intermediate-depth water-wave model to a shallow-water model is only meaningful when the depth-dependence of the full water-wave model has become sufficiently small or negligible. Hence, we assume that at \(x=L_c\) the variations are asymptotically close such that

$$\begin{aligned} \delta l|_{x\rightarrow L_c^+} = \delta l|_{x\rightarrow L_c^+},\quad \delta \tilde{\phi }|_{x\rightarrow L_c^+} = \frac{1}{h}\int _{b}^{b+h}\delta \mathrm {\varphi }+\delta \tilde{\phi } \,{\mathrm d}z|_{x\rightarrow L_c^-}. \end{aligned}$$
(5.31)

By using (5.31) in (5.30), we find that the deep-water flux is depth-independent

$$\begin{aligned} \lim _{x\rightarrow L_c^-} h (\partial _x\mathrm {\varphi }+u)=\lim _{x\rightarrow L_c^+}(h u)\quad \mathrm {as~well~as}\quad \lim _{x\rightarrow L_c^+} (h u \pi ) = \lim _{x\rightarrow L_c^-}(h\bar{u} \pi ) \end{aligned}$$
(5.32)

Vice versa, \(\delta \mathrm {\varphi }|_{x=L_c^-}=0\) in (5.30) leads to the shallow-water flux

$$\begin{aligned} hu|_{x=L_c^+}=h\bar{u}|_{x=L_c^-}. \end{aligned}$$
(5.33)

These links between subsystems will be considered in the numerical coupling next.

Two different numerical techniques will be used for the two subsystems. The extended potential-flow water-wave model will be discretised using the spatially second-order variational technique established so far (Gidel 2018), while a classical first-order finite-volume method will be used in shallow water, cf. Audusse et al. (2004), Bokhove (2005). This finite-volume method can deal with breaking waves on the beach in the form of classic hydraulic bores (Whitham 1974). The finite-volume method progresses the mean values of water depth and momentum forward in time on finite elements (or rods in one dimension). Communication between the elements is reached via a numerical flux vector \(\textbf{F}(\textbf{U}_L,\textbf{U}_R)\) with \(\textbf{U}\equiv (h,hu,hv)^T\) at each face (or node in one dimension), in which \(\textbf{U}_{L,R}\) are the limits of the mean values to the left and right of each face. At the coupling point \(x=L_c\), this numerical flux needs to be determined by defining an appropriate \(\textbf{U}_L\) based on the values of variables in the potential-flow domain at \(x=L_c^-\), while in the finite-element potential-flow domain, values from the shallow-water domain, i.e. \(\textbf{U}_R\) at \(x=L_c^+\), will be used.

The finite-element weak formulation for the potential-flow is established, as in Sect. 5.3.1, by taking variations without integration by parts in space, while temporarily considering the shallow-water system to be continuous in space. For simplicity, we will set \(l=\pi =v=0\) in \(x\in [0,L_c]\) and \(\delta l=0\) at \(x=L_c^+\) in the shallow-water domain. The weak formulation we obtain is then as follows

$$\begin{aligned} 0 =&\int _0^T \int _0^{L_c} \underline{ \partial _t h\,\delta \tilde{\phi }+\int _{b(x)}^{b(x)+h(x,t)}(\boldsymbol{\nabla }\mathrm {\varphi }+\boldsymbol{\nabla }\tilde{\phi })\,{\mathrm d}z\,\cdot \boldsymbol{\nabla }\delta \tilde{\phi } }\nonumber \\&\qquad \qquad -\delta h\,\partial _t\tilde{\phi }+(\frac{1}{2}|\boldsymbol{\nabla }\mathrm {\varphi }+\tilde{\phi }|^2+g(h+b-H_0))|_{z=b(x)+h(x,t)}\delta h \,{\mathrm d}x\nonumber \\&\qquad \qquad + \int _{b(x)}^{b(x)+h(x,t)}(\boldsymbol{\nabla }\mathrm {\varphi }+\boldsymbol{\nabla }\tilde{\phi })\cdot \boldsymbol{\nabla }\delta \varphi \,{\mathrm d}z\,{\mathrm d}x +\underline{ \left( (h u)\delta \tilde{\phi } \right) |_{x=L_c^+}}\nonumber \\&+\int _{L_c}^{x_w} \left( \partial _t h+\partial _x( h u ) \right) \delta \tilde{\phi } -( \partial _t\tilde{\phi }+\pi \partial _t l+B )\delta h \nonumber \\&\qquad \qquad - h ( \partial _t l +u\partial _x l+v )\delta \pi +\left( \partial _t( h \pi )+\partial _x(h u \pi ) \right) \delta l \,{\mathrm d}x\,{\mathrm d}t. \end{aligned}$$
(5.34)

Based on the arbitrariness of variations, we can take \(\delta h = \delta \mathrm {\varphi }=0\) and \(\delta \tilde{\phi }\ne 0\), such that only the underlined terms in (5.34) remain. Coupling to the shallow-water flux \((hu)_{x=L_c+}\) is then established in the continuity equation of the potential-flow model, cf. (5.32). Vice versa, we take \(\textbf{U}_L=\bigl (h,\int _b^{b+h}\partial _x(\mathrm {\varphi }+\tilde{\phi })\,\textrm{d}z\bigr )^T|_{x=L_c^-}\) in the numerical flux for the shallow-water model. The well-known HLL-approximation to the Godunov flux is used as the numerical flux \(\textbf{F}(\textbf{U}_L,\textbf{U}_R)\) (Bokhove 2005; LeVeque 1990). Briefly, the HLL-flux or Godunov flux uses (an approximation of) the shallow-water characteristics \(u\pm \sqrt{g h}\) to establish whether information is (partially) entering or leaving the domain. Hence, providing the limiting values \(\textbf{U}_L|_{x=L_c^-}\) from the potential-flow model does not imply a priori that these values are used. That depends on whether the characteristic \(u_L-\sqrt{g h_L}>0\) is bigger than zero, such that information is estimated to enter the domain, or not, with \(h_L u_L =\int _b^{b+h}\partial _x(\mathrm {\varphi }+\tilde{\phi })_{x=L_c^-}\,\textrm{d}z\) and \(h_L=h|_{x=L_c^-}\), cf. (5.33). A consistent time discretisation is the partially implicit, first-order symplectic Euler time-stepping scheme, in which the continuity equation will be updated using a scheme implicit in the waterdepth, followed by an explicit step in \(\tilde{\phi }\), in which the latter, explicit step the already updated value of h is used. For details, we refer to Gidel (2018) who simplified the timestepping in the shallow-water domain by only taking one explicit iterate of the symplectic Euler scheme into account and with good results. In addition, the dynamic waterline at \(x=x_w(t)\) is discretised using the technique of Audusse et al. (2004), in which the fixed numerical shallow-water domain \(x\in [L_c,L]\) is extended to include an essentially dry part of the domain, i.e. for \(x\in [x_w(t),L]\) as long as \(x_w<L\). Only the potential-flow model is then partially solved in an implicit manner. Numerical results of waves generated by a wavemaker in the deep-water domain and dissipating by wave breaking on the beach will be presented in the next section. For further details on the implementation and numerical results presented next, we refer to Gidel (2018). The derivation of the variational coupling presented here is novel and an integrated version of the ones found in Klaver (2009), Kristina et al. (2014), Gidel (2018), for linear potential flow, a linear Boussinesq model and a nonlinear potential-flow model coupled to nonlinear shallow-water model, respectively. Note that Gidel (2018) contains an extra, stabilising, yet dissipative, coupling term.

5.4.1 Numerical Results: Damping of Waves on the Beach

Two simulations will be shown and interpreted in order to demonstrate the ability of the numerical coupling strategy derived earlier.

A first simulation is shown in Fig. 5.9 for a domain with potential flow in \(x\in [0,L_c]\) and a shallow-water model on the beach beyond \(x\in [L_c,L]\) with \(L_c=11\) m and \(L=12\) m. The beach starts at \(x=3\) m and a piston wavemaker, oscillating at \(x=R(t)\) with a period of \(T=1.339\) s, generates the waves for a finite time. Based on linear dispersion of potential-flow water waves, the expected wave-length is \(\lambda \approx 2\) m, as observed in Fig. 5.9. In that figure, a comparison is made between a simulation with a solid wall at \(x=L_c\) and one with a transparant two-way boundary with a shallow-water model allowing for energy dissipation in hydraulic bores. In the simulation without wave breaking, standing waves occur due to the wave reflection, while in the simulation with the beach, wave reflection is minimal and nearly only unidirectional wave propagation occurs, towards the beach.

Fig. 5.9
figure 9

Figure 4.4 from Gidel (2018) used with permission

The difference between simulations with a vertical wall at \(x=L_c\) (top panel at a given time instance) and a shallow-water model over a beach (bottom panel) where wavebreaking will occur for \(x\in [L_c,x_w(t)]\) is shown in three snapshots at \(t=(2.86,13.86,36.74)\) s. The dynamic domain shape, topography and the free-surface are shown as well as the zonal velocity. At the coupling point, the potential-flow model is observed to be nearly depth-independent, a posteriori justifying the choice of the coupling at \(x=L_c\).

Fig. 5.10
figure 10

Figure 4.5 from Gidel (2018) used with permission

The energy partitioning between the subsystems is considered: the wavemaker operates between \(t\in [0,68.03]\) s after which time it is switched off. The wavemaker initially leads to a (net) energy increase till wavebreaking at the beach starts to dissipate energy and the energy input and energy loss reach a (net) balance around \(t=35\) s.

A long-time simulation is analysed next, involving three time intervals with wave generation, wave equilibration and wave damping respectively. The energy balance between the deep-water and shallow-water models as well as the total energy is displayed in Fig. 5.10. The wavemaker is switched on from \(t\in [0,68.03]\) s. The energy increases initially and starts to equilibrate, on average, after wave breaking commences on the beach around \(t=16\) s. Total energy dissipation for short-wave motion rapidly sets in after the wavemaker is switched off. Some long-wave motion remains, unaffacted by energy damping in the hydraulic bores, explaining why some of the energy remains. Due to the dissipative nature of the finite-volume shallow-water numerics, even in the absence of hydraulic bores, energy will eventually dissipate to zero, relative to the potential energy present in the system at rest.

5.5 Summary and Conclusions

The central theme of this chapter has been the use of classical variational principles (VPs) for the modelling of water-waves in compatible and geometric numerical modelling of these free-surface waves. Both classical water-wave modelling in a two- or three-dimensional domain with fixed bottom and side walls as well as extensions to problems with wavemakers and coupling to shallow-water beaches with wave breaking have been considered. We started with a derivation of Luke’s VP and linked the structure of a pre-Luke VP to the standard structure of a VP in classical mechanics. Subsequently, the domain with its moving free surface was transformed to a fixed reference domain in which the original coordinates become time-dependent variables, essentially describing the continuous form of the mesh motion required in the numerical modelling of water waves. We thus followed the first and third principles stated in the introduction: that the overal dynamics satisfies a VP in the conservative limit and that a space-time discretisation can follow “directly” from a discretisation of this VP for the continuum dynamics. Three types of mesh motion were considered, including a novel version for which we derived a VP coupling water-wave dynamics and mesh motion as the sum of the two separate VPs, cf. the second principle stated in our introduction, stating that coupled systems can be modelled by “straightforwardly” using the sum of the separate VPs. Another example of the second and third principles concerned the coupling and discretisation of VPs for potential-flow water waves in deep-to-intermediate-depth water coupled to breaking-wave dynamics on a shallow-water beach.

Fig. 5.11
figure 11

Time sequence of a plunging breaker at (relative) times \(t=(0.0,0.011,0.022,0.033,0.044,0.055)\) s. Courtesy Olivier Kimmoun, Institut de Recherche sur les Phénomènes Hors Equilibre (IRPHE); images taken during the laboratory tour at IRPHE, at the workshop “Breaking Waves”, on June 1st 2018 in Marseille, France

In summary, the key reasons to adopt a variational approach have been twofold: first, to ensure the stability, accuracy and speed of numerical discretisations by staying close to the variational structure of the original continuum dynamics and, second, to systematically formulate the dynamics of the coupled systems. We therefore finish by outlining a few future directions in the area of coupled variational fluid-structure systems, for which our variational approach has already shown to be fruitful:

  • Variational and numerical coupling of water waves with wave-energy and ship dynamics is undertaken in Kalogirou et al. (2017), Bokhove et al. (2019). Rigid buoys and ships have been considered with translational and rotational degrees of freedom of the solid structures.

  • Water waves have been coupled variationally to a nonlinear elastic beam representing a windturbine mast. Both this nonlinear formulation and stable variational numerics of the linearised problem have been established (Salwa et al. 2017).

  • The variationally coupled wave-beach dynamics has been validated in Gidel (2018) and will be analysed further in Gidel et al. (2021). A further challenge is to find a suitable numerical discretisation of the unified potential-flow and shallow-water model derived in Cotter and Bokhove (2010), Gagarina et al. (2013), because the coupling point \(x=L_c\) chosen a priori in Sect. 5.4, between breaking and nonbreaking waves, is intrinsically defined in this unified model.

  • Wave slamming by breaking waves is an active topic of research but requires the introduction of dissipative effects in the wave breaking. Plunging breakers lead to changes in domain topology with droplets and bubbles, as seen in Fig. 5.11. Mixed variational and dissipative approaches have been explored, using models with (pseudo-)compressible effects, see, e.g. Salwa (2018).