计算脉冲在非线性耦合器中演化的Matlab 程序 9L UP{(uq
9p!d Q x
% This Matlab script file solves the coupled nonlinear Schrodinger equations of WllCcD1
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of ">v_uq a
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear t(Cq(.u`:
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 bt.K<Y0
ZzwZ,(
%fid=fopen('e21.dat','w');
3RG/X
N = 128; % Number of Fourier modes (Time domain sampling points) *m2d#f
M1 =3000; % Total number of space steps ant-\w>}
J =100; % Steps between output of space V~tu<"%
T =10; % length of time windows:T*T0 .oB'ttF1
T0=0.1; % input pulse width :X]lXock0
MN1=0; % initial value for the space output location p2M?pV
dt = T/N; % time step c'm-XL_La
n = [-N/2:1:N/2-1]'; % Index +Uc&%Px
t = n.*dt; AF07KA#
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 M]pel\{M
u20=u10.*0.0; % input to waveguide 2 oc,U4+T
u1=u10; u2=u20; Ra*k
U1 = u1; gDjd{+LUo
U2 = u2; % Compute initial condition; save it in U RJ7/I/yD|
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. cviN$oL
w=2*pi*n./T; 9^=t@
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T FeincZ!M
L=4; % length of evoluation to compare with S. Trillo's paper ?`BED6$`G9
dz=L/M1; % space step, make sure nonlinear<0.05 '3Y0D1`v
for m1 = 1:1:M1 % Start space evolution J/H#d')c
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS '8((;N|I^
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; 8M5!5Jzv
ca1 = fftshift(fft(u1)); % Take Fourier transform ()rx>?x5
ca2 = fftshift(fft(u2)); QvT-&|
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation *U5>j#,
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift M2;(+8 b
u2 = ifft(fftshift(c2)); % Return to physical space N:sECGS,
u1 = ifft(fftshift(c1)); <y b=!
if rem(m1,J) == 0 % Save output every J steps. [0%Gu5_\
U1 = [U1 u1]; % put solutions in U array OQX{<pQ6
U2=[U2 u2]; bsmoLT
MN1=[MN1 m1]; {{#a%O
z1=dz*MN1'; % output location b{ubp
end dk,
I?c&
end d5Eee^Qu/
hg=abs(U1').*abs(U1'); % for data write to excel cWy*K4O
ha=[z1 hg]; % for data write to excel R*c0NJF
t1=[0 t']; M<|~MR
hh=[t1' ha']; % for data write to excel file eUUD|U*b
%dlmwrite('aa',hh,'\t'); % save data in the excel format vVvt
]h
figure(1) n?ZH2dI\0
waterfall(t',z1',abs(U1').*abs(U1')) % t' is 1xn, z' is 1xm, and U1' is mxn VNh,pQ(
figure(2) #uDBF
waterfall(t',z1',abs(U2').*abs(U2')) % t' is 1xn, z' is 1xm, and U1' is mxn K:Xrfn{s
v"?PhO/{=
非线性超快脉冲耦合的数值方法的Matlab程序 He$mu=$q{
O( sFs1
在研究脉冲在非线性耦合器中的演变时,我们需要求解非线性偏微分方程组。在如下的论文中,我们提出了一种简洁的数值方法。 这里我们提供给大家用Matlab编写的计算程序。 [laL6
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 IbNTdg]/F`
OYRR'X.E
C`K9WJOD
S0o,)`ZB
% This Matlab script file solves the nonlinear Schrodinger equations `peJ s~V
% for 3 cores nonlinear coupler. The output plot is shown in Fig.2 of y^+[eT&