Fringe Field Effects on Bending Magnets, Derived for TRANSPORT/TURTLE
Abstract
A realistic magnetic dipole has complex effects on a charged particle near the entrance and exit of the magnet, even with a constant and uniform magnetic field deep within the interior of the magnet. To satisfy Maxwell’s equations, the field lines near either end of a realistic magnet are significantly more complicated, yielding non-trivial forces. The effects of this fringe field are calculated to first order, applying both the paraxial and thin lens approximations. We find that, in addition to zeroth order effects, the position of a particle directly impacts the forces in the horizontal and vertical directions.
1 Introduction
Charged particle optics is frequently used within the context of experimental beamline design. A key element within an optical system is often a magnetic dipole, used to bend a beam. A pure dipole field implies that the trajectory of charged particles will strictly follow an arc. However, a physical implementation of such a dipole necessitates effects beyond the scope of a pure dipole field. In the FNAL experiment ORKA [2], dipoles are used for typical reasons such as spatial constraints and the removal of certain unwanted particles. To reduce the length of the beamline (and therefore minimzing travel time), designer Jaap Dornboss suggested the implementation of a dipole adjusted at its front and back to introduce additional focusing and defocusing effects on the beam in both the vertical and horizontal directions. These effects are a direct result of the fringe fields, or the non-constant fields located at the ends of the dipole magnet. It is important to carefully consider these effects because of the sensitive nature of the ORKA secondary beamline to subtle differences in (specifically vertical) beam properties.
This document provides an in-depth derivation of the transfer matrix elements of the fringe field of a dipole magnet. In particular, standard optical approximations are applied to achieve a “first order” approximation of the fringe field. Initally, the system is simplified to consider an infinitesimally thin fringe field called the “sharp cutoff field.” Then, we consider a finite-length fringe field and its effects compared to that of the sharp cutoff field. Throughout the document, we assume conventional terminology and notation used in beam transport and as established in Refs. [1] and [3]. We also assume some basic knowledge of E&M and mechanical knowledge of a dipole magnet’s structure.
Throughout this document, we emphasize the approximations used to arrive at the solutions. For many magnets, these approximations yield accurate results; however, it is up to a designer to determine whether the approximations used are sufficiently accurate for consideration of the fringe field. We find that magnetic dipoles tuned for low momentum particles (), bent through large angles (), and/or containing large vertical gaps relative to their lengths require a higher-order consideration of fringe field effects for accurate analysis.
2 Impulse Approximation of Magnet Exit
In this section, we look to simplify the system by considering the effects of a fringe field with zero length. This configuration implies a constant field inside the magnet until the defined field boundary, after which the magnitude immediately drops to zero.
2.1 Coordinate Systems

When discussing the fringe field, calculations are simplified by placing the origin of each coordinate system at the center of the pole face. The natural coordinate system defined throughout the magnet is a cylindrical curvilinear coordinate system based on the radius of curvature of the reference trajectory111The reference trajectory is the uniform trajectory of the central ray. All other rays are measured relative. given by the magnetic field within the magnet. This system is called the coordinate system.
A new coordinate system is introduced to describe the motion of a particle upon exiting the magnet. This coordinate system again has an origin centered on the pole face and extends rectilinearly beyond the magnet, following the reference trajectory. This coordinate system is called the coordinate system. Note that the axis, in both coordinate systems, points out of the page in Fig. 2.
Fig. 2 depicts the new coordinate definitions based on the natural curvilinear coordinate system. In the curvilinear coordinate system, follows the path of the reference trajectory through the magnet, and the -axis points in the direction perpendicular to the axis in the bend-plane. Sometimes, a magnet’s pole face is rotated about the axis through an angle , conventionally positive for counter-clockwise rotations when viewed from above, to modify the effects on the beam.

We first look to find an expression of and in terms of and from Fig. 3. Figure 3) shows the region surrounding the pole face and a displaced particle with its corresponding position in both and . This image is centered around the origin of both coordinate systems (located at the pole face). Note that this graphic does not show the geometry of the magnet. For this reason, it should only be used for conceptualizing the relationship between coordinate systems.

From the pythagorean theorem, we find that
or
. To solve for , we recognize that , where is the angle traversed in the path and is the radius of curvature. Then, . Together,
(1) |
Solving for and , we have
(2) |
Now we construct an expression for the line that defines the exit pole-face in the coordinate system as seen in Fig. 4 with
(3) |
where is the pole-face rotation angle.

The component perpendicular to the bend plane, , is identical in both coordinate systems. We retain the same coordinate name for clarity and convenience. A point in the curvilinear coordinate system is given by while a point in the rectilinear coordinate system is given by .
2.2 Horizontal Effects
We begin the process of calculating the horizontal focusing effect of the fringe field. The initial position of the particle is given as in the coordinate system. This particle lies on the “reference plane” which is both the plane and the plane at and respectively. This plane coincides with the pole face when .
To calculate the horizontal effects, we must first trace the trajectory of a test particle222We designate an arbitrary particle off the reference trajectory as a “test particle.” It is distinct frommm the reference particle, which lies along the reference trajectory. This particle may or may not differ slightly in momentum from the reference particle. backwards in the coordinate system from the reference plane until it intersects the rotated pole-face. We then change to the rectilinear coordinate system so that we can translate the particle through the wedge-shaped drift space. The net effect of this transformation removes the field’s effect on the particle through the region swept out by a rotation of the pole face. (Note that while this description assumes positive and , the processes used can be rearranged for any condition. The final results are always the same.)
We know from established TRANSPORT documentation that the transformation through a dipole with radius of curvature and vertical magnetic field derivative (a unitless value equal to zero in the case of any relevant dipole magnet) is given as
where , ,
, and . Note that the prime indicates differentiation with respect to the longitudinal axis—in this case, —for the remainder of this document. Expanding the trajectories about , we have
(4) |
(5) |
Note: We define as the percentage difference between the test particle’s momentum and the reference momentum.
Approximation 1.
From the paraxial approximation used in first-order optics, we assert that each ray makes a small angle with the reference trajectory and lies a small distance from the reference ray compared to the radius of curvature of the reference trajectory. In the coordinate system used, this assumption implies
The value of is constrained to be significantly less than one in order to ensure that the angles formed with the reference trajectory stay small.
Because these values are small, any product of two or more of these quantities can be neglected in the first-order approximation.
In order to transform the particle backwards through the magnetic field (described above), we evaluate , , where is the traversed longitudinal displacement from the reference plane to the pole face (see Fig. 5). Applying geometery and from Approximation 1, we observe that . We can therefore treat it as a small quantity as we do with . In fact, dividing both sides of Eq. (2.2) by , we recognize there are several terms that contain a product of and some quantity mentioned in Approximation 1. Eliminating those terms and again multiplying through by , we have . Applying the same argument to Eq. (2.2), we eliminate the products of small terms, yielding . Together,
(6) |

The above calculations show that tracing the particle backwards from the reference plane to the pole-face yields no first order changes.
The rotated pole-face geometrically yields a focusing or defocusing effect on horizontally displaced particles. Physically, the focusing effect is simply the result of passing through less (or more) field region. If a particle has a positive coordinate and the pole-face rotation angle is positive, then it will experience less field than the reference trajectory; likewise, if a particle has a negative coordinate and is positive, it will experience more field than the reference trajectory. The reverse occurs for a negative . Thus, we can expect that a positive results in a defocusing effect (the horizontal exit slope of particles with negative decreases and the horizontal exit slope of particles with positive increases) and similarly a negative results in a focusing effect.
To express this behavior mathematically, we must change to the coordinate system to reflect the wedge-shaped, field-free region outside of the pole-face (see Fig. 6). This change in coordinate system reflects the physical fact that the particle’s direction does not change after exiting the field region: any ray will travel in a straight line once in the rectilinear coordinate system.

By Eq. (2), we recognize that when we expand in and evaluate it at , Approximation 1 yields . Because to first order at the pole face (see Eq. (6)), we conclude that, at the reference plane in the coordinate system, . Therefore, we only look for effects in due to the change in coordinate system.
To find these effects, we begin by applying the chain rule:
From Eq. (2), we substitute in the appropriate derivatives to obtain
To simplify, we first expand in and evaluate at , giving
Applying Approximation 1 yields
Now expanding in , we find that
and, again applying Approximation 1,
Again recalling Eq. (2), we recognize that to first order and, as before, . Substituting these relations into Eq. (3), we have . Finally, substituting for into the above equation yields
To translate the particle through the wedge-shaped drift space, we apply the standard drift space transformation where, to first order, ( is the distance from the pole face to the reference plane in the direction). Rewriting,
Noting from Fig. 5 that and applying Approximation 1, we eliminate appropriate terms, yielding
It is important to note that slopes do not change when traversing a drift space, so we still have
Then, in order to conform to the standard coordinate system , we rename once the particle reaches the reference plane (see Fig. 2). Thus we have
(7) |
This result is the complete transformation due to the fringe field in the horizontal direction. Figure 7 provides an intuitive geometric description of the transformation in the coordinate.

2.3 Vertical Effects
Vertical effects on rays passing through the fringe field of a dipole are caused by the element of the field perpendicular to the pole face. For the impulse approximation, if , this element of the field will be in the direction of motion of the particle, causing no vertical forces on the particle and leaving the trajectory unchanged. To begin analysis, we suppose that the field around the pole face also has some non-zero component in the direction perpendicular to the pole face, along with the typical field component . It is important to clarify that specifics regarding the field are unnessesary for this mathematical consideration.
We begin with the trajectory coordinates before considering the effects of a vertical fringe field. Note that and before entering the fringe field.
2.3.1 Equation of Motion
We look to find the equation of motion in the direction to describe the trajectory. To do so, we must find an expression for all components of the magnetic field. Referencing Maxwell’s equations (Ampere’s Law), we note that . Therefore,
(8) |
where the and fields are components of the field in the respective directions, as seen in Fig. 8.

We recognize that depends solely on and —it is constant in , as expected. Hence, depends only on and . With the sharp cutoff field, changes from constant inside of the magnet to zero outside of the magnet. This implies that is a step function where is infinite, and therefore nonzero, at the effective field boundary. However, this discontinuity is irrelevant with regards to the following method of analysis.
By using the first line from Eq. (2.3.1), is linear in (upon integrating both sides by ), or
(9) |
Expressing Newton’s Second Law in the direction in a magnetic field,
(10) |
where333Cases involving , although mathematically feasible, are physically unrealizable and therefore irrelevant.
(11) |
(where the prime notation indicates differentiation with respect to , the longitudinal axis in the coordinate system), from the chain rule. Therefore, . Rewritng Eq. (2.3.1),
Approximation 2.
2.3.2 Evaluating the Equation of Motion
Integrating Eq. (14) once across the field boundary yields the change in the derivative of with respect to . That is,
(15) |
for . Referencing Eq. (2.3.1) and integrating both sides with respect to , we find that
(16) |
Recalling Eq. (3) and differentiating,
(17) |
Now consider the integral across the field boundary, . Because is before the boundary and zero afterwards, the integral evaluates to simply . From using this result and by Eq. (17), we have
(18) |
Now, equating Eq. (16) and Eq. (18) and integrating over from zero to , we have
(19) |
Finally, we can recall Eq. (15) and combine it with Eq. (19), yielding an expression for the change in ,
(20) |
This change in the derivative of with respect to is simply the change that results only from crossing the field boundary. We note that an integration to find the change in would result in infintesimal bounds, yielding a zero result. Hence, the total transformation due to the fringe field is
(21) |
2.4 Alternative Derivation of Vertical Effects
We begin by considering the vertical component of the magnetic field in the magnet. On the interior of the magnet, the vertical component of the field has a value of and on the exterior of the magnet the vertical component of the field has a value of zero. We look to define a new axis that is perpendicular to the rotated pole-face of the magnet in order to express the field mathematically. We use the geometry of the and axes and the pole face to construct this axis (see Fig. 9). Let us define the new axis as

The field along the axis looks like a Heaviside function, , so
Rewriting this definition in terms of and gives
In order to find the field components in the and directions, we must reference one of Maxwell’s equations and see that . That is,
Hence, we have
where is the Dirac delta function.
Therefore, we can solve for and by integrating from zero to in . Because these functions are constant in , this calculation is a simple process and yields, together with ,
As before, we write the equation of motion (see Eq. (2.3.1)) and substitute in the field components and the expression for (as in Eq. (11)). So, we now have
(22) | ||||
By Approximation 1, we eliminate the second order term . We simplify the equation to
(23) |
Integrating with respect to across the pole-face from to (referencing Eq. (3)) for any , we have
This result is the total change of the slope from passing through the sharp cutoff field.
We then attempt to calculate the total change in the position from passing through the pole face. To do this, we take the antiderivative of both sides of Eq. (23) and integrate across the field boundary, as before, with the same bounds.
We see as goes to zero,
The above result shows that the total change of from passing through the sharp cutoff field is zero.
Thus, the transformation through the sharp cutoff field is:
3 Extended Fringe Field Effects
3.1 Coordinate System
In this section, we look to get a better approximation than the previous impulse approximation. The impulse approximation’s sharp cutoff magnetic field cannot be physically realized. We look to find an approximation based on a finite vertical pole gap where the fringe field extends beyond that of the sharp cutoff case. Recall that the pole width is still treated as if it were infinite so that the field never has a non-zero horizontally transverse component. See Fig. 10.

We first look to define an axis perpendicular to the pole-face in the plane (see Fig. 9). The magnitude of the field is then only a function of this coordinate and the coordinate. That is,
(24) |
where is the vertical pole gap444The definition of here differs from the definition given in the alternative derivation for the sharp cutoff field by a factor of .. For sufficiently large positive , the magnitude of the field is zero. Conversely, for sufficiently large negative , the magnitude of the field is , or the magnitude inside the magnet. We name these values and respectively. Note that is finite but large enough such that any remaining field is trivial.
Let be the “effective field boundary,” or the point at which the sharp cutoff field drops to zero. Further, let be the function representing the sharp cutoff field. Consider the sharp cutoff field and the extended fringe field as functions of . We set the effective field boundary such that
(25) |
where represents the magnitude of the field in the vertical direction at (see Fig. 11). While the definition is an approximation because does indeed vary with , it is necessary and reasonable for small, practical values of (as can be seen in Fig. 10).

Finding the field components in the other two directions and is necessary in order to apply the Lorentz force. Because , we know that . Applying Ampere’s Law,
Taking the antiderivative of both sides of each of the above equations with respect to yields
Evaluating the integrals on the right, we have
Finally, applying the chain rule from derivatives of Eq. (24),
(26) | ||||
From these expressions of the field in the three coordinate directions, we can determine the horizontal and vertical effects of the fringe field.
3.2 Horizontal Effects
To calculate the horizontal trajectory, we begin with an expression of Newton’s second law in the direction,
From Eq. (26), we substitute in . Further we recognize that where the prime indicates differentiation with respect to (the longitudinal axis in this coordinate system). So,
After dividing by , we use Approximation 2 and :
Then, applying Approximation 1, we eliminate the term containing and find
(27) |
Because from Eq. (24), we multiply both sides of Eq. (27) by this quantity and apply the chain rule to both sides, yielding
(28) |
Integrating both sides from to ,
(29) |
We observe that Eq. (29) is valid for and , the extended field case. We denote the slopes of the trajectories with subscripts and for the extended fringe field and sharp cutoff field cases respectively. Subtracting the two, we have
Recognizing that the second and fourth terms on the left side both represent the slope well inside the magnet by the definition of , their difference is zero. Thus,
This equation represents the difference of the slopes of the sharp cutoff case and the extended case at . Recalling Eq. (25),
Then,
Hence, the vertical slope of the trajectory in the bend plane in the case of the extended fringe field is equal to the slope in the sharp cutoff field. As such, , just as in Eq. (2.2).
By using the process to achieve Eq. (28) twice, we find that
We integrate twice with respect to and subtract the sharp cutoff case and the extended case to find the difference in between the extended case and the sharp cutoff case, just as before. This process results in
where
This difference represents the horizontal dispacement of a ray from the equivalent ray in the sharp cutoff case. This displacement affects any input ray equivalently. Therefore, the net effect is a shift in the entire beam, including the reference trajectory. Because this difference does not depend on any initial trajectory coordinates, we call this effect a “zeroth order” effect.
The final effects of the fringe field in the horizontal direction are
(30) |
3.3 Vertical Effects
To adequately consider the vertical effects, we must consider the horizontal trajectory throughout the fringe field and how it affects the vertical motion. It is important to recognize that, due to the fringe field, not even the reference particle exits the magnet parallel to the axis: because the fringe field is continuously decreasing to zero as opposed to a instantaneous change in the sharp cutoff case, both particles experience lesser horizontal bending effects but for longer periods of time. This phenomenon implies that particles are at an angle to the axis, called , which continues to change until the particles are a significant distance from the pole face, at which point . See Fig. 12.

Suppose a particle displaced in the direction. Because of the particle’s position along the axis, it will experience a field pointing in the direction as well as the typical field in the direction while within the fringe field (see Fig. 10). The field component in the direction perpendicular to the trajectory within the bend plane is the direct cause of the vertical focusing/defocusing effects on the displaced particle. Thus, the vertical effects depend on the said field component and the speed of the particle projected into the bend plane, . Let be a curvilinear coordinate system where the axis is always perpendicular to the particle’s trajectory in the bend plane.
3.3.1 Equation of Motion
By using the same technique that we used to find the field components in Eq. (26), we can find and :
(31) |
We then consider the equation of motion in the vertical direction,
Because of the definition of the coordinate system, the only velocity in the bend plane is tangential to the trajectory, i.e. . Further, applying Approximation 2 in the coordinate system, . Simplifying,
Then, from Eq. (3.3.1),
(32) |
where prime indicates differentiation with respect to (again the longitudinal direction in this coordinate system).
Consider the differential right triangle in Fig. 12 (we include because the distance along the axis must be scaled to the distance along the axis). Trigonometric relationships yield
(33) |
We multiply the left side of Eq. (32) by and the right side by . Then, we integrate from to , where is a floating variable.
(34) | ||||
Now, we must find approximations for and . In the end, we will substitute these back into the previous expression, yielding the total change in .
3.3.2 Expression for
We now attempt to find an expression containing from a differential equation of motion in the perpendicular direction from .
We begin expressing the Lorentz force in the perpendicular direction in terms of and . By linking and with the instantaneous radius of curvature of the path, we recognize that . Utilizing in the equation for centripetal acceleration and equating it to the Lorentz force, we have
As used several times previously, we apply Approximation 1 and Approximation 2 but in the coordinate system. Hence, the equation of motion in the perpendicular direction is
(35) |
Recall from Eq. (33) that . Applying this relation to Eq. (35), we have that
(36) |
Next, suppose is the axis perpendicular to the axis (see [4]), scaled in (just as is). As before, we consider the differential right triangle in Fig. 12. We see
Differentiating with respect to ,
Substituting Eq. (36) into the previous equation, we have
(37) |
We integrate555Note that is simply a dummy variable used to clarify the discrepancy between the variable of integration and the bounds. both sides of Eq. (37) from to , where is a floating variable,
Substituting in and that ,
(38) |
By using an iterative approximation666By iterative approximation, we mean a process of utilizing some given information and inputting it to one side of some implicit equation to approximate all other values described in said equation. In this case, we use fact that and substitute this value into the right-hand side of the equation., utilizing the given point of , we find that
(39) |
3.3.3 Expression for
We look to use a similar iterative approximation to find an equation for in terms of some fixed point by using Eq. (3.3.1).
Rewriting Eq. (3.3.1), we have
where . The next step is to make the iterative approximation. We choose the fixed point as and . Simplifying,
(40) |
Then, integrating from to and solving for , we have
where the factor above arises from applying the chain rule to convert from to .
Approximation 3.
Physically, we know that the extent of the fringe field, , is of the same order as the vertical gap . Because where is the length of the magnet, we conclude that
We can see from division by that the term containing contains the product of two small values (assuming ) and can be neglected, following Approximation 3. Then simplifying,
(41) |
3.3.4 Change in
Utilizing the previous three subsections, we derive an approximation for the change in , the vertical slope, as a function of the vertical displacement, . Substituting in Eq. (39) and Eq. (41) into Eq. (3.3.1), we have
The lower bound of the outer integral is set to to account for the effects of the entire fringe field.
Approximation 4.
For a length of a magnet on the order of or smaller than the radius of curvature and assuming as in Approximation 3, it follows that
Eliminating all but first order terms in from Approximation 4 and simplifying,
(42) |
We can further simplify Eq. (42) with integration by parts to see that
(43) |
To compare this result with the sharp cutoff case, suppose an “effective exit angle” such that
(44) |
where is a dimensionless, measurable integral777Note that within texts like The Optics of Charged Particle Beams, this integral contains in the denominator; however, a different definition of lacking is used. The definition Eq. (24) was chosen to clarify the mathematics, as seen in Enge’s “Deflecting Magnets.” Hence, the integrals are equivalent., defined as
(45) |
This angle is the angle through which the pole face in the sharp cutoff case must be rotated to achieve the same vertical effect. Although many texts include further approximations to solve for ,888These texts include but are not limited to SLAC-75, The Optics of Charged Particle Beams, and both the TRANSPORT/TURTLE manuals. no further approximations are necessary.
3.4 Total Transformation
Here we compile all effects of the extended fringe field, represented mathematically through matrix-vector algebra. The input vector is equivalent to the output vector from the bending magnet transformation preceding the exit face fringing field.
(48) |
4 Evaluation of Approximation Accuracy
We now consider some real-world magnets and the level of accuracy that the approximations used throughout this document would provide. Two distinct cases are examined: Fermilab’s Test Beam dipole magnet and ORKA’s first bending magnet (proposed).
Value | Test Beam | ORKA Beam | Notes |
---|---|---|---|
3.0 m | .80 m | Magnet longitudinal length. | |
3.8 cm | 8.9 cm | Vertical pole gap - represents twice the maximum vertical displacement. | |
13 cm | 30 cm | Magnet width - represents twice the maximum horizontal displacement. | |
120 GeV/ | .60 GeV/ | Design momentum of the magnet. | |
15 kG | 15 kG | Magnitude of the magnetic field deep within the magnet. | |
.22 | Used in Approximation 1. | ||
.067 | Used in both Approximation 1 for twice the maximum vertical displacement and in Approximation 4. | ||
.013 | .11 | This ratio relates the fringe field length (on the order of ) and the total magnet length, used in Approximation 3. | |
.011 | .60 | Used in Approximation 4. A smaller value yields a more accurate approximation. |
The ratios calculated in the final four rows of the above table are all used in important approximations within this document. If these values are too large (i.e. on the order of or larger), the approximations lose validity because the squares and higher powers of these ratios must be essentially zero. One would note that, upon squaring each of these ratios, the errors from these approximations would be insignificant for a magnet like those in the Test Beam. However, the values yielded by ORKA’s dipole are far too large; the squares of these values are still significant.
5 Conclusion
The Total Transformation section gives a complete matrix description of a particle’s trajectory while passing through the exit fringe field of a dipole magnet. The transfer operations applied here are precisely the same as those found in TURTLE and TRANSPORT. Several other texts including the TRANSPORT manual state a result differing from the result given above (specifically, the component). However, the discrepancy lies in the use of an unnecessary approximation to yield a more aesthetically pleasing matrix element.
In conclusion, the first order approximations of the fringe fields in a magnetic dipole are sufficient for high-momentum, large-ring dipoles. Further consideration regarding higher-order effects is necessary when dealing with certain magnets.
Acknowledgements
We would like to thank Tom Kobilarcik and Douglas Jensen for their help and advisory throughout the creation of this document. Further, we would not be in any position to write this document without the assistance and encouragement of our advisor Joseph Comfort. Without their aid in revision and experience in the field, this document would not exist.
References
- [1] Carey, David C. The Optics of Charged Particle Beams. Harwood Academic Publishers, 1992.
- [2] Fermilab Proposal P1021. ORKA: Measurement of the Decay at Fermilab. Fermilab, November 28, 2011.
- [3] Enge, Harald. Focusing of Charged Particles, Vol. 2. “Deflecting Magnets.”
- [4] Sagalovsk, Leonid. “Third-Order Charged Particle Beam Optics.” University of Illinois, 1989.