计算脉冲在非线性耦合器中演化的Matlab 程序 `[:f;2(@
!D6@ \
% This Matlab script file solves the coupled nonlinear Schrodinger equations of GQ[\R&]q<
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of O^IpfS\/
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear a]ftE\99
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 YHAy+S
S&QZ"4jq
%fid=fopen('e21.dat','w'); xUeLX`73
N = 128; % Number of Fourier modes (Time domain sampling points) +q=/}|
M1 =3000; % Total number of space steps 3-Ti'xM
J =100; % Steps between output of space U~T/f-CT
T =10; % length of time windows:T*T0 w-\GrxlbX
T0=0.1; % input pulse width icnp^2P
MN1=0; % initial value for the space output location a"ht\v}1
dt = T/N; % time step 2} T"|56
n = [-N/2:1:N/2-1]'; % Index R_Z
H+@O
t = n.*dt; D vK}UAj=
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 NDI|;
u20=u10.*0.0; % input to waveguide 2 .IG(Y!cB
u1=u10; u2=u20; g@S"!9[;U
U1 = u1; py,z7_Nuh
U2 = u2; % Compute initial condition; save it in U JM!o(zbt
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. 9 s>JdAw?
w=2*pi*n./T; p~M^' k=d
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T p'_*>%4~
L=4; % length of evoluation to compare with S. Trillo's paper BGUP-_&
dz=L/M1; % space step, make sure nonlinear<0.05 O-mP{
for m1 = 1:1:M1 % Start space evolution WAob"`8]
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS ,c7 8O8|
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; XRaq\a`=:
ca1 = fftshift(fft(u1)); % Take Fourier transform ;zp0,[r
ca2 = fftshift(fft(u2)); ,H.q%!{h_
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation h"q`gj
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift >-]Y%O;}
u2 = ifft(fftshift(c2)); % Return to physical space *,z__S$Q)
u1 = ifft(fftshift(c1)); ^Dd$8$?[
if rem(m1,J) == 0 % Save output every J steps. oU{m\r
U1 = [U1 u1]; % put solutions in U array /tV)8pEj
U2=[U2 u2]; yyBy|7QgO
MN1=[MN1 m1]; :}j{ NM#
z1=dz*MN1'; % output location wLNO\JP'
end Q;`#ujxL
end 4GaF:/
hg=abs(U1').*abs(U1'); % for data write to excel /(XtNtO*
ha=[z1 hg]; % for data write to excel ZG<