Wrong or improper settings can lead to slow convergence. By no means this is an exhaustive list but the following are the common causes:
1. Wrong metal or periodic boundary conditions. Boundary conditions are vital in solving differential equations such as Maxwell’s. Metal or periodic boundary conditions can duplicate the structure and source so to lead wrong back and forth reflection. Please refer for general guidelines to set proper BCs.
2. Improper PML: this can be due to a number of different settings.
PML types are set for different situations. For example, if the structure such as a grating has large diffraction angles, the Steep Angle PML should be used.
Geometry ends inside PML make have some reflection. Solution: always extend a geometry to outside of PML, in all cases, except its material is metal, it diverges and other regular remedy methods do not help.
PML strong reflection: This is mostly due to insufficient PML thickness, such as very fine mesh size but a few number of layers. Solution: use roughly half wavelength thick PML. The total PML thickness is the product of number of layers and mesh size. In additional to increase PML layer numbers, occasionally, users may add coarse override mesh in front of PML along the thickness axis.
PML interaction with near fields or evanescent waves: this is due to the short distance between the structure and PML. Longer near field tails can interact with PML which causes strong reflections. Solution: increase the distance. A profile monitor can be used to check the near field inside the PML, when “record data in pml” is enabled.
glazing angle to PML: if light incidence on PML is close to 90deg, PML could not handle it properly. In physics, any material will 100% reflect if the incident angle is 90 deg. Solutions: One can move the PML away from the structure to give sufficient distance; use Steep Angle PMLs; increase PML layers; For advanced users, use Custom PML with proper parameters.
3.Strong resonance outside of the interested bandwidth: When there is strong resonance outside of the interested bandwidth, it also slows down the simulation. Solution: set the source in time domain with longer pulse to narrow the simulation bandwidth and suppress the signal outside the desired bandwidth;
4.Simulation bandwidth is unnecessarily broad: If the highest frequency is a few time of the lowest frequency in source spectrum, the material may not have proper data, and the device can have quite different response in different spectra. Always simulate working bandwidth to avoid unnecessary higher frequency. One may simulate different bandwidths to avoid large residual em energy inside simulation region.
5.Forget adding the substrate. Since usually the FDTD background is vacuum, the substrate material can weak the resonance due to smaller refractive index contrast to the device. In many a case, actual devices have substrates. w/o substrates are two different devices.
6.Too many frequency points in Frequency-domain monitors: more frequency points hinder the simulation speed. Not only it needs a lot of memory, but also it needs many calculations for those frequency points to get results.
7.Unnecessary 3D monitors, such as frequency domain monitors. You can use several planar monitors to greatly reduce the data size. Down sample the data is another solution.
8.Time monitors: You can have several point time monitors. 1D time monitors are less-often used; Rarely people use 2D time monitors, needless to say 3D time monitors. You can down sample the time monitor data, or simply use movie monitor to check the field evolution. Please note that for long simulation time, the time monitor can quickly eat up memory.
9.The mesh is too small compared to wavelength. The simulation time-step size is proportional to the smallest spatial mesh size. Smaller mesh size leads to smaller time step, and thus long simulation time. Always use the default mesh accuracy first, and add a local override region to resolve geometrically small objects, such as a gap, and only use finer mesh to resolve the small size such as a gap, not to the whole geometry.
Insufficient memory can happen due to low-performance computer compared to simulation requirement. Please click on the "Check simulation and memory requirements" option in the " Check" tab, from where you can know the memory needs and then check your computer for physically available memory. In some cases the available memory might be dynamic, so you can stop some running programs at the background.
Insufficient memory can also happen due to improper settings mentioned above, points 6 ~9.
A side note: sometimes the simulation terminates normally, but at the data saving stage, it takes longer time than usual. This usually happens when there are too many data to be saved, and not enough memory, even though the computer has enough storage.