您现在的位置:首页 >> ★免费资源 >> 源码下载 >> 内容

F_eigenfunction_of_bouble_clading_fiber_fine

时间:2019-1-19 23:34:42 点击:

  核心提示:F_eigenfunction_of_bouble_clading_fiber_fine...
% function [belta_matrix] = F_eigenfunction_of_bouble_clading_fiber_fine(Core_Diameter,N_Core,Thickness_coating, N_coating, N_cladding,Lambda)
% %F_eigenfunction_of_fiber_fine(Core_Diameter,N_Core,N_cladding,Lambda)
% %caculate the balta for fiber modes
% %   
% %belta_matrix_m is output


clc
clear
% Test parameters
Core_Diameter=0.9;
N_Core=1.45;
Thickness_coating=0.1;
N_coating=1.45;
N_cladding=1;
Lambda=1.55;


c=3*10^8*10^6;  % in micro meter unit
Omega=2*pi*c/Lambda;
Miu0=4*pi*10^-7; 
Eth0=8.854*10^-12*10^-6;  % in micro meter unit

ns=N_Core; 
nc=N_coating;
na=N_cladding;

 k0=2*pi/Lambda;
  
 
r1=Core_Diameter/2; %  
r2=r1+Thickness_coating;


m_mode_order=5;  %% demension of the matrix
n_mode_number=5;
 
 belta_matrix(:,:)=zeros(m_mode_order+1,n_mode_number);   %%  

 
        
        
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        calculate the belta   in belta_found
        num=100; % difine the  accuracy of the belta
        
        neff_min=1.1;
        neff_max=1.4;
        belta0=k0*na+0.1:(k0*ns-k0*na-2*0.1)/num:k0*ns-0.1;  
        belta0=neff_min*k0:(neff_max*k0-neff_min*k0)/num:neff_max*k0;  
       
        ks=sqrt(ns^2*k0^2-belta0.^2);
        kc=sqrt(nc^2*k0^2-belta0.^2);
        ka=sqrt(na^2*k0^2-belta0.^2);
        

for m=0:m_mode_order   

        Jms1=besselj(m, ks*r1);    %% at the first surface, r1
        Hms1=besselh(m,ks*r1); 
        Jms2=besselj(m, ks*r2);    %% at the second surface,r2
        Hms2=besselh(m,ks*r2); 
        
        Jmc1=besselj(m, kc*r1);    %% at the first surface, r1
        Hmc1=besselh(m,kc*r1); 
        Jmc2=besselj(m, kc*r2);    %% at the second surface,r2
        Hmc2=besselh(m,kc*r2); 
        
        Jma1=besselj(m, ka*r1);    %% at the first surface, r1
        Hma1=besselh(m,ka*r1); 
        Jma2=besselj(m, ka*r2);    %% at the second surface,r2
        Hma2=besselh(m,ka*r2); 
 
  
        if m==0  
            D_Jms1=-besselj(1, ks*r1); 
            D_Hms1=-besselh(1, ks*r1);
            D_Jmc1=-besselj(1, kc*r1);
            D_Hmc1=-besselh(1, kc*r1);
            D_Jma1=-besselj(1, ka*r1);
            D_Hma1=-besselh(1, ka*r1);
            
            D_Jms2=-besselj(1, ks*r2);
            D_Hms2=-besselh(1, ks*r2);
            D_Jmc2=-besselj(1, kc*r2);
            D_Hmc2=-besselh(1, kc*r2);
            D_Jma2=-besselj(1, ka*r2);
            D_Hma2=-besselh(1, ka*r2);
        else
            D_Jms1=0.5*(besselj(m-1, ks*r1)-besselj(m+1, ks*r1));   %%%  recurrence ralations for the Bessel functions
            D_Hms1=0.5*(besselh(m-1, ks*r1)-besselh(m+1, ks*r1));  %% for hankel, the recurrence realtion is the same as Jm
            D_Jmc1=0.5*(besselj(m-1, kc*r1)-besselj(m+1, kc*r1));   %%%  recurrence ralations for the Bessel functions
            D_Hmc1=0.5*(besselh(m-1, kc*r1)-besselh(m+1, kc*r1));  %% for hankel, the recurrence realtion is the same as Jm
            D_Jma1=0.5*(besselj(m-1, ka*r1)-besselj(m+1, ka*r1));   %%%  recurrence ralations for the Bessel functions
            D_Hma1=0.5*(besselh(m-1, ka*r1)-besselh(m+1, ka*r1));  %% for hankel, the recurrence realtion is the same as Jm
            
            D_Jms2=0.5*(besselj(m-1, ks*r2)-besselj(m+1, ks*r2));   %%%  recurrence ralations for the Bessel functions
            D_Hms2=0.5*(besselh(m-1, ks*r2)-besselh(m+1, ks*r2));  %% for hankel, the recurrence realtion is the same as Jm
            D_Jmc2=0.5*(besselj(m-1, kc*r2)-besselj(m+1, kc*r2));   %%%  recurrence ralations for the Bessel functions
            D_Hmc2=0.5*(besselh(m-1, kc*r2)-besselh(m+1, kc*r2));  %% for hankel, the recurrence realtion is the same as Jm
            D_Jma2=0.5*(besselj(m-1, ka*r2)-besselj(m+1, ka*r2));   %%%  recurrence ralations for the Bessel functions
            D_Hma2=0.5*(besselh(m-1, ka*r2)-besselh(m+1, ka*r2));  %% for hankel, the recurrence realtion is the same as Jm
        end
         
        %variable list a_s, b_s, c1_as, c1_bs, c2_as, c2_bs, a_a,b_a;
        
%         
%         M11=-m*belta0.*Jms1./(ks.^2*r1);
%         M12=-i*Omega.*D_Jms1./ks;
%         M13=m*belta0.*Jmc1./(kc.^2*r1);
%         M14=i*Omega.*D_Jmc1./kc;        
%         M15=Hmc1;
%         M16=D_Hmc1;
%         M17=0;
%         M18=0;
%         
%         M21=Jms1;
%         M22=0;
%         M23=-Jmc1;
%         M24=-Hmc1;
%         M25=0;
%         M26=0;
%         M27=0;
%         M28=0;
%         
%         M31=i*ns^2*k0.^2.*D_Jms1./(Omega.*ks);
%         M32=-m*belta0.*Jms1./(ks.^2*r1);
%         M33=-i*nc^2*k0.^2.*D_Jmc1./(Omega.*kc);
%         M34=-i*nc^2*k0.^2.*D_Hmc1./(Omega.*kc);     
%         M35=m*belta0.*Jmc1./(kc.^2*r1);
%         M36=m*belta0.*Hmc1./(kc.^2*r1);
%         M37=0;
%         M38=0;
%         
%         M41=0;
%         M42=Jms1;
%         M43=0;
%         M44=0;
%         M45=-Jmc1;
%         M46=-Hmc1;
%         M47=0;
%         M48=0;
%         M51= 0;
%         M52= 0;
%         M53=m*belta0.*Jmc2./(kc.^2*r2);
%         M54= m*belta0.*Hmc2./(kc.^2*r2);
%         M55= i*Omega.*D_Jmc2./kc;
%         M56= i*Omega.*D_Hmc2./kc;     
%         M57=-m*belta0.*Hma2./(ka.^2*r2);
%         M58=-i*Omega.*D_Hma2./ka;
%         
%         M61=0;
%         M62=0;
%         M63=Jmc2;
%         M64=Hmc2;
%         M65=0;
%         M66=0;
%         M67=-Hma2;
%         M68=0;
%         
%         
%         M71= 0;
%         M72= 0;
%         M73=-i*nc^2*k0.^2.*D_Jmc2./(Omega.*kc);
%         M74= -i*nc^2*k0.^2.*D_Hmc2./(Omega.*kc);
%         M75= m*belta0.*Jmc2./(kc.^2*r2);
%         M76= m*belta0.*Hmc2./(kc.^2*r2);   
%         M77= i*na^2*k0.^2.*D_Hma2./(Omega.*ka);
%         M78= -m*belta0.*Hma2./(ka.^2*r2);   
%         
%         
%         M81=0;
%         M82=0;
%         M83=0;
%         M84=0;
%         M85=-Jmc2;
%         M86=Hmc2;
%         M87=0;
%         M88=Jma2;
        
        
         
        
        %%%%%%%%%%%%%
        M11=-m*belta0.*Jms1./(ks.^2*r1); M12=-i*Omega.*D_Jms1./ks; M13=m*belta0.*Jmc1./(kc.^2*r1);M14=i*Omega.*D_Jmc1./kc; M15=Hmc1;        M16=D_Hmc1;        M17=zeros(1,length(belta0));        M18=zeros(1,length(belta0));
        
        M21=Jms1;        M22=zeros(1,length(belta0));        M23=-Jmc1;        M24=-Hmc1;        M25=zeros(1,length(belta0));        M26=zeros(1,length(belta0));        M27=zeros(1,length(belta0));        M28=zeros(1,length(belta0));
        
        M31=i*ns^2*k0.^2.*D_Jms1./(Omega.*ks); M32=-m*belta0.*Jms1./(ks.^2*r1);M33=-i*nc^2*k0.^2.*D_Jmc1./(Omega.*kc);M34=-i*nc^2*k0.^2.*D_Hmc1./(Omega.*kc); M35=m*belta0.*Jmc1./(kc.^2*r1);M36=m*belta0.*Hmc1./(kc.^2*r1);M37=zeros(1,length(belta0)); M38=zeros(1,length(belta0));
        
        M41=zeros(1,length(belta0));           M42=Jms1;        M43=zeros(1,length(belta0));        M44=zeros(1,length(belta0));        M45=-Jmc1;        M46=-Hmc1;        M47=zeros(1,length(belta0));        M48=zeros(1,length(belta0));

        M51= zeros(1,length(belta0));       M52= zeros(1,length(belta0));        M53=m*belta0.*Jmc2./(kc.^2*r2); M54= m*belta0.*Hmc2./(kc.^2*r2); M55= i*Omega.*D_Jmc2./kc; M56= i*Omega.*D_Hmc2./kc; M57=-m*belta0.*Hma2./(ka.^2*r2);  M58=-i*Omega.*D_Hma2./ka;
        
        M61=zeros(1,length(belta0));        M62=zeros(1,length(belta0));        M63=Jmc2;        M64=Hmc2;        M65=zeros(1,length(belta0));        M66=zeros(1,length(belta0));        M67=-Hma2;        M68=zeros(1,length(belta0));
        
        
        M71=zeros(1,length(belta0));       M72= zeros(1,length(belta0));        M73=-i*nc^2*k0.^2.*D_Jmc2./(Omega.*kc);M74= -i*nc^2*k0.^2.*D_Hmc2./(Omega.*kc);M75= m*belta0.*Jmc2./(kc.^2*r2);M76= m*belta0.*Hmc2./(kc.^2*r2);M77= i*na^2*k0.^2.*D_Hma2./(Omega.*ka);M78= -m*belta0.*Hma2./(ka.^2*r2);   
        
        
        M81=zeros(1,length(belta0));        M82=zeros(1,length(belta0));        M83=zeros(1,length(belta0));        M84=zeros(1,length(belta0));        M85=-Jmc2;        M86=Hmc2;        M87=zeros(1,length(belta0));        M88=Jma2;
        
         
        for ii=1:length(belta0)
            
                M1=[M11(ii),M12(ii),M13(ii),M14(ii),M15(ii),M16(ii),M17(ii),M18(ii)];
                M2=[M21(ii),M22(ii),M23(ii),M24(ii),M25(ii),M26(ii),M27(ii),M28(ii)];
                M3=[M31(ii),M32(ii),M33(ii),M34(ii),M35(ii),M36(ii),M37(ii),M38(ii)]; 
                M4=[M41(ii),M42(ii),M43(ii),M44(ii),M45(ii),M46(ii),M47(ii),M48(ii)];
                M5=[M51(ii),M52(ii),M53(ii),M54(ii),M55(ii),M56(ii),M57(ii),M58(ii)];
                M6=[M61(ii),M62(ii),M63(ii),M64(ii),M65(ii),M66(ii),M67(ii),M68(ii)];
                M7=[M71(ii),M72(ii),M73(ii),M74(ii),M75(ii),M76(ii),M77(ii),M78(ii)];
                M8=[M81(ii),M82(ii),M83(ii),M84(ii),M85(ii),M86(ii),M87(ii),M88(ii)];
                
                M=[M1;M2;M3;M4;M5;M6;M7;M8];
                detM(ii)=det(M);
             
        end
        detM=real(detM)+imag(detM);
        figure 
        plot(belta0,detM)
         
        LD_array=[];
        for k=1:length(belta0)-1
            if detM(k)*detM(k+1)<0  
            h=interp1(detM(k:k+1),belta0(k:k+1),0);
            LD_array=[LD_array,h];
            end 
        end 

        for jj=1: length(LD_array)
        belta_matrix(m+1,jj)=max(LD_array(length(LD_array)+1-jj),k0*na);
        end

        if m==1
         belta_matrix(2,1)=max( belta_matrix(2,1),k0*na);
        end

end


 
% end


联系:highspeedlogic

QQ :1224848052

微信:HuangL1121

邮箱:1224848052@qq.com

网站:http://www.mat7lab.com/

网站:http://www.hslogic.com/

微信扫一扫:

作者:F_eigenfunction_of_bouble_clading_fiber_fine 来源:F_eigenfunction_of_bouble_clading_fiber_fine
  • 您是如何找到本站的?
  • 百度搜索
  • Google搜索
  • 查阅资料过程中
  • 论坛发现
  • 百度贴吧发现
  • 朋友介绍
本站最新成功开发工程项目案例
相关文章
  • 没有相关文章
相关评论
发表我的评论
  • 大名:
  • 内容:
  • matlab代做|matlab专业代做|matlab淘宝代做|matlab代写(www.hslogic.com) © 2019 版权所有 All Rights Reserved.
  • Email:highspeed_logic@163.com 站长QQ: 1224848052

    专业代做/代写/承接、MATLAB、SIMULINK、FPGA项目、博士/硕士/本科毕业设计、课题设计、论文,毕业论文,Coursework、Eassy、Assignment