Magnet Design for Neutron Interferometry
By: Rob Milburn
Mathematical Motivation
Derived from two of Maxwell’s Equations
Inside cylinder hollow, second equation will see J as zero
As a result H can be expressed as a gradient of a scalar potential
0 BJH
Derivation for Simulation
MH
0 HB
02 M
Interpretation
Solving Laplace’s equation for magnetic potential
Analogous to complex analytic function w(z)– w=u+iv, z=x+iy
If map scalar potential in complex plane, the equipotential lines (const u) and lines of flow (const v) will be orthogonal
Boundary Conditions
Input into COMSOL:1. Inner Cylinder – expect no change
in B-field flux across boundary2. Outer Cylinder – expect no B-field
outside cylinder
Interpretation of COMSOL output:1. Expect surface current j to flow
along equipotentials of ϕ.2. The current between and two
equipotentials is: I= ϕR-ϕL, where ϕR and ϕL are on the on right and left sides, facing downstream
€
∂∂n
= H0 cos(θ)
0n
€
ˆ n × Δr H =
r j
€
ˆ n • ΔB = 0
€
k = Φ0 + k ⋅ I
Initial Design (What it should look like)
Magnet is composed of two cylinders, one encompassed within the other.
Innermost – constant B Field Region between two – Don’t Care Outside outer – Zero B Field
Initial Simulation
Given by COMSOL Primarily just a fancy PDE solver Solved Laplace’s equations with boundary
conditions above to map the equipotentials
02
2
2
22
yx
Results with 40 Lines
Checking the Results
Use Biot Savart law to verify results from PDE
Blue Lines – magnet potential/current lines Export points on these lines to make into
current elements
Checking continued
Need an algorithm to arrange points to follow path
Need some physics to calculate B Field vector at a given point
Need method to histogram and compare results
db
r
rxdlIB
30
4
Connecting the Dots
Obtained points from COMSOL but not path Very Disorganized Front face Only real worry, Can base rest of
geometry/path of cylinder off this Require different methods for elements
inside/outside inner circle
In between Region
Notice that lines take radial path Start with first given point Look through all given vectors in list Create displacement vector and look for point
which has smallest displacement magnitude This is point closest to it, bubble sort Rinse and repeat for next point telling it to
ignore points before it in list
Don’t connect different lines
Don’t want dl between lines. How do we avoid this?
If we have n lines in upper half of circle, and all are discrete lines wrt angle then expect angular separation
For n lines define difference
n
180
2
1
Relevance?
Create a parallel Boolean array If angular displacement exceeds or is equal
to previous definition, then we flag this position
Flags will be used to indicate start of a new line, will tell computer to not compute dl from previous point to flag
Sort again
Perform another bubble sort If y component greater than zero, sort from
smallest magnitude to greatest Vice versa for negative y component
Lines in inner circle
This time what marks line segments is xvalue Since vertical lines, expect very little/no
variation in x component create flag where this doesn’t occur
Then just sort from highest y value to lowest
How is the back created?
Back face is created in a reverse manner, making the last element in the front face the starting point in the back
Flags are made in a similar manner Then all that’s needed is the addition of a z
component
The lines?
All that’s needed is the point on the face where the line starts
Always the last point in a line segment or the position before a flag
Then just add an increment in the z direction. (400 total dl segments transversing z direction in my simulation)
Actual physics
As stated earlier we use biot-savart law No integral just sum of a lot of infinitesimal
current elements Forces any dl between flags to be zero so no
contribution between lines
Vector Field
Calculated field on a 3-d grid, using the Biot Savart Law
can plot field on a line, plane, or 3d space
Displaying Results
A tree is created displaying the BField Results
The following variables are saved to make histograms from
X coordinate Y coordinate Z coordinate Rho (cylindrical
coordinates) Bx By Bz |B|
Components against space
3x3 plots
Histogrammed Results in Inner Cylinder (Bx:Rho) (20,40,100 Lines)
Interpreting the Results
Mountain range where peaks occur represents most frequent Bx value
Hard to see but as number of lines increase, range gets closer to predicted theoretical value of 1.26 gauss
Also less deviation from main mountain range as number of lines increase, shows greater precision as the number increases
Outside Region – magnitude of B Field(20,40, then 100 lines)
Interpreting results outside of magnet
All results show typical exponential decay as you get further outside the coil
Difference between them is A in the equation Slight differences in lambda but main
difference is initial value of magnitude becomes lower as number of lines increase
expA