二维光子晶体带隙仿真Matlab完全程序_平面波展开法

本程序为二维光子晶体Matlab仿真程序,该结果与文献【1】Molding the flow of light,p68 figure 2相互吻合

 

 

主程序

%This is a simple demo for Photonic Crystals simulation
%10 points is considered.
%---------------------------------------M
%| / |
%| / |
%| / |
%| --------------------|X
%| T |
%| |
%| |
%---------------------------------------
%by Gao Haikuo
%date:20170411
clear; clc; epssys=1.0e-6; %设定一个最小量,避免系统截断误差或除0错误
global NG G f Nkpoints
%this is the lattice vector and the reciprocal lattice vector
a=1; a1=a*[1 0]; a2=a*[0 1];
b1=2*pi/a*[1 0];b2=2*pi/a*[0 1];
Nkpoints=10; %每个方向上取的点数,
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%定义晶格的参数
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
epsa = 8.9; %inner
epsb = 1; %outer
Pf = 0.1257; %Pf = Ac/Au 填充率,可根据需要自行设定
Au =a^2; %二维格子原胞面积
Rc = (Pf *Au/pi)^(1/2); %介质柱截面半径
Ac = pi*(Rc)^2; %介质柱横截面积

%construct the G list
NrSquare = 10;
NG =(2*NrSquare+1)^2; % NG is the number of the G value
G = zeros(NG,2);
i = 1;
for l = -NrSquare:NrSquare
for m = -NrSquare:NrSquare

  • 2
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值