I ran into a strange issue when using a script to turn coil geometries into FastHenry input files for inductance calculation. I get errors about filaments overlapping such that their mutual inductance becomes infinite, and a warning about negative filament distance. I managed to find one such problem section from my input file. Here's a cut down version of the input file that includes the offending section:
** Segtest 1 (infinite inductance) **
.Units mm
.Default w=1.400000 h=1.400000 sigma=59600.000000 nhinc=5 nwinc=5
Nl7p65 x=-7.17 y=2.38 z=88.50
Nl7p66 x=-4.67 y=2.38 z=88.50
Nl7p67 x=-2.17 y=2.39 z=88.50
Nl7p68 x=0.33 y=2.39 z=88.50
Nl7p69 x=2.83 y=2.39 z=88.50
Nl7p70 x=5.32 y=2.40 z=88.50
Nl7p71 x=7.82 y=2.41 z=88.50
Nl7p72 x=10.32 y=2.47 z=88.50
Nl7p73 x=12.80 y=2.69 z=88.50
Nl7p74 x=15.26 y=3.02 z=88.50
Nl7p75 x=17.71 y=3.44 z=88.50
El7p65-66 Nl7p65 Nl7p66
El7p66-67 Nl7p66 Nl7p67
El7p67-68 Nl7p67 Nl7p68
El7p68-69 Nl7p68 Nl7p69
El7p69-70 Nl7p69 Nl7p70
El7p70-71 Nl7p70 Nl7p71
El7p71-72 Nl7p71 Nl7p72
El7p72-73 Nl7p72 Nl7p73
El7p73-74 Nl7p73 Nl7p74
El7p74-75 Nl7p74 Nl7p75
.External Nl7p65 Nl7p75
.Freq fmin=1e4 fmax=1e4 ndec=1
.End
Running this in FastHenry2 yields several error messages along the lines of
Severe warning: mutual inductance = infinity for two filaments:
fil 1: from 0.00532252, 0.00177001, 0.08913 to 0.00782252, 0.00178001, 0.08913 width:0.00014 height: 0.00014
fil 2: from 0.00283253, 0.00176001, 0.08913 to 0.00532253, 0.00177001, 0.08913 width:0.00014 height: 0.00014
Probably because there are overlapping but non-orthogonal segments in the input
Based on the error message, one would assume the problem is between segments El7p69-70 and El7p70-71. Indeed, the following two test cases that include points 65-70 and 70-75 do not cause any errors or warnings:
** Segtest 2 (no issues) **
.Units mm
.Default w=1.400000 h=1.400000 sigma=59600.000000 nhinc=5 nwinc=5
Nl7p70 x=5.32 y=2.40 z=88.50
Nl7p71 x=7.82 y=2.41 z=88.50
Nl7p72 x=10.32 y=2.47 z=88.50
Nl7p73 x=12.80 y=2.69 z=88.50
Nl7p74 x=15.26 y=3.02 z=88.50
Nl7p75 x=17.71 y=3.44 z=88.50
El7p70-71 Nl7p70 Nl7p71
El7p71-72 Nl7p71 Nl7p72
El7p72-73 Nl7p72 Nl7p73
El7p73-74 Nl7p73 Nl7p74
El7p74-75 Nl7p74 Nl7p75
.External Nl7p70 Nl7p75
.Freq fmin=1e4 fmax=1e4 ndec=1
.End
** Segtest 3 (no issues) **
.Units mm
.Default w=1.400000 h=1.400000 sigma=59600.000000 nhinc=5 nwinc=5
Nl7p65 x=-7.17 y=2.38 z=88.50
Nl7p66 x=-4.67 y=2.38 z=88.50
Nl7p67 x=-2.17 y=2.39 z=88.50
Nl7p68 x=0.33 y=2.39 z=88.50
Nl7p69 x=2.83 y=2.39 z=88.50
Nl7p70 x=5.32 y=2.40 z=88.50
El7p65-66 Nl7p65 Nl7p66
El7p66-67 Nl7p66 Nl7p67
El7p67-68 Nl7p67 Nl7p68
El7p68-69 Nl7p68 Nl7p69
El7p69-70 Nl7p69 Nl7p70
.External Nl7p65 Nl7p70
.Freq fmin=1e4 fmax=1e4 ndec=1
.End
What if we include both of those edges? A test input file that has the points from range 68-72 yields warnings about filaments overlapping, but no infinite inductance:
** Segtest 4 (overlap warnings) **
.Units mm
.Default w=1.400000 h=1.400000 sigma=59600.000000 nhinc=5 nwinc=5
Nl7p68 x=0.33 y=2.39 z=88.50
Nl7p69 x=2.83 y=2.39 z=88.50
Nl7p70 x=5.32 y=2.40 z=88.50
Nl7p71 x=7.82 y=2.41 z=88.50
Nl7p72 x=10.32 y=2.47 z=88.50
El7p68-69 Nl7p68 Nl7p69
El7p69-70 Nl7p69 Nl7p70
El7p70-71 Nl7p70 Nl7p71
El7p71-72 Nl7p71 Nl7p72
.External Nl7p68 Nl7p72
.Freq fmin=1e4 fmax=1e4 ndec=1
.End
Somehow, however, if we include only the two problem segments and nothing else, we get the infinite inductance errors again, as well as warnings about filament distance being negative.
** Segtest 5 (infinite inductance) **
.Units mm
.Default w=1.300000 h=1.300000 sigma=59600.000000 nhinc=5 nwinc=5
Nl7p69 x=2.83 y=2.39 z=88.50
Nl7p70 x=5.32 y=2.40 z=88.50
Nl7p71 x=7.82 y=2.41 z=88.50
El7p69-70 Nl7p69 Nl7p70
El7p70-71 Nl7p70 Nl7p71
.External Nl7p69 Nl7p71
.Freq fmin=1e4 fmax=1e4 ndec=1
.End
What confuses me about this is that the offending section appears to be almost straight. Any overlap should be minimal at best compared to segment length, certainly less than in some input files I've successfully ran with the program.
Any help with this issue would be appreciated.