📄 silicon_channel.m
字号:
% This example computes all of the field components of a
% silicon-on-insulator nanowire waveguide.
n1 = 1.46; % SiO2 lower cladding
n2 = 3.50; % Silicon core
n3 = 1.00; % Air upper cladding
h1 = 500; % lower cladding (nm)
h2 = 200; % silicon core (nm)
h3 = 500; % upper cladding (nm)
dx = 2.5; % grid size (x)
dy = dx; % grid size (y)
lambda = 1550; % wavelength (nm)
nmodes = 1; % number of modes to compute
w = 400; % waveguide full-width (nm)
side = 500; % space on side of waveguide (nm)
fprintf (1,'generating index mesh...\n');
[x,y,xc,yc,nx,ny,eps] = ...
waveguidemesh([n1,n2,n3],[h1,h2,h3],h2,w/2,side,dx,dy);
% Now we stretch out the mesh at the boundaries:
[x,y,xc,yc,dx,dy] = stretchmesh(x,y,[200,200,200,0],[1.5,1.5,1.5,1]);
fprintf (1,'solving for eigenmodes...'); t = cputime;
[Hx,Hy,neff] = wgmodes (lambda, n2, nmodes, dx, dy, eps, '000A');
fprintf (1,'done (cputime = %7.3f)\n', cputime-t);
fprintf(1,'neff = %7.5f\n',neff);
fprintf (1,'post-processing...'); t = cputime;
[Hz,Ex,Ey,Ez] = postprocess (lambda, neff, Hx, Hy, dx, dy, eps, '000A');
fprintf (1,'done (cputime = %7.3f)\n', cputime-t);
ii = 1;
colormap(jet(256));
hn = max(abs(Hy(:)));
en = hn/n2;
subplot(231);
imagemode(x,y,Hx/hn,sprintf('Hx (mode %d)',ii));
hold on;
contourmode(x,y,Hx/hn,1,3,45,sprintf('Hx (mode %d)',ii));
hold off;
v = xlim();
line(v,[h1,h1]);
line([0,w/2,w/2],[h1+h2,h1+h2,h1]);
subplot(232);
imagemode(x,y,Hy/hn,sprintf('Hy (mode %d)',ii));
hold on;
contourmode(x,y,Hy/hn,1,3,45,sprintf('Hy (mode %d)',ii));
hold off;
v = xlim();
line(v,[h1,h1]);
line([0,w/2,w/2],[h1+h2,h1+h2,h1]);
subplot(233);
imagemode(x,y,Hz/hn,sprintf('Hz (mode %d)',ii));
hold on;
contourmode(x,y,Hz/hn,1,3,45,sprintf('Hz (mode %d)',ii));
hold off;
v = xlim();
line(v,[h1,h1]);
line([0,w/2,w/2],[h1+h2,h1+h2,h1]);
subplot(234);
imagemode(xc,yc,Ex/en,sprintf('Ex (mode %d)',ii));
hold on;
contourmode(xc,yc,Ex/en,1,3,60,sprintf('Ex (mode %d)',ii));
hold off;
v = xlim();
line(v,[h1,h1]);
line([0,w/2,w/2],[h1+h2,h1+h2,h1]);
subplot(235);
imagemode(xc,yc,Ey/en,sprintf('Ey (mode %d)',ii));
hold on;
contourmode(xc,yc,Ey/en,1,3,60,sprintf('Ey (mode %d)',ii));
hold off;
v = xlim();
line(v,[h1,h1]);
line([0,w/2,w/2],[h1+h2,h1+h2,h1]);
subplot(236);
imagemode(xc,yc,Ez/en,sprintf('Ez (mode %d)',ii));
hold on;
contourmode(xc,yc,Ez/en,1,3,60,sprintf('Ez (mode %d)',ii));
hold off;
v = xlim();
line(v,[h1,h1]);
line([0,w/2,w/2],[h1+h2,h1+h2,h1]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -