0% found this document useful (0 votes)
53 views

Finite-Difference Time-Domain Electromagnetic Simulation: Angora: A Free Software Package For

Angora is a free, open-source software package implementing the Finite-Difference Time-Domain (FDTD) method. FDTD is often the method of choice for highly inhomogeneous and / or nonlinear material distributions.

Uploaded by

Frontiers
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Finite-Difference Time-Domain Electromagnetic Simulation: Angora: A Free Software Package For

Angora is a free, open-source software package implementing the Finite-Difference Time-Domain (FDTD) method. FDTD is often the method of choice for highly inhomogeneous and / or nonlinear material distributions.

Uploaded by

Frontiers
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Angora: A Free Software Package for

Finite-Difference Time-Domain
Electromagnetic Simulation
İlker R. Çapoğlu1, Allen Taflove2, and Vadim Backman1

Biomedical Engineering Department of Northwestern University


1

2145 Sheridan Road, Evanston, IL 60208 USA


E-mail:[email protected]; [email protected]

2
Electrical Engineering and Computer Science Department of Northwestern University
2145 Sheridan Road, Evanston, IL 60208 USA
E-mail: tafl[email protected]

Abstract

Angora is a free, open-source software package implementing the Finite-Difference Time-Domain (FDTD) Method. This
article explains how to access and use Angora, and introduces its features. Examples of its configuration and use are
given. These include treatment of planar stratified and random materials, the creation of current sources and incident
beams, near-field-to-far-field transformation, optical imaging and nano-optics, and the recording of fields.

Keywords: Open source software; finite difference methods; time domain analysis; parallel algorithms; optical imaging;
FDTD

1. Introduction Please note that the configuration settings and features


mentioned in this article are subject to frequent modification.

T he Finite-Difference Time-Domain (FDTD) method [1, 2]


has gained considerable popularity in the last two decades,
among other numerical electromagnetic solution methods. This
All of the configuration files used for the examples in this arti-
cle can be downloaded from the Angora Web site [5]. Please
consult these configuration files and the Angora user’s manual
is mainly due to its simple and intuitive core algorithm, which for the latest reference on any specific configuration. In the
makes its software implementation more straightforward. following, many configuration variables and features were
FDTD is often the method of choice for highly inhomogeneous omitted for brevity.
and/or nonlinear material distributions. FDTD can also sweep a
wide frequency range with a single simulation, since it operates
directly in the time domain. 2. Important Features of Angora

There are many proprietary software tools on the market Angora is currently available only for the GNU/Linux
for FDTD simulation, and a few free software implementa- operating system. Angora can be downloaded from the Angora
tions. Examples of these can be found in [3]. In this article, we Web site [4] in source-code format, as well as in binary format
introduce a new, free FDTD software package named Angora. for x86_64 GNU/Linux systems. On the Web site, you can also
This software package is now available for download at http:// find information on how to receive updates on Angora.
www.angorafdtd.org [4]. A comprehensive user’s manual can
be found on this Web site. In the following sections, we will Some important features of Angora, such as focused
summarize the important features of Angora, and give some laser-beam illumination and numerical optical-image synthe-
examples. sis, are geared toward optics applications. Others, such as ran-

80 ISSN 1045-9243/2012/$26 ©2013 IEEE IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013

AP_Mag_Aug_2013_Final.indd 80 10/7/2013 5:47:04 PM


dom-medium generation and multilayer support, are useful 3. Configuration of Angora
for any antenna, microwave, propagation, or remote-sensing
application. Angora is configured using text files, called configura-
tion files, which include information on every aspect of the
Some key features of Angora are as follows: simulation. The directives and values that specify the simula-
tion should be provided in a certain format, based on the syn-
• An automatic build/install mechanism for the GNU/ tax imposed by the libconfig library [7]. More information on
Linux operating system. this syntax is provided in the Angora user’s manual [8]. For
example, some basic parameters of the FDTD simulation are
• A user-friendly configuration using text-based con- set by placing the following lines in the configuration file:
figuration files.
dx = 1e-3;
• Full parallelizability in three dimensions, based on courant = 0.98;
the Message Passing Interface (MPI) standard. grid_dimension_x = 10e-2;
grid_dimension_y = 10e-2;
• Support for planar multilayered spaces: grid_dimension_z = 10e-2;
pml_thickness = 5e-3;
– Total-field/scattered-field (TF/SF) plane- num_of_time_steps = 1500;
wave source.
The first line sets the spatial step size, which is the dimension
– Phasor-domain near-field-to-far-field trans- of the cubic FDTD voxels that make up the simulation space.
formation (NFFFT). All length units are assumed in meters. In the above example,
the spatial step size is 1 mm. The second line sets the Courant
• Focused laser beams with arbitrary polarization, ori- number, which determines the ratio between the time step and
entation, and propagation direction (also supports the spatial step in the simulation. With the above value, the time
multilayered spaces.) step will be

• Convolution perfectly-matched layer (CPML) ∆x


=∆t 0.98
= 1.8873 ps .
absorbing boundaries. 3c

• Support for HDF5, a portable file storage format. The next three lines set the dimensions of the simulation space
in the x, y, and z directions. The pml_thickness line deter-
• Field-value recording (two-dimensional, one-dimen- mines the thickness of the perfectly-matched layer (PML)
sional, single point) and movie generation. absorbing boundary, which is based on the convolution per-
fectly-matched layer formulation [9]. With the extra perfectly-
• Generating random constitutive parameter distribu- matched layer thickness, the total simulation space has dimen-
tions. sions of 10.5 cm × 10.5 cm × 10.5 cm. Finally, the number
of time steps in the simulation is specified using the num_of_
• Reading constitutive-parameter distributions from time_steps variable.
files.
Other properties of the simulation are configured simi-
• Synthesizing the optical image of the simulated sam- larly, by assigning values to various variables. Examples of
ple. these are given in the following sections.

As mentioned above, Angora supports the parallelization


of the simulation by sectioning the grid along all three dimen-
sions, and assigning each Cartesian sub-grid to an individual 4. Placing Simple Objects
processor. Inter-processor communication consists only of the
interchange of field information across the mutual faces of n Angora, a geometrical object is defined as a combination
neighboring grids, in order to allow the energy to propagate of a shape and a material. Shapes are defined inside the Shapes
from one sub-grid to the other. For minimum latency, the total group1:
surface area of the sub-grids should be minimized. Angora
tries to minimize this surface area by making each sub-grid
as close to a cube as possible. Both parallel and non-parallel
binary versions are available for download on the Angora 1
Groups in Angora are collections of variable assignments
Web site. The precompiled parallel binary uses the OpenMPI delineated by curly brackets {...}. For more information on the
implementation [6] of the MPI standard. Angora configuration syntax, see the user’s manual.

IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013 81

AP_Mag_Aug_2013_Final.indd 81 10/7/2013 5:47:04 PM


Shapes: SimulationSpace:
{ {
RectangularBoxes: Objects:
( (
{ {
shape_tag = “mybox”; material_tag = “mat1”;
back_coord_x = -10e-3; shape_tag = “mybox”;
front_coord_x = 10e-3; },
left_coord_y = -40e-3; {
right_coord_y = 5e-3; material_tag = “mat2”;
lower_coord_z = -40e-3; shape_tag = “mysphere”;
upper_coord_z = 5e-3; }
} );
); };
Spheres:
( In Figure 1, the yz cross section of the relative permittivity
{ distribution of the FDTD grid at x = 0 is shown, after the
shape_tag = “mysphere”;
placement of these two objects into the grid.
center_coord_x = 0;
center_coord_y = 15e-3;
center_coord_z = 15e-3;
radius = 25e-3;
}
5. Planar Stratification
);
}; Planar stratification (layering) is introduced to the simula-
tion grid using the MaterialSlabs list. Currently, the layers
In the above example, two shapes are defined: One rectangular- can only be stacked in the z direction. This may be generalized
prism shape with the limiting coordinates in x, y, and z as listed; to arbitrary directions in the future. The MaterialSlabs list
and a spherical shape with its center at ( 0,1.5 cm,1.5 cm ) with should also be placed inside the SimulationSpace group,
since the order of placement is important:
respect to the origin (which is the center of the simulation grid,
by default) and a radius of 2.5 cm. The shapes are given the
names “mybox” and “mysphere”, which will be referenced
later when they are placed in the simulation space.

The materials filling the shapes are defined in a Materials


list2. In the following, two materials named “mat1” and “mat2”
are defined with relative permittivities 2.1 and 2.0, respectively:

Materials:
(
{
material_tag = “mat1”;
rel_permittivity = 2.1;
},
{
material_tag = “mat2”;
rel_permittivity = 2.0;
}
);

The two objects are placed in the grid by referring to the


names (string tags) of the shape and material objects defined
above. These names are combined in an object definition
inside the Objects list. This list should be placed inside the
SimulationSpace group, which processes every material-
related setting in order of appearance in the configuration file:

2
Lists in Angora are collections of values (integers, groups,
even other lists) delineated by parentheses () . In the Angora
context, lists almost invariably consist of groups. For more Figure 1. The yz cross section of the permittivity distribu-
information on the Angora configuration syntax, see the user’s tion in the FDTD grid at x = 0 after the placement of two
manual. simple shapes.

82 IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013

AP_Mag_Aug_2013_Final.indd 82 10/7/2013 5:47:05 PM


SimulationSpace:
{
MaterialSlabs:
(
{
material_tag = “mat1”;
min_coord = “min”;
max_coord = -1e-2;
},
{
material_tag = “mat2”;
min_coord = 1e-2;
max_coord = 4e-2;
}
);
};

The two groups in the MaterialSlabs list represent two


planar layers. The first extends from the − z boundary of the
grid to 1 cm below the origin, and the second extends from
z = 1 cm to z = 4 cm. The first layer extends into the absorbing
perfectly-matched layer: it therefore represents a half-space. In
Figure 2, the yz cross section of the relative permittivity
distribution of the FDTD grid at x = 0 is shown after the Figure 2. The yz cross section of the permittivity distribu-
placement of these two planar layers. tion in the FDTD grid at x = 0 after the placement of the
two planar layers. The lowermost layer extended into the
perfectly-matched layer, and was therefore a half-space.

6. Reading Constitutive Parameters


from Files

A highly-inhomogeneous material region can be placed • n y : An integer (four bytes) specifying the extent of
into the simulation grid by reading a file that stores the con- the three-dimensional array (in grid cells) in the y
stitutive-parameter distribution of the region in a simple dimension
binary format. The MaterialsFromFiles list is used for this
purpose: • nz : An integer (four bytes) specifying the extent of
SimulationSpace: the three-dimensional array (in grid cells) in the z
{ dimension
MaterialsFromFiles:
( • A three-dimensional floating-point array of size
{
file_name = “materialfile”;
( )
nx × n y × nz , with each element of type double
constitutive_param_type = (eight bytes) or float (four bytes), depending on the
“rel_permittivity”; datatype variable above. The array should be laid
anchor = “center”; out in column-major order, i.e., x dimension first.
coord_x = 0;
coord_y = 0; With the above assignment to the constitutive_
coord_z = 0;
param_type variable, the array read from the file will set the
datatype = “double”;
} relative permittivity of the region. The positioning is determined
); by the coordinates of the anchor point in the three-dimensional
}; region. In the above example, the anchor is set to the center of
the region, which is then placed at ( 0, 0, 0 ) with respect to the
The input file “materialfile” should be a binary file with the center of the grid.
following data, in the order specified:
The placement of the material region can be customized
• nx : An integer (four bytes) specifying the extent of much further. Different constitutive parameters can also be
the three-dimensional region (in grid cells) in the x superimposed using multiple definitions. For more details,
dimension please consult the user’s manual.

IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013 83

AP_Mag_Aug_2013_Final.indd 83 10/7/2013 5:47:05 PM


7. Random Materials function approaches a Gaussian (or normal) correlation. When
m = 2 , the function is a decaying exponential. A singularity
Using the RandomMaterials group, a region of the exists at m = 3 2 , and the function collapses to zero because of
simulation space can be filled with a random material with the normalization factor of Γ ( m − 3 2 ) . However, the un-
certain statistical properties. Angora supports the creation of normalized B ( r ) becomes a delta function for m = 3 2 , and
homogeneous, isotropic, multivariate-normal-distributed,
the corresponding power-spectral density is the often-used
Whittle-Matérn-correlated material properties inside geomet-
Henyey-Greenstein function. Values of m < 3 2 correspond to
rical shapes previously defined (see the Shapes group in Sec-
tion 4). The generated random distribution can be assigned to a fractal index distribution with correlation function described
the relative permittivity, the relative permeability, the electric by a power law. A two-dimensional slice from an example
conductivity, or the magnetic conductivity. Multiple constitu- random distribution is drawn in grayscale in Figure 3.
tive parameters with different statistical distributions can be
overlaid using multiple groups in the configuration file. For
example, the following assignments randomize both the rela- 8. Infinitesimal (Hertzian) Current Sources
tive permittivity and relative permeability distribution of a
region, with the same distribution:
An infinitesimal (Hertzian) electric-dipole source can be
approximated in the FDTD by a current element at the edge
SimulationSpace:
{ of a grid voxel. Before defining the dipole itself, we have to
RandomMaterials: define the waveform of its current moment. This is done inside
{ a Waveforms definition:
WhittleMaternCorrelated:
( Waveforms:
{ {
constitutive_param_type = ModulatedGaussianWaveforms:
“rel_permittivity”; (
mean = 1.33; {
std_dev = 0.05; waveform_tag = “my_wf”;
corr_len = 100e-9; modulation_type = “sine”;
m = 2.0; tau = 1.36711e-10;
shape_tag = “rand_mat_shape”; f_0 = 7.49481e9;
}, }
{ );
constitutive_param_type = };
“rel_permeability”;
mean = 1.33;
std_dev = 0.05;
corr_len = 100e-9;
m = 2.0;
shape_tag = “rand_mat_shape”;
}
);
};
};

The Whittle-Matérn correlation function [10] is an isotropic


three-parameter stochastic model, with parameters lc , σ 2 , and
m:

m −3/2
25/2− m ( r lc )
B (r ) = σ 2
K m −3/2 ( r lc ) . (1)
Γ ( m − 3 2)

Here, Kν (·) is the modified Bessel function of second kind,


and Γ (·) is the Gamma function. The parameter lc (repre-
sented by corr_len above) describes the index correlation
distance, and the parameter σ (represented by std_dev above) Figure 3. A two-dimensional slice of an example three-
is the standard deviation. The third parameter, m (represented dimensional random distribution, shown in grayscale. The
by m above) is a shape parameter that modifies the overall probability density function was multivariate normal, while
behavior of the function. The model reduces to several important the two-point correlation function was Whittle-Matérn (see
specific functions for certain values of m: As m → ∞ , the Equation (1)).

84 IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013

AP_Mag_Aug_2013_Final.indd 84 10/7/2013 5:47:05 PM


A modulated Gaussian waveform is defined here, with the
functional form

2
=f ( t ) sin ( 2π f 0t ) exp  − ( t τ ) 2  ,
 

and given the name “my_wf”. The variables tau and f_0
correspond to τ and f 0 , respectively. All time and frequency
units are in seconds and Hz, respectively. We can now define
the infinitesimal dipole. The PointSources list is used for this
purpose:

PointSources:
(
{
coord_x = 0;
coord_y = 0;
coord_z = 0;
source_orientation = “x_directed”;
waveform_tag = “my_wf”;
j_0 = 1.0;
}
);
Figure 5. An electric­field snapshot of an x-polarized plane
In the above assignment, the coordinates and the orientation wave. The direction of propagation is indicated by the
of the dipole are determined by the first four lines. The arrow.
waveform that represents the current moment of the dipole (in
Ampere × m) is set by the string tag “my_wf”. The variable
j_0 adds an extra prefactor to the current-moment waveform.
section of the FDTD grid at x = 0 , t = 850 ps. The brightness
As an example, we placed this dipole inside the grid with of a pixel is proportional to the x component of the electric field
the two basic shapes shown in Figure 1 (Section 4). In Figure 4, at that pixel. The permittivity distribution is shown in red where
the field and permittivity distributions are shown on a yz cross it is different from one.

9. Incident Beam Creation

For scattering problems, Angora can create certain


types of incident beams in the simulation grid using the total-
field/scattered-field (TF/SF) method [2]. All incident-beam
definitions are placed inside the TFSF group.

9.1 Plane Waves

For creating plane waves, the PlaneWaves list is used.


Here is a simple example:

TFSF:
{
PlaneWaves:
(
{
theta = 40;
phi = 90;
psi = 0;
waveform_tag = “waveform1”;
}
Figure 4. The field distribution created by an x-directed );
infinitesimal (Hertzian) electric current source at the origin. };

IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013 85

AP_Mag_Aug_2013_Final.indd 85 10/7/2013 5:47:06 PM


This definition will create an x-polarized plane wave propa- 9.2 Focused Hermite-Gaussian Beams
gating downward at a 40° angle with the z axis on the yz plane.
The electric-field waveform of the plane wave (in V/m) is Angora can also create a Hermite-Gaussian beam (also
determined by the string tag “waveform1”, which should be called a TEM laser beam), focused by a lens. For this, the
defined in a Waveforms definition somewhere in the configu- FocusedLaserBeams list is used:
ration file (see Section 8). Assuming a modulated-Gaussian
waveform, a two-dimensional snapshot of the field amplitude TFSF:
of this plane wave on the yz plane is shown in Figure 5. {
FocusedLaserBeams:
The plane wave in Figure 5 travels in free space. Angora (
uses the standard method described in [2] to compute this plane {
wave in the FDTD grid. If infinite planar stratification is present theta = 40;
(see Section 5), the “incident” plane wave encompasses not phi = 90;
psi = 0;
only the first plane wave that impinges on the uppermost (or
x_order = 0;
lowermost) layer’s interface, but also the reflected and y_order = 0;
transmitted plane waves due to the layers’ interfaces. Because waveform_tag = “waveform1”;
of this, the simple approach in [2] is no longer sufficient to ap_half_angle = 80;
simulate plane-wave incidence. A more sophisticated technique, back_focal_length = 0.1;
described in detail in [11], has been incorporated into Angora. filling_factor = 1;
This allows it to compute plane waves incident on an infinite }
planar (possibly lossy) stratification. Angora automatically );
detects the layering in the FDTD grid and chooses the };
appropriate TF/SF algorithm for the problem. A plane wave
incident from air onto a lossy half space ( ε r = 2.0 , σ = 0.5 This definition will create an x-polarized focused Gaussian
S/m) is shown in Figure 6. The waveform of the incident plane beam ( TEM 00 ), propagating downward at a 40° angle, with the
z axis on the yz plane. The filling_factor variable
wave was a Gaussian function f= ( t ) exp  − ( t τ )2 2 , with determines the ratio of the beam’s half-width to the radius of the
τ = 20 ps. In addition to the plane wave hitting the interface (at entrance pupil of the focusing lens. The ap_half_angle
z = 0 ), the reflected and transmitted plane waves are also variable specifies the half-angle of the illumination cone, and
computed and included in the “incident” field. the back_focal_length variable specifies the focal length of
the lens. Higher-order beams ( TEM mn ) can also be defined by
changing the variables x_order and y_order. The electric-
field waveform of the Gaussian beam (in V/m) is determined by
the string tag “waveform1”, which should be defined in a
Waveforms definition somewhere in the configuration file (see
Section 8). Assuming a modulated-Gaussian waveform, a two-
dimensional snapshot of the field amplitude of this beam on the
yz plane is shown in Figure 7.

Internally, the focused laser beam is represented as a finite


summation of plane waves incident from many directions inside
the illumination cone. This technique was introduced in [12] for
the synthesis of a focused beam that results from illuminating a
converging lens by a plane wave. The beam considered in [12]
is the limiting case of a focused TEM 00 laser beam for an
infinitely overfilled aperture (i.e., as the filling_factor
variable tends to infinity.)

10. Near-Field-to-Far-Field Transformation

Frequently, the field distribution at the far zone of a scat-


terer or radiator is of interest. In the FDTD, there is a tech-
nique called the near-field-to-far-field transformation (NFFFT)
Figure 6. An electric­field snapshot of an x-polarized plane [2] for calculating the far-zone field (also called the radiated
wave incident on a lossy dielectric half-space. The layer field) from the near-field data available in the simulation grid.
interface is indicated by the horizontal line. The propaga- This near field is commonly collected over a closed surface,
tion directions of the incident, reflected, and transmitted surrounding the scatterer or radiator, which is called the near-
plane waves are shown by arrows. field-to-far-field transformation surface. There are two main

86 IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013

AP_Mag_Aug_2013_Final.indd 86 10/7/2013 5:47:06 PM


The PhasorDomainNFFFT list is used to define phasor-
domain NFFFTs:

PhasorDomainNFFFT:
(
{
num_of_lambdas = 50;
lambda_min = 3e-2;
lambda_max = 6e-2;
lambda_spacing_type = “k-linear”;
direction_spec = “theta-phi”;
num_of_dirs_1 = 1;
dir1_min=0.0;
dir1_max=0.0;
num_of_dirs_2 = 1;
dir2_min=0.0;
dir2_max=0.0;
far_field_dir = “my_path”;
},
{
num_of_lambdas = 1;
lambda_min = 4e-2;
direction_spec = “theta-phi”;
num_of_dirs_1 = 360;
Figure 7. An electric­field snapshot of an x-polarized focused
dir1_min=0.0;
Gaussian beam. The direction of propagation is indicated dir1_max=360.0;
by the arrow. num_of_dirs_2 = 1;
dir2_min=0.0;
dir2_max=0.0;
far_field_dir = “my_path”;
types of near-field-to-far-field transformations. In the first, }
the frequency (or phasor) components of the temporal Fourier );
spectrum of the far field are calculated at specific frequencies.
In the second, the far field is obtained directly in the time In this example, two near-field-to-far-field transformations are
domain. In the first type, there is a significant memory penalty defined in two consecutive groups. In the first group, the far
per frequency, but a small additional computational burden per field is calculated at a range of frequencies in a single direction.
observation direction. In the second type of near-field-to-far- In the second group, the far field is calculated at a single
field transformation, the additional computational burden per frequency over a range of observation directions. In the first
observation direction is much larger; however, the memory near-field-to-far-field transformation, the first four lines
usage is much lower. The first type (phasor-domain near-field- determine the frequencies (or free-space wavelengths) at which
to-far-field transformation) is therefore desirable if very few the far field will be calculated. Here, the far-field is calculated
frequencies are needed. The second (time-domain near-field- at 50 free-space wavelengths, spaced linearly in frequency
to-far-field transformation) is desirable if very few observation (equivalently, in wavenumber, k) between 3 cm and 6 cm. In the
directions are needed. Angora can calculate both types of near- second near-field-to-far-field transformation, lines three to nine
field-to-far-field transformations. The phasor-domain near- define the directions at which the far field is to be calculated.
field-to-far-field transformation is supported for an arbitrary The assignment direction_spec=“theta-phi” says that
number of layers with any permittivity, permeability, and the directions are given in terms of the spherical-coordinate
electric-conductivity values (see Section 5), whereas the time- angles θ and φ , where the z axis corresponds to θ = 0 , and the
domain near-field-to-far-field transformation is supported for up
xz plane corresponds to φ = 0 . The lines that follow this
to three lossless planar layers. The phasor-domain near-field-to-
far-field transformation for arbitrary layering was described (as assignment specify that the far field will be calculated at 360 θ
an extension and generalization of the results in [13]) in [14], values between 0° and 360°, and a single φ value ( φ = 0° ).
and the time-domain near-field-to-far-field transformation for a This corresponds to the far-field pattern on the xz plane. The last
three-layered medium was described in [15]. line in each group determines the directory in which the output
file is placed. The output is in the standard HDF5 format, which
can be inspected and modified using free software [16], or built-
in MATLAB functions. For more information on the output of
10.1 Phasor-Domain NFFFT the phasor-domain near-field-to-far-field transformation, please
consult the Angora user’s manual. The far-field amplitudes are
Angora supports phasor-domain near-field-to-far-field all normalized by the asymptotic r dependence exp ( − jkr ) r .
transformations for arbitrary planar stratification with permit-
tivity, permeability, and electric conductivity variations along As an example, the frequency spectrum and the far-field
the axis of symmetry. pattern are shown in Figures 8a and 8b for the arrangement in

IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013 87

AP_Mag_Aug_2013_Final.indd 87 10/7/2013 5:47:06 PM


Figure 8a. The far­field amplitudes created by the Hertzian Figure 8c. The far­field amplitudes created by the Hertzian
source in Figure 4: The frequency response in the θ = 0 source in Figure 4: The time waveform for the θ component
direction. The absolute value of Eθ is shown. All amplitudes of the electric field at θ= 36° , φ= 57° . The amplitude
were normalized by the distance, r, and the free-space waveform shown was time-advanced by r c , and
amplitude created by the dipole in the θ = 0° direction. normalized by the maximum of the waveform created by
the dipole in free space.

Figure 4 with a Hertzian dipole source at the center of the grid


(see Section 8).

10.2 Time-Domain NFFFT

Angora supports time-domain near-field-to-far-field


transformations for up to three lossless planar material layers
with permittivity variations along the axis of symmetry. The
TimeDomainNFFFT list is used to define phasor-domain
NFFFTs:

TimeDomainNFFFT:
(
{
theta = 36;
phi = 57;
far_field_dir = “my_path”;
}
Figure 8b. The far­field amplitudes created by the Hertzian );
source in Figure 4: The phasor-amplitude pattern in the xz
plane at λ = 4 cm. The absolute value of Eθ is shown. All The theta and phi variables specify the spherical-coordinate
amplitudes were normalized by the distance, r, and the free- θ and φ angles at which the far-field waveforms are to be
space amplitude created by the dipole in the θ = 0° calculated. The far_field_dir variable determines the
direction. directory in which the output file is placed. The output is in the

88 IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013

AP_Mag_Aug_2013_Final.indd 88 10/7/2013 5:47:07 PM


standard HDF5 format, which can be inspected and modified above the sample (in the + z direction), which corresponds to
using free software [16], or built-in MATLAB functions. For reflection microscopy. Transmission microscopy could also be
more information on the output of the time-domain near-field- simulated by setting this variable to “lower”. The last line
to-far-field transformation, please consult the Angora user’s specifies the directory in which the output data are placed. As
manual. The far-field amplitudes are all normalized by the with the near-field-to-far-field transformation, the output is
asymptotic r dependence 1 r , and advanced in time by r c . written in HDF5 format, which can be read using freely-
available tools [16] or built-in MATLAB functions. For more
As an example, the θ component of the electric-field information, please consult the Angora user’s manual.
waveform at θ= 36° , φ= 57° is shown in Figure 8c for the
arrangement in Figure 4, with a Hertzian dipole source at the We will now demonstrate the optical-imaging feature of
center of the grid (see Section 8). Angora by placing a nanometer-scale sample in the shape of the
AP-S logo inside the FDTD grid (see Figure 9), and calculating
its optical image. The logo was read from a GIF file, and
converted into a 14.62 µm × 14.18 µm × 0.4 µm dielectric
11. Optical Imaging embossing with relative permittivity ε r = 2.56 (or refractive
index n = 1.6 ). This region was then written into a file according
Angora also offers some unique features for nano-optics to the format specified in Section 6, and read into the FDTD
problems. Focused-beam illumination (see Section 9) is one of grid using a MaterialsFromFiles definition (see Section 6).
these features. Another useful feature is the ability to construct
optical images of samples placed inside the FDTD grid. Opti-
cal images are constructed in Angora by merging the full-
vector Maxwell’s-equations-based FDTD solution with the
geometrical-optics principles that are valid in the macroscopic
far-field regime. The link between the microscopic FDTD
domain and the macroscopic optical-component domain is
provided by the near-field-to-far-field transformation (see
Section 10). A detailed description of this methodology was
described in [17].

Optical images are constructed using the OpticalImages


list:

OpticalImages:
(
{
output_data = [“intensity_tot”,
“intensity_inc”];
num_of_lambdas = 10;
lambda_min = 400e-9;
lambda_max = 700e-9;
lambda_spacing_type = “k-linear”;
ap_half_angle = 36.87;
magnification = 40.0;
coll_half_space = “upper”;
image_dir = “my_path”;
} Figure 9a. The xy cross section of the geometry of the opti-
); cally-imaged sample in the shape of the AP-S logo ( n = 1.6 ),
embossed on a glass substrate ( n = 1.5 ).The embossing
The output_data array lists the desired field or intensity material is shown in red.
information in the output file. In the above example, only the
total intensity and the incident intensity (the intensity created
by the incident beam without any scatterers) are recorded. The
next four lines specify the wavelengths at which the optical
image will be synthesized. The assignments have the same
meaning as those in the near-field-to-far-field transformation
(NFFFT) specification (see Section 10.1). The half-angle of the
collection aperture as seen from the focal point of the objective
(which is by default the origin of the grid) is determined by the
ap_half_angle variable. The magnification variable sets Figure 9b. The xz cross section of the sample in Figure 9a.
the magnification of the imaging system. The coll_half_ The glass substrate is shown in green. The substrate extends
space=“upper” setting implies that the objective is placed to infinity in the − z direction.

IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013 89

AP_Mag_Aug_2013_Final.indd 89 10/7/2013 5:47:07 PM


A glass half space ( n = 1.5 ) was placed below the material The Recorder group includes all the field-recording
region using a MaterialSlabs definition (see Section 5). A settings for the simulation. The MovieRecorders list inside
plane wave with a modulated Gaussian electric-field profile this group lists the movie recorders:
( τ = 2.12662 fs,
= f 0 5.88878 × 1014 Hz) was sent onto the
Recorder:
sample from the + z direction using a PlaneWaves definition {
(see Section 9). With these parameters, the Gaussian frequency MovieRecorders:
spectrum of the incident plane wave fell to −20 dB of its (
maximum at wavelengths of 400 nm and 700 nm, which {
corresponded roughly to the limits of visible light. In order to recorded_section = “xz”;
simulate un-polarized light, two orthogonal polarizations were recorded_position = 0;
recorded_component = “Ex”;
separately sent in two consecutive runs, and the final intensities
recording_scale = “linear”;
were added, since the orthogonal polarizations were inde- recording_type = “uchar1”;
pendent. The optical image of this sample was calculated using movie_dir = “my_path”;
the OpticalImages definition above. The optical intensities }
were all normalized by the incident intensity, which was the );
intensity of the plane wave reflected from the glass substrate };
without the embossing. In this way, the frequency dependence
cancelled out, and the effective white-light response was The first line determines the cross section over which the movie
obtained. In Figure 10a, the resulting normalized bright-field is recorded. Currently, Angora can only record movies over
image (the intensity integrated over all frequencies) is shown in cross sections perpendicular to the principal x, y, and z axes
grayscale. The brightness values ranged from 0 (black) to 2 of the Cartesian grid. The second line determines the position
(white). In the remaining figures, the wavelength spectrum of of the recorded cross section with respect to the grid origin.
each pixel was processed using the CIE color-matching The third line specifies the field component to be recorded.
functions [18] to obtain the color image perceived by the Currently, only the three Cartesian components of the electric or
average human retina. In Figure 10b, the color version of the magnetic field can be recorded. Depending on the recording_
bright-field image in Figure 10a is shown. Figure 10c shows the scale variable, the output can be written as is (“linear”), in
dark-field image of the sample, in which only the light scattered absolute value (“absolute”), or in decibels (“dB”). Angora
from the sample was retained, and the incident field was supports two kinds of movie recording. The first, selected by
completely removed from the final image. If the incident field setting recording_type=“uchar1”, discretizes a given field
was phase-shifted by 90° instead of being removed, the phase- value over a dynamic range into 256 values, and records it in
contrast image in Figure 10d was obtained. One needed the a single byte. The second, selected by setting recording_
complex phasor amplitude distribution of the image to separate type=“dbl8”, writes the field value directly as an eight-byte
the scattered and incident fields and synthesize Figures 10c and double value. The advantage of the former type is an eight-
10d. This was done by including amplitude information in the fold gain in storage, while the second type does not introduce
output_data array in the OpticalImages definition above. any loss or clipping. If the maximum value of the field over
The configuration file for this example (along with the material the course of the simulation can be accurately estimated
file for the AP-S logo) can be found on the Angora Web site [5]. beforehand, the “uchar1” recording can be really useful. For
more information on setting the dynamic range for “uchar1”
recording, please consult the Angora user’s manual. The last
line in the above assignments determines the directory in which
12. Field Recording the output is placed. The movie output is written in a special
binary format for increased speed. This format is described in
Angora can collect field values created in the grid during detail in the Angora user’s manual. For the convenience of the
the FDTD simulation and save them into files. There are three user, a MATLAB script named angora_movie.m is distributed
types of field recording: movie recording on a cross section of with the Angora package. This script reads an Angora movie
the grid, line recording along a line through the grid, and field- file and displays it as a MATLAB movie. It can also save the
value recording at a given point in the grid. Here, we will only movie in AVI format.
describe movie recording. For the other two types, please con-
sult the Angora user’s manual. The settings for line and field-
value recording are similar to those for movie recording, but
considerably simpler. All the permittivity-profile images (such 13. Future Implementation
as Figure 1 and Figure 9) and the field-distribution snapshots
(such as Figure 4) were produced using the movie-recording Angora is licensed under the GNU Public License (GPL),
feature of Angora. and has been envisioned as a community project. Contributions
are therefore highly welcome. Please contact help@angorafdtd.
org for questions, comments, and suggestions. For bug reports,
contact [email protected].

90 IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013

AP_Mag_Aug_2013_Final.indd 90 10/7/2013 5:47:07 PM


Figure 10a. Optical images of the structure shown in Fig- Figure 10b. Optical images of the structure shown in Fig-
ure 9: A bright­field intensity image, normalized by the ure 9: A bright­field image. The spectrum at each pixel was
reflection from the glass half­space. The grayscale limits reduced to three values that corresponded to the responses
were from 0 (black, low intensity) to 2 (white, high inten- of the three cones in the human retina. The conversion was
sity). done using the CIE color-matching functions [18].

Figure 10c. Optical images of the structure shown in Fig- Figure 10d. Optical images of the structure shown in Figure
ure 9: A dark­field image. The spectrum was processed as 9: A phase-contrast image. The spectrum was processed as
in Figure 10b. in Figure 10b.

IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013 91

AP_Mag_Aug_2013_Final.indd 91 10/7/2013 5:47:08 PM


14. Acknowledgment 12. I. R. Capoglu, A. Taflove, and V. Backman, “Generation of
an Incident Focused Light Pulse in FDTD,” Optics Express, 16,
This work was supported by NIH grants R01EB003682 23, November 2008, pp. 19208-19220.
and R01CA128641.
13. K. Demarest, Z. Huang, and R. Plumb, “An FDTD Near-
to-Far-Zone Transformation for Scatterers Buried in Stratified
Grounds,” IEEE Transactions on Antennas and Propagation,
15. References AP-44, 8, August 1996, pp. 1150-7.

1. K. S. Yee, “Numerical Solution of Initial Boundary Value 14. I. R. Capoglu, A. Taflove, and V. Backman, “A Frequency-
Problems Involving Maxwell’s Equations in Isotropic Media,” Domain Near-Field-to-Far-Field Transform for Planar Layered
IEEE Transactions on Antennas and Propagation, AP-14, 3, Media,” IEEE Transactions on Antennas and Propagation, AP-
May 1966, pp. 302-307. 60, 4, April 2012, pp. 1878-1885.

2. A. Taflove and S. C. Hagness, Computational Electrody- 15. I. R. Capoglu, Techniques for Handling Multilayered
namics: The Finite-Difference Time-Domain Method, Third Media in the FDTD Method, PhD dissertation, Georgia Insti-
Edition, Norwood, MA, Artech House, 2005. tute of Technology, Atlanta, GA, 2007; available at http://goo.
gl/7gGN7.
3. Wikipedia, “Finite-Difference Time-Domain Method,” 2012,
accessed April 2012, available at http://en.wikipedia.org/wiki/ 16. HDF5 Group, “HDF5 Tools,” accessed April 2012, avail-
Finite-difference_time-domain_method. able at http://www.hdfgroup.org/products/hdf5_tools.

4. I. R. Capoglu, “Angora: A Free Software Package for 17. I. R. Capoglu, J. D. Rogers, A. Taflove, and V. Backman,
Finite-Difference Time-Domain (FDTD) Electromagnetic “The Microscope in a Computer: Image Synthesis from Three-
Simulation,” 2012, accessed April 2012, available at http:// Dimensional Full-Vector Solutions of Maxwell’s Equations
www.angorafdtd.org. at the Nanometer Scale,” Progress in Optics, April 2012 (to
appear in 57).
5. I. R. Capoglu, “Configuration Files for the APS Magazine
Article,” 2012, accessed April 2012, available at http://www. 18. M. D. Fairchild, Color Appearance Models, New York,
angorafdtd.org/aps_mag. Wiley, 2005.

6. “The OpenMPI Project,” accessed August 2012, available at


http://www.open-mpi.org.
Introducing the Feature Article Authors
7. M. A. Lindner, “libconfig: A Library for Processing Struc-
tured Configuration Files,” 2011, accessed April 2012, avail-
able at http://www.hyperrealm.com/libconfig.

8. I. R. Capoglu, “Angora User’s Manual,” 2012, accessed April


2012, available at http://www.angorafdtd.org/doc/ angora.html.

9. J. A. Roden and S. D. Gedney, “Convolution PML (CPML):


An Efficient FDTD Implementation of the CFD-PML for
Arbitrary Media,” Microwave and Optical Technology Letters,
27, 5, December 2000, pp. 334-9. İlker R. Çapoğlu received the PhD in Electrical and
Computer Engineering from the Georgia Institute of Technol-
10. P. Guttorp and T. Gneiting, “On the Whittle-Matérn Cor- ogy, Atlanta, in 2007. He has since been employed as a post-
relation Family,” NRCSE, Seattle, WA, Tech. Rep. 080, 2005. doctoral fellow in the Biomedical Engineering Department of
Northwestern University, Evanston, IL. His research interests
11. I. R. Capoglu and G. S. Smith, “A Total-Field/Scattered- are time-domain methods in numerical electromagnetics,
Field Plane-Wave Source for the FDTD Analysis of Layered numerical modeling of electromagnetic wave propagation in
Media,” IEEE Transactions on Antennas and Propagation, AP- multilayered media, numerical electromagnetic simulation of
56, 1, January 2008, pp. 158-169. optical systems, and numerical simulation of the scattering of
light from inhomogeneous and random media.

92 IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013

AP_Mag_Aug_2013_Final.indd 92 10/7/2013 5:47:08 PM


Allen Taflove is a Professor of Electrical Engineering Vadim Backman is a Professor of Biomedical Engineer-
and Computer Science at Northwestern University, Evanston, ing and the Program Leader of Cancer and Physical Sciences
IL. Since 1972, he has developed fundamental theoretical at the Robert H. Lurie Comprehensive Cancer Center of
approaches, algorithms, and applications of Finite-Difference Northwestern University, Evanston, IL. Dr. Backman has 136
Time-Domain (FDTD) computational solutions of Maxwell’s peer-reviewed publications and book chapters, and 16 patents
equations. He coined the descriptors “finite-difference time- on biological optical imaging. He is an Editor of Biomedical
domain” and “FDTD” in a 1980 IEEE paper, and in 1990 was Applications of Light Scattering (McGraw Hill, 2009), and has
the first person to be named an IEEE Fellow in the FDTD been a Chair of the Conference on Biomedical Applications
technical area. In 2002, he was named by the Institute of Sci- of Light Scattering since 2007. He has developed and taught
entific Information (ISI) to its original listing of the most-cited classes on fundamentals of microscopy and advanced physical
researchers worldwide, as published in ISIHighlyCited.com. and applied optics.
To date, his 133 journal papers and four FDTD books have
received a total of more than 12,000 citations according to
the ISI Web of Science, and the exact phrase “finite difference
time domain” has appeared in over 44,000 articles according
to Google Scholar. In May 2010, Nature Milestones: Photons
recognized Prof. Taflove as one of the two principal pioneers of
numerical methods for solving Maxwell’s equations.

IEEE Antennas and Propagation Magazine, Vol. 55, No. 4, August 2013 93

AP_Mag_Aug_2013_Final.indd 93 10/7/2013 5:47:08 PM

You might also like