February 14, 2022 at 10:10 pmGuilin SunAnsys Employee
This post tries to provide some suggestions for the causes and solutions for slow convergence in FDTD. Any other suggestions and experiences are welcome to share here.
In FDTD, it is common that some simulations take long time to converge, or to reach the autoshutoff min. Those are slow convergence cases. Basically, the causes of slow convergence can be classified into three categories: physics, simulation settings, and hardware.
This type of slow convergence is due to the nature of device-light interaction: the device has strong resonance, and thus it needs long simulation time to converge.
Depending on the final results one desires, such slow convergence may not need to simulate long time:
February 14, 2022 at 10:38 pmGuilin SunAnsys EmployeeImproper Settings:
- Q calculation. Time monitors can be used with very short simulation time and the result can be extracted by some post processing. Please refer this article: Quality factor calculations for a resonant cavity and Q analysis group.
- Field profile for high Q device. Many devices need frequency-domain results, which usually require long simulation time to get accurate Fourier transform. If the goal is to get the profile instead of accurate value, the apodization method can be used in the frequency domain monitor. Please refer this example: Correcting field amplitudes for high-Q cavities
- Materials with very small real refractive index: very lossy materials require much finer mesh thus very small time step. For example the silver material in visible light. In such cases, long simulation with slow convergence is normal.
Wrong or improper settings can lead to slow convergence. Although it is exhaustive, the following list is the common causes:
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.
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 to 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.
Viewing 1 reply thread
Ansys Innovation Space
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.Trending discussions
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- “Import optical generation” or “delta generation rate”?
- Error: addfdtd is not a valid function or a variable name
- Error on Lumerical device
- Using a license file on a new license server
- Ansys Insight: Transmission results greater than one
- Ansys Insight: Diverging Simulations
- Finding your Ansys (or Lumerical) account number
- Ansys Insight: Why my simulation result is different from published paper or experiment?
- Is there a Lumerical script command to output the Simulation and Memory requirements?
Top Rated Tags
© 2023 Copyright ANSYS, Inc. All rights reserved.Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.