计算脉冲在非线性耦合器中演化的Matlab 程序 o^+2%S`]
4}.PQ{
% This Matlab script file solves the coupled nonlinear Schrodinger equations of XB0G7o%1
% soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of M~+}ss
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear 1K{u>T
% pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 ( f]@lNmx
E.LD1Pm0
%fid=fopen('e21.dat','w'); KTtB!4by
N = 128; % Number of Fourier modes (Time domain sampling points) Bm"-X:='
M1 =3000; % Total number of space steps ?TWve)U
J =100; % Steps between output of space RRRF/Z;))
T =10; % length of time windows:T*T0 !$n@-
T0=0.1; % input pulse width J,(@1R]KF:
MN1=0; % initial value for the space output location <fSWX>pR
dt = T/N; % time step Y=83r]%
n = [-N/2:1:N/2-1]'; % Index =
y@*vl
t = n.*dt; Eqizx~e qq
u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 kx{LY`pY
u20=u10.*0.0; % input to waveguide 2 #ME!G/
u1=u10; u2=u20; =-bGH
U1 = u1; $|"Y|3&X
U2 = u2; % Compute initial condition; save it in U d?ru8
ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. ml,FBBGq|-
w=2*pi*n./T; $Z|HFV{
g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T /aTW X
L=4; % length of evoluation to compare with S. Trillo's paper JkShtLEr
dz=L/M1; % space step, make sure nonlinear<0.05 Nwwn #+
for m1 = 1:1:M1 % Start space evolution MpK3+4UMa
u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS ~ECIL7,
u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; 8NnGN(a*D
ca1 = fftshift(fft(u1)); % Take Fourier transform O:E0htdWr
ca2 = fftshift(fft(u2)); {'8td^JEE
c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation |E?PQ?P
c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift 3#A4A0
u2 = ifft(fftshift(c2)); % Return to physical space Iip%er%b
u1 = ifft(fftshift(c1)); ]SC|%B_*
if rem(m1,J) == 0 % Save output every J steps. cslZ;
U1 = [U1 u1]; % put solutions in U array &2,3R}B/
U2=[U2 u2]; O*7vmPy
MN1=[MN1 m1]; _lG|t6y
z1=dz*MN1'; % output location ~] &yHzp2
end Kpg?'
!I
end 6o0}7T%6
hg=abs(U1').*abs(U1'); % for data write to excel efr 9
ha=[z1 hg]; % for data write to excel _`I}"`2H
t1=[0 t']; yJK:4af;.
hh=[t1' ha']; % for data write to excel file [I?[N.v
%dlmwrite('aa',hh,'\t'); % save data in the excel format de/oK c
figure(1) f\;w(_
waterfall(t',z1',abs(U1').*abs(U1')) % t' is 1xn, z' is 1xm, and U1' is mxn Wsb>3J
figure(2) =,b6yV+$D
waterfall(t',z1',abs(U2').*abs(U2')) % t' is 1xn, z' is 1xm, and U1' is mxn Q7.jSL6
$Ge0<6/
非线性超快脉冲耦合的数值方法的Matlab程序 3,'LW}
v M'!WVs
在研究脉冲在非线性耦合器中的演变时,我们需要求解非线性偏微分方程组。在如下的论文中,我们提出了一种简洁的数值方法。 这里我们提供给大家用Matlab编写的计算程序。 z]2MR2W@X
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 S{m:Iij[;
(|\%)vH-
0tz? sN
RNF%i~nhO
% This Matlab script file solves the nonlinear Schrodinger equations ?y-@c]
% for 3 cores nonlinear coupler. The output plot is shown in Fig.2 of ,\?s=D{
% Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear |<