Simulation time

In each simulation, the simulation time how much should be?
thanks for any help.

Hi. FDTD Solutions uses a time domain solver. The simulation starts by inserting a short optical pulse into the simulation domain (through the source) and it runs (or should run) until the optical signal passes through the simulation domain completely. This means that your simulation time should be large enough so that the light from the source is able to cover the entire distance from the source to the end of the simulation region.

For example, if you have a simulation setup where the optical signal will travel for 5 micron before leaving the simulation region and the material has an index of 3.5 then the time required for the light to travel this distance is given by, t = 5e-6/c*3.5 sec = 58 fs. This means that a simulation time of at least 58 fs is required.

Note that often the light with reflect on different surfaces in the structure and the actual travel distance may be much larger than the length of the simulation region. In such a case, the required simulation time will be larger. So the initial value of 58 fs gives you as starting point but you may want to add a safety margin and use (say) 100 fs as your simulation time.

One point to note here is that the solver in FDTD keeps track of the remaining energy in the volume and the simulation automatically stops when the energy becomes 1e-5 of the initial value (default value for auto shutoff). So even if you use a simulation time much larger than required, the simulation will stop once the light signal has passed through the structure completely. However, a really large value for simulation time will mean the solver will overestimate the time required to finish the simulation.

On the other hand, if you make the simulation time too small, then the simulation will be unfinished and the results would be wrong. To learn more about the auto shutoff option take a look at this KX post.


Simulation time also depends on the type of resonances. For structures that exhibit strong resonances, the auto-shutoff criteria changes and the lifetime of the resonance are also longer. For example for surface plasmon based fluorescence enhancement, it is recommended to change the auto-shutoff value 1e-8 to avoid small ripples in the frequency domain monitors [See Knowledge base article on Fluorescence Enhancement,


Hi @aalam - Thanks for your post above. Helpful. What if even after adding significant safety margin, my sim still ends before auto shutoff (implying there is still more than 1e-5 of the initial energy in the simulation region)? Does that mean that the simulation error is larger for having not gone to auto shutoff?

hi @patrick.goley

Like you said, the autoshutoff level shows you the amount of energy remaining in the simulation compared to the initial conditions. 1e-5 is rather an arbitrary choice but it should work for most simulations that the autoshutoff will kick in and terminate the simulation. This is a pretty useful feature to prevent you from spending unnecessarily long simulation time. However, the question “when to allow the autoshutoff to kick in” will vary from device to device, and applications to applications. It is okay to increase the autoshutoff min or terminate the simulation before the autoshutoff is kicked in when appropriate, but you will need to look for the signs weather the simulation has used enough time to finish all the necessary EM events in the simulations. One typical consequence of lacking EM simulation time is that you might observe transmission larger than 1.

If you are running into troubles, or have questions regarding a specific application, I think we can open another post to further our discussions.

1 Like

Thanks so much @kchow. Very helpful explanation. So for example I can use a movie monitor to confirm that a transmission event of interest has concluded. Then safely end the simulation before auto shutoff and check the transmission data. Of course, it would take a little testing to set the simulation time correctly, but that is relatively easy to do. Sounds reasonable?

The Movie monitor may not be able to clearly show the residual fields, unless you reduce the “scale” to a small number. You can also use some point Time monitors at the area of interest (eg, near resonance), to specifically visualize the field decays. So it will involve a bit of trial and error. But again, as I said, the behavior can vary from device to device.

Note that: ending the simulation too soon can cause problems to the FFT data