Halbach_two_point_oh: Optimize Uniform Fields with Permanent Magnets
Description
Overview
This Python program enables interactive exploration of the magnetic fields produced by rings and spherical clusters of permanent magnets. It provides a Graphical User Interface (GUI) for investigating magnet geometries and field homogeneity.
The physical background is described in the article:
Analytic approach to creating homogeneous fields with finite-size magnets Ingo Rehberg and Peter Blümler
Phys. Rev. Applied 23, 064029 (2025), https://doi.org/10.1103/9nnk-jytn preprint: arXiv:2502.18262
Discretized Halbach spheres: Icosahedral symmetry for optimal field homogeneity Ingo Rehberg and Peter Blümler
Phys. Rev. Applied 25, 054009 – Published 4 May, 2026
Version History
v2.1.1
Adds additional analysis of the homogeneity of the center field, and a Fibonacci sphere cluster.
v2.1.0
Adds spherical Halbach arrangements of the magnets, and allows to add clusters of individual design.
v2.0.0
Adds magnets in the form of cuboids and spheres to the point- and line dipoles.
v1.1.0
Adds the functionality to export STL files for 3D printing custom magnet holders.
v1.0.1
This version includes a configuration inspired by:
Sumit Tewari, Thomas O'Reilly, Andrew Webb
Improving the Field Homogeneity of Fixed- and Variable-Diameter Discrete Halbach Magnet Arrays for MRI via Optimization of the Angular Magnetization Distribution
Journal of Magnetic Resonance, Volume 324, 2021, 106923
https://doi.org/10.1016/j.jmr.2021.106923
Technical info (English)
How to get started:
-
Unzip the file
Halbach_2_1_1.zip. - Take a look at the User Guide 2_1_1.pdf
-
Launch the interactive program by running
main.py.
Using the program:
-
The programm is completely controlled via mouse klicks.
-
All buttons are briefly explained in the user guide. You can safely explore the interface — no harm can be done by trial and error.
Preparing for 3D printing:
-
Click the
STLbutton and follow the provided instructions for exporting the model (is currently only for cuboids in the focussed arrangement).
Files
User Guide_2_1_1.pdf
Files
(4.6 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:99a06e029c5b180849b11bbedafd2e7e
|
3.2 MB | Preview Download |
|
md5:d20c07edbaf77c35dde83df2bc102e61
|
1.4 MB | Preview Download |
Additional details
Additional titles
- Subtitle (English)
- Icosahedral symmetry yields optimal field homogeneity
Dates
- Updated
-
2025-09-23added Cluster
Software
- Programming language
- Python
References
- Halbach 2.0 -- Creating homogeneous fields with finite size magnets, Ingo Rehberg and Peter Blümler (https://arxiv.org/abs/2502.18262)
- Sumit Tewari, Thomas O'Reilly, Andrew Webb, Improving the field homogeneity of fixed- and variable-diameter discrete Halbach magnet arrays for MRI via optimization of the angular magnetization distribution, Journal of Magnetic Resonance, Volume 324, 2021, 106923, https://doi.org/10.1016/j.jmr.2021.106923.
- Ingo Rehberg and Peter Blümler, Analytic approach to creating homogeneous fields with finite-size magnets, Phys. Rev. Applied 23, 064029 https://journals.aps.org/prapplied/abstract/10.1103/9nnk-jytn
- https://aps.altmetric.com/details/174641821
- Ingo Rehberg and Peter Blümler , Discretized Halbach spheres: Icosahedral symmetry for optimal field homogeneity, Phys. Rev. Applied 25, 054009 (2026) (https://doi.org/10.1103/hyv2-s2tf)