Ideas to speed up the simulations

FFT simulations could take times. The first idea to speed up would be to buy a new and powerful computer and hoping that Moore’s law will continue forever.

The second idea would be to decrease the accuracy, a number which determines when we estimate that we have converged to the steady state field. It could be changed as an option to the function using the accelerated converge:

C1 = Calculate_Fields_AC(C1,'accuracy',1E-10);

With C1 an object of class Cavity 1. By default the accuracy is set to 1E-12. Below an empirical table to show the impact of this parameter and the speed gain for a cavity of finesse 30 000 with mirror maps and substantial clipping loss (RTL).

Accuracy Cavity gain RTL [ppm]Gain speed
1E-125496.9179.441
1E-105493.4179.441.6
1E-85480.1179.442.8
1E-65336.9179.436.1
1E-45011.7179.4433
Table to demonstrate how the calculation times and results are depending on the accuracy value

As we can see from the table, the RTL is pretty robust to the accuracy, whereas the cavity gain is more sensitive dropping by 3% when the accuracy is reduced from 1E-12 to 1E-6.

A third option, more obvious is to reduce the grid size. It has the direct drawback to cut part of the highest spatial frequencies of the surface maps. Here an example of possible gain with the same cavity:

Grid dimension Cavity gain RTL [ppm]Gain speed
1064 x 10645478.5180.01
512 x 5125493.4179.45.7
256 x 2565484.0179.813.6
128 x 1285551.5177.476
Impact of the grid size on the results and computational time.

In a next post, we will explore the benefits of running the code on the GPU.

History

# Date User Information
120 8 months ago Jerome Degallaix (current)
119 8 months ago Jerome Degallaix (original)

Leave a Reply