一维FDTD色散媒质

一维FDTD色散媒质

ID:40584181

大小:13.61 KB

页数:4页

时间:2019-08-04

一维FDTD色散媒质_第1页
一维FDTD色散媒质_第2页
一维FDTD色散媒质_第3页
一维FDTD色散媒质_第4页
资源描述:

《一维FDTD色散媒质》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、%%%%%%%%Frequency-dependentmedia%%%%%%%%%%%%%%%%MoreonOne-dimensionalsimulation2_3%%%%%%%%%%%%%%%%1DFDTDsimulation%%%%%%%%KE=200;%%%%%%%%spacelong%%%%%%%%ex=zeros(1,KE+1);hy=zeros(1,KE+1);dx=zeros(1,KE+1);ix=zeros(1,KE+1);sx=zeros(1,KE+1);ga=zeros(1,KE+1);gb=zeros(1,KE+1);gc=zer

2、os(1,KE+1);mag=zeros(1,KE+1);arg=zeros(1,3);%%%%%%%%RealandimaginarypartsoftheFourierTransform%%%%%%%%real_pt=zeros(3,KE+1);imag_pt=zeros(3,KE+1);%%%%%%%%AmplitudeandphaseoftheFourierTransform%%%%%%%%ampn=zeros(3,KE+1);phasen=zeros(3,KE+1);%%%%%%%%Amplitudeandphaseofinputpulse%%

3、%%%%%%amp_in=zeros(1,3);phase_in=zeros(1,3);%%%%%%%%FourierTrans.ofinputpulse%%%%%%%%real_in=zeros(1,3);imag_in=zeros(1,3);%%%%%%%%Parameters%%%%%%%%ex_low_m1=0;ex_low_m2=0;ex_high_m1=0;ex_high_m2=0;T=0;NSTEP=500;%%%%%%%%timestep%%%%%%%%kc=KE/2;%%%%%%%%Mediuminterface%%%%%%%%t0=

4、50;%%%%%%%%Gaussianpulseparameter%%%%%%%%spread=10;%%%%%%%%Gaussianpulseparameter%%%%%%%%ddx=0.01;%%%%%%%%setthecellsizeto1cm%%%%%%%%dt=ddx/(2*3e8);%%%%%%%%calculatethetimestep%%%%%%%%freq_in=7*1e8;%%%%%%%%signalfrequency%%%%%%%%epsilon=2;%%%%%%%%relativedielectricconstant%%%%%%

5、%%kstart=100;%%%%%%%%positionofthedielectricmedium%%%%%%%%epsz=8.85419e-12;%%%%%%%%absolutedielectricconstant%%%%%%%%sigma=0.01;%%%%%%%%conductivity%%%%%%%%chil=2;tau=1e-9;%%%%%%%%signalfrequency%%%%%%%%freq=[50.e6,200.e6,500.e6];fori=1:3arg(i)=2*pi*freq(i)*dt;end%%%%%%%%initial

6、izetofreespace%%%%%%%%forn=1:KE+1ga(n)=1;gb(n)=0;gc(n)=0;enddel_exp=exp(-dt/tau);forn=kstart:KE+1ga(n)=1/(epsilon+(sigma*dt/epsz)+chil*dt/tau);gb(n)=sigma*dt/epsz;gc(n)=chil*dt/tau;endforn=1:NSTEPT=T+1;%%%%%%%%calculatedxfield%%%%%%%%fork=2:KE+1dx(k)=dx(k)+0.5*(hy(k-1)-hy(k));en

7、d%%%%%%%%insertsource%%%%%%%%pulse=exp(-0.5*(t0-T)^2/spread^2);%%%%%%%%sin(2*pi*freq_in*dt*T);%%%%%%%%dx(5)=dx(5)+pulse;%%%%%%%%calculateExfromdx%%%%%%%%fork=2:KE+1ex(k)=ga(k)*(dx(k)-ix(k)-del_exp*sx(k));ix(k)=ix(k)+gb(k)*ex(k);sx(k)=del_exp*sx(k)+gc(k)*ex(k);end%%%%%%%%calculat

8、etheFouriertransformofEx%%%%%%%%fork=2:KE+1fori

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。