# Relay-Zone Technique for Numerical Boundary Treatments in Simulating Dark Solitons

• Lei Bian
• Shaoqiang Tang
Original Research

## Abstract

To simulate dark solitons in the defocusing nonlinear Schrödinger equation, we introduce a relay-zone technique, by alternately using a Robin boundary condition to treat the nonzero far field, and a derivative boundary condition to match the dark soliton. Numerical tests and comparisons demonstrate the effectiveness of the proposed boundary treatment. Stability and interaction of dark solitons are also studied.

## Keywords

Artificial boundary condition Nonlinear Schrödinger equation Dark soliton

## Introduction

Solitons have drawn attention in many physical subjects such as fluid mechanics [29], plasma physics [45], solid state physics [1, 22], atomic physics [20, 34], and Bose–Einstein condensate [31, 38, 46]. First found by Russell [41], solitons are defined as localized waves that propagate without change of shape and velocity, and are stable against mutual collisions [49]. Different from a solitary wave, when any number of solitons interact they do not change form, and the only outcome of the interaction is a phase change [11, 37].

As is well known, solitons also appear in the nonlinear Schrödinger equation (NLSE)
\begin{aligned} i\psi _t(x,t) = -\frac{1}{2}\psi _{xx}(x,t)+\beta |\psi (x,t)|^2\psi (x,t), \quad x\in \mathbb {R},t>0. \end{aligned}
(1)
Here x is space, t is time, $$\psi$$ is a complex-valued wave function, and $$\beta$$ is a dimensionless constant. With an initial condition
\begin{aligned} \psi (x,0)=\psi _0(x),\quad x\in \mathbb {R}, \end{aligned}
(2)
NLSE (1) serves as a generic model for describing the dynamics of light pulses in optical fibers [3]. It also arises in many-body problems in quantum physics and chemistry [12, 28, 40], and laser beam propagation in nonlinear and/or quantum optics [22, 26]. Other important applications include long range wave propagation in underwater acoustics, plasma and particle physics [2], semiconductor industry [35], superfluids [17], and molecular systems in biology [23].
We call NLSE (1) a focusing NLSE if $$\beta <0$$, or a defocusing NLSE if $$\beta >0$$. For the focusing nonlinear case, NLSE (1) has a bright soliton solution with a hyperbolic secant term
\begin{aligned} \psi _B(x,t)=\frac{a}{\sqrt{-\beta }}sech(a(x-vt-x_0))e^{i(vx-\frac{1}{2}(v^2-a^2)t)}. \end{aligned}
(3)
It has a dark soliton solution with a hyperbolic tangent term
\begin{aligned} \psi _{D}(x,t)= & {} \frac{1}{\sqrt{\beta }}\left[ a \tanh (a(x-vt-x_0))\right. \nonumber \\&\left. +\,i(v-k) \right] e^{i(kx-\frac{1}{2}(k^2+2a^2+2(v-k)^2)t+\tilde{\theta }_0)}. \end{aligned}
(4)
for the defocusing nonlinear case [16].

To simulate NLSE (1)–(2) on a bounded computational domain, the numerical boundaries need to be carefully treated. Simple Dirichlet/Neumann/Robin boundary conditions or the periodic boundary condition usually cause large errors on the boundary, particularly when a soliton passes across. To avoid such errors, more involved boundary treatments are required.

There are lots of high-order boundary conditions designed for the linear Schrödinger equation [$$\beta =0$$ in (1)], including exact boundary conditions such as DtN map [10] and NtD map [36]. More precisely, based on finite difference schemes, there are two boundary conditions for temporally semi-discrete boundary conditions which are designed via Z transform [8, 43, 44, 51]. Based on Crank–Nicolson finite difference scheme, there is also a fully discrete transparent boundary condition designed by Arnold [10]. They are usually nonlocal in time and contain time-dependent pseudo-different operators. The operator approximations, which involve time fractional derivatives and integrals, are usually used in practical computations. There are also some local boundary conditions such as perfectly matched layer method by Zheng [54], Páde approximation method by Zhang [52], pole conditions [30, 42], and ALmost EXact boundary conditions [39].

Some above treatments have been extended to the focusing nonlinear case. Zheng [53] used exact boundary conditions which are designed by Darboux transform [24]. NLABC methods based on quasi differential operator were designed to compute bright solitons [9], in addition to some local boundary conditions based on linearization [39, 52]. For more information about artificial boundary conditions, please refer to the review papers [6, 7]. When the bounded computational domain and the boundary condition are chosen suitably, the numerical approximation is usually very accurate. Then the truncated problem is usually discretized in space by finite difference methods [5, 25], spectral method [13, 14], or finite element methods [55]; and in time by the Crank–Nicolson method [25], time splitting method [15, 18, 50], semi-implicit method [4], or Runge–Kutta method [4, 5].

For the defocusing case, however, significant difficulties and numerical instabilities arise due to the nonzero background at the far field. Truncated on a bounded domain, the simple boundary conditions and the above transparent boundary conditions are no longer valid. To our knowledge of the state-of-the-art, there is not much work on designing accurate boundary conditions/treatments for solving NLSE with nonzero far field conditions, especially with non-rest phase background such as dark solitons. On the other hand, applications such as the Bose–Einstein condensation, urge to explore theoretically the interaction and stability of dark solitons in NLSE [21, 27, 32, 33, 48]. Modulus-squared Dirichlet (MSD) method [19], Robin boundary conditions [16] were used to compute the nonzero background. But they cause considerable amount of reflection where solitons are near or cross the numerical boundary. The aim of this work is to design effective boundary treatment for solving the defocusing NLSE (1) with nonzero background such as for the dark solitons.

Following [47], we develop a relay zone technique to monitor the dark soliton propagation near the numerical boundary, and to measure the propagation velocity. According to the soliton position, we adopt alternately a derivative boundary condition to deal with the dark soliton passing through the numerical boundary, and a Robin boundary condition to treat the background state when the dark soliton is far away.

The rest of this paper is organized as follows. In next section, we introduce the relay-zone technique for computing dark soliton based on Robin boundary conditions and derivative boundary conditions, respectively. In next section, we show the effectiveness for derivative boundary conditions and the whole relay-zone technique. Also, we present how the boundary conditions work and how they are used. The numerical study of stability and interaction of dark solitons in NLSE (1) using relay-zone technique can be found in next section. Finally, some conclusions are drawn in last section.

## Relay-Zone Technique and Numerical Boundary Conditions

In this section, we design new boundary treatment for solving NLSE (1) with initial condition (2) when the solution admits a dark soliton(s) at far field. Following [16], we assume that the initial data $$\psi _0$$ satisfies
\begin{aligned} \psi _0\rightarrow A_{\pm }^0e^{ikx},\quad x\rightarrow \pm \infty . \end{aligned}
(5)
Here k is a given real constant, and $$A_+^0$$, $$A_-^0$$ are two given complex constants. Under this far field assumption on the initial data, the solution $$\psi$$ of NLSE (1) with (2) satisfies
\begin{aligned} \psi (x,t)\rightarrow A_{\pm }(t)e^{ikx},\quad x\rightarrow \pm \infty ,\quad t>0, \end{aligned}
(6)
with $$A_{\pm }(0)=A_{\pm }^0$$. Putting it into NLSE (1), we get
\begin{aligned} i\frac{d}{dt} A_{\pm }(t)=\frac{k^2}{2}A_{\pm }(t)+\beta |A_{\pm }(t)|^2A_{\pm }(t),\quad t>0. \end{aligned}
(7)
We can easily get
\begin{aligned} \frac{d}{dt} |A_{\pm }(t)|=0,\quad t>0. \end{aligned}
(8)
So we have
\begin{aligned} \psi (x,t)\rightarrow A_{\pm }^0 e^{-i(k^2+2\beta |A_{\pm }^0|)t/2}e^{ikx},\quad x\rightarrow \pm \infty ,\quad t>0. \end{aligned}
(9)
This gives the asymptotes for the solution $$\psi (x,t)$$ of NLSE (1) with initial data (2) at far field in space, which is consistent with the initial data $$\psi _0(x)$$.

Figures 1 and 2 show dark solitons, with their background $$\psi _{bg}=A_{2}e^{i(kx-\frac{1}{2}(k^2+2a^2+2(v-k)^2)t)}$$.

To simulate these solitons, we first choose the computational domain $$\varOmega = [x_L,x_R]$$. Then we choose a uniform mesh size $$h = \varDelta x = \frac{x_R-x_L}{J}$$, with J a positive integer, and denote the grid points by $$x_{j} = x_L+jh$$, for $$j = 0,1,\ldots ,J$$. Let $$\psi _{j}(t)$$ be the numerical approximation of $$\psi (x_j,t)$$, for $$j = 0,1,\ldots ,J$$. Then the semidiscrete form of NLSE (1) reads
\begin{aligned} i\frac{d}{dt}\psi _j = -\frac{\psi _{j+1}-2\psi _j+\psi _{j-1}}{2h^2}+\beta |\psi _j|^2\psi _j,\quad j=1,2,\ldots ,J-1,\quad t>0. \end{aligned}
(10)
We choose the time step and time integration method with correct boundary conditions to simulate the solitons.

To treat both nonzero background solution and dark solitons, we introduce the a relay-zone technique. Then we propose Robin boundary condition to treat the nonzero background. Derivative boundary condition is also proposed to match the solitons. At last, we give the whole flow chart for the relay-zone technique.

The relay-zone technique is first proposed for multiscale computations of moving dislocations in crystalline solids [47]. In NLSE (1), we adopt it to compute several solitons going across the numerical boundary.

Figure 3 gives a schematic plot for relay-zone technique. We assume that the solitons move from left to right. The computational domain AD contains a velocity zone BC where we measure the propogation speeds of the solitons. We use the standard Crank–Nicolson finite difference(CNFD) scheme inside the whole domain AD. We use Robin boundary condition to treat the background solution on the left boundary point A. It is also used to treat the background solution on the right boundary point D when the soltions are far away from this boundary point. If the soliton has passed the velocity zone BC and entered into the domain CD, we use at the right boundary a derivative boundary condition with the measured speed of the soliton. After a certain time, when it moves away, we use the Robin boundary condition to treat the background solution again.

Based on the far field asymptotic behavior discussed at the beginning of this section, we introduce the Robin boundary conditions
\begin{aligned} \frac{\partial \psi }{\partial x}=ik\psi ,\quad x\rightarrow \pm \infty ,\quad t\ge 0, \end{aligned}
(11)
If we take the second-order central difference scheme on the numerical boundaries, the boundary conditions (11) are discetized as
\begin{aligned} \begin{aligned}&\frac{\psi _{2}-\psi _{0}}{2h} = ik\psi _{1}, \\&\frac{\psi _{J}-\psi _{J-2}}{2h} = ik\psi _{J-1}. \end{aligned} \end{aligned}
(12)
These boundary conditions (Robin B.C.) provide accurate far field conditions for background solution, that is to say, they are accurate when solitons are far away from the numerical boundaries.

Robin boundary conditions (12) are not valid when solitons are near the boundaries. We then need a new boundary condition.

In fact, dark soliton’s information is characterized by the following parameters, the modulus of the background $$b/\sqrt{\beta }$$, the propagation speed v, the frequency k and the depth a. We have the relation
\begin{aligned} a^2+(v-k)^2=\beta b^2. \end{aligned}
(13)
Take the right boundary for example, we consider the dark soliton solution, and take the derivative of (4) in x and t, respectively. We find
\begin{aligned} \frac{\partial \psi }{\partial x}= \frac{a^2}{\sqrt{\beta }}\left[ 1- \tanh ^2 (a(x-vt-x_0)) \right] e^{i(kx-\frac{1}{2}(k^2+2a^2+2(v-k)^2)t+\theta _0)}+ik\psi , \end{aligned}
(14)
and
\begin{aligned} \begin{aligned} \frac{\partial \psi }{\partial t}=&-\frac{av}{\sqrt{\beta }}\left[ 1- \tanh ^2 (a(x-vt-x_0)) \right] e^{i(kx-\frac{1}{2}(k^2+2a^2+2(v-k)^2)t+\theta _0)}\\&-\frac{i}{2}(k^2+2a^2+2(v-k)^2)\psi . \end{aligned} \end{aligned}
(15)
Considering $$a^2+(v-k)^2= \beta b^2$$, we have
\begin{aligned} i\frac{\partial \psi }{\partial t} = -iv\frac{\partial \psi }{\partial x}+(\beta b^2+\frac{1}{2}k^2-kv) \psi _{D2}. \end{aligned}
(16)
If $$v>0$$, soliton go across the right boundary, and if $$v<0$$, the soliton go across the left boundary. We have
\begin{aligned} i\frac{\partial \psi }{\partial t} = -iv\frac{\partial \psi }{\partial x}+(\beta b^2+\frac{1}{2}k^2-kv) \psi . \end{aligned}
(17)
For a second order finite difference scheme, the discrete derivative boundary condition for the right boundary point is
\begin{aligned} \psi _{J+1} = \frac{(-2h^2(\beta b^2+\frac{1}{2}k^2-kv)+2+2h^2\beta |\psi _J|^2)\psi _{J}-(1+ivh)\psi _{J-1}}{1-ivh}. \end{aligned}
(18)
There appears a parameter v, defined as the speed of the soliton. We notice that it is not the velocity of background wave. We use the relay-zone technique to measure this parameter v.
In summary, we have introduced Robin boundary condition and proposed derivative boundary condition. Robin boundary condition does not depend on any parameters of the solitons. They can treat the background solution. Derivative boundary condition which uses more information or parameters of solitons can match the soliton with a certain speed. In order to be able to deal with several solitons with different speed together, we use the relay-zone technique based on the boundary conditions above (Fig. 4).
1. 1.

Use Robin boundary condition (12) on the boundary point $$x_R+2b$$.

2. 2.

If $$\min _{x_R<x<x_R+b}|\psi (x,t)|^2<\eta ^2 b^2/\beta$$ (here $$\eta \in (0,1)$$ is an adjustable parameter and we choose $$\eta =0.9$$ in simulations), and the minimum modulus of $$\psi$$ is located at the points $$x_R$$ and $$x_R+b$$, we consider that the soliton is located in the velocity zone. Record the current coordinates $$x^{n_1}$$ and time step $$t^{n_1}$$.

3. 3.

If the soliton locates on one of the grid points $$\{ x_R+b-h,x_R+b,x_R+b+h \}$$, record the current coordinate $$x^{n_2}$$ and the time step $$t^{n_2}$$. Calculate the soliton’s speed $$v=\displaystyle \frac{x^{n_2}-x^{n_1}}{t^{n_2}-t^{n_1}}$$.

4. 4.

Change the boundary condition to derivative boundary condition (18) from $$t=t^{n_2}$$ to $$t^{n_2}+2b/v$$. Then change back to Robin boundary condition (12) and return to step 1 when $$t>t^{n_2}+2b/v$$.

## Numerical Validation

In this section, we perform several numerical tests to verify the effectiveness of the above boundary conditions. We take the standard fourth order Runge–Kutta scheme for time integration of Eq. (10) and the boundary conditions (12) and (18). First, we test the effectiveness of the derivative boundary condition for defocusing NLSE. Then we show the effectiveness of relay-zone technique for computing single/two dark solitons going across the boundary.

In all our tests, we select the dimensionless constant $$\beta =1.$$

We define the error on the right boundary
\begin{aligned} \varepsilon (T) =\max _{0<t<T}\left| \psi _{exa}(x_R,t)-\psi _{num}(x_R,t) \right| , \end{aligned}
(19)
and the $$L^{\infty }$$-error for the interior points
\begin{aligned} \varepsilon ^{\infty } (T) =\max _{x_L<x<x_R}\max _{0<t<T}\left| \psi _{exa}(x,t)-\psi _{num}(x,t) \right| , \end{aligned}
(20)
Here $$\psi _{exa}$$ denotes the exact or reference solution, and $$\psi _{num}$$ denotes the numerical solution with corresponding boundary conditions. We choose the final time T so that the soltions leave the computational domain completely at $$t=T$$.
We test the derivative boundary conditions first. We compute a single soliton in a bounded domain. The computational domain is $$[-4,4]$$, and the center of dark soliton is $$x_0=0$$. Moreover, we take $$b^2=2$$, $$k=0$$, $$v=\sqrt{b^2-a^2}$$ or $$k=1$$, $$v=\sqrt{b^2-a^2}+1$$, the final time $$T=8$$. We select mesh size as $$h=0.025$$, $$\varDelta t = 6.25\times 10^{-4}$$.

Figure 5 shows the error $$\varepsilon (T)$$ with different a. The error is less than $$10^{-3}$$. It proves that derivative boundary condition matches the dark soliton very well if a correct speed v is known in advance.

Furthermore, we select $$a=1$$ in above example. The error against the mesh size h is shown in Tables 1 and 2.
Table 1

Error with different mesh size with background parameter $$k=0$$

h

0.1

0.05

0.025

$$\varepsilon (T)$$

$$6.1\times 10^{-3}$$

$$1.8 \times 10^{-3}$$

$$8\times 10^{-4}$$

$$\varepsilon ^{\infty } (T)$$

$$6.4\times 10^{-3}$$

$$1.9 \times 10^{-3}$$

$$8\times 10^{-4}$$

Table 2

Error with different mesh size with background parameter $$k=1$$

h

0.1

0.05

0.025

$$\varepsilon (T)$$

$$7.6\times 10^{-3}$$

$$2.1 \times 10^{-3}$$

$$9\times 10^{-4}$$

$$\varepsilon ^{\infty } (T)$$

$$7.6\times 10^{-3}$$

$$2.1 \times 10^{-3}$$

$$9\times 10^{-4}$$

With the mesh width getting smaller and smaller, the error at boundary points gets smaller and smaller. With different background parameter k, there are not many differences. The error is less than 1/1000 if we select $$h=0.025$$. Thus this boundary condition may serve as a non-reflective boundary condition.
Table 3

Boundary conditions for the sensitivity of a given speed ($$k=0$$, $$h=0.025$$)

$$v_{num}/v$$

0.96

0.97

0.98

0.99

1

$$\varepsilon (T)$$

$$1.540\times 10^{-2}$$

$$1.102 \times 10^{-2}$$

$$7.865\times 10^{-3}$$

$$4.215\times 10^{-3}$$

$$8.191\times 10^{-4}$$

$$\varepsilon ^{\infty } (T)$$

$$1.540\times 10^{-2}$$

$$1.102 \times 10^{-2}$$

$$7.865\times 10^{-3}$$

$$4.215\times 10^{-3}$$

$$1.044\times 10^{-3}$$

$$v_{num}/v$$

1.01

1.02

1.03

1.04

1.05

$$\varepsilon (T)$$

$$3.175\times 10^{-3}$$

$$6.344 \times 10^{-3}$$

$$9.549\times 10^{-3}$$

$$1.235\times 10^{-2}$$

$$1.654\times 10^{-2}$$

$$\varepsilon ^{\infty } (T)$$

$$3.175\times 10^{-3}$$

$$6.344 \times 10^{-3}$$

$$9.549\times 10^{-3}$$

$$1.235\times 10^{-2}$$

$$1.654\times 10^{-2}$$

Table 4

Boundary conditions for the sensitivity of a given speed ($$k=1$$, $$h=0.025$$)

$$v_{num}/v$$

0.96

0.97

0.98

0.99

1

$$\varepsilon (T)$$

$$1.440\times 10^{-2}$$

$$1.039 \times 10^{-2}$$

$$7.115\times 10^{-3}$$

$$4.402\times 10^{-3}$$

$$9.107\times 10^{-4}$$

$$\varepsilon ^{\infty } (T)$$

$$1.440\times 10^{-2}$$

$$1.039 \times 10^{-2}$$

$$7.115\times 10^{-3}$$

$$4.402\times 10^{-3}$$

$$9.151\times 10^{-4}$$

$$v_{num}/v$$

1.01

1.02

1.03

1.04

1.05

$$\varepsilon (T)$$

$$4.141\times 10^{-3}$$

$$8.175\times 10^{-3}$$

$$1.181\times 10^{-2}$$

$$1.427\times 10^{-2}$$

$$1.861\times 10^{-2}$$

$$\varepsilon ^{\infty } (T)$$

$$4.141\times 10^{-3}$$

$$8.175\times 10^{-3}$$

$$1.181\times 10^{-2}$$

$$1.427\times 10^{-2}$$

$$1.861\times 10^{-2}$$

In practice, the speed obtained from relay-zone technique introduces a certain deviation from the exact value. If the parameter v kas a little deviation, can the derivative boundary condition work? We choose the same example, and replace the “numerical” $$v_{num}$$ by $$v_{num}=\rho v$$. $$\rho$$ changes between 0.95 and 1.05. The mesh size is $$h=0.025$$. Tables 3 and 4 show their errors. The error increases with the deviation of $$\rho$$ from 1. In fact, in this numerical discretization, if $$\rho \in (0.98,1.02)$$, the error at the boundary can be controlled within 1/100.

Then we turn to test the relay-zone technique.
First, we test a single soliton. Set $$a=2$$ ,$$v=2$$ and $$k=0$$. The mesh size is $$h=0.025$$. The initial computational domain is $$[-4,4]$$. Since $$2b=4\sqrt{2}\approx 5.656$$, we set new computational domain to $$[-4,10]$$, which contains the relay zone [4, 10]. The numerical result is shown in Fig. 6. The lines at background are almost straight lines. The soliton can easily go across the boundary, without visible reflection using the relay-zone technique. We calculate the error $$\varepsilon (T)= 2.261\times 10^{-3}$$.
Next, we test another soliton with low speed and sharp hump. We set $$a=3$$, $$v=0.8$$, $$k=0$$ and $$x_0=0$$. The initial computational domain is $$[-5,5]$$. The mesh size is $$h=0.025$$. Noticing $$b=\sqrt{a^2+v^2}\approx 3.1$$, we set the whole domain as $$[-5,12]$$. Numerical result is shown in Fig. 7. At $$t=15$$, the soliton goes to the numerical boundary $$x=12$$ and then crosses the boundary, without producing a significant numerical reflection. From the data, we know that at $$t=12.5$$, the velocity zone begins to measure speed. At $$t=21.5$$, we calculate $$v_{num}=0.3994$$, which is almost the same as the speed we set $$v=4$$ ($$\rho =0.9985$$). From the above analysis, we know that the accuracy of the speed of sufficient derivative boundary conditions quite perfectly match the soliton. Numerical results also verify them.

Then we test another dark soliton. The initial center of the soliton locates at $$x_0=0$$. We set $$a=2$$, $$v=2$$ and $$k=1$$. The initial computational domain is $$[-5,5]$$. The mesh size is $$h=0.025$$. Since $$2b=2\sqrt{a^2+(v-k)^2}\approx 4.4721$$, we approximately set the width of the relay zone as 5. The whole domain is $$[-5,12]$$. Figure 8 shows the numerical result. The soliton goes across the boundary $$x=12$$. The numerical reflection is not seen in the later process.

The numerical examples demonstrate that the relay-zone technique is effective for a single soliton.
Now we turn to compute two dark solitons in a bounded domain. The first example we present is two dark solitons with the same background parameter $$k=0$$, and different speeds going out of the domain from the boundary. We select the initial data as
\begin{aligned} \psi (x,0)= \left\{ \begin{aligned}&\sqrt{7}\tanh (\sqrt{7}(x+5))+i,\quad&x<0,\\&[2\tanh (2(x-5))+2i]e^{i\theta _0},&x\ge 0. \end{aligned} \right. \end{aligned}
(21)
This initial data contains two dark solitons. They have the same modulus of background $$a_1^2+v_1^2=a_2^2+v_2^2=b^2$$, where $$a_1=\sqrt{7}$$, $$v_1=1$$, $$a_2=2$$ and $$v_2=2$$. They locate at $$x_0^1=-5$$ and $$x_0^2=5$$, respectively. To determine the parameter $$e^{i\theta _0}$$, we use the continuity condition on $$x=0$$.
\begin{aligned} e^{i\theta _0} = \frac{\sqrt{7}\tanh (5\sqrt{7})+i}{2\tanh (-10)+2i}\approx \frac{\sqrt{7}+i}{-2+2i}. \end{aligned}
The initial computational domain is $$[-8,8]$$. Since $$2b\approx 5.6569$$, we set the length of relay zone is 6. The whole domain as $$[-8,14]$$. Figure 9 shows the result. At $$t=1.5$$, the soliton with high speed goes into the velocity zone, and boundary condition turns to derivative boundary condition at $$t=3$$. Afterwards, the “fast” soliton goes out of the computational domain smoothly without any numerical reflection visible. Then $$x=14$$ turns to Robin boundary condition at $$t=4.5$$. The soliton with low speed goes into the velocity zone after $$t=13$$ and the boundary $$x=14$$ turns to derivative boundary condition at $$t=16$$. There is not obserable reflection.
Now we take is two dark solitons with parameter $$k=1$$ and different speeds across the boundary. We select the initial data
\begin{aligned} \psi (x,0)= \left\{ \begin{aligned}&2\tanh (2(x+5))\exp (ikx),\quad&x<0,\\&[\sqrt{3}\tanh (\sqrt{3}(x-5))+i]\exp (ikx)e^{i\tilde{\theta } _0},&x\ge 0. \end{aligned} \right. \end{aligned}
(22)
This initial data contains two dark solitons. They have the same modulus of background $$a_1^2+(v_1-k)^2=a_2^2+(v_2-k)^2=b^2$$, where $$k=1$$, $$a_1=2$$, $$v_1=1$$, $$a_2=\sqrt{3}$$ and $$v_2=2$$. They initially locate at $$x_0^1=-5$$ and $$x_0^2=5$$, respectively. $$e^{i\tilde{\theta } _0}$$ can be calculated as
\begin{aligned} e^{i\tilde{\theta } _0} = \frac{\sqrt{7}\tanh (5\sqrt{7})+i}{2\tanh (10)+2i}\approx \frac{\sqrt{7}+i}{2+2i}. \end{aligned}
The initial computational domain is $$[-10,10]$$. Since $$2b\approx 4$$, we set the length of relay zone as 4. The whole domain as $$[-10,14]$$. Figure 9 shows the result. Again the boundary treatment are effective in computing theses dark solitons (Fig. 10).

## Stability and Interaction of Dark Solitons

Now we apply the numerical boundary treatment to study the stability of dark soliton and their interactions. Similarly, we take $$\beta = 1$$ in (1).

For the study of stability, we choose initial data as dark soliton with a perturbation as
\begin{aligned} \psi _0(x)=\frac{1}{\sqrt{\beta }}\left[ a \tanh (a(x-x_0))+i(v-k) \right] e^{i(kx+{\theta }_0)}+\varepsilon e^{-(x-x_0+x_1)^2}. \end{aligned}
(23)
Two examples are considered, on with $$a=0.75$$, $$v=1.2$$, $$k=0$$, $$x_0=0$$, $$x_1=0.1$$ and $$\theta _0=0$$ and the other with $$a=2$$, $$v=1$$, $$k=1$$, $$x_0=0$$, $$x_1=0.1$$ and $$\theta _0=0$$. The problems are solved numerically on $$[-14,14]$$ and $$[-10,10]$$, respectively. The mesh sizes are both $$h=0.006$$ and the time step size $$\varDelta t=10^{-3}$$.
The error is defined as
\begin{aligned} e_{\infty } (t):=\max _{x\in [x_l,x_r]}|\psi _{num}(x,t)-\psi _{exa}(x,t)|. \end{aligned}
(24)
Here $$\psi _{num}$$ is the numerical solution used relay-zone technique boundary treatment, and $$\psi _{exa}$$ is defined as (4). Figures 11 and 12 depict the time evolution of the error between the solution $$\psi$$ of NLSE (1) with the above initial data and its corresponding dark soliton. These results clearly show that the soliton is dynamically stable in numerical NLSE (1) using our new boundary treatment.
To study the interaction of dark solitons, we choose the initial data $$\psi _0$$ as
\begin{aligned} \psi _0=e^{ikx} \left\{ \begin{aligned}&a\tanh (a(x+x_0))+i(v_1-k),\quad&x<0,\\&-[a\tanh (a(x-x_0))+i(v_2-k)],&x\ge 0. \end{aligned} \right. \end{aligned}
(25)
The two dark solitons are initially centered at $$x=\pm x_0$$, and well separated with $$x_0>0$$. k is the ’velocity’ of phase background. $$v_1$$ and $$v_2$$ are the velocities of the left-going soliton and right-going soliton, respectively. It holds that $$v_1+v_2=2k$$. The problem is solved numerically on $$[-15,15]$$, with mesh size $$h = 0.02$$ and time step size $$\varDelta t=10^{-4}$$.

Figure 13 shows time evolution of the density $$\psi$$ for the interaction of two dark solitons of NLSE under different parameter values of $$x_0$$, k, a, $$v_1$$ and $$v_2$$. As shown in these figures, the solitons cross each other and the peak value of the amplitude is equal to the sum of the peak values of the two solitons initially. The solitons separate completely after interaction. Then two solitons go across the numerical boundaries. The proposed boundary treatment is capable to numerically study the interactions of dark solitons.

## Conclusion

In this work, we propose the relay-zone technique for dark soliton simulation in defocusing nonlinear Schrödinger equation. It is based on the Robin boundary condition and the derivative boundary condition. We numerically demonstrate that the derivative boundary condition perfectly match the soliton solution. The solitons go across the boundary perfectly using relay-zone technique. Numerical results demonstrate the effectiveness of the proposed treatment. The algorithm is numerically effectient. We also numerically prove this new method is dynamically stable in numerical NLSE (1). The study of interaction of dark solitons demonstrate the effectiveness again. To our knowledge, this gives for the first time an effective numerical boundary treatment for computing dark soliton in NLSE.

For the future work, please note that it is more difficult to design the artificial boundary conditions for higher dimensional problems. First, we should solve the asymptotic analysis of the solution as one dimensional case. Secondly, the law of motion dynamic of the higher dimensional dark soliton should also be solved analytically. Otherwise, we have no chance to design an effective boundary condition for higher dimensional defocusing nonlinear Schrödinger equation.

## Notes

### Acknowledgements

The research is partially supported by NSFC under Contract no. 11521202 and China Postdoctoral Science Foundation Funded Project no. 2016M600902.

## References

1. 1.
F. Abdullaev, S. Darmanyan, P. Khabibullaev, Optical Solitons (World Scientific, Singapore, 1991)
2. 2.
M.J. Ablowitz, H. Segur, Solitons and the Inverse Scattering Transform (SIAM, Thailand, 1981)
3. 3.
G.P. Agrawal, Nonlinear Fiber Optics (Academic Press, London, 2007)
4. 4.
G. Akrivis, V.A. Dougalis, O. Karakashian, Solving the systems of equations arising in the discretization of some nonlinear PDE’s by implicit Runge–Kutta methods. RAIRO Modél. Math. Anal. Numér. 31, 251–287 (1997)
5. 5.
G.D. Akrivis, Finite difference discretization of the cubic Schrödinger equation. IMA J. Numer. Anal. 13, 115–124 (1993)
6. 6.
X. Antoine, A. Arnold, C. Besse, M. Ehrhardt, A. Schädle, A Review of Transparent and Artificial Boundary Conditions Techniques for Linear and Nonlinear Schrödinger Equations (WIAS, Berlin, 2008)
7. 7.
X. Antoine, W. Bao, C. Besse, Computational methods for the dynamics of the nonlinear Schrödinger/Gross–Pitaevskii equations. Comput. Phys. Commun. 184, 2621–2633 (2013)
8. 8.
X. Antoine, C. Besse, Unconditionally stable discretization schemes of non-reflecting boundary conditions for the one-dimensional Schrödinger equation. J. Comput. Phys. 188, 157–175 (2003)
9. 9.
X. Antoine, C. Besse, S. Descombes, Artificial boundary conditions for one-dimensional cubic nonlinear Schrödinger equations. SIAM J. Numer. Anal. 43, 2272–2293 (2006)
10. 10.
A. Arnold, Mathematical concepts of open quantum boundary conditions. Transport Theory Stat. Phys. 30, 561–584 (2001)
11. 11.
G. Assanto, T.R. Marchant, A.A. Minzoni, N.F. Smyth, Reorientational versus kerr dark and gray solitary waves using modulation theory. Phys. Rev. E 84, 066602 (2011)
12. 12.
W. Bao, Y. Cai, Mathematical theory and numerical methods for Bose–Einstein condensation. Kinet. Relat. Models 6, 1–135 (2013)
13. 13.
W. Bao, Numerical methods for the nonlinear Schrödinger equation with nonzero far-field conditions. Methods Appl. Anal. 11, 367–388 (2004)
14. 14.
W. Bao, D. Jaksch, P.A. Markowich, Numerical solution of the Gross–Pitaevskii equation for Bose–Einstein condensation. J. Comput. Phys. 187, 318–342 (2003)
15. 15.
W. Bao, S. Jin, P.A. Markowich, On time-splitting spectral approximations for the Schrödinger equation in the semiclassical regime. J. Comput. Phys. 175, 487–524 (2002)
16. 16.
W. Bao, Q. Tang, Z. Xu, Numerical methods and comparison for computing dark and bright solitons in the nonlinear Schrödinger equation. J. Comput. Phys. 235, 423–445 (2013)
17. 17.
C.F. Barenghi, R.J. Donnelly, W. Vinen, Quantized Vortex Dynamics and Superfluid Turbulence, vol. 571 (Springer, Berlin, 2001)
18. 18.
C. Besse, B. Bidégaray, S. Descombes, Order estimates in time of splitting methods for the nonlinear Schrödinger equation. SIAM J. Numer. Anal. 40, 26–40 (2002)
19. 19.
R.M. Caplan, R. Carretero-González, A modulus-squared dirichlet boundary condition for time-dependent complex partial differential equations and its application to the nonlinear Schrodinger equation. SIAM J. Sci. Comput. 36, A1–A19 (2014)
20. 20.
A.V. Carpentier, J. Belmonte-Beitia, H. Michinel, M. Rodas-Verde, Laser tweezers for atomic solitons. J. Mod. Opt. 55, 2819–2829 (2008)
21. 21.
R. Carretero-González, D. Frantzeskakis, P. Kevrekidis, Nonlinear waves in Bose–Einstein condensates: physical relevance and mathematical techniques. Nonlinearity 21, R139 (2008)
22. 22.
T. Dauxois, M. Peyrard, Physics of Solitons (Cambridge University Press, Cambridge, 2006)
23. 23.
A.S. Davydov, Solitons in molecular systems. Phys. Scr. 20, 387 (1979)
24. 24.
A.B. De Monvel, A.S. Fokas, D. Shepelsky, Analysis of the global relation for the nonlinear Schrödinger equation on the half-line. Lett. Math. Phys. 65, 199–212 (2003)
25. 25.
M. Delfour, M. Fortin, G. Payr, Finite-difference solutions of a non-linear Schrödinger equation. J. Comput. Phys. 44, 277–288 (1981)
26. 26.
P.A.M. Dirac, The Principles of Quantum Mechanics, no. 27 (Oxford University Press, Oxford, 1981)Google Scholar
27. 27.
D. Frantzeskakis, Dark solitons in atomic Bose–Einstein condensates: from theory to experiments. J. Phys. A Math. Theor. 43, 213001 (2010)
28. 28.
E.P. Gross, Structure of a Quantized Vortex in Boson Systems, Il Nuovo Cimento (1955–1965), 20, pp. 454–477 (1961)Google Scholar
29. 29.
M. Helal, Soliton solution of some nonlinear partial differential equations and its applications in fluid mechanics. Chaos Solitons Fract. 13, 1917–1929 (2002)
30. 30.
T. Hohage, F. Schmidt, L. Zschiedrich, Solving time-harmonic scattering problems based on the pole condition I: Theory. SIAM J. Math. Anal. 35, 183–210 (2003)
31. 31.
L. Khaykovich, F. Schreck, G. Ferrari, T. Bourdel, J. Cubizolles, L. Carr, Y. Castin, C. Salomon, Formation of a matter-wave bright soliton. Science 296, 1290–1293 (2002)
32. 32.
Y.S. Kivshar, B. Luther-Davies, Dark optical solitons: physics and applications. Phys. Rep. 298, 81–197 (1998)
33. 33.
Y.S. Kivshar, X. Yang, Perturbation-induced dynamics of dark solitons. Phys. Rev. E 49, 1657 (1994)
34. 34.
G. Lenz, P. Meystre, E. Wright, Nonlinear atom optics: general formalism and atomic solitons. Phys. Rev. A 50, 1681 (1994)
35. 35.
P. Markowich, Applied Partial Differential Equations: A Visual Approach (Springer, Berlin, 2007)
36. 36.
B. Mayfield, Non-local Boundary Conditions for the Schrödinger Equation. PhD Thesis, University of Rhode Island, Providence, RI (1989)Google Scholar
37. 37.
A.C. Newell, Solitons in Mathematics and Physics (SIAM, Thailand, 1985)
38. 38.
A. Nicolin, A. Balaž, J. Sudharsan, R. Radha, Ground state of Bose–Einstein condensates with inhomogeneous scattering lengths. Rom. J. Phys. 59, 204 (2014)Google Scholar
39. 39.
G. Pang, L. Bian, S. Tang, ALmost EXact boundary condition for one-dimensional Schrödinger equations. Phys. Rev. E 86, 066709 (2012)
40. 40.
L. Pitaevskii, S. Stringari, Bose–Einstein Condensation and Superfluidity, vol. 164 (Oxford University Press, Oxford, 2016)
41. 41.
J.S. Russell, Report on Waves, in 14th Meeting of the British Association for the Advancement of Science, pp. 390–403 (1844)Google Scholar
42. 42.
A. Schädle, D. Ruprecht, F. Schmidt, Transparent Boundary Conditions—The Pole Condition Approach, in Proceedings of Waves, pp. 301–303 (2007)Google Scholar
43. 43.
F. Schmidt, P. Deuflhard, Discrete transparent boundary conditions for the numerical solution of Fresnel’s equation. Comput. Math. Appl. 29, 53–76 (1995)
44. 44.
F. Schmidt, D. Yevick, Discrete transparent boundary conditions for Schrödinger-type equations. J. Comput. Phys. 134, 96–107 (1997)
45. 45.
P. Shukla, A. Mamun, Solitons, shocks and vortices in dusty plasmas. N. J. Phys. 5, 17 (2003)
46. 46.
K.E. Strecker, G.B. Partridge, A.G. Truscott, R.G. Hulet, Formation and propagation of matter-wave soliton trains. Nature 417, 150–153 (2002)
47. 47.
S. Tang, W.K. Liu, E.G. Karpov, T.Y. Hou, Bridging atomistic/continuum scales in solids with moving dislocations. Chin. Phys. Lett. 24, 161 (2007)
48. 48.
I.M. Uzunov, V.S. Gerdjikov, Self-frequency shift of dark solitons in optical fibers. Phys. Rev. A 47, 1582 (1993)
49. 49.
A.-M. Wazwaz, New solitons and kink solutions for the Gardner equation. Commun. Nonlinear Sci. Numer. Simul. 12, 1395–1404 (2007)
50. 50.
J. Weideman, B. Herbst, Split-step methods for the solution of the nonlinear Schrödinger equation. SIAM J. Numer. Anal. 23, 485–507 (1986)
51. 51.
D. Yevick, T. Friese, F. Schmidt, A comparison of transparent boundary conditions for the Fresnel equation. J. Comput. Phys. 168, 433–444 (2001)
52. 52.
J. Zhang, Z. Xu, X. Wu, Unified approach to split absorbing boundary conditions for nonlinear Schrödinger equations. Phys. Rev. E 78, 026709 (2008)
53. 53.
C. Zheng, Exact nonreflecting boundary conditions for one-dimensional cubic nonlinear Schrödinger equations. J. Comput. Phys. 215, 552–565 (2006)
54. 54.
C. Zheng, A perfectly matched layer approach to the nonlinear Schrödinger wave equations. J. Comput. Phys. 227, 537–556 (2007)
55. 55.
G.E. Zouraris, On the convergence of a linear two-step finite element method for the nonlinear Schrödinger equation. ESAIM Math. Model. Numer. Anal 35, 389–405 (2001)