Space charge impedance and electromagnetic fields in elliptical vacuum chambers

Starting from the electric fields produced by a point charge and a dipole travelling inside a circular vacuum chamber, in this paper we derive a formalism for a complete set of equations that describe the electromagnetic fields and the longitudinal and transverse coupling impedances arising by the interaction of a beam with a perfectly conducting pipe in the case of elliptic geometry. The expressions, which are valid for any frequency and beam energy, are written in terms of expansions of Mathieu functions, allow to range from a circular geometry to the parallel plates, and show an interesting parallelism with the well known expressions for a circular pipe. We also obtain that, under the approximation of low frequency, the formalism allows us to derive the Laselett coefficients for parallel plates, circular and elliptic beam pipe.


I. INTRODUCTION
Collective effects due to self-induced electromagnetic fields in a particle accelerator are generally studied by introducing the concepts of wakefield and coupling impedance [1][2][3], which represent, in time and frequency domain respectively, the response of the environment to a point charge traveling inside the beam vacuum chamber or in any of the accelerator devices.These effects can be very important [4], and in some cases they could compromise the machine performance leading to partial or total beam losses [5].For low energy accelerators with nonrelativistic beams, a not negligible contribution to the total impedance is given by the so-called space charge effects [6,7], which are generated directly by the charge distribution and indirectly by the image charges on the pipe wall.
The study of the impedance in the nonrelativistic case for an elliptic cross section has been performed in Ref. [8], where, however, the choice of the field expansions has led to complicated expressions, not allowing to easily disentangle, for example, from the total impedance, the direct and indirect effect of space charge, important in the transverse plane for collective effects studies of low energy accelerators.Another formulation, written as an integral form, taking into account the finite resistivity of the beam vacuum chamber, and by considering the classical regime of a good conductor, has been also derived in Ref. [9].
For what concerns the low frequency limit of the space charge impedance in elliptic geometry, in addition to the Laslett coefficients valid for the transverse plane in the stationary regime [7], an equivalent radius has been introduced in Ref. [10], allowing to evaluate the longitudinal and transverse impedances using the expressions for a circular pipe.Lastly, there also exist numerical codes that give the beam coupling impedance due to space charge and resistive wall for arbitrary transverse geometries [11], at any frequency and beam energy.
In this paper we expand the formalism of a previous work [12], in which we derived the longitudinal and quadrupolar (detuning) indirect space charge impedance produced by a point charge traveling on the axis of a perfectly conducting elliptic vacuum chamber, presenting a model of a complete set of equations for the electromagnetic fields that allow to evaluate the longitudinal and transverse coupling impedances due to space charge at any frequency and beam energy.The equations, which show an interesting parallelism with respect to the circular case, allow to obtain the impedances for any value of ellipticity, ranging from the circular shape to the parallel plates.
In Sec.II we review the basic functions that we use to express the electromagnetic fields and the impedances in elliptic geometry, i.e. the Mathieu functions, taking, as reference work, the book of McLachlan [13].Then, in Sec.III the longitudinal space charge impedance produced by a circular uniform beam is derived.In Sec.IV, by applying a procedure similar to that of Ref. [12], we obtain the electric field of a dipole vertically and horizontally displaced, and, in Sec.V, we derive the transverse dipolar impedances, comparing them with the known expressions for a circular pipe and parallel plates.Finally, Sec.VI is dedicated to concluding remarks.

II. ELLIPTIC COORDINATES AND MATHIEU FUNCTIONS
In order to work with elliptical geometry, it is convenient to introduce the transverse elliptical coordinates φ and μ, describing respectively a set of hyperbolas having the same foci, and a set of confocal ellipses, as shown in Fig. 1.
The relations between elliptical and Cartesian coordinates are given by where F is the focal distance of the ellipse, related to the major and minor semiaxes a e and b e by With these notations the origin of the coordinate system is given by (φ ¼ π=2, μ ¼ 0), and the boundary of the beam pipe can be described by the simple equation, As already discussed in Ref. [12], the Mathieu functions represent the natural way to express the electromagnetic fields inside an elliptical beam pipe.In particular, due to the symmetries with respect to the four quadrants of Fig. 1, the longitudinal electric field, produced by a point charge traveling on the axis z of a perfectly conducting elliptical vacuum chamber, has a dependence on the variable φ that has been written in terms of the orthogonal set of elliptic cosine even functions of negative argument, given in Appendix A by Eq. (A1).The field has also a dependence on μ given by the corresponding radial modified Mathieu functions of the first and second kind (A4) and (A7).From these expressions, in Ref. [12], we have obtained the longitudinal and quadrupolar impedances, in elliptic geometry, due to the indirect space charge.
For what concerns the transverse dipolar impedance, we will first consider a vertical dipole having a symmetry with respect to AEx, and, as a consequence, we will show that the longitudinal electric field can be expressed with the elliptic sine odd functions (A3) and by the corresponding equations (A6) and (A9), and then, for an horizontal dipole, which produces a field symmetric with respect to AEy, we have the elliptic cosine odd functions (A2) and, for the radial dependence, Eqs.(A5) and (A8).
Even if the computation of the Mathieu functions is not so spread as the Bessel ones, there exists some well-known mathematical software that allows to evaluate these functions as, for example, the open source scientific PYTHON package [14].In addition to that, by solving the eigenvalue problems described by Eqs.(A14), (A16), and (A15), it is possible to write a dedicated script that evaluates also the convergence of the summations.All the Mathieu functions that we use in this article, and that are summarized in Appendix A, converge very quickly and require a number of terms which varies, depending on the frequency range of interest and ellipticity, in the order of 10-120, allowing then a fast evaluation of fields and impedances, without any particular issue.

III. LONGITUDINAL SPACE CHARGE IMPEDANCE
In Ref. [12], starting from the longitudinal electric field of a Dirac δ-function beam distribution with total charge Q moving with velocity v ¼ βc on the axis z of the elliptical pipe, we have derived the indirect space charge longitudinal and transverse quadrupolar impedances per unit of length, which we write here as where Z 0 is the vacuum impedance, k 0 is the wave number in free space, equal to ω=c, and γ the relativistic factor.The other quantities are described in Appendix A.
In order to evaluate the effects of longitudinal space charge on the beam dynamics, of particular interest for low energy accelerators [15,16], Eq. ( 4), which gives the contribution only of the indirect effect, is not sufficient, and the direct space charge has to be taken into account, too.By considering a transverse uniform distribution, as that described in Ref. [17], in this section we obtain the total longitudinal space charge impedance valid for an elliptic beam pipe geometry at any frequency.In order to do that, we start from the direct longitudinal electric field (in frequency domain) produced by a round beam with uniform transverse density within beam radius r b , given in Ref. [17], and that we write as Differently from the cited article, we are now interested in the indirect field generated inside an elliptical vacuum chamber.We observe that the direct electric field in Eq. ( 9) for r > r b depends on K 0 ðrÞ as that of the point charge of Ref. [12].There is only a difference in the multiplying coefficient.By using then the same method, writing the modified Bessel function of second kind in terms of a summation of Mathieu functions, we can easily obtain the indirect field for the elliptic geometry as We are now able to express the total field produced by a uniform transverse beam distribution inside an elliptical vacuum chamber as a sum of Eqs. ( 9) and ( 10): Indeed this field satisfies the boundary conditions, being zero on the surface μ ¼ μ 0 .The longitudinal impedance per unit length can then be evaluated as If we introduce the quantity then the above equation can be compared with those of Ref. [17] when the pipe tends to become circular (q r → 0) and for parallel plates (q r → 1).Of course the equation can be used to obtain the space charge impedance for any intermediate value of the ellipticity.In the approximation of low frequency, for a circular pipe of radius b, we also have the classical expression of the space charge longitudinal impedance [6] In Fig. 2 we show a comparison between the absolute value of the space charge impedance given by Eq. ( 12) in the extreme cases of circular pipe (q r ¼ 10 −3 ) and parallel plates (q r ¼ 0.8) with the analytic solutions of Ref. [17] as a function of βγ=ðk 0 r b Þ, which is inversely proportional to the wave number and, then, to the frequency.It is important to underline that, despite this term appears as an independent variable of the Bessel functions for both the circular pipe and parallel plates, the space charge impedance changes with energy (and with beta) even if the term is kept constant.
In the same figure we also show the low frequency approximation given by Eq. ( 14).When k 0 decreases, the low frequency approximation coincides with the solution of the circular pipe.

IV. ELECTROMAGNETIC FIELDS OF A DIPOLE
In order to evaluate the transverse impedance due to space charge, we first consider the electric field produced by two charges forming a dipole moving with velocity βc in the free space.Let us suppose that the dipole moment is oriented along y and equal to P ¼ 2Qd, where 2d is the distance between the two charges.The longitudinal electric field in any position of the free space for r ≫ d is given by [18] with θ the angle with respect to the x axis in cylindrical coordinates.
Using a procedure similar to that of Ref. [12], we first move from cylindrical to elliptic coordinates by writing We then transform the modified Bessel function of the second kind by using the relations (8.407) and (8.532) of Ref. [19].After some mathematical manipulations, we obtain where and C 1 k is the Gegenbauer function (see Appendix B for details).
Therefore, the longitudinal electric field of Eq. ( 15) can be written as In Appendix B we show that the last two terms of the above summation can be written as a sum of se 2lþ1 ðφ; −qÞ with known coefficients.
Considering Eq. (B7), by using then the relations that give the Bessel functions of index k in terms of those of index k AE 1, we then obtain FIG. 2. Dependence of space charge longitudinal impedance with wave number.Comparison between Eq. ( 12) and analytic solutions for parallel plates and circular pipe with r b ¼ 5 mm, b e ¼ 1 cm, and β ¼ 0.5.
In Appendix C, we show that the last summation in round brackets can be reduced to the sum of only two addenda; namely, In the same Appendix a further simplification is performed, by expressing the sum with the index r in Eq. ( 21) as the radial modified Mathieu functions of second kind Gek 2mþ1 .Therefore, the final expression of the longitudinal direct electric field of a vertical dipole in free space in elliptic coordinates is given by It is important to observe that Eq. ( 23), which is equivalent to Eq. ( 15) since the electric field must exhibit the same configuration independently from the coordinate system that has been adopted, is expressed in terms of a product of Mathieu functions with separate elliptic coordinates φ and μ, as done in Ref. [12] for the field produced by a point charge.
In order to determine the indirect field scattered by the elliptic boundary conditions, due to the symmetric reasons discussed in Sec.II, we expand this field in terms of the Mathieu functions se 2mþ1 and Se 2mþ1 , with the expansion coefficients determined in such a way to give a zero value electric field on the elliptic surface μ ¼ μ 0 .Finally, by using the orthogonal properties of se 2mþ1 , we easily obtain The total longitudinal electric field is then given by the sum of direct and indirect fields: This field satisfies the boundary conditions on the contour of the ellipse representing the beam vacuum chamber.Equation ( 25) is our final result, expressed in a compact form, to calculate the longitudinal electric field, at any frequency and transverse position, produced by a dipole in an elliptic vacuum chamber of any dimension and aspect ratio.
It is interesting to observe that Eq. ( 25) is formally very similar to the well-known longitudinal electric field generated by a dipole in a perfectly conducting beam pipe of radius b e [18]: with the pair of modified Bessel functions of first and second order I 1 ðxÞ and K 1 ðxÞ replacing the summation of the pair of modified Mathieu functions of first and second order Se 2mþ1 and Gek 2mþ1 , and sin θ replacing the elliptic sine odd functions.The equation can therefore be used to fully describe and rapidly compute the longitudinal electric field produced by a dipole inside a beam vacuum chamber having elliptical cross sections.
As we show in Appendix D, Eq. ( 26) can be also derived from Eq. (25) in the limit when the elliptic pipe tends to become round, that is when For what concerns the electric field produced by a dipole oriented along the horizontal axis x ¼ 0, we start from an equation similar to Eq. ( 15), but with a cos θ dependence instead of sin θ.The cosine can be written in terms of elliptic coordinates as so that we find again Eq. ( 20), but, instead of the term ðsinh μ Á Á Á sin φÞ we have now ðcosh μ Á Á Á cos φÞ.This gives a different expansion of the Gegenbauer function in terms of the elliptic cosine odd functions, and, as shown in Appendix E, after some mathematical manipulations, we obtain a longitudinal electric field given by

V. TRANSVERSE SPACE CHARGE IMPEDANCES
From the longitudinal electric fields produced by a dipole displaced in the vertical and horizontal planes, we obtain, in this section, the transverse coupling impedances.While in the longitudinal case the direct and indirect space charge effects are important since both affect the coherent motion, for the transverse case the direct term acts incoherently on the beam, and therefore, only the indirect space charge impedance is derived here for collective effects studies.
In particular the vertical and horizontal impedances per unit length can be written as [20] dZ dip By using Eq. ( 1), the partial derivatives can be simplified giving so that, from Eqs. ( 24) and (E13), we obtain respectively where with Se 0 2mþ1 and ce 0 2mþ1 we have indicated the derivatives of the functions evaluated in 0 and π=2 respectively.
These equations allow to evaluate the dipolar space charge impedances for any value of ellipticity, frequency and beam energy.Moreover, the summations converge very rapidly allowing fast computations of the impedances.
If we start from the indirect field in Eq. ( 26), and by considering the derivative of the electric field with respect to r, we obtain the transverse space charge impedance in circular geometry, which can be written as The impedance given by this equation can be compared with the impedances of Eqs. ( 33) and (34) in the limit of q r → 0.
As a further term of comparison, in elliptic geometry, if we assume that the frequency tends to zero, a transverse impedance can be obtained by considering the stationary forces produced by the beam.In this case the asymptotic expressions of the impedances, which do not depend on frequency any more, can be written in terms of the Laslett coefficients as [7] with ξ 1 and ϵ 1 summarized in Table I for circular, elliptic, and parallel plates geometries.
In the table, KðkÞ is the complete elliptic integral of the first kind, k ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffi 1 − k 02 p , and k 0 is the complementary modulus given by TABLE I. Laslett coefficients for circular, elliptic, and parallel plates geometries [7].

Geometry Circular
Elliptic Parallel plates An alternative way of writing Eq. ( 36) and giving the same results in the static condition for the elliptic geometry, has been found in Ref. [10].If we write the impedance due to the indirect space charge effect as the equivalent radius b eq depends on the ellipticity and it is given by [10] b for the vertical and horizontal planes, respectively, and with ϑ n ðz; q r Þ the Jacobi theta functions.In Figs. 3 and 4, in blue, red, and black, we show the absolute value of the indirect space charge impedances given by Eqs. ( 33) and ( 34) for three values of q r .The impedances are shown as a function of the quantity βγ=ðk 0 b e Þ, and we have considered β ¼ 0.5 and b ¼ 3.5 cm.
The case with q r ¼ 10 −3 (black curve) agrees very well with the transverse impedance of the circular pipe of Eq. (35) (dashed orange curve).The comparisons for parallel plates, both in y and x, and obtained with q r ¼ 0.8, have been done by using the code IW2D [21] with a very low resistivity (blue curve compared with dashed yellow one).We can also see from the figures that, when k 0 decreases (low frequency, asymptotic value), the expressions with the Laslett coefficients for circular and parallel plates, represented with brown and magenta lines respectively, and obtained with Eq. ( 36), agree with our results.Moreover, for the case of elliptic geometry (evaluated here for q r ¼ 0.1 and represented with the red curve), we can only compare our solution in terms of the Mathieu functions with the asymptotic expression of Eq. (36) or Eq.(38) (green line).
In addition to the comparison of the impedance, if we divide Eqs. ( 33) and (34) by jZ 0 =ð2πβγ 2 Þ, and compare the results with Eq. (38), it is possible to obtain the vertical and horizontal equivalent radius as a function of q r (valid only for low frequency in the asymptotic approximation): The corresponding adimensional equivalent radii (b eq;ðv=hÞ =b), compared with those given by Eqs.33) (black, blue and red curves) with the circular pipe case given by Eq. (35) (dashed orange curve), with IW2D code results for parallel plates (dashed yellow curve), and with the asymptotic expressions (36) and (38) valid for low frequency (brown, magenta and green lines).FIG. 4. Dependence of space charge horizontal impedance with wave number for b e ¼ 3.5 cm and β ¼ 0.5.Comparison of Eq. (34) (black, blue and red curves) with the circular pipe case given by Eq. (35) (dashed orange curve), with IW2D code results for parallel plates (dashed yellow curve), and with the asymptotic expressions (36) and (38) valid for low frequency (brown, magenta and green lines).

VI. CONCLUSIONS
In this paper we have developed a set of equations which use the Mathieu functions and give the electromagnetic fields produced by a point charge and a dipole inside a perfectly conducting vacuum chamber of elliptic geometry.
From the fields we have then derived the space charge coupling impedances, which are valid for any frequency, beam energy, and ellipticity.Furthermore, the fields and the impedances, written in terms of summations of angular and radial Mathieu functions, can be quickly evaluated due to the rapid convergence of the series.
The developed theory can be extended to include the case of resistive wall impedance [22], and, in general, can be used as reference for the study of coupling impedances in elliptic geometry, as, for example, the evaluation of the electromagnetic fields generated by a beam passing through a step transition between two confocal elliptical waveguides.

ACKNOWLEDGMENTS
We acknowledge many helpful and stimulating discussions with E. Métral.This work was partially supported by the European Commission under the HORIZON2020 Integrating Activity project ARIES, Grant Agreement No. 730871, and by the CERN PS-LIU project.

APPENDIX A: THE MATHIEU FUNCTIONS
In this Appendix we summarize all the Mathieu functions used in the paper, considering, as reference work, the book of McLachlan [13].In particular, the periodic angular ordinary Mathieu functions are given by four series of orthogonal equations, the elliptic cosine even, cosine odd, sine even and sine odd functions.For our problem we need only the first two and the last one with negative argument −q, expressed by and the corresponding radial modified Mathieu functions of the first and second kind given respectively by and and ν 1 ¼ ffiffiffi q p e −μ and ν 2 ¼ ffiffiffi q p e μ .Here I r ðxÞ and K r ðxÞ are the modified Bessel functions of first and second kind, and se 0 2lþ1 and ce 0 2lþ1 are the derivatives of the respective functions.
The expansion coefficients A 2rþ1 , and B ð2lþ1Þ 2rþ1 , are defined in such a way that the angular functions are orthogonal [13], so that, for example, we have They can then be obtained by solving an eigenvalue problem for the following truncated matrices: where the terms "a" represent the eigenvalues and the expansion coefficients are the eigenvectors of the three truncated linear equations' systems. Since we can then write the electric field of Eq. ( 21) as We now recognize in the last summation a term proportional to the Mathieu functions Gek 2mþ1 of Eq. (A9), so that we have finally

APPENDIX D: DERIVATION OF THE LONGITUDINAL FIELD OF A DIPOLE FROM AN ELLIPTICAL PIPE TO A CIRCULAR ONE
Let us start from Eq. (25) in the limit when a e → b e , which also means that F → 0 and q → 0.Moreover, we have When q ¼ 0 all the coefficients of the Mathieu expansions A ð2lþ1Þ 2rþ1 are zero except the first one (r ¼ l ¼ 0) which is 1, so that the electric field (25) becomes Since A Moreover, from Eq. ( 19) we have that and, analogously, Finally, if, instead of Eq. (A6), we use, for Se ð2lþ1Þ , the expansions in terms of Bessel functions given in Ref. [13], so that the longitudinal electric field reduces to which is the longitudinal electric field of a vertical dipole in a circular perfectly conducting vacuum chamber.

APPENDIX E: LONGITUDINAL ELECTRIC FIELD OF A HORIZONTAL DIPOLE
For a dipole oriented along the horizontal axis, the electric field of Eq. ( 20) becomes The last two terms in the summation can be written as which, due to the symmetry considerations of Sec.II, can be written in terms of the elliptic cosine odd functions (A2).
To do that, we write The integral is equal to 2π if r ≤ k, otherwise it is zero, so that Therefore, the longitudinal electric field becomes with the known expansion coefficients given by Eq. (E6).
By writing now cosh μ in terms of ν 1 and ν 2 , after some mathematics, we obtain an equation similar to Eq. ( 21) of the vertical dipole: Let us now consider the last summation, for which all the terms with intermediate indexes simplify each other, so that we remain with we can write the electric field of Eq. (E8) as We now recognize in the last summation a term proportional to the Mathieu functions Fek 2mþ1 of Eq. (A8), so that the direct field can be written finally as For what concerns the indirect field scattered by the elliptic boundary conditions, due to the symmetric reasons discussed in Sec.II, we expand it in terms of the Mathieu functions ce 2mþ1 and Ce 2mþ1 , with the expansion coefficients determined in such a way to give a zero value electric field on the elliptic surface μ ¼ μ 0 , so that we easily obtain and, therefore, the total field is given by Eq. (28).

FIG. 1 .
FIG.1.Elliptic coordinates.The φ coordinate describes a series of hyperbolas having the same foci.The μ coordinate describes confocal ellipses centered in the origin of the coordinate system.

FIG. 3 .
FIG. 3. Dependence of space charge vertical impedance with wave number for b e ¼ 3.5 cm and β ¼ 0.5.Comparison of Eq. (33) (black, blue and red curves) with the circular pipe case given by Eq. (35) (dashed orange curve), with IW2D code results for parallel plates (dashed yellow curve), and with the asymptotic expressions (36) and (38) valid for low frequency (brown, magenta and green lines).