To start with, we can check that the necessary materials for the simulation are available
in the Material Database.
Open the Material Database by clicking on the Materials button in the main toolbar.
The list of available materials is displayed in the Material List.
We will be using gold, glass and etch materials.
Click on a material to see the material data in the Material Properties section of the
The “etch” material is a material with refractive index 1, and we will use this material
to represent the etched holes in the gold film.
If the background index was not 1, then the refractive index of the “etch” material
would need to be modified to match the background index.
We will use the materials available in the default material database so it’s not necessary
to add any new materials.
The next step is to set up the structures.
Add a rectangle from the Structures drop down menu to represent the gold film.
Click the arrow next to the Structures button to open the menu.
Edit the rectangle.
There are several ways to open the edit window.
You do this by selecting the object in the Object Tree and clicking on the “Edit”
button in the toolbar on the left.
Or, you can use the “Edit” menu in the titlebar menu.
Here you can see that the keyboard shortcut to edit an object is “E”.
Finally, you can also right-click on the object and select “Edit object” from the context
Set the name of the structure to “film”.
In the “Geometry” tab, set the x and y position to 0, and span to 1.2 um.
The period of the device is 0.4 um so this will represent 3 periods in each direction.
To set the device thickness set the z min position to 0 and z max position to 0.1 um
to simulate a 100 nm thick film.
In the “Material” tab, use the drop down menu to select the “Au (Gold) - CRC” material.
Make a copy of the rectangle using the normal copy and paste shortcut keys, Ctrl C and Ctrl-V.
Change the name to “substrate”.
Set z max to 0 and set z min to -1 um so the rectangle will be 1 um thick.
In the “Material” tab, set the material to “SiO2 (Glass) - Palik”.
Next, add an array of circles from the object library to represent the array of holes etched
into the gold film.
The Object Library contains a library of structure groups that can be used to set up more complex
structures such as periodic arrays.
If the Object Library window is not already open, you can open it from the “View”
then “Windows” menu.
Under the “Category” drop down in the Object Library window, select “Photonic
Then, under the Objects List, select the “Rectangular lattice PC array” and click “Insert”
to insert the selected object.
You can see the new structure group called “rect_pc” in the Objects Tree.
Edit the structure group and set the name to “nanoholes”.
Under the user properties table, double-click to set the material of the circles to “etch”.
Then set the “z span” property to 0.1 um, and the z position to 0.05 um to match
the position of the gold film.
The “nx” and “ny” properties set the number of periods of the array to set up in
the x and y directions.
Set these to 3.
The “ax” and “ay” properties set the period in the x and y directions.
Set these to 0.4 um.
Finally, set the “radius” to 0.1 um.
You can also check the comments at the top of the script to see the definitions of the
Now check the structure in the view ports to make sure it looks like what we expect.
We can zoom in to the structure and select each object in the Objects Tree to highlight
the object in the view port.
We have a gold layer above the glass substrate with an array of holes etched in the gold
We have set up a 3 by 3 array of nanoholes, however it is sufficient to simulate one unit
cell in the solver region and use periodic boundary conditions in order to simulate an
infinitely periodic structure.
We’ll add and set up the solver region next.
Use the “Simulation” drop down menu to add a simulation region.
The “General” tab is where you can set the dimension of the solver region, background
index which is used anywhere where no structures are defined, and the simulation time and temperature.
We can use the default settings here.
Under the “Geometry” tab, set the x position to 0 and x span to 0.4 um to match the period
of the device.
Do the same for the y position and span.
The simulated period is set by the simulation region span, so it should be set to match
the period of the structure.
Set the z position to 0 and the z span to 1 um.
Under the “Mesh Settings” tab, we can set the mesh generation method and mesh refinement
The default settings are usually sufficient for initial simulations so we won’t make
any changes here.
We can increase the mesh accuracy setting in the convergence testing stage when we want
to get final high accuracy results.
Under the “Boundary conditions” tab set the x and y boundary conditions to “Periodic”.
Use the “PML” absorbing boundary conditions in the z direction which is above and below
Under the PML settings table, double-click to set the “profile” to “steep angle”.
The “steep angle” PML profile is recommended when simulating periodic structures as light
might be diffracted to grating orders propagating at an angle and the “steep angle” profile
is more efficient at absorbing light incident at an angle.
You can click on the “Help me choose PML settings” link for more tips on setting
up the PML settings.
Click “OK” to accept the settings.
We can now see the simulation region.
Use the zoom extent button to zoom the view ports around the simulation region.
The simulation region has blue boundaries indicating the periodic boundaries in the
x and y directions and orange boundaries indicating the PML boundaries above and below.
We can use the ruler tool to check that the z span of the simulation region is large enough.
A rule of thumb is that we want there to be a distance of at least half a wavelength of
uniform material in front of the PML.
Since we will be simulating a wavelength up to 0.7 um, we want to measure a distance of
at least 0.35 um of air above the structure and glass below.
Click and drag in the view port, and the measured distance is displayed below.
Also notice that the substrate extends into the PML boundary below, so any light that
travels through the glass substrate will be absorbed by the PML.
This essentially simulates a semi-infinite thickness of the substrate.
Add a mesh override region from the “Simulation” drop down menu.
Mesh override regions are used to specify the mesh step size over a localized region
in the simulation volume.
Here, we want to use a finer mesh to resolve the curved shape of the nanohole and the thickness
of the gold film.
Edit the mesh override region and set the mesh step size to 0.01 um or 10 nm in all
Under the “Geometry” tab, set the geometry using the “based on a structure” option.
Type “circle” in the structure field.
This will set up a mesh override region over each of the objects named “circle”.
The structures inside the “nanoholes” structure group are named “circle”.
Click “OK” to accept the settings.
To resolve the layer thickness, ideally we want the mesh lines to fall at the material
interfaces of the gold film.
Click the “show mesh” button in the toolbar to see the generated simulation mesh.
In the drawing grid properties, turn off the drawing grid to better see the mesh lines.
Because we are simulating a device where there are plasmonic effects, the results can be
very sensitive to meshing.
The 10 nm mesh step size is a starting point, but for most accurate results we need to perform
convergence testing by trying finer mesh step sizes.
Next we will add and set up a plane wave source at normal incidence from the air above the
Add a “Plane wave” source from the “Sources” drop down menu.
Set the source to inject in the “Backward” direction along the z-axis.
This means the source will propagate in the -z direction.
Under the “Geometry” tab, set the source x and y positions to 0 and spans to 0.5 um
so the source are covers the full area of the simulation region.
Set the z position to 0.3 um so the source injection plane will be located in the air
above the structure.
Under the “Frequency/Wavelength” tab, the source start and stop range are already
set to between 0.4 to 0.7 um which is the range we are interested in.
On the right, we can see the automatically generated source pulse over time, as well
as the spectrum of the source pulse.
You can click and drag an area on the plots to zoom in.
Next, we’ll set up monitors to record data from the simulation.
We will be using monitors to record the refractive index profile, reflection and transmission
spectrum, electric and magnetic field profile, and a movie of the time-domain fields.
Start by adding a refractive index monitor from the “Monitors” drop down menu.
Edit the monitor and in the “Geometry” tab set the monitor type to “2D Z-normal”.
Set the x and y spans to 0.5 um and the z position to 0.05 um so that the monitor is
within the gold film.
Set the monitor name to “XY index”.
Now add another refractive index profile to see the field profile in the XZ plane.
Set the monitor name to “XZ index”.
Under the “Geometry” tab set the monitor type to “2D Y-normal” and set the x span
to 0.5 um and the z span to 1 um.
You can see the monitors in the view ports outlined in yellow.
It’s fine for the monitors to extend outside of the simulation region.
Data is only recorded within the simulation region so the results returned are automatically
truncated by the inner simulation region boundaries.
With index monitors you can view the index preview result before running the simulation.
To see this, right-click on “index preview” in the Result View window and visualize it.
Here I can see a hole in the gold layer as expected.
The resolution of the curved surface of the hole is limited by the mesh step size.
Next, add a frequency domain power monitor to measure the reflection spectrum.
I can drag the monitor to resize or move it.
I’ll drag it to a position above the source to measure the reflected fields.
Edit the monitor and set the name to “R”.
To set the number of frequency points to measure over the source wavelength range.
Click the "Set global monitor settings" button and set the "number of frequency" points to
Click OK to accept the settings.
Click the “duplicate” button in the toolbar to duplicate the R monitor.
To use the duplicated monitor to measure the transmission spectrum, drag the monitor position
into the substrate region, edit the monitor and set the name to “T”.
Add a frequency domain profile monitor to measure the field profile in the XZ plane.
Getting the field profile at 5 frequency points is sufficient for this data.
Select “override global monitor settings” and set “frequency points” to 5 to have
this monitor only measure the fields at 5 frequencies.
Under the “Geometry” tab set the “monitor type” to “2D Y-normal” and set the x
span to 0.5 um and z span to 1 um.
Set the monitor name to “profile”.
Add a movie monitor and set up the geometry to match the profile monitor – “2D Y-normal”
monitor type, y is 0, x span is 0.5 um and z span is 1 um.
Under the “General” tab you can set the resolution of the movie that that will be
produced and the field component that will be recorded.
By default, the electric field intensity is recorded.
Set the monitor name to “movie”.
The movie file will be saved to the current working directory.
You can change the working directory from the “File” menu.
Now the simulation file has been set up, and you could run it at this point, but a final
improvement that could be made here is to take advantage of the symmetry of the structure
and the source to reduce the simulation volume that needs to be simulated.
Since there is symmetry across the x=0 and y=0 planes, only one quarter of the unit cell
needs to be simulated and the fields can be unfolded to the full unit cell.
To set up the symmetry in the boundary conditions.
Edit the FDTD simulation region and under the “Boundary conditions” tab, select
“allow symmetry on all boundaries”, then set x min and x max boundary conditions to
“Anti-symmetric” and y min and max to “Symmetric”, then click “OK”.
The positive quadrant of the simulation region which isn’t shaded blue or green will be
the portion that is simulated, and the results will be automatically unfolded to the full
Using these boundaries you will get identical results to using periodic boundary conditions,
but less memory is required.
The rules for choosing which type of symmetry to use, symmetric or anti-symmetric are covered
in the FDTD solver region section of this course.
As an additional exercise, try re-running the simulation using periodic boundaries instead.
You may want to save the simulation file now as we will use the same file in the following
In the next unit, we will cover the checks that should be performed before running the