Effects of the number of segments per turn

Several runs of fasthenry and coilgen were done, with different numbers of segments per turn, and the results are here condensed into several graphs. The input file to coilgen was composed of these two lines:

0.485 0.265 62 1e-03 0.0 0.0 0.0
0.33 0.24 57 1e-03 0.0 0.0 0.0
which represents a system of two concentrical coils.

L1 is the inductance of the bigger coil, L2 the inductance of the smaller and Lm the mutual inductance between the two. With 16 segments per turn the calculated inductance value is within 1% of the value calculated with 256 segments per turn. Calculated inductances

Most of the time is spent setting up the multipoles, which seems to grow linearly with the number of segments per turn (O(n) in the big O notation), but the time needed for reading geometry increases quadratically (O(n2) ), becoming more and more important as the number of segments grows (!).

Time spent

Number of filaments

Memory requirements grow linearly with the number of filaments here Memory allocation