Reference Manual For PFDTD Ver. 8.47: 1 Set Basic Parameters

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 46

Reference Manual

for pFDTD ver. 8.47


Se-Heon Kim
seheon@caltech.edu
California Institute of Technology
July 15, 2009
1 Set Basic Parameters
1. void structure size(oat x, oat y, oat z) :
Set the size of the FDTD domain as x(a) y(a) z(a). Here, a represents the unit length
in pFDTD, which can take any number/length at ones preference. For example, when
dealing with photonic crystals, one can choose the FDTD unit length, 1(a) to equal to
the lattice constant of the photonic crystal. The origin of the FDTD coordinate system
(0,0,0) is at the center of the entire block-shaped domain. Therefore, for example, x will
vary from -x/2 to +x/2.
2. void lattice size(int lx, int ly, int lz) :
Set the size of the space grids. The grid size in the x direction will be x = a/lx. Also,
you can set dierent grid sizes for all three directions of x,y, and z (=anisotropic but
uniform). Note that lx is the same as lattice
x
used in Appendix-conversion rules. For
2-D photonic crystal slab structures, lx=ly=lz=20 are routinely used.
1
3. void non uniform grid(char *component, oat z i, oat z f, int nlz) :
Non uniform space grids can be set by this function.
4. void pml size(int il,int ir,int jl,int jr,int kl,int kr) :
Set the thickness of the PML (Perfectly Matched Layer, or absorbing layer) for the FDTD
domain of x(a) y(a) z(a). Here, for example, il and ir are applied for the wall at
x =-(x/2)(a) and the wall at x =+(x/2)(a), respectively. (As you may guess easily , j
is for the y direction and k for the z direction.) The unit of those input values is grid,
which means, for example, if lattice
x
=20 and il=10, the PML thickness becomes 10 grid
or (equivalently) 0.5(a). Normally, il=ir=jl=jr=kl=kr=10 are used as default values.
5. void set default parameter(oat S) :
Set various basic parameters as the preset values at one time. The below are list of
parameters which can be set by this function.
(a) =3.141592
1
At least 2 grids in each direction are needed to perform the FDTD time update equations.
1
(b)
0
= 8.854 10
12
(c)
0
= 4 10
7
(d) the speed of light, c = 1.0/

0
(e) Numerical stability parameter, o, is explicitly set by this function, that is, o=S. Note
that o has an inverse relationship with the well-known Courant stability parameter
(See Taove[1] and also Sec. 7.3).
(f) The size of the FDTD time step is set by the explicitly input value of o; t = 1/(co)
(g) Other various parameters which are needed to completely specify the PML. (Details
shall be given in the complete manual.) And one can also alter these values using
the functions that shall follow in the below.
orderxl = 3.5; orderyl = 3.5; orderzl = 3.5;
orderxr = 3.5; orderyr = 3.5; orderzr = 3.5;
sig_axl = 1.0; sig_ayl = 1.0; sig_azl = 1.0;
sig_axr = 1.0; sig_ayr = 1.0; sig_azr = 1.0;
kx = 1.0; ky = 1.0; kz =1.0;
(h) Setting some parameters needed for use of the GSL
2
random number generator.
gsl_rng_env_setup();
rng_type = gsl_rng_default;
rng_r = gsl_rng_alloc(rng_type);
gsl_rng_set(rng_r, 1234);
Here, gsl rng set() initializes the GSL random number generator with the seed value
of 1234 (by default). You can change the seed value by calling this function after
set default parameter() function.
6. void set sigma max(oat axl, oat axr, oat ayl, oat ayr, oat azl, oat azr) :
Change some of basic PML constants preset by set default parameters(). This function
alters, for example, sig axl sig azr. If you do not call this function, these values will
take the preset default values.
7. void set sigma order(oat oxl, oat oxr, oat oyl, oat oyr, oat ozl, oat ozr) :
Change some of basic PML constants preset by set default parameters(). This function
alters, for example, orderxl orderzr. If you do not call this function, these values will
take the preset default values.
8. void set kappa(oat kappa x, oat kappa y, oat kappa z) :
Change some of basic PML constants preset by set default parameters(). This function
alters, for example, kx, ky, kz. If you do not call this function, these values will take the
preset default values.
9. void Hz parity(int x,int y,int z) :
Set mirror symmetry conditions when the structure under consideration retains mirror
symmetries. Possible input values will take one of (-1,0,+1), where 0 turns o the sym-
metry condition while 1 or -1 sets even or odd symmetry with respect to the symmetry
2
GNU Scientic Library. For more information, visit www.gnu.org/software/gsl/
2
plane (For example, x applies to the x = 0 plane). Note, however, the even and the odd
symmetries are dened according to H
z
elds, thus they are exactly opposite to the
physically even and odd.
(Important to remember) There are two things you should keep in mind dealing with
this symmetry condition.
(1) Total number of grids for the direction where you set the symmetry con-
dition should be even. For example, x(xsize)
3
lx(lattice x)
4
= even number,
when using a symmetry condition for the x = 0 plane.
(2) The location of a point dipole source should be within a minus half
space. For example, one of the coordinates, x 0, when using a symmetry
condition for the x = 0 plane. This rule applies for the functions, such as
Gaussian dipole source(), Gaussian line source(), random Gaussian dipole(), and
incoherent point dipole().
10. void periodic boundary(int x on, int y on, oat k x, oat k y) :
Set the Bloch-Floquet periodic boundary conditions. If the structure under consideration
retains periodicity along either x or y direction (For example, when dealing with photonic
crystal waveguides or 2-D square-lattice photonic crystals), the periodic conditions can be
set on(=1) or o(=0) by using x on and y on. k x and k y, Bloch wavevectors in the x and
y directions, respectively, lie within 0 0.5 (normalized by 2/L, where L is the FDTD
domain size for x and y directions). Later, you can change the Bloch wavevectors set by
this function by using the pre-dened grobal variables, wave vector x, wave vector y. If
you do not call this function, by default, the FDTD does not use the periodic boundary
condition, i.e., x on=y on=0.
In general, for arbitrary k x and k y in which both are not simultaneously zero, the
FDTD requires double sized memory (compared with the one without using the periodic
boundary condtion) to handle both real elds and imaginary elds. When both k x and
k y are chosen to be 0 (Gamma point) in this function, memory() function which shall be
explained in the below will create only the variables for real elds for more ecient
calculation. However, if you are to perform sequential multi-tasks with several Bloch
vectors under one FDTD simulation (for example, when you want to get a waveguide
dispersion), it should be avoided that both k x and k y are set by 0 in this function. You
can set and modify Bloch vectors as whatever you want via wave vector x, wave vector y
variables in the part where acutal time updates are performed.
11. void memory() :
Declare and initialize all 3-D/2-D variables to be used in FDTD calculation. This function
should follow after the above basic parameters functions.
12. void real space param(oat a nm, oat w n) :
Print out some useful parameters in real space (See Sec. 7.3) as a text output le,
Real Space Param.dat. a nm means that the FDTD unit length, a, corresponds to
3
in structure size()
4
in lattice size()
3
(a nm) 10
9
m in real space and w n indicates the normalized frequency of the FDTD
dipole.
Note that this w n will be used for the calculation of the eective susceptibility,
eff
.
5
5
See total EM energy block()
4
2 Set dielectric/metallic structures
In the pFDTD, pre-dened, a number of functions helps you to input complex dielectric/metallic
structures by the repeated use of rather simple geometric structures. For example, the later
use of input object functions will take over the overlapped region with the previously dened
structures. In the present pFDTD version, only metals that can be described by simple Drude
model can be handled.
1. void background(oat epsilon) :
Fill in the whole FDTD domain with a uniform dielectric material having epsilon of
epsilon. For example, for air background, set epsilon as 1.0.
2. void input object(char *shape, char *matrix le, oat centerx, oat centery, oat centerz,
oat size1, oat size2, oat size3, oat epsilon) :
Input various dielectric structures with simple geometric shapes, where the materials are
assumed to be linear, isotropic, and non-dispersive. All the structures dened in this
function will be actually created in the 3-D memories of epsilonx[i][j][k], epsilony[i][j][k],
and epsilonz[i][j][k]
6
, by calling make epsilon() function, which is to be explained soon in
the below.
*shape requests one of the following geometric shapes for the dielectric material. Note that
unused input parameters can be set by EMP (Empty variable dened as 0 in pFDTD.h).
(a) rod : set a cylindrical shape aligned in the z direction.
*matrix le : EMP
centerx, centery, centerz : 3-D coordinates of the center of mass
size1 : radius in the x y plane
size2 : height in the z direction
size3 : EMP
epsilon : epsilon of the material
(b) rodX : set a cylindrical shape aligned in the x direction.
*matrix le : EMP
centerx, centery, centerz : 3-D coordinates of the center of mass
size1 : radius in the y z plane
size2 : height in the x direction
size3 : EMP
epsilon : epsilon of the material
(c) rodY : set a cylindrical shape aligned in the y direction.
*matrix le : EMP
centerx, centery, centerz : 3-D coordinates of the center of mass
size1 : radius in the z x plane
size2 : height in the y direction
size3 : EMP
epsilon : epsilon of the material
6
Here, the each epsilon variable having subscripts of x,y, and z reects the micro-positioning nature of the Yee
cell structure (REF).
5
(d) donut : set a donut shape whose symmetry axis aligned in the z direction.
*matrix le : EMP
centerx, centery, centerz : 3-D coordinates of the center of mass
size1 : inner radius in the x y plane
size2 : outer radius in the x y plane
size3 : height in the z direction
epsilon : epsilon of the material
(e) sphere : set a sphere shape.
*matrix le : EMP
centerx, centery, centerz : 3-D coordinates of the center of mass
size1 : radius
size2 : EMP
size3 : EMP
epsilon : epsilon of the material
(f) shell : set a spherical crust shape.
*matrix le : EMP
centerx, centery, centerz : 3-D coordinates of the center of mass
size1 : inner radius
size2 : outer radius
size3 : EMP
epsilon : epsilon of the material
(g) ellipse : set a cylindrical shape whose cross section is ellipse and whose axis is
aligned in the z direction.
*matrix le : EMP
centerx, centery, centerz : 3-D coordinates of the center of mass
size1 : radius x (Rx)
size2 : height in the z direction
size3 : ratio of radius y and radius x (Rx/Ry)
epsilon : epsilon of the material
(h) ellipsoidal : set a 3-D ellipsoidal shape.
*matrix le : EMP
centerx, centery, centerz : 3-D coordinates of the center of mass
size1 : radius x (Rx)
size2 : radius y (Ry)
size3 : radius z (Rz)
epsilon : epsilon of the material
(i) cone : set a conical shape whose axis is aligned in the z direction.
*matrix le : EMP
centerx, centery, centerz : 3-D coordinates of the center of mass
size1 : radius of the top circle (R1)
size2 : radius of the bottom circle (R2)
size3 : height (h)
epsilon : epsilon of the material
6
(j) block : set a tetragonal shape.
*matrix le : EMP
centerx, centery, centerz : 3-D coordinates of the center of mass
size1, size2, size3 : edge lengths for x, y, and z directions
epsilon : epsilon of the material
(k) contour : used for contour FDTD (Read Sec. 7.4). This option generates a general
diagram-column structure, in which the general diagram lying in the x y plane
translates in the z direction to form the 3-D swept region.
*matrix le : M N 2-D text matrix data le from which contour information of
the general diagram can be obtained.
centerx, centery : dene the center of the general diagram, which will be made
coincide with the FDTD origin. Input numbers are in the unit of in the matrix grid.
centerz : vertical center of the column (in the z direction) in the unit of the FDTD
unit length, a.
size1 : The 2-D matrix contains information on the scalar function, (x, y), from
which the contour image of the general diagram will be extracted. size1 sets the
upper bound for our favorable region; we select the region (x, y) size1.
size2 : the height of the column in the unit of the FDTD unit length, a.
size3 : compression (or magnication) factor by which the original matrix data is
shrink to t into the length scale of the 2-D FDTD space. For example, let us
assume that we have a certain reference distance (point-to-point) of N
m
grids in our
matrix data and say it should be N
F
grids in the FDTD space. Then, size3 should
be N
F
/N
m
. Note that size3 is in oat type.
epsilon : epsilon of the material.
3. void input object Euler rotation(char *shape, char *matrix le, oat centerx, oat centery,
oat centerz, oat size1, oat size2, oat size3, oat alpha, oat beta, oat gamma, oat
epsilon) :
This function is very similar to void input object() function except for the fact that it
can also perform the 3-D Euler rotation with three Euler angles of (alpha, beta, gamma),
with respect to the center (centerx, centery, centerz) of each structure. Note that, in the
present pFDTD version, *shape accepts only 4 kinds of structures, rod, ellipse, ellipsoidal,
and block.
Denition of the Euler rotation matrix [] is
[] =
_
_
_
cos sin 0
sin cos 0
0 0 1
_
_
_
_
_
_
1 0 0
0 cos sin
0 sin cos
_
_
_
_
_
_
cos sin 0
sin cos 0
0 0 1
_
_
_
Other input parameters are the same as in void input object().
4. void input Drude medium(char *shape, oat centerx, oat centery, oat centerz, oat size1,
oat size2, oat size3, oat epsilon b, oat omega p, oat gamma 0, oat lattice n) :
Input various metallic structures with simple geometric shapes, where the materials are
assumed to be linear, isotropic, and dispersive that can be described by (Single pole)
7
Drude model. We have adopted the Auxiliary Dierential Equation (ADE) method (See
Taove Chap. 9[1] and Sec. 8) assuming the following form of Drude model.
() =

2
p

2
+j
A proper set of

,
p
, should be chosen depending on the material and the wavelength
span. Some of useful parameters are summarized in the below (by Jin-Kyu Yang)
In lattice n, the FDTD unit length, a, is entered in the unit of meter.
(a) Silver (n, k data from Palik
7
)
1260nm - 2000nm

= 1.722

p
= 11.55 10
15
= 0.110810
15
375nm - 1240nm

= 3.9943

p
= 13.2910
15
= 0.112810
15
(b) Gold (n, k data from Palik)
1250nm - 1800nm

= 1

p
= 12.06710
15
= 0.1362410
15
650nm - 1250nm

= 12.99

p
= 14.5310
15
= 0.110910
15
(c) Cromium (n, k data from Palik)
1200nm - 2000nm

= 15.28

p
= 14.0210
15
= 3.010
15
(d) Aluminum (n, k data from Palik)
1.35m - 1.9m

= 22.97

p
= 20.4210
15
= 0.1978710
15
300nm - 700nm

= 1.0

p
= 23.8910
15
= 1.0716210
15
7
E. D. Palik Handbook of Optical Constants of Solids
8
(e) Indium-Tin-Oxide (n, k data from KAIST NNFC
8
)
400nm - 1000nm

= 4.61907

p
= 3.418410
15
= 8.558210
13
(f) Silver (n, k data from Johnson and Christy
9
)
400nm - 800nm

= 4.07666

p
= 1.4005610
16
= 4.2175510
13
(g) Gold (n, k data from Johnson and Christy)
600nm - 2000nm

= 10.48449

p
= 1.3755510
16
= 1.1774510
14
(h) Gold (Wegeners group
10
)
600nm - 2000nm

= 1

p
= 1.366610
16
= 6.738710
13
*shape can handle all the geometric shapes to be used in input object() except contour
(In the present pFDTD version). Note that unused input parameters can be set by EMP
(Empty variable dened as 0 in pFDTD.h).
To apply metal update equations to the regions dened by *shape, epsilon b should have
nonzero values.
pFDTD does not apply metal update equations to the region in which both epsilon b
and omega p are set by simultaneously zero. In this way, you can introduce metal
remover (eraser).
Also, you can introduce perfect conductors by using the same input Drude medium()
function with epsilon b=1000, which makes zeros for all the eld components during
the FDTD time update.
11
5. void random object(char *shape, oat radius, oat height, oat epsilon, oat x min, oat
x max, oat y min, oat y max, oat z min, oat z max, int gen number, int seed) :
This function randomly generates gen number number of *shape objects within a region
bounded by [x min, x max], [y min, y max], [z min, z max] . We have used rand() as a
random number generator. Dierent sets of random numbers can be chosen by varying
seed. In the present pFDTD, only rod and sphere are possible for *shape.
8
Made by Samsung SDI
9
P. B. Johnson and R. W. Christy, Optical Constants of the Noble Metals, Phys. Rev. B, Vol. 6, 4370
(1972).
10
Universitat Karlsruhe (TH), Institut fur Angewandte Physik
11
Since this is a very unphysical boundary condition, which can often cause divergence problems.
9
6. void make epsilon() :
Create dielectric structures dened by input object() functions in the memory.
7. void make metal structure(); :
Create metallic structures dened by input Drude medium() functions in the memory.
8. void coecient() :
For boosting the time update speed through the Maxwells equations, this declares and
creates some of useful variables. This function should be called after make epsilon()
function.
10
3 Functions needed during the FDTD time update
1. void propagate() :
This is the part where actual FDTD time updates are performed based on the Maxwells
curl equations. (For instance, see Eq 49.)
2. void Gaussian dipole source(char *component,oat x,oat y,oat z,oat frequency,oat phase,long
to,long tdecay) :
Set parameters for a single Gaussian dipole source. This dipole source function handles
the electric current density

J or the magnetic current density

M to give seed values in the
FDTD space. Gaussian dipole source uses the following functional form in a one specic
component of current vectors.
G(t) = sin(2ft +
0
) exp(
(t t
0
)
t
2
)
The above function is valid only for the time period, t
0
3t < t < t
0
+ 3t.
(a) *component : one of current vector components. To change

J, use one of Ex, Ey, Ez
while to change

M use Hx, Hy, Hz. (To introduce out-of-phase oscillation (= phase
dierence) you may start with - sign such as -Ex, -Ey, -Ez, -Hx, -Hy, -Hz.)
(b) x,y,z : 3-D coordinates of the point dipole source in the unit of a.
(c) frequency : Set the central frequency of the Gaussian dipole source, f, in the unit of
the normalized frequency (
n
= a/).
(d) phase : Set the initial phase,
0
.
(e) to : The FDTD time step at which the Gaussian envelope function has the maximum
value. In general, t
0
= 3 t is used.
(f) tdecay : Set t. Roughly, three times of this corresponds to the FWHM of the given
Gaussian envelope function.
3. void Lorentzian dipole source(char *component,oat x,oat y,oat z,oat frequency,oat phase,long
to,long tdecay) :
Set parameters for a single Lorentzian dipole source. Lorentzian dipole source uses the
following functional form in a one specic component of current vectors.
L(t) = sin(2f(t t
0
) +
0
) exp(
(t t
0
)
t
)
The above function is valid only for the time period, t
0
< t < t
0
+ 8t.
(a) *component : one of current vector components. To change

J, use one of Ex, Ey, Ez
while to change

M use Hx, Hy, Hz. (To introduce out-of-phase oscillation (= phase
dierence) you may start with - sign such as -Ex, -Ey, -Ez, -Hx, -Hy, -Hz.)
(b) x,y,z : 3-D coordinates of the point dipole source in the unit of a.
11
(c) frequency : Set the central frequency of the Gaussian dipole source, f, in the unit of
the normalized frequency (
n
= a/).
(d) phase : Set the initial phase,
0
.
(e) to : The FDTD time step at which the Lorentzian envelope function starts to work.
(f) tdecay : The lifetime of the exponential decay, t, in the unit of the FDTD time
step. You can represent the innitely long decay constant (continuous-
wave limit) by simply setting tdecay as 0; this Lorentzian dipole source
becomes the true continuous-wave source.
4. oat Gaussian phase(oat Wn, long t peak) :
Set the proper initial phase of the Gaussian dipole source, with which the time integral
of the current density is minimized.
12
_

0

J(x, t)dt = 0 (1)


Here, Wn is the central frequency of the dipole source (
n
) and t peak is the time at which
the Gaussian envelope is the highest (t
0
).
For the following form of a Gaussian dipole source,

J(x, t) =

de

_
tt
0
t
_
2
sin(t +
G
)(x x
0
) (2)
the proper initial phase should satisfy
G
= t
0
.
5. oat Lorentzian phase(oat Wn, long tdecay) :
Set the proper initial phase of the Lorentzian dipole source, with which the time integral
of the current density is minimized. Wn is the central frequency of the dipole source (
n
)
and tdecay is the lifetime of the exponential decay.
For the following form of a Lorentzian dipole source,

J(x, t) =

de
t
cos(t +
L
)(x x
0
) (3)
the proper initial phase should satisfy both sin
L
= /

2
+
2
and cos
L
= /

2
+
2
.
6. void Gaussian planewave(char *Ecomp, char *Hcomp, oat position, oat frequency, long
to,long tdecay) :
This function creates a planewave source, which is an array of point Gaussian dipole
sources in a plane. The direction of the propagation is determined by EcompHcomp,
in which *Ecomp and *Hcomp can take any of the eld components that can be used in
the Gaussian dipole source function. The vertical position (z) of this planewave source
is given by position in the unit of a. Other parameters are the same as in the Gaussian
dipole source function.
One can also generate ideal, diractionless planewaves in combination with peri-
odic boundary() function. Oblique angle propagation can be simulated by controlling
Bloch wavevectors of k x and k y.
12
In fact, one can also minimize static charges remaining at the source point.
12
7. void Lorentzian planewave(char *Ecomp, char *Hcomp, oat position, oat frequency, long
to,long tdecay) :
This function creates a planewave source from a plane array of point Lorentzian dipole
sources. Other parameters are the same as in the Lorentzian dipole source function.
8. void Gaussian line source(char *component, oat position x, oat position z, oat frequency,
oat phase, long to,long tdecay) :
This function creates a line source from a linear array of point Gaussian dipole sources.
The direction of the line is in parallel with the y axis and its location is determined by
(position x, position z). Other parameters are the same as in the Gaussian dipole source
function.
9. void Lorentzian line source(char *component, oat position x, oat position z, oat frequency,
oat phase, long to,long tdecay) :
This function creates a line source from a linear array of point Lorentzian dipole sources.
The direction of the line is in parallel with the y axis and its location is determined by
(position x, position z). Other parameters are the same as in the Lorentzian dipole source
function.
10. void random Gaussian dipole(char *component, oat frequency, oat tdecay, oat x min, oat
x max, oat y min, oat y max, oat z min, oat z max, int gen number, int seed) :
gen number number of point Gaussian dipole sources are randomly positioned within a
region bounded by [x min, x max], [y min, y max], [z min, z max] . We have used one of
the standard C libraries, rand(), as a random number generator. Dierent sets of random
numbers can be chosen by varying seed.
The direction of all those dipole oscillations is xed by *component, while the initial phase
of each oscillation is given randomly through seed value. Other parameters are the same
as in the Lorentzian dipole source function.
11. void incoherent point dipole(char *function, oat x, oat y, oat z, oat frequency, long to,
long tdecay, oat t mu, oat sd) :
This function creates a point dipole source at a specic point of space, (x,y,z). But its
direction of oscillation and initial phase are changed at a certain random time, t = .
The statistical distribution of obeys the Gaussian distribution with the mean value of
t mu and the standard deviation of sd. The envelope function can be chosen by *function,
which can be either Gauss (Gaussian function) or Lorentz (Lorentzian function).
12. void eld initialization() :
Initialize all the eld variables such as (Ex,Bx,Hx,Dx,Jx, ) as zeros.
13. void Poynting block(oat centerx, oat centery, oat centerz, oat size1, oat size2, oat
size3) :
This function performs Poynting vector summation over the imaginary closed surfaces
dened by a block whose center and side lengths are denoted as centerx, centery, centerz,
size1, size2, size3, respectively, during the whole FDTD time steps.
Specically, it performs the following form of recursive summation,
c
block
(t +t) = c
block
(t) +
_
block

E

H d

S (4)
13
whenever it is called by the FDTD for-loop.
You can get the summation result, c
block
(), via Sumx, Sumy, Sumz variables, which
are pre-dened in pFDTDvar.h. For example, Sumx gives the integrated Poynting en-
ergy only over the two surfaces positioned at x = size1/2 and x = +size1/2. Thus,
c
block
() =Sumx + Sumy + Sumz.
Note that this function cannot be used together with Poynting total().
14. oat Poynting half sphere point(char *component, oat z0, oat R, oat theta, oat phi) :
In spherical coordinates, a certain Poynting vector can be decomposed as

P = P
r
r+P

+
P

. This function returns one component of the Poynting vector, where component can
take either r,theta, phi; one can obtain either P
r
, P

, P

at a particular point of
(x, y, z). z0 is an oset for the z position.
x = Rsin(theta) cos(phi)
y = Rsin(theta) sin(phi)
z = z0 + Rcos(theta)
15. void Poynting UpDown(oat value, oat zposition) :
Let us consider an imaginary closed surface () that surrounds the whole FDTD computa-
tion domain but without including PML regions. This function performs Poynting energy
integration over except for a certain strip area () specied by value and zposition.
The region for is dened by the following inequality.
( ) & zposition value z zposition + value (5)
,where value and zposition are in the unit of a.
Specically, it performs the following form of recursive summation,
c
UnD
(t + t) = c
UnD
(t) +
_

E

H d

S (6)
whenever it is called by the FDTD for-loop.
You can get the summation result, c
UnD
(), via SumUpper, SumLower variables, which
are pre-dened in pFDTDvar.h. For example, SumUpper gives the integrated Poynting en-
ergy only over the upper surface with respect to the strip position. Thus, c
UnD
() =SumUpper
+ SumLower.
If value is set by 0.0, this function becomes equivalent to Poynting block() function with
the following parameter settings; size1=L
x

x
+
x
2, size2=L
y

y
+
y
2,
and size3=L
z

z
+
z
2, where for example, for the x direction, L
x
is the total
domain size,
x
and
x
+ are the left and right PML thicknesses, and is a some
small nonzero positive value.
13
16. void Poynting side(oat value, oat zposition) :
This function performs Poynting energy integration over a strip area of (See the previous
function), which is () specied by value and zposition.
13
In order to avoid direct touching with PML layers
14
Specically, it performs the following form of recursive summation,
c
side
(t +t) = c
side
(t) +
_

E

H d

S (7)
whenever it is called by the FDTD for-loop.
You can get the summation result, c
side
(), via SideSumx, SideSumy variables, which are
pre-dened in pFDTDvar.h. For example, SideSumx gives the integrated Poynting energy
only over the two surfaces positioned at x = L
x
/2 +
x
+ and x = L
x
/2
x
+ .
Thus, c
side
() =SideSumx + SideSumy.
17. void Poynting total() :
Let us consider an imaginary closed surface () that surrounds the whole FDTD com-
putation domain but without including PML regions. This function performs Poynting
energy integration over .
Specically, it performs the following form of recursive summation,
c
tot
(t +t) = c
tot
(t) +
_

E

H d

S (8)
whenever it is called by the FDTD for-loop.
You can get the summation result, c
tot
(), via Sumx, Sumy, Sumz variables, which are
pre-dened in pFDTDvar.h. For example, Sumx gives the integrated Poynting energy only
over the two surfaces positioned at x = L
x
/2 +
x
+ and x = L
x
/2
x
+ . Thus,
c
tot
() =Sumx + Sumy + Sumz.
Note that this function cannot be used together with Poynting block().
18. void total E energy() :
Let us consider a volume (1), the whole FDTDcomputation domain but without including
PML regions (=1 is surrounded by ). This function performs the volume integration of
total electric-eld energy at the present FDTD time step (t).
c
E
(t) =
_ _ _
1
2
[

E[
2
dx dy dz (9)
The integration result is printed in a text le, total eEE.en. Called repeatedly in the
FDTD for-loop, c
E
(t) will be appended in the same total eEE.en le together with t.
Note that automatically takes
eff
within the Drude metal:
14

eff
() Re
_
d()
d
_
=
b
+

2
p
(
2

2
0
)
(
2
+
2
0
)
2
(10)
Here, is the frequency at which the eective susceptibility (
eff
) is being calculated and
can only be set in real space param() function Thus, when metal is included in the
epsilon structure, one should use real space param() ahead of using void total E energy().
The similar use of the eective susceptibility is applied for other energy functions, such
as void total E energy block(), void total EM energy(), and void total EM energy block().
14
See Jackson Chap. 6.8.
15
19. void total E energy block(oat centerx, oat centery, oat centerz, oat size1, oat size2,
oat size3) :
This function performs volume integration of the electric eld energy density at the present
FDTD time step (t), where the volume is dened by a block whose center and side lengths
are denoted as centerx, centery, centerz, size1, size2, size3, respectively.
Specically, it performs the following summation,
c
Eb
(t) =
_ _ _
block
1
2
[

E[
2
dx dy dz (11)
whenever it is called, for example, inside a for loop.
The integration result is printed in a text le, total eEE b.en. Called repeatedly in the
FDTD for-loop, c
Eb
(t) will be appended in the same total eEE b.en le together with t.
20. void total EM energy() :
Let us consider a volume (1), the whole FDTDcomputation domain but without including
PML regions (=1 is surrounded by ). This function performs the volume integration of
total electric-eld energy at the present FDTD time step (t).
c
EM
(t) =
_ _ _
1
2
_
[

E[
2
+ [

H[
2
_
dx dy dz (12)
The integration result is printed in a text le, total eEE uHH.en. Called repeatedly in the
FDTD for-loop, c
EM
(t) will be appended in the same total eEE uHH.en le together with
t.
21. void total EM energy block(oat centerx, oat centery, oat centerz, oat size1, oat size2,
oat size3) :
This function performs volume integration of the electromagnetic eld energy density at
the present FDTD time step (t), where the volume is dened by a block whose center
and side lengths are denoted as centerx, centery, centerz, size1, size2, size3, respectively.
Specically, it performs the following summation,
c
EMb
(t) =
_ _ _
block
1
2
_
[

E[
2
+ [

H[
2
_
dx dy dz (13)
whenever it is called, for example, inside a for loop.
The integration result is printed in a text le, total eEE uHH b.en. Called repeatedly in
the FDTD for-loop, c
EMb
(t) will be appended in the same total eEE uHH b.en le together
with t.
22. void total E2() :
This function performs the volume integration of electric-eld intensity at the present
FDTD time step (t) over the volume 1.
c
I
(t) =
_ _ _
[

E[
2
dx dy dz (14)
The integration result will be printed in a text le, total EE.en. Called repeatedly in the
FDTD for-loop, c
I
(t) will be appended in the same total EE.en le together with t.
16
23. void Drude energy loss in block(oat centerx, oat centery, oat centerz, oat size1, oat
size2, oat size3) :
This function performs volume integration of

E

J term at the present FDTD time step
(t), where the volume is dened by a block whose center and side lengths are denoted
as centerx, centery, centerz, size1, size2, size3, respectively.
Specically, it performs the following summation,
T
D
(t) =
_ _ _
block

E

J dx dy dz (15)
whenever it is called, for example, inside a for loop.
The integration result is printed in a text le, Drude E loss.en. Called repeatedly in the
FDTD for-loop, T
D
(t) will be appended in the same total eEE.en le together with t.
24. void max E Energy detector(oat centerx, oat centery, oat centerz, oat size1, oat size2,
oat size3) :
This function nds out the maximum of the electric eld energy ([

E(t)[
2
) at the present
FDTD time, t, within the volume dened by a block whose center and side lengths are
denoted as centerx, centery, centerz, size1, size2, size3, respectively.
The result is printed in a text le, max detect.dat, along with t and (max i, max j, max k),
the FDTD time step and the space coordinate where the maximum has been obtained,
respectively. Called repeatedly in the FDTD for-loop, the results will be appended in the
same max detect.dat le
17
4 Functions needed to print out results
1. int get period in update(oat w n) :
Get a time length of one optical cycle (period) corresponding to the given normalized
frequency of w n, as the unit of the FDTD time stepping. This function can be used, for
example, to get time-average of some eld data over one optical cycle.
2. void out epsilon(char *plane, oat value, char *name) :
Print out a 2-D text matrix containing one of cross sections of the whole FDTD structure.
*plane can take one of the followings, x,y, and z. value determines the location of the
plane on which a cross sectional image of the FDTD epsilon structure is to be obtained.
For example, a structure image on the z = 0 plane will be obtained with parameter
settings of *plane=z and value=0. The unit of value is the FDTD unit length, a. *name
requires the output le name including the le extension.
3. void out epsilon periodic(char *plane, oat value, char *name, int m h, int m v) :
This function performs basically the same tasks as out epsilon() except for the fact that
the epsilon image can be expanded to include multiple periods. m h and m v (both
are nonnegative integers) specify the number of periods for the horizontal and vertical
directions, respectively.
4. void out epsilon projection(char *dirc, char *name) :
This function generates a 2-D text matrix data for the epsilon structure as is seen from
the top (In the present FDTD version, only *dirc = +z can be used). *name requires
the output le name including the le extension.
5. void out plane(char *component,char *plane,oat value,char *lastname) :
This function takes a snap shot of one of eld components or their manipulations in a
plane dened by *plane = value. The result will be printed out as a 2-D text matrix.
(a) *component can be one of the followings :
Ex : x component of the electric eld

E
Ey : y component of the electric eld

E
Ez : z component of the electric eld

E
Hx : x component of the magnetic eld

H
Hy : y component of the magnetic eld

H
Hz : z component of the magnetic eld

H
Jx : x component of the current density

J
15
Jy : y component of the current density

J
Jz : z component of the current density

J
J.E :
16

J

E
E2 : [

E[
2
= [E
x
[
2
+ [E
y
[
2
+ [E
z
[
2
H2 : [

H[
2
= [H
x
[
2
+ [H
y
[
2
+ [H
z
[
2
Sx : x component of Poynting vector. E
y
H
z
E
z
H
y
15

J is dened by the Maxwell-Ampere equation,



J =

H

D/t
16
The work done per unit time per unit volume by the eld. See Jackson Chap. 6.7.
18
Sy : x component of Poynting vector. E
z
H
x
E
x
H
z
Sz : x component of Poynting vector. E
x
H
y
E
y
H
x
LogE2 : log
10
[

E[
2
LogH2 : log
10
[

H[
2
EM Energy :
17 1
2
_
[

E[
2
+[

H[
2
_
E Energy :
1
2
[

E[
2
Ex2Ey2 : [E
x
[
2
+[E
y
[
2
Ey2Ez2 : [E
y
[
2
+ [E
z
[
2
Ez2Ex2 : [E
z
[
2
+[E
x
[
2
LogEx2Ey2 : log
10
([E
x
[
2
+[E
y
[
2
)
LogEy2Ez2 : log
10
([E
y
[
2
+ [E
z
[
2
)
LogEz2Ex2 : log
10
([E
z
[
2
+ [E
x
[
2
)
Hx2Hy2 : [H
x
[
2
+ [H
y
[
2
Hy2Hz2 : [H
y
[
2
+[H
z
[
2
Hz2Hx2 : [H
z
[
2
+[H
x
[
2
LogHx2Hy2 : log
10
([H
x
[
2
+[H
y
[
2
)
LogHy2Hz2 : log
10
([H
y
[
2
+[H
z
[
2
)
LogHz2Hx2 : log
10
([H
z
[
2
+[H
x
[
2
)
(b) *plane and value : determines the location of the plane on which you want to look
at the FDTD result.
(c) *lastname : requires the le extension for the output. The le name is automatically
written using the FDTD time step.
6. void out plane periodic(char *component, char *plane, oat value, char *lastname, int m h,
int m v) :
This function performs basically the same tasks as out plane() except for the fact that
the *component image can be expanded to include multiple periods. m h and m v (both
are nonnegative integers) specify the number of periods for the horizontal and vertical
directions, respectively.
When you are using the periodic boundary condition with the normalized wavevector
setting of (

k
x
,

k
y
), this function actually performs the following operations to obtain the
eld data *component lying outside the original calculation domain.
A(x + m h

R
x
+ m v

R
y
) = exp[2i(m h

k
x
+ m v

k
y
)]A(x) (16)
where A is one of *component and

R
x
(

R
y
) is the lattice vector along the x (y) axis.
7. void out plane time average(char *component,char *plane,oat value, long start, long end,
oat ***eld avg, char *lastname) :
This function performs time average (from start to end) of 2-D matrix data of *component.
In the upper part of the main function, at each use of this function, you have
to declare one 2-D array variable, to which the eld data is being added during
17
For the Drude metal, becomes the eective susceptibility, see total EM energy block().
19
[start, end] and at t =end the summed result will be divided by (end - start) to get the
time average. For example, you can declare a 2-D array by
oat **2deld;
Then, you have to link this 2-D array into the input argument, ***eld avg, as follows.
out plane time average( . . . ,&2deld, .)
An output le name is determined by combining start time and the le extension, *last-
name.
8. void out plane projection(char *component,char *dirc, char *lastname, int k shift) :
This function generates a 2-D text matrix data for the eld computation result (*com-
ponent) as is seen from the top (In the present FDTD version, only *dirc = +z can be
used). *lastname requires the le extension for the output. The le name is automatically
written using the FDTD time step.
One another feature that diers from out epsilon projection() function is that one can
control the vertical distance from the genuine surface of the structure; k shift (in the unit
of the FDTD grid) measures the constant distance between the surface and the imaging
plane. So, what we do here is more like real NSOM
18
measurement. With k shift =0, the
eld image is obtained as the NSOM tip moves on the sample surface in contact.
9. void out plane time average projection(char *component,char *dirc, long start, long end, oat
***eld avg, char *lastname, int k shift) :
This function combines two features of out plane time average() and out plane projection()
functions. So, you can perform time average (from start to end) of 2-D projection data of
*component, which has been obtained at a distance of k shift from the structure surface.
10. void out point(char *component,oat x,oat y,oat z,long ti,long tf,char *name) :
This function detects a eld component (*component) at a certain point of (x, y, z) during
[ti, tf]. The result will be printed out as a one-column text matrix having a le name of
*name.
(a) *component : All the eld manipulations that can be used in void out plane() function
are available.
(b) x,y,z : space coordinates in the unit of a.
(c) ti, tf : ti is an initial time and tf a nal time in the unit of the FDTD time stepping.
(d) *name : output le name
11. void out several points(char *component,oat zposition, oat xside, oat yside, int pNx, int
pNy, long ti,long tf,char *name) :
This function detects a eld component (*component) at several points of x, y, z during
[ti, tf]. Here, x, y, z are dened by
x = x
i
= xside/2 +i(xside/pN
x
) where i = 0, , pN
x
(17)
y = y
j
= yside/2 + j(yside/pN
y
) where j = 0, , pN
y
z = zposition
18
Near-eld Scanning Optical Microscope
20
The result will be printed out as a multi-column text matrix having a le name of *name,
in which each column corresponds to the data for each space position of (x
i
, y
j
).
(a) *component : All the eld manipulations that can be used in void out plane() function
are available.
(b) zposition : z coordinate of the detection plane on which (x
i
, y
j
) are located, in the
unit of a.
(c) xside, yside : the size of the detection plane, xside yside
(d) pNx, pNy : Total number of detection points will be (pNx+1)(pNy+1).
(e) ti, tf : ti is an initial time and tf a nal time in the unit of the FDTD time stepping.
(f) *name : output le name
12. oat grid value(char *component,int i,int j,int k) :
This function returns *component at a certain space position of (i,j,k) where input val-
ues should be in the unit of the FDTD grid. This enables lower level manipulation
of the eld data.
13. void print energy() :
After nishing the whole FDTD time update, this function can be used to print out
VQSQ.en le, which includes several Poynting integration results, such as Sumx, Sumy,
Sumz, SideSumx, SideSumy, SumUpper, and SumLower.
21
5 Functions needed for far-eld simulation
All the functions below have been introduced for ecient simulation of far-eld radiation from
2-D photonic crystal nanocavities.[15] However, the same algorithm can also be applied to a
number of dierent structures including microdisks. For further details, see Sec. 7.5 and the
following paper:
Se-Heon Kim, Sun-Kyung Kim, and Yong-Hee Lee, Vertical beaming of wavelength-
scale photonic crystal resonators, Phys. Rev. B, Vol.73, 235117 (2006).
1. void far eld param(oat *OMEGA, oat DETECT) :
This function performs the recursive discrete Fourier transformation (DFT) concurrently
with the FDTD time stepping to get the exact phasor data of the in-plane near-eld data.
The near-eld data is obtained from a plane at z=DETECT. This function calculates n
number of phasor data for n number of frequency components dened in a 1-D array of
*OMEGA.
This function should be included inside the FDTD for-loop. A typical time length for one
complete DFT is about 100 200 optical cycles, but it is also dependent on the Q factor
of a possible resonant mode.
This function will create, for example, a 2-D array of Ex cos[i][j][m] to perform the DFT.
19
Here, [i],[j] indices are related to (x, y) positions and [m] refers to the frequency component.
The other function in the below should be used after nishing the FDTD time update.
2. void print amp and phase(int mm) :
Print out amplitude data and phase data for the calculated near-eld phasor data as 2-D
text matrix les; for example, output le names will be jEx amp and jEx phase with a le
extension of .ap(mm), where mm means the (mm+1)-th frequency component.
Note that the output occurs directly from the internal memories, such as
Ex cos[i][j][m].
3. void print real and imag(int mm) :
Print out real components and imaginary components of the calculated near-eld phasor
data as 2-D text matrix les; for example, output le names will be tEx real and tEx imag
with a le extension of .ri(mm), where mm means the (mm+1)-th frequency component.
Note that the output occurs directly from the internal memories, such as
Ex cos[i][j][m].
4. void print real and imag 2n size(int NROW, int mm) :
This function performs nearly the same tasks as print real and imag() function does, except
for the fact that the output matrix le will have NROW NROW size with null values
20
,
where NROW should be in the form of 2
n
.
For example, output le names will be Ex real and Ex imag with a le extension of .ri(mm),
where mm means the (mm+1)-th frequency component. These output les will be
used as input les for far eld FFT() function.
19
See Eq. 94
20
See Sec. 7.5.3
22
Note that the output occurs directly from the internal memories, such as
Ex cos[i][j][m].
5. void make 2n size(int NROW, int mm) :
This function reads t-les such as tEx real and tEx imag to create Ex real, Ex imag les
with NROW NROW size as in the same way print real and imag 2n size() does.
6. void far eld FFT(int NROW, oat NA, oat Nfree, oat *OMEGA, int mm) :
After reading NROW NROW sized near-eld data (such as Ex real and Ex imag), this
function performs actual far-eld simulations based on the near- to far-eld transforma-
tion algorithm. Here, NA is the numerical aperture of an assumed collection lens and
Nfree, refractive index of the free space. It will have a number of output les, such as
rad Ex .ri(mm), rad Ey .ri(mm), rad Et .ri(mm), rad Ep .ri(mm), and rad tot .ri(mm).
Output les having .ri(mm) extensions will have the following coordinate system.
x = sin() cos() (18)
y = sin() sin()
= sin()
Here, we give a brief description on some of output le names.
rad tot .ri(mm) : total intensity of the far-eld, [E
x
[
2
+[E
y
[
2
= [E

[
2
+[E

[
2
rad Ex .ri mm : x-polarized far-eld, [E
x
[
2
rad Ey .ri mm : y-polarized far-eld, [E
y
[
2
rad Et .ri mm : -polarized far-eld, [E

[
2
rad Ep .ri mm : -polarized far-eld, [E

[
2
7. void transform fareld(int NROW, int tnum, char *name, int mm) :
This function performs the following coordinate transformation to an output le, *name.ri
mm, having tnum tnum.
From (with les having the extension of .ri mm)
x = sin() cos() (19)
y = sin() sin()
= sin()
To (with les having the extension of .sas mm)
x = cos() (20)
y = sin()
=
Note that the output le size can be adjusted by tnum which is in the form of 2n + 1.
8. void add fareld(int tnum, char *name) :
Add all output les having the extension of .sas mm. The result will be printed in
sum.sas mm.
23
6 List of global variables
All the variables listed below can be accessed in all c les in the pFDTD package and reserved
for specic uses. Therefore, one should avoid using the same variable name for private purpose.
oat shift
int SpecN
long t : The FDTD time step
oat Sumx, Sumy, Sumz, SideSumx, SideSumy
oat SumUpper, SumLower
const gsl rng type * rng type
gsl rng * rng r
int isize, jsize, ksize
int pmlil, pmlir, pmljl, pmljr, pmlkl, pmlkr
int lattice x, lattice y, lattice z
int lattice nz
oat xsize, ysize, zsize
oat nz start, nz end
oat xcenter, ycenter, zcenter
oat kx, ky, kz
oat orderxl, orderyl, orderzl
oat orderxr, orderyr, orderzr
oat sig axl, sig ayl, sig azl
oat sig axr, sig ayr, sig azr
oat ds x, ds y, ds z, dt
oat *ds nz
oat S factor : Numerical stability factor
oat pi, eo, uo, ups, light speed
int misize, mjsize, mksize
int pisize, pjsize, pksize
int cisize, cjsize, cksize
int xparity, yparity, zparity
oat wave vector x, wave vector y
int use periodic x, use periodic y
char ***position
oat ***epsilonx,***epsilony,***epsilonz
oat ***mepsilon,***momega,***mgamma
oat ***Ex,***Ey,***Ez
oat ***Jx,***Jy,***Jz : used for metal update
oat ***Hx,***Hy,***Hz
oat ***Dx,***Dy,***Dz : used for PML
oat ***Bx,***By,***Bz
oat ***iEx,***iEy,***iEz
oat ***iJx,***iJy,***iJz
oat ***iHx,***iHy,***iHz
oat ***iDx,***iDy,***iDz
oat ***iBx,***iBy,***iBz
oat *aax,*aay,*aaz
oat *bbx,*bby,*bbz
24
oat *ccx,*ccy,*ccz
oat ***ddx,***ddy,***ddz
oat *eex,*eey,*eez
oat *x,*y,*z
oat *ggx,*ggy,*ggz
oat *hhx,*hhy,*hhz
oat *iix,*iiy,*iiz
oat *jjx,*jjy,*jjz
oat *kkx,*kky,*kkz
oat *llx,*lly,*llz
oat ***Ex cos, ***Ex sin
oat ***Ey cos, ***Ey sin
oat ***Hx cos, ***Hx sin
oat ***Hy cos, ***Hy sin
oat back epsilon
oat global W : the normalized frequency to be used in the eective susceptibility,
eff
.
25
7 Appendix I - Short Course :
The Finite-Dierence Time-Domain Method
You can calculate the properties of water, but it makes so much more sense just to
measure them.
- Lev Landau
Finite Nature is the assumption that, at some scale, space and time are discrete and
that the number of possible states of every nite volume of space-time is nite.
- Edward Fredkin
You can obtain analytic solutions for microdisks[2] and micropillars[3], because such res-
onators have simple circular symmetry. For photonic crystal (PhC) cavities, however, it would
be impossible to get any analytic solution. Wavelength-scale small air-holes xed around the
cavity makes the boundary value problem extremely dicult. Moreover, ne structural tunings
are critical in the usual design process to get desired cavity properties such as the Q factor
optimization.[4, 5] Therefore, the use of numerical simulations are inevitable in the design of
these complex systems. The nite-dierence time-domain method (FDTD) is one example,
which is widely used in the eld of the PhC.
In the FDTD method, space and time are discretized as x and t, and the electric-eld
vector E(ix, jy, kz) and the magnetic-eld vector H(ix, jy, kz) locating at each
space-grid (i, j, k) are updated as a function of time t = nt, satisfying the Maxwell equations.
As will be discussed in Sec. 7.1, FDTD results become more accurate as x and t approach
to the limit of zero. Choosing proper space-time grids, x and t, within the maximum
permissible computer memory,
21
one can calculate the electro-magnetic elds as a function of
time. Thus, the FDTD method has been used to obtain a variety of optical properties such as
resonant frequency, near-eld pattern, quality factor, and so on.[6] If the structure has some
structural symmetry such as mirror reection symmetry and discrete translational symmetry,
one can improve the calculation speed by imposing special symmetry conditions on the FDTD
grids. For more detailed discussions, you may read the most famous book written by Taove.[1]
In Sec. 7.1, we will describe basic principles of the FDTD, begining with a description on
how to discretize the one-dimensional scalar wave equation, and then the numerical dispersion,
followed by the numerical stability. Then, we will present how to solve the Maxwell equations
on the basis of the nite-discretization. In the last part of Sec. 7.1, very useful relations which
enable us to translate the FDTD results to the mks (meters, kilograms, seconds) units in real
world. The basic routines of the FDTD computations for various optical properties of the PhC
cavities will also be described in detail.
Then, as applications of the FDTD method, we shall make detailed explanations on the
contour FDTD and the far-eld computation of the PhC resonant modes. In real fabricated
samples, various structural defects such as elongation of the air-hole, shift of the air-hole po-
sition, and surface roughness are inevitable due to the imperfect nanofabrication technology.
Thus, a direct comparison of the experimentally obtained data with the corresponding FDTD
simulations based on the ideal structure would not be easy.
22
However, if the corresponding
20
This appendix is based on Chap. 2 in Se-Heon Kims PhD Thesis.
21
As will be discussed in the next section, there should be a denite relation between x and t for numerical
stability.
22
For example, comparsions of the measured resonant wavelengths with the FDTD results are daily-routines.
26
scanning electron microscope (SEM) image can be used as the FDTD structural input data,
then one can truthfully compensate for any fabrication imperfections. Such jobs can be done
with the Contour FDTD. We shall deal with the contour FDTD method in Sec. 7.4.
On the other hand, it is necessary to simulate the far-eld radiation pattern in the design
of directional photonic crystal emitters. In general, direct application of the FDTD method
would be dicult because of the limited computer memory size and time. We shall explain how
one can eciently obtain the far-eld radiation by combining the 3-D FDTD method and the
near- to far-eld transformation formulae. In Sec. 7.5, we will describe the far-eld simulation
method and show simulation results.
7.1 The Finite-Dierence Time-Domain Method
In numerical simulations, continuous space and time variables x and t should be discretized
as x and t. For usual one-variable (x) dierential equations, x can be arbitrarily small.
However, for multi-variable (x,t) dierential equations such as in the Maxwell equations, there
exists a special relation between x and t to satisfy the numerical stability condition. In
this section, we will show how one can simulate the 1-D scalar wave equation on the basis of
the nite-discretization. From this simple example, you will learn all important concepts which
are needed to understand the 3-D FDTD method of the Maxwell equations. Then, we will
explain the 3-D FDTD method beginning with the famous Yee cell [7] which indicates how
the electric-eld vector and the magnetic-eld vector should be arranged in space. In the last
part of this section, we will explain very useful conversion rules which relate the FDTD results
to the real world values.
7.1.1 Numerical simulation of the 1-D scalar wave equation
It has been well knwon that the general solution u(x, t) of the following 1-D scalar wave equation

2
u
t
2
= c
2

2
u
x
2
(21)
can be represented by a combination of the following functions F and G.
u(x, t) = F(x + ct) +G(x ct) (22)
If one inserts the plane-wave solution of e
i(tkx)
into Eq. (21), the dispersion relation
2
= c
2
k
2
can be obtained. Since the phase velocity v
p
is a constant,
v
p
=

k
= c (23)
the propagating wave is dispersionless. This fact will be used in Sec. (7.1.2) to quantify the
numerical dispersion arising from the nite nature.
Now, lets nd out corresponding nite-dierence representations for the second derivatives
in Eq. (21). From the Taylors series, neglecting the terms that are higher order than the second
in the derivatives,
u(x
i
+ x)[
tn
= u[
x
i
,tn
+x
u
x
[
x
i
,tn
+
(x)
2
2

2
u
x
2
[
x
i
,tn
(24)
Adding u(x
i
+ x)[
tn
and u(x
i
x)[
tn
, the second partial derivative of u with respect to x
can be represented as
27

2
u
x
2
=
_
u(x
i
+ x) 2u(x
i
) + u(x
i
x)
(x)
2
_
tn

u
n
i+1
2u
n
i
+u
n
i1
(x)
2
(25)
Similarly, the second partial derivative with respect to t

2
u
t
2
[
x
i
,tn
=
u
n+1
i
2u
n
i
+ u
n1
i
(t)
2
(26)
Inserting the above two results into Eq. (21), we obtain the nite-dierence expression for the
1-D wave equation.
u
n+1
i
= (ct)
2
_
u
n
i+1
2u
n
i
+ u
n
i1
(x)
2
_
+ 2u
n
i
u
n1
i
(27)
In order to implement this equation in the computer simulation, we need two 1-D arrays,
u
(1)
i
and u
(2)
i
for two dierent time steps. It is assumed that the spatial solutions at times of
n 1 and n, are already stored in the arrays. Then, to compute the solution for the next
time step, n + 1, one can use the above dierence equation (27). We need two consecutive
data for the next solution because the wave equation (21) contains the second derivatives with
respect to both space and time coordinates. As will be shown in the below, the nite-dierence
solution approaches to the exact analytic solution (22) as x and t goes to zero. Also, you
may guess that, by the fact that only two nearest neighbor data (u
i1
and u
i+1
) are related
for the solution u
i
, there wolud be a special relation between x and t. For example, if one
choose x smaller than ct, a light propagation distance in t, the propagation of the light
cannot be properly described. In Sec. 7.1.3, we will show that x and t should satisfy the
relation ct x for the numerical stability.
In this section, lets choose ct = x. Then Eq. (27) is simplied as
u
n+1
i
= u
n
i+1
+u
n
i1
u
n1
i
(28)
One can easily prove that the solution for this nite-dierence equation is
23
equivalent to the
nite-dierence representation of the exact analytic solution (22).
u
n+1
i
= F[ix + c(n + 1)t] +G[ix c(n + 1)t] (29)
It is very surprising to get the exact solution numerically in spite of using the second order ap-
proximation.
24
In fact, such a surprising result occurs only in the 1-D wave equation. Generally,
there always should be some small discrepancies due to the numerical errors.
7.1.2 Numerical dispersion
Inserting the plane-wave solution e
i(tkx)
into the 1-D wave equation (27), one obtains the
dispersion relation (k). It should be noted that as Eq. (27) becomes more accurate, the
propagation becomes less dispersive [Eq. (23)].
The 1-D plane-wave expressed in terms of nite-dierences is
u
n
i
= e
i(nt

kix)
(30)
23
For the detailed proof, See Chap. 2 in the Taoves book [1].
24
Therefore, t = x/c is called magic step.
28
where

k is assumed to be complex such that

k =

k
real
+i

k
imag
. Now inserting this into Eq. (27),
we get
e
it
=
_
ct
x
_
2
(e
i

kx
2 + e
i

kx
) + 2 e
ix
(31)
Rearranging terms,
cos(t) =
_
ct
x
_
2
[cos(

kx) 1] + 1 (32)

k =
1
x
cos
1
1 +
_
x
ct
_
2
[cos(t) 1] (33)
As shown previously, if one inserts the magic step condition of ct = x, we get

k =
/c = k (dispersionless). Moreover, if one takes both t and x to the limit of zero,

k =
1
x
cos
1
1 +
_
x
ct
_
2
[1
(t)
2
2
1]
=
1
x
cos
1
[1
1
2
_

c
_
2
(x)
2
]
1
x
(kx) = k (34)
we get

k = k, that is, the solution asymptotically goes to the exact solution.
25
In this way, as
the nite assumption disappears, the resultant solution becomes less dispersive and more exact!
For more general discussions, please refer to the Taoves book[1]. Keeping t satisfying
the numerical stability condition, it can also be shown that the numerical disperison vanishes
as x goes to the limit of zero.
7.1.3 Numerical stability
To begin with, lets dene what the term stable means. The meaning that the numerical
simulation is stable is that the numerical solution is bounded by nite values. When x
and t are not chosen to satisfy the stability condition, we will see unstable behavior of the
solution, that is, the solution u
n
i
can increase or decrease unbounded (diverge!). In order to
analyze stability in the time domain, lets insert the same plane-wave solution used in the
previous Eq.(30), in which only is treated as complex, while

k is assumed to be real but can
be dierent from the exact wavevector k.
26
u
n
i
= e
i( nt

kix)
(35)
By inserting the assumed solution into Eq. (27), from Eq. (32) we get
cos( t) =
_
ct
x
_
2
[cos(

kx) 1] + 1 (36)
=
1
t
cos
1

_
ct
x
_
2
[cos(

kx) 1] + 1 =
1
t
cos
1
() (37)
25
Lets assume that t < 1, which is, in fact, a basic condition for t for a given frequency . Then, the
wavevector

k becomes real number.
26
Keeping stability condition in the space domain, we will nd stability condition in the time domain.
29
Here, denoting S ct/x (Courant stability parameter), we get
= S
2
[cos(

kx) 1] + 1 (38)
For all possible real

k, should satisfy 1 2S
2
1.
(1) When 1 1 (0 S 1) :
Since
imag
= 0, the solution becomes stable.
(2) 1 2S
2
1 (S > 1) :
Since
imag
,= 0, the solution becomes unstable.
Therefore, we get the condition for the numerical stability.
S =
ct
x
1 t
x
c
(39)
7.2 Yee cell and the 3-D FDTD
Now, lets rewrite the Maxwell equations in terms of nite-dierences.
D = 0 (40)
B = 0 (41)
E
t
=
1

H (42)
H
t
=
1

E (43)
Here, a source free region ( = J = 0) has been assumed.
27
In the FDTD method, only two
curl equations are to be used since the other two are automatically satised thanks to the
divergence-free nature of the FDTD Yee cell.[8] Although the equations contain only the rst
derivatives, since there are 6 unknowns (E
x
, E
y
, E
z
, H
x
, H
y
, H
z
), the nite-dierence scheme is
not as simple as one may guess; Proper micro-positioning of all the eld components inside the
unit cell (i, j, k) is very important. 1/2-grid position dierences should be considered to satisfy
the Maxwell equations in the unit cell.
This idea has been successfully implemented in the structure of the Yee cell, which was
originally proposed by Kane Yee in 1966[7]. In Fig. 1, we have shown the micro-conguration
of the 6 eld components in the same (i, j, k) cell. All the eld components shown here have the
same memory position (i, j, k) as E
x
[i][j][k]. However, if we represent the eld position precisely
upto 1/2-grid, then, for example, E
x
[i][j][k] can be represented as E
x
[
i+1/2,j,k
. In the same way,
it can be seen that H
x
[i][j][k] H
x
[
i,j+1/2,k+1/2
. Note that the unit Yee cell shown in Fig. 1
lls in the whole 3-D space without voids. We have also assumed a rectangular parallelepiped
unit cell, in which the side lengths are dierent (x
i
, y
j
, z
k
) for dierent positions (i, j, k)
28
Now we represent the rst derivatives in the Maxwell equations in terms of the nite-
dierences.
29
27
However, in order to introduce the absorbing boundary condition such as the PML(Perfectly Matched Layer),
insertion of the imaginary current vectors such as the electric current vector (J) and the magnetic current vector
(M) is necessary. For more detailed discussions, see Taove[1].
28
When the structure to be investigated has a local ne structure, one can eciently simulate the FDTD,
saving computer memory and time.
29
Higher order terms than O(x
2
), O(t
2
) are neglected.
30
Figure 1: Structure of the Yee cell locating at (i, j, k). 6 eld components
(E
x
, E
y
, E
z
, H
x
, H
y
, H
z
) are arranged around (i, j, k) with 1/2-grid dierences satisfying the
Maxwell equations.
u
x
(ix, jy, kz, nt) =
u
n
i+1/2,j,k
u
n
i1/2,j,k
x
(44)
u
t
(ix, jy, kz, nt) =
u
n+1/2
i,j,k
u
n1/2
i,j,k
t
(45)
Using these representations, for example, one component of the following curl equation
H
z
t
=
1

_
E
x
y

E
y
x
_
(46)
can be expressed as
H
z
[
n+1/2
i+1/2,j+1/2,k
H
z
[
n1/2
i+1/2,j+1/2,k
t
=
1

i+1/2,j+1/2,k
_
E
x
[
n
i+1/2,j+1,k
E
x
[
n
i+1/2,j,k
y
j

E
y
[
n
i+1,j+1/2,k
E
y
[
n
i,j+1/2,k
x
i
_
(47)
Rearranging the terms,
H
z
[
n+1/2
i+1/2,j+1/2,k
= H
z
[
n1/2
i+1/2,j+1/2,k
+
t

i+1/2,j+1/2,k

_
1
y
j
(E
x
[
n
i+1/2,j+1,k
E
x
[
n
i+1/2,j,k
)
1
x
i
(E
y
[
n
i+1,j+1/2,k
E
y
[
n
i,j+1,k
)
_
(48)
31
Expressing these in terms of memory position,
H
z
[i][j][k] = H
z
[i][j][k] +
t
[i][j][k]

_
1
y[j]
(E
x
[i][j + 1][k] E
x
[i][j][k])

1
x[i]
(E
y
[i + 1][j][k] E
y
[i][j][k])
_
(49)
Similarly, the FDTD update equation for the E
z
component is
E
z
[
n+1
i,j,k+1/2
= E
z
[
n
i,j,k+1/2
+
t

i,j,k+1/2

_
2
(y
j1
+y
j
)
(H
x
[
n+1/2
i,j+1/2,k+1/2
H
x
[
n+1/2
i,j1/2,k+1/2
) (50)

2
(x
i1
+x
i
)
(H
y
[
n+1/2
i+1/2,j,k+1/2
H
y
[
n+1/2
i1/2,j,k+1/2
)
_
Note that there is a 1/2-time dierence in the update equations for the E-eld data and
H-eld data (See Eq. (48) and Fig. (51)). Therefore, sequential updates of the E-eld data
and the H-eld data complete one FDTD time stepping; At a particular time point (n), E-eld
data are updated and stored in memory using H-eld data previously (n 1/2) stored in the
memory. Then (at time of n + 1/2), H-eld data are updated and stored in memory using
the E-eld data just computed in the previous. As this process continues, we get complete
information on the electromagnetic-elds in space and time. For the remaining parts of the
eld update equations, please refer to the Taoves book[1].
Finally, we would like to note a stability condition for the 3-D FDTD method.
30
Three-
dimensional version of Eq. (39) is as follows.
t
1
c
_
1
(x)
2
+
1
(y)
2
+
1
(z)
2
(51)
where x is the minimum edge length (grid size) along the x direction (similarly, for other
directions).
7.3 Real world vs. FDTD space
In this section, we will derive useful relations which enable us to convert FDTD results into the
corresponding values in real world. We have assumed anisotropic (x, y, z) but uniform
FDTD grids. t has been chosen to guarantee the Courant stability condition (51).
(1) Size of the grid
In the pFDTD program,
31
there are three input values for specifying the resolution of the
grid, (lattice
x
, lattice
y
, and lattice
z
), which denotes number of grids within the unit length
1 (a)
32
along each direction. Thus, for example, the minimum grid size for x direction is
30
The proof is given in Taoves book ([1], Chap. 4).
31
The basic backbone of the pFDTD was coded by Guk-Hyun Kim. Later, based on his FDTD ver. 3.4, Se-
Heon Kim modied and added many new functions (anisotropic grid, far-eld simulation, and so on). Recently,
ver. 8.11 has been released (as of Aug 8, 2008).
32
In case of photonic crystal structures, it is natural to choose the lattice constant as the unit length.
32
1(a)/(lattice
x
). However, such a rational expression can cause unavoidable numerical errors.
Therefore, by multiplying the least common multiplier (l.c.m.) of the three integers, sizes of
the grids are chosen to be
The smallest integers of the ratio
1
lattice
x
:
1
lattice
y
:
1
lattice
z
(52)
Now we dene a new length unit, q, by denoting the above three ratios as x(q), y(q),
z(q). Thus, q becomes the minimum unit of the size for the grid.
33
Converting the above three values into the lengths in real world is simple task. If the lattice
constant is a(m),
34
then
x(m) =
a(m)
lattice
x
, y(m) =
a(m)
lattice
y
, z(m) =
a(m)
lattice
z
(53)
(2) The speed of light
In real world, the speed of light c is given by a constant of 3 10
8
(m/sec). In the FDTD
space, the speed of light is also expressed as the same value 3 10
8
(m/sec). It should be
noted that the only assumptions of the FDTD method are discretizations of space and time
coordinates.
(3) Size of the time step
As discussed in the previous, the time step t is chosen to satisfy the Courant stability
condition [Eqs. (39) and (51)]. Let o be 1/(ct) with such t,
35
then, o should satisfy the
following inequality.
o >

1
(x)
2
+
1
(y)
2
+
1
(z)
2
(54)
Since x, y, and z are in the unit of q, the unit of o is q
1
. The unit of t can be
represented as one FDTD time stepping (1 update).
t(sec q m
1
) = 1(update) =
1
co(q
1
)
(55)
where c = 3 10
8
(m/sec). Rearranging the above term, we get
c =
_
1
o
_
q
(update)
(56)
Therefore, in the FDTD space, a plane-wave having a speed of c proceeds (1/o) q per 1
update.
In real world, the size of the time step can be expressed in the unit of sec. by converting o
into the unit of m
1
and by using Eq. (55)
t(sec) =
1
3 10
8
(m/sec) o(m
1
)
(57)
33
For example, when latticex = 20, latticey = 20, latticez = 30, the smallest integers of the ratio, 1/20 : 1/20 :
1/30, becomes 3 : 3 : 2, sizes of the grids are x = 3(q), y = 3(q), and z = 2(q).
34
Here, we get a relation between q and m(meter), x q = a m / latticex.
35
The S in this section should be distinguished from the Courant parameter in Eq. (39)
33
(4) Normalized frequency
Since the normalized frequency is dimensionless, it should be the same in both spaces. That
is,

n
=
a(q)
(q)
=
a(m)
(m)
=
a(u)
(u)
(58)
where u is the minimum unit for counting number of memory cells. More specically, the
relations between u and q are as follows.
36
a(u) = lattice
x
(u)
a(q) = x(q) lattice
x
(59)
(5) Wavelength in vacuum
Using the relation (58) for the normalized frequency, in the FDTD space,
(u) =
a(u)

n
=
lattice
x
(u)

n
(60)
In real world,
(m) =
a(m)

n
(61)
(6) Frequency
The angular frequency is related to the wavelength in vacuum by
= ck =
2c

(62)
Reexpressing this in the unit of the FDTD space by using Eqs. (56) and (60),
(update
1
) =
2c

= 2c

n
a(q)
=
2
n
o(q
1
)a(q) 1(update)
(63)
Similary, the frequency f is
f(update
1
) =

n
o(q
1
)a(q) 1(update)
(64)
The angular frequency in real world is
(1/sec) = ck =
2c

= 2c

n
a(m)
(65)
(7) Period
The period can be simply obtained by taking inverse of the frequency f [Eq. (64)].
36
We have assumed a photonic crystal slab lying horizontally in the directions of x and y.
34
In the FDTD space,
T(update) =
2

=
o(q
1
)a(q) 1(update)

n
(66)
In real world,
T(sec) =
2

=
a(m)
c
n
(67)
(8) Uncertainty relation
In the FDTD, to excite resonant modes, we use a single pulse of light having a Gaussian
envelope in time domain.
37
In order to selectively excite a particular resonant mode, the
energy-time uncertainty plays an important role, which links the time-uncertainty T to the
frequency-uncertainty
n
.
In real world, the uncertainty relation is expressed as
T f = 1 (68)
In the FDTD space, using Eqs. (68) and (64),
(update)
_

n
o(q
1
)a(q) 1(update)
_
= 1 (69)
Simplifying,
(update)(
n
) = o(q
1
)a(q) 1(update) (70)
Thus, we get the uncertainty relation.
(9) Quality factor
The quality factor is a measure of the losses in the cavity, which is dimensionless and
independent of the resonant frequency.[6]
Q = (71)
where and are the angular frequency and the lifetime of the resoant mode, respectively.
Thus, expressing in the unit of the FDTD time stepping (update)[Eq. (63)],
Q =
2
n
o(q
1
)a(q) 1(update)
(update) (72)
The cavity lifetime can be estimated by monitoring its energy decay.
U(update) = U
0
exp((update)/) (73)
37
Or, equivalently, a Gaussian envelope in frequency domain, centered at f0 and a width of f.
35
Figure 2: (a) The scanning electron microscope image of the fabricated photonic crystal single
cell cavity formed in a free-standing GaAs slab with a single layer of InAs quantum dots. The
lattice constant, a, is 285 nm and the slab thickness is 200nm. (b) The corresponding FDTD
epsilon structure of the fabricated sample. A refractive index of the slab is chosen to be 3.5.
The spatial resolution of the FDTD is 20 grids/a. The orgin of the FDTD coordinate lies
near the center of the cavity.
7.4 Contour FDTD
In this section, we shall describe the typical procedure for the contour FDTD.
38
The PhC
structure to be investigated here is shown in Fig. 2. That is a single cell cavity formed in a
GaAs membrane having a single layer of InAs quantum dots (QDs). These InAs QDs have
an emission peak at 950nm with a full-width at half-maximum (FWHM) of 50nm at a
temperature of liquid nitrogen ( 70K). The areal density of the QD is 400 m
2
. The slab
thickness were chosen to be 200nm to support only fundamental modes of the slab (TE-like
mode).
As the rst step for the contour FDTD, we have taken a SEM image of the PhC cavity as
appeared in Fig. 2(a). From this SEM image, the lattice constant have been measured to be
285nm. However, due to the irregular shapes of the air-holes, one cannot determine the air-
hole radius. If one can reproduce the exact contour shapes of the air-holes in the FDTD epsilon
structure, then all eects caused by the imperfections can be faithfully simulated. Fig. 2(b)
shows the reproduced FDTD epsilon structure, in which the origin of the FDTD coordinate lies
near the center of the single cell cavity.
The spatial resolution of the FDTD is chosen to be isotropic and uniform, 20 grids/a.
Thus, (lattice
x
, lattice
y
, lattice
z
) = (20, 20, 20). The smallest integers of the ratio dened in
Eq. 52 become (1 q,1 q,1 q). In terms of mks units, x = y = z 14.25 nm. Then, we
should determine the time resolution t that guarantees the stability condition. According to
Eq. 54, o should be chosen larger than

1
2
+ 1
2
+ 1
2
=

3. For ease of the later calculations,


o was chosen to be 2 q
1
. Thus, in the FDTD space, a light wave will appear as it propages
a half grid per unit update time [Eq. 56. Changing the FDTD time unit t into the unit of
second, recalling that 1 q
1
= (1/14.25 10
9
)m
1
, and using Eq. 57, we get
38
Taoves new edition (The nite-dierence time-domain method, Artech House, 3rd ed.) featured our contour
FDTD.
36
t(sec) =
1
3 10
8
(m/sec) (2/14.25 10
9
)(m
1
)
2.4 10
17
(sec) (74)
This FDTD time unit is so tiny that it can easily describe the electromagnetic eld, whose
typical oscillation period for the 1 m-wavelength light is 10
15
sec. Note that 10 000 FDTD
time steps are equivalent to 2.4 ps.
7.4.1 Broadband investigation
In the beginning of the FDTD computation, yet there is no light everywhere. One of the easiest
ways to insert a seed of light is to adopt forced oscillation of the electromagnetic elds via the
current terms. Let us consider the following form of the Maxwells equations which include
both the electric current vector,

J, and the magnetic current vector,

M.

E
t
=
1


H
1

J (75)


H
t
=
1


E
1

M (76)
It should be noted that the original Maxwells equations do not contain the current vector
term

M for magnetic eld. Since there is no magnetic charge while there are electric charges.
39
In the FDTD, however, one can introduce this hypothetical current source just for our own
computational convenience. For example, one can handle J
x
component at a certain space
point to generate E
x
eld component at that point. (Eq. (75)) In the same way, one can handle
M
z
component to make H
z
elds ! When such source terms are involved in the Maxwells
equations, for example, one of the time dierence equations (Eq. (48)) for the FDTD time
update can be expanded as
H
z
[
n+1/2
i+1/2,j+1/2,k
= H
z
[
n1/2
i+1/2,j+1/2,k
+
t

i+1/2,j+1/2,k
[
1
y
j
(E
x
[
n
i+1/2,j+1,k
E
x
[
n
i+1/2,j,k
)

1
x
i
(E
y
[
n
i+1,j+1/2,k
E
y
[
n
i,j+1,k
) M
z
[
n
i+1/2,j+1,k
](77)
The most common way to excite a certain resonant mode with such current sources is to
use the following form of Gaussian envelope function overlaid on the harmonic oscillation with
a frequency of f.
(r
0
, t) = sin(2ft +) exp[(t t
0
)/t]
2
(78)
Because of the similarity with the ideal dipole source,[9] we call this Gaussian dipole source
or simply dipole source.
40
One can excite such a pulse of light at one specic point r
0
at
which the presumed mode has an antinode. (or /) can be one of the six eld components,
E
x
, E
y
, E
z
, H
x
, H
y
, and H
z
. Using the fact that exp(3
2
) 0.2%, t
0
which represents the time
for the maximum eld amplitude is usually chosen to be 3t. When the dipole source initiates,
the Gaussian envelope begins with exp(3t/t)
2
and then it reaches its maximum at t = 3t.
Therefore, the whole Gaussian source exists for 6t and the FWHM in time space is 3t.
39
Thats why we can always write

B = 0 with full condence.
40
The advantage of using the Gaussian function is that it has the same shape in the temporal and frequency
domains and therefore does not incur the ringing eect in the frequency domain.
37
Figure 3: H
z
eld data detected at a particular location (0.0, 0.3a). In order to investigate all
possible resonant modes, the H
z
Gaussian dipole source having a short time duration [T = 600
(update)] centered at
n
= 0.3 was used. (a) Amplitude of the eld as a function of the FDTD
time stepping. (b) Spectral intensity obtained by the Fourier transformation of (a)
Then, in order to investigate all possible resonant modes in the cavity, the FDTD dipole
source should have a broad spectral band. Here, we gave a H
z
Gaussian dipole source having
a short time duration [3t = T = 600 (update)] centered at
0
= 0.3 at a particular location
(0.0, 0.3a). By the time-frequency uncertainty relation [Eq. 70], with this time duration
T = 600 the uncertainty of the normalized frequency becomes
n
0.067.
The H
z
eld as a function of the FDTD time detected at the same location is shown in
Fig. 3(a). The whole time span is approximately 10 ps. One can clearly see the beating
occurs, which indicates two modes are mixed. The Fourier transformation of the result in
Fig. 3(a) clearly resolves the existence of the two modes, degeneracy split dipole modes[11].
7.4.2 Selective excitation of the mode
In order to selectively excite one of the resonant modes, the H
z
dipole source having a suciently
long time duration [T = 4500 (update)] centered at the frequency of the interesting mode
were used. This long time duration corresponds to the frequency bandwidth of
n
< 0.009,
which is smaller than the frequency separation of the two modes (
n
(2)
n
(1))/2 0.011.
The single excitation of the mode reveals a clear exponential-decay envelope from which one
can estimate the Q factor of the mode. The lifetime of the mode can be obtained by Eq. 73.
Then the Q factor can be calculated from Eq. 72. The estimated Q factors are 470 and 100
for the mode 1 and 2, respectively.
The in-plane eld distributions of the H
z
elds and the electric-eld intensities are displayed
in Fig. 5. It is interesting that the degeneracy-split dipole modes are oscillating orthogonal
to each other even in the presence of strong irregularity of the structure.[10] Note that two
degenerate pairs are indistinguishable in the limit of perfect 6-fold symmetry[11]. However, in
real fabricated samples, even tiny perturbation will introduce the degeneracy-split two modes.
To investigate the origin of such splitings would be intriguing in the context of the spontaneous
symmetry breaking.
41
41
Laughlin nicely shows the role of the spontaneous symmetry breaking in a variety of phenomena. See Ch. 4
of his book A Dierent Universe [12]
38
Figure 4: H
z
eld data detected at a particular location (0.0, 0.3a). In order to selectively
excite one of the resonant modes, the H
z
Gaussian dipole source having a long time duration
[3t = T = 4500 (update)] centered at the frequency of the resonant mode was used.
Figure 5: The near-eld information of two possible resonant modes. For each resonant mode,
H
z
elds and electric-eld intensities [E[
2
are detected in the middle of the slab. (a) Mode 1,

n
= 0.2844, = 1002 nm, and Q 470. (b) Mode 2,
n
= 0.3076, = 927 nm, and Q 100.
39
Figure 6: Geometry used for the far-eld computation. The whole calculation domain is di-
vided by the horizontal plane just above the photonic crystal slab. According to the surface
equivalence theorem, the near-eld components (E
x
, E
y
, H
x
, and H
y
) at the horizontal plane
give sucient information on the far-eld pattern in the upper domain ().
7.5 Simulation of Far-eld Radiation
To obtain the far-eld radiation pattern, we should deal with the radiation vectors that are
suciently far (r ) from a light emitter.[9] Direct application of the FDTD method would
be dicult because of the limited computer memory size and time. Here, we shall explain
how one can eciently obtain the far-eld radiation by combining the 3-D FDTD method and
the near- to far-eld transformation formulae. This method has been well known in the eld
of electronics since 1980s dealing with antenna radiation problems. V ukovic et al. applied
the FFT-based far-eld simulation algorithm to their Q factor optimization of the PhC cavity
mode.[13]
7.5.1 Surface equivalence theorem
We explain the basic concept of the ecient far-eld computation in Fig. 6. Here, we divide
the whole calculation domain by a horizontal plane located just above the PC slab. The upper
domain is bounded by an innite hemisphere. All eld components (E and H ) are assumed
to fall o as 1/r, typical of radiation elds. It is also assumed that in-plane eld components
(E
x
, E
y
, H
x
, and H
y
) detected at the horizontal plane decay exponentially as the horizontal
distance . According to the surface equivalence theorem, for the calculation of the elds inside
an imaginary closed space , the equivalent electric (J
s
) and magnetic (M
s
) currents on the
surrounding surface can substitute all the information on the elds out of the , where J
s
and
M
s
are calculated by using the following formulae.
J
s
= n H = xH
y
+ yH
x
(79)
M
s
= n E = xE
y
yE
x
(80)
Here, n is a unit normal vector on the surface. Neglecting the elds on the hemisphere, only
the in-plane eld data detected at the horizontal plane will be used for the far-eld computation.
40
7.5.2 Near- to far-eld transformation
The equivalent current vectors are used to obtain the following retarded vector potentials.
A =
o
_
s
J
s
e
ikr
4r
dS (81)
F =
o
_
s
M
s
e
ikr
4r
dS (82)
In the far-eld regime, (r R cos ), the above formulae can be simplied as
A =
o
e
ikR
4R
_
s
J
s
e
ik cos
dS
o
e
ikR
4R
N (83)
F =
o
e
ikR
4R
_
s
M
s
e
ik cos
dS
o
e
ikR
4R
L (84)
Using a relation k cos = k
x
x +k
y
y, the radiation vectors N and L are simply related by
2-D FTs.
N
_
s
J
s
e
ik cos
dS = FT(J
s
) (85)
L
_
s
M
s
e
ik cos
dS = FT(M
s
) (86)
x and y components of the radiation vectors can be represented as
N
x
(k
x
, k
y
) = FTH
y
(x, y) (87)
N
y
(k
x
, k
y
) = +FTH
x
(x, y) (88)
L
x
(k
x
, k
y
) = +FTE
y
(x, y) (89)
L
y
(k
x
, k
y
) = FTE
x
(x, y) (90)
Then, far-eld radiation patterns are obtained by calculating time-averaged Poynting energy
per unit solid angle.[9]
dP
d
= R
2
E H) n =
k
2

32
2
_

+
L

2
+

2
_
(91)
where is the impedance of free space.
7.5.3 Implementation in the FDTD
One can easily implement this algorithminto the FDTD code. During the FDTD time stepping,
the in-plane eld data (near-eld data) that contain complete information on the far-eld are
obtained. Once the FDTD computation is completed, the radiation vectors (N and L) are
calculated by the FTs. Then, these radiation vectors are used to obtain far-eld patterns
according to Eq. (91). One can use the 2-D FFT algorithm for ecient FT computations [see
Eqs. (87)-(90)]. In our FDTD simulation, the size of the computational grid was a/20 (a is the
lattice constant), and the size of the horizontal calculation domain were 16a 16a. Thus, each
41
Figure 7: Phasor information of the dipole mode in a modied single cell photonic crystal cavity.
E
x
eld components are detected in the plane with a distance of 0.55a from the surface of the
slab. The structural parameters are the same as the cavity shown in Fig. 1 of the paper[15].
(a) Modulus and (b) Phase of E
x
in-plane eld data will contain approximately 320 320 data points. In the FFT algorithm,
N N input data 1(x, y) are transformed to the output matrix data O(f
x
, f
y
) with the same
N N size, where f is k/2.[14] Assume that N unit cells in the 1(x, y) data correspond
to a spatial length of L wavelengths (). The frequency step f is 1/(L) f
0
/L and the
maximum frequency is thus Nf
0
/L. Thus, the value f = f
0
of the light-cone corresponds to
the Lth point in the frequency space. Note that only the wavevector components lying inside
the light-cone whose radius is L cells can contribute to the outside radiation. To increase
the resolution of the far-eld simulation, one should increase the horizontal size of the FDTD
domain. Fortunately, there is an easy way to do so without performing an actual calculation
in the larger FDTD domain. We can enlarge the input matrix data by lling null (0) values,
for example, into 2048 2048 size matrix. Such arbitrary expansion is legitimate since most
of the near-eld energy of a PhC cavity mode is strongly conned around the central defect
region. When the normalized frequency of a PhC cavity mode is a/ 0.35 (typical of PhC
defect modes), L = 2048 cells = 102.4a 36(). Thus, the resultant far-eld data resolution
is f = f
0
/L f
0
/36.
Finally, we would like to mention all E and H data described in the above formulae are
phasor quantities. Thus, when we detect the in-plane eld data, we have to extract both
amplitude and phase information, because, in general, phases will change dierently at each
position (See Fig. 7). The situation containing the bottom reector is the case, where the
reected waves can no longer be described as a simple standing wave of E(r, t) = [E(r)[e
it
.
Assuming a single mode , all eld vectors in the simulation should have the following form.
E(r, t) =

E(r) exp(it) = [E(r)[ exp(i(r)) exp(it) (92)
An ecient method to obtain the exact phasor quantities

E(r) is to incorporate recursive
discrete FTs (DFTs) concurrently with the FDTD time stepping.
Ex
real
[
n
i,j
= Ex
real
[
n1
i,j
+E
x
[
n
i,j
cos( nt) (93)
42
Ex
imag
[
n
i,j
= Ex
imag
[
n1
i,j
+E
x
[
n
i,j
sin( nt) (94)
Here, to obtain real (Ex
real
) and imaginary (Ex
imag
) components of E
x
eld, simple recursive
summations are performed on each grid point (i, j) at the FDTD time n. Note that the above
formulae correspond to the following Fourier transformation.

E
x
(r, ) =
_
E
x
(r, t)e
it
dt (95)
In general, this summation should continue until the eld values ring down to zero. How-
ever, in the case of high Q factor resonant mode, by carefully exciting a dipole source (source
position and frequency), small FDTD time steps (usually 20 000 30 000 FDTD time steps,
or equivalently 200 optical periods) are sucient to obtain nearly exact phasor quantities.
For real application results of this far-eld algorithm, please refer to the paper by Se-Heon Kim
et al. [15]
8 Appendix II - Auxiliary Dierential Equation Method
We begin with a single pole Lorentz model,[9]
() =
0
+
Ne
2
m
e
f
0
(
2
0

2
i
0
)
(96)
Since perfectly free electrons inside a medium should have
0
= 0,
42
we may separate the
partial contribution of the free electrons from (),

free
() = i
Ne
2
f
0
m(
0
i)
(97)
Now the whole dielectric function () (Eq. 96) can be rewritten as
() =
b
()
. .
other dipoles
+i
Ne
2
f
0
m(
0
i)
. .
free electrons
(98)
where
b
() is the contribution of all the other dipoles.[9]
Let us reexamine the above formula through one of the Maxwell equations, the Amp`eres
law


H =

J +

D
t
(99)
where

J is the conduction current vector due to the free electrons and

D satises

D =
b
()

E.
Applying the Fourier transformation and using a denition of the electric conductivity of ,

J() = ()

E(),


H = i
_

b
+i

_

E (100)
where
b
+i/ should equal to Eq. 98 that includes the contribution of all the electrons (free
and other electrons). Thus, the conductivity is
() =
f
0
Ne
2
m(
0
i)
(101)
42
From an analogy to a spring oscillator, 0 = 2
_
k/m = 0 indeed describes null spring constant.
43
Now let us consider the multi-pole Drude model which can be derived from Eq. 98.
() =
b

2
p

2
+ i
p
(102)
Here, we denote
2
p
(Ne
2
f
p
/m
0
). Using Eq. 101, the p-th conduction current vector

J
p
can
be written as

J
p
=
_

0

2
p

p
i
_

E (103)
Rearranging terms,

J
p
i

J
p
=
0

2
p

E (104)
And then, taking inverse Fourier transformation,

J
p
t
+
p

J
p
=
0

2
p

E (105)
Now we obtain the Auxiliary Dierential Equation (ADE) for

J
p
.
Let us rewrite Eq. 105 in terms of nite dierences

J
n+1
p


J
n
p
t
+
p

J
n+1
p
+

J
n
p
2
=
0

2
p

E
n+1
p
+

E
n
p
2
(106)
This can be simplied as

J
n+1
p
= k
p

J
n
p
+
p
(

E
n+1
+

E
n
) (107)
using
k
p
=
1
p
t/2
1 +
p
t/2

p
=

2
p

0
t/2
1 +
p
t/2
(108)
In the Maxwell-Amp`ere law,


H =
b

E
t
+

J
p
(109)
at an FDTD time step of (n + 1/2),


H
n+1/2
=
b

E
n+1


E
n
t
+

J
n+1/2
p
(110)
Here,

J
n+1/2
p
can be written as assuming the semi-implicit scheme,

J
n+1/2
p
=
1
2
(

J
n
p
+

J
n+1
p
) =
1
2
_
(1 + k
p
)

J
n
p
+
p
(

E
n+1
+

E
n
)
_
(111)
Inserting the above relation into Eq. 110,

E
n+1
=
_
2
b
t

p
2
b
+t

p
_

E
n
+
_
2t
2
b
+ t

p
_


H
n+1/2

1
2

(1 +k
p
)

J
n
p
_
(112)
In case of a single-pole Drude model, we get

E
n+1
=
_
2
b
t
2
b
+ t
_

E
n
+
_
2t
2
b
+t
_


H
n+1/2

1
2
(1 +k)

J
n
_
(113)
The usual FDTDtime update is modied as follows. Assuming that now we have

E
n
,

H
n+1/2
,
and

J
n
,
44
1) Using Eq. 113, we obtain

E
n+1
.
2) Using Eq. 107, we obtain

J
n+1
.
3)

H
n+3/2
is obtained using normal update equations for dielectric media which
involves with

H
n+1/2
and

E
n+1
. These three steps complete one FDTD time update.
References
[1] A. Taove and S. C. Hagness, Computational Electrodynamics: the nite-dierence time-
domain method. Boston: Artech House, Inc., 2000.
[2] N. C. Frateschi and A. F. J. Levi, The spectrum of microdisk lasers, J. Appl. Phys.,
vol. 80, p. 644, 1996.
[3] J. M. Gerard, D. Barrier, J. Y. Marzin, R. Kuszelewicz, L. Manin, E. Costard, V. Thierry-
Mieg, and T. Rivera, Quantum boxes as active probes for photonic microstructures: The
pillar microcavity case, Appl. Phys. Lett., vol. 69, p. 499, 1996.
[4] H. Y. Ryu, M. Notomi, and Y. H. Lee, High-quality-factor and small-mode-volume
hexapole modes in photonic-crystal-slab nanocavities, Appl. Phys. Lett., vol. 83, p. 4294,
2003.
[5] Y. Akahane, T. Asano, B. S. Song, and S. Noda, Nature, vol. 425, p. 944, 2003.
[6] P. R. Villeneuve, S. Fan, and J. D. Joannopoulos, Microcavities in photonic crystals:
Mode symmetry, tunability, and coupling eciency, Phys. Rev. B, vol. 54, p. 7837, 1996.
[7] P. R. Villeneuve, S. Fan, and J. D. Joannopoulos, Numerical solution of initial boundary
value problems involving maxwells equations in isotropic media, IEEE Trans. Antennas
and Propagation, vol. 14, p. 302, 1966.
[8] Y. Xu, J. V ukovic, R. K. Lee, O. J. Painter, A. Scherer, and A. Yariv, Finite-dierence
time-domain calculation of spontaneous emission lifetime in a microcavity, J. Opt. Soc.
Am. B, vol. 16, p. 465, 1999.
[9] J. D. Jackson, Classical Electrodynamics. New York: Wiley, 1974.
[10] O. Painter and K. Srinivasan, Polarization properties of dipolelike defect modes in pho-
tonic crystal nanocavities, Opt. Lett., vol. 27, p. 339, 2002.
[11] S. H. Kim and Y. H. Lee, Symmetry relations of two-dimensional photonic cyrstal cavity
modes, IEEE J. Quantum Electron., vol. 39, p. 1081, 2003.
[12] R. B. Laughlin, A Dierent Universe: Reinventing Physics from the Bottom Down. New
York: A Member of the Perseus Books Group, 2005.
[13] J. V ukovic, M. Loncar, H. Mabuchi, and A. Scherer, IEEE J. Quantum Electron., vol. 38,
p. 850, 2002.
[14] W. H. Press, B. P. Flannery, S. A. Teukolsky, and W. T. Vetterling, Numerical Recipes in
C: The Art of Scientic Computing, 2nd ed. Cambridge University Press, 1992.
45
[15] S. H. Kim, S. K. Kim, and Y. H. Lee, Vertical beaming of wavelength-scale photonic
crystal resonators, Phys. Rev. B, vol. 65, p. 235112.
46

You might also like