Magnetic Field Gradient Map (Axisymetric geom)

In this example, we will compute the "ideal" magnetic field and its gradient produced by a test insert described using MagnetTools format.

1. Running the case

To run this example on MSO4SC portal see this section.

1.1. Magnet Geometry

A 14 helices insert with 2 external bitter magnets

To get the geometry, you can use:

B_map  --gnuplot HL-31.d > geom.dat

Edit geom.dat and keep only lines between:

PolyHelices data for HL-31.d ...
...
UnifMagnets data for HL-31.d ...

Plot the geometry with gnuplot:

gnuplot> set size ratio -1
gnuplot> set style data li
gnuplot> plot "HL-31-geom.dat" title "PolyHelices", "HL-31-Bitter-geom.dat" title "Bitters"
gnuplot> set xrange [0:0.7]
gnuplot> set yrange [-0.4:0.4]

1.2. Magnet Field

To compute the magnetic field:

Levitation HL-31.d

then enter the data for:

  • Helix input current,

  • Bitter input current,

  • and eventually Supra outsert input current.

The result is stored in HL-31_dev.dat.

On first run, you will need to enter some more parameters before entering the currents and plot ranges data if you don’t have an eps_params.dat file in your directory.

On MSO4SC Data Catalogue this file is already included in the dataset.

For instance using the default current params, you get the following magnetic field \(B_z\) profile along \(Oz\) axis as long as its gradient.

There are others usefull options to carry out calculation on list of points and so on.

See here for details.

2. Data files

The data files may be retreived from Data Catalogue. See the dataset HL-31 in Lncmi collection.

The gzipped archive tarball HL-31-ana.tgz contains all the files needed.

2.1. Magnet Cfg file

  • HL-31.d

3. Outputs

The value of Magnetic Field in cylindrical coordinates at \((r=0,z=0)\) is: \((0,37.8622880853634)\)

To view the result with gnuplot in the remote desktop, type the following command:

plot "HL-31_dev.dat" using 1:2 w l lw 3 title "B_z", \
     "HL-31_dev.dat" using 1:3 axis x1y2 w l lw 3 title "dB_z/dz"

\(B_z\) and stem:|\frac{\partial B_z}{\partial z} profile on \(Oz\) axis]