1 Introduction

The forced Korteweg–de Vries equation (fKdV) has been used as a model to describe atmospheric flows encountering topographic obstacles, flow of water over rocks (Baines 1995), ship waves and ocean waves generated by storms [when a low pressure region moves on the surface of the ocean (Johnson 2012)].

Solitary waves have a wide range of applications, for instance, in water waves, optical fibers, superconductive electronics, elementary-particle physics, quantum physics and more recent applications in biology and cosmology (Joseph 2016). It is well known that the Korteweg–de Vries equation (KdV) is used to describe the propagation and interaction between solitary waves. Studying numerical solutions of the KdV equation, Zabusky and Kruskal (1965) were the first to observe that solitary waves interact during the collision and return to its initial form. They named this type of waves as solitons. This study raised interest to investigate further details of soliton interactions. Since then, many works have been done on this topic. It is hard to give a comprehensive overview of contributions. For the interested reader, we mention a few articles which are seminal in this field.

Lax (1968) classified overtaking collisions of two solitons in three categories according to the number of crests observed during the interaction. More precisely, he proved that the type of the collision can be classified according to the ratio of the initial amplitude of the solitons. The categorization given by Lax was verified experimentally by Weidman and Maxworthy (1978) and numerically by Mirie and Su (1982) for a higher-order model. More recently, Craig et al. (2006) presented a work in which is given a broad review on solitary wave interactions. They investigated numerically and experimentally solitary wave collisions for the Euler equations. Their numerical simulations show that the collisions of two solitary waves fit into the three geometric categories of the KdV two-soliton solutions defined by Lax. However, the algebraic classification based on the ratio of the initial amplitudes is within a different range of the one considered by Lax.

Solitary waves have been also studied in the context of the fKdV model. The literature in this topic is broad and therefore, it is hard to give a complete overview of it. For the interested reader we mention a few works that give a general description of the main results. Grimshaw et al. (1994) used the fKdV equation to investigate the interaction of a solitary wave with an localized bump on the topography. Their study showed that when a solitary wave passes over a bump, it can behave as follows: it passes through the bump, the solitary wave is reflected with a significant amplitude change or it oscillates above the obstacle. A review of solutions for the fKdV equation with one bump can be found in Ermakov and Stepanyants (2019) and therein references.

In this paper, we investigate numerically in details the interaction of two solitary wave solutions of the fKdV. More precisely, differently from the previous works, we analyze the interaction of these two waves between obstacles. We find that the three geometric categories described by Lax (1968) are hold for the fKdV two-soliton interaction. However, our experiments indicate that an algebraic categorization similar to the one presented by Lax is not possible for the fKdV.

This article is organized as follows. In Sect. 2, we present the mathematical formulation of the non-dimensional fKdV equation. The results are presented in Sect. 3 and the conclusion in Sect. 4.

2 The forced Korteweg–de Vries equation

We consider an inviscid, incompressible, homogeneous fluid on a shallow channel with variable topography in the presence of a constant current. The flow of the fluid can be classified by the Froude number (F), which is defined by the ratio of the upstream velocity and the critical speed of shallow water. When the Froude number is near critical (\(F\approx 1\)), and the amplitude of the topography is small the weakly nonlinear, weakly dispersive model given by the dimensionless forced Korteweg–de Vries equation

$$\begin{aligned} \zeta _{t}+f\zeta _{x}-\frac{3}{2}\zeta \zeta _{x}-\frac{1}{6}\zeta _{xxx}=\frac{1}{2} h_{x}(x), \end{aligned}$$
(1)

is used to describe the flow over the topographic obstacle (Pratt 1984; Wu 1987; Milewski 2004; Grimshaw and Maleewong 2013; Flamarion et al. 2019). Here, \(\zeta (x,t)\) is the free-surface displacement over the undisturbed surface and h(x) is the obstacle submerged. The parameter f represents a perturbation of the Froude number, i.e, \(F=1+\epsilon f\), where \(\epsilon >0\) is a small parameter.

It is important to point out that the Eq. (1) conserves mass (M(t)), with

$$\begin{aligned} \frac{\mathrm{d}M}{\mathrm{d}t}=0, \text{ where } M(t) = \int _{-\infty }^{+\infty }\zeta (x,t)\, \mathrm{d}x, \end{aligned}$$

and the rate of change of the momentum (P(t)) is balanced by the topography by the formula

$$\begin{aligned} \frac{\mathrm{d}P}{\mathrm{d}t}=\int _{-\infty }^{+\infty }\zeta (x,t)h_{x}(x)\, \mathrm{d}x, \end{aligned}$$
(2)

where

$$\begin{aligned} P(t) = \int _{-\infty }^{+\infty }\zeta ^{2}(x,t)\, \mathrm{d}x. \end{aligned}$$

When the bottom is flat (\(h_x=0\)), a traveling solitary wave solution for (1) is

$$\begin{aligned} \zeta (x,t)=A{{\,\mathrm{sech}\,}}^{2}(k(x-ct)), \;\ A=\frac{4}{3}k^{2}, \;\ c =f-\frac{1}{2}A. \end{aligned}$$
(3)

Notice that when \(f=A/2\), the solution is stationary.

The fKdV equation (1) is solved numerically using a Fourier pseudospectral method with an integrating factor for the linear part, thus avoiding numerical problems due to the higher-order dispersive term. We consider the computational domain with an uniform grid. All derivatives in x are computed spectrally through Fast Fourier Transform (FFT) (Trefethen 2001). The computational domain is taken large enough to prevent effects of the spatial periodicity. Besides, the time evolution is calculated through the Runge–Kutta fourth-order method with time step \(\Delta t = 0.005\) in all simulations (Flamarion et al. 2019).

3 Results

We investigate collisions of two solitary waves between two obstacles. For this purpose, we consider the topography as

$$\begin{aligned} h(x) = \epsilon \left[ \exp \left( -(x - \beta )^2\right) + \exp \left( -(x + \beta )^2\right) \right] , \end{aligned}$$

and the initial condition of (1) is given by a linear sum of two well-separate solitary waves

$$\begin{aligned} \zeta (x,0)=S_{1}{{\,\mathrm{sech}\,}}^{2}(k_{1}(x-\phi ))+S_{2}{{\,\mathrm{sech}\,}}^{2}(k_{2}(x+\psi )), \end{aligned}$$

where \(S_{1}=4k_{1}^{2}/3\), \(S_{2}=4k_{2}^{2}/3\), and \(\phi ,\psi \) are positive constants. Our focus is to categorize the collision of two solitary waves according to the number of local maxima during the interaction.

Fig. 1
figure 1

Top: Collision of two well-separate solitary waves—category (A). Bottom (left): Crest trajectories (continuous lines) and traces of the left and right wave crests before and after collision (dashed lines). Bottom (right): The local maxima of the solution as a function of time. Parameters \(S_{1}=S_{2}=0.6\), \(\phi =16\) and \(\psi =12\)

In the absence of a variable topography (\(h \equiv 0\)), Lax (1968) has proved that the collisions of two solitary waves can be classified into three types:

(A):

For any time t, the solution of the KdV has two well-defined and separate crests, and it happens when \(S_{2}/S_{1}<(3+\sqrt{5})/2\approx 2.62\).

(C):

In the interaction the number of local maxima changes as \(2\rightarrow 1\rightarrow 2\). Physically, this means that during the interaction the waves join together to form a single local maximum. This case occurs for \(S_{2}/S_{1}>3\).

(B):

During the collision, the number of local maxima varies according to \(2\rightarrow 1\rightarrow 2\rightarrow 1\rightarrow 2\). This case incorporates features from (A) and (C) simultaneously. Specifically, the wave interaction can be split into the following stages: (1) at first there are two well separate crests; (2) as time elapses, the waves fuse to form one single crest; (3) then two local maxima appear; (4) these local maxima fuse to form one single crest again; (5) finally, it is obtained a wave with two local maxima. This case happens when \((3+\sqrt{5})/2<S_{2}/S_{1}<3\).

After the collision, the main notable feature is that the waves are phase shifted, i.e., their crest are slightly shifted from the trajectories of the incoming centers.

Observe that Lax (1968) has described the dynamic of the interaction and also established an algebraic constraint for each case. With this in mind, two questions arise: Is this geometric categorization still hold for the fKdV? If so, is there any algebraic restriction in terms of the ratio of the amplitude?

In the following simulations, we seek answers for these questions. For this purpose, we use the parameters \(\beta =20\), \(\epsilon =0.01\) and \(f=0.34\). Besides, to avoid radiation from the topography, we sum a term r(x) to the initial condition, where r is the steady solution of the uniform flow.

We start considering the collision of two well-separated solitary waves that initially have the same amplitude. Details of the wave profile are given in Fig. 1 (top). Initially, two solitary waves propagate downstream. When the right wave reaches the obstacle its amplitude increases and the wave reflects back upstream. Then, the waves collide mimicking a counterpropagating collision. As the right wave approaches the wave with smaller crest, the larger wave begins to shrink and the smaller one begins to grow until the two waves interchange their roles (see Fig. 1 (bottom-right)). Throughout the interaction there are two well-defined and separate crests as shown in Fig. 1 (bottom-left). This behavior is similar to case (A) of Lax classification. Figure 2 displays the continuation of Fig. 1(top). After a series of collisions, both waves escape out. We point out that the numerical method conserves mass and the relative error is:

$$\begin{aligned} \frac{\displaystyle \max _{0\le t\le 10^{4}}|M(t)-M(0)|}{|M(0)|}=\mathcal {O}(10^{-16}). \end{aligned}$$
Fig. 2
figure 2

Continuation of Fig. 1 (top). Parameters \(S_{1}=S_{2}=0.6\), \(\phi =16\) and \(\psi =12\)

Besides, we verify that

$$\begin{aligned} \frac{\displaystyle \max _{0\le t\le 10^{4}}|V(t)-V(0)|}{|V(0)|}=\mathcal {O}(10^{-9}), \end{aligned}$$

where

$$\begin{aligned} V(t) = P(t) -\int _0^t\int _{-\infty }^{+\infty }\zeta (x,s)h_{x}(x)\, \mathrm{d}x\, \mathrm{d}s, \end{aligned}$$

which shows that the numerical method satisfies the momentum balance equation (2).

Figure 3 (top) displays the collision of two well-separate solitary waves that initially have different amplitudes. Differently from the previous case, there is a period of time in the interaction that only one crest exists. The interaction is characterized by an absorption of the smaller wave and its reemission later, along with a phase lag in the trajectories of the crest, see Fig. 3 (bottom).

Fig. 3
figure 3

Top: Collision of two well-separate solitary waves—category (C). Bottom (left): Crest trajectory(continuous lines) and traces of the left and right wave crests before and after collision (dashed lines). Bottom (right): The local maxima of the solution as a function of time. Parameters \(S_{1}=0.6\), \(S_{2}=0.2\), \(\phi =16\) and \(\psi =45\)

Lastly, we show a collision that presents features similar to the cases (A) and (B) simultaneously, see Fig. 4. The smaller wave is first swallowed, then expelled by the larger one. This dynamic is very similar to the description given previously in case (C). However, during the collision there is a central region consisting of two crests. This behavior is described in great details in a series of snapshots depicted in Fig. 5.

Fig. 4
figure 4

Top: Collision of two well-separate solitary waves—category (B). Bottom (left): Crest trajectory (continuous lines) and traces of the left and right wave crests before and after collision (dashed lines). Bottom (right): The local maxima of the solution as a function of time. Parameters \(S_{1}=0.6\), \(S_{2}=0.27\), \(\phi =16\) and \(\psi =45\)

Fig. 5
figure 5

Snapshots of the interaction of the two well-separate solitary waves of Fig. 4 during the collision—category (B)

For the KdV equation, the transition between two categories is determined by the ratio of the amplitudes of the two separated solitary waves given initially. However, for the fKdV is not possible to estimate a similar condition regarding the ratio of the amplitudes as shown in Table 1. Nevertheless, the fKdV equation still holds the geometric features of the Lax categorization.

4 Conclusion

In this paper, we have investigated solitary wave collisions for the fKdV equation. Through a pseudospectral numerical method, we showed that the geometric Lax characterization for the KdV two-soliton interaction still holds for the fKdV, i.e., solitary wave interactions maintain two well-separated crests in regime (A), the larger solitary wave absorbs the smaller one and the number of local maxima varies according to the law \(2\rightarrow 1\rightarrow 2\rightarrow 1\rightarrow 2\) in regime (B) or the number of local maxima changes as \(2\rightarrow 1\rightarrow 2\), case (C). Although there are a number of theoretical and numerical works on collisions for the KdV equation, as far as we know there are no articles focused on collision details for the fKdV equation.

Table 1 Classification of the collision for different values of \(S_1\) and \(S_2\)