This study aims to describe a MATLAB software package for transcranial magnetic stimulation (TMS) coil analysis and design.Electric and magnetic fields of the coils as well as their self- and mutual (for coil arrays) inductances are computed, with or without a magnetic core. Solid and stranded (Litz wire) conductors are also taken into consideration. The starting point is the centerline of a coil conductor(s), which is a 3D curve defined by the user. Then, a wire mesh and a computer aided design (CAD) mesh for the volume conductor of a given cross-section (circular, elliptical, or rectangular) are automatically generated. Self- and mutual inductances of the coil(s) are computed. Given the conductor current and its time derivative, electric and magnetic fields of the coil(s) are determined anywhere in space.Computations are performed with the fast multipole method (FMM), which is the most efficient way to evaluate the fields of many elementary current elements (current dipoles) comprising the current carrying conductor at a large number of observation points. This is the major underlying mathematical operation behind both inductance and field calculations.The wire-based approach enables precise replication of even the most complex physical conductor geometries, while the FMM acceleration quickly evaluates large quantities of elementary current filaments. Agreement to within 0.74% was obtained between the inductances computed by the FMM method and ANSYS Maxwell 3D for the same coil model. Although not provided in this study, it is possible to evaluate non-linear magnetic cores in addition to the linear core exemplified. An experimental comparison was carried out against a physical MagVenture C-B60 coil; the measured and simulated inductances differed by only 1.25%, and nearly perfect correlation was found between the measured and computed E-field values at each observation point.The developed software package is applicable to any quasistatic inductor design, not necessarily to the TMS coils only.
This paper's license is marked as closed access or non-commercial and cannot be viewed on ResearchHub. Visit the paper's external site.