MATLAB 代码:锥形光纤纤芯周围功率分布轮廓
以下是 MATLAB 代码:
%% 参数设置 n_core = 1.45; % 纤芯折射率 n_clad = 1; % 包层折射率 d_core = 400e-9; % 纤芯直径 lambda = 633e-9; % 入射光波长 NA = sqrt(n_core^2 - n_clad^2); % 数值孔径 theta_max = asin(NA); % 最大入射角度 L = 10*d_core; % 计算区域边长 M = 500; % 离散点数 dx = L/M; % 离散步长 x = linspace(-L/2, L/2, M); % 离散点坐标 [X, Y] = meshgrid(x); % 网格坐标
%% 计算光场 r = sqrt(X.^2 + Y.^2); % 极坐标半径 theta = atan2(Y, X); % 极坐标角度 k = 2pi/lambda; % 波矢量 beta = kn_coresqrt(1 - (NA/n_core)^2); % 传播常数 V = betad_core/2; % 纤芯体积 u_core = besselj(1, kd_core/2r)/r.exp(1ibetar).exp(-1ikn_coreV); % 纤芯光场 u_clad = exp(-1ikn_cladsqrt(r.^2 - (d_core/2)^2)); % 包层光场 u_clad(r < d_core/2) = 0; % 去掉纤芯内部的包层光场 u = u_core + u_clad; % 总光场
%% 绘制功率分布轮廓 figure; imagesc(x, x, abs(u).^2); axis equal tight; colormap(hot); colorbar; xlabel('x (m)'); ylabel('y (m)'); title(['Power distribution profile of a tapered fiber with ' num2str(d_core1e9) ' nm core diameter and ' num2str(lambda1e9) ' nm incident wavelength']);
原文地址: https://www.cveoy.top/t/topic/nw8N 著作权归作者所有。请勿转载和采集!