计算脉冲在非线性耦合器中演化的Matlab 程序 @ZtvpL}e
!iUT Re
% This Matlab script file solves the coupled nonlinear Schrodinger equations of cK'}+
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of 'N/u<`)
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear y~wN:
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 N'?#g`*KW
5w</Ga
%fid=fopen('e21.dat','w'); kuv+ TN
N = 128; % Number of Fourier modes (Time domain sampling points) cZAf?,>u
M1 =3000; % Total number of space steps BuS[(
J =100; % Steps between output of space +aOX{1w
T =10; % length of time windows:T*T0 .<6'*XR
T0=0.1; % input pulse width /=KEM gI?
MN1=0; % initial value for the space output location 4"Mq]_D
dt = T/N; % time step 3GXmyo:o$
n = [-N/2:1:N/2-1]'; % Index KnUVR!H|
t = n.*dt; e)|5P
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 H~W=#Cx
u20=u10.*0.0; % input to waveguide 2 vP,$S^7$
u1=u10; u2=u20; EHrr}&
U1 = u1; H)5" <=]
U2 = u2; % Compute initial condition; save it in U Q 2B
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. l^rQo_alk
w=2*pi*n./T; 66scBi_d
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T =an0PN
L=4; % length of evoluation to compare with S. Trillo's paper ]m#*4
dz=L/M1; % space step, make sure nonlinear<0.05 i_p-|I:hQ
for m1 = 1:1:M1 % Start space evolution 6e"Lod_ L
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS (Z Q?1Qxo
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; m5cRHo<9Y
ca1 = fftshift(fft(u1)); % Take Fourier transform (.kzJ\x
ca2 = fftshift(fft(u2)); eU\_m5xl"
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation LmP pt3[
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift mH )i
u2 = ifft(fftshift(c2)); % Return to physical space Z5[g[Q
u1 = ifft(fftshift(c1)); {}BAQ9|q
if rem(m1,J) == 0 % Save output every J steps. @R ;&P