计算脉冲在非线性耦合器中演化的Matlab 程序 W:G*t4i
Qpc>5p![3
% This Matlab script file solves the coupled nonlinear Schrodinger equations of Vow+,,oh
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of ~yV0SpL
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear j~0hAKHG
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 (nm&\b~j
q.4DwY5 L
%fid=fopen('e21.dat','w'); GzX@Av$
N = 128; % Number of Fourier modes (Time domain sampling points) Rh|&{Tf
M1 =3000; % Total number of space steps S_zE+f+
2
J =100; % Steps between output of space VPuzu|
T =10; % length of time windows:T*T0 IZGty=Q_
T0=0.1; % input pulse width "A7tb39*
MN1=0; % initial value for the space output location ?p]w_l
dt = T/N; % time step Sk xaSJ"
n = [-N/2:1:N/2-1]'; % Index ESAh(A)8
t = n.*dt; mb/Y
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 O\?ei+(H7
u20=u10.*0.0; % input to waveguide 2 {.AFg/Z
u1=u10; u2=u20; ]4PG[9J@
U1 = u1; /C"E*a
U2 = u2; % Compute initial condition; save it in U :Fh*4
&Z
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. JkTL+obu
w=2*pi*n./T; 8@!SM
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T 3't?%$'5
L=4; % length of evoluation to compare with S. Trillo's paper U}NNbGQj
dz=L/M1; % space step, make sure nonlinear<0.05 6xwC1V?:0t
for m1 = 1:1:M1 % Start space evolution Xv9CD
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS Z(#a-_g
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; \|kU{d0
ca1 = fftshift(fft(u1)); % Take Fourier transform SRMy#j-
ca2 = fftshift(fft(u2)); / wEr>[8S
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation JP#m}W
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift `#~@f!';
u2 = ifft(fftshift(c2)); % Return to physical space !HFwQGP.Y
u1 = ifft(fftshift(c1)); (5SI!1N
if rem(m1,J) == 0 % Save output every J steps. ~{J.br`
U1 = [U1 u1]; % put solutions in U array r(RJ&