%微带线的FDTD仿真
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%最基本设定
TimeStop=2000; %计算时间步
f0=6.7e9; %设定中心频点
w0=2*pi*f0; %中心角频率
delta_t=3.3083e-013;
W0=w0*delta_t; %数字角频率
f_max=10e9;
f_min=2e9;
Gaussian_T=0.5/f_max;
Gaussian_t0=3*Gaussian_T;
Patch_W=15e-3; %物理尺寸的设置(天线尺寸)
Patch_H=0.794e-3;
Dielectric_er=2.32; %基板相对介质常数
c=3*10^8;
Mu0=pi*4e-7;
Eps0=1/c^2/Mu0;
Eps1=Eps0*Dielectric_er;
Eps10=(Eps0+Eps1)/2;
Total_L=400; %设定计算领域
Total_W=50;
Total_H=9;
Antenna_W=40; %天线的格子数
Antenna_H=4;
delta_y=Patch_W/Antenna_W; %网格长度
delta_x=delta_y;
delta_z=Patch_H/Antenna_H;
Pml_L=8; %吸收边界参数设定
R0=0.00001;
n=2;
Ipmin=1;Imin=Ipmin+Pml_L;Imax=Imin+Total_L;Ipmax=Imax+Pml_L; %吸收边界
Jpmin=1;Jmin=Jpmin+Pml_L;Jmax=Total_W+Jmin;Jpmax=Jmax+Pml_L;
Kmin=1;Kmax=Total_H+Kmin;Kpmax=Kmax+Pml_L;
Iamin=Imin+2;
Jamin=Jmin+round((Total_W-Antenna_W)/2);Jamax=Antenna_W+Jamin;
Kamax=1+Antenna_H;
J_ref0=Jamin+1;
I_ref0=Iamin+3;
I_ref1=Imax-3;
I_ref2=Imax+3;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%在计算微带线激励时要用到的场
Ez(Ipmin:Ipmax,Jpmin:Jpmax,Kmin:(Kpmax-1))=0; %FDTD采样点Ez,Ez(i,j,k+1/2,t=n)
Ex(Ipmin:(Ipmax-1),Jpmin:Jpmax,Kmin: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Ipmax,Jpmin:(Jpmax-1),Kmin:(Kpmax-1))=0; %FDTD采样点Hx,Ex(i,j+1/2,k+1/2,t=n+1/2)
Hxz(Ipmin:Ipmax,Jpmin:(Jpmax-1),Kmin:(Kpmax-1))=0; %FDTD采样点Hx,Ex(i,j+1/2,k+1/2,t=n+1/2)
Hyx(Ipmin:(Ipmax-1),Jpmin:Jpmax,Kmin:(Kpmax-1))=0; %FDTD采样点Hy,Hy(i+1/2,j,k+1/2,t=n+1/2)
Hyz(Ipmin:(Ipmax-1),Jpmin:Jpmax,Kmin:(Kpmax-1))=0; %FDTD采样点Hy,Hy(i+1/2,j,k+1/2,t=n+1/2)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%在非PML区FDTD迭代要用到的系数
MediaNumber=2; %表示只有两种不同的介质:空气,Duroid %epsilon_r
Media(1,1)=1; %epsilon_r
Media(2,1)=1; %mu_r
Media(3,1)=0; %sigma
Media(4,1)=0; %sigma_m
Media(1,2)=Dielectric_er;
Media(2,2)=1;
Media(3,2)=0;
Media(4,2)=0;
Media(1,1:MediaNumber)=Media(1,1:MediaNumber)*Eps0;
Media(2,1:MediaNumber)=Media(2,1:MediaNumber)*Mu0;
for I=1:MediaNumber
for J=1:MediaNumber
CA1(I,J)=((Media(1,I)+Media(1,J))-0.5*(Media(3,I)+Media(3,J))*delta_t)/((Media(1,I)+Media(1,J))+0.5*(Media(3,I)+Media(3,J))*delta_t);
%电场计算公式第一项系数
CB1(I,J)=2*delta_t/((Media(1,I)+Media(1,J))+0.5*(Media(3,I)+Media(3,J))*delta_t);
%电场计算公式第二项系数
CP1(I,J)=((Media(2,I)+Media(2,J))-0.5*(Media(4,I)+Media(4,J))*delta_t)/((Media(2,I)+Media(2,J))+0.5*(Media(4,I)+Media(4,J))*delta_t);
%磁场场计算公式第一项系数
CQ1(I,J)=2*delta_t/((Media(2,I)+Media(2,J))+0.5*(Media(4,I)+Media(4,J))*delta_t);
%磁场场计算公式第二项系数
end
end
CA(Kmin:(Kamax-1))=CA1(2,2);CB(Kmin:(Kamax-1))=CB1(2,2);CP(Kmin:(Kamax-1))=CP1(2,2);CQ(Kmin:(Kamax-1))=CQ1(2,2);
CA((Kamax+1):Kmax)=CA1(1,1);CB((Kamax+1):Kmax)=CB1(1,1);CP((Kamax+1):Kmax)=CP1(1,1);CQ((Kamax+1):Kmax)=CQ1(1,1);
CA(Kamax)=CA1(1,2);CB(Kamax)=CB1(1,2);CP(Kamax)=CP1(1,2);CP(Kamax)=CP1(1,2);CQ(Kamax)=CQ1(1,2);
CA_half(Kmin:(Kamax-1))=CA1(2,2);CB_half(Kmin:(Kamax-1))=CB1(2,2);CP_half(Kmin:(Kamax-1))=CP1(2,2);CQ_half(Kmin:(Kamax-1))=CQ1(2,2);
CA_half(Kamax:(Kmax-1))=CA1(1,1);CB_half(Kamax:(Kmax-1))=CB1(1,1);CP_half(Kamax:(Kmax-1))=CP1(1,1);CQ_half(Kamax:(Kmax-1))=CQ1(1,1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%在进行PML计算时要用到的电导率和磁导率的设定
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%sigma_x
L=0;
sigma_x0(1+L*2)=Eps0*c*(-log(R0))/(2^(n+2)*delta_x*Pml_L^(n+1)); %sigma_x(1,2,3,,...)=sigma_x(0,1/2,1,...)
for L=1/2:1/2:Pml_L
sigma_x0(1+L*2)=sigma_x0(1)*((2*L+1)^(n+1)-(2*L-1)^(n+1)); %可从Perfectly matched layer for the FDTD solution of wave-structure interaction problems.pdf查到相应公式
end
sigma_m_x0=sigma_x0/Eps0*Mu0;
L=0;
sigma_x1(1+L*2)=Eps1*c*(-log(R0))/(2^(n+2)*delta_x*Pml_L^(n+1));
for L=1/2:1/2:Pml_L
sigma_x1(1+L*2)=sigma_x1(1)*((2*L+1)^(n+1)-(2*L-1)^(n+1));
end
sigma_m_x1=sigma_x1/Eps1*Mu0;
L=0;
sigma_x10(1+L*2)=Eps10*c*(-log(R0))/(2^(n+2)*delta_x*Pml_L^(n+1));
for L=1/2:1/2:Pml_L
sigma_x10(1+L*2)=sigma_x10(1)*((2*L+1)^(n+1)-(2*L-1)^(n+1));
end
sigma_m_x10=sigma_x10/Eps10*Mu0;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%sigma_y
L=0;
sigma_y0(1+L*2)=Eps0*c*(-log(R0))/(2^(n+2)*delta_y*Pml_L^(n+1)); %sigma_y(1,2,3,,...)=sigma_y(0,1/2,1,...)
for L=1/2:1/2:Pml_L
sigma_y0(1+L*2)=sigma_y0(1)*((2*L+1)^(n+1)-(2*L-1)^(n+1));
end
sigma_m_y0=sigma_y0/Eps0*Mu0;
L=0;
sigma_y1(1+L*2)=Eps1*c*(-log(R0))/(2^(n+2)*delta_y*Pml_L^(n+1));
for L=1/2:1/2:Pml_L
sigma_y1(1+L*2)=sigma_y1(1)*((2*L+1)^(n+1)-(2*L-1)^(n+1));
end
sigma_m_y1=sigma_y1/Eps1*Mu0;
L=0;
sigma_y10(1+L*2)=Eps10*c*(-log(R0))/(2^(n+2)*delta_y*Pml_L^(n+1));
for L=1/2:1/2:Pml_L
sigma_y10(1+L*2)=sigma_y10(1)*((2*L+1)^(n+1)-(2*
海神之光
- 粉丝: 5w+
- 资源: 7128
最新资源
- 昆仑通态MCGS与3台欧姆龙E5*C温控器通讯程序功能:通过昆仑通态触摸屏,实现对3台欧姆龙E5CC温控器 设定温度值,读取实际温度,设定报警值,设定报警类型,报警上下限功能 反应灵敏,通讯稳定可靠
- 大电流电动工具,电动螺丝刀,电锯批量方案,12V,30A FOC控制
- 三菱FX3G两轴标准程序,XZ两轴,包含轴点动,回零,相对与绝对定位,只要弄明白这个程序,就可以非常了解整个项目的程序如何去编写,从哪里开始下手,
- 昆仑通态MCGS与2台台达VFD-M变频器通讯程序实现昆仑通态触摸屏与2台台达VFD-M变频器通讯,程序稳定可靠 器件:昆仑通态TPC7062KD触摸屏,2台台达VFD-M变频器,附送接线说明和设置说
- MATLAB代码:考虑安全约束及热备用的电力系统机组组合研究 关键词:机组组合 直流潮流 优化调度 参考文档:店主自编文档,模型数据清晰明了 仿真平台:MATLAB+CPLEX gurobi平台
- c#上位案例,动态添加控件 1、这是个上位机案例,自己写来通过电脑监控kuka机器人信号的工具; 3、软件界面上可以动态添加要监控的信号,可以强制输出信号 4、有c#源代码,可以作为上位机与机器人通
- 三菱FX3U与力士乐VFC-x610变频器通讯程序三菱FX3U与力士乐VFC-x610变频器通讯案例程序,有注释 并附送程序,有接线方式,设置 器件:三菱FX3U的PLC,力士乐VFCx610变频
- 台达DVP PLC与3台力士乐VFC-x610变频器通讯程序 程序带注释,并附送昆仑通态程序,有接线方式,设置 器件:台达DVP ES系列的PLC,3台力士乐VFC-x610系列变频器,昆仑通态 功
- FPGA开发:实现数码管+1602双通道秒表(联系后留邮)按键切秒表模式,所用开发板DE2-115,代码可移植,内含FPGA驱动1602代码,代码有详细注释
- 汇川PLC AM403-CPU1608TN,2020产品基于CODESYS平台二次订制软件,支持16轴ethercat总线,自带以太网 USB CANOPEN 2路485,16高速输入8高速输出,功能
- 电力电子、电机驱动、数字滤波器matlab simulink仿真模型实现及相关算法的C代码实现 配置C2000 DSP ADC DAC PWM定时器 中断等模块,提供simulink与DSP的联合仿
- labview.通用OCR识别技术
- FoobarCon_v0.9.91.0.apk
- 华为HarmonyOS应用开发者高级认证,官方专业证书
- 华为HarmonyOS应用开发者高级认证,官方专业证书
- 51单片机四层电梯控制器 基于51单片机的四层电梯控制系统 包括源代码和proteus仿真 系统硬件由51单片机最小系统、蜂鸣器电路、指示灯电路、内部按键电路、外部按键电路、步进电机、ULN2003
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈