+ All Categories
Home > Documents > FDTDlect Manual Eng

FDTDlect Manual Eng

Date post: 03-Apr-2018
Category:
Upload: najib-el-g
View: 239 times
Download: 0 times
Share this document with a friend

of 46

Transcript
  • 7/29/2019 FDTDlect Manual Eng

    1/46

    Reference Manual

    for pFDTD ver. 8.47Se-Heon Kim

    [email protected]

    California Institute of Technology

    July 15, 2009

    1 Set Basic Parameters

    1. void structure size(float x, float y, float z) :

    Set the size of the FDTD domain as x(a) y(a) z(a). Here, a represents the unit lengthin pFDTD, which can take any number/length at ones preference. For example, whendealing with photonic crystals, one can choose the FDTD unit length, 1(a) to equal tothe 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 willvary 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 different grid sizes for all three directions of x,y, and z (=anisotropic butuniform). Note that lx is the same as lattice

    xused 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, float z i, float 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 FDTDdomain of x(a) y(a) z(a). Here, for example, il and ir are applied for the wall atx =-(x/2)(a) and the wall at x =+(x/2)(a), respectively. (As you may guess easily , jis for the y direction and k for the z direction.) The unit of those input values is grid,which means, for example, if latticex=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(float S) :

    Set various basic parameters as the preset values at one time. The below are list ofparameters which can be set by this function.

    (a) =3.141592

    1At least 2 grids in each direction are needed to perform the FDTD time update equations.

    1

  • 7/29/2019 FDTDlect Manual Eng

    2/46

    (b) 0 = 8.854 1012(c) 0 = 4 107(d) the speed of light, c = 1.0/

    00

    (e) Numerical stability parameter, S, is explicitly set by this function, that is, S=S. Notethat

    Shas an inverse relationship with the well-known Courant stability parameter

    (See Taflove[1] and also Sec. 7.3).

    (f) The size of the FDTD time step is set by the explicitly input value ofS; t = 1/(cS)(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 usingthe 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 GSL2 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 valueof 1234 (by default). You can change the seed value by calling this function afterset default parameter() function.

    6. void set sigma max(float axl, float axr, float ayl, float ayr, float azl, float azr) :

    Change some of basic PML constants preset by set default parameters(). This functionalters, for example, sig axl sig azr. If you do not call this function, these values willtake the preset default values.

    7. void set sigma order(float oxl, float oxr, float oyl, float oyr, float ozl, float ozr) :

    Change some of basic PML constants preset by set default parameters(). This functionalters, for example, orderxl orderzr. If you do not call this function, these values willtake the preset default values.

    8. void set kappa(float kappa x, float kappa y, float 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 thepreset default values.

    9. void Hz parity(int x,int y,int z) :

    Set mirror symmetry conditions when the structure under consideration retains mirrorsymmetries. Possible input values will take one of (-1,0,+1), where 0 turns off the sym-metry condition while 1 or -1 sets even or odd symmetry with respect to the symmetry

    2GNU Scientific Library. For more information, visit www.gnu.org/software/gsl/

    2

  • 7/29/2019 FDTDlect Manual Eng

    3/46

    plane (For example, x applies to the x = 0 plane). Note, however, the even and the oddsymmetries are defined according to Hz fields, thus they are exactly opposite to thephysically even and odd.

    (Important to remember) There are two things you should keep in mind dealing withthis 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 halfspace. For example, one of the coordinates, x 0, when using a symmetrycondition for the x = 0 plane. This rule applies for the functions, such asGaussian dipole source(), Gaussian line source(), random Gaussian dipole(), andincoherent point dipole().

    10. void periodic boundary(int x on, int y on, float k x, float k y) :

    Set the Bloch-Floquet periodic boundary conditions. If the structure under considerationretains periodicity along either x or y direction (For example, when dealing with photoniccrystal waveguides or 2-D square-lattice photonic crystals), the periodic conditions can beset on(=1) or off(=0) by using x on and y on. k x and k y, Bloch wavevectors in the x andy directions, respectively, lie within 0 0.5 (normalized by 2/L, where L is the FDTDdomain size for x and y directions). Later, you can change the Bloch wavevectors set bythis function by using the pre-defined grobal variables, wave vector x, wave vector y. Ifyou do not call this function, by default, the FDTD does not use the periodic boundarycondition, 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 periodicboundary condtion) to handle both real fields and imaginary fields. When both k x andk y are chosen to be 0 (Gamma point) in this function, memory() function which shall beexplained in the below will create only the variables for real fields for more efficientcalculation. However, if you are to perform sequential multi-tasks with several Blochvectors under one FDTD simulation (for example, when you want to get a waveguidedispersion), it should be avoided that both k x and k y are set by 0 in this function. Youcan set and modify Bloch vectors as whatever you want via wave vector x, wave vector yvariables 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 functionshould follow after the above basic parameters functions.

    12. void real space param(float a nm, float w n) :

    Print out some useful parameters in real space (See Sec. 7.3) as a text output file,Real Space Param.dat. a nm means that the FDTD unit length, a, corresponds to

    3in structure size()4in lattice size()

    3

  • 7/29/2019 FDTDlect Manual Eng

    4/46

    (a nm) 109m in real space and w n indicates the normalized frequency of the FDTDdipole.

    Note that this w n will be used for the calculation of the effective susceptibility, eff.5

    5See total EM energy block()

    4

  • 7/29/2019 FDTDlect Manual Eng

    5/46

    2 Set dielectric/metallic structures

    In the pFDTD, pre-defined, a number of functions helps you to input complex dielectric/metallicstructures by the repeated use of rather simple geometric structures. For example, the lateruse of input object functions will take over the overlapped region with the previously definedstructures. In the present pFDTD version, only metals that can be described by simple Drudemodel can be handled.

    1. void background(float epsilon) :

    Fill in the whole FDTD domain with a uniform dielectric material having epsilon ofepsilon. For example, for air background, set epsilon as 1.0.

    2. void input object(char *shape, char *matrix file, float centerx, float centery, float centerz,float size1, float size2, float size3, float epsilon) :

    Input various dielectric structures with simple geometric shapes, where the materials areassumed to be linear, isotropic, and non-dispersive. All the structures defined in thisfunction 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 inthe below.

    *shape requests one of the following geometric shapes for the dielectric material. Note thatunused input parameters can be set by EMP (Empty variable defined as 0 in pFDTD.h).

    (a) rod : set a cylindrical shape aligned in the z direction.

    *matrix file : EMP

    centerx, centery, centerz : 3-D coordinates of the center of mass

    size1 : radius in the x y planesize2 : height in the z direction

    size3 : EMPepsilon : epsilon of the material

    (b) rodX : set a cylindrical shape aligned in the x direction.

    *matrix file : EMP

    centerx, centery, centerz : 3-D coordinates of the center of mass

    size1 : radius in the y z planesize2 : height in the x direction

    size3 : EMP

    epsilon : epsilon of the material

    (c) rodY : set a cylindrical shape aligned in the y direction.

    *matrix file : EMPcenterx, centery, centerz : 3-D coordinates of the center of mass

    size1 : radius in the z x planesize2 : height in the y direction

    size3 : EMP

    epsilon : epsilon of the material

    6Here, the each epsilon variable having subscripts ofx,y, and z reflects the micro-positioning nature of the Yeecell structure (REF).

    5

  • 7/29/2019 FDTDlect Manual Eng

    6/46

    (d) donut : set a donut shape whose symmetry axis aligned in the z direction.

    *matrix file : EMP

    centerx, centery, centerz : 3-D coordinates of the center of mass

    size1 : inner radius in the x y planesize2 : outer radius in the x

    y plane

    size3 : height in the z directionepsilon : epsilon of the material

    (e) sphere : set a sphere shape.

    *matrix file : 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 file : EMPcenterx, 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 isaligned in the z direction.

    *matrix file : 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 file : 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 file : 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

  • 7/29/2019 FDTDlect Manual Eng

    7/46

    (j) block : set a tetragonal shape.

    *matrix file : 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 generaldiagram-column structure, in which the general diagram lying in the x y planetranslates in the z direction to form the 3-D swept region.

    *matrix file : M N 2-D text matrix data file from which contour information ofthe general diagram can be obtained.

    centerx, centery : define the center of the general diagram, which will be madecoincide 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 FDTDunit 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 theupper 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 magnification) factor by which the original matrix data isshrink to fit into the length scale of the 2-D FDTD space. For example, let usassume that we have a certain reference distance (point-to-point) of Nm grids in ourmatrix data and say it should be NF grids in the FDTD space. Then, size3 shouldbe NF/Nm. Note that size3 is in float type.

    epsilon : epsilon of the material.

    3. void input object Euler rotation(char *shape, char *matrix file, float centerx, float centery,

    float centerz, float size1, float size2, float size3, float alpha, float beta, float gamma, floatepsilon) :

    This function is very similar to void input object() function except for the fact that itcan 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 thepresent pFDTD version, *shape accepts only 4 kinds of structures, rod, ellipse, ellipsoidal,and block.

    Definition of the Euler rotation matrix [R] is

    [R] = cos sin 0

    sin cos 00 0 1

    1 0 00 cos sin 0 sin cos

    cos sin 0 sin cos 00 0 1

    Other input parameters are the same as in void input object().

    4. void input Drude medium(char *shape, float centerx, float centery, float centerz, float size1,float size2, float size3, float epsilon b, float omega p, float gamma 0, float lattice n) :

    Input various metallic structures with simple geometric shapes, where the materials areassumed to be linear, isotropic, and dispersive that can be described by (Single pole)

    7

  • 7/29/2019 FDTDlect Manual Eng

    8/46

    Drude model. We have adopted the Auxiliary Differential Equation (ADE) method (SeeTaflove Chap. 9[1] and Sec. 8) assuming the following form of Drude model.

    () = 2p

    2 +j

    A proper set of, p, should be chosen depending on the material and the wavelengthspan. 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 1015 = 0.11081015375nm - 1240nm

    = 3.9943

    p = 13.291015 = 0.11281015

    (b) Gold (n, k data from Palik)

    1250nm - 1800nm

    = 1

    p = 12.0671015 = 0.136241015650nm - 1250nm

    = 12.99p = 14.531015 = 0.11091015

    (c) Cromium (n, k data from Palik)

    1200nm - 2000nm

    = 15.28

    p = 14.021015 = 3.01015

    (d) Aluminum (n, k data from Palik)

    1.35m - 1.9m

    = 22.97p = 20.421015 = 0.197871015300nm - 700nm

    = 1.0

    p = 23.891015 = 1.071621015

    7E. D. Palik Handbook of Optical Constants of Solids

    8

  • 7/29/2019 FDTDlect Manual Eng

    9/46

    (e) Indium-Tin-Oxide (n, k data from KAIST NNFC 8)

    400nm - 1000nm

    = 4.61907

    p = 3.41841015 = 8.5582

    1013

    (f) Silver (n, k data from Johnson and Christy 9)

    400nm - 800nm

    = 4.07666

    p = 1.400561016 = 4.217551013

    (g) Gold (n, k data from Johnson and Christy)

    600nm - 2000nm

    = 10.48449

    p = 1.375551016

    = 1.177451014

    (h) Gold (Wegeners group 10)

    600nm - 2000nm

    = 1

    p = 1.36661016 = 6.73871013

    *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 defined as 0 in pFDTD.h).

    To apply metal update equations to the regions defined by *shape, epsilon b should havenonzero values.

    pFDTD does not apply metal update equations to the region in which both epsilon band omega p are set by simultaneously zero. In this way, you can introduce metalremover (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 field components duringthe FDTD time update. 11

    5. void random object(char *shape, float radius, float height, float epsilon, float x min, floatx max, float y min, float y max, float z min, float z max, int gen number, int seed) :

    This function randomly generates gen number number of*shape objects within a regionbounded by { [x min, x max], [y min, y max], [z min, z max] }. We have used rand() as arandom number generator. Different sets of random numbers can be chosen by varyingseed. In the present pFDTD, only rod and sphere are possible for *shape.

    8Made by Samsung SDI9P. B. Johnson and R. W. Christy, Optical Constants of the Noble Metals, Phys. Rev. B, Vol. 6, 4370

    (1972).10Universitat Karlsruhe (TH), Institut fur Angewandte Physik11Since this is a very unphysical boundary condition, which can often cause divergence problems.

    9

  • 7/29/2019 FDTDlect Manual Eng

    10/46

    6. void make epsilon() :

    Create dielectric structures defined by input object() functions in the memory.

    7. void make metal structure(); :

    Create metallic structures defined by input Drude medium() functions in the memory.

    8. void coefficient() :

    For boosting the time update speed through the Maxwells equations, this declares andcreates some of useful variables. This function should be called after make epsilon()function.

    10

  • 7/29/2019 FDTDlect Manual Eng

    11/46

    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 Maxwellscurl equations. (For instance, see Eq 49.)

    2. void Gaussian dipole source(char *component,float x,float y,float z,float frequency,float phase,longto,long tdecay) :

    Set parameters for a single Gaussian dipole source. This dipole source function handlesthe electric current density J or the magnetic current density M to give seed values in theFDTD space. Gaussian dipole source uses the following functional form in a one specificcomponent of current vectors.

    G(t) = sin(2f t + 0) exp((t t0)t

    2

    )

    The above function is valid only for the time period, t0 3t < t < t0 + 3t.

    (a) *component : one of current vector components. To change J, use one of Ex, Ey, Ezwhile to change M use Hx, Hy, Hz. (To introduce out-of-phase oscillation (= phasedifference) 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 ofthe 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, t0 = 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,float x,float y,float z,float frequency,float phase,longto,long tdecay) :

    Set parameters for a single Lorentzian dipole source. Lorentzian dipole source uses thefollowing functional form in a one specific component of current vectors.

    L(t) = sin(2f(t t0) + 0) exp((t

    t0)

    t )

    The above function is valid only for the time period, t0 < t < t0 + 8t.

    (a) *component : one of current vector components. To change J, use one of Ex, Ey, Ezwhile to change M use Hx, Hy, Hz. (To introduce out-of-phase oscillation (= phasedifference) 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

  • 7/29/2019 FDTDlect Manual Eng

    12/46

    (c) frequency : Set the central frequency of the Gaussian dipole source, f, in the unit ofthe 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 timestep. You can represent the infinitely long decay constant (continuous-wave limit) by simply setting tdecay as 0; this Lorentzian dipole sourcebecomes the true continuous-wave source.

    4. float Gaussian phase(float Wn, long t peak) :

    Set the proper initial phase of the Gaussian dipole source, with which the time integralof 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 whichthe Gaussian envelope is the highest (t0).

    For the following form of a Gaussian dipole source,

    J(x, t) = dett0t

    2sin(t + G)(x x0) (2)

    the proper initial phase should satisfy G = t0.5. float Lorentzian phase(float Wn, long tdecay) :

    Set the proper initial phase of the Lorentzian dipole source, with which the time integralof 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) = det cos(t + L)(x x0) (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, float position, float frequency, longto,long tdecay) :

    This function creates a planewave source, which is an array of point Gaussian dipolesources in a plane. The direction of the propagation is determined by EcompHcomp,in which *Ecomp and *Hcomp can take any of the field components that can be used inthe Gaussian dipole source function. The vertical position (z) of this planewave sourceis given by position in the unit of a. Other parameters are the same as in the Gaussiandipole source function.

    One can also generate ideal, diffractionless planewaves in combination with peri-odic boundary() function. Oblique angle propagation can be simulated by controllingBloch wavevectors of k x and k y.

    12In fact, one can also minimize static charges remaining at the source point.

    12

  • 7/29/2019 FDTDlect Manual Eng

    13/46

    7. void Lorentzian planewave(char *Ecomp, char *Hcomp, float position, float frequency, longto,long tdecay) :

    This function creates a planewave source from a plane array of point Lorentzian dipolesources. Other parameters are the same as in the Lorentzian dipole source function.

    8. void Gaussian line source(char *component, float position x, float position z, float frequency,float 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 sourcefunction.

    9. void Lorentzian line source(char *component, float position x, float position z, float frequency,float 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, float frequency, float tdecay, float x min, floatx max, float y min, float y max, float z min, float z max, int gen number, int seed) :

    gen number number of point Gaussian dipole sources are randomly positioned within aregion bounded by { [x min, x max], [y min, y max], [z min, z max] }. We have used one ofthe standard C libraries, rand(), as a random number generator. Different sets of randomnumbers can be chosen by varying seed.

    The direction of all those dipole oscillations is fixed by *component, while the initial phaseof each oscillation is given randomly through seed value. Other parameters are the sameas in the Lorentzian dipole source function.

    11. void incoherent point dipole(char *function, float x, float y, float z, float frequency, long to,long tdecay, float t mu, float sd) :

    This function creates a point dipole source at a specific point of space, (x,y,z). But itsdirection 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 oft mu and the standard deviation ofsd. The envelope function can be chosen by *function,which can be either Gauss (Gaussian function) or Lorentz (Lorentzian function).

    12. void field initialization() :

    Initialize all the field variables such as (Ex,Bx,Hx,Dx,Jx, ) as zeros.

    13. void Poynting block(float centerx, float centery, float centerz, float size1, float size2, floatsize3) :

    This function performs Poynting vector summation over the imaginary closed surfacesdefined by a block whose center and side lengths are denoted as centerx, centery, centerz,size1, size2, size3, respectively, during the whole FDTD time steps.

    Specifically, it performs the following form of recursive summation,

    Eblock(t + t) = Eblock(t) +block

    E H dS (4)

    13

  • 7/29/2019 FDTDlect Manual Eng

    14/46

    whenever it is called by the FDTD for-loop.

    You can get the summation result, Eblock(), via Sumx, Sumy, Sumz variables, whichare pre-defined 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,Eblock() =Sumx + Sumy + Sumz.Note that this function cannot be used together with Poynting total().

    14. float Poynting half sphere point(char *component, float z0, float R, float theta, float phi) :

    In spherical coordinates, a certain Poynting vector can be decomposed as P = Pr r +P +P. This function returns one component of the Poynting vector, where component cantake either r,theta, phi; one can obtain either Pr, P, P at a particular point of(x,y ,z). z0 is an offset for the z position.

    x = R sin(theta) cos(phi)

    y = R sin(theta) sin(phi)

    z = z0 + R cos(theta)

    15. void Poynting UpDown(float value, float 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 energyintegration over except for a certain strip area () specified by value and zposition.

    The region for is defined by the following inequality.

    ( ) & {zposition value z zposition + value} (5)

    ,where value and zposition are in the unit of a.

    Specifically, it performs the following form of recursive summation,

    EUnD(t + t) = EUnD(t) +

    E H dS (6)

    whenever it is called by the FDTD for-loop.

    You can get the summation result, EUnD(), via SumUpper, SumLower variables, whichare pre-defined in pFDTDvar.h. For example, SumUpper gives the integrated Poynting en-ergy only over the upper surface with respect to the strip position. Thus, EUnD() =SumUpper+ SumLower.

    If value is set by 0.0, this function becomes equivalent to Poynting block() function withthe following parameter settings; size1=Lx

    x+

    x

    2, size2=Ly

    y+

    y

    2,

    and size3=Lz z+ z 2, where for example, for the x direction, Lx is the totaldomain size, {x and x+} are the left and right PML thicknesses, and is a somesmall nonzero positive value.13

    16. void Poynting side(float value, float zposition) :

    This function performs Poynting energy integration over a strip area of (See the previousfunction), which is () specified by value and zposition.

    13In order to avoid direct touching with PML layers

    14

  • 7/29/2019 FDTDlect Manual Eng

    15/46

    Specifically, it performs the following form of recursive summation,

    Eside(t + t) = Eside(t) +

    E H dS (7)

    whenever it is called by the FDTD for-loop.

    You can get the summation result, Eside(), via SideSumx, SideSumy variables, which arepre-defined in pFDTDvar.h. For example, SideSumx gives the integrated Poynting energyonly over the two surfaces positioned at x = Lx/2 + x + and x = Lx/2 x+ .Thus, Eside() =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 Poyntingenergy integration over .

    Specifically, it performs the following form of recursive summation,

    Etot(t + t) = Etot(t) +

    E H dS (8)

    whenever it is called by the FDTD for-loop.

    You can get the summation result, Etot(), via Sumx, Sumy, Sumz variables, which arepre-defined in pFDTDvar.h. For example, Sumx gives the integrated Poynting energy onlyover the two surfaces positioned at x = Lx/2 + x + and x = Lx/2 x+ . Thus,Etot() =Sumx + Sumy + Sumz.Note that this function cannot be used together with Poynting block().

    18. void total E energy() :

    Let us consider a volume (V), the whole FDTD computation domain but without includingPML regions (=Vis surrounded by ). This function performs the volume integration oftotal electric-field energy at the present FDTD time step (t).

    EE(t) =

    1

    2| E|2 dxdydz (9)

    The integration result is printed in a text file, total eEE.en. Called repeatedly in theFDTD for-loop, EE(t) will be appended in the same total eEE.en file together with t.Note that automatically takes eff within the Drude metal:

    14

    eff() Re d()d = b + 2p(

    2

    20)

    (2 + 20)2 (10)

    Here, is the frequency at which the effective susceptibility (eff) is being calculated andcan only be set in real space param() function Thus, when metal is included in theepsilon structure, one should use real space param() ahead of using void total E energy().The similar use of the effective susceptibility is applied for other energy functions, suchas void total E energy block(), void total EM energy(), and void total EM energy block().

    14See Jackson Chap. 6.8.

    15

  • 7/29/2019 FDTDlect Manual Eng

    16/46

    19. void total E energy block(float centerx, float centery, float centerz, float size1, float size2,float size3) :

    This function performs volume integration of the electric field energy density at the presentFDTD time step (t), where the volume is defined by a block whose center and side lengthsare denoted as centerx, centery, centerz, size1, size2, size3, respectively.

    Specifically, it performs the following summation,

    EEb(t) =

    block

    1

    2| E|2 dxdydz (11)

    whenever it is called, for example, inside a for loop.

    The integration result is printed in a text file, total eEE b.en. Called repeatedly in theFDTD for-loop, EEb(t) will be appended in the same total eEE b.en file together with t.

    20. void total EM energy() :

    Let us consider a volume (V), the whole FDTD computation domain but without includingPML regions (=

    Vis surrounded by ). This function performs the volume integration of

    total electric-field energy at the present FDTD time step (t).

    EEM(t) =

    1

    2

    | E|2 + | H|2

    dxdydz (12)

    The integration result is printed in a text file, total eEE uHH.en. Called repeatedly in theFDTD for-loop, EEM(t) will be appended in the same total eEE uHH.en file together witht.

    21. void total EM energy block(float centerx, float centery, float centerz, float size1, float size2,float size3) :

    This function performs volume integration of the electromagnetic field energy density at

    the present FDTD time step (t), where the volume is defined by a block whose centerand side lengths are denoted as centerx, centery, centerz, size1, size2, size3, respectively.

    Specifically, it performs the following summation,

    EEMb(t) =

    block

    1

    2

    | E|2 + | H|2

    dxdydz (13)

    whenever it is called, for example, inside a for loop.

    The integration result is printed in a text file, total eEE uHH b.en. Called repeatedly inthe FDTD for-loop, EEMb(t) will be appended in the same total eEE uHH b.en file togetherwith t.

    22. void total E2() :

    This function performs the volume integration of electric-field intensity at the presentFDTD time step (t) over the volume V.

    EI(t) =

    | E|2 dxdydz (14)

    The integration result will be printed in a text file, total EE.en. Called repeatedly in theFDTD for-loop, EI(t) will be appended in the same total EE.en file together with t.

    16

  • 7/29/2019 FDTDlect Manual Eng

    17/46

    23. void Drude energy loss in block(float centerx, float centery, float centerz, float size1, floatsize2, float size3) :

    This function performs volume integration of E J term at the present FDTD time step(t), where the volume is defined by a block whose center and side lengths are denotedas centerx, centery, centerz, size1, size2, size3, respectively.

    Specifically, it performs the following summation,

    PD(t) =

    block

    E J dx dydz (15)

    whenever it is called, for example, inside a for loop.

    The integration result is printed in a text file, Drude E loss.en. Called repeatedly in theFDTD for-loop, PD(t) will be appended in the same total eEE.en file together with t.

    24. void max E Energy detector(float centerx, float centery, float centerz, float size1, float size2,float size3) :

    This function finds out the maximum of the electric field energy (|

    E(t)|2

    ) at the presentFDTD time, t, within the volume defined by a block whose center and side lengths aredenoted as centerx, centery, centerz, size1, size2, size3, respectively.

    The result is printed in a text file, 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 thesame max detect.dat file

    17

  • 7/29/2019 FDTDlect Manual Eng

    18/46

    4 Functions needed to print out results

    1. int get period in update(float w n) :

    Get a time length of one optical cycle (period) corresponding to the given normalizedfrequency ofw n, as the unit of the FDTD time stepping. This function can be used, for

    example, to get time-average of some field data over one optical cycle.2. void out epsilon(char *plane, float 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 theplane 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 parametersettings of*plane=z and value=0. The unit ofvalue is the FDTD unit length, a. *namerequires the output file name including the file extension.

    3. void out epsilon periodic(char *plane, float 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 (bothare nonnegative integers) specify the number of periods for the horizontal and verticaldirections, 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 fromthe top (In the present FDTD version, only *dirc = +z can be used). *name requiresthe output file name including the file extension.

    5. void out plane(char *component,char *plane,float value,char *lastname) :

    This function takes a snap shot of one of field components or their manipulations in a

    plane defined 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 field E

    Ey : y component of the electric field E

    Ez : z component of the electric field E

    Hx : x component of the magnetic field H

    Hy : y component of the magnetic field H

    Hz : z component of the magnetic field H

    Jx : x component of the current density J15

    Jy : y component of the current densityJJz : z component of the current density J

    J.E :16 J EE2 : | E|2 = |Ex|2 + |Ey|2 + |Ez|2H2 : | H|2 = |Hx|2 + |Hy|2 + |Hz|2Sx : x component of Poynting vector. EyHz EzHy

    15 J is defined by the Maxwell-Ampere equation, J = H D/t16The work done per unit time per unit volume by the field. See Jackson Chap. 6.7.

    18

  • 7/29/2019 FDTDlect Manual Eng

    19/46

    Sy : x component of Poynting vector. EzHx ExHzSz : x component of Poynting vector. ExHy EyHxLogE2 : log10 | E|2LogH2 : log10 | H|2EM Energy :17 1

    2 | E|2 +

    |H

    |2

    E Energy : 12| E|2Ex2Ey2 : |Ex|2 + |Ey|2Ey2Ez2 : |Ey|2 + |Ez|2Ez2Ex2 : |Ez|2 + |Ex|2LogEx2Ey2 : log10(|Ex|2 + |Ey|2)LogEy2Ez2 : log10(|Ey|2 + |Ez|2)LogEz2Ex2 : log10(|Ez|2 + |Ex|2)Hx2Hy2 : |Hx|2 + |Hy|2Hy2Hz2 : |Hy|2 + |Hz|2

    Hz2Hx2 : |Hz|2 + |Hx|2LogHx2Hy2 : log10(|Hx|2 + |Hy|2)LogHy2Hz2 : log10(|Hy|2 + |Hz|2)LogHz2Hx2 : log10(|Hz|2 + |Hx|2)

    (b) *plane and value : determines the location of the plane on which you want to lookat the FDTD result.

    (c) *lastname : requires the file extension for the output. The file name is automaticallywritten using the FDTD time step.

    6. void out plane periodic(char *component, char *plane, float value, char *lastname, int m h,int m v)

    :This function performs basically the same tasks as out plane() except for the fact thatthe *component image can be expanded to include multiple periods. m h and m v (bothare nonnegative integers) specify the number of periods for the horizontal and verticaldirections, respectively.

    When you are using the periodic boundary condition with the normalized wavevectorsetting of (kx, ky), this function actually performs the following operations to obtain thefield data *component lying outside the original calculation domain.

    A(x + m h Rx + m v Ry) = exp[2i(m h kx + m v ky)]A(x) (16)

    where A is one of *component and Rx ( Ry) is the lattice vector along the x (y) axis.

    7. void out plane time average(char *component,char *plane,float value, long start, long end,float ***field 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 haveto declare one 2-D array variable, to which the field data is being added during

    17For the Drude metal, becomes the effective susceptibility, see total EM energy block().

    19

  • 7/29/2019 FDTDlect Manual Eng

    20/46

    [start, end] and at t =end the summed result will be divided by (end - start) to get thetime average. For example, you can declare a 2-D array by

    float **2dfield;

    Then, you have to link this 2-D array into the input argument, ***field avg, as follows.

    out plane time average( . . . ,&2dfield, .)

    An output file name is determined by combining start time and the file 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 field computation result (*com-ponent) as is seen from the top (In the present FDTD version, only *dirc = +z can beused). *lastname requires the file extension for the output. The file name is automaticallywritten using the FDTD time step.

    One another feature that differs from out epsilon projection() function is that one cancontrol 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 imagingplane. So, what we do here is more like real NSOM18 measurement. With k shift =0, thefield 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, float***field 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 ofk shift from the structure surface.

    10. void out point(char *component,float x,float y,float z,long ti,long tf,char *name) :

    This function detects a field 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 file name of*name.

    (a) *component : All the field manipulations that can be used in void out plane() functionare available.

    (b) x,y,z : space coordinates in the unit of a.

    (c) ti, tf : ti is an initial time and tfa final time in the unit of the FDTD time stepping.

    (d) *name : output file name

    11. void out several points(char *component,float zposition, float xside, float yside, int pNx, intpNy, long ti,long tf,char *name) :

    This function detects a field component (*component) at several points of{x,y ,z} during[ti, tf]. Here, {x,y ,z} are defined by

    x = xi = xside/2 + i(xside/pNx) where i = 0, , pNx (17)y = yj = yside/2 + j(yside/pNy) where j = 0, , pNyz = zposition

    18Near-field Scanning Optical Microscope

    20

  • 7/29/2019 FDTDlect Manual Eng

    21/46

    The result will be printed out as a multi-column text matrix having a file name of *name,in which each column corresponds to the data for each space position of ( xi, yj).

    (a) *component : All the field manipulations that can be used in void out plane() functionare available.

    (b) zposition : z coordinate of the detection plane on which (xi, yj) are located, in theunit 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 tfa final time in the unit of the FDTD time stepping.

    (f) *name : output file name

    12. float 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 field data.

    13. void print energy() :

    After finishing the whole FDTD time update, this function can be used to print outVQSQ.en file, which includes several Poynting integration results, such as Sumx, Sumy,Sumz, SideSumx, SideSumy, SumUpper, and SumLower.

    21

  • 7/29/2019 FDTDlect Manual Eng

    22/46

    5 Functions needed for far-field simulation

    All the functions below have been introduced for efficient simulation of far-field radiation from2-D photonic crystal nanocavities.[15] However, the same algorithm can also be applied to anumber of different structures including microdisks. For further details, see Sec. 7.5 and thefollowing 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 field param(float *OMEGA, float DETECT) :

    This function performs the recursive discrete Fourier transformation (DFT) concurrentlywith the FDTD time stepping to get the exact phasordata of the in-plane near-field data.

    The near-field data is obtained from a plane at z=DETECT. This function calculates nnumber of phasor data for n number of frequency components defined in a 1-D array of*OMEGA.

    This function should be included inside the FDTD for-loop. A typical time length for onecomplete DFT is about 100 200 optical cycles, but it is also dependent on the Q factorof a possible resonant mode.

    This function will create, for example, a 2-D array ofEx 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 finishing the FDTD time update.

    2. void print amp and phase(int mm) :

    Print out amplitude data and phase data for the calculated near-field phasor data as 2-Dtext matrix files; for example, output file names will be jEx amp and jEx phase with a fileextension of .ap(mm), where mm means the (mm+1)-th frequency component.

    Note that the output occurs directly from the internal memories, such asEx cos[i][j][m].

    3. void print real and imag(int mm) :

    Print out real components and imaginary components of the calculated near-field phasordata as 2-D text matrix files; for example, output file names will be tEx real and tEx imagwith a file extension of .ri(mm), where mm means the (mm+1)-th frequency component.

    Note that the output occurs directly from the internal memories, such asEx 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, exceptfor the fact that the output matrix file will have NROW NROW size with null values20,where NROW should be in the form of 2n.

    For example, output file names will be Ex real and Ex imag with a file extension of.ri(mm),where mm means the (mm+1)-th frequency component. These output files will beused as input files for far field FFT() function.

    19See Eq. 9420See Sec. 7.5.3

    22

  • 7/29/2019 FDTDlect Manual Eng

    23/46

    Note that the output occurs directly from the internal memories, such asEx cos[i][j][m].

    5. void make 2n size(int NROW, int mm) :

    This function reads t-files such as tEx real and tEx imag to create Ex real, Ex imag fileswith NROW

    NROW size as in the same way print real and imag 2n size() does.

    6. void far field FFT(int NROW, float NA, float Nfree, float *OMEGA, int mm) :

    After reading NROW NROW sized near-field data (such as Ex real and Ex imag), thisfunction performs actual far-field simulations based on the near- to far-field transforma-tion algorithm. Here, NA is the numerical aperture of an assumed collection lens andNfree, refractive index of the free space. It will have a number of output files, such asrad Ex .ri(mm), rad Ey .ri(mm), rad Et .ri(mm), rad Ep .ri(mm), and rad tot .ri(mm).

    Output files 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 file names.

    rad tot .ri(mm) : total intensity of the far-field, |Ex|2 + |Ey|2 = |E|2 + |E|2rad Ex .ri mm : x-polarized far-field, |Ex|2rad Ey .ri mm : y-polarized far-field, |Ey|2rad Et .ri mm : -polarized far-field, |E|2rad Ep .ri mm : -polarized far-field, |E|2

    7. void transform farfield(int NROW, int tnum, char *name, int mm) :

    This function performs the following coordinate transformation to an output file, {*name}.rimm, having tnum tnum.

    From (with files having the extension of .ri mm)

    x = sin() cos() (19)

    y = sin() sin()

    = sin()

    To (with files having the extension of .sas mm)

    x = cos() (20)

    y = sin()

    =

    Note that the output file size can be adjusted by tnum which is in the form of 2n + 1.

    8. void add farfield(int tnum, char *name) :

    Add all output files having the extension of .sas mm. The result will be printed insum.sas mm.

    23

  • 7/29/2019 FDTDlect Manual Eng

    24/46

    6 List of global variables

    All the variables listed below can be accessed in all c files in the pFDTD package and reservedfor specific uses. Therefore, one should avoid using the same variable name for private purpose.

    float shiftint SpecNlong t : The FDTD time stepfloat Sumx, Sumy, Sumz, SideSumx, SideSumyfloat SumUpper, SumLowerconst gsl rng type * rng typegsl rng * rng rint isize, jsize, ksizeint pmlil, pmlir, pmljl, pmljr, pmlkl, pmlkrint lattice x, lattice y, lattice zint lattice nzfloat xsize, ysize, zsizefloat nz start, nz end

    float xcenter, ycenter, zcenterfloat kx, ky, kzfloat orderxl, orderyl, orderzlfloat orderxr, orderyr, orderzrfloat sig axl, sig ayl, sig azlfloat sig axr, sig ayr, sig azrfloat ds x, ds y, ds z, dtfloat *ds nzfloat S factor : Numerical stability factorfloat pi, eo, uo, ups, light speedint misize, mjsize, mksize

    int pisize, pjsize, pksizeint cisize, cjsize, cksizeint xparity, yparity, zparityfloat wave vector x, wave vector yint use periodic x, use periodic ychar ***positionfloat ***epsilonx,***epsilony,***epsilonzfloat ***mepsilon,***momega,***mgammafloat ***Ex,***Ey,***Ezfloat ***Jx,***Jy,***Jz : used for metal updatefloat ***Hx,***Hy,***Hz

    float ***Dx,***Dy,***Dz : used for PMLfloat ***Bx,***By,***Bzfloat ***iEx,***iEy,***iEzfloat ***iJx,***iJy,***iJzfloat ***iHx,***iHy,***iHzfloat ***iDx,***iDy,***iDzfloat ***iBx,***iBy,***iBzfloat *aax,*aay,*aazfloat *bbx,*bby,*bbz

    24

  • 7/29/2019 FDTDlect Manual Eng

    25/46

    float *ccx,*ccy,*cczfloat ***ddx,***ddy,***ddzfloat *eex,*eey,*eezfloat *ffx,*ffy,*ffzfloat *ggx,*ggy,*ggz

    float *hhx,*hhy,*hhzfloat *iix,*iiy,*iizfloat *jjx,*jjy,*jjzfloat *kkx,*kky,*kkzfloat *llx,*lly,*llzfloat ***Ex cos, ***Ex sinfloat ***Ey cos, ***Ey sinfloat ***Hx cos, ***Hx sinfloat ***Hy cos, ***Hy sinfloat back epsilonfloat global W : the normalized frequency to be used in the effective susceptibility, eff.

    25

  • 7/29/2019 FDTDlect Manual Eng

    26/46

    7 Appendix I - Short Course :The Finite-Difference 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 finite volume of space-time is finite.

    - 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 wouldbe impossible to get any analytic solution. Wavelength-scale small air-holes fixed around thecavity makes the boundary value problem extremely difficult. Moreover, fine structural tuningsare critical in the usual design process to get desired cavity properties such as the Q factoroptimization.[4, 5] Therefore, the use of numerical simulations are inevitable in the design ofthese complex systems. The finite-difference time-domain method (FDTD) is one example,which is widely used in the field of the PhC.

    In the FDTD method, space and time are discretized as x and t, and the electric-fieldvector E(ix, jy, kz) and the magnetic-field vector H(ix, jy, kz) locating at eachspace-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 approachto the limit of zero. Choosing proper space-time grids, x and t, within the maximumpermissible computer memory,21 one can calculate the electro-magnetic fields as a function oftime. Thus, the FDTD method has been used to obtain a variety of optical properties such asresonant frequency, near-field pattern, quality factor, and so on.[6] If the structure has some

    structural symmetry such as mirror reflection symmetry and discrete translational symmetry,one can improve the calculation speed by imposing special symmetry conditions on the FDTDgrids. For more detailed discussions, you may read the most famous book written by Taflove.[1]

    In Sec. 7.1, we will describe basic principles of the FDTD, begining with a description onhow 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 equationson the basis of the finite-discretization. In the last part of Sec. 7.1, very useful relations whichenable us to translate the FDTD results to the mks (meters, kilograms, seconds) units in realworld. The basic routines of the FDTD computations for various optical properties of the PhCcavities 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-field computation of the PhC resonant modes. In real fabricatedsamples, 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 FDTDsimulations based on the ideal structure would not be easy.22 However, if the corresponding

    20This appendix is based on Chap. 2 in Se-Heon Kims PhD Thesis.21As will be discussed in the next section, there should be a definite relation between x and t for numerical

    stability.22For example, comparsions of the measured resonant wavelengths with the FDTD results are daily-routines.

    26

  • 7/29/2019 FDTDlect Manual Eng

    27/46

    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 donewith 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-field radiation pattern in the designof directional photonic crystal emitters. In general, direct application of the FDTD method

    would be difficult because of the limited computer memory size and time. We shall explain howone can efficiently obtain the far-field radiation by combining the 3-D FDTD method and thenear- to far-field transformation formulae. In Sec. 7.5, we will describe the far-field simulationmethod and show simulation results.

    7.1 The Finite-Difference Time-Domain Method

    In numerical simulations, continuous space and time variables x and t should be discretizedas x and t. For usual one-variable (x) differential equations, x can be arbitrarily small.However, for multi-variable (x,t) differential equations such as in the Maxwell equations, thereexists a special relation between x and t to satisfy the numerical stability condition. Inthis section, we will show how one can simulate the 1-D scalar wave equation on the basis of

    the finite-discretization. From this simple example, you will learn all important concepts whichare needed to understand the 3-D FDTD method of the Maxwell equations. Then, we willexplain the 3-D FDTD method beginning with the famous Yee cell [7] which indicates howthe electric-field vector and the magnetic-field vector should be arranged in space. In the lastpart of this section, we will explain very useful conversion rules which relate the FDTD resultsto 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

    2u

    t2 = c

    2 2u

    x2 (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 ofei(tkx) into Eq. (21), the dispersion relation 2 = c2k2

    can be obtained. Since the phase velocity vp is a constant,

    vp =

    k= c (23)

    the propagating wave is dispersionless. This fact will be used in Sec. (7.1.2) to quantify thenumerical dispersion arising from the finite nature.

    Now, lets find out corresponding finite-difference representations for the second derivativesin Eq. (21). From the Taylors series, neglecting the terms that are higher order than the secondin the derivatives,

    u(xi + x)|tn = u|xi,tn + xu

    x|xi,tn +

    (x)22

    2u

    x2|xi,tn (24)

    Adding u(xi + x)|tn and u(xi x)|tn , the second partial derivative of u with respect to xcan be represented as

    27

  • 7/29/2019 FDTDlect Manual Eng

    28/46

    2u

    x2=

    u(xi + x) 2u(xi) + u(xi x)

    (x)2tn

    uni+1 2uni + uni1

    (x)2 (25)

    Similarly, the second partial derivative with respect to t

    2

    ut2 |xi,tn = un+1

    i 2un

    i + u

    n1

    i(t)2 (26)

    Inserting the above two results into Eq. (21), we obtain the finite-difference expression for the1-D wave equation.

    un+1i = (ct)2

    uni+1 2uni + uni1(x)2

    + 2uni un1i (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 different 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 nexttime step, n + 1, one can use the above difference equation (27). We need two consecutive

    data for the next solution because the wave equation (21) contains the second derivatives withrespect to both space and time coordinates. As will be shown in the below, the finite-differencesolution approaches to the exact analytic solution (22) as x and t goes to zero. Also, youmay guess that, by the fact that only two nearest neighbor data (ui1 and ui+1) are relatedfor the solution ui, there wolud be a special relation between x and t. For example, if onechoose x smaller than ct, a light propagation distance in t, the propagation of the lightcannot be properly described. In Sec. 7.1.3, we will show that x and t should satisfy therelation ct x for the numerical stability.

    In this section, lets choose ct = x. Then Eq. (27) is simplified as

    un+1i = uni+1 + u

    ni1 un1i (28)

    One can easily prove that the solution for this finite-difference equation is 23 equivalent to thefinite-difference representation of the exact analytic solution (22).

    un+1i = 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 ei(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, thepropagation becomes less dispersive [Eq. (23)].

    The 1-D plane-wave expressed in terms of finite-differences is

    uni = ei(ntkix) (30)

    23For the detailed proof, See Chap. 2 in the Tafloves book [1].24Therefore, t = x/c is called magic step.

    28

  • 7/29/2019 FDTDlect Manual Eng

    29/46

    where k is assumed to be complex such that k = kreal+ikimag. Now inserting this into Eq. (27),we get

    eit =

    ctx

    2 (eikx 2 + eikx) + 2 eix (31)

    Rearranging terms,

    cos(t) =

    ctx

    2[cos(kx) 1] + 1 (32)

    k =1

    x cos1{1 +

    xct

    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 cos1

    {1 + xct2

    [1 (

    t)2

    2 1]}=

    1

    x cos1[1 1

    2

    c

    2(x)2] 1x (kx) = k (34)

    we get k = k, that is, the solution asymptotically goes to the exact solution.25 In this way, asthe finite assumption disappears, the resultant solution becomes less dispersive and more exact!

    For more general discussions, please refer to the Tafloves book[1]. Keeping t satisfyingthe numerical stability condition, it can also be shown that the numerical disperison vanishesas x goes to the limit of zero.

    7.1.3 Numerical stability

    To begin with, lets define what the term stable means. The meaning that the numericalsimulation is stable is that the numerical solution is bounded by finite values. When xand t are not chosen to satisfy the stability condition, we will see unstable behavior of thesolution, that is, the solution uni can increase or decrease unbounded (diverge!). In order toanalyze stability in the time domain, lets insert the same plane-wave solution used in theprevious Eq.(30), in which only is treated as complex, while k is assumed to be real but canbe different from the exact wavevector k.26

    uni = ei(ntkix) (35)

    By inserting the assumed solution into Eq. (27), from Eq. (32) we get

    cos(t) =

    ctx

    2[cos(kx) 1] + 1 (36)

    =1

    t cos1{

    ctx

    2[cos(kx) 1] + 1} = 1t cos

    1() (37)

    25Lets assume that t < 1, which is, in fact, a basic condition for t for a given frequency . Then, thewavevector k becomes real number.

    26Keeping stability condition in the space domain, we will find stability condition in the time domain.

    29

  • 7/29/2019 FDTDlect Manual Eng

    30/46

    Here, denoting S ct/x (Courant stability parameter), we get

    = S2[cos(kx) 1] + 1 (38)For all possible real k, should satisfy 1 2S2 1.

    (1) When 1 1 (0 S 1) :Since imag = 0, the solution becomes stable.

    (2) 1 2S2 1 (S > 1) :Since imag = 0, the solution becomes unstable.

    Therefore, we get the condition for the numerical stability.

    S =ctx 1 t

    xc

    (39)

    7.2 Yee cell and the 3-D FDTD

    Now, lets rewrite the Maxwell equations in terms of finite-differences.

    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 twocurl equations are to be used since the other two are automatically satisfied thanks to the

    divergence-free nature of the FDTD Yee cell.[8] Although the equations contain only the firstderivatives, since there are 6 unknowns (Ex, Ey, Ez, Hx, Hy, Hz), the finite-difference scheme isnot as simple as one may guess; Proper micro-positioning of all the field components inside theunit cell (i ,j ,k) is very important. 1/2-grid position differences should be considered to satisfythe Maxwell equations in the unit cell.

    This idea has been successfully implemented in the structure of the Yee cell, which wasoriginally proposed by Kane Yee in 1966[7]. In Fig. 1, we have shown the micro-configurationof the 6 field components in the same (i ,j ,k) cell. All the field components shown here have thesame memory position (i ,j ,k) as Ex[i][j][k]. However, if we represent the field position preciselyupto 1/2-grid, then, for example, Ex[i][j][k] can be represented as Ex|i+1/2,j,k. In the same way,it can be seen that Hx[i][j][k] Hx|i,j+1/2,k+1/2. Note that the unit Yee cell shown in Fig. 1fills in the whole 3-D space without voids. We have also assumed a rectangular parallelepipedunit cell, in which the side lengths are different (xi, yj, zk) for different positions (i ,j ,k)28

    Now we represent the first derivatives in the Maxwell equations in terms of the finite-differences.29

    27However, 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 Taflove[1].

    28When the structure to be investigated has a local fine structure, one can efficiently simulate the FDTD,saving computer memory and time.

    29Higher order terms than O(x2), O(t2) are neglected.

    30

  • 7/29/2019 FDTDlect Manual Eng

    31/46

    Figure 1: Structure of the Yee cell locating at (i ,j ,k). 6 field c omponents(Ex, Ey, Ez, Hx, Hy, Hz) are arranged around (i ,j ,k) with 1/2-grid differences satisfying theMaxwell equations.

    u

    x(ix, jy, kz, nt) =

    uni+1/2,j,k uni1/2,j,kx (44)

    u

    t(i

    x, j

    y, k

    z, n

    t) =

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

    t

    (45)

    Using these representations, for example, one component of the following curl equation

    Hzt

    =1

    Exy

    Eyx

    (46)

    can be expressed as

    Hz|n+1/2i+1/2,j+1/2,k Hz |n1/2i+1/2,j+1/2,k

    t =1

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

    Ex|ni+1/2,j+1,k Ex|ni+1/2,j,kyj

    Ey

    |ni+1,j+1/2,k

    Ey

    |ni,j+1/2,k

    xi (47)Rearranging the terms,

    Hz|n+1/2i+1/2,j+1/2,k = Hz|n1/2i+1/2,j+1/2,k +

    ti+1/2,j+1/2,k

    1yj (Ex|

    ni+1/2,j+1,k

    Ex|ni+1/2,j,k) 1

    xi (Ey|ni+1,j+1/2,k Ey|ni,j+1,k)

    (48)

    31

  • 7/29/2019 FDTDlect Manual Eng

    32/46

    Expressing these in terms of memory position,

    Hz[i][j][k] = Hz [i][j][k] +t

    [i][j][k] 1y[j](Ex[i][j + 1][k] Ex[i][j][k])

    1

    x[i](Ey[i + 1][j][k] Ey[i][j][k]) (49)Similarly, the FDTD update equation for the Ez component is

    Ez|n+1i,j,k+1/2 = Ez|ni,j,k+1/2 +t

    i,j,k+1/2

    2

    (yj1 + yj) (Hx|n+1/2i,j+1/2,k+1/2 Hx|

    n+1/2i,j1/2,k+1/2) (50)

    2(xi1 + xi)(Hy|

    n+1/2i+1/2,j,k+1/2 Hy|

    n+1/2i1/2,j,k+1/2)

    Note that there is a 1/2-time difference in the update equations for the E-field data andH-field data (See Eq. (48) and Fig. (51)). Therefore, sequential updates of the E-field dataand the H-field data complete one FDTD time stepping; At a particular time point (n), E-fielddata are updated and stored in memory using H-field data previously (n 1/2) stored in thememory. Then (at time of n + 1/2), H-field data are updated and stored in memory usingthe E-field data just computed in the previous. As this process continues, we get completeinformation on the electromagnetic-fields in space and time. For the remaining parts of thefield update equations, please refer to the Tafloves 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 otherdirections).

    7.3 Real world vs. FDTD space

    In this section, we will derive useful relations which enable us to convert FDTD results into thecorresponding values in real world. We have assumed anisotropic (x, y, z) but uniformFDTD grids. t has been chosen to guarantee the Courant stability condition (51).

    (1) Size of the gridIn the pFDTD program,31 there are three input values for specifying the resolution of the

    grid, (latticex, latticey, and latticez), which denotes number of grids within the unit length1 (a)32 along each direction. Thus, for example, the minimum grid size for x direction is

    30The proof is given in Tafloves book ([1], Chap. 4).31The basic backbone of the pFDTD was coded by Guk-Hyun Kim. Later, based on his FDTD ver. 3.4, Se-

    Heon Kim modified and added many new functions (anisotropic grid, far-field simulation, and so on). Recently,ver. 8.11 has been released (as of Aug 8, 2008).

    32In case of photonic crystal structures, it is natural to choose the lattice constant as the unit length.

    32

  • 7/29/2019 FDTDlect Manual Eng

    33/46

    1(a)/(latticex). 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 ofthe grids are chosen to be

    The smallest integers of the ratio1

    latticex:

    1

    latticey:

    1

    latticez(52)

    Now we define 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 latticeconstant is a(m),34 then

    x(m) = a(m)latticex

    , y(m) = a(m)latticey

    , z(m) = a(m)latticez

    (53)

    (2) The speed of lightIn real world, the speed of light c is given by a constant of 3 108(m/sec). In the FDTD

    space, the speed of light is also expressed as the same value 3 108

    (m/sec). It should benoted that the only assumptions of the FDTD method are discretizations of space and timecoordinates.

    (3) Size of the time stepAs discussed in the previous, the time step t is chosen to satisfy the Courant stability

    condition [Eqs. (39) and (51)]. Let Sbe 1/(ct) with such t,35 then, S should satisfy thefollowing inequality.

    S>

    1

    (x)2 +1

    (y)2 +1

    (z)2 (54)

    Since x, y, and z are in the unit of q, the unit of S is q1

    . The unit oft can berepresented as one FDTD time stepping (1 update).

    t(sec q m1) = 1(update) = 1cS(q1) (55)

    where c = 3 108(m/sec). Rearranging the above term, we get

    c =

    1

    S

    q

    (update)(56)

    Therefore, in the FDTD space, a plane-wave having a speed of c proceeds (1/S) q per 1update.

    In real world, the size of the time step can be expressed in the unit of sec. by converting Sinto the unit of m1 and by using Eq. (55)

    t(sec) = 13 108(m/sec) S(m1) (57)

    33For 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).

    34Here, we get a relation between q and m(meter), x q = a m / latticex.35The S in this section should be distinguished from the Courant parameter in Eq. (39)

    33

  • 7/29/2019 FDTDlect Manual Eng

    34/46

    (4) Normalized frequencySince 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 specifically, therelations between u and q are as follows.36

    a(u) = latticex(u)

    a(q) = x(q) latticex (59)

    (5) Wavelength in vacuumUsing the relation (58) for the normalized frequency, in the FDTD space,

    (u) =a(u)

    n=

    latticex(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),

    (update1) =2c

    = 2c n

    a(q)=

    2nS(q1)a(q) 1(update) (63)

    Similary, the frequency f is

    f(update1) =n

    S(q1)a(q) 1(update) (64)

    The angular frequency in real world is

    (1/sec) = ck =2c

    = 2c n

    a(m)(65)

    (7) PeriodThe period can be simply obtained by taking inverse of the frequency f [Eq. (64)].

    36We have assumed a photonic crystal slab lying horizontally in the directions of x and y.

    34

  • 7/29/2019 FDTDlect Manual Eng

    35/46

    In the FDTD space,

    T(update) =2

    =

    S(q1)a(q) 1(update)n

    (66)

    In real world,

    T(sec) =2

    =

    a(m)

    cn(67)

    (8) Uncertainty relationIn 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, theenergy-time uncertainty plays an important role, which links the time-uncertainty T to thefrequency-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)

    nS(q1)a(q) 1(update)

    = 1 (69)

    Simplifying,

    (update)(n) = S(q1)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 andindependent 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 =2n

    S(q1)a(q) 1(update) (update) (72)

    The cavity lifetime can be estimated by monitoring its energy decay.

    U(update) = U0 exp((update)/) (73)37Or, equivalently, a Gaussian envelope in frequency domain, centered at f0 and a width off.

    35

  • 7/29/2019 FDTDlect Manual Eng

    36/46

    Figure 2: (a) The scanning electron microscope image of the fabricated photonic crystal singlecell cavity formed in a free-standing GaAs slab with a single layer of InAs quantum dots. Thelattice constant, a, is 285 nm and the slab thickness is 200nm. (b) The corresponding FDTDepsilon 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 liesnear the center of the cavity.

    7.4 Contour FDTD

    In this section, we shall describe the typical procedure for the contour FDTD. 38 The PhCstructure to be investigated here is shown in Fig. 2. That is a single cell cavity formed in aGaAs membrane having a single layer of InAs quantum dots (QDs). These InAs QDs havean emission peak at 950nm with a full-width at half-maximum (FWHM) of 50nm at atemperature of liquid nitrogen ( 70K). The areal density of the QD is 400 m2. The slabthickness were chosen to be 200nm to support only fundamental modes of the slab (TE-like

    mode).As the first step for the contour FDTD, we have taken a SEM image of the PhC cavity asappeared in Fig. 2(a). From this SEM image, the lattice constant have been measured to be285nm. 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 epsilonstructure, then all effects 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 liesnear the center of the single cell cavity.

    The spatial resolution of the FDTD is chosen to be isotropic and uniform, 20 grids/a.Thus, (latticex, latticey, latticez) = (20, 20, 20). The smallest integers of the ratio defined inEq. 52 become (1 q,1 q,1 q). In terms of mks units, x = y = z 14.25 nm. Then, weshould determine the time resolution

    t that guarantees the stability condition. According to

    Eq. 54, Sshould be chosen larger than 12 + 12 + 12 = 3. For ease of the later calculations,Swas chosen to be 2 q1. Thus, in the FDTD space, a light wave will appear as it propagesa half grid per unit update time [Eq. 56. Changing the FDTD time unit t into the unit ofsecond, recalling that 1 q1 = (1/14.25 109)m1, and using Eq. 57, we get

    38Tafloves new edition (The finite-difference time-domain method, Artech House, 3rd ed.) featured our contourFDTD.

    36

  • 7/29/2019 FDTDlect Manual Eng

    37/46

    t(sec) = 13 108(m/sec) (2/14.25 109)(m1) 2.4 10

    17(sec) (74)

    This FDTD time unit is so tiny that it can easily describe the electromagnetic field, whosetypical oscillation period for the 1 m-wavelength light is 1015 sec. Note that 10 000 FDTDtime 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 easiestways to insert a seed of light is to adopt forced oscillation of the electromagnetic fields via thecurrent terms. Let us consider the following form of the Maxwells equations which includeboth the electric current vector, J, and the magnetic current vector, M.

    E

    t=

    1

    H 1

    J (75)

    H

    t = 1

    E1

    M (76)

    It should be noted that the original Maxwells equations do not contain the current vectorterm M for magnetic field. 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 owncomputational convenience. For example, one can handle Jx component at a certain spacepoint to generate Ex field component at that point. (Eq. (75)) In the same way, one can handleMz component to make Hz fields ! When such source terms are involved in the Maxwellsequations, for example, one of the time difference equations (Eq. (48)) for the FDTD timeupdate can be expanded as

    Hz|n+1/2i+1/2,j+1/2,k = Hz|n1/2i+1/2,j+1/2,k + ti+1/2,j+1/2,k [ 1yj (Ex|

    ni+1/2,j+1,k Ex|ni+1/2,j,k)

    1xi (Ey|ni+1,j+1/2,k Ey|ni,j+1,k) Mz|ni+1/2,j+1,k](77)

    The most common way to excite a certain resonant mode with such current sources is touse the following form of Gaussian envelope function overlaid on the harmonic oscillation witha frequency of f.

    J(r0, t) = sin(2f t + )exp{ [(t t0)/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 specific point r0 atwhich the presumed mode has an antinode. J (or M) can be one of the six field components,Ex, Ey, Ez, Hx, Hy, and Hz. Using the fact that exp(32) 0.2%, t0 which represents the timefor the maximum field amplitude is usually chosen to be 3 t. 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.

    39Thats why we can always write B = 0 with full confidence.40The 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 effect in the frequency domain.

    37

  • 7/29/2019 FDTDlect Manual Eng

    38/46

    Figure 3: Hz field data detected at a particular location (0.0, 0.3a). In order to investigate allpossible resonant modes, the Hz Gaussian dipole source having a short time duration [T = 600(update)] centered at n = 0.3 was used. (a) Amplitude of the field as a function of the FDTDtime 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 dipolesource should have a broad spectral band. Here, we gave a Hz Gaussian dipole source havinga 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 durationT = 600 the uncertainty of the normalized frequency becomes n 0.067.

    The Hz field as a function of the FDTD time detected at the same location is shown inFig. 3(a). The whole time span is approximately 10 ps. One can clearly see the beatingoccurs, which indicates two modes are mixed. The Fourier transformation of the result inFig. 3(a) clearly resolves the existence of the two modes, degeneracy split dipole modes[11].

    7.4.2 Selective excitation of the modeIn order to selectively excite one of the resonant modes, the Hz dipole source having a sufficientlylong time duration [T = 4500 (update)] centered at the frequency of the interesting modewere 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 onecan 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 100for the mode 1 and 2, respectively.

    The in-plane field distributions of the Hz fields and the electric-field intensities are displayedin 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 twodegenerate pairs are indistinguishable in the limit of perfect 6-fold symmetry[11]. However, inreal 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 spontaneoussymmetry breaking.41

    41Laughlin nicely shows the role of the spontaneous symmetry breaking in a variety of phenomena. See Ch. 4of his book A Different Universe [12]

    38

  • 7/29/2019 FDTDlect Manual Eng

    39/46

    Figure 4: Hz field data detected at a particular location (0.0, 0.3a). In order to selectivelyexcite one of the resonant modes, the Hz 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-field information of two possible resonant modes. For each resonant mode,Hz fields and electric-field 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

  • 7/29/2019 FDTDlect Manual Eng

    40/46

    Figure 6: Geometry used for the far-field computation. The whole calculation domain is di-vided by the horizontal plane just above the photonic crystal slab. According to the surfaceequivalence theorem, the near-field components (Ex, Ey, Hx, and Hy) at the horizontal planegive sufficient information on the far-field pattern in the upper domain ().

    7.5 Simulation of Far-field Radiation

    To obtain the far-field radiation pattern, we should deal with the radiation vectors that aresufficiently far (r ) from a light emitter.[9] Direct application of the FDTD method wouldbe difficult because of the limited computer memory size and time. Here, we shall explainhow one can efficiently obtain the far-field radiation by combining the 3-D FDTD method andthe near- to far-field transformation formulae. This method has been well known in the fieldof electronics since 1980s dealing with antenna radiation problems. Vukovic et al. appliedthe FFT-based far-field 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 efficient far-field computation in Fig. 6. Here, we dividethe whole calculation domain by a horizontal plane located just above the PC slab. The upperdomain is bounded by an infinite hemisphere. All field components (E and H ) are assumedto fall off as 1/r, typical of radiation fields. It is also assumed that in-plane field components(Ex, Ey, Hx, and Hy) detected at the horizontal plane decay exponentially as the horizontaldistance . According to the surface equivalence theorem, for the calculation of the fields insidean imaginary closed space , the equivalent electric (Js) and magnetic (Ms) currents on thesurrounding surface can substitute all the information on the fields out of the , where Js and

    Ms are calculated by using the following formulae.

    Js = n H = xHy + yHx (79)Ms = n E = xEy yEx (80)

    Here, n is a unit normal vector on the surface. Neglecting the fields on the hemisphere, onlythe in-plane field data detected at the horizontal plane will be used for the far-field computation.

    40

  • 7/29/2019 FDTDlect Manual Eng

    41/46

    7.5.2 Near- to far-field transformation

    The equivalent current vectors are used to obtain the following retarded vector potentials.

    A = o sJseikr

    4r

    dS (81)

    F = o

    s

    Mseikr

    4rdS (82)

    In the far-field regime, (r R cos), the above formulae can be simplified as

    A = oeikR

    4R

    s

    Jseik cosdS o e

    ikR

    4RN (83)

    F = oeikR

    4R

    s

    Mseik cosdS o e

    ikR

    4RL (84)

    Using a relation k cos = kxx + kyy, the radiation vectors N and L are simply related by2-D FTs.

    N s

    Jseik cosdS = F T(Js) (85)

    L s

    Mseik cosdS = F T(Ms) (86)

    x and y components of the radiation vectors can be represented as

    Nx(kx, ky) = F T{Hy(x, y)} (87)Ny(kx, ky) = +F T{Hx(x, y)} (88)Lx(kx, ky) = +F T{Ey(x, y)} (89)Ly(kx, ky) = F T{Ex(x, y)} (90)

    Then, far-field radiation patterns are obtained by calculating time-averaged Poynting energyper unit solid angle.[9]

    dP

    d= R2E H n = k

    2

    322

    N + L2 +

    N L2

    (91)

    where is the impedance of free space.

    7.5.3 Implementation in the FDTD

    One can easily implement this algorithm into the FDTD code. During the FDTD time stepping,the in-plane field data (near-field data) that contain complete information on the far-field areobtained. Once the FDTD computation is completed, the radiation vectors (N and L) arecalculated by the FTs. Then, these radiation vectors are used to obtain far-field patternsaccording to Eq. (91). One can use the 2-D FFT algorithm for efficient FT computations [seeEqs. (87)-(90)]. In our FDTD simulation, the size of the computational grid was a/20 (a is thelattice constant), and the size of the horizontal calculation domain were 16 a 16a. Thus, each

    41

  • 7/29/2019 FDTDlect Manual Eng

    42/46

    Figure 7: Phasor information of the dipole mode in a modified single cell photonic crystal cavity.Ex field components are detected in the plane with a distance of 0.55a from the surface of theslab. The structural parameters are the same as the cavity shown in Fig. 1 of the paper[15].

    (a) Modulus and (b) Phase of Ex

    in-plane field data will contain approximately 320 320 data points. In the FFT algorithm,N N input data I(x, y) are transformed to the output matrix data O(fx, fy) with the sameN N size, where f is k/2.[14] Assume that N unit cells in the I(x, y) data correspondto a spatial length of L wavelengths (). The frequency step f is 1/(L) f0/L and themaximum frequency is thus N f0/L. Thus, the value f = f0 of the light-cone corresponds tothe Lth point in the frequency space. Note that only the wavevector components lying insidethe light-cone whose radius is L cells can contribute to the outside radiation. To increasethe resolution of the far-field simulation, one should increase the horizontal size of the FDTD

    domain. Fortunately, there is an easy way to do so without performing an actual calculationin the larger FDTD domain. We can enlarge the input matrix data by filling null (0) values,for example, into 2048 2048 size matrix. Such arbitrary expansion is legitimate since mostof the near-field energy of a PhC cavity mode is strongly confined around the central defectregion. When the normalized frequency of a PhC cavity mode is a/ 0.35 (typical of PhCdefect modes), L = 2048 cells = 102.4a 36(). Thus, the resultant far-field data resolutionis f = f0/L f0/36.

    Finally, we would like to mention all E and H data described in the above formulae arephasor quantities. Thus, when we detect the in-plane field data, we have to extract bothamplitude and phase information, because, in general, phases will change differently at eachposition (See Fig. 7). The situation containing the bottom reflector is the case, where thereflected waves can no longer be described as a simple standing wave of E(r, t) =

    |E(r)

    |eit.

    Assuming a single mode , all field vectors in the simulation should have the following form.

    E(r, t


Recommended