In MATLAB solving Nonlinear Nonlocal Schrodinger equation when the nonlinear term is spatially nonlocal

25 views (last 30 days)
One of the methods solving it is, say,Pseudo-spectral method:
L=80; N=2048; dt=0.0001; tmax=20; nmax=round(tmax/dt);
dx=L/N; x=[-L/2:dx:L/2-dx]'; k=[0:N/2-1 -N/2:-1]'*2*pi/L; k2=k.^2;
u=1.2*sech(1.2*(x+20)).*exp(i*x)+0.8*sech(0.8*x);
udata=u; tdata=0;
for nn=1:nmax % integration begins
du1=1i*(ifft(-k2.*fft(u))+2*u.*u.*conj(u)); v=u+0.5*du1*dt;
du2=1i*(ifft(-k2.*fft(v))+2*v.*v.*conj(v)); v=u+0.5*du2*dt;
du3=1i*(ifft(-k2.*fft(v))+2*v.*v.*conj(v)); v=u+ du3*dt;
du4=1i*(ifft(-k2.*fft(v))+2*v.*v.*conj(v));
u=u+(du1+2*du2+2*du3+du4)*dt/6;
if mod(nn,round(nmax/25)) == 0
udata=[udata u]; tdata=[tdata nn*dt];
end
end % integration ends
mesh(x, tdata, abs(udata')); % solution plotting
colormap('jet'); view(10, 60)
grid on
text(-2, -6, 'x', 'fontsize', 15)
text(50, 5, 't', 'fontsize', 15)
zlabel('|u|', 'fontsize', 15)
axis([-L/2 L/2 0 tmax 0 2]); grid off
set(gca, 'xtick', [-40 -20 0 20 40])
set(gca, 'ytick', [0 10 20])
set(gca, 'ztick', [0 1 2])
This code solves the NLSE (STANDARD). In MATLAB the nonlinear term in standard NLSE reads as
u(x,t).*conj(u(x,t)).*u(x,t).
Now in nonlocal NLSE the same nonlinear term is :
u(x,t).*conj(u(-x,t)).*u(x,t)
with a '-' sign in conj(u(x,t)).
Now my question is: In NONLOCAL NLSE how the code is going to be changed, more specifically how the '-' sign of the nonlinear term is going to be taken care of in line no 6 to 9.
Thanks and regards: Samit

Answers (1)

Hafid yacine
Hafid yacine on 18 Jul 2016
let me see

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!