make_mcphedran.m
来自「利用电磁场的源激发方法来计算光子晶体波导例如光子晶体光纤」· M 代码 · 共 26 行
M
26 行
clear
a = 6.75e-6; % pitch in [m]
Rv = 2.5e-6; % vein radius [m]
type = 1;
first = 1; % number of veins per hexagon side in the first ring
last = 1; % number of veins per hexagon side in the last ring
[vCx, vCy] = hex_centers(a, first, last, type);
Nv = length(vCx); % number of air veins
oGd.nSources = 24*Nv;
oGd.nTestingPoints = oGd.nSources*1.3;
oGd.alphaIn = 0.5;
oGd.alphaOut = 0.5;
oGd.offsetX = 0;
oGd.offsetY = 0;
curve = primitive('circle', Rv);
curveArray = clone(vCx, vCy, curve);
oGd.curveArray = curveArray;
oGd.sdArray = compute_sd_array(curveArray);
oGd.nSd = length(oGd.sdArray);
vEr = [1.45^2 ones(1, oGd.nSd-1)];
for iSd = 1:oGd.nSd
oGd.sdArray(iSd).Er = vEr(iSd);
end
save mcphedran.gd oGd
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?