⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssfm_for_cnlse.m

📁 是有分布傅立叶算法解薛定谔方程的一个程序(下面我就不乱说说了请认真阅读您的文件包然后写出其具体功能(至少要20个字)。尽量不要让站长把时间都花费在为您修正说明上。压缩包解压时不能有密码。系统会自动删除
💻 M
字号:
function [u1x,u1y] = SSFM_for_CNLSE(u0x,u0y,dt,dz,nz,alphax,alphay,betapx,betapy,gamma);

nt = length(u0x); % nt is the number of point
w = 2*pi*[(0:nt/2-1),(-nt/2:-1)]'/(dt*nt); %constructing used frequencies

linearoperatorx = -alphax/2; % in the lines above are constructed the linear operator in X and Y. Observe that for the 
for ii = 0:length(betapx)-1; % first propagation until correlation lenght beta0x=beta0y=0.
  linearoperatorx = linearoperatorx - j*betapx(ii+1)*(w).^ii/factorial(ii);
end

linearoperatory = -alphay/2;
for ii = 0:length(betapy)-1;
  linearoperatory = linearoperatory - j*betapy(ii+1)*(w).^ii/factorial(ii);
end

u1x = u0x;
ufftx = fft(u0x); 

u1y = u0y;
uffty = fft(u0y);
  
fiberlength = nz*dz;
propagedlength = 0;

for i=1:nz,
    
  %Performing the SSFM with the given dz
  %------linear propagation until dz/2------------
  halfstepx = exp(linearoperatorx*dz/2);
  uhalfx = ifft(halfstepx.*ufftx); 
  
  halfstepy = exp(linearoperatory*dz/2);
  uhalfy = ifft(halfstepy.*uffty); 
          
  uhalfxaux = uhalfx;
  uhalfx = (uhalfxaux + j*uhalfy)/sqrt(2); % transforming into a CP basis
  uhalfy = (uhalfxaux - j*uhalfy)/sqrt(2); % transforming into a CP basis

  
  u1x = uhalfx .* exp(-j*gamma*(2/3)*( (abs(uhalfx).^2) + (2*abs(uhalfy).^2) )*dz); % non linear propagation in CP basis
  u1y = uhalfy .* exp(-j*gamma*(2/3)*( (abs(uhalfy).^2) + (2*abs(uhalfx).^2) )*dz); % non linear propagation in CP basis
    
  u1xaux = u1x; 
  u1x = (u1xaux + u1y)/sqrt(2); % transforming into a LP basis
  u1y = -j*(u1xaux - u1y)/sqrt(2); % transforming into a LP basis
  
  %------linear propagation from dz/2 to dz------------
  ufftx = halfstepx.*fft(u1x); % 
  uffty = halfstepy.*fft(u1y);
  
  propagedlength = propagedlength + dz;
  propagatededlength = propagedlength ;
  propagatededlength
  
end

u1x = ifft(ufftx);
u1y = ifft(uffty);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -