Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

CreateCoil

Guides

  • Creating Coils

Tech Notes

  • Physics of Creating Simple, Discrete Coils

Symbols

  • DesToErr
  • EllipseCoilPlot3D
  • EllipseCoilPlot
  • EllipseFieldPlot2D
  • EllipseFieldPlot
  • FindEllipseCoil
  • FindLoopCoil
  • FindSaddleCoilAxial
  • FindSaddleCoilAzimuthal
  • FindSaddleCoil
  • HarmonicFieldPlot
  • LoopCoilPlot3D
  • LoopCoilPlot
  • LoopFieldPlot2D
  • LoopFieldPlot
  • SaddleCoilPlot3D
  • SaddleCoilPlot
  • SaddleFieldPlot2D
  • SaddleFieldPlot
Physics of Creating Simple, Discrete Coils
Introduction
Finding Loop Coils
Coil Primitives
Examples of Saddle and Ellipse Coils
CreateCoil is a tool for optimising the generation of magnetic fields using simple coils. It implements the theoretical model described in
Designing optimal loop, saddle, and ellipse-based magnetic coils by spherical harmonic mapping
published in IEEE Transactions on Instrumentation and Measurement.
Introduction
Precise magnetic fields are required for various applications including fundamental physics experiments, magnetic recording devices, motors, and magnetometers. These magnetic fields are generated using specially designed wire configurations, which are shaped into specific arrangements to maximise the quality of the resulting magnetic field. While there are different techniques available to determine the geometry and position of these wires, high-quality fields are typically achieved by using wire patterns which spatially vary. However, such patterns often occupy a large area, are challenging to fabricate, and can be prone to breaking.
CreateCoil introduces an alternative approach to generating high-quality magnetic fields by optimising multiple sets of simpler coil configurations, namely loops, saddles, and ellipses. These basic coil primitives are easier and cheaper to manufacture and repair, and with the functions provided by CreateCoil, users can select the desired arrangements and geometries of these simple coil primitives to generate desired magnetic fields. This is achieved by utilising exact expressions for the magnetic field harmonics generated by specific combinations of the coil primitives. These expressions are derived by matching the spatial variations in the magnetic field harmonics with variations of the same spatial frequencies in the Green's function solution to Poisson's equation, which encodes the magnetic fields generated by the coils in Fourier space. Further mathematical details can be found in the
publication
.
The underlying principle here is simple; the properties of the coil are related to magnetic field harmonics, and CreateCoil allows users to find coil geometries and positions that maximise the desired harmonic while minimising unwanted harmonics.
Coil Primitives
A magnetic field harmonic of order
n
and degree
m
is denoted
B
n, m
.
Loop primitives are pairs of axially-separated loops, which generate zonal field harmonics of total azimuthal symmetry (
B
n, 0
). For example, this coil contains three loop primitives, where all the coil wires belonging to the same coil primitive have been given the same colour:
Out[42]=
Contents cannot be rendered at this time; please try again later
Saddle and ellipse-based primitives generate tesseral field harmonics. They contain a number of axially-separated and azimuthally-periodic saddles or ellipses, whose periodicity matches that of the generated field harmonic. For example, the following saddle coil schematics show the groups of saddles which make up each primitive in the coil, where the primitives are highlighted one by one in red and the schematic is labeled with the primitive's parameters:
Out[52]=

Contents cannot be rendered at this time; please try again later
,
Contents cannot be rendered at this time; please try again later
,
Contents cannot be rendered at this time; please try again later
,
Contents cannot be rendered at this time; please try again later

Finding Loop Coils
Consider the simple example of generating a uniform magnetic field along a system's axis. We shall use two loops carrying the same current and separate them axially by an optimal amount. The uniform axial field corresponds to the field harmonic
B
1, 0
and the leading-order error is the harmonic
B
3, 0
. The function
FindLoopCoil
returns the optimal separation of the two loops to maximise
B
1, 0
and nullify
B
3, 0
:
In[53]:=
FindLoopCoil
[{1},1,{0.1,1}]
Out[53]=
{{Coilχc[1]0.5,DesToErr8.311}}
As expected, the uniform axial field is maximised when the coils are separated by their radius. This is known in the literature as a Helmholtz pair. CreateCoil allows the user to directly assess the magnetic field characteristics of the Helmholtz pair by using
LoopFieldPlot
and
LoopFieldPlot2D
:
In[64]:=
LoopFieldPlot
[{0.5},{1},1,1,ImageSizeSmall]
Out[66]=
Contents cannot be rendered at this time; please try again later
In[34]:=
LoopFieldPlot2D
[{0.5},{1},1,1,PlotPoints20,ImageSize250]
Out[34]=
Contents cannot be rendered at this time; please try again later
To further enhance the performance of the magnetic field, additional loop pairs can be added. This can be achieved by numerically mapping the relationships between the arrangements and geometries of the coil primitives and the resulting strengths of the magnetic field harmonics. By optimising the coil parameters, it becomes possible to maximise the desired magnetic field harmonic relative to unwanted contributions.
Consider now the scenario of generating a uniform axial field using three optimised separations of loop pairs. In this case, we can nullify additional leading-order field harmonics,
B
3, 0
and
B
5, 0
, and then rank solutions based on maximising the ratio of
B
1, 0
to
B
7, 0
:
In[71]:=
FindLoopCoil
[{1,-2,2},1,{0.1,.5}]
In some cases, it is essential that the coil configurations do not obstruct specific regions, particularly if optical access is required for experimental purposes. Such constraints may be incorporated while optimising the coil parameters. Let us optimise three coils again to generate a uniform field, this time with an axial constraint that the separations must lie between 0.5 and 1 times the coil radius:
No solutions are found, so we try a different set of turn ratios:
Inspect the coil plot to see that the axial constraints were respected:
Examples of Saddle and Ellipse Coils

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com