☰ Contents

The FDTD simulation of dispersive materials diverges. How to avoid divergence?

Problem Description

When simulating structures containing dispersive materials, the software sometimes displays a “simulation divergence” warning and terminates the calculation prematurely. I observe that after running for a short period, the energy in the simulation region increases sharply, causing the simulation to stop automatically. How should I adjust the settings to prevent this divergence and obtain correct simulation results?

Possible Causes

Most divergence issues originate from the energy in the simulation region exceeds the threshold, causing the software to abort the simulation early with a divergence warning. These problems mainly stem from two causes: one is incorrect mesh size or time step settings that violate the Courant stability condition, and the second is PML boundary condition issues.

Solutions

Troubleshooting

Based on the description of the possible issues above, there are two methods to confirm the problem:

1. Calculate whether the current simulation’s mesh size ( Δx\Delta x ) or time step ( Δt\Delta t ) meets the Courant stability condition. For 3D meshes, this stability condition is:

Δt1c(1Δx)2+(1Δy)2+(1Δz)2\Delta t \leq \frac{1}{c\sqrt{(\frac{1}{\Delta x})^2+(\frac{1}{\Delta y})^2+(\frac{1}{\Delta z})^2}}

Generally, users may make errors when defining uniform mesh sizes or using custom meshes. It is recommended to check and modify parameters according to the formula.

For the time step, if calculations do not meet the above conditions, reduce the Stability Factor . Gradually decrease this factor until the simulation converges. In most cases, values of 0.95 or 0.9 ensure stability. In some scenarios, values as low as 0.5 or smaller may be needed. While decreasing the Stability Factor does not affect simulation accuracy or memory requirements, it increases simulation time.

This approach cannot resolve the second type of divergence issue.

2. For second type of divergence issues, user can change all boundary conditions from PML to PEC and rerun the simulation. If the simulation continues to diverge, please refer to troubleshoot guidelines for the first type of divergence issue. If the simulation stabilizes, the issue can be attributed to PML boundary conditions.

Resolution Methods

The solution for the first type of divergence issue is relatively straightforward and can be referenced from the above instructions. The second type of divergence issue, however, has more complex causes and requires different approaches depending on the scenario. For detailed troubleshooting steps, please refer to the following description:

1. When dispersive materials cross PML boundaries, they may cause simulation instability and divergence. Normally, extending structures beyond the boundary condition (BC) region yields the most accurate results. However, some dispersive materials may be unstable when crossing PML boundaries, causing fields to diverge at the point where the material contacts the boundary. This phenomenon can be observed through the Real-Time Display of Slice Fields function. The specific solution is as follows:

1) Ensure that the dispersive material does not contact or cross the PML boundary, maintaining a distance of at least one mesh cell from the boundary. Additionally, uncheck the Extend Structure through PML option. Note that this adjustment may increase reflections at the PML boundary.

2) Setting PML to Stabilized typically resolves simulation divergence issues. Compared to the Standard setting, this option increases the number of PML layers and the Alpha value. While this adjustment enhances the absorption capability of PML boundaries, it also increases the computational resources and runtime required for the simulation.

3) If method 2) still fails to resolve the divergence issue, you can further set PML to Custom and manually increase the number of layers and the Alpha value. However, this is not recommended for users unfamiliar with PML configurations.

4) Increase the mesh size in front of the PML boundary. Increasing the mesh size in the direction perpendicular to the PML surface can enhance the absorption stability of the PML. However, this may affect both the calculation accuracy and the absorption efficiency of the PML.

2. Non-physical gain may occur in the fitting results of dispersive materials. If the fitting results contain field gain components, it will cause simulation divergence. there are negative values in the imaginary part of the permittivity (or relative refractive index). At this point, you should check the fitting curves of all materials used in the project: in the simulation band, if the fitting curve of the imaginary part of permittivity (or relative refractive index) has any negative values, it indicates the presence of non-physical gain. The solution is to adjust the simulation band or optimize the fitting parameters, then refit until the imaginary part has no negative values.

Similarly, you can use an Index monitor to check the refractive index distribution of the entire simulation region and pay special attention to whether the imaginary part of the refractive index has negative values.

Further Reading

PML