资源简介
处理倏逝波,常规的PML会产生大的误差,这就需要卷积边界条件(CPML)
代码片段和文件信息
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% One-Dimensional_FDTD CPML ABC
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clear;
clear all;
clc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Total number of time steps
MaxTime = 130;
%--------------------------------
epsR = 1.0;
sigM1 = 0.0 ;
%--------------------------------
c0 = 2.99792458E8;
mu0 = 4.0 * pi * 1.0E-7;
eps0 = 1.0/(c0*c0*mu0);
%--------------------------------
freq=1.9341e+14;
lambda=c0/freq;
%--------------------------------
dxyz = .25E-3;
%dxyz = lambda/8;
dt = dxyz/(c0);
%--------------------------------
% Specify the Impulsive Source
% tw = 53.0E-12; tO = 4.0*tw;
tw=6; t0 = 20;
% PML thickness in each direction
kBC = 40;
%--------------------------------
% Size of main grid
ke=120;
kh=ke+1;
% Size of total computational domain
keT=ke+2*kBC;
khT=keT+1;
%--------------------------------
Ex =zeros(khT1);
Hy =zeros(khT1);
CA =zeros(khT1);
CB =zeros(khT1);
sig =zeros(khT1);
epsi=zeros(khT1);
%--------------------------------
ksrc=round(keT/2);
%--------------------------------
% Specify the CPML Order and Other Parameters
m = 3; ma = 1 ;
sigZmax = (0.8*(m+1)/(dxyz*(mu0/eps0*epsR)^0.5));
aZmax = 0.05;
kZmax = 1.0;
%--------------------------------
record_grid = MaxTime;
NoFig=99;
Nplt_jmp=5;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
psi_Exz1=zeros(khT1);psi_Exz2=zeros(khT1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
psi_Hyz1=zeros(khT1);psi_Hyz2=zeros(khT1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bEz=zeros(kBC1);cEz=zeros(kBC1) ;
A_EzBC=zeros(kBC1) ;
sigEzBC=zeros(kBC1) ;
K_EzBC=zeros(kBC1) ;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bHz=zeros(kBC-11);cHz=zeros(kBC-11) ;
A_HzBC=zeros(kBC-11);
sigHz_BC=zeros(kBC-1);
K_HzBC=zeros(kBC-11);
% Denominators for the update equations
F_ez=zeros(keT1);
F_hz=zeros(keT1);
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% INITIALIZE VARIABLES
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sig(:) = sigM1;
epsi(:) = epsR*eps0;
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% SET CPML PARAMETERS IN EACH DIRECTION
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% z-dir
%
for k = 1:kBC
sigEzBC(k) = sigZmax * ( (kBC - k ) / (kBC - 1.0) )^m;
K_EzBC(k) = 1.0+(kZmax-1.0)*((kBC - k) / (kBC - 1.0))^m;
A_EzBC(k) = aZmax*((k-1)/(kBC-1.0))^ma;
bEz(k) = exp(-(sigEzBC(k) / K_EzBC(k) + A_EzBC(k))*dt/eps0);
if ((sigEzBC(k) == 0.0) && ...
(A_EzBC(k) == 0.0) && (k == kBC))
cEz(k) = 0.0;
else
cEz(k) = sigEzBC(k)*(bEz(k)-1.0)/ (sigE
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 43056 2008-12-30 00:56 CPML_1D\CPML1D_055.jpg
文件 18897 2008-12-30 00:56 CPML_1D\CPML1D_105.jpg
文件 41579 2008-12-30 00:55 CPML_1D\CPML1D_130.jpg
文件 8633 2008-12-30 00:53 CPML_1D\CPML_1D.asv
文件 8628 2008-12-30 01:00 CPML_1D\CPML_1D.m
目录 0 2009-01-02 23:51 CPML_1D
----------- --------- ---------- ----- ----
121011 7
- 上一篇:用Multisim4人抢答器
- 下一篇:基于栅格地图的Dijkstra算法路径规划
相关资源
- 基于栅格地图的Dijkstra算法路径规划
- SMOTE结合SVM算法matlab实现
- MATLAB文字识别程序解析
- 基于MATLAB的血管三维重建
- Allan方差计算程序Matlab版
- Goldstein_Filter
- matlab 图像加噪去噪
- 随机相位正弦波仿真实验MATLAB程序
- MATLAB图像识别80192
- 模糊神经网络matlab源程序
- 三维B样条函数的matlab实现
- 基于matlab的工件缺陷检测
- matlab生成可见性图程序
- matlab 图像校正
- matlab编写的流体计算和传热程序
- 基于粒子群优化算法的模糊c聚类源码
- ACSS角点检测程序
- MUSIC算法的DOA估计的matlab仿真程序
- capon算法Doa估计测角精度仿真matlab
- LFM仿真的matlab程序
- 基于MATLAB的语音滤波实验设计
- 轮廓跟踪法提取图像轮廓MATLAB源码
- HIV传染动力学模型
- GMSK调制解调的MATLAB实现
- 自抗扰matlab程序代码
- TCM网格编码调制matlab仿真完整版
- MATLAB 图像增强程序
- 二维MUSIC算法仿真.m
- 宽带信号的波达方向估计.m
- 最优波束形成与常规波束形成对比.
评论
共有 条评论