計算脈沖在非線性耦合器中演化的Matlab 程序 <CIy|&J6 c+bOp
05o- % This Matlab script file solves the coupled nonlinear Schrodinger equations of
1UwpLd % soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of
,WKWin % Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear
hgmo b"o % pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004
RHIGNzSz XZew$Om[ %fid=fopen('e21.dat','w');
}Y=X{3+~. N = 128; % Number of Fourier modes (Time domain sampling points)
=9;2(<A M1 =3000; % Total number of space steps
gNj~o^6|@ J =100; % Steps between output of space
.zQ'}H1.C T =10; % length of time windows:T*T0
R/|2s T0=0.1; % input pulse width
l.Yq4qW MN1=0; % initial value for the space output location
lI&5.,2MP dt = T/N; % time step
U'Mxf'q n = [-N/2:1:N/2-1]'; % Index
g4U`Qf3 t = n.*dt;
LV6BSQyQ u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10
_enS_R u20=u10.*0.0; % input to waveguide 2
FhAYk u1=u10; u2=u20;
[a2Q ^ab U1 = u1;
FDQP|, U2 = u2; % Compute initial condition; save it in U
tT`{xM ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1.
*`WD/fG w=2*pi*n./T;
j}F;Bfq! g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T
*vS)aRK L=4; % length of evoluation to compare with S. Trillo's paper
j3$\+<m] dz=L/M1; % space step, make sure nonlinear<0.05
a*3h|b< for m1 = 1:1:M1 % Start space evolution
zAA3bgaa u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS
%'3Y?d u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2;
y=k!>Y|E ca1 = fftshift(fft(u1)); % Take Fourier transform
|-zefzD| ca2 = fftshift(fft(u2));
mzH3Q564 c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation
<)4>"SN&^ c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift
^3
6oqe{ u2 = ifft(fftshift(c2)); % Return to physical space
;>jLRx<KC u1 = ifft(fftshift(c1));
+h?Rb3=S if rem(m1,J) == 0 % Save output every J steps.
%&\DCAFk U1 = [U1 u1]; % put solutions in U array
N&YQZ^o U2=[U2 u2];
d