微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 电磁仿真讨论 > FDTD code that can compare different absorbing boundary conditions

FDTD code that can compare different absorbing boundary conditions

时间:03-30 整理:3721RD 点击:
Hello,
I am looking for an FDTD code 2D or 3D that can compare different
absorbing boundary condiditons


help please


thanks

you can try CST Microwave Studio

A simple 1-D FDTD code in matlab with ABC is given below.

% 1-D FDTD code
KE=200 ;%KE is he number of cells to be used
ex=zeros(1,KE);
hy=zeros(1,KE);
ex_low_m1=0;
ex_low_m2=0;
ex_high_m1=0;
ex_high_m2=0;

kc=KE/2;
%Gaussian pulse
t0=40;
spread=12;
n=input('T=?');
for T=1:n
%Main FDTD Loop
%Ex field

for k=2:KE
ex(k)=ex(k) + 0.5*(hy(k-1)-hy(k));
end

%Gaussian pulse in the middle

pulse=exp(-0.5*((t0-T)^2/spread^2));
ex(kc)=pulse;

%Absorbing Boundary Conditions

ex(1)=ex_low_m2;
ex_low_m2=ex_low_m1;
ex_low_m1=ex(2);

ex(KE)=ex_high_m2;
ex_high_m2=ex_high_m1;
ex_high_m1=ex(KE-1);

%Hy field

for k=1:KE-1
hy(k)=hy(k)+ 0.5*(ex(k)-ex(k+1));
end

end

%End of FDTD Loop

plot(ex)

Nice piece ....

Can you please teach me a bit? I have some small questions and I am not verey familier with FDTD.

1. Can we replace the gaussian pulse? How?
2. Can we MIX FDTD with some other method?

thanks



1. I think you can use any wave-form. How to do it would depend on the software you are using. An example would be providing a data file specifying the amplitude of pusle at a series of time steps. Now the accuracy of the result and the time to convergence would be affected by the wave-form. If your source runs for 10000 time steps before reaching "practical" zero, you would check carefully whether the output has stablized much earlier (say 5000). If the simulation is terminated too early, you have error. You would also think about numerical dispersion...

2. Obviously you can mix FDTD with other method. Some commercial codes (e.g. WASP-net) does that. From a theoretical point of view, those methods are used to solve some differential equations, and you could appy equivalent principle to decompose a problem domain into subdomains and apply different methods in each of them.

Of course you can use a pulse other than gaussian.For example you can use a sinusoidal pulse.
Download the following file which will probaly help you.

good luck.

peter-gr.

It is very easy to switch to switch to a sinusoidal source.Just replace the parameter pulse with the following:

pulse=sin(2*pi*freq_in*dt*T);

The parameter freq_in determines the frequency of the wave.

Maybe you can find the 2d and 3d code in the book by Taflove.
Computational Electrodynamics: The Finite-Difference Time-Domain Method by Allen Taflove, Susan C. Hagness (Hardcover - June 2000)

Or You can find another book
Electromagnetic Simulation Using the FDTD Method by Dennis M. Sullivan (Author) (Hardcover)

please visit http://www.borg.umn.edu/toyfdtd/ToyFDTD1.html for help.

another site you may like to try http://www.welcomes-you.com/radarfdtd/ .

I need a 3D FDTD code implementing a point source in a free-space mesh with Mur absorbing boundaries. Would help me?

The book of Dennis Sullivan gives the programs you want for 3D FDTD simulation.

in the matlab source code above, when it is asking for an input of "T" what does that do? help is appreciated.

The T indicates the time-steps.(the time the pulse will last: T=δt*n)

can someone explain the absorbing boundary condition? i'm still a bit lost on the algorithm. thanks.

Absorbing Boundary Conditions are necessary to keep outgoing H and E fields from being reflected back into the problem space. Normally, in calculating the E field, we know the surrounding H values;this is a fundamental assumption in the FDTD method.At the edge of the problem space we will not have the value to one side.
Suppose we are looking for a boundary condition in the end.If the wave is going toward the boundary condition in free space, it is travelling at c, the speed of light.So in one time step of the FDTD algorithm,it travels:
distance=c*dt=c*(dx/2c)=dx/2

The above equation explains that it takes two time steps for a wave to cross one cell.So a common sense approach tells as that a common boundary condition would be Ex(n)(0)=Ex(n-2)(1)
It is relativeley easy to implement this.Store a value of Ex(1) for two time steps and then put it in Ex(0).

Yes we can see this from the book of Sullivan. But, in the code you have pasted above, how were the time indexes "n" and "n-2" are presented, i.e. in
" ex(1) = ex_low_m2
ex_low_m2 = ex_low_m1
ex_low_m1 = ex(2) "
I saw just that ex(1) = ex(2).
Sorry for my zombie question. Thanks!

上一篇:Axial Ration by HFSS
下一篇:最后一页

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top