下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、%*%3-DFDTDcodewithPECboundaries%*%Programauthor:SusanC.Hagness%DepartmentofElectricalandComputerEngineering%UniversityofWisconsin-Madison%1415EngineeringDrive%Madison,WI53706-1691%608-265-5739*.edu*.edu%Dateofthisversion:February2000%ThisMATLABM-fileimplementsthefinite-differencetime-domain%solution
2、ofMaxwellscurlequationsoverathree-dimensional%Cartesianspacelatticecomprisedofuniformcubicgridcells.%Toillustratethealgorithm,anair-filledrectangularcavity%resonatorismodeled.Thelength,width,andheightofthe%cavityare10.0cm(x-direction),4.8cm(y-direction),and%2.0cm(z-direction),respectively.%Thecomput
3、ationaldomainistruncatedusingPECboundary%conditions:%ex(i,j,k)=0onthej=1,j=jb,k=1,andk=kbplanes%ey(i,j,k)=0onthei=1,i=ib,k=1,andk=kbplanes%ez(i,j,k)=0onthei=1,i=ib,j=1,andj=jbplanes%ThesePECboundariesformtheouterlosslesswallsofthecavity.%Thecavityisexcitedbyanadditivecurrentsourceoriented%alongthez-
4、direction.Thesourcewaveformisadifferentiated%Gaussianpulsegivenby%J(t)=-J0*(t-t0)*exp(-(t-t0)A2/tauA2),%wheretau=50ps.TheFWHMspectralbandwidthofthiszero-dc-%contentpulseisapproximately7GHz.Thegridresolution%(dx=2mm)waschosentoprovideatleast10samplesper%wavelengthupthrough15GHz.%ToexecutethisM-file,t
5、ypefdtd3DattheMATLABprompt.%ThisM-filedisplaystheFDTD-computedEzfieldsateveryother%timestep,andrecordsthoseframesinamoviematrix,M,which%isplayedattheendofthesimulationusingthemoviecommand.%*clear%*%Fundamentalconstantscc=2.99792458e8;muz=4.0*pi*1.0e-7;cc=2.99792458e8;muz=4.0*pi*1.0e-7;epsz=1.0/(cc*c
6、c*muz);%speedoflightinfreespace%permeabilityoffreespace%permittivityoffreespace%*%Gridparameters%*ie=50;%numberofgridcellsinx-directionje=24;%numberofgridcellsiny-directionke=10;%numberofgridcellsinz-directionib=ie+1;jb=je+1;kb=ke+1;is=26;%locationofz-directedcurrentsourcejs=13;%locationofz-directed
7、currentsourcekobs=5;dx=0.002;%spaceincrementofcubiclatticedt=dx/(2.0*cc);%timestepnmax=500;%totalnumberoftimesteps%*%DifferentiatedGaussianpulseexcitation%*rtau=50.0e-12;tau=rtau/dt;ndelay=3*tau;srcconst=-dt*3.0e+11;%*%Materialparameters%*eps=1.0;sig=0.0;%*%Updatingcoefficients%*ca=(1.0-(dt*sig)/(2.
8、0*epsz*eps)/(1.0+(dt*sig)/(2.0*epsz*eps);cb=(dt/epsz/eps/dx)/(1.0+(dt*sig)/(2.0*epsz*eps);da=1.0;db=dt/muz/dx;%*%Fieldarrays%*ex=zeros(ie,jb,kb);ey=zeros(ib,je,kb);ez=zeros(ib,jb,ke);hx=zeros(ib,je,ke);hy=zeros(ie,jb,ke);hz=zeros(ie,je,kb);%*%Movieinitialization%*tview(:,:)=ez(:,:,kobs);sview(:,:)=e
9、z(:,js,:);subplot(position,0.150.450.70.45),pcolor(tview);shadingflat;caxis(-1.01.0);colorbar;axisimage;title(Ez(i,j,k=5),timestep=0);xlabel(icoordinate);ylabel(jcoordinate);subplot(position,0.25),pcolor(sview);shadingflat;caxis(-1.01.0);colorbar;axisimage;title(Ez(i,j=13,k),timestep=0);x
10、label(icoordinate);ylabel(kcoordinate);rect=get(gcf,Position);rect(1:2)=00;M=moviein(nmax/2,gcf,rect);%*%BEGINTIME-STEPPINGLOOP%*forn=1:nmax%*%Updateelectricfields%*ex(1:ie,2:je,2:ke)=ca*ex(1:ie,2:je,2:ke)+.cb*(hz(1:ie,2:je,2:ke)-hz(1:ie,1:je-1,2:ke)+.hy(1:ie,2:je,1:ke-1)-hy(1:ie,2:je,2:ke);ey(2:ie,
11、1:je,2:ke)=ca*ey(2:ie,1:je,2:ke)+.cb*(hx(2:ie,1:je,2:ke)-hx(2:ie,1:je,1:ke-1)+.hz(1:ie-1,1:je,2:ke)-hz(2:ie,1:je,2:ke);ez(2:ie,2:je,1:ke)=ca*ez(2:ie,2:je,1:ke)+.cb*(hx(2:ie,1:je-1,1:ke)-hx(2:ie,2:je,1:ke)+.hy(2:ie,2:je,1:ke)-hy(1:ie-1,2:je,1:ke);ez(is,js,1:ke)=ez(is,js,1:ke)+.srcconst*(n-ndelay)*exp
12、(-(n-ndelayF2/tauA2);%*%Updatemagneticfields%*hx(2:ie,1:je,1:ke)=hx(2:ie,1:je,1:ke)+.db*(ey(2:ie,1:je,2:kb)-ey(2:ie,1:je,1:ke)+.ez(2:ie,1:je,1:ke)-ez(2:ie,2:jb,1:ke);hy(1:ie,2:je,1:ke)=hy(1:ie,2:je,1:ke)+.db*(ex(1:ie,2:je,1:ke)-ex(1:ie,2:je,2:kb)+.ez(2:ib,2:je,1:ke)-ez(1:ie,2:je,1:ke);hz(1:ie,1:je,2
13、:ke)=hz(1:ie,1:je,2:ke)+.db*(ex(1:ie,2:jb,2:ke)-ex(1:ie,1:je,2:ke)+.ey(1:ie,1:je,2:ke)-ey(2:ib,1:je,2:ke);%*%Visualizefields%*ifmod(n,2)=0;timestep=int2str(n);tview(:,:)=ez(:,:,kobs);sview(:,:)=ez(:,js,:);subplot(position,0.150.450.70.45),pcolor(tview);shadingflat;caxis(-1.01.0);colorbar;axisimage;title(Ez(i,j,k=5),timestep=,timestep);xlabel(icoordinate);ylabel(jcoordinate);subplot(position,0.25),pcolor(sview);sha
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 養(yǎng)老院入住管理制度
- 企業(yè)員工培訓(xùn)與職業(yè)成長路徑制度
- 人教版(2024)八年級(jí)上冊(cè)英語期末復(fù)習(xí):Unit 1-Unit 8 詞匯+句型+句子 練習(xí)題匯編(含答案)
- 老年終末期尿失禁的護(hù)理干預(yù)方案循證評(píng)價(jià)
- 老年糖尿病患者的跌倒預(yù)防策略-1
- 水聲測(cè)量工變更管理測(cè)試考核試卷含答案
- 我國上市公司海外并購績效的多維度剖析與提升策略研究
- 煉廠氣加工工崗前情緒管理考核試卷含答案
- 我國上市公司內(nèi)部控制自我評(píng)價(jià)報(bào)告:現(xiàn)狀、問題與優(yōu)化路徑探究
- 電氣電子產(chǎn)品環(huán)保檢測(cè)員風(fēng)險(xiǎn)評(píng)估考核試卷含答案
- 北京市順義區(qū)2025-2026學(xué)年八年級(jí)上學(xué)期期末考試英語試題(原卷版+解析版)
- 中學(xué)生冬季防溺水主題安全教育宣傳活動(dòng)
- 2026年藥廠安全生產(chǎn)知識(shí)培訓(xùn)試題(達(dá)標(biāo)題)
- 2026年陜西省森林資源管理局局屬企業(yè)公開招聘工作人員備考題庫及參考答案詳解1套
- 冷庫防護(hù)制度規(guī)范
- 承包團(tuán)建燒烤合同范本
- 口腔種植牙科普
- 2025秋人教版七年級(jí)全一冊(cè)信息科技期末測(cè)試卷(三套)
- 搶工補(bǔ)償協(xié)議書
- 廣東省廣州市番禺區(qū)2026屆高一數(shù)學(xué)第一學(xué)期期末聯(lián)考試題含解析
- 2026年廣東省佛山市高三語文聯(lián)合診斷性考試作文題及3篇范文:可以“重讀”甚至“重構(gòu)”這些過往
評(píng)論
0/150
提交評(píng)論