| 5 | 1/1 | 返回列表 |
| 查看: 1544 | 回復(fù): 6 | |||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | |||
☆皓月當(dāng)空☆新蟲 (初入文壇)
|
[求助]
求一個(gè)用FDTD(時(shí)域有限差分法)模擬電磁波三維RCS(散射)的源程序 已有2人參與
|
||
| 求一個(gè)用FDTD(時(shí)域有限差分法)模擬電磁波三維RCS(散射)的源程序。本人現(xiàn)在急用一個(gè)三維散射的程序,用于仿真模擬室內(nèi)常用材料對(duì)電磁波的輻射和散射還有透射過程,希望有哪位好心人給個(gè)源程序,matlab或者C都行(本人不會(huì)c++,fortran等語(yǔ)言)。一定要是三維的,而且是分析散射的。 |
|
3-D FDTD code with PEC boundaries clear %*********************************************************************** % Fundamental constants %*********************************************************************** cc=2.99792458e8; %speed of light in free space muz=4.0*pi*1.0e-7; %permeability of free space epsz=1.0/(cc*cc*muz); %permittivity of free space %*********************************************************************** % Grid parameters %*********************************************************************** ie=50; %number of grid cells and Ex samples along x-direction je=24; %number of grid cells and Ey samples along y-direction ke=10; %number of grid cells and Ez samples along z-direction ib=ie+1; %grid boundary coordinates jb=je+1; kb=ke+1; is=26; %location of z-directed current source js=13; %location of z-directed current source kobs=5; dx=0.002; %space increment of cubic lattice dt=dx/(2.0*cc); %time step nmax=500; %total number of time steps %*********************************************************************** % Differentiated Gaussian pulse excitation %*********************************************************************** rtau=50.0e-12; tau=rtau/dt; ndelay=3*tau; J0=-1.0; %*********************************************************************** % Material parameters %*********************************************************************** eps=1.0; sig=0.0; %*********************************************************************** % Updating coefficients %*********************************************************************** ca=(1.0-(dt*sig)/(2.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; %*********************************************************************** % Field arrays %*********************************************************************** 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); %figure %set(gcf,'DoubleBuffer','on') %*********************************************************************** % BEGIN TIME-STEPPING LOOP %*********************************************************************** for n=1:nmax %*********************************************************************** % Update electric fields %*********************************************************************** 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,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)+... J0*(n-ndelay)*exp(-((n-ndelay)^2/tau^2)); %*********************************************************************** % Update magnetic fields %*********************************************************************** 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: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)); %*********************************************************************** % Visualize fields %*********************************************************************** timestep=int2str(n); tview(:, =ez(:,:,kobs);sview(:, =ez(:,js, ;subplot('position',[0.15 0.45 0.7 0.45]),imagesc(tview'); shading flat; caxis([-1.0 1.0]); colorbar; axis image; axis xy; title(['Ez(i,j,k=5), time step = ',timestep]); xlabel('i coordinate'); ylabel('j coordinate'); subplot('position',[0.15 0.10 0.7 0.25]),imagesc(sview'); shading flat; caxis([-1.0 1.0]); colorbar; axis image; axis xy; title(['Ez(i,j=13,k), time step = ',timestep]); xlabel('i coordinate'); ylabel('k coordinate'); pause(0.05) %*********************************************************************** % END TIME-STEPPING LOOP %*********************************************************************** end |
榮譽(yù)版主 (文壇精英)
![]() |
專家經(jīng)驗(yàn): +518 |
新蟲 (初入文壇)
|
新蟲 (初入文壇)

| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 求調(diào)劑 +5 | 十三加油 2026-03-21 | 5/250 |
|
|---|---|---|---|---|
|
[考研] 297求調(diào)劑 +11 | 戲精丹丹丹 2026-03-17 | 12/600 |
|
|
[考研] 生物學(xué)一志愿985,分?jǐn)?shù)349求調(diào)劑 +3 | zxts12 2026-03-21 | 3/150 |
|
|
[考研] 299求調(diào)劑 +4 | 某某某某位 2026-03-21 | 4/200 |
|
|
[考研] 330求調(diào)劑0854 +3 | assdll 2026-03-21 | 3/150 |
|
|
[考研] 0856材料專碩353求調(diào)劑 +3 | NIFFFfff 2026-03-20 | 3/150 |
|
|
[考研] 346求調(diào)劑[0856] +4 | WayneLim327 2026-03-16 | 7/350 |
|
|
[考研] 332求調(diào)劑 +4 | ydfyh 2026-03-17 | 4/200 |
|
|
[考研] 材料 336 求調(diào)劑 +3 | An@. 2026-03-18 | 4/200 |
|
|
[考研] 296求調(diào)劑 +6 | www_q 2026-03-18 | 10/500 |
|
|
[考研] 324求調(diào)劑 +5 | lucky呀呀呀鴨 2026-03-20 | 5/250 |
|
|
[考研] 317求調(diào)劑 +5 | 申子申申 2026-03-19 | 9/450 |
|
|
[考研] 287求調(diào)劑 +7 | 晨昏線與星海 2026-03-19 | 8/400 |
|
|
[考研] 350求調(diào)劑 +5 | weudhdk 2026-03-19 | 5/250 |
|
|
[考研] A區(qū)線材料學(xué)調(diào)劑 +5 | 周周無(wú)極 2026-03-20 | 5/250 |
|
|
[考研] 295材料求調(diào)劑,一志愿武漢理工085601專碩 +5 | Charlieyq 2026-03-19 | 5/250 |
|
|
[考研] 生物學(xué)071000 329分求調(diào)劑 +3 | 我愛生物生物愛?/a> 2026-03-17 | 3/150 |
|
|
[論文投稿] 有沒有大佬發(fā)小論文能帶我個(gè)二作 +3 | 增銳漏人 2026-03-17 | 4/200 |
|
|
[考研] 333求調(diào)劑 +3 | 文思客 2026-03-16 | 7/350 |
|
|
[考研] 085601材料工程315分求調(diào)劑 +3 | yang_0104 2026-03-15 | 3/150 |
|