5/21/2018 06837093
1/20220 IEEE Antennas and Propagation Magazine,Vol. 56, No. 2, April 201
Testing Ourselves
Levent Sevgi
Dou University
Electronics and Communications Eng. Dept.
Zeamet Sokak, No 21, Acibadem Kadiky
Istanbul - Turkey
E-mail: [email protected], [email protected]
http://www3.dogus.edu.tr/lsevgi
We have introduced many computer codes and virtualtools for electromagnetic modeling and simulation inthe Magazine for nearly a decade. Im very glad to see that
those tools are used in several universities and institutions,
even in national research centers, from USA to Japan, Europe
to Australia and Africa. Most of those tools can be downloaded
from http://modsim.dogus.edu.tr (and may also be requestedfrom the authors), and be used in teaching/training in virtual
undergraduate labs as well in graduate-level research. Now,
were happy to announce they can also be downloaded from my
new Web site (http://leventsevgi.net). The list of the tutorials
we have introduced since February 2007 may also be found
there.
We have received several requests and questions on some
of our Finite-Difference Time-Domain (FDTD)-based virtual
tools from our readers, who have experiencedMATLAB-based
coding/compiling/version problems. I have assigned Miss
Gizem Toroglu, the youngest research and teaching assistantin our department at Dou University, to re-shape (as well as
redevelop) a collection of MATLAB-based core FDTD codes
in two dimensions (2D), without the need for any toolbox
and/or special command/macro, and to present them in her
interdepartmental seminar this semester. I liked the way she
tailored and presented these codes. Although there were a
number of FDTD codes and packages, I therefore decided to
share them with our readers, through the tutorial we prepared
for this purpose in this issue (by the way, the tutorial on novel
RCS measurement approaches by B. Fisher is on the way).
Those codes mentioned in this issues tutorial are already there,
under EM Virtual Tools, at leventsevgi.net. I hope the readers
will enjoy having them and nd them useful.
We have already discussed Statistical Decision Making
[1] and Biostatistics with hypothetical tests on cell-phon
users using statistical decision making [2]. What abou
Strategic Decision Making? The study of strategic decisio
making is called Game Theory. We, engineers, have mostlbeen familiar with game theory after a wonderful movie, A
Beautiful Mind, a 2001 American biographical drama lm
based on the life of John Nash, a Nobel Laureate in Econom
ics. John Nash, who introduced the Nash equilibrium concept
was played by Russell Crowe. Im glad to announce that I hav
nally convinced Prof. Benan Zeki Orbay, former Dean of th
Faculty of Economics and Administrative Sciences, and curren
Chair of the Department of Economics and Finance at Dou
University, to prepare a tutorial on game theory. She is goin
to give a presentation entitled Game Theory and Engineerin
Applications in one of our inter-departmental seminars i
April 2014. Hopefully, well extend it to an interesting tutoria
References
1. L. Sevgi, Hypothesis Testing and Decision Making: Con
stant-False-Alarm Rate, IEEE Antennas and Propagatio
Magazine, 51, 3, June 2009, pp. 218-224.
2. L. Sevgi, Biostatistics and Epidemiology: Hypothetica
Tests on Cell Phone Users, IEEE Antennas and Propagatio
Magazine, 52, 1, February 2010, pp. 267-273.
5/21/2018 06837093
2/20IEEE Antennas and Propagation Magazine,Vol. 56, No. 2, April 2014 22
Finite-Difference Time-Domain (FDTD)
MATLABCodes for First- and Second-Order
EM Differential Equations
Gizem Torolu, Levent Sevgi
Electronics and Communications Engineering Department
Dou University
Zeamet Sokak 21, Acbadem Kadky, 34722 Istanbul Turkey
E-mail: [email protected]
Abstract
A set of two-dimensional (2D) electromagnetic (EM)MATLABcodes, using both first-order coupled differential (Maxwel
equations and second-order decoupled (wave) equations, are developed for both transverse-magnetic (TM) an
transverse-electric (TE) polarizations. Second-order MUR type absorbing boundary conditions are used to simulate
free space. Metamaterial (MTM) modeling is also included. Performance tests in terms of computational times, memor
requirements, and accuracies were done for simple EM scenarios with magnetic field, current, and voltage comparisons
The codes may be used for teaching and research purposes.
Keywords: Maxwell equations; finite-difference time-domain; FDTD; wave equation; absorbing boundary conditions;
MUR conditions; transverse electric; TE; transverse magnetic; TM; metamaterials; MTM; MATLAB
1. Introduction
The Finite-Difference Time-Domain (FDTD) method is oneof the most powerful numerical approaches widely used insolving a broad range of electromagnetic (EM) problems since
its rst introduction [1] (a quick Internet search will list tens of
thousands of FDTD studies). A few of the many useful books
written on the FDTD are [2-8]. Information related to the FDTD
may also be found in Wikipedia [9]. The books on the parallel
FDTD [10] and FDTD-based metamaterial (MTM) modeling
[11] are also worth mentioning. We have also presented manyuseful tutorials, and have shared our codes and virtual tools for
a long time [12-19]. Table 1 lists these free FDTD-based virtual
tools, with short explanations. These and many more can be
found in the IEEE Press/John Wiley book recently published
within the Press series on EM Wave Theory [20].
The MATLAB-based codes and virtual tools in [12] use
the one-dimensional FDTD for the plane-wave propagation
modeling and simulation through inhomogeneous media, and
in [13] for voltage/current wave transmission and reection
along a transmission line (TL) under different termination and
impedance-mismatch conditions. The TDRMeter virtual tool
in [13] can be used for the visualization of both transmission
reections and fault identication.
A general-purpose two-dimensional FDTD virtual too
MGL-2D [14], and its modied version, MTM-FDTD [15
can be used in the modeling and simulation of EM waves i
two dimensions. A variety of electromagnetic problems, from
indoor/outdoor radiowave urban/rural propagation to electro
magnetic compatibility (EMC), from resonators to closed/ope
periodic structures, linear and planar arrays of radiators can b
simulated easily withMGL-2D. The beauty ofMGL-2Dcomefrom its visualization power, as well as its easy-to-use desig
steps. Similarly, MTM-FDTDmay be used for the visualiza
tion of EM waves interacting with different metamaterials
Snapshots during these interactions may be taken. Scenario
with normal and oblique incidences, demonstrating focusin
beams in planar metamaterials and the existence of a negativ
refractive angle, respectively, may be observed in the tim
domain. In addition, video clips of wave- metamaterial inter
actions may easily be recorded.
TheMATLAB-based virtual tool WedgeFDTDwas deve
oped to investigate EM scattering on the canonical non-pene
5/21/2018 06837093
3/20222 IEEE Antennas and Propagation Magazine,Vol. 56, No. 2, April 201
trable wedge problem with the FDTD method [16]. Diffracted
elds may easily be extracted and compared with the results
of high-frequency asymptotic (HFA) models. Some interesting
applications of the two-dimensional FDTD method were also
discussed in one of our tutorials [17]. There, FDTD-based path
planning and segmentation were modeled and implemented.
Finally, full-wave, 3D-FDTD EM virtual tools have been
prepared and reviewed in tutorials [18] and [19] for realistic
problem modeling and simulations. In [18], MSTRIP was
introduced for the investigation of a variety of microstrip cir-
cuits.MSTRIPis a 3D-FDTD EM simulator that uses the pow-
erful perfectly matched layer terminations (PML) [21]. The
user needs only to render the microstrip circuit via a computer
mouse on a rectangular grid, and to specify basic dimensions
and supply operational requirements, such as the frequency
band and simulation length. The rest is handled byMSTRIP. It
is easy-to-use, strengthened with visualization and video-clip
capabilities, and can handle very complex single- and double-
layer microstrip structures. Time-domain visualization is pos-
sible during the simulations and video clips may be recorded.
The S parameters are automatically calculated, and may be
displayed online.
In [19], a three-dimensional FDTD-based RCS prediction
virtual analysis tool (MGL-RCS) was introduced. It can be used
to design any kind of a PEC target using basic blocks, such as
a rectangular prism, cone, cylinder, sphere, etc. A collection of
pre-designed surface and air targets stored in 3DSformat les,
are also supplied. Time-domain near scattered elds can be
simulated around the object under investigation, and transients
can be recorded as video clips. Far elds are then extrapolated,
and RCS as a function of frequency and RCS as a function of
angle plots can be produced (FORTRANsource codes of this
package may also be found in [4]).
2. The Two-Dimensional FDTD Models
The FDTD method [1] discretizes Maxwell equations b
replacing derivatives with their nite-difference approxima
tions, directly in the time domain. It is simple, easy to code
but has the open-form (iterative) solution. It is therefore con
ditionally stable: one needs to satisfy a stability condition. Th
FDTD volume is nite, and therefore may model only close
regions. Free-space simulation is an important task in FDTD
and various effective boundary terminations have been developed for the last two decades (see [22] for the second-orde
MUR-type terminations used here). Broadband (pulse) excita
tion is possible in the FDTD, but inherits the numerical-disper
sion problem. Finally, only near elds can be simulated aroun
the object under investigation; far elds can be extrapolate
using the Equivalence Principle (e.g., the Stratton-Chu equa
tions) [4].
2.1 First-Order Coupled Equations
The assumption of a continuous translational symmetralongzlets us reduce the three-dimensional problem into tw
dimensions on the xy plane. Maxwell equations in such a
environment are characterized with three parameters (the per
mittivity, ,permeability, ,and conductivity, ):
H
Et
=
, (1)
E
H Et
= +
. (2)
Table 1. Free FDTD-based EM Virtual Tools presented in the IEEE Antennas and PropagationMagazine.
Virtual Tool Explanation
1DFDTDAMATLAB-based 1D FDTD simulation of plane wave propagation in time domain through single, double
or three-layer media. EM parameters are supplied by the user [12].
TDRMeterA virtual time-domain reectometer virtual tool. It is used to locate and identify faults in all types of
metallic paired cable. Fourier and Laplace analyzes are also possible [13].
MGL2DA general purpose 2D FDTD package for both TE and TM type problems. Any 2D scenario may be created
by the user by just using the mouse [14].
MTM-FDTDModied version ofMGL-2Dto simulate cylindrical wave propagation through MeTaMaterials (MTM)
[15].
WedgeFDTD*A 2DMATLAB-based simulator for the modeling of EM diffraction from a semi-innite non-penetrable
wedge using high frequency asymptotics and FDTD [16] (*published in ACES).
MSTRIP
A 3D FDTD-based EM simulator for the broadband investigation of microstrip circuits. The user only needs
to picture the microstrip circuit via computer mouse on a rectangular grid, to specify basic dimensions and
operational needs such as the frequency band, simulation length [18].
MGL-RCS
A 3D FDTD-based EM simulator for RCS prediction. The user only needs to locate a 3D image le of
the target in 3DS graphics format, specify dimensions and supply other user parameters. The simulator
predicts RCS vs. angle and/or RCS vs. frequency [19].
5/21/2018 06837093
4/20IEEE Antennas and Propagation Magazine,Vol. 56, No. 2, April 2014 22
These reduce to two sets of scalar equations (i.e., TMz and
TEz) in two dimensions under the assumption 0z , and
can be given as [23]
SET #1: TMz( 0zH )
x zH E
t y
=
, (3a)
y z
H E
t x
=
, (3b)
y xz
z
H HEE
t x y
=
, (3c)
SET #2: TEz( 0zE )
x z xE H
Et y
=
, (4a)
y z
y
E HE
t x
=
, (4b)
y xz
E EH
t x y
=
. (4c)
As observed, knowing the zE ( zH ) component is enough to
derive all the other eld components for the TMz( TEz) prob-
lem. The discretized FDTD iteration equations then reduce to
SET #1: TMz
( 0z
H )
( ) ( ) ( ) ( )1, , , , 1n n n nx x z zt
H i j H i j E i j E i jy
=
,
(5a)
( ) ( ) ( ) ( )1, , , 1,n n n ny y z zt
H i j H i j E i j E i jx
= +
,
(5b)
( ) ( )12
, ,2
n nz z
tE i j E i j
t
+ = +
( ) ( ), 1,2
2
n ny yH i j H i jt
t x
+
+
( ) ( ), , 122
n nx xH i j H i jt
t y
+ ,
(5c)
SET #2: TEz( 0zE )
( ) ( )12
, ,2
n nx x
tE i j E i j
t
=+
( )
( ) ( )2
, , 12
n nz z
tH i j H i j
t y
+
,
(6a)
( ) ( )12
, ,
2
n nz z
tE i j E i j
t
=+
( )
( ) ( )2
, 1,2
n nz z
tH i j H i j
t x
+ +
(6b)
( ) ( )1, ,n nz zH i j H i j=
( ) ( )
0
, 1,n n
y yE i j E i jt
x
+
( ) ( )
0
, , 1n n
x xE i j E i jt
y
.
(6c)
2.2 Second-Order Decoupled Equations
Two of the three eld components in Equations (3) and (4
can be eliminated, and a second-order differential (wave
equation with a single eld component can be obtained. Fo
example, the following wave equation for the TMzproblem
can be directly obtained from Equation (3c) using Equa
tions (3a) and (3b):
2 2 2
2 2 2
10zE
tx y t
+ =
. (7)
This equation, dened for
0; 0 , 0max maxt x X y Y , (8)
together with the boundary conditions
( ) ( )10, , ,zE y t g y t= for 0, 0 maxx y Y= , (9a)
( ) ( )2,0, ,zE x t g x t= for 0, 0 maxy x X= , (9c)
( ) ( )3, , ,z maxE X y t g y t= for , 0max maxx X y Y= (9b)
( ) ( )4, , ,z maxE x Y t g x t= for , 0max maxy Y x X= ,
(9d)
and, the initial conditions
5/21/2018 06837093
5/20224 IEEE Antennas and Propagation Magazine,Vol. 56, No. 2, April 201
( ) ( )1, ,0 ,zE x y f x y= , (10a)
( )
( )2, , 0
,zE x y
f x yt
=
, (10b)
are enough to solve for zE and the other eld components.
Equation (7) can therefore also be used in the FDTD modeling
and simulations. The FDTD discretized form of Equation (7) is
( ) ( )
( ) ( )1 14 1
, , ,n n nz z zp q t
E i j E i j E i jg g
+ =
( ) ( )2
1, 1,n n
z z
pE i j E i j
g + + +
( ) ( )2
, 1 , 1n nz zq
E i j E i jg
+ + +
(11)
where
2v t
p
x
,
(12a)
2v t
qy
2
2g v t+ ,
(12b)
2
2t v t +
1
v
= . (12c)
Note that the dispersion and stability conditions, as well as the
source injection in time, are handled just like the rst-order
coupled FDTD equations. On the other hand, the values at the
rst two time instants of zE (i.e., ( )0 ,zE i j and ( )
1 ,zE i j ) must
be supplied for the spatial source injection.
2.3 Basic Features of the FDTD Equations
The observations listed below are important for thenumerical implementation of the rst-order coupled (FOC)
FDTD model:
There are three eld components ( xH , yH , zE for
TMzand xE , yE , and zH for TEz) in each cell,
and they are distinguished by the ( ),i j label for the
rst-order coupled FDTD model.
The discretization steps are ,x y , and t , and the
physical quantities are calculated from x i x= ,y j y= , and t n t= .
Since the FDTD equations are iterative (i.e., open-
form solutions), they are conditionally stable. The
Courant stability condition, which states that the
time step cannot be arbitrarily specied once the
spatial discretization is done, must be satised.
Although the same notations, ( ),nxE i j and
( ),nzH i j , are used, their locations are different inthe classical Yee cell [1] (see Figure 1), and there is
a half-time-step difference between the E and H
eld computation times. That is, the magnetic-eld
components are calculated at time steps 2t t= ,
3 2t , 5 2t , ..., but the electric elds are calcu-
lated at time steps , 2 ,3 ,...t t t t = .
Figure 1. The Yee cells for the (a) TMzand (b) TEzprob
lems.
5/21/2018 06837093
6/20IEEE Antennas and Propagation Magazine,Vol. 56, No. 2, April 2014 22
Only neighboring magnetic-eld values and
( )1 ,nzE i j are required to update ( ),nzE i j . Simi-
larly, neighboring electric-eld values and
( )1 ,nxH i j are required to update ( ),nxH i j .
Both magnetic- and electric-eld components in any
cell may be moved to the origin by just cell
averaging. This is accomplished via
( ) ( ) ( ), 0.5 , 1,
x x xH i j H i j H i j= + +
for mag-
netic elds, but four electric-eld components are
required for this purpose:
( ) ( ) ( ), 0.25 , 1,z z zE i j E i j E i j= + + ( ) ( ), 1 1, 1z zE i j E i j+ + + + + .
Any object may be modeled by giving , , and
. Two of these, and , appear in the electric-
eld components, and the third, , appears in the
magnetic-eld components.
Three different and values may be assigned for
three electric-eld components, so that different
objects may be located within the Yee cell. Simi-
larly, different values may be given for H-eld
componentsfor the same purpose.
The important aspects of the second-order decoupled
(SOD) FDTD model are as follows:
There is only one eld component, and its location
may be anywhere in the unit cell.
The models and discrete equations are identical for
the TMzand TEzproblems.
The past two values are needed in every cell.
FDTD iterations yield only zE ( TMz) or zH
( TEz). One therefore needs to write down another
discrete (Maxwell) equation for the other two com-
ponents, i.e., xH , yH ( TMz) or xE , yE ( TEz).
2.4 Absorbing Boundary Conditions
To make it simple in this tutorial, the second-order MUR
terminations [22] are used. Table 2 lists equations that must
be satised along the boundaries (see Figure 2). The discrete
iteration equations will then be
At 0x= ( xN N= )
( ) ( )1 11, 2,n nz zE j E j+ =
( ) ( )1 12, 1,n nz zc t x
E j E jc t x
+ + + +
( ) ( )2
2, 1,n n
z z
xE j E j
c t x
+ + +
( )
( ) ( ) ( ) ( )
2
2 2, 1 2 2, 2, 12
n n nz z z
c t x
E j E j E jy c t x
+ + + +
( )
( )( ) ( ) ( )
2
21, 1 2 1, 1, 1
2
n n nz z z
c t xE j E j E j
y c t x
+ + + +
(13)
At maxx X= ( xN N= )
( ) ( )1 1, 1,n nz zE N j E N j+ =
( ) ( )1 11, ,n nz zc t x
E N j E N j
c t x
+ + + +
( ) ( )2
1, ,n nz zx
E N j E N jc t x
+ + +
( )
( )( )
2
21, 1
2
nz
c t xE N j
y c t x
+ + +
( ) ( )2 1, 1, 1n nz zE N j E N j +
( )
( )( ) ( ) (
2
2, 1 2 , , 1
2
n n nz z z
c t xE N j E N j E N j
y c t x
+ + + +
(14)
Table 2. Differential equations for the second-order MUR
terminations.
( )2 2 2
2 2
0 10, , 0
0 2z
max
x cE y t
y Y x t c t y
= + =
( )2 2 2
2 2
1, , 0
0 2
maxz max
max
x X cE X y t
y Y x t c t y
= + =
( )2 2 2
2 2
0 1,0, 0
0 2z
max
y cE x t
x X y t c t x
= + =
( )2 2 2
2 2
1, , 0
0 2
maxz max
max
y Y cE x Y t
x X y t c t x
= + =
5/21/2018 06837093
7/20226 IEEE Antennas and Propagation Magazine,Vol. 56, No. 2, April 201
At 0y= ( yN N= )
( ) ( )1 1,1 , 2n nz zE i E i+ =
( ) ( )1 1, 2 ,1n nz zc t y
E i E ic t y
+ + + +
( ) ( )2
, 2 ,1n n
z z
yE i E i
c t y
+ + +
( )
( )( ) ( ) ( )
2
2 1, 2 2 , 2 1, 2
2
n n nz z z
c t yE i E i E i
x c t y
+ + + +
( )
( ) ( ) ( ) ( )
2
2 1,1 2 ,1 1,12
n n nz z z
c t y
E i E i E ix c t y
+ + + + (15)
At maxy Y= ( yN N= )
( ) ( )1 1, , 1n nz zE i N E i N+ =
( ) ( )1 1, 1 ,n nz zc t y
E i N E i Nc t y
+ + + +
( ) ( )2
, 1 ,n nz zy
E i N E i Nc t y
+ + +
( )
( )( )
2
2 1, 1
2
nz
c t yE i N
x c t y
+ + +
( ) ( )2 , 1 1, 1n nz zE i N E i N +
( )
( )( ) ( ) ( )
2
21, 2 , 1,
2
n n nz z z
c t yE i N E i N E i N
x c t y
+ + + +
(16)
2.5 Parameter Selection in
FDTD Simulations
FDTD modeling and simulations are usually preferre
because of the ability for handling complex EM environment
and broadband behavior. Running simulations require
parameter optimization. The spatial mesh sizes, x and y
the time step, t , the total simulation period ( maxT n t= ), th
source bandwidth,B, and the pulse duration are characteristi
parameters that should be optimally selected prior to thsimulation [4].
FDTD simulations are generally performed in obtainin
the frequency characteristics of a given EM structure, fo
example, the radiation characteristics or input impedance of a
antenna structure, the RCS behavior of a chosen target, th
transmission and/or reection characteristics of a microstri
network, the propagation characteristics of a waveguide, th
resonance frequencies of a closed enclosure, the shieldin
effectiveness of an aperture, etc. One therefore needs to star
with thefrequency requirements(the minimum/maximum fre
quency of interest, minf / maxf , and the frequency resolutionf ). The time-domain discrete simulation parameters ( x
y , t , maxT n t= , source bandwidth B, etc.) are the
accordingly specied.
Suppose the problem was to nd the frequency characteris
tics of reections from a free-space/dielectric interface, from
dc to 1 GHz with 50 MHz frequency steps. Starting from th
frequency-analysis requirements and sampling criteria, th
parameter-optimization steps can be listed as follows:
Choose the source waveform with a duration that
contains the maximum frequency of interest.
According to the properties of the fast Fourier trans-
form (FFT), the maximum frequency determines the
minimum time step, i.e., ( )1 2FFT maxt f = . This
is the hard limit for the frequency analysis. A 1 GHz
maximum frequency corresponds to a 0.5 ns FFTt .
There are two important points in choosing the
maximum simulation (observation) time. First, the
frequency sensitivity, f , which determines the
observation time should be 1 maxf T = . Second,
the simulation should continue until all the tran-
sients are over. Therefore, maxT is chosen to satisfy
both requirements. Since f was given as 10 MHz,
maxT was determined to be 100 ns. The number of
time steps, n, will then be 200. If all transients decay
after 200 time steps, then this will be enough for the
simulation time. If the structure under investigation
is some kind of resonant structure, which
Figure 2. The boundary cells used in MUR terminations.
5/21/2018 06837093
8/20IEEE Antennas and Propagation Magazine,Vol. 56, No. 2, April 2014 22
corresponds to ringing effects in the time domain,
then a much longer observation period will be
required.
Two important issues in the time-domain simula-
tions are the Courant stability criteria and numerical
dispersion.
The spatial mesh sizes, x and y , are chosen
according to numerical dispersion requirements.
This is nothing but satisfying the Nyquist sampling
criteria in the spatial domain. The minimum wave-
length, min , must be sampled with at least two
samples, i.e., { }max , 2minx y . In practice, at
least 10min is required for acceptable results.
Depending on the problem at hand, as much as
100min to 120min may be required in order to
get rid of numerical-dispersion effects. Since min
was 30 cm, 1x y = = cm may be chosen if
30min is good enough for eliminating numerical-
dispersion effects.
The time step, FDTDt , may be directly chosen
from the Courant stability criteria. Since x y =
and this is equal to 1 cm, t may be chosen to be
( )2x c , where cis the speed of light. This gives24t ps. In general, FDTDt is much less than
FFTt , andtherefore FDTDt is taken into account.
With this time step, the simulation time was
5000n= .
3. Tests and Comparisons
SimpleMATLABcodes were developed for the rst-orde
coupled FDTD (FOC-FDTD) and the second-order decouple
FDTD (SOD-FDTD) models, for both the TE and TM prob
lems. Table 3 lists these codes and their explanations (vis
http://leventsevgi.net for these codes).
Tests with rst-order coupled FDTD and second-orde
decoupled FDTD were done in terms of memory requirementand computational times. Table 4 shows some numerical result
for these comparisons. As observed, the computational time
were of the same order, but the second-order decoupled FDTD
was slightly faster. Note that the classical loop philosophy use
inMATLABcoding drastically slowed down the computation
This means that the use of For/End loops had a signican
impact on the computation time (two loops almost doubled th
computation time of one loop). The rst-order coupled FDTD
had three loops, one inside the other, whereas one loop was use
for the second-order decoupled FDTD. The rst-order couple
FDTD lasted roughly three times longer than the second-orde
decoupled FDTD with the classical coding approach. Thei
computational times were almost the same when the For
End loops were removed. (For example, observe in the tabl
that simulations in a 400 400 FDTD area lasted 8.85 s an
8.56 s with the rst-order coupled FDTD and second-orde
decoupled FDTD models, respectively. On the other hand
these values were 523 s and 202 s, respectively, if the classica
For/End loops were used in the MATLABcodes). Howeve
the memory allocation of the second-order decoupled FDTD
was considerably higher than for the rst-order coupled FDTD
because of the requirements of the two past time values of th
elds at every cell.
Table 3. The first-order coupled FDTD and SOD_FDTD MATLABcodes.
FrstOrder_TM_FDTD_MUR.m2D-FDTDMATLABcodes for TM problem under MUR terminations ( xH , yH , zE )
FrstOrder_TM_FDTD_MUR_INH.m 2D-FDTD MATLABcodes for TM problem under MUR terminations ( xH , yH , zE )
having a rectangular lossy layer
FrstOrder_TM_FDTD_MUR_MTM.m 2D-FDTD MATLABcodes for TM problem under MUR terminations ( xH , yH , zE )
having a rectangular MTM layer
FrstOrder_TE_FDTD_PEC.m2D-FDTDMATLABcodes for TE problem under PEC terminations ( xE , yE , zH )
FrstOrder_TE_FDTD_MUR_MTM.m 2D-FDTD MATLAB codes for TE problem under MUR terminations ( xE , yE , zH )
having a rectangular MTM layer
ScndOrder_TM_FDTD_MUR.m2D Second order FDTDMATLABcodes for TM problem under MUR terminations
( zE )
ScndOrder_TM_FDTD_MUR_INH.m2D Second order FDTDMATLABcodes for TM problem under MUR terminations
( zE ) having a rectangular lossy layer
ScndOrder_TE_FDTD_MUR.m2D Second order FDTDMATLABcodes for TE problem under MUR terminations
( zH )
5/21/2018 06837093
9/20228 IEEE Antennas and Propagation Magazine,Vol. 56, No. 2, April 201
3.1 Current Computations
Alternating currents produce surrounding magnetic elds
and can be calculated using Amperes Law. This means cur-
rents can be extracted from known magnetic elds. Assume an
innite thin wire is located in the simulation area (see Figure 3).The current passing through this wire can be calculated using
Amperes Law:
I Hdl Hdl= =
( ) ( )2 2
1 1
1 2, ,x y
x yi x j y
H i y dx H x j dx= =
= +
( ) ( )2 2
1 1
2 1, ,
x y
x yi x j y
H i y dx H x j dx= =
(17)
Short scripts were added to the rst-order coupled and
second-order decoupled FDTD codes for the computation of
a current owing on a thin wire. The sample scenario prepared
for this purpose is pictured in Figure 4. At 300 MHz, a 25 m
25 m simulation area was assumed. A PEC rectangular object
(5 m 2.5 m) was placed at Node (200,225). A hard pulse line
source was injected from Node (350,200). An innitely long,
thin wire was located in the simulation area. The number of
time steps was 500.
Figure 5 shows a current as a function of time comparison
of the rst-order coupled FDTD and second-order decoupledFDTD models. The computational times are also given on the
graph. The wire was enclosed by a rectangle sized four cells
along the xdirection and ve cells along the y direction. The
magnetic elds were calculated along this arbitrary loop. The
yH components were considered for the right and left edges of
the rectangle, whereas the xH components were used for the
top and bottom edges. The sum of the magnetic elds was
multiplied by the cell size. Finally, the owing current was
obtained.
Table 4. The Time and memory requirements for the first-
order coupled FDTD and second-order decoupled FDTD
models ( 500n= , FOC: xH , yH , zE ; SOD: zE ).
Simulation
Area
Time (s) Memory (MB)
FOC SOD FOC SOD
300300 7.19 5.27 2.11 345
400400 8.85 8.56 3.71 920
600600 17.3 13.4 8.3 1384
10001000 47.48 37.48 22.9 3845
Figure 3. An application of Amperes Law.
Figure 4. A sample scenario for current simulations.
3.2 Voltage Computations
Potential differences cause electric elds. This means tha
the voltage induced by EM elds between any terminals ma
also be computed during the FDTD simulations. Faradays Law
may be used for this purpose. The necessary equation for th
voltage computations in the scenario shown in Figure 6 is
( )
2
1
,y
z aj y
V Edl E x j dy=
= =
. (18)
5/21/2018 06837093
10/20IEEE Antennas and Propagation Magazine,Vol. 56, No. 2, April 2014 22
Here, two parallel PEC plates were inserted horizontally, andthe voltage between them was simulated (see the scenario
in Figure 7a). Two thin parallel plates, of a size of 1 100
segments, were inserted into the simulation area. They were
separated from each other by 50 cells. At a selected node (the
150th cell), the voltage value was computed. A hard pulse
source was then applied at node (250,250). Figure 7b shows
an instant (a screen capture) during the FDTD simulations. The
wave components marked 1, 2, 3, and 4 corresponded to the
cylindrical incident eld, reections from the top plate, the top-
edge diffracted elds, and the bottom-edge diffracted elds,
respectively. All theEelds from the 150th to the 200th cells
Figure 5. The current as a function of time obtained with
both models.
Figure 6. An application of Faradays Law.
along theydirection were added, and the sum was multiplied
by the cell size. A comparison of the voltage as a function o
time is given in Figure 8.
Note that the codes listed in the Appendix were used fo
the scenario given in Figure 7, and produced the results in Fig
ure 8. The codes in Appendices 6.1 and 6.2 generated the sam
Figure 8 using the rst-order coupled FDTD and second-orde
decoupled FDTD models, respectively. The code in Appendix
6.3 could be used after the other two. It loaded the recorde
FDTD data, applied the FFT, and compared the two models in
both the time and frequency domains. (All these codes and th
others may also be downloaded from leventsevgi.net.)
4. Metamaterial (MTM) Modeling
The EM response of a material is determined to a larg
extent by its electrical properties. A material/medium with both
permittivity and permeability greater than zero ( 0> , 0>
is called double positive (DPS). A medium with permittivit
less than zero and permeability greater than zero ( 0 ) is designated as -negative (ENG). Materials with
permittivity and permeability both less than zero ( 0