• 大小: 2KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-05-23
  • 语言: Matlab
  • 标签:

资源简介

分布傅里叶变换解非线性薛定谔方程,非线性光纤光学数值计算

资源截图

代码片段和文件信息

clc; clear all; close all; clf;
cputime=0;
tic;
ln=1;
i=sqrt(-1);
Po=.00064; %input pwr in watts
alpha=0; % Fiber loss value in dB/km
alph=alpha/(4.343); %Ref page#55 eqn 2.5.3 Fiber optic Comm by GP Agrawal
gamma=0.003; %fiber non linearity in /W/m
to=125e-12; %initial pulse width in second
C=-2; %Input chirp parameter for first calculation
b2=-20e-27; %2nd order disp. (s2/m)
Ld=(to^2)/(abs(b2)); %dispersion length in meter
pi=3.1415926535;
Ao=sqrt(Po); %Amplitude
%----------------------------------------------------------
tau =- 4096e-12:1e-12: 4095e-12;%  dt=t/to
 dt=1e-12;
 rel_error=1e-5;
 h=1000;% step size
for ii=0.1:0.1:1.5 %the various fiber lengths can be varied and this vector can be changed
z=ii*Ld;
    u=Ao*exp(-((1+i*(-C))/2)*(tau/to).^2);%page#47 G.P.AGrawal
    figure(1)
   plot(abs(u)‘r‘);
   title(‘Input Pulse‘); xlabel(‘Time‘); ylabel(‘Amplitude‘);
grid on;
hold on;
l=max(size(u));  
%%%%%%%%%%%%%%%%%%%%%%%
fwhm1=find(abs(u)>abs(max(u)/2));
fwhm1=length(fwhm1);
dw=1/l/dt*2*pi;
w

评论

共有 条评论

相关资源