📄 coupler_even_odd.m
字号:
% This example shows how to calculate the even and odd modes
% of two coupled waveguides, using the semivectorial modesolver
% Refractive indices:
n1 = 3.34; % Lower cladding
n2 = 3.44; % Core
n3 = 1.00; % Upper cladding (air)
% Layer heights:
h1 = 2.0; % Lower cladding
h2 = 1.3; % Core thickness
h3 = 0.5; % Upper cladding
rh = 0.7; % Ridge height
rw = 2.0; % Ridge full-width
d = 3.0; % center-to-center separation
side = 2.5; % Space on side
dx = 0.0125; % grid size (horizontal)
dy = 0.0125; % grid size (vertical)
lambda = 1.55; % wavelength
nmodes = 1; % number of modes to compute
fprintf (1,'generating index mesh...\n');
[x,y,xc,yc,nx,ny,eps] = coupler([n1,n2,n3],[h1,h2,h3],rh,d,rw,side,dx,dy);
% First, we calculate the symmetric mode
boundary = '000S';
fprintf (1,'solving for symmetric eigenmodes (TE) ... '); t = cputime;
[Ex1,neff1] = svmodes (lambda, n2, nmodes, dx, dy, eps, ...
boundary, 'EX');
fprintf (1,'done (cputime = %7.3f)\n', cputime-t);
fprintf(1,'neff(1) = %7.5f\n',neff1);
% First, we calculate the symmetric mode
boundary = '000A';
fprintf (1,'solving for symmetric eigenmodes (TE) ... '); t = cputime;
[Ex2,neff2] = svmodes (lambda, n2, nmodes, dx, dy, eps, ...
boundary, 'EX');
fprintf (1,'done (cputime = %7.3f)\n', cputime-t);
fprintf(1,'neff(2) = %7.5f\n',neff2);
subplot(211);
contourmode(xc,yc,Ex1(:,:,1),1,3,45,'Ex (Symmetric TE mode)');
v = xlim;
line(v,[h1,h1]);
line([v(1),(d-rw)/2,(d-rw)/2,(d+rw)/2,(d+rw)/2,v(2)], ...
[h1+h2-rh,h1+h2-rh,h1+h2,h1+h2,h1+h2-rh,h1+h2-rh]);
subplot(212);
contourmode(xc,yc,Ex2(:,:,1),1,3,45,'Ex (Antisymmetric TE mode)');
v = xlim;
line(v,[h1,h1]);
line([v(1),(d-rw)/2,(d-rw)/2,(d+rw)/2,(d+rw)/2,v(2)], ...
[h1+h2-rh,h1+h2-rh,h1+h2,h1+h2,h1+h2-rh,h1+h2-rh]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -