计算脉冲在非线性耦合器中演化的Matlab 程序 o7gYj\
D.[h`Hkc
% This Matlab script file solves the coupled nonlinear Schrodinger equations of /Pbytu);ds
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of BE0Ov{'
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear (-}:'5|Yj
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 K#"J8h;x
`!Z0;qk
%fid=fopen('e21.dat','w'); EF>vu+YK
N = 128; % Number of Fourier modes (Time domain sampling points) i2+r#Hw#5R
M1 =3000; % Total number of space steps \eF_Xk[
J =100; % Steps between output of space #}PQ !gZ
T =10; % length of time windows:T*T0 A&?8 rc
T0=0.1; % input pulse width 5taR[ukM
MN1=0; % initial value for the space output location R"wBDWs
dt = T/N; % time step uOQ!av2"Rf
n = [-N/2:1:N/2-1]'; % Index *|gY7Av*
t = n.*dt; ]QU
9|1
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 |~K 5]
u20=u10.*0.0; % input to waveguide 2 ZZs@P#]
u1=u10; u2=u20; 5VS};&f
U1 = u1; /M :7
U2 = u2; % Compute initial condition; save it in U ^cUmLzM
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. M2kvj'WWq
w=2*pi*n./T; ,59G6o
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T k!Ym<RD%N
L=4; % length of evoluation to compare with S. Trillo's paper |2Vhj<6
dz=L/M1; % space step, make sure nonlinear<0.05 cp:U@Nh(
for m1 = 1:1:M1 % Start space evolution .B+Bl/
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS %K`th&331
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; }s7@0#j@a
ca1 = fftshift(fft(u1)); % Take Fourier transform XnwVK
ca2 = fftshift(fft(u2)); adcH3rV
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation +TZVx(Z&A
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift @~z4GTF9i
u2 = ifft(fftshift(c2)); % Return to physical space ~hZr1hT6L
u1 = ifft(fftshift(c1)); *b}/fG)XZ
if rem(m1,J) == 0 % Save output every J steps. 3 <