Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
FINITE DIFFERENCE TIME DOMAIN METHOD (FDTD-ABC’s)
Absorbing Boundary Conditions:
The FDTD method has been applied to different types of
problems successfully in electromagnetics, including the
open region problems.
In order to model open region problems, absorbing
boundary conditions (ABCs) are often used to truncate the
computational domain since the tangential components of
the electric field along the outer boundary of the
computational domain cannot be updated by using the basic
Yee algorithm. Mainly two types of ABC are used to
truncate the computational domain.
1) Differential Type ABC’s: Differential based ABCs are
generally obtained by factoring the wave equation and
allowing a solution, which permits only outgoing
waves.
2) Material Type ABC’s (PML): Material-based ABCs,
on the other hand, are constructed so that fields are
dampened as they propagate into an absorbing
medium.
First, we will consider ABC’s developed by A. Taflove
which is a special case for the differential type ABC’s and
is very easy to apply.
The condition relates the values of the field components at
the truncation planes or points to the field components at
planes or points to one or more space steps and time steps
within the solution region (lattice).
For One dimensional Wave Propagation:
Assume that waves have only Ex and Hy components and
propagate in the +ve and –ve z directions, then;
1 11 2x x
n nE E 1 1 1
x x
n nE kN E kN
when the lattice extends form z=0 to z= z k.
Store a value of Ex(2) for two time steps and then put it in
Ex(1).
B.C.’s in Matlab computer code are as follows when we
assume that the domain stars at k=1 and ends at k=KE:
(1) _ _ 2;
_ _ 2 _ _ 1;
_ _ 1 (2);
( ) _ _ 2;
_ _ 2 _ _ 1;
_ _ 1 ( 1);
ex ex low m
ex low m ex low m
ex low m ex
ex KE ex high m
ex high m ex high m
ex high m ex KE
The full Matlab code is as follows:
clear all
% 1d fdtd with ABC's
KE=500;
c=3e8;
% Initialize the variables for the ABC's
ex_low_m1=0;
ex_low_m2=0;
ex_high_m1=0;
ex_high_m2=0;
% Initialize the field arrays
for k=1:KE
ex(k)=0;
hy(k)=0;
end
% Define the space and time step sizes by
using the stability criteria
dz=0.05;
dt=dz/(2*c);
% Define other constants
eps0=8.85e-12; mu0=1.25663e-6;
nStop=500;
dtedz=dt/(eps0*dz);
dtmdz=dt/(mu0*dz);
% time stepping
for n=1:nStop
%plot the electric field
exn(n)=ex(150);
if mod(n,1)==0
ntime=num2str(n);
plot(exn)
% update the electric field
for k=2:KE
ex(k)=ex(k)-dtedz*(hy(k)-hy(k-1));
% Save the field at t=600dt
if(n==600)
ex600(k)=ex(k);
end
if(n==700)
ex700(k)=ex(k);
end
if(n==500)
ex500(k)=ex(k);
end
end
% Apply the ABC's at k=1 and k=KE
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);
% apply the source at k=3
ex(3)=exp(-(n-30)^2/100);
%update the magnetic field
for k=1:KE-1
hy(k)=hy(k)-dtmdz*(ex(k+1)-ex(k));
end
title(ntime);
mov(n)=getframe;
end
end
Now consider that half of the medium is a
dielectric with relative permittivity er:
clear all
% 1d fdtd with ABC's
KE=500;
c=3e8;
% Initialize the variables for the ABC's
ex_low_m1=0;
ex_low_m2=0;
ex_high_m1=0;
ex_high_m2=0;
% Initialize the field arrays
for k=1:KE
ex(k)=0;
hy(k)=0;
end
% Define the stace and time step sizes by
using the stability criteria
dz=0.05;
dt=dz/(2*c);
% Define other constants
eps0=8.85e-12; mu0=1.25663e-6;
nStop=1000;
dtedz=dt/(eps0*dz);
dtmdz=dt/(mu0*dz);
% time stepping
for n=1:nStop
%plot the electric field
exn(n)=ex(150);
if mod(n,1)==0
ntime=num2str(n);
plot(exn)
% mesh(ezs(1:nx1,1:ny1,3));
% update the electric field
for k=2:KE
if(k<250)
er=1;
elseif(k==250)
er=(1.+2)/2.;
else
er=2;
end
ex(k)=ex(k)-(dtedz/er)*(hy(k)-hy(k-1));
if(n==600)
ex600(k)=ex(k);
end
if(n==700)
ex700(k)=ex(k);
end
if(n==500)
ex500(k)=ex(k);
end
end
% Apply the ABC's
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);
% apply the source
ex(3)=exp(-(n-30)^2/100);
%update the magnetic field
for k=1:KE-1
hy(k)=hy(k)-dtmdz*(ex(k+1)-ex(k));
end
title(ntime);
mov(n)=getframe;
end
end
Exersices:
Now, write a complete Matlab program to simulate one-
dimensional wave propagation. Assume that the source is at the center of the problem
space. Observe the wave propagation. Then modify your program by applying the source at k=3. Observe the wave propagation. Observe the wave propagation w.r.t. the time and space.
Change the number of the time steps and observe the propagation.
Change the stability factor from 0.5 to 1, 1.1 and 0.25. What happens?
Differential Type ABC’s
A simple absorbing boundary condition (ABC) was used to terminate the grid. It is based on the fact that the fields were propagating in one dimension and the speed of propagation was such that the fields moved one spatial step for every time step
(i.e., the Courant number was unity c t
z
=1).
The node on the boundary was updated using the value of the adjacent interior node from the previous time steps. However, when a dielectric was introduced, and the local speed of propagation was not equal to c, this ABC failed to work properly. One would also find that in high dimensions this simple ABC would not work even in free space. The wave equation which governs the propagation of the electric field in one dimension is:
2 2
2 20x xE E
z t
Similarly, the following form represents the equation in terms of an operator operating on Ex.
This operator can be factored as:
0z t
Their solutions:
i.e a wave traveling in the negative z direction.
i.e a wave traveling in the positive z direction.
Grid Termination: Let us now consider how the wave
equation can be used to provide an update equation for
a node at the end of the computational domain.
Consider field at z=0.
2 2
2 20xE
z t
0z t
0 ( ) (1)x xE E t zz t
0 ( ) (2)x xE E t zz t
1(1)n
xE
Remember that the interior nodes can be updated
before the boundary node.
Assume that all the adjacent nodes in space-time are
known.
i.e. are known.
At the left end of the grid, the fields should only be
traveling to the left.
Thus the fields satisfy the equation given by (1).
The finite-difference approximation of this equation
provides the necessary update equation, but the way to
discretize the equation is not entirely obvious.
Equation (1) is expanded about the space-time point
To obtain an approximation of:
Similarly:
Therefore the temporal derivative can be approximated by
the following finite difference:
1(2), (1), (2)n n n
x x xE E E
3, ( 1)
2
zn t
1 1 13 1( ) (1) (2)2 2
n n n
x x xE E E
3 1( ) (1) (2)2 2
n n n
x x xE E E
1 1
3 1,( )
2 2
(1) (2) (1) (2)
2 2
n n n n
x x x x
x
zn t
E E E EE
t t
The spatial derivative can be approximated as:
Combination of two difference equations:
Letting and solving for :
This equation provides a first-order absorbing boundary
condition which updates the field on the boundary using the
values of past and interior fields.
Note that when 1pv t
z
is unity, this equation reduces to
the ABC used before (Taflove).
1 1
3 1,( )
2 2
(2) (2) (1) (1)
2 2
n n n n
x x x x
x
zn t
E E E EE
z z
1 1 1 1(1) (2) (1) (2) (2) (2) (1) (1)
2 2 2 2 0
n n n n n n n n
x x x x x x x xE E E E E E E E
t z
1pv
1(1)n
xE
1 1(1) (2) ( (2) (1))pn n n n
x x x x
p
v t zE E E E
v t z
1(1) (2)n n
x xE E
A nearly identical equation can be obtained for the other
end of the grid.
Equation (2) would be expanded in the neighbourhood of
the last node of the grid.
Although (1) and (2) differ in the sign of one term, when
(2) is applied it is “looking” in the negative z direction.
That effectively cancels the sign change. Hence the update
equation for the last node in the grid, which is identified
here as is:
1( )n
zE KE
1 1( ) ( 1) ( ( 1) ( ))pn n n n
x x x x
p
v t zE KE E KE E KE E KE
v t z