FDTD Getting Started Manual
FDTD Getting Started Manual
Getting Started
Release 8.6
Contents
Table of Contents
Part I Introduction
1 2 3 4 What is............................................................................................................ FDTD? FDTD Solutions ............................................................................................................ GUI Running ............................................................................................................ Simulations and Optimizations Analyzing ............................................................................................................ simulation data
2
3 4 7 9
12
26
44
Getting Started
Introduction
The goal of the Getting Started Guide is to introduce FDTD Solutions and demonstrate how it can be used to model a number of simple systems. The FDTD algorithm is useful for design and investigation in a wide variety of applications involving the propagation of electromagnetic radiation through complicated media. It is especially useful for describing radiation incident upon or propagating through structures with strong scattering or diffractive properties. The available alternative computational methods - often relying on approximate models - frequently provide inaccurate results. FDTD Solutions is useful for numerous engineering problems of commercial interest including: integrated optical components display technologies optical storage devices OLED design biophotonic sensors plasmon polariton resonance devices optical waveguide devices photonic crystal devices LCD devices FDTD Solutions is an accurate and easy to use, versatile design tool capable of treating this wide variety of applications. This introductory chapter of the Getting Started Guide introduces the general FDTD method and provides a basic overview of the product usage. The final sections contain examples that are accompanied by step-by-step instructions so that you can set up and run the simulations yourself. Application Type Particle Scattering Description Calculation of the absorption, scattering and extinction crosssections of a sub-wavelength particle. Determination of the insertion loss or return loss, and frequency response of waveguide-based components. Manufacturing tolerances are also calculated. Analysis of resonant modes and the corresponding decay Example Silver nanowire resonant scattering 12
Waveguide Devices
1.1
What is FDTD?
The Finite Difference Time Domain (FDTD) method has become the state-of-the-art method for solving Maxwells equations in complex geometries. It is a fully vectorial method that naturally gives both time domain, and frequency domain information to the user, offering unique insight into all types of problems and appFDTDlications in electromagnetics and photonics. The technique is discrete in both space and time. The electromagnetic fields and structural materials of interest are described on a discrete mesh made up of so-called Yee cells. Maxwells equations are solved discretely in time, where the time step used is related to the mesh size through the speed of light. This technique is an exact representation of Maxwells equations in the limit that the mesh cell size goes to zero.
Structures to be simulated can have a wide variety of electromagnetic material properties. Light sources may be added to the simulation. The FDTD method is used to calculate how the EM fields propagate from the source through the structure. Subsequent iteration results in the electromagnetic field propagation in time. Typically, the simulation is run until there are essentially no electromagnetic fields left in the simulation region. Time domain information can be recorded at any spatial point (or group of points). This data can be recorded for the duration of the simulation, or it can be recorded as a series of "snapshots" at times specified by the user. Frequency domain information at any spatial point (or group of points) may be obtained through the Fourier transform of the time domain information at that point. Thus, the
Getting Started frequency dependence of power flow and modal profiles may be obtained over a wide range of frequencies from a single simulation. In addition, results obtained in the near field using the FDTD technique may be transformed to the far field, in applications where scattering patterns are important. More information about the FDTD method, including references, can be found in the Physics of the FDTD Algorithm section of the reference guide.
1.2
Introduction
In the default configuration some of the Windows are hidden. To open hidden windows, click the right mouse button anywhere on the main title bar or the toolbar to get the pop up window shown in the screen shot below. The visible windows/toolbars have a check mark next to their name; the hidden ones do not have check marks. A second way to obtain the pop up window is to go to the main title toolbar and select VIEW->WINDOWS. For more information about the toolbars and windows see the Layout editor section of the reference guide.
Getting Started
Also notice that the picture for the COMPONENTS button will change depending on what the last component that was added to the simulation was. Finally, the ZOOM EXTENT button in the toolbar will resize the viewports to fit all the objects currently included in the simulation.
Edit objects
To edit an object, select the object and press E on the keyboard or press the EDIT button on the toolbar. The easiest way to select an object is to click on the name of the object in the objects tree. However, objects can also be selected by clicking on the graphical depiction of them when the SELECT button is pressed. For more information see the Layout editor section of the reference guide. When we edit objects in FDTD, we get an edit window. The edit windows have units for the settings; in the GEOMETRY tab, the x, y and z location will be in m by default. The units can be changed to nm if we choose SETTINGS->LENGTH units in the main menu. Fields in the edit windows act like calculators, so that equations can be entered in the fields. See the y span field below for an example.
Introduction
1.3
Getting Started In this topic Check memory requirements 8 Check material fits 8 Setup parallel options 8 Run simulation 8 Run parameter sweeps and optimizations
9
The CHECK button also contains a material explorer option . Many of the materials used in FDTD Simulations come from experimental data (see the materials section of the Reference Guide for references for the material data and descriptions of the FDTD material models). Before running a simulation, FDTD Solutions automatically generates a multi-coefficient model fit to the material data in the wavelength range for the source. It is a good idea to check and optimize the material fit before running a simulation.
be accessed by pressing the Resources button . In most cases, the default settings should be fine. The 'number of processes' is typically set to the number of cores in your computer.
Run simulation
Introduction
You can run simulations by pressing the RUN button on the mail toolbar. For more details, such as how to run multiple simulations in distributed mode, please see the Run Simulations section in the online User Guide, or the Running simulations and analysis section of the Reference Guide.
1.4
Result analysis
The Results Manager is a tool for analyzing simulation data. The Results View window shows all the results for the simulation object that is currently selected in the Object Tree. The Script Workspace and Script Favorites windows work in conjunction with the scripting environment to provide additional GUI-based functionalities.
10
Getting Started
When used in conjunction with the Visualizer, the Results Manager provides a very useful and intuitive way of analyzing and visualizing variables and results through the GUI.
More complex analysis can also be carried out in FDTD Solutions' powerful scripting
Introduction environment.
11
Scripting
FDTD Solutions contains a built in scripting language which can be used to obtain simulation data, and do plotting or post-processing of data. The script prompt can be used to execute a few commands, or the built in script file editor can be used to create more complex scripts. A thorough introduction to the Lumerical scripting language can be found in the Scripting section of the FDTD Solutions online user guide. Definitions for all of the script commands are given in the Scripting language chapter in the Reference Guide.
Data Export
FDTD simulation data can be exported into text file format using the Visualizer, into a Lumerical data file format (*.ldf) which can be loaded into another simulation, or into a Matlab data (*.mat) file. Instructions for exporting to these file formats can be found in the links under the Scripting section.
12
Getting Started
17
( )
, where Pscat is the total scattered power [W] and Iinc is the incident intensity [W/m2]. In 2D, power is described per unit length [W/m], and thus the scattering cross-section has dimensions of length. The total scattered power can be calculated by summing the power flowing outward through the four power monitors located in the scattered field region of the Simulation Area. The absorption cross-section is similarly defined as
Pscat( ) Isource( )
13
abs
( )
, where Pabs is the total power absorbed by the particle. The power absorbed by the particle can be calculated by calculating the net power flowing inward through the four monitors located in the total field region of the Simulation Area. The extinction cross-section is the sum of the absorption and scattering cross-sections
ext
Pabs( ) Iinc( )
( )
abs
( )
scat
( )
2.1
14
Getting Started
In the graphical user interface (CAD), orange lines show the FDTD mesh if desired. There are two different regions: A graded mesh region (automatic mesh) and a mesh override region. When using automatic meshing, the mesh size is based on the refractive index. A higher index material will have a smaller step size, inversely proportional to the index. When a material has a complex index, both the real and imaginary parts are considered by the automatic mesh algorithm. However, accurate modeling of small geometric features, particularly when there is a high index contrast between materials combined with curved or angled interfaces, sometimes requires a finer mesh than is created by the automatic mesh algorithm. In these cases, a mesh override region can be used, as in this example, to manually define a finer mesh where it is needed. The above screen shot does not show the full simulation region. Although we are not interested in obtaining any data outside of the largest yellow monitor box shown above, the simulation span is set to be much larger. We set the simulation to be larger because the boundaries are PML. PML absorbs incident radiation, but can also absorb energy from evanescent fields. Hence, the PML should be placed far enough away from the structure so that it does not interact with evanescent fields. In this case, the PML is about a full wavelength from the structure. The Ag (Silver) material used for the nanowire is defined with experimental data, rather than an analytic model. A material model is automatically calculated based on the experimental refractive index data over the source bandwidth. We can check the material fit (see image below) in the Material Explorer before running the simulation. The material fit, named FDTD model in the legend, can be adjusted by changing the Max coefficients and Tolerance parameters in the Material Explorer.
15
We can see from the above plot that the material data has an index that is on the same order of magnitude as the background index of 1. Also, we are able to simulate this problem at a small mesh size of 1nm or less. For this reason, we can change the mesh refinement option to "conformal variant 1" to take full advantage of the conformal meshing feature, even for a metal like silver. Note that "conformal variant 1" is a good option here because there is low index contrast, however "conformal variant 1" is not always a good option for metals (the default conformal mesh will revert to staircasing for interfaces involving metals and PECs). Please see Mesh refinement and Conformal mesh for more detail. Note that in the screenshot of the simulation above, there is a yellow cross. This cross gives the location of a time domain monitor. Time domain monitors are used in FDTD simulations to check that the fields have decayed by the end of the simulation. If the fields have not properly decayed, the simulation results can be incorrect. By default, FDTD Solutions has a simulation time of 1000fs and shuts off the simulations early if the field strength has decayed to a user defined fraction of the peak field strength. Below, you can see a plot of the x component of the E field. Notice that the simulation shut off early at 32fs.
16
Getting Started
Results
Scattering, absorption and extinction cross-sections can be computed analytically for the nanowire. We have precalculated the theory for this specific material and saved it in the associated file, nanowire_theory.csv, from the first page of this getting started example. Below, the leftmost figure shows the cross-sections obtained with from the FDTD simulation in comparison with the analytic results. Clearly there is very good agreement. The second figure shows the same results from FDTD, but analytic results for a radius of 24 and 26 nm. Since the simulation used a 1nm mesh, it is reasonable to expect the FDTD results to be accurate to within these results. We can see from the figure that this is true.
17
The above image shows that the maximum extinction occurs near 345nm. We can plot the intensity of the y component of the E field as shown in the image below calculated with a 0.5nm mesh.
2.2
Modeling instructions
This page contains 2 independent sections. The simulation can be set up from a new 2D simulation, beginning at the Set up Model section. Otherwise the associated files (which you can find at the locations given on the first page of the tutorial) can be used to start at the second section. In this topic
18
Getting Started Set up model 18 Run simulation, plot cross sections Compare with theoretical results 23 Plot near field data 24
21
Set up model
Open a blank simulation file. For instructions see the FDTD Solutions GUI page Introduction to the Getting Started Examples.
7
in the
Press the arrow on the STRUCTURES button and select a CIRCLE from the pull-down menu. Set the properties of the circle according to the following table. tab property name Geometry x (nm) y (nm) z (nm) radius (nm) Material material value nanowire 0 0 0 25 Ag (Silver) - Palik (0-2um)
Press the SIMULATION button to add a simulation region. Note that if your button does not look like the button to the left, you will need to press on the arrow to get the simulation region. Set the properties according to the following table. tab General property simulation time (fs) dimension Geometry x (nm) y (nm) z (nm) x span (nm) y span (nm) Mesh Settings mesh accuracy value 200 2D 0 0 0 800 800 4
19
conformal variant 1
Note that since we are using a 2D simulation region, properties such as "z span" are irrelevant. The setting for these properties will be omitted for the remainder of the modeling instructions, and the default values (at z = 0) can be used.
from the pull-down menu. Set the properties according to the following table. tab General property dx (nm) dy (nm) Geometry x (nm) y (nm) x span (nm) y span (nm) value 1 1 0 0 110 110
Press the arrow on the SOURCES button and select the Total-field scatterfield (TFSF) source from the pull-down menu. Set the properties according to the following table: tab General Geometry property polarization angle x (nm) y (nm) x span (nm) y span (nm) Frequency/Wavelength Wavelength start (nm) Wavelength stop (nm) value 0 0 0 100 100 300 400
20
Getting Started
Press the arrow on the ANALYSIS button and select OPTICAL POWER from the pull-down menu. This will open the object library window. Insert a CROSS SECTION analysis group and set the properties of this group according to the following table. tab property name Setup Variables x (nm) y (nm) x span (nm) y span (nm) z span (nm) value scat 0 0 110 110 110*
* The Z span value is not important, since this is a 2D simulation in the XY plane. Make a copy of "scat" with the COPY button according to the following table. tab property name Setup Variables x (nm) y (nm) x span (nm) y span (nm) and set the properties of this group value total 0 0 90 90
Press the arrow on the MONITORS button and select GLOBAL PROPERTIES from the pull-down menu. Set the FREQUENCY POINTS to 100. Press the arrow on the MONITORS button and select the FIELD TIME monitor from the pull-down menu. Set the monitor properties according to the following table. tab property name Geometry x (nm) value time 28
21
memory requirements" button to view the simulation and memory report. Next, check if the mesh is fine enough using the VIEW SIMULATION MESH button and ZOOM button in the toolbars. For more information about how to use these tools, see the Layout editor section of the reference guide.
Press the Resources button and check the number of processes (number of cores) for the local machine. Then, press the "Run Tests" button to make sure the simulation engine is configured correctly. The first time you run this test, it may fail and ask you to register your username and password for your operating system account. If it does, fill in the appropriate text fields, press "Register", then "OK", and re-run the tests.
Run the simulation by pressing the RUN button . Once the simulation finishes running, all the monitors and analysis groups in the object tree will be populated with data. The Results View window will show all the results and their corresponding dimensions/values for the selected object. Plot the time domain data by right-clicking on the time monitor and selecting Visualize -> E.
22
Getting Started
You can then select which components of the E field data you want to plot in the Visualizer. The screenshot below shows how to plot the real part of the x component of the electric field.
To plot the cross section results, right-click on the "scat" and "total" analysis groups,
23
and select "Run analysis". This will run the analysis scripts in the analysis groups to calculate the cross section results. Right-click again on the "scat analysis group, and you will see an option to Visualize>sigma, which will plot the scattering cross section as a function of frequency in the Visualizer. To plot the result as a function of wavelength, simply change the "Parameter" option (near the bottom of the Visualizer) from "f" to "wavelength". You can also change the "Units" to nanometers on the right side of the Parameters section. Without closing the Visualizer, go back to the object tree and right-click on the "total' analysis group, and select add to visualize1->sigma, which will plot the 2 cross section results in the same Visualizer. Note that the absorption cross section is actually the negative of the result returned by "total", since we want the power flowing into the box, rather than out of the box. You can add a negative sign to the result in the Visualizer under "Scalar operation".
24
Getting Started theoretical calculations will have to done through the scripting environment. Open the script file editor (for instructions on how to do this see the Introduction section of the Getting Started examples 4 ). Get the "plotcs.lsf" script file from the first page of this application example. Then use the OPEN SCRIPT button file. to browse to and open the "plotcs.lsf" script
Run the script file using the RUN SCRIPT button which is found on the Script File Editor window This will create the two plots of the cross sections seen in the discussion and results section.
Run the simulation again by pressing on the RUN button Once the simulation has run to completion, plot the profile monitor data with the Visualizer (right-click -> Visualize -> E). You can plot the image in a new widow by clicking the "Plot in new window" button. Go to the SETTINGS menu in the new figure and set the colorbar limits. To obtain the
25
exact same plot as in the discussion and results section, set the colorbar min was to 0, and the colorbar max to 5.
26
Getting Started
34
See also Online User Guide -> Monitors and Analysis Groups -> Making a cw movie
27
3.1
The ring resonator is a high Q device which traps the light for many round trips in the ring. These high Q devices require longer simulation times in the time domain than non-resonant
28
Getting Started devices. Based on the MODE Solutions example, we will start with a simulation time of 4000fs, although more time may be necessary. This is longer than our default simulation time (1000fs). It is important to increase the simulation time because the frequency domain monitor results are incorrect if the simulation time is not set long enough for the fields to decay. Further discussion based on this example can be found in the our Online User Guide -> Monitors and Analysis Groups > Simulation time and Frequency domain monitors.
Results
Initially, we set the mesh accuracy to 1 and run the simulation. It is a good idea to run simulation at very low mesh accuracy while they run quickly to be sure that most settings are correct and that we are obtaining reasonable results. The simulation will run in about 5 minutes or less on a modern workstation. Please refer to the Modeling Instructions 17 page for detailed information on how to generate some of the plots below. The plot to the left below shows the Ey field in the drop channel. Notice that the initial peaks are rapidly distorted due to dispersion. The figure on the right shows the associated spectrum at the drop channel. As expected, we see resonances approximately every 25.6nm. We also notice that some of the resonances are split. This is in fact an effect of coupling between forward and backward propagating modes in the ring which are weakly coupled and which leads to a Rabbi splitting. In principle, the backward propagating modes should not be excited, however, there is some scattering to backward propagating modes each time the waveguides are close together. This effect is made worse by the very low mesh accuracy, which can also introduce backscattering throughout the ring due to staircasing effects. We will see that these effects are significantly reduced as we increase the mesh accuracy. Nonetheless, backscattering effects can have important consequences in real devices.
29
The figure below shows the magnetic field intensity at 1.52 microns in the device. Here we clearly see the standing wave pattern from forward and backward propagating modes, which leads to the Rabbi splitting observed at the 1.53 micron resonance. Note that this causes light to be reflected back into the source and to output both forward and backward at the drop waveguide.
We can rerun the simulation with a mesh accuracy of 2. This will take 25 minutes or less on a modern workstation to run the full 4000fs. We can select the through and drop channels to quickly plot the transmission in these waveguides using a visualizer. The ripples in the result are an indication that the fields in the ring have not fully decayed before the end of the simulation, as these ripples are characteristic of the fourier transform of a time signal that is truncated. We also notice that the splitting of the peaks has disappeared, indicating that the coupling to backward propagating modes was artificially large due to the extremely coarse mesh used. However, we will see that there is still backward propagating light generated and it would be worth doing some convergence testing of the mesh size, particularly around the waveguide coupling region, to determine how significant a problem this might be for an actual device.
30
Getting Started
The following lines of script will also export the drop results in a format that can be used for MODE Solutions to compare with the MODE Solutions results. Tdrop_3DFDTD = -transmission("drop"); lambda_3DFDTD = c/getdata("drop","f"); savedata("fdtd_results.ldf",Tdrop_3DFDTD,lambda_3DFDTD); We can also obtain the spatial field profiles at various frequencies. The right image below shows |E|^2 at 1.6 microns, where almost all the light is transmitted to the through channel. The left image is shown at 1.5238 microns, where we begin to see light resonate more strongly in the ring. Once the spectrum is determined of course, we can adjust the wavelength of our profile monitor to capture the fields precisely on and off resonance.
31
Parameter extraction
The ring resonator is a 4 port device, which we we can label 1 through 4, as shown below. We can use a mode expansion monitor to calculate the complex mode expansion coefficient for both forward and propagating modes in each waveguide. This allows us to easily construct the 16 parameter S matrix which can be exported for use in INTERCONNECT. In reality, this device is so symmetric, that only 4 coefficients of the S matrix need to be calculated - for example, S11=S22=S33=S44.
32
Getting Started The mode expansion monitor is setup to calculate the amount of forward and backward propagating power in the fundamental TE mode for the 4 monitors at the input and output ports. First, we can look at this in the Visualizer. Note that this analysis takes several seconds because each waveguide mode is recorded over 500 frequency points. To speed up the calculation, we have used a single mode at the center frequency for the expansion, however we could calculate more mode profiles over the device bandwidth to obtain a more accurate expansion. Once calculated, the expansion is stored in memory and will be saved to the fsp file for quick future reference. The figure below shows the amount of power reflected in port 1 and transmitted through ports 2, 3 and 4. It is interesting to note the resonant reflection and transmission that is occurring at port 1 and port 4. The power reflected and leaking out port 4 is equivalent. As discussed above, these are due to weak coupling between forward and backward propagating modes in the ring, which can have a substantial effect due to the high Q of the device.
The model itself is an analysis group that is setup to calculate the S parameters. Select the model and use the Results Manager to calculate the S matrix. During the calculation, S11, S21, S31 and S41 are saved to the text file FDTDtoINTERCONNECT.txt which can be used to create a ring resonator element in INTERCONNECT. The different S parameters
33
can be easily visualized. For example, below we see the phase of S21 and S31. We can see the effect of the resonances which lead to sudden changes in the slope of the phase which indicates the sudden change in group delay at resonance. There is still a reasonable amount of ripple in S21 that could clearly lead to incorrect interpretations of the group delay of the ring, these could be removed by running a longer simulation.
34
Getting Started The mesh size should be tested at a mesh accuracy of 3 and possibly even 4. It may also be necessary to use a mesh override region near the waveguide coupling regions to force a fine mesh in those regions because the coupling of the forward and backward propagating modes appears to be sensitive to the mesh used in this region.
2D Approximation to 3D Geometries
3D simulations are much more CPU-time and memory intensive than 2D simulations. The ring resonator example we reference using MODE Solutions collapses the z dimension in a physically meaningful way and is then able to run a 2D FDTD simulation much more quickly, while still maintaining the accuracy of important results like the filter FSR. It is also possible run a 2D simulation in FDTD, using a material with the effective index of the slab modes supported in the Si layer. However, using a constant effective index will not give the correct FSR for the device, which depends on the group index of the waveguide modes. Therefore, we recommend doing the initial design and optimization in MODE Solutions, then moving to 3D FDTD for final optimization and accurate parameter extraction.
3.2
Modeling instructions
This page contains 4 independent sections. The first section (Object setup) describes how to setup the simulation from a blank simulation file. If you prefer to skip this section, a copy of the completed simulation file is provided on the first page of the tutorial. The final three sections describe how to run the simulation, plot simulation results like field profiles and transmission spectra, and calculate the S parameters for this ring resonator device. In this topic Object setup 34 Run simulation 40 Plot results 40 Calculate S parameters
42
Object setup
We will start with the geometric parameters determined in the MODE Solutions getting started example. Structure Open a blank simulation file. For instructions see the FDTD Solutions GUI page 7 in the Introduction to the Getting Started Examples. Press on aarrow on the STRUCTURES button and select a RECTANGLE from the pulldown menu. Set the properties of the insulator substrate rectangle according to the following table.
Ring Resonator Tutorial tab Geometry property x ( m) x span ( m) y ( m) y span ( m) z ( m) z span ( m) Material material value 0 22 0 16 -2 4 SiO2 (Glass) - Palik
35
Press on arrow on the COMPONENTS button and select INTEGRATED OPTICS from the pull-down menu. This will open the object library window. Select RING RESONATOR from the list and press the INSERT button. Set the properties of the ring resonator according to the following table. The coupling length and radius used for the first part of the simulation are just an initial guess and will be modified to the correct values later. The value of the index property of the ring resonator is not used unless the material is specified as <Object defined dielectric>, so it's value can be arbitrary. tab Properties property x, y ( m) z ( m) Lc ( m) gap ( m) radius ( m) material wg width ( m) z span ( m) x span ( m) FDTD Region value 0 0.09 0 0.1 3.1 Si (Silicon) - Palik 0.4 0.18 25
36
Getting Started your button does not look like the button to the left, you will need to press on the arrow to get the simulation region. Set the properties according to the following table. tab General Geometry property simulation time (fs) x ( m) x span ( m) y ( m) y span ( m) z ( m) z span ( m) Mesh settings Source mesh accuracy value 4000 0 9 0 10 0 1 1 or 2
Press the arrow on the on the SOURCES button and select the MODE source from the pull-down menu. Set the properties according to the following table. tab General Geometry property mode selection x ( m) y ( m) y span ( m) z (um) z span (um) Frequency/ Wavelength wavelength start ( m) wavelength stop ( m) Monitors We will set up power monitors at the 4 ports of the ring resonator to calculate the transmission through each port, and the S parameters. value fundamental TE mode -4.5 3.6 3 0 2 1.5 1.6
37
Press on the arrow on Monitors button and power monitor following table tab
from the pull-down menu. Set the properties according to the property name value drop 2D X-normal -4.2 -3.6 3 0 2 to create three copies of the monitor. Set the
Geometry
properties according to the following tables. tab property name Geometry x ( m) y ( m) tab property name Geometry x ( m) y ( m) tab property name Geometry x ( m) value drop2 4.2 -3.6 value in -4.2 3.6 value through 4.2
38
We will also place time monitors at each port to study the field as a function of time. Press on the arrow on the on the Monitors button and select the field time monitor from the pull-down menu. Set the properties according to the following table tab property name Geometry x ( m) y ( m) value t_drop -4.2 -3.6
Use the DUPLICATE button to create three copies of the monitor. Set the properties according to the following tables. tab property Name Geometry x ( m) y ( m) tab property name Geometry x ( m) y ( m) tab property name Geometry x ( m) y ( m) value t_drop2 4.2 -3.6 value t_in -4.2 3.6 value t_through 4.2 3.6
We will also add a profile monitor to study the field distribution at different frequencies.
Press on the arrow on the Monitors button and select the frequency domain field monitor from the pull-down menu. Set the properties according to the following table. tab property value
Ring Resonator Tutorial name General override global monitor settings frequency points Geometry monitor type x ( m) y ( m) x span ( m) y span (um) z (um) full_profile select check box 5 2D Z-normal 0 0 16 12 0
39
Lastly, we will add the Mode expansion monitor for the S parameters calculation. Press on the arrow on the Monitors button again and select the Mode expansion monitor from the pull-down menu. Set the properties according to the following table. tab property name Geometry monitor type x ( m) y ( m) y span ( m) z (um) z span (um) value expansion 2D X-normal -4.2 3.6 3 0 2
We have positioned this monitor directly in front of the MODE source, and we will use the fundamental mode of the top waveguide to expand the field at the 4 ports of the ring resonator. In the Mode expansion tab, select the fundamental TE mode for "MODE calculation". You can use the Visualize Mode Data button to study the field profile for this mode. In the "Monitors for expansion tabl"e, select the 4 power monitors we have set up at the 4 ports of the Ring Resonator as follows:
40
Getting Started
Plot results
Once the simulation finishes running, all the monitors and analysis groups in the object tree will be populated with data. The Results View window (which can be opened by clicking on the "Show result view" button) will display all the results and their corresponding dimensions/values for the selected object. Plot the time signal and spectrum Ey by right-clicking on the "t_drop" time monitor and selecting Visualize -> E or spectrum.
41
You can then select which components of the E field data you want to plot in the Visualizer. The screenshot below shows how to plot the real part of the y component of the electric field.
To plot the transmission through the through monitor, right-click on the "through" power monitor and select Visualize->T. To plot the magnetic field intensity at 1.52 microns, right-click on the full_profile monitor and select Visualize->H and select the appropriate wavelength.
42
Getting Started
Calculate S Parameters
The model analysis group in the provided pre-made simulation file has been set up to calculate the S parameters. Since the expansion monitor automatically returns the expansion coefficients for the forward and backward propagating light (a and b), we can calculate the S parameters very straightforwardly. The calculations can be found in the script under the Analysis tab of the "model" group, this script will also export the S parameter results into a .txt file, which can be imported directly by INTERCONNECT.
43
As shown in the figures above, the Results View will automatically show the S parameters result returned by the model analysis group. One can then visualize this result by right-clicking on "S" and selecting Visualize.
44
Getting Started
4.1
45
When we construct this structure in FDTD Solutions, we create the slab out of a rectangle. Then we add cylinders to the simulation for the holes. In the locations where the holes and the slab overlap, we use the mesh order property to make sure that FDTD Solutions uses the refractive index data from the holes (cylinders) instead of from the slab (rectangle). For more details about mesh order, refer to the mesh order page in the Reference Guide. Two dipole sources (depicted with green arrows to show the direction of the H field) are used to excite the modes of the cavity. These dipoles are not located in the center of the PC structure in order to reduce the chance that they are located at a zero of the cavity mode. The dipole sources are used to inject energy into the simulation volume. Some of the dipole radiation will be coupled into the cavity modes and decay slowly. The radiation which does not get coupled into the cavity modes will be scattered and quickly exit the simulation volume. The frequency domain monitors in FDTD simulations calculate the mode profile by taking a discrete Fourier Transform of the time domain data. Obviously, we do not want to include the portion of the time signal at the beginning of the simulation, since it contains radiation which does not excite the modes; we are only interested in the later portion of the time signal when all the energy left in the cavity is in the resonant modes. As you can see in the modeling instructions on the next page, we can use monitor apodization to select only the portion of the time data at which all the energy left in the simulation is in the resonant modes. A more in depth discussion of monitor apodization (also based on a PC cavity) can be found in the Online User Guide->Monitors and Analysis Groups->Apodization. The rest of this set up section discusses some important simulation settings, namely the boundary conditions, the mesh and the simulation time.
46
Getting Started Boundary Conditions The orange boundaries which can be seen in the screenshot above are Perfectly Matched Layer (PML) boundary conditions. PML boundaries absorb incident radiation, and are intended to absorb all radiation propagating away from the cavity. It is important to leave some distance between the cavity and the PML boundaries. If the boundaries are too close to the cavity, they will start to absorb the non-propagating local evanescent fields that exist within the cavity. A simple rule is to leave at least half a wavelength of distance above and below the structure. Next, notice that the lower half of the simulation (z<0) is shaded blue. This is because we used a symmetric boundary condition on the z min boundary in order to reduce the computation time by a factor of two. The drawback of using the symmetric boundary condition is that it will forbid certain modes from appearing in the results (modes that do not exhibit the same symmetry relation as the boundary condition). For this PC cavity, there is a plane of symmetry through the center of the slab (z=0 plane). Using a symmetric boundary condition on this plane will only allow TE-like modes and eliminate TM-like modes from the results. Note that the reason the dipoles are located z=0 is because this is the ideal location for the sources. Magnetic dipoles will have an E field pointing along the z=0 plane. The blue color of the symmetric boundary condition is intentional; it indicates that the E field should lie along (be parallel to) this boundary. Most sources in FDTD Solutions contain blue arrows which show the E field. These should always lie on blue boundaries. Mesh To get good results for cavity simulation, it is important to include an integer number of mesh cells per lattice constant in the two directions. The wavelength in the material is on the order of = c / f / n = 3e8 / 160e12 / 2.0995 = 890 nm. We can expect reasonable accuracy with a /10 mesh. 8 points per period in the x direction gives a mesh size of 575nm/ 8 = 71.875nm. The mesh size will be smaller in the y direction since the lattice constant is 575*sin(60) nm. This should give reasonable accuracy while keeping the simulation time to a minimum. To make sure that the mesh can actually be an integer number of mesh cells, the simulation (FDTD) span has to fit exactly an integer number of mesh cells inside the boundaries. For this reason we set the x span of the FDTD region to 575*12nm and the y span of the FDTD region to 575*sin(60)*12nm By clicking the 'View mesh' button, it is possible to view the mesh around the structure. It is important that each hole is meshed in the same way. If the mesh lines fall at different locations with respect to the holes, each hole will have a slightly different size and shape in
47
Before running simulations with periodic structures, it is good practice to use an index monitor to check that the structure actually looks periodic when it is meshed. The index monitor results below show that each of the holes looks like a cross. This is because the mesh is a bit coarse. However, each cross (except for the 6 inner holes) looks identical. It is important to make sure that the holes all are meshed the same way, if we want to obtain good results. It is possible to view the meshed structure with the index monitor in layout mode (i.e. before the simulation has been run). The modeling instructions section on the next page contains step by step instructions of how to create index monitor plots.
48
Getting Started
Simulation time To obtain accurate frequency domain data, it is generally required to run the simulation until the time domain fields have decayed to zero. High quality factor cavity simulations are one exception to this rule. This is fortunate, since high Q modes decay very slowly. Running high Q cavity simulations long enough for the fields to fully decay would be very slow. A combination of time domain analysis and frequency domain apodization allow us to accurately calculate the Q-factor and profile of cavity modes without running the simulation until the fields decay. However, some care should still be taken when using this technique. Other measurements like power transmission and field amplitudes will not necessarily be correct when the simulation is stopped early.
Simulation Results
The simulation contains a Q analysis group, which contains a script that finds the resonance peaks and Q factors of the cavity modes. We have placed the Q factor group, which contains a time monitor, away from the origin of the simulation for exactly the same reason the dipoles are not placed at the origin. We can use the analysis script to obtain the largest two resonance peaks in the source bandwidth and their Q factors. It is easy to obtain more resonance peaks: Simply change the "number_resonances" parameter in the Analysis-> Variables tab of the Q analysis object.
49
We can also obtain a plot of the E fields as a function of time (below right) and a plot of the resonance peaks. The Q factor calculations are discussed in detail in the Cavities and Resonators section of the Online Help.
Once we know the resonance frequencies, the corresponding E field profiles can be plotted.
50
Getting Started
The image below shows real(Ey) for the mode at 201 THz.
51
for the mode of interest have a plane of anti-symmetry at X=0, and a plane of symmetry at Y=0. Whenever the EM fields have a plane of symmetry through the middle of the simulation region, using symmetrical boundary conditions will give the same results as running the full simulation. The plot below shows real(Ey) after we set the x min and y min boundary conditions to anti-symmetric/symmetric. This plot looks identical to the one above except for the magnitude. The change in magnitude arises because the sources have been mirrored, i,e in the full simulation there are only two sources, but by using symmetry we have mirrored these sources so that there are now 8.
52
Getting Started
4.2
Modeling instructions
This page contains 4 independent sections. The first section describes how to setup the cavity structure and the FDTD simulation region. Section 2 describes the source and monitor setup, and some initial analysis. Section 3 provides further information on using symmetry boundaries, and section 4 describes how to use the optimization feature of FDTD Solutions. In this topic Create PC and check material index 52 Add sources and monitors. Run simulation and get data. Symmetry 59 Optimize inner hole radius 60
56
in the
PC Micro Cavity Tutorial from the pull-down menu. Set the properties of the ring according to the following table. tab Geometry property x ( m) y ( m) z ( m) x span ( m) y span ( m) z span ( m) Material index value 0 0 0 10 10 1 2.0995
53
Press on arrow on the COMPONENTS button and select PHOTONIC CRYSTALS from the pull-down menu. This will open the object library window. Select HEXAGONAL LATTICE PC H-CAVITY from the list and press the INSERT button. Set the properties of the PC Cavity according to the following table. tab Properties property x ( m) y ( m) z ( m) material H number z span ( m) n side a ( m) radius value 0 0 0 etch 2 1 6 .575 .194
Press the DUPLICATE button to create a second copy of the hexagonal lattice PC cavity. Edit the properties according to the following table tab property value
54
Getting Started name Setup Variables x ( m) y ( m) z ( m) H number n side radius ( m) inner 0 0 0 1 2 .100
Press on the SIMULATION button to add a simulation region. Note that if your button does not look like the button to the left, you will need to press on the arrow to get the simulation region. Set the properties according to the following table. tab General Geometry property simulation time (fs) x ( m) y ( m) z ( m) x span ( m) y span ( m) z span ( m) Boundary conditions Advanced options z min bc force symmetric x mesh force symmetric y mesh force symmetric z mesh value 1500 0 0 0 12 * .575 12 * .575 * sqrt(3) / 2 3 Symmetric check check check
Note: Forcing a symmetric x mesh ensures that a mesh line lies at x=0, and therefore the mesh does not change when we switch the x min boundary condition from PML to symmetric or anti-symmetric. Strictly speaking we do not need this option for this particular simulation since we have set up the mesh in this example so that there will be a mesh line at x=0 anyways. Press on the arrow next the the SIMULATION button and select MESH OVERRIDE from the pull-down menu. Set the properties according to the following table.
PC Micro Cavity Tutorial tab General property dx ( m) dy ( m) override z mesh Geometry x ( m) y ( m) z ( m) x span ( m) y span ( m) z span ( m) value .575 / 8 .575 * sqrt(3) / 2 / 8 uncheck 0 0 0 10 10 1
55
Press on the arrow on the MONITORS button and select the INDEX monitor from the pull-down menu. Set the properties according to the following table. tab property name Geometry x ( m) y ( m) x span ( m) y span ( m) value index 0 0 10 10
Get the index monitor data: Note that to do this we need to start running the simulation index monitor data is collected during meshing so we just need to start simulation and get through meshing. Then we can exit:
To do this press the RUN button . This will start the simulation and show the job monitor window, which displays useful information about the current project. Initially the simulation will be meshing. As soon as the progress bar starts, it has finished meshing and you will be able to press SAVE & QUIT button to stop the simulation.
56
Getting Started
The index monitor data is collected during the initialization and meshing phase, and it will be correct even if the simulation is not complete. To look at the index monitor results, simply right-click on the index monitor and select Visualize->index.
Switch back to layout by pressing the SWITCH TO LAYOUT that we can continue setting up the rest of the simulation.
button. This is so
Press the arrow on the on the SOURCES button and select the DIPOLE source from the pull-down menu. Set the properties according to the following table. tab property name General Geometry dipole type x ( m) y ( m) Frequency/Wavelength frequency start (THz) frequency stop (THz) value dipole1 Magnetic dipole .1 .2 160 250
While the dipole is still selected, click the DUPLICATE button on the toolbar (or, use the keyboard shortcut key D). Set the name to dipole2 and the x location of the dipole to 0.3 microns.
57
Press the arrow on the on the ANALYSIS button and select RESONATORS from the pull-down menu. This will open the object library window. Insert the Q ANALYSIS analysis group. Set the location of the monitor to x = .4 m, y = .2 m and z = 0 m. Run simulation and get data: Get Q analysis data
Press the Resources button and check the number of processes (number of cores) for the local machine. If you have additional computers on the network with FDTD installed as well as extra engine licenses, you can add them to the resource list. Click "Add" and set the appropriate properties. Press the "Run Tests" button to make sure the simulation engines on the resources are configured correctly. The first time you run this test, it may fail and ask you to register your username and password for your operating system account. If it does, fill in the appropriate text fields, press "Register", then "OK", and re-run the tests. If there are any errors or warnings, they will appear in the "Result" field.
Run the simulation by pressing the RUN button . For more information about setting the parallel computing options see the Introduction section of the Getting Started examples 7 . Switch to the objects tree window (for instructions on how to do this see the Introduction section of the Getting Started examples 4 ). To get the Q factor of the cavity, right-click on the Qanalysis group and select "runanalysis". Alternatively, open the edit window for the Qanalysis group, and under the Analysis->Script window, press the RUN ANALYSIS button to run the script. Add profile monitor (now that we know the resonance frequencies for the structure)
Press the arrow on the MONITORS button and select the FREQUENCY DOMAIN FIELD PROFILE monitor from the pull-down menu. Set the monitor properties according to the following table. tab property name General override global monitor settings use source limits value profile check uncheck
58
Getting Started frequency points minimum frequency (THz) maximum frequency (THz) Geometry x ( m) y ( m) x span ( m) y span ( m) Spectral averaging and apodization apodization apodization center (fs) apodization time width (fs) Run simulation and get data: Get profile monitor data 2 201 209.5 0 0 10 10 Full 1000 250
Press the RUN button. Once the simulation has run to completion, plot the profile monitor data by right-clicking on the monitor and selecting Visualize->E. Set the scalar operation to "Abs^2" to plot the electric field intensity. This image corresponds to the result at the first frequency point. To plot the electric field intensity at other frequencies, simply move the frequency slider as shown below.
59
To plot real(Ey), simply select "Y" for Vector operation and "Re" for Scalar operation.
SYMMETRY
Press the SWITCH TO LAYOUT button. Edit the FDTD simulation region. In the BOUNDARY CONDITIONS tab, set "x min bc" to be "Anti-Symmetric" and "y min bc" to be "Symmetric". Press the RUN FDTD button to re-run the simulation. Visualize real(Ey) as shown in the visualizer screenshot above. For more information on using symmetry boundaries, see the Online help - User guide Simulation - Symmetry boundaries page.
60
Getting Started
Each generation of the optimization will create a temporary set of simulations to be run before being replaced by the next generation. The job monitor will show the individual progress for each simulation of a generation set. In the screenshot below, the simulation
61
is using both Local Host and Laptop to run through the iterations in parallel. Note that in distributed mode, the source fsp file must be stored on the network, accessible by all the computing resources.