Exact Multipole Fields in a Bend#
For static magnetic and electric multipole fields in a bend, the spatial dependence of the field is different from multipole fields in an element with a straight geometry as given by Eqs. (16) and (15). The analysis of the multipole fields in a bend here follows McMillan [1].
In the rest of this section, normalized coordinates \(\widetilde r = r / \rho\), \(\widetilde x / = x / \rho\), and \(\widetilde y = y / \rho\) will be used where \(\rho\) is the bending radius of the reference coordinate system, \(r\) is the distance, in the plane of the bend, from the bend center to the observation point, \(x\) is the distance, in the plane of the bend, from the referene coordinates to the observation point, and \(y\) is the distance out-of-plane to the observation point. With this convention \(\widetilde r = 1 + \widetilde x\).
As McMillian shows, it is possible to calculate the magnetic field by constructing the appropriate vector potential. However, from a practical point of view, it is simpler to use a scalar potential \(\phi\) for both the magnetic and electric fields with the field given by \(-\nabla \phi\). The potential is a solution to Laplace’s equation
Solutions to Laplace’s equation can be written in form
and in the form
where \(\binom{a}{b}\) (“a choose b”) denotes a binomial coefficient, and \(n\) is the order number which can range from 0 to infinity.[2] The functions \(\phi_{n}^r\) and \(\phi_{n}^i\) together form a complete set of solutions. That is, any given field that satisfies Maxwell’s equations and is independent of \(z\) can be expressed as a linear combination of \(\phi_n^r\) and \(\phi_n^i\).
In (18) and (19) the \(F_p(\widetilde r)\) are related by
with the “boundary condition”:
This condition ensures that the number of terms in the sums in Eqs. (18) and (19) are finite. With this condition, all the \(F_p\) can be constructed:
Note: Care must be take when evaluating these functions near \(\widetilde x = 0\) using the exact \(\widetilde r\)-dependent functions can be problematical due to round off error. For example, Evaluating \(F_4(\widetilde r)\) at \(\widetilde x = 10^{-4}\) results in a complete loss of accuracy (no significant digits!) when using double precision numbers.
For magnetic fields, the “real” \(\phi_n^r\) solutions will correspond to skew fields and the “imaginary” \(\phi_n^i\) solutions will correspond to normal fields
where the gradient derivatives of \(\widetilde \nabla\) are with respect to the normalized coordinates. In the limit of infinite bending radius \(\rho\), the above equations converge to the straight line solution given in Eq. (16).
For electric fields, the “real” solutions will correspond to normal fields and the “imaginary” solutions are used for skew fields
And this will converge to Eq. (15) in the straight line limit.
In the vertical plane, with \(\widetilde x = 0\), the solutions \(\phi_n^r\) and \(\phi_n^i\) have the same variation in \(\widetilde y\) as the multipole fields with a straight geometry. For example, the field strength of an \(n = 1\) (quadrupole) multipole will be linear in \(\widetilde y\) for \(\widetilde x = 0\). However, in the horizontal direction, with \(\widetilde y = 0\), the multipole field will vary like \(dF_2/d\widetilde x\) which has terms of all orders in \(\widetilde x\). In light of this, the solutions \(\phi_n^r\) and \(\phi_n^i\) are called “vertically pure” solutions.
The functions \(\phi_n^r\) and \(\phi_n^i\) form the a complete set of solutions but other complete sets may be formed by defining basis functions which are linear combinations of \(\phi_n^r\) and \(\phi_n^i\). In particular, it is possible to construct a complete set of “horizontally pure” solutions. That is, it is possible to construct solutions \(\psi_n^r\) and \(\psi_n^i\) that in the horizontal plane, with \(\widetilde y = 0\), behave the same as the corresponding multipole fields with a straight geometry. The relationship between the vertically pure solutions and the horizontally pure solutions can be written in the form
For any given order \(n\), the \(C_{nk}\) and \(D_{nk}\) are determined up to an overall scaling factor. PALS sets this scaling factor by demanding \(C_{nn} = D_{nn} = 1\).
The \(C_{nk}\) and \(D_{nk}\) are chosen, order by order, so that \(\psi_n^r\) and \(\psi_n^i\) are horizontally pure. For the real potentials, the \(C_{nk}\), are obtained from a matrix \({\bf M}\) where \(M_{ij}\) is the coefficient of the \(\widetilde x^j\) term of \((dF_i/d\widetilde x)\) when \(F_i\) is expressed as an expansion in \(\widetilde x\) (Eq. (22)). \(C_{nk}\), \(k = 0, \ldots, \infty\) are the row vectors of the inverse matrix \({\bf M}^{-1}\). For the imaginary potentials, the \(D_{nk}\) are constructed similarly but in this case the rows of \({\bf M}\) are the coefficients in \(\widetilde x\) for the functions \(F_i\). To convert between field strength coefficients, Eqs. (23) and (24) and Eqs. (25) are combined
where \(\alpha_k\), \(\beta_k\), \(\alpha_{ek}\), and \(\beta_{ek}\) are the corresponding coefficients for the horizontally pure solutions.
When expressed as a function of \(\widetilde r\) and \(\widetilde y\), the vertically pure solutions \(\phi_n\) have a finite number of terms (Eqs. (18) and (19)). On the other hand, the horizontally pure solutions \(\psi_n\) have an infinite number of terms.
An important point: To properly simulate a machine, one must first of all understand whether the multipole values that have been handed to you are for horizontally pure multipoles, vertically, pure multipoles, or perhaps the values do not correspond to either horizontally pure nor vertically pure solutions! Failure to understand this point can lead to differing results. For example, the chromaticity induced by a horizontally pure quadrupole field will be different from the chromaticity of a vertically pure quadrupole field of the same strength.