计算脉冲在非线性耦合器中演化的Matlab 程序 % rBzA<
[4)Oi-_Y>
% This Matlab script file solves the coupled nonlinear Schrodinger equations of x*7@b8J
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of 2u{~35
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear bR\7j+*&
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 Hv,|XE@Y
Qg> NJ\*Q
%fid=fopen('e21.dat','w'); Psb !Z(
N = 128; % Number of Fourier modes (Time domain sampling points) ggso9ZlLu+
M1 =3000; % Total number of space steps uvys>]+
J =100; % Steps between output of space s%[F,hQRk
T =10; % length of time windows:T*T0 %6K7uvTq
T0=0.1; % input pulse width ,'L>:pF3
MN1=0; % initial value for the space output location q0sf\|'<}
dt = T/N; % time step 2y[Q
n = [-N/2:1:N/2-1]'; % Index *TOd Iq&z
t = n.*dt; #w$Y1bjn
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 ;(Yb9Mr)z
u20=u10.*0.0; % input to waveguide 2 A40DbD\^ad
u1=u10; u2=u20; qGk+4 yC
U1 = u1; ^2+Ex+
U2 = u2; % Compute initial condition; save it in U ,H7X_KbFD4
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. 2.qPMqH
w=2*pi*n./T; C6+ 5G-Z
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T P^Hgm
L=4; % length of evoluation to compare with S. Trillo's paper Q*M# e
dz=L/M1; % space step, make sure nonlinear<0.05 T,38Pu@r
for m1 = 1:1:M1 % Start space evolution ,EqQU|
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS VQ=
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; 5Cf!NNV
ca1 = fftshift(fft(u1)); % Take Fourier transform sz7*x{E
ca2 = fftshift(fft(u2)); CEfqFn3^
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation UmKE]1Yw4r
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift r&=ulg
u2 = ifft(fftshift(c2)); % Return to physical space g)Z8WH$;H3
u1 = ifft(fftshift(c1)); 2=cx`"a$
if rem(m1,J) == 0 % Save output every J steps. W'G|sk
U1 = [U1 u1]; % put solutions in U array j?T'N:Qd
U2=[U2 u2]; PgtLyzc
MN1=[MN1 m1]; c~|(j \FI
z1=dz*MN1'; % output location [@$ SLl^Y
end 79DNNj~
end VZ]iep
hg=abs(U1').*abs(U1'); % for data write to excel 2mY!gVi
ha=[z1 hg]; % for data write to excel |3$Ew.
t1=[0 t']; 4KPnV+h"b
hh=[t1' ha']; % for data write to excel file uYW4$6S3
%dlmwrite('aa',hh,'\t'); % save data in the excel format oZ{,IZ45
figure(1) Jb,54uN
waterfall(t',z1',abs(U1').*abs(U1')) % t' is 1xn, z' is 1xm, and U1' is mxn W]4Z4&