||
% This Matlab script file solves the nonlinear Schrodinger equations
% for 3 cores nonlinear coupler. The output plot is shown in Fig.2 of
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004
C=1;
M1=120, % integer for amplitude
M3=5000; % integer for length of coupler
N = 512; % Number of Fourier modes (Time domain sampling points)
dz =3.14159/(sqrt(2.)*C)/M3; % length of coupler is divided into M3 segments, make sure nonlinearity<0.05.
T =40; % length of time:T*T0.
dt = T/N; % time step
n = [-N/2:1:N/2-1]'; % Index
t = n.*dt;
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1.
w=2*pi*n./T;
g1=-i*ww./2;
g2=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./TP=0;
g3=-i*ww./2;
P1=0;
P2=0;
P3=1;
P=0;
for m1=1:M1
p=0.032*m1; %input amplitude
s10=p.*sech(p.*t); %input soliton pulse in waveguide 1
s1=s10;
s20=0.*s10; %input in waveguide 2
s30=0.*s10; %input in waveguide 3
s2=s20;
s3=s30;
p10=dt*(sum(abs(s10').*abs(s10'))-0.5*(abs(s10(N,1)*s10(N,1))+abs(s10(1,1)*s10(1,1))));
%energy in waveguide 1
p20=dt*(sum(abs(s20').*abs(s20'))-0.5*(abs(s20(N,1)*s20(N,1))+abs(s20(1,1)*s20(1,1))));
%energy in waveguide 2
p30=dt*(sum(abs(s30').*abs(s30'))-0.5*(abs(s30(N,1)*s30(N,1))+abs(s30(1,1)*s30(1,1))));
%energy in waveguide 3
for m3 = 1:1:M3 % Start space evolution
s1 = exp(dz*i*(abs(s1).*abs(s1))).*s1; % 1st step, Solve nonlinear part of NLS
s2 = exp(dz*i*(abs(s2).*abs(s2))).*s2;
s3 = exp(dz*i*(abs(s3).*abs(s3))).*s3;
sca1 = fftshift(fft(s1)); % Take Fourier transform
sca2 = fftshift(fft(s2));
sca3 = fftshift(fft(s3));
sc1=exp(g1.*dz).*(sca1+i*C*sca2.*dz); % 2nd step, frequency domain phase shift
sc2=exp(g2.*dz).*(sca2+i*C*(sca1+sca3).*dz);
sc3=exp(g3.*dz).*(sca3+i*C*sca2.*dz);
s3 = ifft(fftshift(sc3));
s2 = ifft(fftshift(sc2)); % Return to physical space
s1 = ifft(fftshift(sc1));
end
p1=dt*(sum(abs(s1').*abs(s1'))-0.5*(abs(s1(N,1)*s1(N,1))+abs(s1(1,1)*s1(1,1))));
p2=dt*(sum(abs(s2').*abs(s2'))-0.5*(abs(s2(N,1)*s2(N,1))+abs(s2(1,1)*s2(1,1))));
p3=dt*(sum(abs(s3').*abs(s3'))-0.5*(abs(s3(N,1)*s3(N,1))+abs(s3(1,1)*s3(1,1))));
P1=[P1 p1/p10];
P2=[P2 p2/p10];
P3=[P3 p3/p10];
P=[P p*p];
end
figure(1)
plot(P,P1, P,P2, P,P3);
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-27 07:06
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社