Abstract
A novel finite element discretization for nonlinear potential flow water waves is presented. Starting from Luke’s Lagrangian formulation we prove that an appropriate finite element discretization preserves the Hamiltonian structure of the potential flow water wave equations, even on general time-dependent, deforming and unstructured meshes. For the time-integration we use a modified Störmer–Verlet method, since the Hamiltonian system is non-autonomous due to boundary surfaces with a prescribed motion, such as a wave maker. This results in a stable and accurate numerical discretization, even for large amplitude nonlinear water waves. The numerical algorithm is tested on various wave problems, including a comparison with experiments containing wave interactions resulting in a large amplitude splash.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The numerical simulation of nonlinear water waves is a challenging problem. These waves appear naturally in the ocean, rivers and lakes and greatly affect the motion of ships and induce significant forces on floating and fixed structures. Since in many cases the wave motion can be considered as nearly inviscid and irrotational, we model the water waves using the nonlinear potential flow water wave equations. Any amount of numerical dissipation, either added explicitly to stabilize the numerical scheme or implicitly present in the numerical discretization, will then significantly influence the accuracy of the wave computations, in particular for long time simulations.
The potential flow water wave equations, when expressed in terms of the free surface potential and wave height, have a Hamiltonian structure, but this structure is generally lost in the numerical discretization. The main topic of this article is to develop a finite element discretization for which we can explicitly prove that it preserves the Hamiltonian structure, even on time-dependent meshes that are needed to follow the free surface motion. This will directly result in an energy preserving numerical discretization that is stable for large amplitude nonlinear waves.
The starting point for the derivation of the Hamiltonian finite element discretization for nonlinear potential flow water waves is Luke’s variational formulation [16]. After introducing time-dependent basis functions in the variational formulation, we can prove in several steps that the numerical discretization exactly preserves the Hamiltonian structure, even on time-dependently deforming unstructured meshes suitable for large amplitude waves. This Hamiltonian structure, when combined with a symplectic time integration scheme, prevents energy drift. A crucial subtlety in maintaining the Hamiltonian structure stems from the mesh movement. Any movement of the free surface needs to be accommodated by a mesh movement in the interior of the domain, which results in an intricate coupling between the free surface motion and the solution of the Laplace equation for the velocity potential.
Many numerical discretizations have been proposed for the solution of the potential flow water wave equations. The most popular approach for solving these equations is the boundary element method, starting with the work by Longuet-Higgins and Cokelet [15]. More recent works in this direction include [3, 4, 8, 9, 11, 13], while the older works are covered by the review paper by Tsai and Yue [26]. These methods, however, typically require evaluating a singular integration kernel and tend to require the evaluation of dense matrix–vector products, which have to be solved with a fast multipole method to keep the computational complexity approximately linear. Moreover, these methods do not automatically preserve the Hamiltonian structure of the potential flow water wave equations.
An alternative approach is to use the finite element method, computing the solution in the entirety of the domain. This is not necessarily more expensive, since all interesting physical phenomena still happen at the free surface, allowing the use of a limited number of elements in the vertical direction. The finite element discretization gives rise to a sparse system of equations, meaning it is much easier to solve in linear time. However, all previous attempts to use a finite element discretization require additional numerical stabilization or specially constructed meshes to prevent numerical instabilities [17,18,19, 21, 24, 25, 27,28,29,30, 32].
The direct precursor to this work is the work by Gagarina et al. [10]. The main difference is that we prove that the discrete equations retain the Hamiltonian structure of the potential flow water wave equations, even on unstructured, time dependent meshes, and that we provide explicit equations for the dependence of the unknowns on general mesh movement, thereby generalizing the result in [10].
In the remainder of this article, we will introduce the potential flow equations and a suitable Lagrangian in Sect. 2. In Sect. 3 we will use this Lagrangian to construct a discrete Hamiltonian formulation. We will introduce a time stepping scheme for the resulting non-autonomous Hamiltonian system in Sect. 4 and discuss an efficient technique to solve the resulting algebraic equations. Finally, in Sect. 5 we present some results that numerically verify the stability and accuracy of the numerical scheme.
2 Governing Equations
The equations describing water wave motions are defined on a time-dependent domain \({\varOmega }_t\subseteq {\mathbb {R}}^3, t\in (0,T)\). Its boundary \(\partial {\varOmega }_t\) is split into two parts, \(\partial {\varOmega }_t=\partial {\varOmega }_{t,s}\cup \partial {\varOmega }_{t,R}\), with \(\partial {\varOmega }_{t,s}\) the free surface. The other boundary \(\partial {\varOmega }_{t,R}\) may consist e.g. of a wave maker, a beach or a bottom surface. Each point \(R\in \partial {\varOmega }_{t,R}\) has a prescribed velocity \(\frac{\partial R}{\partial t}\). The position of the free surface \(\partial {\varOmega }_{t,s}\) is unknown a priori and is to be determined as part of the initial-boundary-value problem describing wave motions.
We assume that the free surface is single-valued. This allows us to define
with x, y, z the coordinates in a Cartesian system, with the undisturbed water surface equal to \(z=z_0\) and \(\eta \,{:}\,(0,T)\times \mathcal {D}_{t,s}\rightarrow {\mathbb {R}}\) representing the free surface \(\partial {\varOmega }_{t,s}\).
The dynamics of inviscid potential flow water waves is now governed by the following initial-boundary-value problem
where the operators \(\nabla \) and \({\varDelta }\) are, respectively, the gradient and Laplace operator, \(g{}=\begin{pmatrix}g_x,&g_y,&g_z\end{pmatrix}^T\in {\mathbb {R}}^3\) the gravity vector, \(\nu \) the unit outward normal vector at \(\partial {\varOmega }_t\), and \(\phi \) is the velocity potential.
2.1 Lagrangian and Hamiltonian Approach
The variational formulation of (2) using dimensionless variables is based on the Lagrangian
with \({\bar{x}}=\begin{pmatrix}x,&y,&z\end{pmatrix}^T\), which was presented by Luke [16]. To compute the variations of this functional we use Reynolds transport theorem [7] in the form of the identity
where \({v}(t,x)=\frac{\mathrm {d}{\bar{x}}}{\mathrm {d}t}\) is the velocity of the domain boundary \(\partial {\varOmega }_t\). The continuum equations can readily be recovered by computing variations with respect to \(\eta \) and \(\phi \). That is, we require
and
The free surface height function \(\eta \) only appears in the functional \({\mathcal {L}}_0\) in the description of the free surface boundary (1), so if we compute the functional derivative using Leibniz’ theorem [7], we obtain
Since \(\delta {\eta }\) is arbitrary, this recovers (2c) when \(\delta _{\eta }{\mathcal {L}}_0=0\). Before computing variations with respect to \(\phi \) we rewrite (3) using (4)
where in the integrands over \(\mathcal {D}_{t,s}\) we have \( z=\eta \). The variations of \({\mathcal {L}}_0\) with respect to \(\phi \), after integration by parts, are equal to
where the variations \(\delta _\phi \) at \(t=0\) and \(t=T\) are taken to be zero and we used the relation \(\nu |_{\partial {\varOmega }_{t,s}}=\frac{\nabla (z-\eta )}{|\nabla (z-\eta )|}\). Considering the arbitrary variations in the interior and at the different sections of the domain boundary separately, this recovers the other three equations in (2) after setting \(\delta _\phi {\mathcal {L}}_0=0\).
Moreover, the governing equations in (2) can be recognized as a Hamiltonian system with respect to the unknown free surface height and free surface potential [33]. Preserving this Hamiltonian structure in the finite element discretization significantly improves the accuracy of free surface wave computations, but currently there are only a few attempts to preserve the Hamiltonian structure in a discretization [5]. Another benefit of a Hamiltonian (Galerkin) semidiscretization is that we can make use of the well-developed geometric integration theory [12] to construct an energy-preserving numerical discretization.
3 Discretization of the Variational Principle
The finite element discretization is based on a tessellation \(\mathcal {T}_h\) of the domain \({\varOmega }_t\). The tessellation \({\mathcal {T}}_h\) is changing in time to accommodate for the free surface motion and other moving boundaries, such as a wave maker.
Using a nodal Lagrangian basis, the set of nodes in \({\overline{{\varOmega }}}_t\) is denoted with \({\mathcal {N}}\). Within this set the nodes on \(\partial {\varOmega }_{t,s}\) are denoted with \(N_s\), those on \(\partial {\varOmega }_{t,R}\) with \(N_R\), while the other nodes are denoted with \(N_r\). Note that \(N_s\cap N_R\) is in general non-empty, these nodes correspond to grid points located at the interface of the free surface and the other boundaries.
Using the various sets of nodes, \(\left\{ \phi _j^t\right\} _{j\in {\mathcal {N}}}\) denotes the set of basis functions used to approximate the velocity potential \(\phi \) and with a slight abuse of notation \(\left\{ \eta _j^t\right\} _{j\in N_s}\) the basis functions for the free surface height \(\eta \).
With these basis functions we approximate the free surface height and velocity potential, respectively, as
and
The computational domain determined by the numerical approximations at time t is denoted with \({\varOmega }_{t,h}\) and the corresponding numerical approximation of the free surface and other boundary surfaces with \(\partial {\varOmega }_{t,s,h}\) and \(\partial {\varOmega }_{t,R,h}\), respectively.
It is of critical importance to note that the tessellation \({\mathcal {T}}_h\), and therefore also the basis functions, have an explicit dependency on both the free surface height \(\eta \) and the prescribed domain boundary movement of \(\partial {\varOmega }_{t,R}\). This also implies that the basis functions have a dependency on t and each of the expansion coefficients \({a}\) of the free surface height approximation.
We require that the basis functions \(\left\{ \phi _j^t\right\} _{j\in {\mathcal {N}}}\) and \(\left\{ \eta _j^t\right\} _{j\in N_s}\) satisfy the following compatibility condition at the free surface \(\partial {\varOmega }_{t,s,h}\)
At the domain boundaries \(\partial {\varOmega }_{t,s}\) and \(\partial {\varOmega }_{t,R}\) the discretization \(\phi _h\) can be given as
and
With these approximations, the Lagrangian functional (3) can be (semi)-discretized as
We will compute the variations separately for \(a_j(t)\) and \(b_j(t)\). To write the corresponding variational derivatives in a more compact form, we introduce the matrices \({\varPhi }^t_{a}\in {\mathbb {R}}^{|{\mathcal {N}}|\times |{\mathcal {N}}|}, \mathcal {E}^t\in {\mathbb {R}}^{|N_s|\times |N_s|}, \mathcal {E}_{R}^t\in {\mathbb {R}}^{|N_s|\times |N_s|}\) and \(\mathcal {D}^t\in {\mathbb {R}}^{|N_s|\times |N_s|}\) and the vectors \({\varPhi }_{a,R}^t\in {\mathbb {R}}^{|{\mathcal {N}}|}\) and \(G\in {\mathbb {R}}^{|N_s|}\), which are defined as
and
where \(\tau \) is the tangential vector along the interface \(\partial {\varOmega }_{t,s,h}\cap \partial {\varOmega }_{t,R,h}, e_z=(0, 0, 1)^T\), and the indices \(a\) and t denote explicit, but hidden dependencies on the free-surface parametrization and time. Furthermore, we use the following decompositions:
where the submatrix \({\varPhi }_{11}\in {\mathbb {R}}^{|N_s|\times |N_s|}\) is \({\varPhi }_a^t[i,j]\) with \(i,j\in N_s\) and \({\varPhi }_{{a},R}\) is split into
where \({\varPhi }_{1,{a},R}\) is \({\varPhi }_{a,R}[i]\) with \(i\in N_s\). We use without further reference the following:
Proposition 1
The matrices and vectors introduced above satisfy the following statements.
-
(i)
Both \({\varPhi }^t_{a}\) and \(\mathcal {E}^t\) are symmetric, \({\varPhi }^t_{a}\) is positive semidefinite, with \({\varPhi }_{21} = {\varPhi }_{12}^T\), and \(\mathcal {E}^t\) is positive definite.
-
(ii)
The matrix \(\mathcal {E}_{R}^t\) has only non-zero elements if \(i,j\in N_s\cap N_R\), hence this matrix has a non-zero block of size \(|N_s \cap N_R|\times |N_s\cap N_R|\), the remaining elements are zero.
-
(iii)
The non-zero components of \({\varPhi }_{{a},R}^t [i]\) are those with \(i\in N_R\).
For simplicity, we usually do not denote the dependence of \({\varPhi }^t\) on \({a}\) and the time-dependence of the submatrices \({\varPhi }_{ij} \; i,j=1,2\). We will also use the notations \({a}, {b}\) and \({b}_s\) for the vectors composed of the coefficients \(\{a_j\}_{j\in N_s}, \{b_j\}_{j\in {\mathcal {N}}}\) and \(\{b_j\}_{j\in N_s}\), respectively.
Lemma 1
The variational principle for the Lagrangian \({\mathcal {L}}_h\) (6) with semidiscretized variables \({a}\) and \({b}\), and \(t\in (0,T)\), can be given in the following matrix-vector form
Here, an overdot represents differentiation with respect to time.
Proof
We compute variations of the discrete functional \({\mathcal {L}}_h\) with respect to \(a_j\) and \(b_j\), which are assumed to be zero for \(t=0\) and \(t=T\). We consider the contributions in (6) one by one, starting with partial derivatives with respect to \(a_j\)
Applying Leibniz’ theorem we obtain
where we used the fact that in this integral only the free surface boundary depends on \(a_j\).
The second term introduces an additional complication, since not only the boundary, but also the integrand depends on \(a_j\). Split the domain according to partition (1). We can now make the dependency of the boundary on \(\eta \) explicit by splitting the integral into two parts
where we used (1) to represent the free surface with the height functions \(\eta _h^l\). Next, we apply first Leibniz’ theorem to the first term on the right hand side in (11) and then Reynolds transport theorem to the second term
with \(v=\frac{\mathrm {d}x}{\mathrm {d}t}|_{\partial {\varOmega }_t}\). Since we assume that \(\delta \phi (0,\cdot )=\delta \phi (T,\cdot )=0\) the integrals over \({\varOmega }_T\) and \({\varOmega }_0\) vanish. We also use the relations
and
with \(\nu _R=\nu |_{\partial {\varOmega }_{t,R,h}}\), resulting in
It is beneficial to further evaluate the second term on the right hand side in (12) using (7.2) in Flanders [7], splitting this contribution into a line integral that will be used when applying (7.2) in [7] to the integrals over \(\mathcal {D}_{t,s,h}\) and an expression where \(\frac{\partial }{\partial a_j}\) is the outermost operator, which is convenient when constructing the Hamiltonian. This results in
with \(\tau \) the unit tangential vector at the interface \(\partial {\varOmega }_{t,R,h}\cap \partial {\varOmega }_{t,s,h}\). Note that \(\tau \) is orthogonal to \(\nu _R\). The vector \(\frac{\partial x}{\partial a_j}\) links the mesh velocity to the free surface velocity. Since the mesh is a tessellation of the domain, the mesh at \(\partial {\varOmega }_{t,R,h}\) can only move parallel to \(\partial {\varOmega }_{t,R,h}\), hence the first integral on the right hand side in (13) is zero. At the solid wall-free surface intersection \(\partial {\varOmega }_{t,R,h}\cap \partial {\varOmega }_{t,s,h}\) we need to enforce that the free surface moves tangentially to the solid wall, hence we have to apply the correction
with \(x_{s,R}=\begin{pmatrix}x,&y,&\eta _h\end{pmatrix}\). An alternative interpretation of this is that an infinitesimally small sliver of \(\mathcal {D}_{t,s,h}\) nearest to the wave maker is rotated, such that it aligns correctly. By introducing \(t_R=\tau \times \nu _R\) (14) can also be written as
The second integral on the right hand side in (13) is then equal to
Since \(\frac{\partial x_{s,R}}{\partial a_j}=\begin{pmatrix}0,&0,&\eta _j^t\end{pmatrix}\) we obtain \(t_R\cdot \frac{\partial x_{s,R}}{\partial a_j}=(\tau \times \nu _R)\cdot e_z\eta _j^t\) with \(e_z=(0,0,1)^T\). After collecting all terms, the final result for (13) then becomes
Using the compatibility condition at the free surface (5) we obtain then
Since the basis functions \(\eta _k^t\) do not depend on \(a_j\) the last integral in (15) is zero and \(\partial _{a_j} M_2\) can be expressed as
For the third term we simply write
Combining the three terms we obtain for the variations of \({\mathcal {L}}_h\) with respect to \(a_j\)
which is equivalent to (9a). For Eqs. (9b) and (9c) consider the variations with respect to \(b_j\). The first term does not depend on \(b_j\), hence
For the second term use (4) again to obtain
Finally, the third term is just a straightforward differentiation. We have
After applying the decompositions (7) and (8) the terms can be combined to give (9b) and (9c). \(\square \)
To express the discretized variational principle in (1) as a Hamiltonian system we introduce the variable
We will also use the notation \({S}= {\varPhi }_{11}-{\varPhi }_{12}{\varPhi }_{22}^{-1}{\varPhi }_{21}\) for the Schur complement, possibly with an upper index to indicate its dependence on time.
Lemma 2
Using the variable \(\tilde{{b}}_s\), the system in (1) can be recasted as
Proof
First, we note that (9c) immediately implies
Now focus on (9b)
Expand the vector product
which can be reordered to form (18a). The other equality requires a more elaborate derivation. Split (9a) into two parts. The first part of (9a) becomes
using the relation
which can be derived with help of (7.2) in [7] in a manner similar to obtain (13). For details, see “Appendix 2”. Now use the product rule and the definition (17) to rewrite (19) in terms of \(\tilde{{b}}_s\) to obtain
Next, consider the second part of (9a)
Here, in the second step the block structured matrix is expanded into its components. Expanding the products and adding up similar terms finally results in
which can be combined with (20) to obtain the statement of the Lemma. \(\square \)
Theorem 1
The discrete variational form corresponding to the Lagrangian (6) is equivalent with the forced Hamiltonian system
where
Proof
Obviously,
On the other hand
\(\square \)
Remark 1
We note that the only explicit dependence on time in the discrete Hamiltonian is caused by the wave maker motion. Therefore this semi-discrete formulation is energy conservative, viz. \(\frac{\mathrm {d}\mathcal H}{\mathrm {d}t}=0\) without a wave-maker, even on unstructured meshes. This motivates to integrate (22)–(23) with a symplectic time integrator, since this will then result in a stable numerical discretization without the need for the addition of any stabilization terms.
In order to simplify the derivation of the time discretization, which will be discussed in the next section, we use the following relation
where we have used the identity \(\frac{\partial }{\partial t}A^{-1}=A^{-1}\frac{\partial A}{\partial t}A^{-1}\). Equation (24) greatly shortens expressions whenever \(\mathcal {E}\) and \({\tilde{{b}}}_s\) are to be evaluated at the same time levels in the time integration method. This expansion appears to be redundant in view of (21). However, the interior component of b represents a solution of the Laplace equation. This could cause a dependency of b on the boundary shape, so we do need (24) to show that this dependency is fully factored in \({\varPhi }\).
4 Time Integration for the Discrete Variational Formulation
The time discretization of the Hamiltonian finite element discretization (22) is performed with the second order accurate Störmer–Verlet time integration method. The Hamiltonian system (22) is, however, non-autonomous. This requires a modification of the Störmer–Verlet scheme for which we follow the procedure outlined in [14]. Given the non-autonomous Hamiltonian system
we introduce the new variables \({P}=({p},\tau _0)\) and \({Q}=({q},\tau )\) and the Hamiltonian \({\tilde{H}}\) with \({\tilde{H}}({P},{Q})= H(\tau ,{p},{q})-\tau _0\). Here \(\tau \) corresponds to time and the fictitious variable \(\tau _0\) ensures that \({P}\) and \({Q}\) are of the same dimension. The Störmer–Verlet scheme for a non-autonomous Hamiltonian system can now be expressed as
which in the original variables gives
The update for \(\tau _n\) ensures that \(\tau \) indeed represents time and will be taken for granted in the following. The fictitious variable \(\tau _0\) is of no interest to us, so its update scheme is not presented.
The non-autonomous Störmer–Verlet scheme applied to the Hamiltonian finite element discretization (22) using \(p=a\) and \(q={\tilde{b}}_s\) in (25) is now equal to
where relation (24) has been used to shorten the expressions. In terms of the original variables \({a}, {b}\) and \({b}_s\) we obtain now the algebraic equations
Since the time stepping in (26) is implicit, we first solve the equation for \({a}_{n+\frac{1}{2}}\) with a Newton method, followed by the equation for \({b}_{s,n+1}\). Finally, \({a}_{n+1}\) can be obtained in an explicit way. A full derivation that prepares (26) for numerical treatment can be found in Appendix 1.
The full numerical scheme can be summarized as follows:
-
Interpolate the initial surface data. For simulations using a wave maker, a still free water surface is used.
-
Evaluate the matrices \(\mathcal {E}_t, \mathcal {D}_t, {\varPhi }_{t,a_h}, {\varPhi }_{R,t,a_h}\) and \(G_t\) on the current mesh.
-
while \(t<t_{{ end}}\)
-
Iterate the Newton algorithm (33) until it converges, while moving the mesh using the new free surface height \(\eta _h\) in (28) and updating \({\varPhi }_{t,a_h}\) and \({\varPhi }_{R,t,a_h}\) to account for the new free surface position.
-
Increase \(t=t+dt\), update the mesh to satisfy the new position of the wave maker and reevaluate the matrices \(\mathcal {E}_t, \mathcal {D}_t, {\varPhi }_{t,a_h}, {\varPhi }_{R,t,a_h}\) and \(G_t\).
-
Iterate the Newton algorithm (35) until it converges.
-
Solve the third equation from (26).
-
Move the mesh and update \({\varPhi }_{t,a_h}\) and \({\varPhi }_{R,t,a_h}\) to account for the new free surface position.
-
A more detailed description of the mesh movement, which is done after the free surface or the wavemaker updates, is given at the end of Sect. 4.2.
4.1 Computing Derivatives \(\partial _{a}{\varPhi }\) and \(\partial _{a}{\varPhi }_R\)
In the derivation of the discrete Hamiltonian the derivatives \(\partial _a{\varPhi }\) and \(\partial _a{\varPhi }_R\) have been left untreated, since this was beneficial for arriving at Eq. (23). In this section we will discuss the computation of the derivatives with respect to the free surface coefficients a. Consider \(\partial _a{\varPhi }\) element-wise, as a summation on the finite element tessellation \({\mathcal {T}}_h\):
where the shape of the element and the basis functions depend on the free surface \(\eta _h\), hence implicitly on the coefficients a. Introduce a reference element \({\hat{K}}\). We will denote the image of the basis functions on \({\hat{K}}\) as \({\hat{\phi }}\), the reference coordinates as \(({\hat{x}}, {\hat{y}}, {\hat{z}})\) and the gradient operator with respect to reference coordinates as \({\hat{\nabla }}\). Assume, for every element \(K\in \mathcal T_h\), that there is an invertible mapping \(F_K\,{:}\,{\hat{K}}\rightarrow K\). Since we use nodal basis functions, we have \(x=\sum _l {\hat{x}}_l\hat{\phi _l}\), where \({\hat{x}}_l\) are the coordinates of the nodal points of element K. The Jacobian of \(F_K\) with respect to the reference element coordinates is given by \(J=\sum _l {\hat{x}}_l{\hat{\nabla }}\hat{\phi _l}^T\).
Perform the coordinate transformation,
Using the matrix identities
and
with \(|A|=\det (A)\), we obtain
where the summation convention is used on repeated indices. Transforming back to the elements \(K\in {\mathcal {T}}_h\) we obtain the relation
The coupling between the node locations and the free surface parametrization \(\frac{\partial {\hat{x}}_l}{\partial a_k}\) has to be constructed depending on the choice of the mesh movement algorithm.
For the computation of \(\partial _{a}{\varPhi }_R\) we can use (13). We have
For the first term use the chain rule and the mapping \(F_K\) and for the second term the compatibility condition (5) to find
We would like to consider the mesh deformation and the rest of the time stepping scheme separately. To this end, we introduce the matrices
and
and we obtain the relations
and
The matrices \({C}\) and \({B}\) are separated into free surface and interior parts
similar to \({\varPhi }\). The node velocity \(\frac{\partial {\hat{x}}_i}{\partial a_j}\) follows from the mesh movement algorithm. Assume that the mesh movement algorithm, with free surface node positions fixed, is either based on maintaining a force balance or based on solving an additional PDE, see Sect. 4.2. In both cases, the node displacements \({u}\) are given by
where \({F}\) is the Jacobian with respect to the node displacements of the mesh movement algorithm. Inverting the Jacobian gives
The node displacements and the node position are linked by a constant offset, hence we directly obtain
4.2 Mesh Deformation Algorithm
We base the mesh deformation algorithm on Masud and Hughes [20]. The idea is to compute a displacement field \({u}\in {\mathbb {R}}^d\) and apply the computed displacements to the node coordinates. We use the still-water domain to provide an initial grid corresponding to the zero displacement field. The displacement field is the solution of the boundary value problem
where \(\tau \) is a bounded nonnegative function and the zero displacement domain \({\varOmega }_z\) is also used to compute the displacements. The free surface height \(\eta \) is the instantaneous wave height, hence (28) computes, contrary to [20], the displacements with respect to the original mesh for every update in the free surface height \(\eta \). While this is given as a continuous system of equations, they are discretized using linear basis functions on \({\mathcal {T}}_h\) in order to guarantee that the computed nodal displacements u can directly be used to deform the mesh. The parameter \(\tau \) is typically large in areas where the elements are small, to prevent grid inversion. It is also large near the free surface to ensure that the gridlines closely follow the free surface and wave maker motion. To compute \(\frac{\partial {\hat{x}}_l}{\partial a_k}\) we take the derivative \(\partial _{a}\) of (28). Since (28) is solved on a fixed domain, there are no hidden dependencies and we can directly write
with the understanding that these equations have to be discretized in the same way as the equations for the displacement. The derivative \(\frac{\partial {\hat{x}}}{\partial t}\) can be approximated in a similar manner.
In our simulations, the small elements reside mostly near the free surface, so we choose \(\tau =\mathrm {e}^{1+cz}\), where \(c\cong 1\) can be tuned to prevent inversion for very shallow water simulations and simulations involving very steep waves or tuned to improve conditioning for very deep water simulations.
For more general problems the variable \(\tau \) in element K can be computed as
with \({\varDelta }_{{ min}}, {\varDelta }_{{ max}}\) the area (or volume) of the smallest and largest elements in the mesh and \({\varDelta }_K\) the area (or volume) of element K. In [20] it is shown that this results in \(\tau _K\)-values that are essentially independent of the ratio \({\varDelta }_{{ min}}/{\varDelta }_{{ max}}\). A more detailed way to compute the \(\tau \)-values is presented in [1], where the ratio of the inverse of the element Jacobian at the quadrature points to a reference quantity, e.g. the minimum of the inverse Jacobian in the mesh, is used to control the mesh deformation. This helps to ensure that the Jacobian remains positive inside the element, which prevents grid inversion.
During the mesh updates we keep the background mesh fixed where we solve (28) with a conforming nodal finite element method, using \(a_h\) and R(t) as inputs. Next, we reconstruct the mesh by displacing the actual nodes from the background nodes with the computed displacements.
This algorithm is a simplified form of the mesh deformation algorithms based on the elasticity equations. These algorithms are widely used for complex fluid-structure interaction problem and allow complex mesh deformations, see e.g. [1, 2, 22, 23].
5 Results
5.1 Fenton and Rienecker Wave
As a first model problem we consider the two-dimensional semi-analytical steady wave solution of (2), computed by Fenton and Rienecker [6] using a combination of Fourier expansions and numerical methods. This solution provides a correction to the Stokes wave [31]. The Fenton wave is a standard test case suitable to investigate the accuracy of numerical methods for nonlinear water waves. See Fig. 1 for an impression. We compute the steady wave solution for a water depth \(H=1\), gravity coefficient \(g=1\) and domain length \(X\cong 4.9636\). The zero displacement grid is a regular grid of \(N_x\) by \(N_y\) rectangles, see Table 1. This grid was further split into triangles by subdividing the rectangles along their diagonals in an alternating manner. We performed a convergence test for linear basis functions by simulating a water wave for 10 periods, with \(\frac{12N_x}{32}\) time steps per period, comparing the free surface height \(\eta _h\) computed with the Hamiltonian finite element discretization with the free surface height computed with the semi-analytical method proposed by Fenton and Rienecker [6]. Since the focus of the Hamiltonian finite element method is on energy conservation, we also compute the difference between the minimum and the maximum Hamiltonian energy during the simulation. The results in Table 1 show that second order accuracy for the free surface height is obtained.
Next, we also performed a long simulation for 100 wave periods attempting to detect if there exists a systematic drift in the Hamiltonian energy. The results of the energy variation in this simulation can be found in Fig. 2.
5.2 Soliton
The second test case for code verification is provided by a traveling wave solution. The initial wave profile in a 2D domain of depth 0.5 is given by
After moving away from the boundary, this initial wave profile will deform into a traveling wave closely resembling
for some offset c. A close approximation of this solution is depicted in Fig. 4. This test case was also considered by Westhuis [30], who used a combined finite difference—finite element discretization of (2). The travelling wave will be simulated for \(120\,\text {s}\), with \({\varDelta }t=0.05\). The domain has a reflecting wall at \(x=150\,\text {m}\). In order to verify numerically the stability of our new scheme, we choose a sequence of mesh sizes \({\varDelta }x\in \{2\,\text {m}, 1\,\text {m}, 0.5\,\text {m}, 0.25\,\text {m}\}\). In the vertical direction, we reproduce the choices made in [30]. That is, we use 6 elements in the vertical direction, placing the mesh lines at \(z=0.5\left( \frac{\mathrm {cosh}(-0.1\pi \{0:1/6:1\})-\mathrm {cosh}(-0.1\pi )}{1-\mathrm {cosh}(-0.1\pi )}-1\right) \). The coarsest of these meshes is unable to sufficiently resolve the traveling wave profile, while the choice \({\varDelta }x=1\,\text {m}\) can resolve the traveling wave, but not the high frequency modes that are required to keep the wave stable. In these cases, we cannot expect to solve the equations with any accuracy, but we still find reasonable bounds on the energy. See Fig. 3 for an overview of the behavior of the energy. Figure 4 shows snapshots of the wave profile for various meshes. Since \({\varDelta }x\) is the only parameter changed in these computations we expect that any changes in the energy are caused by the nonlinear exchange of energy with under-resolved wave modes. This is confirmed by the dip in the energy when the wave interacts with the wall, where the high frequency modes play a larger role.
5.3 Comparison with Experiments
Finally, we made a comparison with experiments. For this purpose, we used the data set from Run 202002, which was provided by the Maritime Research Institute Netherlands (MARIN). In this experiment a piston wave maker generates a wave train of successively faster moving waves that focus into a splash near \(x=50\,\text {m}\) in a model wave basin with dimension \(195.4\,\text {m} \times 1\,\text {m}\). The wave maker motion in the computations is identical to the wave maker motion used in the experiments. At time \(t=0\) there are no waves present in the basin. Since we are only interested in the first part of the domain, we use a numerical basin of \(90\,\text {m} \times 1\,\text {m}\), which is still large enough to ensure that no spurious reflections from the end wall interfere with the computed waves of interest. From the Fenton wave test case we know that rectangular elements offer greater accuracy, so we use rectangles near the surface. Further away from the surface we use triangles. Moreover, since we already know in advance that there will be localized phenomena near \(x=50\,\text {m}\) we refine the mesh in that area. We note that in practice 3 N iterations are usually enough. Snapshots of the mesh in the transition zone and in the splash zone are provided in Fig. 5. Following [10] we used \({\varDelta }x=0.0027\) near the splash zone and \({\varDelta }x=0.016\) away from the splash. Comparing the measured wave height to the computed wave height at various locations in the model basin, both in the time domain, see Fig. 6, and in the frequency domain, see Fig. 7, we conclude that they are in good agreement with experiments.
References
Bar-Yoseph, P.Z., Mereu, S., Chippada, S., Kalro, V.J.: Automatic monitoring of element shape quality in 2-d and 3-d computational mesh dynamics. Comput. Mech. 27(5), 378–395 (2001)
Bazilevs, Y., Calo, V.M., Hughes, T.J., Zhang, Y.: Isogeometric fluid–structure interaction: theory, algorithms, and computations. Comput. Mech. 43(1), 3–37 (2008)
Beale, J.: A convergent boundary integral method for three-dimensional water waves. Math. Comput. 70(235), 977–1029 (2001)
Broeze, J., van Daalen, E.F., Zandbergen, P.J.: A three-dimensional panel method for nonlinear free surface waves on vector computers. Comput. Mech. 13(1–2), 12–28 (1993)
Craig, W., Guyenne, P., Sulem, C.: A Hamiltonian approach to nonlinear modulation of surface water waves. Wave Motion 47(8), 552–563 (2010)
Fenton, J., Rienecker, M.: A Fourier method for solving nonlinear water-wave problems: application to solitary–wave interactions. J. Fluid Mech. 118, 411–443 (1982)
Flanders, H.: Differentiation under the integral sign. Am. Math. Mon. 80(6), 615–627 (1973)
Fochesato, C., Dias, F.: A fast method for nonlinear three-dimensional free-surface waves. Proc. R. Soc. A Math. Phys. Eng. Sci. 462(2073), 2715–2735 (2006)
Fochesato, C., Grilli, S., Dias, F.: Numerical modeling of extreme rogue waves generated by directional energy focusing. Wave Motion 44(5), 395–416 (2007)
Gagarina, E., Ambati, V.R., van der Vegt, J.J.W., Bokhove, O.: Variational space–time (dis)continuous Galerkin method for nonlinear free surface water waves. J. Comput. Phys. 275, 459–483 (2014)
Guerber, E., Benoit, M., Grilli, S.T., Buvat, C.: A fully nonlinear implicit model for wave interactions with submerged structures in forced or free motion. Eng. Anal. Bound. Elem. 36(7), 1151–1163 (2012)
Hairer, E., Lubich, C., Wanner, G.: Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations, vol. 31. Springer, Berlin (2006)
Hou, T.Y., Zhang, P.: Convergence of a boundary integral method for 3-d water waves. Discret. Contin. Dyn. Syst. Ser. B 2(1), 1–34 (2002)
Leimkuhler, B., Reich, S.: Simulating Hamiltonian Dynamics. Cambridge Monographs on Applied and Computational Mathematics, 1st edn. Cambridge University Press, Cambridge (2004)
Longuet-Higgins, M.S., Cokelet, E.: The deformation of steep surface waves on water. I. A numerical method of computation. Proc. R. Soc. Lond. A Math. Phys. Sci. 350(1660), 1–26 (1976)
Luke, J.: A variational principle for a fluid with a free surface. J. Fluid Mech. 27(02), 395–397 (1967)
Ma, Q., Wu, G., Eatock Taylor, R.: Finite element simulation of fully non-linear interaction between vertical cylinders and steep waves. Part 1: methodology and numerical procedure. Int. J. Numer. Methods Fluids 36(3), 265–285 (2001)
Ma, Q., Wu, G., Eatock, R.: Finite element simulations of fully non-linear interaction between vertical cylinders and steep waves. Part 2: numerical results and validation. Int. J. Numer. Methods Fluids 36(3), 287–308 (2001)
Ma, Q., Yan, S.: Quasi ALE finite element method for nonlinear water waves. J. Comput. Phys. 212(1), 52–72 (2006)
Masud, A., Hughes, T.J.R.: A space–time Galerkin/least-squares finite element formulation of the Navier–Stokes equations for moving domain problems. Comput. Methods Appl. Mech. Eng. 146, 91–126 (1997)
Robertson, I., Sherwin, S.: Free-surface flow simulation using hp/spectral elements. J. Comput. Phys. 26(53), 26–53 (1999)
Stein, K., Tezduyar, T.E., Benney, R.: Automatic mesh update with the solid-extension mesh moving technique. Comput. Methods Appl. Mech. Eng. 193(21), 2019–2032 (2004)
Tezduyar, T., Benney, R.: Mesh moving techniques for fluid–structure interactions with large displacements. J. Appl. Mech. 70(1), 58–63 (2003)
Tomar, S., van der Vegt, J.J.W.: A Runge–Kutta discontinuous Galerkin method for linear free-surface gravity waves using high order velocity recovery. Comput. Methods Appl. Mech. Eng. 196(13), 1984–1996 (2007)
Toth, F., Kaltenbacher, M.: Fully coupled linear modelling of incompressible free-surface flow, compressible air and flexible structures. Int. J. Numer. Methods Eng. 107(11), 947–969 (2015)
Tsai, W.-T., Yue, D.K.: Computation of nonlinear free-surface flows. Annu. Rev. Fluid Mech. 28(1), 249–278 (1996)
van der Vegt, J.J.W., Tomar, S.: Discontinuous Galerkin method for linear free-surface gravity waves. J. Sci. Comput. 22(1–3), 531–567 (2005)
Wang, C., Wu, G.: Interactions between fully nonlinear water waves and cylinder arrays in a wave tank. Ocean Eng. 37(4), 400–417 (2010)
Wang, C., Wu, G.: A brief summary of finite element method applications to nonlinear wave–structure interactions. J. Mar. Sci. Appl. 10(2), 127–138 (2011)
Westhuis J.: The numerical simulation of nonlinear waves in a hydrodynamic model test basin. Ph.D. thesis. University of Twente (2001)
Whitham, G.B.: Linear and Nonlinear Waves, vol. 42. Wiley, London (2011)
Wu, G., Hu, Z.: Simulation of nonlinear interactions between waves and floating bodies through a finite-element-based numerical tank. Proc. R. Soc. Lond. Ser. A Math. Phys. Eng. Sci. 460(2050), 2797–2817 (2004)
Zakharov, V.E.: Stability of periodic waves of finite amplitude on the surface of a deep fluid. J. Appl. Mech. Tech. Phys. 9(2), 190–194 (1968)
Acknowledgements
We acknowledge the financial support of the Technology Foundation STW in the project “FastFEM: Behavior of Fast Ships in Waves” and we thank the Maritime Research Institute Netherlands (MARIN) for providing the experimental data. F. Izsák was supported by the János Bolyai Research Fellowship of the Hungarian Academy of Sciences.
Author information
Authors and Affiliations
Corresponding author
Appendices
Appendix 1: Solution of Algebraic Equations
Solving the algebraic equations for the Hamiltonian finite element discretization requires some special care. The first two equations in (26) are nonlinear and are solved with a Newton method. The equations for the Newton updates \({\varDelta }a_{n+\frac{1}{2}}\) and \({\varDelta }b_{s,n+1}\) are, respectively,
with \({\varDelta }a_{n+\frac{1}{2}}^{(k)}=a_{n+\frac{1}{2}}^{(k+1)}-a_{n+\frac{1}{2}}^{(k)}\) and
with \({\varDelta }b_{s,n+1}^{(k)}=b_{s,n+1}^{(k+1)}-b_{s,n+1}^{(k)}\) and where \({a}_{n+\frac{1}{2}}^{(0)}={a}_n\) and \({b}_{s,n+1}^{(0)}={b}_{s,n}\). The non-linear algebraic Eqs. (29) and (30) are iterated until convergence is reached. In the Jacobian in (29) we use that \(\partial _{{a}_i}\) and \(\partial _{{b}_{s,j}}\) commute. Recall that \({S}={\varPhi }_{11}-{\varPhi }_{12}{\varPhi }_{22}^{-1}{\varPhi }_{21}\).
For numerical efficiency reasons it is crucial to avoid explicitly forming \({\varPhi }_{22}^{-1}\). The following auxiliary equation is therefore introduced
Substituting this into (29), we find
where \({\varDelta }b_{i,n+1,a_{n+\frac{1}{2}}}^{(k)}=b_{i,n+1,a_{n+\frac{1}{2}}}^{(k+1)}-b_{i,n+1,a_{n+\frac{1}{2}}}^{(k)}\) and the auxiliary equations are scaled to be of the same magnitude as the original equations. In (30) the Schur complement has already been reverted, but the value of \(b_{i,n+1,a_{n+\frac{1}{2}}}\) depends on \(b_{s,n+1}^{(k)}\), so it is better to update both \(b_{i,n+1,a_{n+\frac{1}{2}}}\) and \(b_{s,n+1}^{(k)}\) every Newton step. The combined update looks like
Substituting (27) into (31) then results in
This introduces the inverse matrix \(F_{22}^{-1}\) for which we introduce the auxiliary equation
We can now write (29) in a form that does not require explicit inverses of matrices
where \({\varDelta }u_{i,n+\frac{1}{2}}^{(k)}=u_{i,n+\frac{1}{2}}^{(k+1)}-u_{i,n+\frac{1}{2}}^{(k)}\). Following the same steps for (30) as for (29) we obtain
We again introduce an auxiliary equation
This allows us to remove the inverses from (34), resulting in
where \({\varDelta }d_{n+1,{a}_{n+\frac{1}{2}}}^{(k)}=d_{n+1,{a}_{n+\frac{1}{2}}}^{(k+1)}-d_{n+1,{a}_{n+\frac{1}{2}}}^{(k)}\).
Appendix 2: Time Derivative of the Mass Matrix
The time derivative of the mass matrix can be constructed similar to the free surface derivative of the wave maker boundary integral. This matrix is introduced in (10), (11) and (16). A careful look at these equations reveals that the mass matrix is more accurately represented as a flux trough a surface
We can now apply (7.2) from [7] to find
Since \(\eta ^t_j\) does not depend on z, the first term in (36) vanishes. In addition, the internal contributions from two adjacent patches \(\mathcal {D}_{t,s,h}^l\) cancel, so the third term reduces to an integral over the boundary of the free surface. At the boundary we know the patch velocity \(v=\frac{\partial R}{\partial t}\) and we have applied the correction (14) to ensure that the free surface moves tangentially to the solid wall. These considerations reduce (36) to
From here we use \(t_R=\tau \times \nu _R\) and expand all products to arrive at
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Brink, F., Izsák, F. & van der Vegt, J.J.W. Hamiltonian Finite Element Discretization for Nonlinear Free Surface Water Waves. J Sci Comput 73, 366–394 (2017). https://doi.org/10.1007/s10915-017-0416-9
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10915-017-0416-9
Keywords
- Finite element method
- Hamiltonian systems
- Nonlinear potential flow water wave equations
- Symplectic time integration
- Moving meshes