⛄一、获取代码方式
获取代码方式1:
完整代码已上传我的资源:【电磁波】基于matlab三维FDTD电磁波传播仿真【含Matlab源码 3867期】
点击上面蓝色字体,直接付费下载,即可。
获取代码方式2:
付费专栏Matlab物理应用(初级版)
备注:
点击上面蓝色字体付费专栏Matlab物理应用(初级版),扫描上面二维码,付费29.9元订阅海神之光博客付费专栏Matlab物理应用(初级版),凭支付凭证,私信博主,可免费获得1份本博客上传CSDN资源代码(有效期为订阅日起,三天内有效);
点击CSDN资源下载链接:1份本博客上传CSDN资源代码
⛄二、部分源代码
clear
%***********************************************************************
% Fundamental constants
%***********************************************************************
cc=2.99792458e8; %speed of light in free space
muz=4.0pi1.0e-7; %permeability of free space
epsz=1.0/(ccccmuz); %permittivity of free space
freq=5.0e+9; %center frequency of source excitation
lambda=cc/freq; %center wavelength of source excitation
omega=2.0pifreq;
%***********************************************************************
% Grid parameters
%***********************************************************************
ie=100; %number of grid cells in x-direction
je=50; %number of grid cells in y-direction
ib=ie+1;
jb=je+1;
is=15; %location of z-directed hard source
js=je/2; %location of z-directed hard source
dx=3.0e-3; %space increment of square lattice
dt=dx/(2.0*cc); %time step
nmax=300; %total number of time steps
iebc=8; %thickness of left and right PML region
jebc=8; %thickness of front and back PML region
rmax=0.00001;
orderbc=2;
ibbc=iebc+1;
jbbc=jebc+1;
iefbc=ie+2iebc;
jefbc=je+2jebc;
ibfbc=iefbc+1;
jbfbc=jefbc+1;
%***********************************************************************
% Material parameters
%***********************************************************************
media=2;
eps=[1.0 1.0];
sig=[0.0 1.0e+7];
mur=[1.0 1.0];
sim=[0.0 0.0];
%***********************************************************************
% Wave excitation
%***********************************************************************
rtau=160.0e-12;
tau=rtau/dt;
delay=3*tau;
source=zeros(1,nmax);
for n=1:7.0tau
source(n)=sin(omega(n-delay)*dt)*exp(-((n-delay)2/tau2));
end
⛄三、运行结果
⛄四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1]张鹏,陈国平,王宇. 基于特征线法和特征参数法的管道瞬变流计算[J]. 河海大学学报(自然科学版), 2014, 42(6): 602-607.
3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除