lumerical solutions 脚本代码 微环腔 贝塞尔曲线 研究步骤

步骤1、进入solutions软件,新建脚本文件1,写入添加想要的几何形状的脚本,运行脚本。

addrect;
set("name","rectangle1");
set("x",0);
set("x span",120e-6);
set("y",0);
set("y span",120e-6);
set("z",-2e-6);
set("z span",4e-6);
set("material","SiO2 (Glass) - Palik");

ng = 4.538; # 最后的弯曲波导取点由半径定的 相互影响
FSR=625e9; #5nm 625G   
L = c/ng/FSR;
rid=L/2/pi;

# simplify variable names by removing spaces
base_angle =90;
base_width = 0.46e-6;
base_height = 0.22e-6;
x_span = 14e-6;  
# The cubic Bezier curve using this magic number in the pole points approximates the semi-circile with least error
m=0.55191502449; 
arc_pot=0e-6; #中心圆点

Lc=0e-6;      #跑道长度
radius=rid;  # 半径通过获取L 然后除以2 pi获得
gap=0.1e-6;    #间距


groupscope("::model");
addwaveguide;
set("name","arc1");
select("arc1");
set("material","Si (Silicon) - Palik Copy 1");
set("base angle",base_angle);
set("base height",base_height);
set("base width",base_width);
set("detail",0.5);

groupscope("::model");
addwaveguide;
set("name","arc2");
select("arc2");
set("material","Si (Silicon) - Palik Copy 1");
set("base angle",base_angle);
set("base height",base_height);
set("base width",base_width);
set("detail",0.5);

groupscope("::model");
addwaveguide;
set("name","arc3");
select("arc3");
set("material","Si (Silicon) - Palik Copy 1");
set("base angle",base_angle);
set("base height",base_height);
set("base width",base_width);
set("detail",0.5);

groupscope("::model");
addwaveguide;
set("name","arc4");
select("arc4");
set("material","Si (Silicon) - Palik Copy 1");
set("base angle",base_angle);
set("base height",base_height);
set("base width",base_width);
set("detail",0.5);


# Poles for four quarter-circles
px1 = radius*[0;m;1;1]+Lc/2+x_span/2;
py1 = radius*[1;1;m;0];
p1 = [px1,py1];
px2 = radius*[0;m;1;1]+Lc/2+x_span/2;
py2 = radius*[-1;-1;-m;0];
p2 = [px2,py2];
px3 = radius*[-1;-1;-m;0]-Lc/2+x_span/2;
py3 = radius*[0;-m;-1;-1];
p3 = [px3,py3];
px4 = radius*[-1;-1;-m;0]-Lc/2+x_span/2;
py4 = radius*[0;m;1;1];
p4 = [px4,py4];


select("arc1");
set("poles",p1);
select("arc2");
set("poles",p2);
select("arc3");
set("poles",p3);
select("arc4");
set("poles",p4);

select("arc1");
addtogroup("ring sr");
select("arc2");
addtogroup("ring sr");
select("arc3");
addtogroup("ring sr");
select("arc4");
addtogroup("ring sr");


select("ring sr::arc1");
set("x",arc_pot-8e-6);
set("y",arc_pot);
set("z",base_height/2);

select("ring sr::arc2");
set("x",arc_pot-8e-6);
set("y",arc_pot);
set("z",base_height/2);

select("ring sr::arc3");
set("x",arc_pot-8e-6);
set("y",arc_pot);
set("z",base_height/2);

select("ring sr::arc4");
set("x",arc_pot-8e-6);
set("y",arc_pot);
set("z",base_height/2);


groupscope("::model");
addwaveguide;
set("name","inner_top");
select("inner_top");
set("material","Si (Silicon) - Palik Copy 1");
set("base angle",base_angle);
set("base height",base_height);
set("base width",base_width);
set("detail",0.5);
px1 = [-Lc/2+x_span/2;Lc/2+x_span/2];
py1 = [arc_pot-radius;arc_pot-radius];
p1 = [px1,py1];
set("poles",p1);
set("x",arc_pot-8e-6);
set("y",arc_pot);
set("z",base_height/2);

groupscope("::model");
addwaveguide;
set("name","inner_bottom");
select("inner_bottom");
set("material","Si (Silicon) - Palik Copy 1");
set("base angle",base_angle);
set("base height",base_height);
set("base width",base_width);
set("detail",0.5);
px1 = [-Lc/2+x_span/2;Lc/2+x_span/2];
py1 = [arc_pot+radius;arc_pot+radius];
p1 = [px1,py1];
set("poles",p1);
set("x",arc_pot-8e-6);
set("y",arc_pot);
set("z",base_height/2);

select("inner_top");
addtogroup("ring sr");
select("inner_bottom");
addtogroup("ring sr");

if (Lc==0){
   setnamed("ring sr::inner_top","enabled",0);
   setnamed("ring sr::inner_bottom","enabled",0);}
else {
   setnamed("ring sr::inner_top","enabled",1);
   setnamed("ring sr::inner_bottom","enabled",1);}


wanqudu=1e-6; #贝塞尔曲线的两个点下降程度
   
groupscope("::model");
addwaveguide;
set("name","bottom");
select("bottom");
set("material","Si (Silicon) - Palik Copy 1");
set("base angle",base_angle);
set("base height",base_height);
set("base width",base_width);
set("detail",0.5);
# px1 = [0;16e-6];
# py1 = [arc_pot-radius-gap-base_width;arc_pot-radius-gap-base_width];
gap=0;
base_width=0;
px1 = [x_span/2-radius*2;x_span/2-radius;x_span/2+radius;x_span/2+radius*2];
py1 = [arc_pot-radius-gap-base_width;arc_pot-radius-gap-base_width-wanqudu;arc_pot-radius-gap-base_width-wanqudu;arc_pot-radius-gap-base_width];
p1 = [px1,py1];
set("poles",p1);
set("x",arc_pot-8e-6);
set("y",arc_pot);
set("z",base_height/2);

运行后效果图:
图1 构建几何形状
图1 构建几何形状
步骤2、新建脚本2,添加fde,find mode,然后对mode1进行频率扫描,从而得到群折射率ng。
在添加好后fde后,可以点check去拟合材料。
拟合材料后再次频率扫描。

addfde;
set("solver type",1); #2D X
set("x",-25e-6);
set("y",-17e-6);
set("y span",4e-6);
set("z",0.075e-6);
set("z span",1e-6);
set("mesh cells y",100);
set("mesh cells z",200);

findmodes;
selectmode(1);
setanalysis("track selected mode",1);
setanalysis("detailed dispersion calculation",1);
frequencysweep;

图2 CHECK去拟合材料图
图2 CHECK去拟合材料图
图3 findmode里 计算4个模式  最上面第一项和第二项是模式和反模式
图3 findmode里 计算4个模式 最上面第一项和第二项是模式和反模式
图4 频率扫描后 得到模式1的1.55处的群折射率
图4 频率扫描后 得到模式1的1.55处的群折射率
图5 问题:频率扫描得到的原始数据是这些,群折射率怎么从原始数据算过去?因为不知道答案,所以不能在脚本里得到群折射率。
图5 问题:频率扫描得到的原始数据是这些,群折射率怎么从原始数据算过去?因为不知道答案,所以不能在脚本里得到群折射率。
步骤3 根据材料群折射率修改中间那个圆的半径
ng就是在1.55处群折射率,依靠观察图得知。FSR自由谱区间5nm就是625G.
rid是圆的半径。

ng = 4.538; # 最后的弯曲波导取点由半径定的 相互影响
FSR=625e9; #5nm 625G   
L = c/ng/FSR;
rid=L/2/pi;
?rid;

计算耦合长度Lcop
n是取模式1的n和模式2的n,在步骤2的find mode处得到。
耦合长度远小于圆半径,忽略这个的设置。

Q = 2000;
lamuda = 1550e-9;
hk = ng * L * pi / 2 / Q / lamuda;
t11 = sqrt(hk^2 + 1) - hk;
t12=sqrt(1-t11^2);
n=2.358730-1.635394;
Lcop=lamuda/pi/n*(asin(t12));
?Lcop;

步骤4 添加varFDTD区域,添加光源,添加监视器(频率、power、time等),然后运行仿真。
位置可以手动拖拽图中的箭头。


switchtolayout;
addvarfdtd;
set("x",0);
set("x span",75e-6);
set("y",0);
set("y span",45e-6);
set("z",0);
set("z span",1e-6);
# set("simulation time",5000e-15);  # 5000 fs
set("simulation time",50000e-15);
set("bandwidth",2);
set("dt stability factor",0.2);

addmodesource;
set("injection axis","x");
set("x",-26.9454e-6);
set("y",-17.2227e-6);
set("y span",5e-6);
set("wavelength start",1.5e-6);
set("wavelength stop",1.6e-6);

addpower;
set("name","though");
set("monitor type",3);  # 1 = point, 2 = linear x, 3 = linear y, 4 = linear z, 5 = 2D x-normal, 6 = 2D y-normal, 7 = 2D z-normal, 8 = 3D
set("x",28.4e-6);
set("y",-17e-6);
set("y span",2e-6);
set("override global monitor settings",1);
set("frequency points",500);

addtime;
set("name","thoughtime");
set("monitor type",1);  # 1 = point, 2 = linear x, 3 = linear y, 4 = linear z, 5 = 2D x-normal, 6 = 2D y-normal, 7 = 2D z-normal, 8 = 3D
set("x",28.4e-6);
set("y",-17e-6);

run;

步骤5 仿真结束,查看滤波效果。

注意点:
1、问题。不知道ng怎么由那一堆原始数据得到;
2、问题。fde的ng应该是受到波导的宽和高影响,但是进行fde的框形状改变,ng也会变;
3、以官网为主参照,博客只是给了一个参考性脚本;
4、可以依靠addwaveguide添加任意形状的波导,只需要函数形式,取得点越多,拟合得越好,如下:

# 画出cosx
# 第1 2 象限的取点
x=linspace(-x0,x0,500);
y=cos(x);
pxx=x*radius;
pyy=(y)*radius;

# 上面
groupscope("::model");
addwaveguide;
set("name","ar1");
select("ar1");
set("material","Si (Silicon) - Palik Copy 1");
set("base angle",base_angle);
set("base height",base_height);
set("base width",base_width);
set("detail",0.5);
px1 = pxx;
py1 = pyy;
p1 = [px1,py1];
set("poles",p1);
set("x",0);
set("y",0);
set("z",0.11e-6);
  • 6
    点赞
  • 60
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值