1 Introduction

We consider two-dimensional stationary water waves on two layers of different vortices. ‘Stationary’ implies that the wave profile is of constant shape and the propagation speed is a constant, if it is viewed in a frame of coordinates moving in the same traveling speed as the wave. Viscosity and compressibility are neglected throughout this paper. Let \(\psi \) denote the stream function in the moving frame. The following description is based on [14] with some modification. If the coordinates (xy) are taken in the moving wave, the motion is described by the following differential equations and the boundary conditions:

$$\begin{aligned} - \triangle \psi&= F \qquad&(-d< y< h(x), - L/2< x < L/2), \\ \frac{1}{2} | \nabla \psi |^2 + g(y+d)&- \sigma \frac{h_{xx}}{(1 + h_x^2)^{3/2}} = Q \qquad&(y = h(x)), \\ \psi&= 0 \qquad&(y = h(x)), \\ \psi&= p_0 \qquad&(y = -d). \end{aligned}$$

Here the subscript x implies differentiation in x, g is the gravity acceleration, Q is an unknown constant and \(p_0\) is a prescribed constant. \(\sigma \ge 0\) is the surface tension, which we shall assume to be a constant. The bottom is assumed to be a straight line, which is denoted by \( y = -d\). The surface elevation h(x) is assumed to be periodic with a period, say, L. Accordingly all functions are assumed to be L-periodic in x. See Fig. 1 (left).

Fig. 1
figure 1

Descriptions on the parameters

F denotes the vorticity, which is, in the present context, a function of \(\psi \). Our standing assumption is that F takes two distinct constants and no other values. Specifically we assume that F takes the following form:

$$\begin{aligned} F(\psi ) = \left\{ \begin{array}{ll} \gamma _1 &{}\quad \text{ for } \;\; p_1< \psi< p_0,\\ \gamma _2 &{}\quad \text{ for } \;\; 0< \psi < p_1, \end{array} \right. \end{aligned}$$

where \(p_1\) is another prescribed constant such that \( 0< p_1 < p_0\); \(\gamma _1\) and \(\gamma _2\) are prescribed constants which may take any real numbers. Note that \(\psi = p_0\) represents the bottom \(y = -d\), while \(\psi =0\) represents the free surface. The curve defined by \( \psi = p_1\) is called interface: see Fig. 1.

We assume that the wave profile is symmetric in x about the y-axis. This assumption implies that the interface also possesses the same symmetry. This assumption is not trivial since there are non-symmetric waves on irrotational flows, see [17, 19, 22]. However, we do not study these nonsymmetric waves in the present paper, since symmetric waves alone are rich enough. We also assume that the unit of length is so chosen that \( L/2 = \pi \). Under this convention it is sufficient to consider the flow in \( 0< x< \pi , -d< y < h(x)\). (Note that d and h are already normalized here.) d is assumed to be finite for the numerical computation’s sake. But \(d = + \infty \) causes no problem theoretically.

Since the wave profile \( y = h(x)\) is a part of the flow domain, and since it is unknown a priori, this is a free boundary problem. Free boundary problems usually accompany mathematical difficulties, and many techniques have been devised to overcome them. In the framework of two-dimensional rotational wave, the following technique is often used (see for instance [17] or [6]): (xy) is transformed to \( (q,p) := (x,\psi )\). Then, under certain assumptions, everything can be regarded as a function of (qp). We then define \({\bar{h}}\) by

$$\begin{aligned} {\bar{h}}(q,p) = d + y. \end{aligned}$$

The differential equations are rewritten in terms of \({\bar{h}}\). However, for the notational reason, we use the following symbols instead of \({\bar{h}}\). We define u and U as \({\bar{h}}\) in \( 0< q (=x)< \pi , p_1< p < p_0\) and \( 0< q< \pi , \; 0< p < p_1\). They are nothing but restrictions of \({\bar{h}}\). However, in order to keep compatibility with [6, 7, 14] we use (uU) instead of \({\bar{h}}\). We now see that the original free boundary problem is converted into the following nonlinear partial differential equations in a fixed rectangular domain (see Fig. 1(right)):

$$\begin{aligned} \left\{ \begin{array}{ll} ( 1 + u_q^2) u_{pp} - 2 u_qu_p u_{pq} + u_p^2 u_{qq} - \gamma _1 u_p^3 = 0 \qquad &{} (0<q<\pi , p_1< p< p_0 ),\\ ( 1 + U_q^2) u_{pp} - 2 U_qU_p U_{pq} + U_p^2 U_{qq} - \gamma _2 U_p^3 = 0 \qquad &{} (0<q<\pi , 0< p < p_1 ). \end{array} \right. \end{aligned}$$
(1)

The following boundary conditions are imposed:

$$\begin{aligned}&1 + U_q^2 + (2gU - Q)U_p^2 - 2 \sigma \frac{U_p^2 U_{qq}}{ (1+U_q^2)^{3/2}} = 0 \qquad&(p = 0), \end{aligned}$$
(2)
$$\begin{aligned}&u = 0 \qquad&( p = p_0), \end{aligned}$$
(3)
$$\begin{aligned}&u_q=U_q=0 \qquad&( q=0,q=\pi ), \end{aligned}$$
(4)
$$\begin{aligned}&u =U, u_p = U_p \qquad&(p = p_1). \end{aligned}$$
(5)

This system of equations appears in [6, 7] in the case where the surface tension is neglected. The present general case is due to [14]. This is the mathematical formulation by which we can compute the waves. Here the domain, \(p_0\) and \(p_1\) are given, and uUQ are to be sought. The reader should note that the formulation above does not yield solutions which contain stagnation points. They are a priori excluded. In order to compute such solutions as having stagnation points, we must use more complicated set of equations. This will be introduced later in Sect. 4.

Traditionally, as is described in [17], water waves on irrotational flows have been targets of research. The irrotationality assumption is accepted as a rough approximation. However, in flows of real world, vorticity is inescapable. Water waves on rotational flows are important in real-world applications. For instance, flows near the water surface have vorticity because of wind. Flows near the bottom becomes rotational because of bottom friction. In these cases, it seems to us that a rotational flow of two different vorticity layers is one step closer to the real-world water waves.

We now review some known results. We admit that we are ignorant of recent rapid progress in theoretical studies of rotational waves. Accordingly the following review is far from complete. Rotational water waves with general vorticity distribution \(F=F(\psi )\) were mathematically formulated by Dubreil-Jacotin and Moiseev (see [17]) but their studies did not seem to be pursued by later people, although there have sporadically been some works such as [17, 20, 21] under the assumption of constant vorticity. Note however that those works were limited to the case where the vorticity is constant throughout the flow domain. Then Constantin and Strauss [6], which triggered a lot of mathematical researches on rotational water waves, considered water waves on general rotational flow from the viewpoint of the bifurcation theory. They proved in [6] the existence of the global branch of solutions for general vorticity distribution. They proved that a branch of nontrivial solutions exists and that it exists just until the solution approaches a flow having a stagnation point in it. In this sense they proved the existence of the ‘global’ branch. In doing so, they assumed some regularity on the distribution function of vorticity \(F=F(\psi )\). Later the same authors published [7] where they allowed the discontinuity of the vortex distribution and proved a global branch of solutions. In the papers, however, the authors neglected the capillary force, which was taken into account by Martin and Matioc [14]. We use the formulation of [14] in the present paper.

Simmen and Saffman [20], Teles da Silva and Peregrine [21], and later [17] numerically computed water waves on the flow of constant vorticity of single layer. Recently Ribeiro–Junior and others [18] considered the same problem in more details and obtained many waves having more than one stagnation point. On the other hand, Ko and Strauss [10, 11] numerically computed rotational water waves not only of constant vorticity but also of variable vorticity, including the case of two layers of different vorticity. They however neglected capillary force. Recent works [4, 5] by Constantin, Kalimeris, and Scherzer are communicated to the authors by one of the reviewer. Those include interesting results for vortical flows of one-layer.

In what follows, we use the mathematical formulation of [14, 15] to numerically compute the capillary-gravity water waves on rotational flows. New contributions of the present paper are: (1) capillary-gravity rotational waves are computed; (2) waves having stagnation points beneath the water surface are computed. Our works are closely related to [10, 11]. But, since we included capillarity, we have studied solutions with more varieties of parameters and some of our water waves with stagnation points may be new. Existence/non-existence of stagnation points is important, but it is also important to see where they may appear—whether they appear near the bottom, or near the free surface. We will compute solutions with these questions in mind.

The present paper consists of 8 sections. In Sect. 2, we explain trivial solutions and bifurcation points around them. In Sect. 3, we explain our method of numerical computations of solutions without a stagnation point. In Sect. 4, we introduce an idea, due to [14, 15], to compute solutions having a stagnation point. In Sect. 5 we present our numerical results for the pure capillary waves. The capillary-gravity waves are explained in Sect. 6 and the gravity waves in Sect. 7. The final section is devoted to discussions.

2 Trivial solution and bifurcation points

We begin our analysis by computing the ‘trivial’ solution. The trivial solution is, by definition, the one where all the streamlines including the free surface are straight horizontal lines. This can be phrased as: the functions u and U are independent of q. The trivial solution \((u_0,U_0)\) is explicitly written as follows:

$$\begin{aligned} u_0(p)&= \frac{1}{\gamma _1} \left( \sqrt{\lambda - 2(\gamma _2-\gamma _1) p_1 - 2\gamma _1 p} - \sqrt{\lambda - 2(\gamma _2-\gamma _1) p_1 - 2\gamma _1 p_0 } \right) \qquad&( p_1< p< p_0 ), \\ U_0(p)&= u_0(p_1) + \frac{1}{\gamma _2} \left( \sqrt{\lambda - 2 \gamma _2 p} - \sqrt{\lambda - 2 \gamma _2 p_1} \right) \qquad&( 0< p < p_1 ), \end{aligned}$$

where we have used the following notation

$$\begin{aligned} \lambda = Q - 2gd. \end{aligned}$$

Hereafter, as in [14, 15], we use \(\lambda \) instead of Q as the bifurcation parameter whenever \(\lambda \) is more convenient than Q. In the case of \(\gamma _1= 0\) or \(\gamma _2 = 0\), appropriate limit must be taken in the formulas above. For instance, if \(\gamma _2 = 0\), \(U_0(p)\) becomes \( U_0(p) = u_0(p_1) + (p_1-p)/\sqrt{\lambda }\). There is no a priori reason that \( \lambda > 0\). However, the formula (3.3) of [14] shows that \( \lambda > 0\) is necessary if a non-trivial solution exists. Therefore we do not lose generality by assuming the positivity of \(\lambda \).

Nontrivial solutions bifurcate from this trivial solution. The bifurcation point can be found by linearizing the equation at the trivial solution. We then see that the linearized equation has nontrivial solution if and only if the following equation in \(\lambda \) is satisfied:

$$\begin{aligned}&\lambda ^{3/2} - \frac{1}{n} \left [ \gamma _2 \left\{ nd_2 + \frac{\mathrm{sinh}(nd_2) \mathrm{cosh}(nd_1) }{\mathrm{cosh}(nd)} \right\} + \gamma _1 \left\{ \frac{\mathrm{sinh}\, (nd_1) \mathrm{cosh}\, (nd_2) }{\mathrm{cosh}\, (nd)} \right\} \right] \lambda \nonumber \\&\quad + \mathrm{tanh}(nd) \left [ \frac{\gamma _2^2 d_2 - (g+\sigma n^2) }{n} + \gamma _2(\gamma _1-\gamma _2) \frac{\mathrm{sinh}\, (nd_1) \mathrm{sinh}\, (nd_2) }{n^2 \mathrm{sinh}\, (nd)} \right] \lambda ^{1/2} \nonumber \\&\quad - \frac{(g+\sigma n^2)\mathrm{tanh}(nd)}{n^2} \left [ \frac{(\gamma _2-\gamma _1) \mathrm{sinh}(nd_1)\mathrm{sinh}(nd_2) }{\mathrm{sinh}(nd) } - \gamma _2d_2 n \right] = 0, \end{aligned}$$
(6)

where we have set

$$\begin{aligned} d_1 = u_0(p_1), \qquad d_1 + d_2 = U_0(0), \qquad d = d_1+d_2. \end{aligned}$$
(7)

Equation (6) is nothing but the dispersion relation in the terminology of fluid mechanics under disguise of the bifurcation theory. We computed this complicated relation by Mathematica and compared the result with those in [14] to see the complete agreement.

Once the roots of (6) are obtained, we resort to a path-continuation method to compute bifurcating solutions.

3 Discretization

We discretize u and U by a combination of the finite difference method and the spectral method. The functions are expanded in q variable into a cosine series. Recall that the wave profiles are assumed to be symmetric about the y axis. This amounts to the evenness of u and U. To the variable p, we apply the finite difference method. Namely we divide the interval \( [p_1, p_0] \) into \(N_1\) subintervals of equal length. We then set \( {\tilde{p}}_i = p_1 + i(p_0-p_1)/N_1\) and

$$\begin{aligned} u({\tilde{p}}_i,q) = u_0({\tilde{p}}_i) + \sum _{k=0}^M a_{k,i} \cos kq \qquad i = 0,1, \ldots , N_1, \end{aligned}$$
(8)

where \(u_0\) is the trivial solution defined as above. The interval \( [0, p_1] \) is likewise divided into \(N_2\) subintervals of equal length. With \({\bar{p}}_j = jp_1/N_2\), we set

$$\begin{aligned} U({\bar{p}}_j,q) = U_0({\bar{p}}_j) + \sum _{k=0}^M A_{k,j} \cos kq \qquad j = 0,1, \ldots , N_2. \end{aligned}$$
(9)

The unknowns are now

$$\begin{aligned} a_{k,i}, ~~~ A_{k,j} \qquad (0 \le k \le M, \; 0 \le i \le N_1, \; 0 \le j \le N_2). \end{aligned}$$

\( \lambda \) and \( \sigma \) are taken as bifurcation parameters. The differential operators in p variable are discretized by central differences and give us nonlinear equations, which we will solve by the path-continuation method. The path-continuation method is a standard method for numerically computing bifurcating solutions: see [17] or [1], for instance.

As we shall see soon, the computation of gravity waves is considerably more difficult than that of capillary-gravity waves. However, even capillary-gravity waves, where we do not have a sharp crest, require many grid points. We found that in some cases stagnation points appear in solutions of relatively small amplitude. Thus we have realized that a new method is needed to more fully understand the global picture of rotational waves.

In the following computations, we tested several values of \(N_1, N_2\) and M. If the solutions are close to the trivial solution, \(N_1=N_2=16, M = 100\) were enough. But when we traced the branch to compute solutions of larger amplitude, we needed larger numbers. For instance we used \( N_1=N_2 = 16\) and \(M = 200\). Because of limitations of our computers, we were forced to use smaller \(N_1=N_2\) if larger M were needed. For instance we used \(N_1=N_2 = 16\) and \(M = 400\) in some cases.

4 Formulation for waves with stagnation points

As we have noted, stagnation points appear rather soon and the formulation in Sect. 3 is no longer applicable. In this case we employ the following tactics: we compute, by the method above, the solutions near the trivial solution and trace the branch of the solutions. If the solution approaches a solution with stagnation point, we can recognize it by the occurrence of a flow region of slow speed. We then switch the numerical code to the following new one, which is adopted from [15]. The flow region is mapped from a rectangular region by the following mappings:

figure a

respectively. See Fig. 2. Note that h(x) denotes the free surface, and f(x) denotes the interface where the vorticity becomes discontinuous. Recall that \(d_1\) and \(d_2\) are related to \(p_0\) and \(p_1\) by (7).

Fig. 2
figure 2

Mapping between the flow region and a fixed rectangular domain

Before using this mapping, the unknowns are u and U. After being mapped in this way, the unknowns are \(f,h, \psi \). The Poisson equations \( - \triangle \psi = \gamma _1\) and \(- \triangle \psi = \gamma _2\) are written in the following way.

$$\begin{aligned}&\displaystyle { - \psi _{\xi \xi } + 2 \frac{\eta +d}{f} f' \psi _{\xi \eta } - \frac{(\eta +d)^2 f'^2 +d_1^2}{f^2} \psi _{\eta \eta } - \left [ \frac{2 (\eta +d) f'^2}{f^2} - \frac{\eta +d}{f} f''\right] \psi _\eta } = \gamma _1 \qquad \text{ in } \;\; \Omega _1^*, \\&\displaystyle { - \psi _{\xi \xi } - 2 \frac{\eta f'-(\eta +d_2)h'}{h-f} \psi _{\xi \eta } - \frac{\left\{ \eta f'-(\eta +d_2)h'\right\} ^2+d_2^2}{(h-f)^2} \psi _{\eta \eta } } \\&\qquad \qquad \qquad \quad + \displaystyle { \left [ 2 \frac{(h'-f') \left\{ \eta f'-(\eta +d_2)h'\right\} }{(h-f)^2} - \frac{\eta f''-(\eta +d_2)h''}{h-f}\right] \psi _\eta } = \gamma _2 \qquad \text{ in } \;\; \Omega _2^*. \end{aligned}$$

The boundary conditions arise from the requirement that the boundaries are streamlines, and are written as follows:

$$\begin{aligned} \psi = 0 \qquad ( \eta = 0), \qquad \psi = p_1 \qquad ( \eta = -d_2), \qquad \psi = p_0 \qquad ( \eta = -d). \end{aligned}$$

In addition, \(\psi \) is required to be continuously differentiable at the interface. Namely we require

$$\begin{aligned}&\lim _{\epsilon \downarrow 0} \psi (\xi ,-d_2 - \epsilon ) = \lim _{\epsilon \downarrow 0} \psi (\xi ,-d_2 + \epsilon ), \\&\frac{d_1}{f(\xi )} \lim _{\epsilon \downarrow 0} \frac{\partial \psi }{\partial \eta }(x,-d_2 - \epsilon ) = \frac{d_2}{h(\xi )-f(\xi )} \lim _{\epsilon \downarrow 0} \frac{\partial \psi }{\partial \eta }(x,-d_2 + \epsilon ). \end{aligned}$$

The Neumann boundary conditions are imposed on the side boundaries:

$$\begin{aligned} \frac{\partial \psi }{\partial \xi } = 0 ( \xi = 0, \pi ). \end{aligned}$$

Finally we must impose the Bernoulli condition, which is written in the following way:

$$\begin{aligned} \left( \psi _{\xi } + \frac{ f'\eta - (\eta + d_2)h'}{h-f} \psi _{\eta } \right) ^2 + \left( \frac{d_2}{h-f} \psi _{\eta } \right) ^2 + 2gh - Q - 2\sigma \frac{ h''}{ \left( 1 + (h')^2 \right) ^{3/2} } = 0 \qquad ( \eta = 0). \end{aligned}$$

Applying a discretization just analogous to the one in Sect. 3, we can compute the water waves with stagnation points.

5 Results: pure capillary waves

Before we go into the detailed study of the capillary-gravity waves, we warm up ourselves by computing the pure capillary waves on the flow of a constant vorticity. ’Pure capillary’ implies that the gravity is neglected and the capillary force acting on the free surface is the only force. Pure capillary waves on irrotational flows can be written explicitly by elementary function (the case of infinite depth—Crapper’s waves) or by the elliptic functions (the case of finite depth—Kinnersley’s waves), and accordingly can be used for the check of computer program. See, e.g., [9, 17]. The case of pure capillary waves on rotational flows do not seem to have been considered in the references. Since the waves of extremely short wavelength (e.g., a few centimeters) may be approximated by this pure capillary waves, pure capillary waves may not be so odd things. We begin our analysis with this case.

5.1 Single-layer pure capillary waves

In this subsection we denote the depth and the vorticity by d and \(\gamma \), respectively. Formulation and discretization conform to the way described in the previous sections. We used \(N_1=32, N_2=0\) and \(M=100, 200, 400\). (Note that \(N_2=0\) since we consider flows of a single layer.) The Poisson equation and the Bernoulli condition are written as follows:

$$\begin{aligned} - \psi _{\xi \xi } + 2 \frac{\eta +d}{h} h' \psi _{\xi \eta } - \frac{(\eta +d)^2 h'^2 +d_1^2}{h^2} \psi _{\eta \eta } - \left [ \frac{2 (\eta +d) h'^2}{h^2} - \frac{\eta +d}{h} h''\right] \psi _\eta = \gamma \qquad \text{ in } \;\; \Omega ^*, \end{aligned}$$
(10)
$$\begin{aligned} \left( \psi _\xi - \frac{ (\eta + d) h'}{h} \psi _\eta \right) ^2 + \left( \frac{d}{h} \psi _\eta \right) ^2 - \lambda - 2\sigma \frac{ h''}{ \left( 1 + (h')^2 \right) ^{3/2} } = 0 \qquad ( \eta = 0). \end{aligned}$$
(11)
Fig. 3
figure 3

Bifurcation diagram of pure capillary waves on rotational flow of single layer. \(\gamma = 1\) on the right, and \(\gamma =- 1\) on the left. The horizontal axis represents \(\sigma \)—the surface tension. The vertical axis represents \(a_{1,0}\)—the first Fourier coefficient of h. \( d = 1, \lambda = 4\)

The solutions of (10), (11) are drawn as the diagrams in Fig. 3. Here the trivial solutions lie on the \(\sigma \)-axis. Solutions with a stagnation point are drawn in red, and those without a stagnation point are drawn in green. Since there is a symmetry \( x \mapsto x + \pi \), with which the governing equations are equivariant, we drew only one side of the branch. The solutions on the other side of the branch are obtained by the symmetry.

The solutions of the maximal \(a_{1,0}\) in Fig. 3 are shown in Fig. 4. In both cases, we set \(\lambda =4\) and \(d=1\). The figures on the top are perspective views (3D views) of the stream functions. The middle figures show streamlines and the lower ones do velocity vectors. When \(\gamma =-1\), a stagnation point appears in the upper half and vortex flow is clockwise as shown in (a). When \(\gamma =1\), it appears in the lower half and vortex flow is counterclockwise as in (b). Stagnation points of two types are observed: elliptic and hyperbolic. The elliptic stagnation point appears on the y-axis inside the flow region, while the hyperbolic stagnation points appear on the free surface (Fig. 4a) or on the bottom (Fig. 4b).

Fig. 4
figure 4

One-layer, pure capillary waves. Perspective views of the stream functions are shown on the top, Plots of streamlines (middle) and velocity vectors (bottom). \(d=1, \lambda =4\). a \(\gamma =-1\) and b \(\gamma =1\)

Figure 5 shows those cases of \(\gamma =0.7, \pm 0.5\) and \(- 0.1\), while d and \(\lambda \) are the same as above. As \(|\gamma |\) becomes smaller, the stagnation region (those parts of flows consisting of closed streamlines) becomes smaller as is seen in Fig. 5a, c. At \(\gamma = 0.5, -0.1\), a stagnation point does not appear in any solution of either branch: See Fig. 5b, d. Experiments for some other \((d, \lambda )\) showed similar results. Namely no stagnation point appears if \(|\gamma |\) is small. The diminution of the region of closed streamlines complies with the fact that such a region does not exist in the case of irrotational flow, i.e., \(\gamma = 0\). See [17].

Fig. 5
figure 5

One-layer, pure capillary waves. \(d=1, \lambda =4\). a \(\gamma =0.7\), b \(\gamma =0.5\), c \(\gamma =-0.5\), d \(\gamma =-0.1\)

The solutions in Figs. 4 and 5 are those on the extreme points of the bifurcation diagrams—those from which we cannot trace the branch any further: The iteration process does not converge if we try to compute a solution of larger amplitude. The reason that solutions cannot be traced seems to be explained by the existence of a steep slope on the free boundary. In the case of the capillary water waves on irrotational flows, we do know those water waves whose free surfaces are partly overhanging (see [9, 17]), namely \(y = h(x)\) is not single-valued. We suspect that such solutions exist in the present case. However, unfortunately, our formulation excludes such a solution. (See also Fig. 11 and its explanation for the same phenomenon.)

5.2 Two-layer pure capillary waves.

We now consider pure capillary waves on flows of two layers. There are five parameters \(\lambda , d_1, d_2, \gamma _1\) and \(\gamma _2\). Therefore we gave up exhaustive experiments and computed only several cases. Since the bifurcation diagrams are qualitatively similar to those in the preceding subsection, we may safely omit them. Figure 6a–c show three solutions when \(\gamma _2\) changes from 0 to \(-1\) for fixed \(\gamma _1=1\), \(d_1 = 0.1, d_2 = 1, \lambda =4\). Here the interface is distinguished from other streamlines by the width of the lines. When \(\gamma _2 = 0\), a stagnation point appears near the bottom as is seen in Fig. 6a. As \(\gamma _2\) becomes smaller, a stagnation flow in \(\Omega _1\), i.e., the part which consists of closed streamlines, becomes smaller and another stagnation point appears in the upper side of \(\Omega _2\). When \(\gamma _2=-0.55\), two stagnation points exist simultaneously, one near the free surface and another near the bottom: See Fig. 6b. If \(\gamma _2\) is decreased further, a stagnation point in \(\Omega _1\) disappears and when \(\gamma _2=-1\) it exists only in \(\Omega _2\), see (c). From the solution in Fig. 6c we then vary \(d_2\) from 0.5 to 0.1 with a fixed \((d_1,\gamma _1,\gamma _2,\lambda ) = (0.5, 1, -1, 4)\). (c) shows a solution with a stagnation point in the upper side of \(\Omega _2\). As \(d_2\) becomes smaller, a stagnation flow in \(\Omega _2\) becomes smaller and another stagnation point appears in the lower side of \(\Omega _1\). The results are shown in Fig. 7. When \(d_2=0.33\), two stagnation points exist simultaneously as shown in Fig. 7a. When \(d_2=0.1\) a stagnation point exists only in \(\Omega _1\) as in Fig. 7b.

Fig. 6
figure 6

Pure capillary waves on two-layers. \(\lambda = 4\). \(d_1=d_2=0.5, \; \gamma _1 = 1\) are fixed. The interface is drawn by a curve thicker than others

Fig. 7
figure 7

Pure capillary waves on two-layers. \(\lambda = 4\). \(\gamma _1=1, \; \gamma _2=-1, \; d_1 = 0.5\) are fixed

We now show another pattern of closed streamlines. Figure 8 shows the solution of \(d_1=0.5, d_2=0.1, \lambda =4, \gamma _1=-1, \gamma _2=1\) and \( A_{1,0} = 0.8227 \): Here, unlike the previous cases, there exist two stagnation points appearing simultaneously just above and below the interface. Such phenomenon that two stagnation points exist simultaneously is interesting, but it occurs in a very narrow range of parameters in our computations. See also [18], where similar phenomena are presented.

Fig. 8
figure 8

Pure capillary waves on two-layers. The plots of streamlines and the 3D plot. \(d_1 = 0.5, d_2 = 0.1, \lambda = 4\), \(\gamma _1=-1, \gamma _2=1\)

In the same way, we carried out experiments in other parameter regions. In some parameter region, a solution with a stagnation point exists. In another region, a solution without a stagnation point was obtained. In a still other region, no solution whatsoever was obtained. Since we did not find any clear law about the stagnation point, we cannot comment on their features.

6 Two-layer capillary-gravity waves.

In the present section we consider the case where both capillarity and gravity are taken into account. We used \( N_1=N_2 = 16\) and \(M = 100,200,400\). A larger M was necessary to compute solutions of large amplitude.

If both gravity and capillary forces are taken into account, there exist double bifurcation of mode m and mode n with different integers (wave numbers) \(m \ne n\), whence bifurcation structures become more complicated than those of pure capillary waves or the gravity waves. We must therefore pay attention not only to individual solutions but also to bifurcation structures among them. Because of the richness of the solutions, we concentrate ourselves to those solutions of mode 1 and mode 2, i.e., those where the coefficients of \(\cos q \) and \(\cos 2q\) are large and others are relatively small. In the upper-left diagram of Fig. 9, the horizontal axis represents \(\sigma \), and the vertical one does \(0.1\times A_{1,0} + A_{2,0}\), where \(A_{1,0}\) and \( A_{2,0}\) are the Fourier coefficients of h defined in (9). The trivial solutions lie on the \(\sigma \)-axis. The upper-right diagram is a view from the \(\sigma \)-direction. There exist three primary bifurcation points of mode 1 and mode 2 on the horizontal \(\sigma \)-axis. The mode 1 branch, which emanates from a trivial solution at the rightmost point of the green line, extends to the left, forming a closed loop and finally joins the mode 2 branch, which is drawn in red. The mode 2 branch also forms a closed loop which emanates from a trivial solution and joins another trivial solution. The bottom figures are plots of streamlines of the solution at the points A, B, and C on the mode 1 branch. It shows a transition from mode 1 solutions to mode 2 solutions. These solutions have no stagnation point.

Fig. 9
figure 9

Capillary-gravity waves with \(d_1 = 0.5, d_2 = 0.1, \lambda = 6.25, \gamma _1 = -1, \gamma _2 = 0\). The bifurcation diagram of mode 1 and mode 2 is shown in upper-left. The horizontal axis represents \(\sigma \) and the vertical one does \(0.1\times A_{1,0} + A_{2,0}\) of the Fourier coefficients of h (upper left). The upper right diagram is a view from the direction of \(\sigma \)-axis, drawn in \((A_{1,0},A_{2,0})\). The bottom figures are streamlines of solutions at points A, B, and C on the mode 1 branch (shown in the diagram). C is the point of intersection of the two branches

Figure 10 shows the case where a stagnation point appears. Bifurcation diagrams are drawn in a way similar to Fig. 9. The bottom figures show streamlines of solutions at the points from A to E on the mode 1 branch. A stagnation point emerges somewhere between A and B (transition from green to blue). The stagnation region, i.e., the region enclosed by the closed streamlines, becomes larger as the solution approaches point D. If we go on further from D, then the stagnation region gradually becomes smaller and moves to the right as shown in E, which is a solution of the mode 2 branch. In this case, the mode 1 branch joins the mode 2 branch, too. The mode 2 branch forms a closed loop connecting a trivial solution and another trivial solution. The dotted part on the mode 2 branch shows where we could not compute since the iterations did not converge. Accordingly the dotted lines are our guesswork.

Fig. 10
figure 10

Capillary-gravity waves. \(d_1 = 0.5, d_2 = 0.1, \lambda = 6.25, \gamma _1 = 1, \gamma _2 = -1\). A stagnation point appears near the bottom. On the mode 1 branch in the diagrams, solutions without a stagnation point are drawn in green. Those which have stagnation points are drawn in dark blue

The reason that we could not compute can be seen if we look at the solution in Fig. 11, where we plotted the wave profiles of the solution from which the numerical continuation of the solutions is no longer possible. We see that some parts of the free boundary are quite steep. If we trace the solution further we are sure that the overhanging wave profile or even self-intersecting waves would appear just as in the case of capillary-gravity waves on irrotational flows [17]. It is unfortunate that our formulation does not allow an overhanging wave profile: In order to obtain a complete bifurcation diagram, we need to invent a numerical method that permits both stagnation points and overhanging wave profiles. This is left for the future work. Note that all are incorporated if the problem involves one and only one value of vorticity. See [4, 5, 10, 11, 20, 21]. It seems to us that the methods in these papers do not apply to the waves of overhanging profiles with a stagnations point on two layers.

Fig. 11
figure 11

Two solutions near the dots of mode 2 branch. \(d_1 = 0.5, d_2 = 0.1, \lambda = 6.25, \gamma _1 = 1, \gamma _2 = - 1\)

In Fig. 12, the diagrams of mode 1 branches are drawn altogether for various values of \(\gamma _1\). \(\gamma _1\) varies from 0.38 to 1.22 for fixed \(d_1=0.5, d_2=0.1, \lambda =6.25\) and \(\gamma _2=0\). In the diagram, the vertical axis represents \(A_{1,0}\) and the horizontal one does \(\sigma \). (Here some parts of the branches are missing since we could not compute. Therefore, although we call them loops, their geometric properties are not precisely known.) The largest loop represents solutions of \(\gamma _1=0.38\). As \(\gamma _2\) becomes larger, the loop becomes smaller and it is smallest when \(\gamma _1=1.22\). The rightmost point of every loop is the bifurcation point of mode 1, which emanates from a trivial solution. On the other hand, the opposite ends of the bifurcation curve (the leftmost points of the loops where \(A_{1,0}\) is nearly zero.) are connected to different parts of the diagram, depending on \(\gamma _1\): When \(\gamma _1=0.38\), it joins with the mode 3 branch. When \(0.5 \le \gamma _1 \le 1.2\), the loops joins with the mode 2 branch. When \(\gamma _1=1.22\), it joins with a trivial solution again. For \(\gamma _1 > 1.22\), no solution was obtained.

Fig. 12
figure 12

Mode 1 branches for various values of \(\gamma _1\). Intersections with the horizontal axis on the right hand side are bifurcation points along a trivial solution, but those on the left side do not necessarily join with the trivial solutions

Figure 13 shows how branches vary as \(\gamma _1\) varies; \(\gamma _1=0.9, 1.11\), and 1.22. Those three figures are drawn on the same scale. As \(\gamma _1\) becomes larger, both the loops of mode 1 and mode 2 branches become smaller. In the left two figures, the mode 1 branch joins with the mode 2 branch. The two loops become disjoint at around \(\gamma \approx 1.2\). On the rightmost figure, both the mode 1 and mode 2 branches form small loops and they do not intersect each other.

Fig. 13
figure 13

Change of mode 1 and mode 2 branches. \(d_1=0.5, d_2=0.1, \lambda =6.25, \gamma _2=0\)

7 Gravity waves

This section is devoted to gravity waves, which are computed by the same method as in the previous sections. Setting \(\sigma = 0\) in (6), the bifurcation point of mode n at the trivial solution is given by:

$$\begin{aligned}&\sqrt{\lambda }^3 - \frac{1}{n} \left [ \gamma _2 \left\{ nd_2 + \frac{\mathrm{sinh}(nd_2) \mathrm{cosh}(nd_1) }{\mathrm{cosh}(nd)} \right\} + \gamma _1 \left\{ \frac{\mathrm{sinh}\, (nd_1) \mathrm{cosh}\, (nd_2) }{\mathrm{cosh}\, (nd)} \right\} \right] \lambda \\&\quad + \mathrm{tanh}(nd) \left [ \frac{\gamma _2^2 d_2 - g }{n} + \gamma _2(\gamma _1-\gamma _2) \frac{\mathrm{sinh}\, (nd_1) \mathrm{sinh}\, (nd_2) }{n^2 \mathrm{sinh}\, (nd)} \right] \sqrt{\lambda } \\&\quad - \frac{g \mathrm{tanh}(nd)}{n^2} \left [ \frac{(\gamma _2-\gamma _1) \mathrm{sinh}(nd_1)\mathrm{sinh}(nd_2) }{\mathrm{sinh}(nd) } - \gamma _2d_2 n \right] = 0. \end{aligned}$$

Rotational gravity waves of finite depth on one layer were studied in [10, 11, 18, 21] and some numerical examples of stagnation points are obtained. Our results are consistent with them too. Notwithstanding, in order to understand our results on two-layers, it would be better to examine our results on single-layer gravity waves,

7.1 Single-layer gravity waves

Numerical treatments are the same as in the previous sections. We used \(N_1 = 32, N_2 = 0\) and \(M = 100, 200, 400\). We know that, in the case of gravity waves, stagnation points never appear when the vorticity is negative. Figure 14 shows the diagram of mode 1 branch of \(d=0.5\), \(\gamma = 0.5, 1,\) and 2. As before, red/green parts represent solutions with/without a stagnation point, respectively. When \(\gamma = 0.5\), the mode 1 branch is rather short and no stagnation point appears. For smaller \(\gamma \), the branch is shorter and no stagnation point exists. As \(\gamma \) increases, the branch becomes longer and a stagnation point appears in more solutions. Similarly to the case of capillary-gravity waves, the stagnation point appears in the lower side of the flow region. With \(d = 0.5\), streamlines for \(\gamma = -0.5, 1, 2,\) and 6.4 are shown in Fig. 15. As \(\gamma \) increases, the bulge of the closed streamlines around a stagnation point becomes more conspicuous.

Fig. 14
figure 14

Mode 1 bifurcation branches of gravity waves on rotational flow of single layer. \(d = 0.5\) and \(\gamma = 0.5, 1, 2\) from the left. The horizontal axis represents \(\lambda \) and the vertical axis represents \(a_{1,0}\) —the first Fourier coefficient of f

Fig. 15
figure 15

\(d = 0.5\). a For \(\gamma < 0\), stagnation point does not appear. b When \(\gamma = 1\), a stagnation point appears near the bottom

In Fig. 16 the size of the closed streamlines increases then decreases. Here \(d=0.8\) and \(\gamma =0.8\), and we plotted streamlines of three solutions, which are marked as A, B, and C in the bifurcation diagram. A stagnation point appears a little after the point A. The region of closed streamlines is the largest at B. If we trace the branch further, it gradually becomes smaller and almost on the verge of disappearing in C. Though we could not compute the solutions until it actually disappears, the disappearance seems to be very likely.

Fig. 16
figure 16

\(d = 0.8, \;\; \gamma =0.8\). The labels A, B, and C correspond, respectively, points A, B, and C marked on the bifurcation branch

7.2 Two-layer gravity waves

Since we did not find a solution with a stagnation point if vorticity is negative, we experiment mainly in the cases where \( \gamma _1 > 0\) & \(\gamma _2=0\), and, \(\gamma _1=0\) & \(\gamma _2> 0\). Figure 17 shows the case of \(d_1 = d_2 = 0.5\) and \(\gamma _2\) is fixed to 0, the diagram of mode 1 branches are shown on the top. Plots of the highest wave solution of each branch are shown in the bottom, for \(\gamma _1 = 1, 1.5\) and 2. When \(\gamma _1 = 1\), a stagnation point does not appear. The larger \(\gamma _1\) is, the larger the closed streamlines are.

Figure 18 shows the cases of different ratio of \(d_1\) and \(d_2\), (A) \(\; d_1 : d_2 = 1 : 5\) and (B) \(\; d_1 : d_2 = 5 : 1\). From these results, we do not see a correlation between the size of closed streamline and the ratio of \(d_1\) to \(d_2\).

Fig. 17
figure 17

Three branches of mode one. \(d_1 = d_2 = 0.5, \gamma _2=0\). a \(\gamma _1=1 \;\;\) b \(\gamma _1 = 1.5\;\;\) c \(\gamma _1 = 2\)

Fig. 18
figure 18

a \(d_1 = 0.1, d_2 = 0.5, \gamma _1=8, \gamma _2=0, A_{1,0} = 0.755\). b \(d_1 = 0.5, d_2 = 0.1, \gamma _1=2, \gamma _2=0, A_{1,0} = 1.455\)

These and other experiments show that a stagnation point appears if \(\gamma _1 >0\) and \( \gamma _2 = 0\). On the other hand, it does not appear in any case where \(\gamma _1 = 0, \gamma _2 > 0\). Finally, Fig. 19 shows the results when \(\gamma _2 \ne 0\) for the example of Fig. 17c.

Fig. 19
figure 19

a \(d_1 = 0.5, d_2 = 0.5, \gamma _1=2, \gamma _2=-1, A_{1,0} = 0.536\). b \(d_1 = 0.5, d_2 = 0.5, \gamma _1=2, \gamma _2=0.175, A_{1,0} = 0.759\). Parameters other than \(\gamma _2\) are the same as those in Fig. 17c

8 Discussions

The problem of water waves on two layers of piecewise constant vorticity involves many parameters, and it is not easy to classify the structure of bifurcation systematically. We accordingly chose some parameters, \(\lambda , (d_1,d_2), (\gamma _1, \gamma _2)\), which we hope to represent typical cases. It turned out that a stagnation point, if it exists, appears on the upper side of flow region with negative vorticity and on the lower side of the flow region with positive vorticity. On the other hand, whether it appears in the upper layer (the \(\gamma _2\)-layer) or lower layer (the \(\gamma _1\)-layer) depends on the combination of depth and vorticity. We could not find any simple law concerning their locations. It does not necessarily appear in the thicker layer. Nor does it always appear on the side with larger vorticity. When \(\gamma _2=0\) and \( \gamma _1 < 0\), no stagnation point was found either in the gravity or the capillary-gravity waves. In other cases, their locations depend on the combination of \((d_1, d_2)\) and \(\lambda \).

Although we succeeded in obtaining solutions with stagnation points, our method has a drawback: it does not allow us to compute wave of overhanging profiles. We need to come up with a new method for computing such solutions. If the vorticity is constant throughout the flow domain, then there are mathematical formulations which incorporate both overhanging profiles and stagnation points (see [3, 8, 13, 14, 17, 18]). If vorticity is not a constant, we may have formulations which include stagnation points, like ours in this paper. Others may include overhanging waves but stagnation points are excluded. We do not know a mathematical formulation which includes all of (i) a stagnation point, (ii) overhanging part of the free surface, (iii) nonconstant vorticity. Note that our problem in this paper has two values of vorticity and is considered to be the case of nonconstant vorticity.

Ours seems to be the first attempt to numerically compute capillary-gravity water waves on two vortical layers with a stagnation point. Although we obtained new solutions, some problems such as the location of the stagnation point are left for future study.