计算脉冲在非线性耦合器中演化的Matlab 程序
D+8d^-:
jA? #!lx_
% This Matlab script file solves the coupled nonlinear Schrodinger equations of \lL[08G
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of y48]|%73
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear Nk~}aj
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 c0Ug5Vr
owVvbC2<b(
%fid=fopen('e21.dat','w'); \j)Evjw
N = 128; % Number of Fourier modes (Time domain sampling points) K/4@2vF
M1 =3000; % Total number of space steps vwR_2u
J =100; % Steps between output of space >WLPE6E
T =10; % length of time windows:T*T0 ?z
,!iK`
T0=0.1; % input pulse width _sjS'*]
MN1=0; % initial value for the space output location !U`&a=k
dt = T/N; % time step {f*Y}/@
n = [-N/2:1:N/2-1]'; % Index AZ:7_4jz
t = n.*dt; F<4rn
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 I-v}
DuM
u20=u10.*0.0; % input to waveguide 2 ` Xc7b
u1=u10; u2=u20; :XKYfc_y
U1 = u1; [%IOB/{N
U2 = u2; % Compute initial condition; save it in U /i+z#q5'
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. 4^_6~ YP7
w=2*pi*n./T; ,CE/o7.FG
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T =4ygbk
L=4; % length of evoluation to compare with S. Trillo's paper LPs%^*8(2
dz=L/M1; % space step, make sure nonlinear<0.05 ?2<QoS
for m1 = 1:1:M1 % Start space evolution $0* sjXV
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS _S!^=9bJ
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; }"Y<<e<z:
ca1 = fftshift(fft(u1)); % Take Fourier transform Bz+oMN#XJ
ca2 = fftshift(fft(u2)); .Xg.,kW
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation HC0juT OiO
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift (qcFGM22U
u2 = ifft(fftshift(c2)); % Return to physical space zI88IM7/
u1 = ifft(fftshift(c1)); J_s`G
if rem(m1,J) == 0 % Save output every J steps. UG1<Xfu|
U1 = [U1 u1]; % put solutions in U array aRd~T6I
U2=[U2 u2]; bC&A@.g{
MN1=[MN1 m1]; b[%@3 }E
z1=dz*MN1'; % output location T2{e1 =Z7
end FT).$h~+4
end x07 =
hg=abs(U1').*abs(U1'); % for data write to excel M-WSdG[AJ
ha=[z1 hg]; % for data write to excel B=Hd:P|
t1=[0 t']; h*%p%t<