欢迎来到天天文库
浏览记录
ID:58676348
大小:13.75 KB
页数:13页
时间:2020-10-15
《RCS-FDTD方柱-球的RCS程序.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、%FDTD_2D_RCSclear;clc;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*******************************初始化***********************************%%tic;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%v=3*10^8;%波速f=
2、15*10^(9);%频率lamda=v/f;%波长k=2*pi/lamda;%波数epsz=1/(4*pi*9*10^9);%真空介电常数mu=4*pi*10.^(-7);%真空磁导率Z=sqrt(mu/epsz);%真空波阻抗epsilon=1;%相对介电常数sigma=0.0;%电导率%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%N=120;%网格数量L=1000;%迭代次数ddx=lamda/20;%网格尺寸d
3、t=ddx/(2*v);%时间间隔lstart=1;%空间起始行坐标lend=N;%空间终止行坐标rstart=1;%空间起始列坐标rend=N;%空间终止列坐标ia=N/4;%总场区域x左ib=3*N/4;%总场区域x右ja=ia;%总场区域x下jb=ib;%总场区域x上pa=ia-5;%外推区域x左pb=ib+5;%外推区域x右qa=pa;%外推区域x下qb=pb;%外推区域x上length=pb-pa+1;%每个边上的总长度npml=N/8;%PML点数%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4、%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%方柱参数side=2*lamda;%方柱边长halfgrid=round(side/(2*ddx));%方柱占据网格大小%%媒质参数fori=lstart:lend;%控制媒质分部区域forj=rstart:rend;ga(i,j)=1/(epsilon+sigma*dt/epsz);%求和参量gb(i,j)=sigma*dt/epsz;%求和参量end;end;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5、%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%源参数spread=8;%脉冲宽度t0=25;%脉冲高度is=N/2;%源的X位置js=N/2;%源的Y位置%%输入平面波ez_inc=zeros(1,N);hx_inc=zeros(1,N);%%平面波吸收条件变量初始化ez_v1=0;ez_v2=0;ez_v3=0;ez_v4=0;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6、迭待电磁场参量dz=zeros(N,N);%z方向电荷密度ez=zeros(N,N);%z方向电场iz=zeros(N,N);%z方向电场求和参量hx=zeros(N,N);%x方向磁场hy=zeros(N,N);%y方向磁场ihx=zeros(N,N);%x方向磁场参量ihy=zeros(N,N);%y方向磁场参量%%相位和幅度提取(傅里叶变换)ine=0;inh=0;ez_out=zeros(4,length+1);hx_out=zeros(4,length);hy_out=zeros(4,length);%%%%%
7、%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*********************************PML设置********************************%%%%PML初始化fori=1:N;gi2(i)=1;gi3(i)=1;fi1(i)=0;
8、fi2(i)=1;fi3(i)=1;end;forj=1:N;gj2(j)=1;gj3(j)=1;fj1(j)=0;fj2(j)=1;fj3(j)=1;end;%%阻抗渐变设置fori=1:npml+1;xnum=npml-i+1;xxn=xnum/npml;xn=0.33*(xxn^3);gi2(i)=1/(1+x
此文档下载收益归作者所有