stephenbrooks.orgWork-Related ThingsHalbachArea Tool

# HalbachArea Tool

This program tries to automatically design a Halbach-style permanent magnet.  It outputs the coordinates of the magnet blocks, their magnetisation vectors, magnet harmonics and a PostScript diagram of the magnet.

This currently works on Windows at the commandline.  If ps2pdf is installed and in the path it will also try to convert the diagram to PDF.

The manufacture, tuning and design method for several examples these magnets is given in this paper.

## --- [Commandline Switches Help] ---

Usage:
halbacharea R=30e-3 dipole=0.2 quad=30

Other switch examples:
gfr=0.025 good field region radius (m) (default 2R/3)
sext=66, oct=888 set higher poles (T/m2, T/m3)
Br=1.3 set remnant field (T) (default 1.07)
wedges=24 set initial number of angular wedges (default 16)
symmetry=1(none),2(top/bottom),4(quad) set symmetry type (default 2)
halfoff=1 offset segments by half a width (default 1 if open midplane, else 0)
ymidplane=0.002 open midplane half-height (m) (default 0), enables:
midplanes=1(left),2(horiz),4(cross) number of midplanes to remove (default 2)
removeadjacent=1 remove wedges adjacent to open midplane (default 1)

HalbachArea Tool (.7z file, 59KB; Zip file, 69KB).
Use 7-Zip to open .7z files, WinZip files (less compression) provided for compatibility.

## --- [Examples] ---

### // CBETA 4-energy fixed-field ERL return loop

```halbacharea quad=-11.5624 R=43.1e-3 gfr=25e-3 symmetry=4 Br=1.15791
halbacharea dipole=-0.3081 quad=11.1475 R=40.1e-3 gfr=25e-3 Br=1.15791
halbacharea dipole=-0.2543 quad=11.1475 R=44.938e-3 gfr=25e-3 Br=1.15791
halbacharea dipole=-0.1002 quad=11.1475 R=49.085e-3 gfr=25e-3 Br=1.15791
halbacharea quad=11.1434 R=40.1e-3 gfr=25e-3 symmetry=4 Br=1.15791```

### // ILC damping ring

```halbacharea dipole=0.14 R=35.5e-3 gfr=10e-3 ymidplane=15e-3 Br=1.12
halbacharea quad=15 R=35.5e-3 gfr=10e-3 ymidplane=15e-3 Br=1.12
halbacharea sext=75 R=35.5e-3 gfr=10e-3 ymidplane=15e-3 Br=1.12```

### // Low-emittance light source

```halbacharea dipole=0.26 quad=250 R=5e-3 gfr=2e-3 Br=1.12 ymidplane=2e-3 wedges=18 midplanes=1
halbacharea dipole=0.49 quad=-250 R=5e-3 gfr=2e-3 Br=1.12 ymidplane=2e-3 wedges=18 midplanes=1```
 E-mail: sbstephenbrooks.org Twitter: stephenjbrooks Mastodon: sjbmstdn.io