计算脉冲在非线性耦合器中演化的Matlab 程序 v{[:7]b_=
74p=uQ
% This Matlab script file solves the coupled nonlinear Schrodinger equations of !RD<"
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of 4,]z
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear j@HOU~x
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 cfP9b8JG
f"}g5eg+
%fid=fopen('e21.dat','w');
e#t7
N = 128; % Number of Fourier modes (Time domain sampling points) [ <,i}z
M1 =3000; % Total number of space steps FP_q?=~rFs
J =100; % Steps between output of space (/a#1Pd&
T =10; % length of time windows:T*T0 ^.HvuG},O
T0=0.1; % input pulse width 6B=: P3Y
MN1=0; % initial value for the space output location !5}u \
dt = T/N; % time step ,|RN?1 ?U
n = [-N/2:1:N/2-1]'; % Index H6t'V%Ys
t = n.*dt; Qu;cl/&
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 00-cT9C3
u20=u10.*0.0; % input to waveguide 2 CVt:tV
u1=u10; u2=u20; aVvma=
U1 = u1; F!_8?=|
U2 = u2; % Compute initial condition; save it in U rijavZS6
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. LN0pC}F
w=2*pi*n./T; 9>6DA^
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T u$38"&cmA
L=4; % length of evoluation to compare with S. Trillo's paper )p^" J|
dz=L/M1; % space step, make sure nonlinear<0.05 x=M%QFe
for m1 = 1:1:M1 % Start space evolution ?bH&F
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS !Soz??~o/
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; 6|G&d>G$_
ca1 = fftshift(fft(u1)); % Take Fourier transform Db`SNk=
ca2 = fftshift(fft(u2)); d2a*xDkv
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation n(h9I'V8)F
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift xMs!FMn[
u2 = ifft(fftshift(c2)); % Return to physical space E#!tXO&,
u1 = ifft(fftshift(c1)); 'w z6Zt
if rem(m1,J) == 0 % Save output every J steps. K'_qi8Z
U1 = [U1 u1]; % put solutions in U array B%^W$7
q
U2=[U2 u2]; %;eD.If}
MN1=[MN1 m1]; VtN1 [}
z1=dz*MN1'; % output location 'CMbqLk#
end , UsY0YC
end xWnOOE$i
hg=abs(U1').*abs(U1'); % for data write to excel 4OaU1Y[
ha=[z1 hg]; % for data write to excel hGy[L3{
t1=[0 t']; T!7B0_
hh=[t1' ha']; % for data write to excel file lsaA
%dlmwrite('aa',hh,'\t'); % save data in the excel format r@a]fTf
figure(1) ~NMx:PP
waterfall(t',z1',abs(U1').*abs(U1')) % t' is 1xn, z' is 1xm, and U1' is mxn ve]hE}o/}
figure(2) 2{Y~jYt{h
waterfall(t',z1',abs(U2').*abs(U2')) % t' is 1xn, z' is 1xm, and U1' is mxn K0YQ b&*k
7tbY>U8
非线性超快脉冲耦合的数值方法的Matlab程序 @PT([1C
OUk"aAo
在研究脉冲在非线性耦合器中的演变时,我们需要求解非线性偏微分方程组。在如下的论文中,我们提出了一种简洁的数值方法。 这里我们提供给大家用Matlab编写的计算程序。 ZXIw^!8@/
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
=(]Z%Q-V
@jxP3:s
*
'_(.Z:
SK*z4p
% This Matlab script file solves the nonlinear Schrodinger equations bu9.HvT'
% for 3 cores nonlinear coupler. The output plot is shown in Fig.2 of 3_ly"\I\
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear W#P`Y < u$
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 kV+%(Gl8
UCt}\IJ
C=1; >qz#&