计算脉冲在非线性耦合器中演化的Matlab 程序 2YaTT& J
O~nBz):2
% This Matlab script file solves the coupled nonlinear Schrodinger equations of Z"4VHrA
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of xu`d`!Tx
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear K90D1sD
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 8xc8L1;
anpJAB:1
%fid=fopen('e21.dat','w'); neK*jdaP
N = 128; % Number of Fourier modes (Time domain sampling points) x_]",2 W'
M1 =3000; % Total number of space steps .QNjeMu.
J =100; % Steps between output of space SIj6.RK
T =10; % length of time windows:T*T0 {_": /A
T0=0.1; % input pulse width t*eleNYeS~
MN1=0; % initial value for the space output location ^u= PdBY
dt = T/N; % time step W<Bxm|
n = [-N/2:1:N/2-1]'; % Index :v|r= #OI
t = n.*dt; *;>V2!N=U
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 3we.*\2$
u20=u10.*0.0; % input to waveguide 2 uPM8GIvZX.
u1=u10; u2=u20; Ym3
"
U1 = u1; e?_c[`sg
U2 = u2; % Compute initial condition; save it in U .LWOM8)
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. F+lm [4n
w=2*pi*n./T; V]+o)A$
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T tU8g(ep,o
L=4; % length of evoluation to compare with S. Trillo's paper Z $ p^v*y
dz=L/M1; % space step, make sure nonlinear<0.05 de*,MkZN
for m1 = 1:1:M1 % Start space evolution ;a#}fX
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS Xi 1q]ps
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; ';i"?D?NAk
ca1 = fftshift(fft(u1)); % Take Fourier transform 6RR4L^(m
ca2 = fftshift(fft(u2)); rTN"SQt
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation <