1 Introduction

Linear and nonlinear wave equations are generally studied under the assumption that the solution is spatially periodic or decays to zero at infinity (Lax , 1976). Beginning with Berenger (1994), a great deal of effort has been devoted to developing perfectly matched layer (PML) techniques for imposing absorbing boundary conditions over a finite computational domain to simulate wave propagation problems on unbounded domains. However, in many situations, assuming the waves decay to zero at infinity is not a realistic model. For example, a large body of water such as the ocean is often covered in surface waves in every direction over vast distances. But assuming spatial periodicity may limit one’s ability to observe interesting dynamics. In this paper, we formulate the initial value problem of the surface water wave equations in a spatially quasi-periodic setting, design numerical algorithms to compute such waves, and study their properties.

Since the pioneering work of Benjamin and Feir (1967) and Zakharov (1968), it has been recognized that water waves exhibit interesting nonlinear interactions between component waves of different wavelength. For example, in oceanography, modulational instabilities of periodic wavetrains introduce perturbations that lead to spatially quasi-periodic dynamics and are believed to be one of the mechanisms responsible for the formation of rogue waves (Osborne et al. 2000; Onorato et al. 2006; Ablowitz and Horikis 2015). These instabilities have been studied extensively using a variety of techniques, summarized below, including linearization using Bloch stability theory, evolving the nonlinear equations on a larger periodic domain, developing coupled weakly nonlinear models, and solving weakly nonlinear models via the inverse scattering transform. However, it has not been known how to formulate or compute fully nonlinear water waves in a spatially quasi-periodic setting. We show that a conformal mapping formulation of the water wave equations, introduced by Dyachenko et al. (1996a) and further developed by many authors (Dyachenko et al. 1996b; Choi and Camassa 1999; Dyachenko 2001; Zakharov et al. 2002; Li et al. 2004; Milewski et al. 2010; Wang et al. 2013; Viotti et al. 2014; Dyachenko and Newell 2016; Turner and Bridges 2016), extends nicely to this setting via a quasi-periodic generalization of the Hilbert transform. Currently our method is limited to two-dimensional fluids, but we formulate the equations of motion and discuss computational challenges of 3D quasi-periodic water waves in Appendix D.

The Bloch stability approach can be carried out by linearizing the full water wave equations about a traveling Stokes wave (Longuet-Higgins 1978; McLean 1982; MacKay and Saffman 1986; Deconinck and Oliveras 2011; Trichtchenko et al. 2016; Wilkening 2021) or within a weakly nonlinear model such as the nonlinear Schrödinger (NLS) equation (Benney and Newell 1967; Zakharov 1968). A major drawback is that unstable modes grow exponentially forever and eventually leave the realm of validity of the linearization. Osborne et al. (2000) have observed that if nonlinear effects are taken into account in this scenario, the perturbation often exhibits Fermi-Pasta-Ulam recurrence (Berman and Izrailev 2005). They solve a 2+1-dimensional NLS equation on a domain that is 10 times larger than the wavelength of the carrier wave and look for rogue-wave formation and recurrence over long simulation times. Similarly, Bryant and Stiassnie (1994) study recurrence using both a weakly nonlinear model (Zakharov’s equation) and the full water wave equations in the context of standing water waves when the wavelength of the subharmonic perturbation is 9 times that of the unperturbed standing wave. The main drawback of this approach is that the larger periodic computational domain must be an integer multiple of both the base wave and the perturbation, which requires that the ratio of their wavelengths be a rational number with a small numerator and denominator. We propose a method below that allows for more general perturbations and plan to investigate the long-time nonlinear dynamics of unstable subharmonic perturbations of traveling and standing waves in future work.

An alternative approach that does not require rationally related wave numbers is to model the interaction of two periodic wavetrains as a coupled weakly nonlinear system. This is particularly useful for studying the interaction between oblique waves on the surface of a three-dimensional fluid. For example, Bridges and Laine-Pearson (2001) studied coupled NLS equations and extended the theory to analyze the stability of short-crested waves (Bridges and Laine-Pearson 2005). More recently, Ablowitz and Horikis (2015) showed that some propagation angles enhance the number and amplitude of rogue wave events in a coupled NLS water wave model.

Some weakly nonlinear models are completely integrable and can be studied using the inverse scattering transform (IST) (Ablowitz and Segur 1981). Osborne et al. (2000) discuss IST results for the 1+1-dimensional NLS equation in the context of rogue waves. Other equations such as the Korteweg-deVries and Benjamin-Ono equations are meant to model wave dynamics in shallow water (Ablowitz and Segur 1981) and internal waves in a stratified fluid (Ono 1975), respectively. Solving these equations using the inverse scattering transform (Ablowitz and Segur 1981) leads to infinite hierarchies of exact spatio-temporal quasi-periodic solutions (Flaschka et al. 1980; Dobrokhotov and Krichever 1991).

In these and other examples involving weakly nonlinear theory, it is natural to seek analogous quasi-periodic solutions of the Euler equations in regimes where the model equations are intended to be accurate. It is also of interest to search for new regimes and behavior not predicted by model water wave equations. Even within weakly nonlinear theory, except for the exact quasi-periodic solutions obtained via the IST, spatial quasi-periodicity has only been approximated by embedding in a larger periodic domain or by introducing coupling terms between two or more single-mode NLS equations. The framework we propose below for water waves, which involves representing quasi-periodic functions as periodic functions on a higher dimensional torus and using a spectral method to solve a torus version of the equations of motion, could also be used to find true quasi-periodic solutions of weakly nonlinear equations without introducing systems of coupled equations.

Only recently have quasi-periodic dynamics of water waves been studied mathematically. Berti and Montalto (2016) and Baldi et al. (2018) used Nash-Moser theory to prove the existence of small-amplitude temporally quasi-periodic gravity-capillary standing waves. With different assumptions on the form of solutions, Berti et al. (2020) have proved the existence of time quasi-periodic gravity-capillary waves with constant vorticity while Feola and Giuliani (2020) have proved the existence of time quasi-periodic irrotational gravity waves. New families of relative-periodic (Wilkening 2015) and traveling-standing (Wilkening 2021) water wave solutions have been computed by Wilkening. As with Berti and Montalto (2016); Baldi et al. (2018); Berti et al. (2020); Feola and Giuliani (2020), these solutions are quasi-periodic in time rather than space.

Another motivation for studying spatially quasi-periodic water waves is the work of Wilton (1915), who observed that a resonance can occur that causes Stokes’ regular perturbation expansion for traveling water waves to break down (Akers and Gao 2012; Akers and Nicholls 2020; Vanden-Broeck 2010; Trichtchenko et al. 2016; Akers et al. 2019). Suppose \(k_1\) and \(k_2\) are both roots of the dispersion relation for linearized water waves of infinite depth,

$$\begin{aligned} c^2 = gk^{-1}+\tau k. \end{aligned}$$
(1.1)

Here the gravitational acceleration g, wave speed c, and surface tension \(\tau \) are held constant when solving for the wave numbers \(k_1\) and \(k_2\). If \(k_2=Kk_1\) with \(K\ge 2\) an integer, the \(K\text {th}\) harmonic will enter a modified Stokes expansion for traveling waves of wavelength \(2\pi /k_1\) at order \(\varepsilon ^{\text {max(K-2,1)}}\) instead of \(\varepsilon ^K\), where \(\varepsilon \) is the expansion coefficient of the fundamental mode. This resonance occurs because the two waves travel at the same speed under the linearized water wave equations. Bridges and Dias (1996) consider a generalization in which the wave numbers \(k_1\) and \(k_2\) are irrationally related. They use a spatial Hamiltonian structure to construct weakly nonlinear approximations of spatially quasi-periodic traveling gravity-capillary waves for two special cases: deep water and shallow water. This inspired us to develop a conformal mapping framework for computing spatially quasi-periodic, fully nonlinear traveling gravity-capillary waves, which is the topic of the companion paper, namely Wilkening and Zhao (2021).

We show in (Wilkening and Zhao 2021) that these spatially quasi-periodic traveling waves come in two-parameter families in which the amplitudes of the base modes with wave numbers \(k_1\) and \(k_2\) serve as bifurcation parameters. The wave speed and surface tension depend nonlinearly on these parameters as well. Akers et al. (2019) have proved existence of similar two-parameter families of traveling waves for the case of a two-fluid hydro-elastic interface. They develop an integral equation formulation of the equations governing traveling hydro-elastic waves such that the linearization about any state is a compact perturbation of the identity and use global bifurcation theory to establish existence and uniqueness results. They show that the nullspace of the linearized operator about the flat rest state has dimension one or two, and is two if and only if the non-dimensionalized wave numbers \(k_1<k_2\) that travel with a given speed are integers. When they are integers, Akers et al. distinguish resonant and non-resonant cases depending on whether \(k_2/k_1\) is an integer. The non-resonant case leads to a smooth two-parameter family of traveling waves with wave speed and surface tension depending nonlinearly on the amplitude parameters. This is the case most analogous to the spatially quasi-periodic traveling waves that we compute in (Wilkening and Zhao 2021).

The present paper focuses on the more general spatially quasi-periodic initial value problem, which we use to validate the traveling wave computations of Wilkening and Zhao (2021) and explore new dynamic phenomena. In recent years, conformal mapping methods have proved useful for studying two-dimensional traveling water waves (Choi and Camassa 1999; Milewski et al. 2010; Wang et al. 2013; Dyachenko et al. 2016) and time-dependent water waves (Dyachenko et al. 1996a; Dyachenko 2001; Dyachenko et al. 1996b; Dyachenko and Newell 2016; Li et al. 2004; Milewski et al. 2010; Turner and Bridges 2016; Zakharov et al. 2002) with periodic boundary conditions. We introduce a Hilbert transform for quasi-periodic functions to compute the normal velocity and maintain a conformal parametrization of the free surface. This leads to a numerical method to compute the time evolution of solutions of the Euler equations from arbitrary quasi-periodic initial data. Following the definitions in Moser (1966); Dynnikov and Novikov (2005), we represent a general quasi-periodic function \(u(\alpha )\) in one dimension by a periodic function \(\tilde{u}(\varvec{\alpha })\) on a d-dimensional torus, i.e. \(u(\alpha )=\tilde{u}(\varvec{k}\alpha )\) for \(\alpha \in \mathbb {R}\), where \(\varvec{k}=(k_1,\dots ,k_d)\). The \(k_i\) are assumed to be linearly independent over the integers. We take these basic wave numbers \(k_i\) and the initial conditions on the torus as given, focusing on the \(d=2\) case. This leaves open the important question of how best to measure a one-dimensional wave profile or velocity potential and identify its quasi-periods and corresponding torus function.

We present two variants of the numerical method, one in a high-order explicit Runge-Kutta framework and one in an exponential time-differencing (ETD) framework. The former is suitable for the case of zero or small surface tension while the latter makes use of the small-scale decomposition (Hou et al. 1994, 2001) to eliminate stiffness due to surface tension. The conformal mapping method has not been implemented in an ETD framework before, even for periodic boundary conditions. We present a convergence study of the methods as well as a large-scale computation of a quasi-periodic wave in which some of the wave crests overturn when evolved forward in time while others do not. Due to the torus representation of solutions, there are infinitely many wave crests and no two of them evolve in exactly the same way. The computation involves over 33 million degrees of freedom evolved over 5400 time steps to maintain double-precision accuracy.

We include four appendices that cover various technical aspects of this work. In Appendix A, we prove a theorem establishing sufficient conditions for an analytic function z(w) to map the lower half-plane topologically onto a semi-infinite region bounded above by a parametrized curve and for \(1/|z_w|\) to be uniformly bounded. In Appendix 1, we study families of quasi-periodic solutions obtained by introducing phases in the reconstruction formula for extracting 1D quasi-periodic functions from periodic functions on a torus. This enables us to prove that if all the solutions in the family are single-valued and have no vertical tangent lines, the solutions are also quasi-periodic in the original graph-based formulation of the Euler equations. We also present a simple procedure for computing the change of variables from the conformal representation to the graph representation. This appears to be a new result even for periodic boundary conditions. In Appendix C we provide details on how to implement the equations of motion in an exponential time-differencing framework to avoid stepsize limitations due to stiffness caused by surface tension. And in Appendix D, we discuss the equations of motion for spatially quasi-periodic water waves in three dimensions and outline possible alternatives to the conformal mapping approach.

2 Mathematical Formulation

In this section, we review the governing equations for gravity-capillary waves in both physical space and conformal space. We then extend the conformal mapping framework to allow for spatially quasi-periodic solutions. For simplicity, we initially assume the wave profile \(\eta (x,t)\) remains single-valued. This assumption is relaxed when discussing the conformal formulation, and an example of a wave in which some of the peaks overturn as time advances is presented in Sect. 4.2.

2.1 Governing Equations in Physical Space

Gravity-capillary waves of infinite depth are governed by the two-dimensional free-surface Euler equations (Zakharov 1968; Craig and Sulem 1993)

$$\begin{aligned} \eta (x, 0)= & {} \eta _0(x), \qquad \varphi (x, 0) = \varphi _0(x), \qquad t=0, \quad x\in \mathbb {R}, \end{aligned}$$
(2.1)
$$\begin{aligned} \Phi _{xx} + \Phi _{yy}= & {} 0, \qquad -\infty< y < \eta (x, t),\nonumber \\ \Phi _y\rightarrow & {} 0, \qquad y \rightarrow -\infty ,\nonumber \\ \Phi= & {} \varphi , \qquad y = \eta (x, t), \end{aligned}$$
(2.2)
$$\begin{aligned} \eta _t= & {} \Phi _y - \eta _x\Phi _x, \qquad y = \eta (x, t), \end{aligned}$$
(2.3)
$$\begin{aligned} \varphi _t= & {} \Phi _y\eta _t-\frac{1}{2}\Phi _x^2-\frac{1}{2}\Phi _y^2- g\eta +\tau \frac{\eta _{xx}}{(1+\eta _x^2)^{3/2}}+C(t), \nonumber \\ \qquad y= & {} \eta (x, t), \end{aligned}$$
(2.4)

where x is the horizontal coordinate, y is the vertical coordinate, t is the time, \(\Phi (x, y, t)\) is the velocity potential in the fluid, \(\eta (x, t)\) is the free surface elevation,

$$\begin{aligned} \varphi (x, t) = \Phi (x, \eta (x, t), t) \end{aligned}$$
(2.5)

is the boundary value of the velocity potential on the free surface, g is the vertical acceleration due to gravity and \(\tau \) is the coefficient of surface tension. Following Zakharov (1968); Craig and Sulem (1993), only the surface variables \(\eta \) and \(\varphi \) are evolved in time; the velocity potential \(\Phi \) in the bulk fluid is reconstructed from \(\eta \) and \(\varphi \) by solving (2.2), which causes the problem to be nonlocal. The function C(t) in the Bernoulli condition (2.4) is an arbitrary integration constant that is allowed to depend on time but not space. When the domain is periodic or quasi-periodic, one can choose C(t) so that the mean value of \(\varphi (x,t)\) remains constant in time, where the mean is defined as \(\lim _{a\rightarrow \infty }\frac{1}{2a}\int _{-a}^a \varphi (x,t)\,dx\).

2.2 The Quasi-Periodic Hilbert Transform

We find that a conformal mapping representation of the free surface greatly simplifies the solution of the Laplace equation for the velocity potential in the quasi-periodic setting. In this section, we establish the properties of the Hilbert transform that will be needed to study quasi-periodic water waves in a conformal mapping framework.

As defined in Moser (1966); Dynnikov and Novikov (2005), a quasi-periodic, real analytic function \(u(\alpha )\) is a function of the form

$$\begin{aligned} u(\alpha ) = \tilde{u}(\varvec{k} \alpha ), \qquad \tilde{u}(\varvec{\alpha }) = \sum _{\varvec{j}\in \mathbb {Z}^d}\hat{u}_{\varvec{j}} e^{i\langle \varvec{j},\,\varvec{\alpha }\rangle }, \qquad \alpha \in \mathbb {R}, \;\; \varvec{\alpha },\varvec{k} \in \mathbb {R}^d, \end{aligned}$$
(2.6)

where \(\langle \cdot , \,\cdot \rangle \) denotes the standard inner product in \(\mathbb {R}^d\) and \(\tilde{u}\) is a periodic, real analytic function defined on the d-dimensional torus

$$\begin{aligned} \mathbb {T}^d := \mathbb {R}^d\big /(2\pi \mathbb {Z})^d. \end{aligned}$$
(2.7)

Entries of the vector \(\varvec{k}\) are called the basic wave numbers (or basic frequencies) of u and are required to be linearly independent over \(\mathbb {Z}\). If \(\varvec{k}\) is given, one can reconstruct the Fourier coefficients \(\hat{u}_{\varvec{j}}\) from u via

$$\begin{aligned} \hat{u}_{\varvec{j}} = \lim _{a\rightarrow \infty } \frac{1}{2a} \int _{-a}^au(\alpha ) e^{-i\langle \varvec{j}, \varvec{k}\rangle \alpha } d\alpha , \qquad \varvec{j}\in \mathbb {Z}^d. \end{aligned}$$
(2.8)

A similar averaging formula holds for functions in the more general class of almost periodic functions (Moser 1966; Bohr 2018; Fink 1974; Amerio and Prouse 1971; Hino et al. 2002), which is the closure with respect to uniform convergence on \(\mathbb {R}\) of the set of trigonometric polynomials \(p(x)=\sum _{n=1}^N c_n e^{i\kappa _nx}\). Before taking limits to obtain the closure, this set includes polynomials of any degree and there is no restriction on the real numbers \(\kappa _n\). Within the framework of almost periodic functions, one obtains quasi-periodic functions if one assumes the \(\kappa _n\) in the approximating polynomials are integer linear combinations of a fixed, finite set of basic wave numbers \(k_1,\dots ,k_d\).

We have not attempted to formulate the water wave problem in the full generality of almost periodic functions, and instead assume the basic wave numbers are given and the torus representation (2.6) is available. Thus, the average over \(\mathbb {R}\) on the right-hand side of (2.8) can be replaced by the simpler Fourier coefficient formula

$$\begin{aligned} \hat{u}_{\varvec{j}} = \frac{1}{(2\pi )^d}\int _{\mathbb {T}^d} \tilde{u}(\varvec{\alpha })e^{-i\langle \varvec{j},\varvec{\alpha }\rangle } \,d\alpha _1\cdots \, d\alpha _d. \end{aligned}$$
(2.9)

Our assumption that \(\tilde{u}(\varvec{\alpha })\) is real analytic is equivalent to the conditions that \(\hat{u}_{-\varvec{j}}=\overline{\hat{u}_{\varvec{j}}}\) for \(\varvec{j}\in \mathbb {Z}^d\) and there exist positive numbers M and \(\sigma \) such that \(|\hat{u}_{\varvec{j}}|\le Me^{-\sigma \Vert \varvec{j}\Vert }\), i.e. the Fourier modes \(\hat{u}_{\varvec{j}}\) decay exponentially as \(\Vert \varvec{j}\Vert \rightarrow \infty \). This is proved, e.g. in Lemma 5.6 of Broer and Takens (2011).

Next we define the projection operators \(P\) and \(P_0\) that act on u and \(\tilde{u}\) via

$$\begin{aligned} P= {\text {id}} - P_0, \qquad P_0 [u] = P_0 [\tilde{u}] = \hat{u}_{\varvec{0}} = \frac{1}{(2\pi )^d} \int _{\mathbb {T}^d} \tilde{u}(\varvec{\alpha })\, d\alpha _1\cdots \, d\alpha _d. \end{aligned}$$
(2.10)

Note that \(P\) projects onto the space of zero-mean functions while \(P_0\) returns the mean value, viewed as a constant function on \(\mathbb R\) or \(\mathbb T^d\). There are two versions of P and \(P_0\), one acting on quasi-periodic functions defined on \(\mathbb {R}\) and one acting on torus functions defined on \(\mathbb {T}^d\).

Given \(u(\alpha )\) as in (2.6), the most general bounded analytic function f(w) in the lower half-plane whose real part agrees with u on the real axis has the form

$$\begin{aligned} f(w) = \hat{u}_{\varvec{0}} + i\hat{v}_{\varvec{0}} + \sum _{\langle \varvec{j},\varvec{k}\rangle <0} 2 \hat{u}_{\varvec{j}}e^{i\langle \varvec{j},\varvec{k}\rangle w}, \qquad (w=\alpha +i\beta \,,\; \beta \le 0) \end{aligned}$$
(2.11)

where \(\hat{v}_{\varvec{0}}\in \mathbb {R}\) and the sum is over all \(\varvec{j}\in \mathbb {Z}^d\) satisfying \(\langle \varvec{j},\varvec{k}\rangle <0\). The imaginary part of f(z) on the real axis is given by

$$\begin{aligned} v(\alpha ) = \tilde{v}(\varvec{k}\alpha ), \qquad \tilde{v}(\varvec{\alpha }) = \sum _{\varvec{j}\in \mathbb {Z}^d} \hat{v}_{\varvec{j}}e^{i\langle \varvec{j},\varvec{\alpha }\rangle }, \qquad \hat{v}_{\varvec{j}} = i{\text {sgn}}(\langle \varvec{j},\varvec{k}\rangle )\hat{u}_{\varvec{j}}, \quad (\varvec{j}\ne 0) \end{aligned}$$
(2.12)

where \({\text {sgn}}(q)\in \{1,0,-1\}\) depending on whether \(q>0\), \(q=0\) or \(q<0\), respectively. Similarly, given \(v(\alpha )\) and requiring \(({\text {Im}}f)\vert _\mathbb {R}=v\) yields (2.11) with \(\hat{u}_{\varvec{j}}\) replaced by \(i\hat{v}_{\varvec{j}}\). We introduce a quasi-periodic Hilbert transform to compute v from u or u from v,

$$\begin{aligned} v = \hat{v}_{\varvec{0}} - H[u], \qquad \quad u = \hat{u}_{\varvec{0}} + H[v], \end{aligned}$$
(2.13)

where the constant \(\hat{v}_{\varvec{0}}=P_0[v]\) or \(\hat{u}_{\varvec{0}}=P_0[u]\) is a free parameter when computing v or u, respectively. \(H\) returns the “zero-mean” solution, i.e. \(P_0H[u]=0\). Uniqueness of the bounded extension from u or v to f up to the additive constant \(i\hat{v}_{\varvec{0}}\) or \(\hat{u}_{\varvec{0}}\) follows from two well-known results: the only bounded solution of the Laplace equation on a half-space satisfying homogeneous Dirichlet boundary conditions is identically zero (Axler et al. 1992), and the harmonic conjugate of the zero function on a connected domain is constant.

Definition 2.1

The Hilbert transform of a quasi-periodic, analytic function \(u(\alpha )\) of the form (2.6) is defined to be

$$\begin{aligned} H[u](\alpha ) = \sum \limits _{\varvec{j}\in \mathbb {Z}^d} (-i){\text {sgn}}(\langle \varvec{j},\,\varvec{k}\rangle ) \hat{u}_{\varvec{j}} e^{i \langle \varvec{j},\,\varvec{k}\rangle \alpha }. \end{aligned}$$
(2.14)

This agrees with the standard definition (Dyachenko et al. 2016) of the Hilbert transform as a Cauchy principal value integral:

$$\begin{aligned} H[u](\alpha ) = \frac{1}{\pi }{\text {PV}}\int _{-\infty }^\infty \frac{u(\xi )}{\alpha -\xi }\,d\xi . \end{aligned}$$
(2.15)

Indeed, it is easy to show that for functions of the form \(u(\alpha ) = e^{i\rho \alpha }\) with \(\rho \) real, the integral in (2.15) gives \(H[u](\alpha ) = -i{\text {sgn}}(\rho )e^{i\rho \alpha }\). For extensions to the upper half-plane, the sum in (2.11) is over \(\langle \varvec{j},\varvec{k}\rangle >0\), the last formula in (2.12) becomes \(\hat{v}_{\varvec{j}} = -i{\text {sgn}}(\langle \varvec{j},\varvec{k}\rangle )\hat{u}_{\varvec{j}}\), and the signs in front of \(H[u]\) and \(H[v]\) in (2.13) are reversed.

Remark 2.2

As with P and \(P_0\), there is an analogous operator on \(L^2(\mathbb {T}^d)\) such that \(H[u](\alpha )=H[\tilde{u}](\varvec{k}\alpha )\). The formula is

$$\begin{aligned} H[\tilde{u}](\varvec{\alpha }) = \sum \limits _{\varvec{j}\in \mathbb {Z}^d} (-i){\text {sgn}}(\langle \varvec{j},\,\varvec{k}\rangle ) \hat{u}_{\varvec{j}} e^{i \langle \varvec{j},\,\varvec{\alpha }\rangle }. \end{aligned}$$
(2.16)

If necessary for clarity, one can also write \(H_{\varvec{k}}[\tilde{u}]\) to emphasize the dependence of \(H\) on \(\varvec{k}\). \(H\) commutes with the shift operator \(S_{\varvec{\theta }}[\tilde{u}](\varvec{\alpha }) = \tilde{u}(\varvec{\alpha }+\varvec{\theta })\), so if \(\tilde{v}=\hat{v}_{\varvec{0}} - H[\tilde{u}]\) and \(\hat{u}_{\varvec{0}}=P_0[\tilde{u}]\), then \(v(\alpha ;\varvec{\theta })=\tilde{v}(\varvec{k}\alpha +\varvec{\theta })\) is related to \(u(\alpha ;\varvec{\theta })=\tilde{u}(\varvec{k}\alpha +\varvec{\theta })\) by (2.13). Also, if f(z) in (2.11) is the bounded analytic extension of \((u+iv)(\alpha )=\tilde{u}(\varvec{k}\alpha ) +i\tilde{v}(\varvec{k}\alpha )\) to the lower half-plane, we have

$$\begin{aligned} f(w) = \tilde{f}(\varvec{k}\alpha ,\beta ), \qquad (w=\alpha +i\beta \,,\;\beta \le 0), \end{aligned}$$
(2.17)

where \(\tilde{f}(\varvec{\alpha },\beta ) = \hat{u}_{\varvec{0}} + i\hat{v}_{\varvec{0}} + \sum _{\langle \varvec{j},\varvec{k}\rangle <0} 2[\hat{u}_{\varvec{j}}e^{-\langle \varvec{j},\varvec{k}\rangle \beta }] e^{i\langle \varvec{j},\varvec{\alpha }\rangle }\) is periodic in \(\varvec{\alpha }\) for fixed \(\beta \le 0\). The bounded analytic extension of \([u(\alpha ;\varvec{\theta })+iv(\alpha ;\varvec{\theta })]\) to the lower half-plane is then given by \(f(\alpha +i\beta ;\varvec{\theta })= \tilde{f}(\varvec{k}\alpha +\varvec{\theta },\beta )\).

2.3 The Conformal Mapping

We consider a time dependent conformal mapping that maps the conformal domain

$$\begin{aligned} \mathbb {C}^- = \{\alpha +i\beta \,:\, \alpha \in \mathbb {R},\,\beta <0\} \end{aligned}$$
(2.18)

to the fluid domain

$$\begin{aligned} \Omega (t) = \{x + iy\,:\, x\in \mathbb {R},\,y<\eta (x,t)\}. \end{aligned}$$
(2.19)

This conformal mapping, denoted by z(wt), is assumed to extend continuously to \(\overline{\mathbb {C}^-}\) and maps the real line \(\beta = 0\) to the free surface

$$\begin{aligned} \Gamma (t) = \{x + iy\,:\, y = \eta (x, t)\}. \end{aligned}$$
(2.20)

We express z(wt) as

$$\begin{aligned} z(w, t) = x(w, t) + i y(w, t), \qquad \quad (w=\alpha +i\beta ). \end{aligned}$$
(2.21)

We also introduce the notation \(\zeta =z\vert _{\beta =0}\), \(\xi =x\vert _{\beta =0}\) and \(\eta =y\vert _{\beta =0}\) so that the free surface is parametrized by

$$\begin{aligned} \zeta (\alpha , t) = \xi (\alpha , t) + i \eta (\alpha , t), \qquad \quad (\alpha \in \mathbb R). \end{aligned}$$
(2.22)

This allows us to denote a generic field point in the physical fluid by \(z=x+iy\) while simultaneously discussing points \(\zeta =\xi +i\eta \) on the free surface. To avoid ambiguity, we will henceforth denote the free surface elevation function from the previous section by \(\eta ^\text {phys}(x, t)\). Thus,

$$\begin{aligned} \eta (\alpha ,t) = \eta ^\text {phys}(\xi (\alpha ,t),t), \qquad \eta _\alpha = \eta ^\text {phys}_x\xi _\alpha , \qquad \eta _t = \eta ^\text {phys}_x\xi _t + \eta ^\text {phys}_t. \end{aligned}$$
(2.23)

The parametrization (2.22) is more general than (2.23) in that it allows for overturning waves. In deriving the equations of motion for \(\zeta (\alpha ,t)\) and \(\varphi (\alpha ,t)\) in Sect. 2.5 below, we will indicate the modifications necessary to handle the case of overturning waves. In particular, as discussed in Appendix A, \(\Gamma (t)\) is defined in this case as the image of \(\zeta (\cdot ,t)\), which is assumed to be injective on \(\mathbb {R}\), and \(\Omega (t)\) can be obtained from \(\Gamma (t)\) using the Jordan curve theorem.

The conformal map is required to remain a bounded distance from the identity map in the lower half-plane. Specifically, we require that

$$\begin{aligned} |z(w,t)-w|\le M(t) \quad \qquad (w=\alpha +i\beta \,,\; \beta \le 0), \end{aligned}$$
(2.24)

where M(t) is a uniform bound that could vary in time. The Cauchy integral formula implies that \(|z_w-1|\le M(t)/|\beta |\), so at any fixed time,

$$\begin{aligned} z_w\rightarrow 1 \quad \text { as } \quad \beta \rightarrow -\infty . \end{aligned}$$
(2.25)

Our goal is to investigate the case when the free surface is quasi-periodic in \(\alpha \). This differs from conformal mappings discussed in Meiron et al. (1981); Dyachenko et al. (1996a); Dyachenko (2001); Zakharov et al. (2002); Li et al. (2004) and Milewski et al. (2010), where it is assumed to be periodic.

In the present work, \(\eta \) is assumed to have two spatial quasi-periods, i.e. at any time it has the form (2.6) with \(d=2\) and \(\varvec{k}=(k_1,k_2)\). Since \(k_1\) and \(k_2\) are irrationally related, we assume without loss of generality that \(k_1=1\) and \(k_2 = k\), where k is irrational:

$$\begin{aligned} \eta (\alpha ,t) = \tilde{\eta }(\alpha ,k\alpha ,t), \qquad \tilde{\eta }(\alpha _1,\alpha _2,t) = \sum _{j_1, j_2\in \mathbb {Z}} \hat{\eta }_{j_1, j_2}(t)e^{i(j_1\alpha _1+j_2\alpha _2)}. \end{aligned}$$
(2.26)

Here \(\hat{\eta }_{-j_1, -j_2}(t) = \overline{\hat{\eta }_{j_1,j_2}(t)}\) since \(\tilde{\eta }(\alpha _1,\alpha _2,t)\) is real-valued. Since \(w\mapsto [z(w,t)-w]\) is bounded and analytic on \(\mathbb {C}^-\) and its imaginary part agrees with \(\eta \) on the real axis, there is a real number \(x_0\) (possibly depending on time) such that

$$\begin{aligned} \xi (\alpha , t) = \alpha + x_0(t) + H[\eta ](\alpha , t). \end{aligned}$$
(2.27)

Using (2.25) and  \({\text {Im}}[z_w\vert _{\beta =0}]=\eta _\alpha \)  or differentiating (2.27) gives

$$\begin{aligned} \xi _\alpha (\alpha , t) = 1 + H[\eta _\alpha ](\alpha , t). \end{aligned}$$
(2.28)

We use a tilde to denote the periodic functions on the torus that correspond to the quasi-periodic parts of \(\xi \), \(\zeta \) and z,

$$\begin{aligned} \begin{gathered} \xi (\alpha ,t) = \alpha + \tilde{\xi }(\alpha ,k\alpha ,t), \qquad \zeta (\alpha ,t) = \alpha + \tilde{\zeta }(\alpha ,k\alpha ,t), \\ z(\alpha +i\beta ,t)=\left( \alpha +i\beta \right) + \tilde{z}(\alpha ,k\alpha ,\beta ,t), \qquad (\beta \le 0). \end{gathered} \end{aligned}$$
(2.29)

Specifically, \(\tilde{\xi }= x_0(t) + H[\tilde{\eta }]\), \(\tilde{\zeta }= \tilde{\xi }+ i\tilde{\eta }\), and

$$\begin{aligned} \tilde{z}(\alpha _1,\alpha _2,\beta ,t) = x_0(t)+i\hat{\eta }_{0,0}(t)+\sum _{j_1+j_2k<0} \left( 2i\hat{\eta }_{j_1,j_2}(t)e^{-(j_1+j_2k)\beta }\right) e^{i(j_1\alpha _1+j_2\alpha _2)}. \end{aligned}$$
(2.30)

While the mean surface height remains constant in physical space, \(\hat{\eta }_{0,0}(t)\) generally varies in time. Since the modes \(\hat{\eta }_{j_1,j_2}\) are assumed to decay exponentially, there is a uniform bound M(t) such that \(|\tilde{z}(\alpha _1,\alpha _2,\beta ,t)|\le M(t)\) for \((\alpha _1,\alpha _2)\in \mathbb {T}^2\) and \(\beta \le 0\). In Appendix A we show that as long as the free surface \(\zeta (\alpha ,t)\) does not self-intersect at a given time t, the mapping \(w\mapsto z(w,t)\) is an analytic isomorphism of the lower half-plane onto the fluid region.

2.4 The Complex Velocity Potential

Let \(\Phi ^\text {phys}(x,y,t)\) denote the velocity potential in physical space from Sect. 2.1 above and let \(W^\text {phys}(x+iy,t)= \Phi ^\text {phys}(x,y,t)+i\Psi ^\text {phys}(x,y,t)\) be the complex velocity potential, where \(\Psi ^\text {phys}\) is the stream function. Using the conformal mapping (2.21), we pull back these functions to the lower half-plane and define

$$\begin{aligned} W(w,t) = \Phi (\alpha ,\beta ,t)+i\Psi (\alpha ,\beta ,t) = W^\text {phys}(z(w,t),t), \qquad \quad (w=\alpha +i\beta ). \end{aligned}$$

We also define \(\varphi =\Phi \vert _{\beta =0}\) and \(\psi =\Psi \vert _{\beta =0}\) and use (2.2) and (2.23) to obtain

$$\begin{aligned} \varphi (\alpha ,t) = \varphi ^\text {phys}(\xi (\alpha ,t),t), \qquad \psi (\alpha ,t) = \psi ^\text {phys}(\xi (\alpha ,t),t), \end{aligned}$$
(2.31)

where \(\psi ^\text {phys}(x,t)=\Psi ^\text {phys}(x,\eta ^\text {phys}(x,t),t)\). We assume \(\varphi \) is quasi-periodic with the same quasi-periods as \(\eta \),

$$\begin{aligned} \varphi (\alpha , t) = \tilde{\varphi }(\alpha ,k\alpha ,t), \qquad \tilde{\varphi }(\alpha _1,\alpha _2,t) = \sum _{j_1, j_2\in \mathbb {Z}} \hat{\varphi }_{j_1, j_2}(t) e^{i(j_1\alpha _1+j_2\alpha _2)}. \end{aligned}$$

The fluid velocity \(\nabla \Phi ^\text {phys}(x,y,t)\) is assumed to decay to zero as \(y\rightarrow -\infty \) (since we work in the lab frame). From (2.25) and the chain rule (see (2.33) below), \(dW/dw\rightarrow 0\) as \(\beta \rightarrow -\infty \). Thus, \(\psi _\alpha = -H[\varphi _\alpha ]\). Writing this as \(\partial _\alpha [\psi +H\varphi ]=0\), we conclude that

$$\begin{aligned} \psi (\alpha , t) = -H[\varphi ](\alpha , t). \end{aligned}$$
(2.32)

Here we have set the integration constant to zero and assumed \(P_0[\varphi ] = \hat{\varphi }_{0,0}(t) = 0\) and \(P_0[\psi ] = \hat{\psi }_{0,0}(t) = 0\), which is allowed since \(\Phi \) and \(\Psi \) can be modified by additive constants (or functions of time only) without affecting the fluid motion.

2.5 Governing Equations in Conformal Space

Following Dyachenko et al. (1996a); Choi and Camassa (1999); Zakharov et al. (2002); Li et al. (2004); Viotti et al. (2014) and Turner and Bridges (2016), we present a derivation of the equations of motion for surface water waves in a conformal mapping formulation, modified as needed to handle quasi-periodic solutions. We also justify the assumption that \(z_t/z_\alpha \) remains bounded in the lower half-plane, which we have not seen discussed previously in the literature.

From the chain rule,

$$\begin{aligned} \frac{dW}{dw} = \frac{dW^\text {phys}}{dz}\cdot \frac{dz}{dw} \qquad \Rightarrow \qquad \Phi ^\text {phys}_x + i \Psi ^\text {phys}_x = \frac{\Phi _\alpha + i\Psi _\alpha }{x_\alpha +iy_\alpha }. \end{aligned}$$
(2.33)

Evaluating (2.33) on the free surface gives

$$\begin{aligned} \Phi ^\text {phys}_x = \frac{\varphi _\alpha \xi _\alpha + \psi _\alpha \eta _\alpha }{J}, \qquad \Phi ^\text {phys}_y = -\Psi ^\text {phys}_x = \frac{\varphi _\alpha \eta _\alpha - \psi _\alpha \xi _\alpha }{J}, \qquad J = \xi _\alpha ^2 + \eta _\alpha ^2. \end{aligned}$$
(2.34)

Using (2.23) and (2.34) in (2.3) and multiplying by \(\xi _\alpha \), we obtain

$$\begin{aligned} \eta _t \xi _\alpha - \xi _t\eta _\alpha = -\psi _\alpha . \end{aligned}$$
(2.35)

This states that the normal velocity of the free surface is equal to the normal velocity of the fluid, \(\varvec{\hat{n}}\cdot (\xi _t,\eta _t) = \varvec{\hat{n}}\cdot \nabla \Phi ^\text {phys}\), where \(\varvec{\hat{n}} = (-\eta _\alpha ,\xi _\alpha )/\sqrt{J}\). This can also be obtained by tracking a fluid particle \(x_p(t)+iy_p(t)= \zeta (\alpha _p(t),t)\) on the free surface. We have \(\dot{x}_p=\xi _\alpha \dot{\alpha }_p+\xi _t=\Phi ^\text {phys}_x\) and \(\dot{y}_p=\eta _\alpha \dot{\alpha }_p+\eta _t=\Phi ^\text {phys}_y\), which leads to (2.35) after eliminating \(\dot{\alpha }_p\). This argument does not assume the free surface is a graph, i.e. (2.35) is also valid for overturning waves.

Next we define a new function,

$$\begin{aligned} q:= \frac{\zeta _t}{\zeta _\alpha } = \frac{(\xi _t\xi _\alpha +\eta _t\eta _\alpha ) + i (\eta _t\xi _\alpha -\xi _t\eta _\alpha )}{J} = \frac{ (\xi _t\xi _\alpha +\eta _t\eta _\alpha ) - i \psi _\alpha }{J}. \end{aligned}$$
(2.36)

Since q is quasi-periodic in \(\alpha \) and extends analytically to the lower half-plane via \(z_t/z_\alpha \), the real and imaginary part of q can be related by the Hilbert transform. Here we have assumed that \(z_t/z_\alpha \) is bounded, which will be justified below. Thus,

$$\begin{aligned} \frac{\xi _t\xi _\alpha +\eta _t\eta _\alpha }{J} = -H\left[ \frac{\psi _\alpha }{J}\right] + C_1, \end{aligned}$$
(2.37)

where \(C_1\) is an arbitrary integration constant that may depend on time but not space. Let \(\varvec{\hat{s}} = (\xi _\alpha ,\eta _\alpha )/\sqrt{J}\) denote the unit tangent vector to the curve. Equation (2.37) prescribes the tangential velocity  \(\varvec{\hat{s}}\cdot (\xi _t,\eta _t)\)  of points on the curve in terms of the normal velocity in order to maintain a conformal parametrization. Note that the tangent velocity of the curve differs from that of the underlying fluid particles. This is similar in spirit to a method of Hou et al. (1994, 2001), who proposed a tangential velocity that maintains a uniform parametrization of the curve (rather than a conformal one); see also (Choi and Camassa 1999; Turner and Bridges 2016; Ambrose et al. 2021; Wilkening and Zhao 2021). Combining (2.35) and (2.37), we obtain the kinematic boundary conditions in conformal space,

$$\begin{aligned} \begin{pmatrix} \xi _t \\ \eta _t \end{pmatrix} = \begin{pmatrix} \xi _\alpha &{} -\eta _\alpha \\ \eta _\alpha &{} \xi _\alpha \end{pmatrix} \begin{pmatrix} -H\left[ \frac{\psi _\alpha }{J}\right] + C_1\\ -\frac{\psi _\alpha }{J} \end{pmatrix}. \end{aligned}$$
(2.38)

The right-hand side can be interpreted as complex multiplication of \(z_\alpha \) with \(z_t/z_\alpha \). Since both functions are analytic in the lower half-plane, their product is, too. Thus, \(\xi _t\) is related to \(\eta _t\) via the Hilbert transform (up to a constant). The constant is determined by comparing (2.27) with (2.38), which gives

$$\begin{aligned} \frac{dx_0}{dt} = P_0\left[ \xi _\alpha \left( -H\left[ \frac{\psi _\alpha }{J}\right] + C_1\right) + \frac{\eta _\alpha \psi _\alpha }{J}\right] . \end{aligned}$$
(2.39)

The three most natural choices of \(C_1\) are

$$\begin{aligned} \begin{alignedat}{2} (a) \;\; C_1&=0:&\text {evolve } x_0(t) \text { via } (2.39), \\ (b) \;\; C_1&=P_0\big [\xi _\alpha H[\psi _\alpha /J] - \eta _\alpha \psi _\alpha /J\big ]:&\qquad&x_0(t)=0, \\ (c) \;\; C_1&=\big [H[\psi _\alpha /J] - \eta _\alpha \psi _\alpha /(\xi _\alpha J)\big ]_{\alpha =0}:&\qquad&\xi (0,t) = 0. \end{alignedat} \end{aligned}$$
(2.40)

In options (b) and (c), the evolution equation ensures that \(dx_0/dt=0\) and \(\xi _t(0,t)=0\), respectively; we have assumed the initial conditions satisfy \(x_0(0)=0\) or \(\xi (0,0)=0\), respectively. Option (c) amounts to setting \(x_0(t)=-H[\eta ](0,t)\) in (2.27). This arguably leads to the most natural parametrization, but would have a problem if the vertical part of an overturning wave crosses \(\alpha =0\). Indeed, such a crossing would lead to \(\xi _\alpha (0,t)=0\) at some time t in the denominator of (2.40 c). We recommend option (b) in this scenario.

Remark 2.3

In infinite depth as considered here, if \(\tilde{f}\) and \(\tilde{g}\) are torus functions on \(\mathbb {T}^d\) and \(f(\alpha )=\tilde{f}(\varvec{k}\alpha )\), \(g(\alpha )=\tilde{g}(\varvec{k}\alpha )\), the identity

$$\begin{aligned} P_0\big [ fg - (Hf)(Hg)\big ] = \sum _{\langle \varvec{j},\varvec{k}\rangle =0} \hat{f}_{\varvec{j}}\hat{g}_{-\varvec{j}} \end{aligned}$$
(2.41)

is easily proved, where the sum is over \(\varvec{j}\in \mathbb {Z}^d\) satisfying \(\langle \varvec{j},\varvec{k}\rangle =0\). In the periodic case with \(d=1\) and \(\varvec{k}=(1)\) or the quasi-periodic case with \(\varvec{k}=(k_1,\dots ,k_d)\) and the \(k_i\) linearly independent over the integers, the right-hand side of (2.41) is \(\hat{f}_{\varvec{0}} \hat{g}_{\varvec{0}}\). This simplifies (2.40 b) to \(C_1=0\) and (2.39) to \(dx_0/dt=C_1\), i.e. cases (a) and (b) in (2.40) coincide. However, this only works in infinite depth as the finite-depth Hilbert transform with symbol \(-i\tanh \big (\langle \varvec{j},\varvec{k}\rangle h\big )\) does not satisfy (2.41). Here h is the fluid depth in conformal space, which evolves in time to maintain constant fluid depth in physical space (Li et al. 2004; Turner and Bridges 2016). Finite-depth quasi-periodic water waves will be investigated in future work.

Next we evaluate the Bernoulli equation  \(\Phi ^\text {phys}_t + \frac{1}{2}\big |\nabla \Phi ^\text {phys}\big |^2 + \frac{p}{\rho }+ gy = C_2\)  at the free surface to obtain an evolution equation for \(\varphi (\alpha ,t)\). Here \(C_2\) is an arbitrary integration constant that may depend on time but not space. The pressure at the free surface is determined by the Laplace-Young condition, \(p=p_0-\rho \tau \kappa \), where \(\kappa \) is the curvature, \(\rho \tau \) is the surface tension, and \(p_0\) is a constant that can be absorbed into \(C_2\) and set to zero. From (2.33) or (2.34), we know \(\big |\nabla \Phi ^\text {phys}\big |^2=(\varphi _\alpha ^2+\psi _\alpha ^2)/J\) on the free surface. Finally, differentiating \(\varphi (\alpha ,t)=\Phi ^\text {phys}(\xi (\alpha ,t),\eta (\alpha ,t),t)\) and using (2.34) and (2.38), we obtain

$$\begin{aligned} \varphi _t = \underbrace{\big (\Phi ^\text {phys}_x\,,\,\Phi ^\text {phys}_y\big )\begin{pmatrix} \xi _\alpha &{} -\eta _\alpha \\ \eta _\alpha &{} \xi _\alpha \end{pmatrix}}_{\displaystyle \big (\varphi _\alpha \,,\,-\psi _\alpha \big )} \begin{pmatrix} -H\left[ \psi _\alpha /J\right] + C_1\\ -\psi _\alpha /J \end{pmatrix} - \frac{\varphi _\alpha ^2+\psi _\alpha ^2}{2J} - g\eta + \tau \kappa + C_2. \end{aligned}$$
(2.42)

We choose \(C_2\) so that \(P_0[\varphi _t]=0\). In conclusion, we obtain the following governing equations for spatially quasi-periodic gravity-capillary waves in conformal space

$$\begin{aligned} \begin{gathered} \xi _\alpha = 1 + H[\eta _\alpha ], \qquad \psi = -H[\varphi ], \qquad J = \xi _\alpha ^2 + \eta _\alpha ^2, \qquad \chi = \frac{\psi _\alpha }{J}, \\ \hbox { choose } C_1, \hbox { e.g.~as in }(2.40), \qquad \hbox { compute}\, \displaystyle \frac{dx_0}{dt}\,\hbox { in } (2.39) \hbox { if necessary,} \\ \eta _t = -\eta _\alpha H[\chi ] - \xi _\alpha \chi + C_1\eta _\alpha , \qquad \kappa = \frac{\xi _\alpha \eta _{\alpha \alpha } - \eta _\alpha \xi _{\alpha \alpha }}{J^{3/2}}, \\ \varphi _t = P\bigg [\frac{\psi _\alpha ^2 - \varphi _\alpha ^2}{2J} - \varphi _\alpha H[\chi ] + C_1\varphi _\alpha - g\eta + \tau \kappa \bigg ]. \end{gathered} \end{aligned}$$
(2.43)

Note that these equations govern the evolution of \(x_0\), \(\eta \) and \(\varphi \), which determine the state of the system. The functions \(\xi \), \(\psi \), J, \(\chi \) and \(\kappa \) are determined at any moment by \(x_0\), \(\eta \) and \(\varphi \) through the auxiliary equations in (2.43). We emphasize that \(C_1\) can be chosen arbitrarily as long as \(dx_0/dt\) satisfies (2.39). The special cases (2.40 b) and (2.40 c) lead to nice formulas for \(x_0(t)\) without having to evolve (2.39) numerically. An alternative approach was proposed by Li et al. (2004), who set \(C_1=0\) (by not introducing it) and avoid writing down a differential equation for \(x_0(t)\) by instead solving both the \(\xi _t\) and \(\eta _t\) equations in (2.38).

In deriving (2.43) from (2.35) and (2.42), we had to assume \(z_t/z_\alpha \) remains bounded in the lower half-plane. Conditions that ensure the boundedness of \(1/z_\alpha \) are given in Appendix A. We note that \(z_t/z_\alpha \) is automatically bounded in the converse direction, where (2.35) and (2.42) are derived from (2.43). In more detail, when solving (2.43), \(z_t/z_\alpha \) is constructed first, before \(z_t\), as the bounded extension of the quasi-periodic function with imaginary part \((-\psi _\alpha /J)\) to the lower half-plane. Equation (2.38) then defines \(z_t\) as the product of this function by \(z_\alpha \), which is also bounded since \(\xi _\alpha =1+H[\eta _\alpha ]\). Thus, the first component of each side of (2.38) is related to the corresponding second component by the Hilbert transform, up to a constant. Since the second components are equal (i.e. the \(\eta _t\) equation holds), the \(\xi _t\) equation also holds — the constants are accounted for by (2.39). Left-multiplying (2.38) by the row vector \((-\eta _\alpha ,\xi _\alpha )\) gives the kinematic condition (2.35), as required.

Equations (2.43) break down if J becomes zero somewhere on the curve. Such a singularity would arise, for example, if the wave profile were to form a corner in finite time. To our knowledge, it remains an open question whether the free-surface Euler equations can form such a corner.

Often we wish to verify that a given curve \(\zeta (\alpha ,t)=\xi (\alpha ,t)+i\eta (\alpha ,t)\) and velocity potential \(\varphi (\alpha ,t)\) satisfy the conformal version of the water wave equations. We say that \((\zeta ,\varphi )\) satisfy (2.43) if \(\xi \) and \(\eta \) remain conformally related via (2.27), which determines \(x_0(t)\), and if \(x_0\), \(\eta \) and \(\varphi \) satisfy (2.43) with \(C_1(t)\) obtained from (2.39) using \(P_0[\xi _\alpha ]=1\). As noted above, these equations imply the kinematic condition (2.35) and Bernoulli Eq. (2.42). If necessary, one should replace the given \(\varphi (\alpha ,t)\) by \(P[\varphi (\cdot ,t)]\) before checking that (2.43) is satisfied.

Remark 2.4

Equations (2.43) can be interpreted as an evolution equation for the functions \(\tilde{\zeta }(\alpha _1,\alpha _2,t)\) and \(\tilde{\varphi }(\alpha _1,\alpha _2,t)\) on the torus \(\mathbb {T}^2\). The \(\alpha \)-derivatives are replaced by the directional derivatives \((\partial _{\alpha _1}+k\partial _{\alpha _2})\), which we still denote by a subscript \(\alpha \), e.g. \(\tilde{\eta }_\alpha = (\partial _{\alpha _1}+k\partial _{\alpha _2})\tilde{\eta }\), and, as noted in Remark 2.2 above, the Hilbert transform becomes a two-dimensional Fourier multiplier operator with symbol \((-i){\text {sgn}}(j_1+j_2k)\). The pseudo-spectral method we propose in Sect. 3 below is based on this representation. Equation (2.40 c) becomes

$$\begin{aligned} C_1 = \left[ H\left[ \frac{\tilde{\psi }_\alpha }{\tilde{J}}\right] - \frac{\tilde{\eta }_\alpha \tilde{\psi }_\alpha }{ (1+\tilde{\xi }_\alpha )\tilde{J}} \right] _{(\alpha _1,\alpha _2)=(0,0)}, \qquad \quad \tilde{\xi }(0,0,t)=0, \end{aligned}$$
(2.44)

where \(\tilde{J}=(1+\tilde{\xi }_\alpha )^2 + \tilde{\eta }_\alpha ^2\). Note that \(\xi _\alpha \) in (2.43) is replaced by

$$\begin{aligned} \widetilde{\xi _\alpha } = 1 + \tilde{\xi }_\alpha , \end{aligned}$$
(2.45)

which is the one place this notation becomes awkward. Using (2.27) and (2.29), \(\tilde{\zeta }\) is completely determined by \(x_0(t)\) and \(\tilde{\eta }\), so only these have to be evolved — the formula for \(\tilde{\xi }_t\) in (2.38) is redundant as long as (2.39) is satisfied. If both components of \(\tilde{\zeta }(\alpha _1,\alpha _2,t)\) are given, we say that \((\tilde{\zeta },\tilde{\varphi })\) satisfy the torus version of (2.43) if there is a continuously differentiable function \(x_0(t)\) such that \(\tilde{\xi }=x_0(t)+H[\tilde{\eta }]\) and if \(x_0\), \(\tilde{\eta }\) and \(\tilde{\varphi }\) satisfy the torus version of (2.43) with \(C_1=dx_0/dt + P_0\big [(1+\tilde{\xi }_\alpha )H[\tilde{\psi }_\alpha /\tilde{J}] - \tilde{\eta }_\alpha \tilde{\psi }_\alpha /\tilde{J}\big ]\). As noted in Remark 2.3, if k is irrational, one can verify that \(P_0\left[ \tilde{\xi }_\alpha H[\tilde{\psi }_\alpha /\tilde{J}] - \tilde{\eta }_\alpha \tilde{\psi }_\alpha /\tilde{J}\right] = 0\), hence \(d x_0/dt = C_1\).

We show in Appendix B that solving the torus version of (2.43) yields a three-parameter family of one-dimensional solutions of the form

$$\begin{aligned} \begin{aligned} \zeta (\alpha ,t\,;\,\theta _1,\theta _2,\delta )&= \alpha + \delta + \tilde{\zeta }( \theta _1+\alpha ,\theta _2+k\alpha ,t), \\ \varphi (\alpha ,t\,;\,\theta _1,\theta _2)&= \tilde{\varphi }( \theta _1+\alpha ,\theta _2+k\alpha ,t), \end{aligned} \qquad \left( \begin{aligned} \alpha \in \mathbb {R}, \, t\ge 0 \\ \theta _1,\theta _2,\delta \in \mathbb {R} \end{aligned}\right) . \end{aligned}$$
(2.46)

We also show that if all the waves in this family are single-valued and have no vertical tangent lines, there is a corresponding family of solutions of the Euler equations in the original graph-based formulation of (2.12.4) that are quasi-periodic in physical space. A precise statement is given in Theorem B.2 and the discussion that follows.

3 Numerical Method

In this section, we describe a pseudo-spectral time-stepping strategy for evolving water waves with spatially quasi-periodic initial conditions. The evolution equations (2.43) for \(\eta \) and \(\varphi \) are nonlinear and involve computing derivatives, antiderivatives and Hilbert transforms of quasi-periodic functions. Let f denote one of these functions (e.g. \(\eta \), \(\varphi \) or \(\chi \)) and let \(\tilde{f}\) denote the corresponding periodic function on the torus,

$$\begin{aligned} f(\alpha ) = \tilde{f}(\alpha ,k\alpha ), \qquad \tilde{f}(\alpha _1,\alpha _2) = \sum \limits _{j_1, j_2 \in \mathbb {Z}} \hat{f}_{j_1, j_2} e^{i(j_1\alpha _1+j_2k\alpha _2)}, \qquad (\alpha _1, \alpha _2)\in \mathbb {T}^2. \end{aligned}$$
(3.1)

The functions \(f_\alpha \) and \(H[f]\) then correspond to

$$\begin{aligned} \begin{gathered} \widetilde{f_\alpha } (\alpha _1, \alpha _2) = \sum \limits _{j_1, j_2\in \mathbb {Z}} i(j_1 + j_2 k) \hat{f}_{j_1, j_2} e^{i(j_1\alpha _1+j_2\alpha _2)}, \\ \widetilde{H[f]} (\alpha _1, \alpha _2) = \sum \limits _{j_1, j_2\in \mathbb {Z}} (-i)\text {sgn}(j_1 + j_2 k) \hat{f}_{j_1, j_2} e^{i(j_1\alpha _1+j_2\alpha _2)}. \end{gathered} \end{aligned}$$
(3.2)

We propose a pseudo-spectral method in which each such f that arises in the formulas (2.43) is represented by the values of \(\tilde{f}\) at \(M_1\times M_2\) equidistant gridpoints on the torus \(\mathbb {T}^2\),

$$\begin{aligned} \tilde{f}_{m_1,m_2} = \tilde{f}(2\pi m_1/M_1\,,\,2\pi m_2/M_2), \qquad \quad (0\le m_1<M_1\,,\,0\le m_2<M_2). \end{aligned}$$
(3.3)

We visualize a \(90^\circ \) rotation between the matrix \(\tilde{F}\) holding the entries \(\tilde{f}_{m_1,m_2}\) and the collocation points in the torus. The columns of the matrix correspond to horizontal slices of gridpoints while the rows of the matrix correspond to vertical slices indexed from bottom to top. The nonlinear operations in (2.43) consist of products, powers and division; they are carried out pointwise on the grid. Derivatives and the Hilbert transform are computed in Fourier space via (3.2). To plot the solution, we also need to compute an antiderivative to get \(\xi \) from \(f=\xi _\alpha \). This involves dividing \(\hat{f}_{j_1,j_2}\) by \(i(j_1 + j_2 k)\) when \((j_1,j_2)\ne (0,0)\) and adjusting the (0, 0) mode to obtain \(\xi (0,t)=0\).

Since the functions f that arise in the computation are real-valued, we use the real-to-complex (‘r2c’) version of the two-dimensional discrete Fourier transform. The ‘r2c’ transform of a one-dimensional array of length M (assumed even) is given by

$$\begin{aligned} \{g_m\}_{m=0}^{M-1} \quad \mapsto \quad \{\hat{g}_j\}_{j=0}^{M/2} \quad , \quad \hat{g}_j = \frac{1}{M}\sum _{m=0}^{M-1} g_m e^{-2\pi ijm/M}. \end{aligned}$$
(3.4)

In practice, the \(\hat{g}_j\) are computed simultaneously in \(O(M\log M)\) time rather than by this formula. The fully complex (‘c2c’) transform of this (real) data would give additional values \(\hat{g}_j\) with \(M/2+1\le j\le M-1\). These extra entries are actually aliased values of negative-index modes; they are redundant due to \(\hat{g}_j=\hat{g}_{j-M} = \overline{\hat{g}_{M-j}}\). Since the imaginary components of \(\hat{g}_0\) and \(\hat{g}_{M/2}\) are zero, the number of real degrees of freedom on both sides of (3.4) is M. The Nyquist mode \(\hat{g}_{M/2}\) requires special attention. Setting \(\hat{g}_{M/2}=1\) and the other modes to zero yields \(g_m=\cos (\pi m) =(-1)^m\). The derivative and Hilbert transform of this mode are taken to be zero since they would involve evaluating \(\sin (M\alpha /2)\) at the gridpoints \(\alpha _m=2\pi m/M\).

The two-dimensional ‘r2c’ transform can be computed by applying one-dimensional ‘r2c’ transforms in the x-direction (i.e. to the columns of \(\tilde{F}\)) followed by one-dimensional ‘c2c’ transforms in the y-direction (i.e. to the rows of \(\tilde{F}\)):

$$\begin{aligned} \hat{f}_{j_1,j_2}&= \frac{1}{M_2}\sum _{m_2=0}^{M_2-1}\left( \frac{1}{M_1}\sum _{m_1=0}^{M_1-1} \tilde{f}_{m_1,m_2} e^{-2\pi ij_1m_1/M_1}\right) e^{-2\pi ij_2m_2/M_2},\left( \begin{array}{c} 0\le j_1\le M_1/2 \\ -M_2/2< j_2\le M_2/2 \end{array}\right) .\nonumber \\ \end{aligned}$$
(3.5)

The ‘r2c’ routine in the FFTW library actually returns the index range \(0\le j_2<M_2\), but we use \(\hat{f}_{j_1,j_2-M_2}=\hat{f}_{j_1,j_2}\) to de-alias the Fourier modes and map the indices \(j_2>M_2/2\) to their correct negative values. The missing entries with \(-M_1/2<j_1<0\) are determined implicitly by

$$\begin{aligned} \hat{f}_{-j_1,-j_2}=\overline{\hat{f}_{j_1,j_2}}. \end{aligned}$$
(3.6)

This imposes additional constrains on the computed Fourier modes, namely

$$\begin{aligned} \begin{array}{c} {\text {Im}}\{\hat{f}_{0,0}\}=0,\quad {\text {Im}}\{\hat{f}_{M_1/2,0}\}=0,\quad {\text {Im}}\{\hat{f}_{0,M_2/2}\}=0,\quad {\text {Im}}\{\hat{f}_{M_1/2,M_2/2}\}=0, \\ \hat{f}_{0,-j_2}=\overline{\hat{f}_{0,j_2}}, \qquad \hat{f}_{M_1/2,-j_2}=\overline{\hat{f}_{M_1/2,j_2}}, \qquad (1\le j_2\le M_2/2-1), \end{array} \end{aligned}$$
(3.7)

where we also used \(\hat{f}_{-M_1/2,j_2}=\hat{f}_{M_1/2,j_2}\). This reduces the number of real degrees of freedom in the complex \((M_1/2+1)\times M_2\) array of Fourier modes to \(M_1M_2\). When computing \(f_\alpha \) and \(H[f]\) via (3.2), the Nyquist modes with \(j_1=M_1/2\) or \(j_2=M_2/2\) are set to zero. Otherwise the formulas (3.2) respect the constraints (3.7) and the ‘c2r’ transform reconstructs real-valued functions \(\widetilde{f_\alpha }\) and \(\widetilde{H[f]}\) from their Fourier modes.

The evolution Eq. (2.43) are not stiff when the surface tension parameter is small or vanishes, but become moderately stiff for larger values of \(\tau \). We find that the 5th and 8th order explicit Runge-Kutta methods of Dormand and Prince (Hairer et al. , 2000) work well for smaller values of \(\tau \), and exponential time-differencing (ETD) methods (Cox and Matthews , 2002; Kassam and Trefethen , 2005; Berland et al. , 2005; Whalen et al. , 2015; Chen and Wilkening , 2021) work well generally. This will be demonstrated in Sects. 4.1 and 4.2 below. In the ETD framework, we follow the basic idea of the small-scale decomposition for removing stiffness from interfacial flows (Hou et al. 1994, 2001) and write the evolution Eq. (2.43) in the form

$$\begin{aligned} \begin{pmatrix} \eta _t \\ \varphi _t \end{pmatrix} = L\begin{pmatrix} \eta \\ \varphi \end{pmatrix} + \mathcal {N}, \qquad L = \begin{pmatrix} 0 &{} H\partial _\alpha \\ -(gP-\tau \partial _{\alpha \alpha }) &{} 0 \end{pmatrix}, \end{aligned}$$
(3.8)

where \(P\) is the projection in (2.10), \(H\) is the Hilbert transform in (2.14), and

$$\begin{aligned} \mathcal {N} = \begin{pmatrix} -\eta _\alpha H[\chi ] - \big (\xi _\alpha \chi - \psi _\alpha \big ) + C_1\eta _\alpha \\ P\left[ \frac{\psi _\alpha ^2-\varphi _\alpha ^2}{2J} - \varphi _\alpha H[\chi ] + C_1\varphi _\alpha + \tau (\kappa - \eta _{\alpha \alpha })\right] \end{pmatrix}. \end{aligned}$$
(3.9)

Note that \(\mathcal {N}\) is obtained by subtracting the terms included in L from (2.43). In particular, \(\psi _\alpha \) in (3.9) is \(-H\partial _\alpha \varphi \) from (3.8). The eigenvalues of  L  are  \(\pm i\sqrt{|j_1+j_2k|\big (g+\tau (j_1+j_2k)^2\big )}\), so the leading source of stiffness is dispersive. This 3/2 power growth rate of the eigenvalues of the leading dispersive term with respect to wave number is typical of interfacial fluid flows with surface tension (Hou et al. 1994, 2001). For stiffer problems such as the Benjamin-Ono and KdV equations, the growth rate is faster (quadratic and cubic, respectively) and it becomes essential to use a semi-implicit or exponential time-differencing scheme to avoid severe time-stepping restrictions. Here it is less critical, but still useful. Further details on how to implement (3.8) and (3.9) in the ETD framework are given in Appendix C.

In both the explicit Runge-Kutta and ETD methods, as explained above, the functions evolved in time are \(\tilde{\eta }(\alpha _1,\alpha _2,t)\) and \(\tilde{\varphi }(\alpha _1,\alpha _2,t)\), sampled on the uniform \(M_1\times M_2\) grid covering \(\mathbb {T}^2\). At the end of each time step, we apply a 36th order filter (Hou and Li 2007; Hou et al. 1994) with Fourier multiplier

$$\begin{aligned} \rho (j_1,j_2) = \left\{ \begin{array}{cc} 0 &{} j_1=M_1/2 \text {\, or\, } |j_2|=M_2/2, \\ \exp \big (\!-36\big [(2j_1/M_1)^{36}+ (2j_2/M_2)^{36}\big ]\big ) &{} \text {otherwise.} \end{array}\right. \end{aligned}$$
(3.10)

In all the computations reported below, we used the same number of gridpoints in the \(\alpha _1\) and \(\alpha _2\)-directions, \(M_1=M_2=M\). It is easy to check a-posteriori that the Fourier modes decay sufficiently (e.g. to machine precision) by the time the filter deviates appreciably from 1. If they do not, the calculation can be repeated with a larger value of M. This will be demonstrated in Sect. 4.2 below.

4 Numerical Results

In this section, we compute spatially quasi-periodic solutions of the initial value problem (2.43) with \(k = 1/\sqrt{2}\) and g normalized to 1. First we validate the traveling wave computations of Wilkening and Zhao (2021) and compare the accuracy and efficiency of the ERK and ETD schemes in a convergence study. We then consider more complex dynamics in which some of the wave peaks overturn.

4.1 Traveling Waves

Figure 1 shows the time evolution of a traveling wave computed at \(t=0\) by the algorithm of Wilkening and Zhao (2021) with amplitude parameters \(\hat{\eta }_{1,0}=0.01\) and \(\hat{\eta }_{0,1}=0.01\) and evolved to \(t=T\) using the methods of Sect. 3, where \(T=3\). It also shows the error at the final time T for various choices of time-stepping scheme and number of time steps. In all the computations of the figure, the torus functions \(\tilde{\eta }(\alpha _1,\alpha _2,t)\) and \(\tilde{\varphi }(\alpha _1,\alpha _2,t)\) are evolved on an \(M\times M\) mesh with \(M=60\) gridpoints in each direction. Panel (a) shows snapshots of the solution in the lab frame at 30 equal time intervals of size \(T/30=0.1\). Here we plotted every 30th step of the 5th order, 6 stage explicit Runge-Kutta method of Dormand and Prince (Hairer et al. 2000), so the Runge-Kutta stepsize was \(\Delta t=0.1/30\). The initial condition is plotted with a thick blue line, and the wave travels right at constant speed \(c=1.552197\) in physical space. The solution is plotted over the representative interval \(0\le x\le 12\pi \), though it extends in both directions to \(\pm \infty \) without exactly repeating.

Fig. 1
figure 1

Time evolution of a quasi-periodic traveling water wave computed in Wilkening and Zhao (2021) and a convergence plot comparing the accuracy and efficiency of the proposed time-stepping schemes

Panel (b) shows the error in time-stepping this traveling wave solution from \(t=0\) to \(t=3\) using the 5th and 8th order explicit Runge-Kutta methods of Dormand and Prince (Hairer et al. 2000), the 4th order ETD scheme of Cox and Matthews (2002), and the 5th order ETD scheme of Whalen et al. (2015). These errors compare the numerical solution from time-stepping the initial condition to the exact formula of how a quasi-periodic traveling wave should evolve under (2.43) and (2.44), which is worked out in Wilkening and Zhao (2021). If the initial wave profile has the torus representation \(\tilde{\eta }_0(\alpha _1,\alpha _2)\), we define \(\tilde{\xi }_0=H[\tilde{\eta }_0]\) and \(\tilde{\varphi }_0=c\tilde{\xi }_0\). By construction, \(\tilde{\eta }_0\) is an even function of \(\varvec{\alpha }=(\alpha _1,\alpha _2)\), so \(\tilde{\xi }_0\) and \(\tilde{\varphi }_0\) are odd. The exact traveling solution is then

$$\begin{aligned} \begin{aligned} \tilde{\eta }_\text {exact}(\varvec{\alpha },t)&= \tilde{\eta }_0\big (\varvec{\alpha }-\varvec{k}\alpha _0(t)\big ), \\ \tilde{\varphi }_\text {exact}(\varvec{\alpha },t)&= \tilde{\varphi }_0\big (\varvec{\alpha }-\varvec{k}\alpha _0(t)\big ), \end{aligned} \end{aligned}$$
(4.1)

where \(\varvec{k}=(1,k)\), \(\alpha _0(t)=ct - \mathcal {A}(-\varvec{k}ct,0)\) and \(\mathcal {A}(\varvec{x},t)\) is a periodic function on \(\mathbb {T}^2\) defined implicitly by (B.7) below. To derive (4.1), one makes use of the change of variables formula (B.8) from physical space, where the wave speed is constant, to conformal space; see Wilkening and Zhao (2021). Note that the waves in (4.1) do not change shape as they move through the torus in the direction \(\varvec{k}\), but the traveling speed \(\alpha _0'(t)\) in conformal space varies in time in order to maintain \(\tilde{\xi }(0,0,t)=0\) via (2.44). The errorssfig

plotted in panel (b) is the discrete norm at the final time computed, \(T=3\):

$$\begin{aligned} \text {err}= & {} \sqrt{\Vert \tilde{\eta }-\tilde{\eta }_{\text {exact}}\Vert ^2 + \Vert \tilde{\varphi }-\tilde{\varphi }_{\text {exact}}\Vert ^2},\nonumber \\ \Vert \tilde{\eta }\Vert ^2= & {} \frac{1}{M_1M_2}\sum _{m_1,m_2} \tilde{\eta }\left( \frac{2\pi m_1}{M_1},\frac{2\pi m_2}{M_2},T\right) ^2. \end{aligned}$$

The surface tension in this example (\(\tau =1.410902\)) is high enough that once the stepsize is sufficiently small for the Runge-Kutta methods to be stable, roundoff error dominates truncation error. So the errors suddenly drop from very large values (\(10^{20}\) or more) to machine precision. By contrast, the error in the ETD methods decreases steadily as the stepsize is reduced, indicating that the small-scale decomposition introduced in (3.8) is successful in removing stiffness from the equations of motion (Hou et al. 1994, 2001).

A contour plot of \(\tilde{\eta }(\alpha _1,\alpha _2,T)\) at \(t=T=3\) is shown in panel (c) of Fig. 1. The dashed line shows the trajectory from \(t=0\) to \(t=3\) of the wave crest that begins at (0, 0) and continues along the path \(\alpha _1=\alpha _0(t),\) \(\alpha _2=k\alpha _0(t)\). We use Newton’s method to solve the implicit equation (B.7) for \(\mathcal {A}(\varvec{x},0)\) at each point of the pseudo-spectral grid. We then use FFTW to compute the 2D Fourier representation of \(\mathcal {A}(\varvec{x},0)\), which can then be used to quickly evaluate the function at any point. We find that the Fourier modes of \(\mathcal {A}(\varvec{x},0)\) decay to machine precision on the \(M\times M\) grid with \(M=60\), corroborating the assertion in Theorem B.2 below that \(\mathcal {A}(x_1,x_2,t)\) is real analytic in \(x_1\) and \(x_2\).

4.2 Overturning Waves

Next we present a spatially quasi-periodic water wave computation in which some of the wave peaks overturn as they evolve while others do not. Conformal mapping methods have been used previously to compute overturning waves. For example, Dyachenko and Newell (2016) use this approach to study whitecapping in the ocean and Wang et al. (2013) use it to compute solitary and periodic overturning traveling flexural-gravity waves. The novelty of our work is the computation of a spatially quasi-periodic water wave in which every wave peak evolves differently, and only some of them overturn. Since torus functions are involved, the number of degrees of freedom is squared, leading to a large-scale computation. For simplicity, we set the surface tension parameter, \(\tau \), to zero.

We first seek spatially periodic dynamics in which the initial wave profile has a vertical tangent line that overturns when evolved forward in time and flattens out when evolved backward in time. Through trial and error, we selected the following parametric curves for the initial wave profile and velocity potential of this auxiliary periodic problem:

$$\begin{aligned} \xi _1(\sigma ) = \sigma +\frac{3}{5}\sin \sigma - \frac{1}{5}\sin 2\sigma , \qquad \begin{aligned} \eta _1(\sigma )&= -(1/2)\cos (\sigma +\pi /2.5), \\ \varphi _1(\sigma )&= -(1/2)\cos (\sigma +\pi /4). \end{aligned} \end{aligned}$$
(4.2)

Note that \(\xi _1'(\sigma )=0\) when \(\sigma \in \pi +2\pi \mathbb {Z}\), and otherwise \(\xi _1'(\sigma )>0\). Thus, vertical tangent lines occur where \(\xi _1(\sigma )\in \pi +2\pi \mathbb {Z}\) and \(\eta _1(\sigma )=-0.5\cos (1.4\pi )=0.154508\); see Fig. 2.

To convert (4.2) to a conformal parametrization, we search for \(2\pi \)-periodic functions \(\eta _2(\alpha )\) and \(B_2(\alpha )\) and a number \(x_2\) such that

$$\begin{aligned} \alpha +x_2+H\left[ \eta _2\right] (\alpha ) = \xi _1(\alpha +B_2(\alpha )), \qquad \eta _2(\alpha ) = \eta _1(\alpha +B_2(\alpha )), \qquad B_2(0)=0. \end{aligned}$$
(4.3)

First we solve a simpler variant in which \(x_2\) is absent and \(B_2(0)\) is unspecified. Specifically, we solve \(\alpha +H\left[ \eta _3\right] (\alpha ) = \xi _1(\alpha +B_3(\alpha ))\), \(\eta _3(\alpha ) = \eta _1(\alpha +B_3(\alpha ))\) for \(\eta _3(\alpha )\) and \(B_3(\alpha )\) on a uniform grid with \(M=4096\) gridpoints on \([0,2\pi )\) using Newton’s method. The Hilbert transform is computed with spectral accuracy in Fourier space. We then define \(x_2\) as the solution of \(x_2+B_3(x_2)=0\) that is smallest in magnitude. We solve this equation by a combination of root bracketing and Newton’s method; the result is \(x_2=0.393458\). Finally, we define \(B_2(\alpha )=x_2+B_3(\alpha +x_2)\) and \(\eta _2(\alpha )=\eta _3(\alpha +x_2)\), which satisfy (4.3).

Fig. 2
figure 2

Time evolution of a spatially periodic water wave initialized via (4.2) and evolved forward and backward in time to \(t=\pm 0.45\). Panels (a) and (b) show snapshots of the wave in physical space; panel (c) shows snapshots of \(\eta (\alpha ,t)\) in conformal space; and panel (d) shows snapshots of \(|\hat{\eta }_j(t)|\) in Fourier space. The initial condition (\(t=0\)) is shown in blue in each plot

As shown in Figure 2, the initial conditions \(\eta _2(\alpha )\) and

$$\begin{aligned} \varphi _2(\alpha )=\varphi _1(\alpha +B_2(\alpha )) \end{aligned}$$
(4.4)

have the desired property that the wave overturns when evolved forward in time and flattens out when evolved backward in time. In other words, the wave becomes less steep in the neighborhood of the initial vertical tangent line when time is reversed. However, it does not evolve backward to a flat state. Instead, a secondary wave crest forms to the right of the initial wave crest and grows in amplitude as t decreases. This secondary wave crest resembles the early stages of the fluid jets that were observed by Aurther et al. (2019) to form in the wave troughs when the initial condition \(\eta _0(x)=\big (\frac{1}{3}\sin x+\frac{1}{6}\sin 2x+\frac{1}{3}\sin 3x)\) is evolved from rest in the graph-based formulation (2.1).

The blue markers in panels (a) and (b) of Fig. 2 show the location of the vertical tangent line in physical space at \(t=0\). The blue marker in panel (c) shows the corresponding point in conformal space. When the wave overturns for \(t>0\) in physical space, it is because \(\alpha \mapsto \xi (\alpha ,t)\) no longer increases monotonically. Indeed, we see in panel (c) that \(\eta (\alpha ,t)\) remains single-valued as a function of the conformal variable \(\alpha \) but becomes very steep. This causes the Fourier mode amplitudes in panel (d) to decay more slowly as t increases. We used different mesh sizes and timesteps in the regions \(0\le t\le 0.3\), \(0.3\le t\le 0.45\) and \(0\ge t\ge -0.45\) to maintain spectral accuracy; details are given below when discussing the quasi-periodic calculation. The drop-off in \(|\hat{\eta }_j|\) from \(10^{-14}\) to \(10^{-18}\) as j approaches the Nyquist frequency M/2 is due to the 1D version of the filter (3.10), which is applied after each timestep. Floating point errors of size \(10^{-14}\) occur in the discretization of the equations of motion while errors of size \(10^{-18}\) are due to having computed the inverse FFT of the filtered data to get back to real space before taking the FFT again to plot the Fourier data.

We turn the solution of this auxiliary periodic problem into a spatially quasi-periodic solution by defining initial conditions on the torus of the form

$$\begin{aligned} \tilde{\eta }_0(\alpha _1,\alpha _2) = \eta _2(\alpha _1), \qquad \tilde{\varphi }_0(\alpha _1,\alpha _2) = \varphi _2(\alpha _1)\cos (\alpha _2-q), \end{aligned}$$
(4.5)

where q is a free parameter that we choose heuristically to be \(q=0.6k\pi =1.3329\) in order to make the first wave crest to the right of the origin behave similarly to the periodic 1D solution of Fig. 2. (This will be explained below).

Fig. 3
figure 3

Snapshots in time of a spatially quasi-periodic water wave with a periodic initial wave profile with vertical tangent lines at \(\xi =\pi +2\pi n\), \(n\in \mathbb {Z}\). A quasi-periodic initial velocity potential causes some of the peaks to overturn for \(t>0\) while others do not. Panels (a) and (f) show \(\eta (\alpha ,t)\) and \(\varphi (\alpha ,t)\) versus \(\xi (\alpha ,t)\) over \(0\le x\le 16\pi \) and \(0\le t\le T=0.225\). Panels (be) show the results of panel (a) in more detail. The blue arrows show the direction of travel of the wave at various locations

Fig. 4
figure 4

Panels (a-d) show surface and contour plots of the torus version of the solution plotted in Fig. 3 at the final time \(T=0.225\). b The rapid dropoff in \(\tilde{\eta }(\alpha _1,\alpha _2,t)\) over the window \(0.6\pi \le \alpha _1\le 0.667\pi \) persists from the initial state in which \(\tilde{\eta }_0(\alpha _1,\alpha _2)\) does not depend on \(\alpha _2\). Panel (e) shows the exponential decay of Fourier modes with respect to the shell index s at different times

The results of the quasi-periodic calculation are summarized in Figs. 3 and 4. Panel (a) of Fig. 3 shows snapshots of the solution at \(t=(\ell /6)T\) for \(0\le \ell \le 6\) over the range \(0\le \xi (\alpha )\le 16\pi \), where \(T=0.225\). The initial wave profile, \(\zeta _0(\alpha )=\xi _0(\alpha )+i\eta _0(\alpha )\) with \(\eta _0(\alpha )=\tilde{\eta }_0(\alpha ,k\alpha )\), is plotted with a thick blue line. The wave profile is plotted with a thick black line at \(t=T\) and with thin grey lines at intermediate times. Panel (b) zooms in on the first wave in panel (a), which overturns as the wave crest moves up and right while the wave trough moves down and left, as indicated by the blue arrows. This is very similar (by design) to the forward evolution of the auxiliary periodic wave of Fig. 2, with initial conditions \(\eta _2(\alpha )\), \(\varphi _2(\alpha )\). Panels (c) and (d) zoom in on two other wave crests from panel (a) that flatten out (rather than overturn) as t advances from 0 to T. Panel (e) shows another type of behavior in which the wave overturns due to the wave trough moving down and left faster than the wave crest moves down and left. Panel (f) shows the evolution of the velocity potential \(\varphi (\alpha ,t)\) over \(0\le t\le T\). Unlike \(\eta _0(\alpha )\), the initial velocity potential \(\varphi _0(\alpha )=\tilde{\varphi }_0(\alpha ,k\alpha )\) is not \(2\pi \)-periodic due to the factor of \(\cos (\alpha _2-q)\) in (4.5).

Panels (a) and (d) of Fig. 4 show surface plots of \(\tilde{\eta }(\alpha _1,\alpha _2,T)\) and \(\tilde{\varphi }(\alpha _1,\alpha _2,T)\) at the final time computed, \(T=0.225\). The corresponding contour plots are shown in panels (b) and (c). Initially, \(\tilde{\eta }(\alpha _1,\alpha _2,0)\) depends only on \(\alpha _1\); however, by \(t=T\), the dependence on \(\alpha _2\) is clearly visible. Although the waves overturn in some places when \(\eta (\alpha ,t)= \tilde{\eta }(\alpha ,k\alpha ,t)\) is plotted parametrically versus \(\xi (\alpha ,t)\) with \(t>0\) held fixed, both \(\tilde{\eta }\) and \(\tilde{\varphi }\) are single-valued functions of \(\alpha _1\) and \(\alpha _2\) at all times. Nevertheless, throughout the evolution, \(\tilde{\eta }(\alpha _1,\alpha _2,t)\) has a steep dropoff over a narrow range of values of \(\alpha _1\). Initially, \(\tilde{\eta }_0(\alpha _1,\alpha _2)= \eta _2(\alpha _1) = \eta _1(\alpha _1+B_2(\alpha _1))\) and the rapid dropoff occurs for \(\alpha _1\) near the solution of \(\alpha _1+B_2(\alpha _1)=\pi \) (since the vertical tangent line occurs at \(\xi _1(\sigma )+i\eta _1(\sigma )\) with \(\sigma =\pi \)). Using Newton’s method, we find that this occurs at \(\alpha _1=0.634185\pi \). The blue curve in panel (c) of Fig. 2 gives \(\eta _2(\alpha )\). If one zooms in on this plot, one finds that \(\eta _2(\alpha )\) decreases rapidly by more than half its crest-to-trough height over the narrow range \(0.6\pi \le \alpha \le 0.667\pi \). At later times, \(\tilde{\eta }(\alpha _1,\alpha _2,t)\) continues to drop off rapidly when \(\alpha _1\) traverses this narrow range in spite of the dependence on \(\alpha _2\). This can be seen in panel (b) of Fig. 4, where there is a high clustering of nearly vertical contour lines separating the yellow-orange region from the blue region. Over this narrow window, \(\tilde{\varphi }(\alpha _1,\alpha _2,t)\) also varies rapidly with respect to \(\alpha _1\).

Many gridpoints are needed to resolve these rapid variations with spectral accuracy. Although \(\xi _1(\sigma )\), \(\eta _1(\sigma )\) and \(\varphi _1(\sigma )\) involve only a few nonzero Fourier modes, conformal reparametrization via (4.3) vastly increases the Fourier content of the initial condition. We used \(M=6144\) gridpoints to evolve the periodic auxiliary problem of Fig. 2 from \(t=0\) to \(t=0.3\) using the 8th order Runge-Kutta method of Dormand and Prince (Hairer et al. 2000) with stepsize \(\Delta t=2.08333\times 10^{-5}\). We then switched to \(M=12288\) gridpoints to evolve from \(t=0.3\) to \(t=0.45\) with \(\Delta t=7.5\times 10^{-6}\). In the reverse direction, we used \(M=4096\) gridpoints to evolve from \(t=0\) to \(t=-0.45\) with \(\Delta t=-4.6875\times 10^{-5}\). Studying the Fourier modes in panel (d) of Fig. 2, it appears that 4096 gridpoints (2048 modes) are sufficient to maintain double-precision accuracy forward or backward in time to \(t=\pm 0.225\). Using this as a guideline for the quasi-periodic calculation, we evolved (2.43) on a \(4096\times 4096\) spatial grid using the 8th order explicit Runge-Kutta method described in Sect. 3. The calculation involved 5400 time steps from \(t=0\) to \(t=T=0.225\), which took 2.5 days on 12 threads running on a server with two 3.0 GHz Intel Xeon Gold 6136 processors. Additional threads had little effect on the running time as the FFT calculations require a lot of data movement relative to the number of floating point operations involved.

Panel (e) of Fig. 4 shows the \(\ell ^2\) average of the Fourier mode amplitudes \(|\hat{\eta }_{j_1,j_2}|\) in each shell of indices satisfying \(\max (|j_1|,|j_2|)=s\) for \(1\le s\le 2048\). Since \(\hat{\eta }_{-j_1,-j_2}=\overline{\hat{\eta }_{j_1,j_2}}\), we can discard half the modes and sweep through the lattice along straight lines from (0, s) to (ss) to \((s,-s)\) to \((1,-s)\), which sweeps out 4s index pairs. (The same ordering is used to enumerate the unknowns in the nonlinear least squares method proposed in Wilkening and Zhao (2021) to compute quasi-periodic traveling water waves.) We see in panel (e) that as time increases, the modes continue to decay at an exponential rate with respect to s, but the decay rate is slower at later times. The rapid dropoff in the mode amplitudes for \(s\ge 1536\) is due to the Fourier filter. At the final time \(t=T=0.225\), the modes still decay by 12 orders of magnitude from \(s=1\) to \(s=1536\), so we believe the solution is correct to 10–12 digits. A finer grid would be required to maintain this accuracy over longer times. As in Fig. 2, the additional drop-off in the amplitude of Fourier modes from \(s=1536\) to \(s=2048\) in panel (e) is due applying the filter (3.10) to the solution after every timestep.

Beyond monitoring the decay of Fourier modes, as an additional check of accuracy, we compute the average energy, mass and momentum of the solution of Fig. 4 as a function of time. The results are shown in Table 1. The formulas for E, M and \(P_x\) are

$$\begin{aligned} \begin{aligned} E&= \frac{1}{(2\pi )^2}\int _{\mathbb {T}^2} \bigg [\,\frac{1}{2} \tilde{\psi } \tilde{\varphi }_\alpha + \frac{1}{2} g\tilde{\eta }^2\big (1+ \tilde{\xi }_\alpha \big ) + \tau \left( \sqrt{\big (1+ \tilde{\xi }_\alpha \big )^2 + \big (\tilde{\eta }_\alpha \big )^2} - 1\right) \!\bigg ]\,d\alpha _1\,d\alpha _2, \\[8pt] M&= \frac{1}{(2\pi )^2}\int _{\mathbb {T}^2} \tilde{\eta }\big (1+\tilde{\xi }_\alpha \big )\,d\alpha _1\,d\alpha _2, \qquad P_x = \frac{1}{(2\pi )^2}\int _{\mathbb {T}^2} - \tilde{\varphi }\tilde{\eta }_\alpha \, d\alpha _1\,d\alpha _2, \end{aligned} \end{aligned}$$
(4.6)

which may be shown to be conserved quantites under the free-surface Euler equations following the derivations in Zakharov et al. (2002); Dyachenko et al. (2019). The only changes required for the quasi-periodic case are that derivatives and the Hilbert transform are replaced by their torus versions, and the integrals over \(\mathbb {R}\) or \(\mathbb {T}\) are replaced by integrals over \(\mathbb {T}^2\). We also divide by \((2\pi )^2\) to obtain average values over the torus. This scaling has the advantage that E, M and \(P_x\) do not suddenly jump by a factor of \(2\pi \) when periodic functions are viewed as quasi-periodic functions that depend on \(\alpha _1\) only. The equations of motion are Hamiltonian (Zakharov 1968; Dyachenko et al. 2019) whether or not the energy is scaled by \(1/(2\pi )^2\) — one just has to multiply the symplectic 2-form (Abraham et al. , 1988) by the same factor.

The numerical results in Table 1 show that energy is conserved to a relative error of \(1.5\times 10^{-13}/0.0975=1.5\times 10^{-12}\); mass is conserved to a relative error of \(3.3\times 10^{-13}/0.0464=7.1\times 10^{-12}\); and momentum is conserved to an absolute error of \(4.6\times 10^{-15}\) over the course of the numerical computation of Fig. 4. This gives further evidence that \(\tilde{\eta }\) and \(\tilde{\varphi }\) are accurate to 10–12 digits. The mass being negative is an artifact of the choice of \(\xi _1(\sigma )\) and \(\eta _1(\sigma )\) in (4.2). While \(\eta _1(\sigma )\) has zero mean as a function of \(\sigma \), its average value with respect to x is \((2\pi )^{-1}\int _0^{2\pi }\eta _1(\sigma )\xi _1'(\sigma )\,d\sigma =-(3\pi /40)(\sqrt{5}-1)=-0.04635254915624\). If we had added a constant to \(\tilde{\eta }\) to make M zero initially, it would have remained zero up numerical errors, similar to \(P_x\), which is initially zero since \(\tilde{\eta }\) and \(\tilde{\varphi }\) in (4.5) are independent of \(\alpha _2\) except for the factor of \(\cos (\alpha _2-q)\). The constant value of the energy would also change if a constant were added to \(\tilde{\eta }\).

Table 1 Average energy, mass and momentum of the overturning wave example of Fig. 4 at the times indicated

The rationale for setting \(q=0.6k\pi \) in (4.5) is that \(\cos (\alpha _2-q)\approx 1\) where the characteristic line \((\alpha ,k\alpha )\) crosses the dropoff in the torus near \(\alpha _1=0.6\pi \) for the first time. Locally, \(\varphi _0(\alpha )=\tilde{\varphi }_0(\alpha ,k\alpha )\) is close to \(\varphi _2(\alpha )\), the initial condition of the auxiliary periodic problem, so we expect the quasi-periodic wave to evolve similarly to the periodic wave near \(x=\pi \) for a short time. (Here \(z=x+iy\) describes physical space). This is indeed what happens, which may be seen by comparing panel (b) of Fig. 2 to panel (b) of Fig. 3, keeping in mind that \(t\in [-0.45,0.45]\) in the former plot and \(t\in [0,0.225]\) in the latter plot. Advancing \(\alpha \) from \(0.6\pi \) to \(10.6\pi \) causes the characteristic line \((\alpha ,k\alpha )\) to cross a periodic image of the dropoff at \(\alpha _2=10.6k\pi \), where \(\cos (\alpha _2-q)=-0.9752\approx -1\). Locally, \(\varphi _0(\alpha )\) is close to \(-\varphi _2(\alpha )\), the initial condition of the time-reversed auxiliary periodic problem. Thus, we expect the quasi-periodic wave to evolve similarly to the time-reversed periodic wave near \(x=11\pi \). (Recall that \(\xi _0(0.634185\pi )=\pi \), so \(\xi _0(10.634185\pi )=11\pi \)). Comparing panel (b) of Fig. 2 to panel (d) of Fig. 3 confirms that this does indeed happen. At most wave peaks, the velocity potential of the quasi-periodic solution is not closely related to that of the periodic auxiliary problem since the cosine factor is not near a relative maximum or minimum, where it is flat. As a result, the wave peaks of the quasi-periodic solution evolve in many different ways as \(\alpha \) varies over the real line.

5 Conclusion

In this work, we have formulated the two-dimensional, infinite depth gravity-capillary water wave problem in a spatially quasi-periodic, conformal mapping framework. We developed two time-stepping strategies for solving the quasi-periodic initial value problem, an explicit Runge-Kutta method and an exponential time differencing scheme. We numerically verified a result in Wilkening and Zhao (2021) that quasi-periodic traveling waves evolve in time on the torus \(\mathbb {T}^2\) in the direction (1, k) without changing form, though their speed is non-uniform in conformal space if the condition \(\tilde{\xi }(0,0,t)=0\) is imposed via (2.44). We then performed a convergence study to demonstrate the effectiveness of the small-scale decomposition at removing stiffness from the evolution equations when the surface tension is large. Finally, we presented the results of a large-scale computation of a spatially quasi-periodic overturning water wave for which the wave peaks exhibit a wide array of dynamic behavior.

In the appendices, we establish minimal conditions to ensure that a quasi-periodic analytic function z(w) maps the lower half-plane topologically onto a region bounded above by a curve, and that \(1/|z_w|\) is bounded. We also show that if all the solutions in the family are single-valued and have no vertical tangent lines, the corresponding solutions of the original graph-based formulation (2.12.4) of the Euler equations are quasi-periodic in physical space. This analysis includes a change of variables formula from conformal space to physical space, which to our knowledge is also new in the periodic setting. We then provide details on implementing the exponential time-differencing scheme and discuss generalizations to quasi-periodic water waves at the surface of a 3D fluid, where conformal mapping methods are no longer applicable.

We believe that spatial quasi-periodicity is a natural setting to study the dynamics of linear and nonlinear waves, and has largely been overlooked as a possible third option to the usual modeling assumption that the solution either evolves on a periodic domain or decays at infinity. In the future, we plan to develop numerical methods to compute temporally quasi-periodic water waves with \(n=3\) quasi-periods and to study subharmonic instabilities (Longuet-Higgins 1978; MacKay and Saffman 1986; Mercer and Roberts 1992; Deconinck and Oliveras 2011; Trichtchenko et al. 2016) of periodic traveling waves and standing waves as well as the long-time dynamics of spatially quasi-periodic perturbations.