计算脉冲在非线性耦合器中演化的Matlab 程序 {fI"p;|
x~u"KU2B
% This Matlab script file solves the coupled nonlinear Schrodinger equations of >e^^YR^
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of I&9Itn p$
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear dvu8V_U
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 FaLc*CU
y#{v\h
Cz
%fid=fopen('e21.dat','w'); Q#5~"C
N = 128; % Number of Fourier modes (Time domain sampling points) c->.eL%
M1 =3000; % Total number of space steps eL_Il.:
J =100; % Steps between output of space }0}=-g&
T =10; % length of time windows:T*T0 Dnp><%
T0=0.1; % input pulse width a7}O.NDf
MN1=0; % initial value for the space output location mu{\_JX.A
dt = T/N; % time step VZ$^:.I0
n = [-N/2:1:N/2-1]'; % Index c<ORmg6
t = n.*dt; %+iAL<S
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 2&zklXuo:
u20=u10.*0.0; % input to waveguide 2 1<;VD0XX
u1=u10; u2=u20; D@)L?AB1f
U1 = u1; * /^}
U2 = u2; % Compute initial condition; save it in U yVe<+Z\7
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. Om(Ir&0
w=2*pi*n./T; qH(HcsgD
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T ZkryoIQ%=
L=4; % length of evoluation to compare with S. Trillo's paper $kBcnk
dz=L/M1; % space step, make sure nonlinear<0.05 J^-a@'`+
for m1 = 1:1:M1 % Start space evolution 8osP$"/o
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS v Q51-.g
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; o]DYS,v
ca1 = fftshift(fft(u1)); % Take Fourier transform 5><T#0W?
ca2 = fftshift(fft(u2)); bTMgEY
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation TPn#cIPG
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift 7$mB.\|
u2 = ifft(fftshift(c2)); % Return to physical space \U>|^$4 #5
u1 = ifft(fftshift(c1)); (SMk!b]}
if rem(m1,J) == 0 % Save output every J steps. H.<