- 日志
- 相册
- 记录
- 好友
- 听众
- 收听
- 微元
-
- 在线时间
- 小时
- 阅读权限
- 80
- 注册时间
- 2011-11-26
- 最后登录
- 1970-1-1
|
发表于
2012-7-9 15:50:28
|
显示全部楼层
请教一个经典程序上的问题(Taflove书上带的程序)关于PML层设置的问题% FRONT region
caexbcf(1:iefbc,1)=1.0;
cbexbcf(1:iefbc,1)=0.0;
for j=2:jebc
y1=(jebc-j+1.5)*dx;
y2=(jebc-j+0.5)*dx;
sigmay=bcfactor*(y1^(orderbc+1)-y2^(orderbc+1));
ca1=exp(-sigmay*dt/epsz);
cb1=(1.0-ca1)/(sigmay*dx);
caexbcf(1:iefbc,j)=ca1;
cbexbcf(1:iefbc,j)=cb1;
end
sigmay = bcfactor*(0.5*dx)^(orderbc+1);
ca1=exp(-sigmay*dt/epsz);
cb1=(1-ca1)/(sigmay*dx);
caex(1:ie,1)=ca1;
cbex(1:ie,1)=cb1;
caexbcl(1:iebc,1)=ca1;
cbexbcl(1:iebc,1)=cb1; % 电场的迭代
caexbcr(1:iebc,1)=ca1;
cbexbcr(1:iebc,1)=cb1;
for j=1:jebc
y1=(jebc-j+1)*dx;
y2=(jebc-j)*dx;
sigmay=bcfactor*(y1^(orderbc+1)-y2^(orderbc+1));
sigmays=sigmay*(muz/epsz);
da1=exp(-sigmays*dt/muz);
db1=(1-da1)/(sigmays*dx);
dahzybcf(1:iefbc,j)=da1;
dbhzybcf(1:iefbc,j)=db1;
caeybcf(1:ibfbc,j)=ca(1); % 磁场的迭代
cbeybcf(1:ibfbc,j)=cb(1);
dahzxbcf(1:iefbc,j)=da(1);
dbhzxbcf(1:iefbc,j)=db(1);
end |
|