Ansys Insight: Key FDTD simulation settings

kjohnsonkjohnson Ansys Employee Posts: 14
edited February 2021 in Photonics

In this post I will discuss some important settings for FDTD simulation settings that are commonly overlooked or improperly set up. First, I will provide a checklist that can be referenced when setting up your simulation. After, I will give a more thorough explanation of each of the points in the checklist.

Key FDTD settings checklist

  • Mesh size: Use mesh override regions and index monitors to make sure small features are resolved.
  • Mesh order: Use index monitors to make sure geometry object mesh ordering is correct.
  • Material fit: Use the Material Explorer to verify a good material fit to the data.
  • Simulation time: If your simulation is ending before the autoshutoff threshold is reached, increase simulation time.
  • Simulation span: Increase the simulation span until there is a half wavelength of space between the geometry and the PML boundaries (unless the geometry passes through the boundary).
  • Boundary conditions: Make sure the choice of boundary condition and boundary condition settings are correct.
  • Source span: Check that beam/mode source spans are large enough such that the input field is not cut off. DFT or movie monitors can be used to verify sources are functioning properly.

Mesh size

A key parameter for the accuracy of the FDTD algorithm is the number of mesh cells per wavelength. The default auto-nonuniform mesh in FDTD Solutions will attempt to automatically create a mesh that has a certain number of mesh cells per wavelength, with the number of cells determined by the “mesh accuracy” setting.

For your initial simulations, the mesh does not need to be very refined, so a mesh accuracy of 2 or 3 is sufficient. However, even for initial simulations, it is often necessary to refine the mesh in certain areas of the simulation region with the use of mesh override objects. Areas that may require a mesh override include sections of the device geometry with small features not sufficiently resolved with the default mesh (for example, thin layers) or metal-dielectric interfaces , where the fields vary quickly. For rectilinear geometries it is best to use mesh overrides to ensure the mesh cells overlap with the geometry.

For example, below are images of a thin layer, first with the default mesh, then with a mesh override region with a “dy” setting that ensures there are four mesh cells in the Y direction that exactly overlap with the thin layer.

Default mesh:

With mesh override:

Index monitors can be used to view the mesh before a simulation is run and verify that all features are resolved. You can also view the mesh grid by clicking the “View simulation mesh” button on the toolbar to the left of the viewports: 

After running your initial simulations, convergence testing can be used to determine the mesh settings required for accurate results.

Mesh order

When geometry objects overlap, their mesh order is used to determine which object’s index to use. A lower mesh order will take priority when objects overlap. An index monitor should be used to verify the correct index is used by the mesh.

More information: Mesh Order

Material fit

Check the material fits of all materials in your simulation in the Material Explorer. The fits should be close to the data points, and there should be no gain or sharp peaks in the fits.

More information: Modifying the Material Fits

Simulation time

An FDTD simulation can be ended by three conditions: the simulation time is reached, the autoshutoff threshold is reached (meaning the fields have sufficiently decayed), or the fields diverge. After running the simulation, you can check the “status” result of the FDTD region object to see how your simulation ended, or check the log file.

status =

  • 0: Simulation in layout mode
  • 1: Ended due to max simulation time reached
  • 2: Ended early due to auto-shutoff criteria met
  • 3: Simulation diverged

In general, it is best for the simulation to end due to the autoshutoff threshold. Ending the simulation due to the simulation time can lead to errors for frequency domain results. If your simulation is ending due to the simulation time being reached, increase the simulation time . This can often be required if there are resonant structures or large propagation distances in your simulation.

More Information: Auto Shutoff Level Criteria

Simulation span

The span of the FDTD region should be set such that PML boundaries are a half wavelength away from the sides of any geometry objects in the simulation. “Wavelength” here refers to the longest wavelength in the source spectrum, taking into account the refractive index of the material between the object and the boundary. Exceptions to this rule include substrates, cladding, or any other objects that are supposed to extend beyond the simulation region (for example, the ends of input/output waveguides). For example, in a simulation of a simple straight waveguide in the Z direction:

XY cross-section

• Substrate extends through the X max/min and Y min boundaries.

• X max/min and Y max PML boundaries are at least a half wavelength away from the sides of the waveguides.

XZ cross-section

• The ends of the waveguides extend through the Z max/min boundaries.

Boundary conditions

If PML boundaries are used, the “standard” PML profile should be used by default. For periodic simulations or simulations with light propagating at large angles, the “steep angle” profile should be used. The “stabilized” profile should only be used if you are experiencing divergence issues.

If your structure and source are periodic, “Periodic” BCs should be used for sources at normal incidence, “Bloch” BCs should be used with narrowband sources at an angle, and “BFAST” boundaries should be used for broadband sources at an angle.

If you are using symmetry BCs, make sure that both your geometry and the source are symmetric. The choice of symmetry or anti-symmetry depends on the polarization of the source. As a rule of thumb, the source polarization arrow should be parallel to the boundary with the same colour, and normal to the boundary with the different colour:

More information: PML boundariesSymmetry boundariesPeriodic boundaries

Source span

A common mistake is to set the span of the sources to be smaller than the span of the injected field. This is particularly common for Gaussian and mode sources. Truncating the source like this can cause scattering and other injection errors. The source fields should be visualized to make sure they have decayed sufficiently at the edges of the source span (at an amplitude of 10^−3 to −10^−4). Using a log scale can help with this.

Placing a DFT or movie monitor can also help determine if the source is being properly injected. Images of DFT monitor results first for a source with a span that is too narrow for the injected field, then for a source with the span are shown below. Note the scattered light behind and to the sides of the source in the image with the incorrect span.

Source span too narrow:

Correct source span:



Sign In or Register to comment.