May 25, 2012, Friday, 145

WOLFSIM:Tutorial

From OLEG

Jump to: navigation, search

Contents

Navigation


Short Introduction of the FDTD method

WOLFSIM applies the finite-difference time-domain (FDTD) method [1] to analysis of optical elements with periodic structures of anisotropic media. The FDTD simulation is directly solving Maxwell's equations in a computational grid-space during time-marching. Since Kane Yee [2] introduced an efficient and stable algorithm, often called the "Yee algorithm", the FDTD method has been one of the most successful approaches for analysis of electromagnetic systems.


WOLFSIM is designed specially for periodic structures of arbitrary anisotropic media. A complete analysis of the system can be obtained from a simulation in one period of the structure by applying periodic boundary conditions (PBCs). We developed an efficient FDTD algorithm incorporating PBCs with nondiagonal permittivity tensors at a general angle of incidence using the split-field update technique [3]. With the split-field update method, the actual calculations are done for a new set of field variables P and Q: P=E*exp(jkyy) and Q=cu0Hexp(jkyy),where ky is the phase difference along the y-axis). Note that WOLFSIM assumes a transversal periodicity, but it does not take account of a longitudinal periodicity. We also note that WOLFSIM codes are currently written for a system with periodicity along the y-axis. So, normal incidence at the structure is assumed to be the x direction. The two remaining boundaries are terminated by the uniaxial perfectly matched layer (UPML) absorbing boundary conditions [4].


Since the FDTD algorithm approximates the solution of Maxwell's equations in discrete space and time, a motion of the electromagnetic wave in the numerical domain may differ from that in continuous space and time. Two main numerical characteristics of the FDTD algorithm are numerical stability and numerical dispersion. Consider a computational domain with the spatial resolution Δu and the temporal resolution Δt.


First, the ratio (cΔt/Δu) must be bounded to a special number, known as the "Courant factor (S)." Since the Courant limit depends on both the dimension and the anlge of incidence, WOLFSIM automatically determines it for every simulation. WOLFSIM is using values of S from the case of isotropic media as a guideline. However, when the problem involves non-linear dielectric property (i.e. optical activity), a user may need to determine it manually. Usuallly, the time-step Δt is selected as the largest value under the numerical stability after determining Δu of the grid-structure.


Second, non-physical dispersions, often called the numerical dispersion, can affect the accuracy of the simulation results. To minimize numerical errors, the spatial resolution should be selected to be sufficiently small in consideration of frequencies of interest, dimensions of the structure, material properties, structure shapes, and any other factors which can affect numerical properties. A shift of spectral response to longer wavelengths can appear as one of typical numerical characteristics of the FDTD method. Obviously, one simple solution to reduce numerical errors including the numerical dispersion is smaller grid-spacings.


A time-limited pulse (i.e. a Gaussian pulse) as a source wave allows to calculate spectral response of the system from a single simulation. This pulse source makes WOLFSIM as an efficient solver along with the PBCs. However, a special care must be taken to choose the time duration for sampling of field values to extract frequency information. Sampling of meaningless data can incur stacking of numerical errors. WOLFSIM provides an automatic option that determines the sampling duration and terminates simulations when the sampling is completed. Another source type is a sinusoidal/monochromatic wave. This source is useful especially to obtain field patterns in the near-field region. An automatic termination option is also provided for monochromatic simulations; it terminates a simulation when the system reaches the steady-state.


More general information of the FDTD method can be found in Ref.[1].


Key Features

2.1 Periodic Boundaries at oblique incidence

WOLFSIM is specially designed for analysis of optical elements with periodic structures. The Bloch periodic boundaries reduce the computation space into one period of the structure. The periodic boundary conditions (PBC) at a general angle of incidence are implemented in WOLFSIM using the split-field update technique. In addition, non-diagonal permittivity tensor is integrated with PBCs.


2.2 Wideband Simulation

One of key advantages of WOLFSIM is its capability of spectral analysis in a single simulation with wideband source such as a Gaussian pulse. Along with PBC, this wideband feature suggests WOLFSIM as an efficient simulation tool for analysis of periodic anisotropic media.


With a Gaussian incident pulse, the analysis can be done in the same frequency range of the pulse. To obtain a frequency response of the system, the program performs the discrete Fourier transformation (DFT) to the sampled field values during time-marching. The time duration for the DFT will be automatically determined. However, this automatic decision may not be working for certain cases. In that case, a user can determine the sampling duration manually instead of using the automatic option.


One also can select the single frequency modeling (usually, for obtaining field-map images). In this case, monochromatic light is illuminated to the problem structure. The simulation will end when the system reach the steady-state condition. This auto-termination can be disabled and one can manually terminate the simulation.


2.3 Multiple Layered Structures

WOLFSIM provides convenience of implementing stacked structures. Planar structures can be implemented simply by adding two lines of commends in "Input.txt". The dimensions and material parameters can be provided by either built-in functions or external files. We will explicitly show how to add structures in Section 3.2 and 3.3.


2.4 Polarization Analysis

WOLFSIM is designed for anisotropic media, where the polarization state of light is in the main considerations. One can define the polarization state of incident light from the two characteristic angles of the polarization elllipse: the orientation angle (ψ) and the ellipticity angle (χ). WOLFSIM provides the Stokes parameters, which describe the polarization state of light, for both the input and the output as simulation results.


Graphical User Interface (GUI) for WOLFSIM

WOLFSIM requires a separate data file -- "Input.txt" -- including simulation parameters. The new version of WOLFSIM (version 2.x.x) includes the graphical user interface WOLFSIM-GUIto manage the simulation parameters. WOLFSIM-GUI is a Java application so it is machine-independent. However you may need to install the latest version of Java on your system to run this application.


In this section, we provide a brief instructions for WOLFSIM-GUI. There are five different parts, which are separated by different tab windows: Settings, Model Definition, Iteration, Output, and Import/Export. Simple examples for each part will be presented throughout the section.


3.1 WOLFSIM-GUI

Start the Java GUI application with the name of "WOLFSIM-GUI.jar". In the first tab "About", you can find a brief introduction of the WOLFSIM and short descriptions for other four tabs.


Image:WOLFSIM_GUI.png


3.2 Simulation Setting

In the second tab "Settings", you can define the simulation parameters including the spatial grid resolution and the automatic termination and the source parameters as an input.


Image:Simulation_Setting.png


WOLFSIM normalize all dimensions by the wavelength of incident light.The wavelength λ0 is defined as the peak wavelength ofa Gaussian pulse (of course, a single wavelength for monochromatic light). The spatial grid resolution (N) is defined as the ratio of the center wavelength λ00 to the spatial grid spacing Δu Note that the WOLFSIM employs a square grid structure. The grid-spacing must be chosen with care because the sufficiently small grid-spacing is critical to get accurate results with less numerical dispersion errors. Typically, Δu is determined by the shortest wavelength of interest and the largest refractive index of the media as Δu=λmin/(20nmax). For example, when λmin=λ0/2 and nmax=1.5, the grid resolution N=60 is a good number for accurate simulation results.

The new WOLFSIM has an option for the auto-termination. This option allows to terminate the simulation by detecting the energy passing through the sampling line immediately after the problem structure. It is useful only when the problem structure is transparent or not absorbing too much and when the Gaussian pulse is defined well. Otherwise, you may want to disable the option and set the maximum time step to end the simulation manually.

The WOLFSIM employs the split-field method, which is one of the field transform techniques for periodic boundaries at oblique angles. The angle of incidence can be defined in this tab.

The computation space is terminated by applying PBC and PML absorbing boundary conditions. The system width can be determined from the common periodicity of whole structures to be modeled. Once you define the system period, you can set the period of each element when you define them in the "Model Definition" tab.

Polarization analysis is the most important feature of the WOLFSIM. You can define the incident polarization by two polarization angles of the polarization ellipse -- the orientation angle ψ and the ellipticity angle χ.

The simulation space can be split into three areas: incoming area, problem area, and outgoing area.The current version of WOLFSIM assumes transmissive elements as problem structures.The input wave is excited in the incoming area and sampling for analysis is done in the outgoing area.Additional options for reflective elements will be included in the next version.WOLFSIM also assumes homogeneous dielectric media in both the incoming and outgoing areas.

Finally, WOLFSIM has two incident mode: monochromatic and Gaussian. The monochromatic (sinusoidal) source is useful when you want to obtain the field map images in the near field region as well as the far field information. A spectral response of the system can be obtained with a Gaussian incident pulse:


Image:Gaussian_Equation.JPG


where P0 is the complex amplitude, t0 is the time delay, T is the time-domain pulse width, and f0 is the peak frequency of the pulse.


Image:Gaussian.png


To define the Gaussian pulse, you need to set the peak wavelength (λ0) and the pulse width. We recommend to set the pulse width close to the time period at the peak wavelength, which normally generate useful data within a frequency range (f0/2<2f0) or a spectral range (λ0/2<λ<2λ0). For example, when λ0=1μm, the pulse width T=λ0/c=3.333fsec. The frequency information is extracted by applying the discrete Fourier transformation (DFT) for the far-field information. If your pulse width is too short, you may encounter numerical dispersion errors. If your pulse width is too long, the auto-termination option may not work properly. In this case, disable the auto-termination option and set the end point for the simulation. Still, the DFT will start automatically by detecting the energy passing through the sampling line.


3.3 Model Definition

The new WOLFSIM provides the built-in definitions for ten different structures: Gradient Anti-Refraction (AR) coating, Circular Polarization Grating (PG), Linear Polarization Grating (PG), Dielectric Slab, Lossy Dielectric Slab, Twisted-Nematic Liquid Crystal (TNLC) cells, Sinusoidal Phase Grating, Binary Phase Grating, Waveplate, and Micro-Prism films. You can add structures simply by defining dimensions and material parameters that are required to define each type of structures.


Image:Wolfsim_Structures.png


Once you define each structure, you can easily review the properties of individual structures by selecting in the scroll window. The preview highlights the structure that you select and shows the type of the structure and its dimensions and material properties. You can also edit/remove structures if needed.


Image:Structure_Preview.png


You can also define arbitrary structure using the "Custom" structure. First, you need to define the thickness of the structure. Then you can specify the directory containing material parameters (complex refractive indices and Euler angles). Total of nine data files in the text format ("*.txt") are required to define the custom structure. Each of data files contains information of material properties at every grid pointin the area where the custom structure is placed. The permittivity tensorat a grid point (x,y)=(i,j) can be defined by three complex refractive indices (n+ik) and three Euler angles (α, β, γ) [5]:



where T is the transformation matrix given by


Image:Transformation_Matrix.JPG


where ε1,2,3=(n1,2,3)2-(k1,2,3)2 (n1,2,3 and k1,2,3 are real and imaginary parts of the complex refractive indices, respectively, corresponding to the principal axes). Data for n1,2,3, k1,2,3, and Euler angles (α, β, γ) should be provided from external data files named "n1.txt", "n2.txt", "n3.txt", "k1.txt", "k2.txt", "k3.txt", "alpha.txt", "beta.txt", and "gamma.txt" in the specified directory. The optical conductivities (σ1,2,3) are calculated from the values of k1,2,3 by the relationship:σ1,2,3=(4πε0f)n1,2,3k1,2,3.


Image:Custom_Structure.png


We should note that, for lossy dielectrics with anisotropy in absorption, the WOLFSIM can model the media only when the orientation of anisotropy lies in one of the major axes (x, y, or z). Therefore, the Euler angles must be zero when k1,2,3 are nonzero. In addition, the WOLFSIM can model only dielectric media whose dielectric constant (ε1,2,3) is same as or greater than 1.0 so that n1,2,3k1,2,3 should be satisfied.

One can generate these tables using Excel or Matlab. The dimensions of these tables must be matched to that of the grid space. For example, if the structure is 2μm thick and 10μm wide and the grid spacing Δu=10nm, the dimensions of tables should be (200,1000). Remember that the width of the custom structure must be same as the system period. In the current version of WOLFSIM, only one custom structure can beadded. Still, there is no limit of a combination with multiple built-in structures.


3.4 Iterative Simulation

The new WOLFSIM provides options for simulations with variable parameters such as periods and incident angles. When the option for multiple simulations in the "Iteration" tab, two different options will appear to set the minimum and maximum values for the simulation variable and the step size between simulations as well. The current version includes this option for period and incident angle but we are welcome to get your suggestions for additional options.


Image:Period_Iteration.png


3.5 Output Options Simulation results can be stored by selecting options in the "Output" tab. One of the main change in the new WOLFSIM is the output data format in HDF5. HDF5 is one of the most advanced scientific data format. To access the data, you can use another software called "HDFView"or you can import the HDF5 files in Matlab or many other softwares such as Maple or Mathematica. More information can be found in another documentation "Installation Guide".


Image:Wolfsim_Output.png


The WOLFSIM without HDF5 is also available for users who don't want to use HDF5. In this case, the ASCII is the default data format for output files.

3.6 Input File Generation

The final step is to save the input file "Input.txt". You can generate the input file using the button named "Generate File" in the "Import/Export" tab.


Image:Wolfsim_Save_Input.png


You also can load the pre-existing input file from your local directory.


Image:Wolfsim_Load_Input.png


Now you are ready to run a simulation with the WOLFSIM. For examples of WOLFSIM applications, go to the next section Examples.


References

  1. A. Taflove and S. C. Hagness, Computational electrodynamics: finite-difference time-domain method, 2nded. (Artech House, Norwood, MA, 2000).
  2. K. S. Yee, "Numerical solution of initial boundary value problems involving Maxwell´s equations inisotropic media," IEEE Trans. Antennas Propag. 14, pp. 302-307 (1966).
  3. C. Oh and M. J. Escuti, "Time-domain analysis of periodic anisotropic media at oblique incidence: anefficient FDTD implementation," Opt. Express 14, pp. 11870-11884 (2006). Link
  4. S. D. Gedney, "An anisotropic perfectly matched layer-absorbing medium for the truncation of FDTDlattices," IEEE Trans. Antennas Propag. 44, pp. 1630-1639 (1996).
  5. G. B. Arfken and H. J. Weber, Mathematical methods for physicists, 4th ed. (Academic Press, San Diego,1995).