tianmen |
2011-06-12 18:33 |
求解光孤子或超短脈沖耦合方程的Matlab程序
計(jì)算脈沖在非線性耦合器中演化的Matlab 程序 6JYVC>i Hve'Z,X % This Matlab script file solves the coupled nonlinear Schrodinger equations of 28N
v' % soliton in 2 cores coupler. The output pulse evolution plot is shown in Fig.1 of I8RPW:B;B % Youfa Wang and Wenfeng Wang, “A simple and effective numerical method for nonlinear 5u=(zg % pulse propagation in N-core optical couplers”, IEEE Photonics Technology lett. Vol.16, No.4, pp1077-1079, 2004 ]*M-8_D E"|LA[o
%fid=fopen('e21.dat','w'); /y.+N`_ N = 128; % Number of Fourier modes (Time domain sampling points) cJ>
#jl& M1 =3000; % Total number of space steps <,S5(pZ J =100; % Steps between output of space ,( ?q T =10; % length of time windows:T*T0 QlmZ4fT[r T0=0.1; % input pulse width t|ih{0 MN1=0; % initial value for the space output location |_7AN!7j dt = T/N; % time step H]XY n = [-N/2:1:N/2-1]'; % Index :"pA0oB t = n.*dt; 9ne13qVm+ u10=1.*sech(1*t); % input to waveguide1 amplitude: power=u10*u10 O
DLRzk( u20=u10.*0.0; % input to waveguide 2 K Qz.g3, u1=u10; u2=u20; {xGM_vH1 U1 = u1; XYM 5' U2 = u2; % Compute initial condition; save it in U y]veqa ww = 4*n.*n*pi*pi/T/T; % Square of frequency. Note i^2=-1. 0F495'*A w=2*pi*n./T; *C*'J7 g=-i*ww./2; % w=2*pi*f*n./N, f=1/dt=N/T,so w=2*pi*n./T yG`J3++
S L=4; % length of evoluation to compare with S. Trillo's paper Wt%+q{ dz=L/M1; % space step, make sure nonlinear<0.05 kX2bU$1Q,i for m1 = 1:1:M1 % Start space evolution aU)NbESu u1 = exp(dz*i*(abs(u1).*abs(u1))).*u1; % 1st sSolve nonlinear part of NLS #Pf?.NrTn u2 = exp(dz*i*(abs(u2).*abs(u2))).*u2; l|z0aF;z ca1 = fftshift(fft(u1)); % Take Fourier transform #Oeb3U ca2 = fftshift(fft(u2)); *x;&fyR c2=exp(g.*dz).*(ca2+i*1*ca1.*dz); % approximation %rmn+L),; c1=exp(g.*dz).*(ca1+i*1*ca2.*dz); % frequency domain phase shift )M!6y%b67 u2 = ifft(fftshift(c2)); % Return to physical space ^bZ'z
| |