计算脉冲在非线性耦合器中演化的Matlab 程序 *F_ dP
*'BA#
/@
% This Matlab script file solves the coupled nonlinear Schrodinger equations of !}+rg2
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of /a'cP
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear @0v%5@
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 H0 %;t
c;M&;'#x
%fid=fopen('e21.dat','w'); GM{J3O=
N = 128; % Number of Fourier modes (Time domain sampling points) S|_} 0
M1 =3000; % Total number of space steps mh5ozv$
J =100; % Steps between output of space zfexaf!
T =10; % length of time windows:T*T0 )^D:VY92
T0=0.1; % input pulse width ` 6'dhB
MN1=0; % initial value for the space output location C{5^UCJkg
dt = T/N; % time step o5;V=8T;
n = [-N/2:1:N/2-1]'; % Index "&@v[O)!xu
t = n.*dt; p3f>;|uh_
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 8B|qNf `Yi
u20=u10.*0.0; % input to waveguide 2 XZ3)gYQi
u1=u10; u2=u20; %XUV[L}
U1 = u1; '9w.~@7
U2 = u2; % Compute initial condition; save it in U --t5jSS44
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. FlqE!6[[
w=2*pi*n./T; 83|7#L
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T '7j!B1K-
L=4; % length of evoluation to compare with S. Trillo's paper DjK
dz=L/M1; % space step, make sure nonlinear<0.05 c!2j+ORz
for m1 = 1:1:M1 % Start space evolution (:TZ~"VY
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS q|r/%[[!o
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; L{i,.aE/nO
ca1 = fftshift(fft(u1)); % Take Fourier transform kCuIEv@
ca2 = fftshift(fft(u2)); m:sT)
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation sC ^9
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift iuxS=3lT"K
u2 = ifft(fftshift(c2)); % Return to physical space .dr-I7&!
u1 = ifft(fftshift(c1)); <hvVh9
if rem(m1,J) == 0 % Save output every J steps. ;`(l)X+7
U1 = [U1 u1]; % put solutions in U array FFvF4]|L
U2=[U2 u2]; hG8!aJo
MN1=[MN1 m1]; <"SOH;w
z1=dz*MN1'; % output location KK|AXoBf
end 13lJq:bM
end $QbaPmHW
hg=abs(U1').*abs(U1'); % for data write to excel 0~;Owu
ha=[z1 hg]; % for data write to excel @h91: hb
t1=[0 t']; VD).UdUn
hh=[t1' ha']; % for data write to excel file gTby%6-\|
%dlmwrite('aa',hh,'\t'); % save data in the excel format ov@N13 ,$
figure(1) ar#Xe;T!
waterfall(t',z1',abs(U1').*abs(U1')) % t' is 1xn, z' is 1xm, and U1' is mxn Alh"ZT^*
figure(2) !
,*4d $
waterfall(t',z1',abs(U2').*abs(U2')) % t' is 1xn, z' is 1xm, and U1' is mxn Q^_*&},V
i!U,qV1
非线性超快脉冲耦合的数值方法的Matlab程序 #*"5F*
lls-Nir%
在研究脉冲在非线性耦合器中的演变时,我们需要求解非线性偏微分方程组。在如下的论文中,我们提出了一种简洁的数值方法。 这里我们提供给大家用Matlab编写的计算程序。 L]_1z
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 o2J-&
|;[%ZE"
Fhr5)Z
;@&mR<5j
% This Matlab script file solves the nonlinear Schrodinger equations %xH2jf
% for 3 cores nonlinear coupler. The output plot is shown in Fig.2 of ];n3H~2
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear 7"iUyZ(
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 )uJu.foE
, (Bo .(]
C=1; eOdB<He36
M1=120, % integer for amplitude oOj7y>Nm
M3=5000; % integer for length of coupler #"6O3.P
N = 512; % Number of Fourier modes (Time domain sampling points) K< ;I*cAX
dz =3.14159/(sqrt(2.)*C)/M3; % length of coupler is divided into M3 segments, make sure nonlinearity<0.05. p}r1@L s
T =40; % length of time:T*T0. 3a_=e
B
dt = T/N; % time step $XOs(>~"r
n = [-N/2:1:N/2-1]'; % Index ?df*Y5I2
t = n.*dt; v_7?Zik8E
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. 1_aUU,|.
w=2*pi*n./T; 5R?[My
g1=-i*ww./2; u3Qm"? $`
g2=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./TP=0; { !;I4W%!
g3=-i*ww./2; =gYKAr^p5
P1=0; U<