计算脉冲在非线性耦合器中演化的Matlab 程序 I#GsEhi
V>B*_J,z.
% This Matlab script file solves the coupled nonlinear Schrodinger equations of B{-+1f4
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of zK ir
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear \
Q0-yNt
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 Jkub|w#QH
0?\d%J!"S
%fid=fopen('e21.dat','w'); ]?j[P=\
N = 128; % Number of Fourier modes (Time domain sampling points) Avo"jN*<d
M1 =3000; % Total number of space steps vV /fTO
J =100; % Steps between output of space a3(q;^v
T =10; % length of time windows:T*T0 @P
xX]e
T0=0.1; % input pulse width >Wr
MN1=0; % initial value for the space output location UZ3oc[#D=]
dt = T/N; % time step te8lF{R
n = [-N/2:1:N/2-1]'; % Index jthGNVZ
t = n.*dt; Zmr*$,v<y
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 jBnvu@K "
u20=u10.*0.0; % input to waveguide 2 2:D1<z6RQ
u1=u10; u2=u20; CsW*E,|xyP
U1 = u1; qC$h~Epp4
U2 = u2; % Compute initial condition; save it in U ]2'{W]m
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. mp+lN:
w=2*pi*n./T; , K[}Bz
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T Q.`O;D}x
L=4; % length of evoluation to compare with S. Trillo's paper o9D]\PdL>
dz=L/M1; % space step, make sure nonlinear<0.05 qaN%&K9F8
for m1 = 1:1:M1 % Start space evolution } l4d/I
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS 4.0JgX
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; >aV
Q
ca1 = fftshift(fft(u1)); % Take Fourier transform K#oF=4_/|
ca2 = fftshift(fft(u2)); UXN!iU)
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation OBJk\j+Wi
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift LG3:V'|
u2 = ifft(fftshift(c2)); % Return to physical space )4/227b/(
u1 = ifft(fftshift(c1)); dr8`;$;G*
if rem(m1,J) == 0 % Save output every J steps. Kg MW
U1 = [U1 u1]; % put solutions in U array 4Js9"<w
U2=[U2 u2]; ;*_U)th
MN1=[MN1 m1]; Uq}-<q
z1=dz*MN1'; % output location K\]I@UTwq
end rezH5d6z62
end C!r9+z)<
hg=abs(U1').*abs(U1'); % for data write to excel M,nLPHgK
ha=[z1 hg]; % for data write to excel .ko}m{
t1=[0 t']; "vnWq=E2
hh=[t1' ha']; % for data write to excel file }n91aE3v
%dlmwrite('aa',hh,'\t'); % save data in the excel format D/=
AU
figure(1) *K1GX
waterfall(t',z1',abs(U1').*abs(U1')) % t' is 1xn, z' is 1xm, and U1' is mxn 1Ev#[FOc
figure(2) drZ1D s
waterfall(t',z1',abs(U2').*abs(U2')) % t' is 1xn, z' is 1xm, and U1' is mxn ".R5K ?
d9n{jv|
非线性超快脉冲耦合的数值方法的Matlab程序 EO[UezuU
p|b&hgA
在研究脉冲在非线性耦合器中的演变时,我们需要求解非线性偏微分方程组。在如下的论文中,我们提出了一种简洁的数值方法。 这里我们提供给大家用Matlab编写的计算程序。 MVpk/S%W
Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 $5;RQNhXh
8=h$6=1S
7f9i5E1
"Lp"o
% This Matlab script file solves the nonlinear Schrodinger equations G~\ SI.
% for 3 cores nonlinear coupler. The output plot is shown in Fig.2 of xRx8E;Q@h?
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear H _%yh,L
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 Ltt+BUJc
/6%<