HTML conversions sometimes display errors due to content that did not convert correctly from the source. This paper uses the following packages that are not yet supported by the HTML conversion tool. Feedback on these issues are not necessary; they are known and are being worked on.

  • failed: stackengine

Authors: achieve the best HTML results from your LaTeX submissions by following these best practices.

License: CC BY 4.0
arXiv:2403.10210v1 [physics.acc-ph] 15 Mar 2024

Fast Tracking of 6D Particle Phase Space Using the FC2CT Algorithm for rf Cavities

M. Southerby [email protected]    R. Apsimon [email protected] Engineering Department, Lancaster University, Lancaster, LA1 4YW, UK Cockcroft Institute, Daresbury Laboratory, Warrington, WA4 4AD, UK
(March 15, 2024)
Abstract

In this paper, a fast cell to cell tracking algorithm (FC2CT) is developed, that determines the change in 6D phase space of a particle beam through rf accelerating cavities operated in both Standing and Traveling Wave modes. The performance is compared to well trusted tracking codes - ASTRA and RF-Track - for proton beams with relativistic beta \approx 0.5. The FC2CT algorithm produces a complete analytical method to determine the change in particle momentum, with the constant particle velocity approximation over the integration region. Additional developments for FC2CT are discussed, such as altering the integration length. FC2CT can be used as a fast method class in common tracking codes to perform fast simulations through rf cavities.

I Introduction

The use of particle accelerators are paramount in multiple industries, examples including the health care, cargo scanning and research industries. As a result, there is constant requirement for additional developments within the particle accelerator industry, ensuring optimal efficiency of machines or increased beam energies. A large subset of accelerators are linear accelerators (linacs) that accelerate particles using radio-frequency (rf) cavities that contain electromagnetic (em) fields for particle acceleration. Beam dynamics simulations are a vital aspect of accelerator design, however can be computationally expensive, for example beam dynamics studies for circular machines requiring many thousands of turns.

In this paper, we outline a fast tracking algorithm for beam dynamics through coupled cavity linacs (CCL), and is called the Fast Cell to Cell Tracking algorithm (FC2CT), calculating the change in 6D phase space of a particle over one rf cell per iteration. The model approximates the particle velocity is constant over an rf cell, and space charge effects are ignored. The first approximation is accurate for protons of all energy that are to be accelerated by a CCL. The proton transition energy for more efficient acceleration by CCL is often taken to be \approx 80-100 MeV, below which drift tube linacs may have increased shunt impedance shunt_impedance_diff_strucs . Nevertheless, some CCL accelerate protons from as low as 37.5 MeV light_linac . FC2CT is only accurate for electrons over \approx 3 MeV. The tracking algorithm requires the on axis longitudinal electric field, from which the remaining non-zero field components (Er,Bθsubscript𝐸𝑟subscript𝐵𝜃E_{r},B_{\theta}italic_E start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT , italic_B start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT) are approximated by determining the Taylor expansion coefficients in the small radial limit. This method has been utilised before, in order to quickly provide a method for 3D particle tracking in well-known tracking codes, such as ASTRA astra . The method is accurate for both Standing Wave (SW) and Traveling wave (TW) cavity types, however require slightly different algorithms. In addition, the algorithm described is purely for the TM010010{}_{010}start_FLOATSUBSCRIPT 010 end_FLOATSUBSCRIPT cavity mode. The accuracy of the FC2CT model is compared with well trusted tracking codes, ASTRA (SW) and RF-Track (TW), rftrack .

I.1 Lorentz Force law and Maxwell Equations for a TM010010{}_{010}start_FLOATSUBSCRIPT 010 end_FLOATSUBSCRIPT Mode

A particle in a region of non-zero em field will experience a force given by the Lorentz force griffiths . The force is the rate of change of momentum;

ΔP=𝑑P=q(E(t)+v(t)×B(t))𝑑t.Δ𝑃differential-d𝑃𝑞𝐸𝑡𝑣𝑡𝐵𝑡differential-d𝑡\Delta\vec{P}=\int d\vec{P}=q\int\left(\vec{E}(t)+\vec{v}(t)\times\vec{B}(t)% \right)dt.roman_Δ over→ start_ARG italic_P end_ARG = ∫ italic_d over→ start_ARG italic_P end_ARG = italic_q ∫ ( over→ start_ARG italic_E end_ARG ( italic_t ) + over→ start_ARG italic_v end_ARG ( italic_t ) × over→ start_ARG italic_B end_ARG ( italic_t ) ) italic_d italic_t . (1)

Where v(t)𝑣𝑡\vec{v}(t)over→ start_ARG italic_v end_ARG ( italic_t ) is the particle velocity. In general, the em field and particle velocity are a function of time. The em fields in a given region will be described by Maxwell equations griffiths . For an rf single cell, the TM010010{}_{010}start_FLOATSUBSCRIPT 010 end_FLOATSUBSCRIPT mode is often used for acceleration wangler . The longitudinal electric field (Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT) and azimuthal magnetic field (Bθsubscript𝐵𝜃B_{\theta}italic_B start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT) in a TM010010{}_{010}start_FLOATSUBSCRIPT 010 end_FLOATSUBSCRIPT mode for a simple pillbox cavity are described by the zeroth and first order Bessel functions of the first kind bessel . rf single cells are often designed with nose-cones, to concentrate Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT on-axis and improve shunt impedance and require a beam pipe, to allow power coupling and particle transmission. As a result, the initially separable em field components in the case of a pillbox cavity become functions of the longitudinal displacement, z𝑧zitalic_z.

As a particle traversing an rf single cell will be at a small radial displacement relative to the cell radius, it is possible to describe the non-zero em field components as a function of the on-axis Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT component, denoted Ez(r=0,t)subscript𝐸𝑧𝑟0𝑡E_{z}(r=0,t)italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( italic_r = 0 , italic_t ), using a Taylor expansion about r𝑟ritalic_r = 0. The TM010010{}_{010}start_FLOATSUBSCRIPT 010 end_FLOATSUBSCRIPT mode in a given rf cell will have negligible Eθsubscript𝐸𝜃E_{\theta}italic_E start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT, Brsubscript𝐵𝑟B_{r}italic_B start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT, Bzsubscript𝐵𝑧B_{z}italic_B start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT components, as in a pillbox cavity.

The non-zero em field components observed by a particle at position, z𝑧zitalic_z, time, t𝑡titalic_t can be described as follows,

Ez(r,z,t)=[Ez(0,z)r24(2Ezz2+ω2c2Ez(0,z))]cos(ϕ0+ωt),subscript𝐸𝑧𝑟𝑧𝑡delimited-[]subscript𝐸𝑧0𝑧superscript𝑟24superscript2subscript𝐸𝑧superscript𝑧2superscript𝜔2superscript𝑐2subscript𝐸𝑧0𝑧cossubscriptitalic-ϕ0𝜔𝑡E_{z}(r,z,t)=\\ \left[E_{z}(0,z)-\frac{r^{2}}{4}\left(\frac{\partial^{2}E_{z}}{\partial z^{2}}% +\frac{\omega^{2}}{c^{2}}E_{z}(0,z)\right)\right]\textrm{cos}\left(\phi_{0}+% \omega t\right),start_ROW start_CELL italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( italic_r , italic_z , italic_t ) = end_CELL end_ROW start_ROW start_CELL [ italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( 0 , italic_z ) - divide start_ARG italic_r start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 4 end_ARG ( divide start_ARG ∂ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG start_ARG ∂ italic_z start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG + divide start_ARG italic_ω start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG italic_c start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( 0 , italic_z ) ) ] cos ( italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT + italic_ω italic_t ) , end_CELL end_ROW (2)
Er(r,z,t)=[r2Ezz+r316(3Ezz3+ω2c2Ezz)]cos(ϕ0+ωt),subscript𝐸𝑟𝑟𝑧𝑡delimited-[]𝑟2subscript𝐸𝑧𝑧superscript𝑟316superscript3subscript𝐸𝑧superscript𝑧3superscript𝜔2superscript𝑐2subscript𝐸𝑧𝑧cossubscriptitalic-ϕ0𝜔𝑡E_{r}(r,z,t)=\\ \left[-\frac{r}{2}\frac{\partial E_{z}}{\partial z}+\frac{r^{3}}{16}\left(% \frac{\partial^{3}E_{z}}{\partial z^{3}}+\frac{\omega^{2}}{c^{2}}\frac{% \partial E_{z}}{\partial z}\right)\right]\textrm{cos}\left(\phi_{0}+\omega t% \right),start_ROW start_CELL italic_E start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_r , italic_z , italic_t ) = end_CELL end_ROW start_ROW start_CELL [ - divide start_ARG italic_r end_ARG start_ARG 2 end_ARG divide start_ARG ∂ italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG start_ARG ∂ italic_z end_ARG + divide start_ARG italic_r start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT end_ARG start_ARG 16 end_ARG ( divide start_ARG ∂ start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG start_ARG ∂ italic_z start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT end_ARG + divide start_ARG italic_ω start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG italic_c start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG divide start_ARG ∂ italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG start_ARG ∂ italic_z end_ARG ) ] cos ( italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT + italic_ω italic_t ) , end_CELL end_ROW (3)
Bθ(r,z,t)=ωc2[r2Ez(0,z)r316(2Ezz2+ω2c2Ez(0,z))]×cos(ϕ0π2+ωt).subscript𝐵𝜃𝑟𝑧𝑡𝜔superscript𝑐2delimited-[]𝑟2subscript𝐸𝑧0𝑧superscript𝑟316superscript2subscript𝐸𝑧superscript𝑧2superscript𝜔2superscript𝑐2subscript𝐸𝑧0𝑧cossubscriptitalic-ϕ0𝜋2𝜔𝑡B_{\theta}(r,z,t)=\\ \frac{\omega}{c^{2}}\left[\frac{r}{2}E_{z}(0,z)-\frac{r^{3}}{16}\left(\frac{% \partial^{2}E_{z}}{\partial z^{2}}+\frac{\omega^{2}}{c^{2}}E_{z}(0,z)\right)% \right]\\ \times\textrm{cos}\left(\phi_{0}-\frac{\pi}{2}+\omega t\right).start_ROW start_CELL italic_B start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT ( italic_r , italic_z , italic_t ) = end_CELL end_ROW start_ROW start_CELL divide start_ARG italic_ω end_ARG start_ARG italic_c start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG [ divide start_ARG italic_r end_ARG start_ARG 2 end_ARG italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( 0 , italic_z ) - divide start_ARG italic_r start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT end_ARG start_ARG 16 end_ARG ( divide start_ARG ∂ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG start_ARG ∂ italic_z start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG + divide start_ARG italic_ω start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG italic_c start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( 0 , italic_z ) ) ] end_CELL end_ROW start_ROW start_CELL × cos ( italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT - divide start_ARG italic_π end_ARG start_ARG 2 end_ARG + italic_ω italic_t ) . end_CELL end_ROW (4)

Where ϕ0subscriptitalic-ϕ0\phi_{0}italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT is the rf phase when the particle enters the cell (at z=0𝑧0z=0italic_z = 0). The magnetic field lags the electric field by π/2𝜋2\pi/2italic_π / 2. Ez(0,z)subscript𝐸𝑧0𝑧E_{z}(0,z)italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( 0 , italic_z ) is the longitudinal on-axis electric field component, and can be exported from em solver codes, such as CST microwave solver CST for a given rf single cell geometry. The terms nEzznsuperscript𝑛subscript𝐸𝑧superscript𝑧𝑛\frac{\partial^{n}E_{z}}{\partial z^{n}}divide start_ARG ∂ start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG start_ARG ∂ italic_z start_POSTSUPERSCRIPT italic_n end_POSTSUPERSCRIPT end_ARG describe the nthsubscript𝑛𝑡n_{th}italic_n start_POSTSUBSCRIPT italic_t italic_h end_POSTSUBSCRIPT derivative of Ez(0,z)subscript𝐸𝑧0𝑧E_{z}(0,z)italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( 0 , italic_z ).

It is required to describe the on-axis Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT component as a Fourier series fourier , as Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT is periodic over some period, P𝑃Pitalic_P, defined by the phase advance per cell of the cavity. As Ez(0,z)subscript𝐸𝑧0𝑧E_{z}(0,z)italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( 0 , italic_z ) can be described by a Fourier series, the partial derivatives of Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT become straight-forward to compute. The Fourier terms required to construct Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT for a SW cell is shown in Fig. 1.

Refer to caption
(a)
Figure 1: Normalised on-axis Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT component, G(s) and the individual Fourier components.

For a SW cavity, the longitudinal electric field, and the derivatives, are given below at time t𝑡titalic_t;

Ez(r=0,z,t)=n=1Nbnsin(2nπzP)cos(ωt+ϕ0),,subscript𝐸𝑧𝑟0𝑧𝑡superscriptsubscript𝑛1𝑁subscript𝑏𝑛sin2𝑛𝜋𝑧𝑃𝜔𝑡subscriptitalic-ϕ0E_{z}(r=0,z,t)=\sum_{n=1}^{N}b_{n}\hskip 2.84526pt\textrm{sin}\left(\frac{2n% \pi z}{P}\right)\cos\left(\omega t+\phi_{0}\right),,italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( italic_r = 0 , italic_z , italic_t ) = ∑ start_POSTSUBSCRIPT italic_n = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT sin ( divide start_ARG 2 italic_n italic_π italic_z end_ARG start_ARG italic_P end_ARG ) roman_cos ( italic_ω italic_t + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) , , (5)
Ezz=(2πP)n=1Nnbncos(2nπzP)cos(ωt+ϕ0)subscript𝐸𝑧𝑧2𝜋𝑃superscriptsubscript𝑛1𝑁𝑛subscript𝑏𝑛cos2𝑛𝜋𝑧𝑃𝜔𝑡subscriptitalic-ϕ0\frac{\partial E_{z}}{\partial z}=\left(\frac{2\pi}{P}\right)\sum_{n=1}^{N}nb_% {n}\hskip 2.84526pt\textrm{cos}\left(\frac{2n\pi z}{P}\right)\cos\left(\omega t% +\phi_{0}\right)divide start_ARG ∂ italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG start_ARG ∂ italic_z end_ARG = ( divide start_ARG 2 italic_π end_ARG start_ARG italic_P end_ARG ) ∑ start_POSTSUBSCRIPT italic_n = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT italic_n italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT cos ( divide start_ARG 2 italic_n italic_π italic_z end_ARG start_ARG italic_P end_ARG ) roman_cos ( italic_ω italic_t + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) (6)
2Ezz2=(2πP)2n=1Nn2bnsin(2nπzP)cos(ωt+ϕ0).superscript2subscript𝐸𝑧superscript𝑧2superscript2𝜋𝑃2superscriptsubscript𝑛1𝑁superscript𝑛2subscript𝑏𝑛sin2𝑛𝜋𝑧𝑃𝜔𝑡subscriptitalic-ϕ0\frac{\partial^{2}E_{z}}{\partial z^{2}}=-\left(\frac{2\pi}{P}\right)^{2}\sum_% {n=1}^{N}n^{2}b_{n}\hskip 2.84526pt\textrm{sin}\left(\frac{2n\pi z}{P}\right)% \cos\left(\omega t+\phi_{0}\right).divide start_ARG ∂ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG start_ARG ∂ italic_z start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG = - ( divide start_ARG 2 italic_π end_ARG start_ARG italic_P end_ARG ) start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ∑ start_POSTSUBSCRIPT italic_n = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT italic_n start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT sin ( divide start_ARG 2 italic_n italic_π italic_z end_ARG start_ARG italic_P end_ARG ) roman_cos ( italic_ω italic_t + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) . (7)

Where bnsubscript𝑏𝑛b_{n}italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT are the Fourier series coefficients. The required number of coefficients varies for different field profiles, and should be the minimum number such that the field is accurately represented.

When the operating mode is a π2𝜋2\frac{\pi}{2}divide start_ARG italic_π end_ARG start_ARG 2 end_ARG-mode, the field period is two cell lengths, P=2Lcell𝑃2subscript𝐿𝑐𝑒𝑙𝑙P=2L_{cell}italic_P = 2 italic_L start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT. Thus, Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT can be described using only bnsubscript𝑏𝑛b_{n}italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT terms, as an=0subscript𝑎𝑛0a_{n}=0italic_a start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT = 0 for all n𝑛nitalic_n. For TW cavities, the longitudinal electric field has both real (A(z)𝐴𝑧A(z)italic_A ( italic_z )) and imaginary (B(z)𝐵𝑧B(z)italic_B ( italic_z )) components, and thus both components (over one period) must be imported from an em field solver. Both the real and imaginary fields can also be described as a Fourier series, however will require both ansubscript𝑎𝑛a_{n}italic_a start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT and bnsubscript𝑏𝑛b_{n}italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT coefficients. The field seen by a particle in a TW cavity is the real component of the complex field, and is given;

Ez(r=0,z,t)=A(z)cos(ωt+ϕ0)B(z)sin(ωt+ϕ0).subscript𝐸𝑧𝑟0𝑧𝑡𝐴𝑧𝜔𝑡subscriptitalic-ϕ0𝐵𝑧𝜔𝑡subscriptitalic-ϕ0E_{z}(r=0,z,t)=A(z)\cos\left(\omega t+\phi_{0}\right)-B(z)\sin\left(\omega t+% \phi_{0}\right).italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( italic_r = 0 , italic_z , italic_t ) = italic_A ( italic_z ) roman_cos ( italic_ω italic_t + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) - italic_B ( italic_z ) roman_sin ( italic_ω italic_t + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) . (8)

Where A(z) and B(z) are described by Fourier series;

A(z)=n=1Nbnrealsin(2nπzP)+anrealcos(2nπzP),𝐴𝑧superscriptsubscript𝑛1𝑁superscriptsubscript𝑏𝑛real2𝑛𝜋𝑧𝑃superscriptsubscript𝑎𝑛real2𝑛𝜋𝑧𝑃A(z)=\sum_{n=1}^{N}b_{n}^{\text{real}}\sin\left(\frac{2n\pi z}{P}\right)+a_{n}% ^{\text{real}}\cos\left(\frac{2n\pi z}{P}\right),italic_A ( italic_z ) = ∑ start_POSTSUBSCRIPT italic_n = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT start_POSTSUPERSCRIPT real end_POSTSUPERSCRIPT roman_sin ( divide start_ARG 2 italic_n italic_π italic_z end_ARG start_ARG italic_P end_ARG ) + italic_a start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT start_POSTSUPERSCRIPT real end_POSTSUPERSCRIPT roman_cos ( divide start_ARG 2 italic_n italic_π italic_z end_ARG start_ARG italic_P end_ARG ) , (9)

and

B(z)=n=1Nbnimagsin(2nπzP)+animagcos(2nπzP).𝐵𝑧superscriptsubscript𝑛1𝑁superscriptsubscript𝑏𝑛imag2𝑛𝜋𝑧𝑃superscriptsubscript𝑎𝑛imag2𝑛𝜋𝑧𝑃B(z)=\sum_{n=1}^{N}b_{n}^{\text{imag}}\sin\left(\frac{2n\pi z}{P}\right)+a_{n}% ^{\text{imag}}\cos\left(\frac{2n\pi z}{P}\right).italic_B ( italic_z ) = ∑ start_POSTSUBSCRIPT italic_n = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_N end_POSTSUPERSCRIPT italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT start_POSTSUPERSCRIPT imag end_POSTSUPERSCRIPT roman_sin ( divide start_ARG 2 italic_n italic_π italic_z end_ARG start_ARG italic_P end_ARG ) + italic_a start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT start_POSTSUPERSCRIPT imag end_POSTSUPERSCRIPT roman_cos ( divide start_ARG 2 italic_n italic_π italic_z end_ARG start_ARG italic_P end_ARG ) . (10)

From Eqn. 1, the momentum change in the z𝑧zitalic_z direction is given;

ΔPz=q(Ez(r,z,t)+vxBy(r,z,t)vyBx(r,z,t))𝑑t.Δsubscript𝑃𝑧𝑞subscript𝐸𝑧𝑟𝑧𝑡subscript𝑣𝑥subscript𝐵𝑦𝑟𝑧𝑡subscript𝑣𝑦subscript𝐵𝑥𝑟𝑧𝑡differential-d𝑡\Delta P_{z}=q\int(E_{z}(r,z,t)+v_{x}B_{y}(r,z,t)-v_{y}B_{x}(r,z,t))dt.roman_Δ italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT = italic_q ∫ ( italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( italic_r , italic_z , italic_t ) + italic_v start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT italic_B start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT ( italic_r , italic_z , italic_t ) - italic_v start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT italic_B start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT ( italic_r , italic_z , italic_t ) ) italic_d italic_t . (11)

As the particle velocity over the rf cell (vzsubscript𝑣𝑧v_{z}italic_v start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT) is approximately constant, dt=dzvz𝑑𝑡𝑑𝑧subscript𝑣𝑧dt=\frac{dz}{v_{z}}italic_d italic_t = divide start_ARG italic_d italic_z end_ARG start_ARG italic_v start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG. It is also assumed that terms including vxvzsubscript𝑣𝑥subscript𝑣𝑧\frac{v_{x}}{v_{z}}divide start_ARG italic_v start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT end_ARG start_ARG italic_v start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG are negligible, thus;

ΔPz=qβzcEz(r,z,t)𝑑z.Δsubscript𝑃𝑧𝑞subscript𝛽𝑧𝑐subscript𝐸𝑧𝑟𝑧𝑡differential-d𝑧\Delta P_{z}=\frac{q}{\beta_{z}c}\int E_{z}(r,z,t)dz.roman_Δ italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT = divide start_ARG italic_q end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG ∫ italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( italic_r , italic_z , italic_t ) italic_d italic_z . (12)

The momentum change in the transverse planes are also given by the Lorentz force, and are a function of the particles azimuthal angle, θ𝜃\thetaitalic_θ, depicted in Fig. 2.

Refer to caption
(a)
Figure 2: Schematic showing azimuthal angle, θ𝜃\thetaitalic_θ.
ΔPx=qccos(θ)(1βzcEr𝑑z+Bθ𝑑z)Δsubscript𝑃𝑥𝑞𝑐𝜃1subscript𝛽𝑧𝑐subscript𝐸𝑟differential-d𝑧subscript𝐵𝜃differential-d𝑧\Delta P_{x}=qc\cos\left(\theta\right)\left(\frac{1}{\beta_{z}c}\int E_{r}dz+% \int B_{\theta}dz\right)roman_Δ italic_P start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT = italic_q italic_c roman_cos ( italic_θ ) ( divide start_ARG 1 end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG ∫ italic_E start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT italic_d italic_z + ∫ italic_B start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT italic_d italic_z ) (13)
ΔPy=qcsin(θ)(1βzcEr𝑑z+Bθ𝑑z).Δsubscript𝑃𝑦𝑞𝑐𝜃1subscript𝛽𝑧𝑐subscript𝐸𝑟differential-d𝑧subscript𝐵𝜃differential-d𝑧\Delta P_{y}=qc\sin\left(\theta\right)\left(\frac{1}{\beta_{z}c}\int E_{r}dz+% \int B_{\theta}dz\right).roman_Δ italic_P start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT = italic_q italic_c roman_sin ( italic_θ ) ( divide start_ARG 1 end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG ∫ italic_E start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT italic_d italic_z + ∫ italic_B start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT italic_d italic_z ) . (14)

I.2 Derivation of single cell SW

Combining Eqns. 2 and 12 the change in Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT is given;

ΔPz=qβzc0Lcell[Ez(0,z)r24(2Ezz2+ω2c2Ez(0,z))]×cos(ϕ0+ωzβzc)dz,Δsubscript𝑃𝑧𝑞subscript𝛽𝑧𝑐superscriptsubscript0subscript𝐿𝑐𝑒𝑙𝑙delimited-[]subscript𝐸𝑧0𝑧superscript𝑟24superscript2subscript𝐸𝑧superscript𝑧2superscript𝜔2superscript𝑐2subscript𝐸𝑧0𝑧cossubscriptitalic-ϕ0𝜔𝑧subscript𝛽𝑧𝑐𝑑𝑧\Delta P_{z}=\\ \frac{q}{\beta_{z}c}\int_{0}^{L_{cell}}\left[E_{z}(0,z)-\frac{r^{2}}{4}\left(% \frac{\partial^{2}E_{z}}{\partial z^{2}}+\frac{\omega^{2}}{c^{2}}E_{z}(0,z)% \right)\right]\\ \times\textrm{cos}\left(\phi_{0}+\frac{\omega z}{\beta_{z}c}\right)dz,start_ROW start_CELL roman_Δ italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT = end_CELL end_ROW start_ROW start_CELL divide start_ARG italic_q end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG ∫ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_L start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT end_POSTSUPERSCRIPT [ italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( 0 , italic_z ) - divide start_ARG italic_r start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 4 end_ARG ( divide start_ARG ∂ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG start_ARG ∂ italic_z start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG + divide start_ARG italic_ω start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG italic_c start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( 0 , italic_z ) ) ] end_CELL end_ROW start_ROW start_CELL × cos ( italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT + divide start_ARG italic_ω italic_z end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG ) italic_d italic_z , end_CELL end_ROW (15)

where the integration is defined over a single rf cell (the integration range can be over multiple cells, or sections of a single rf cell). Equation 15 can be simplified by noting all terms are of the form;

F(bn,i,βs/βz,ϕ0)=0Lcellizi[Ez]cos(ϕ0+ωzβzc)𝑑z.𝐹subscript𝑏𝑛𝑖subscript𝛽𝑠subscript𝛽𝑧subscriptitalic-ϕ0superscriptsubscript0subscript𝐿𝑐𝑒𝑙𝑙superscript𝑖superscript𝑧𝑖delimited-[]subscript𝐸𝑧subscriptitalic-ϕ0𝜔𝑧subscript𝛽𝑧𝑐differential-d𝑧F(b_{n},i,\beta_{s}/\beta_{z},\phi_{0})=\\ \int_{0}^{L_{cell}}\frac{\partial^{i}}{\partial z^{i}}[E_{z}]\cos\left(\phi_{0% }+\frac{\omega z}{\beta_{z}c}\right)dz.start_ROW start_CELL italic_F ( italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT , italic_i , italic_β start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT / italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT , italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) = end_CELL end_ROW start_ROW start_CELL ∫ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_L start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT end_POSTSUPERSCRIPT divide start_ARG ∂ start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT end_ARG start_ARG ∂ italic_z start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT end_ARG [ italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ] roman_cos ( italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT + divide start_ARG italic_ω italic_z end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG ) italic_d italic_z . end_CELL end_ROW (16)

Therefore, using the standard result of Eqn. 16, Eqn. 15 is simplified to

ΔPz=qβzc(1ω2c2r24)F(bn,0,βs/βz,ϕ0)qβzcr24F(bn,2,βs/βz,ϕ0).Δsubscript𝑃𝑧𝑞subscript𝛽𝑧𝑐1superscript𝜔2superscript𝑐2superscript𝑟24𝐹subscript𝑏𝑛0subscript𝛽𝑠subscript𝛽𝑧subscriptitalic-ϕ0𝑞subscript𝛽𝑧𝑐superscript𝑟24𝐹subscript𝑏𝑛2subscript𝛽𝑠subscript𝛽𝑧subscriptitalic-ϕ0\Delta P_{z}=\\ \frac{q}{\beta_{z}c}\left(1-\frac{\omega^{2}}{c^{2}}\frac{r^{2}}{4}\right)F(b_% {n},0,\beta_{s}/\beta_{z},\phi_{0})-\\ \frac{q}{\beta_{z}c}\frac{r^{2}}{4}F(b_{n},2,\beta_{s}/\beta_{z},\phi_{0}).start_ROW start_CELL roman_Δ italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT = end_CELL end_ROW start_ROW start_CELL divide start_ARG italic_q end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG ( 1 - divide start_ARG italic_ω start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG italic_c start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG divide start_ARG italic_r start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 4 end_ARG ) italic_F ( italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT , 0 , italic_β start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT / italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT , italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) - end_CELL end_ROW start_ROW start_CELL divide start_ARG italic_q end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG divide start_ARG italic_r start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 4 end_ARG italic_F ( italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT , 2 , italic_β start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT / italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT , italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) . end_CELL end_ROW (17)

Where

F(bn,\stackanchorieveniodd,βs/βz,ϕ0)=u(i)2(πLcell)(i1)×n=1nibn[\stackanchorcossin(βsβzπnπ+ϕ0)\stackanchorcossin(ϕ0)(βsβzn)\stackanchorcossin(βsβzπ+nπ+ϕ0)\stackanchorcossin(ϕ0)(βsβz+n)]𝐹subscript𝑏𝑛\stackanchori𝑒𝑣𝑒𝑛i𝑜𝑑𝑑subscript𝛽𝑠subscript𝛽𝑧subscriptitalic-ϕ0𝑢𝑖2superscript𝜋subscript𝐿𝑐𝑒𝑙𝑙𝑖1superscriptsubscript𝑛1superscript𝑛𝑖subscript𝑏𝑛delimited-[]minus-or-plus\stackanchor𝑐𝑜𝑠𝑠𝑖𝑛subscript𝛽𝑠subscript𝛽𝑧𝜋𝑛𝜋subscriptitalic-ϕ0\stackanchor𝑐𝑜𝑠𝑠𝑖𝑛subscriptitalic-ϕ0subscript𝛽𝑠subscript𝛽𝑧𝑛\stackanchor𝑐𝑜𝑠𝑠𝑖𝑛subscript𝛽𝑠subscript𝛽𝑧𝜋𝑛𝜋subscriptitalic-ϕ0\stackanchor𝑐𝑜𝑠𝑠𝑖𝑛subscriptitalic-ϕ0subscript𝛽𝑠subscript𝛽𝑧𝑛\begin{split}F\biggl{(}b_{n},{\stackanchor{\emph{i}even}{\emph{i}odd}},\beta_{% s}/\beta_{z},\phi_{0}\biggr{)}=\frac{u(i)}{2}\biggl{(}\frac{\pi}{L_{cell}}% \biggr{)}^{(i-1)}\times\\ \sum_{n=1}^{\infty}n^{i}b_{n}\Biggl{[}\frac{{\stackanchor{cos}{sin}}\biggl{(}% \frac{\beta_{s}}{\beta_{z}}\pi-n\pi+\phi_{0}\biggr{)}-{\stackanchor{cos}{sin}}% \bigl{(}\phi_{0}\bigr{)}}{(\frac{\beta_{s}}{\beta_{z}}-n)}{\mp}\\ \frac{{\stackanchor{cos}{sin}}\biggl{(}\frac{\beta_{s}}{\beta_{z}}\pi+n\pi+% \phi_{0}\biggr{)}-{\stackanchor{cos}{sin}}\bigl{(}\phi_{0}\bigr{)}}{(\frac{% \beta_{s}}{\beta_{z}}+n)}\Biggr{]}\end{split}start_ROW start_CELL italic_F ( italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT , i italic_e italic_v italic_e italic_n i italic_o italic_d italic_d , italic_β start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT / italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT , italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) = divide start_ARG italic_u ( italic_i ) end_ARG start_ARG 2 end_ARG ( divide start_ARG italic_π end_ARG start_ARG italic_L start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT end_ARG ) start_POSTSUPERSCRIPT ( italic_i - 1 ) end_POSTSUPERSCRIPT × end_CELL end_ROW start_ROW start_CELL ∑ start_POSTSUBSCRIPT italic_n = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ∞ end_POSTSUPERSCRIPT italic_n start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT [ divide start_ARG italic_c italic_o italic_s italic_s italic_i italic_n ( divide start_ARG italic_β start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG italic_π - italic_n italic_π + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) - italic_c italic_o italic_s italic_s italic_i italic_n ( italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) end_ARG start_ARG ( divide start_ARG italic_β start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG - italic_n ) end_ARG ∓ end_CELL end_ROW start_ROW start_CELL divide start_ARG italic_c italic_o italic_s italic_s italic_i italic_n ( divide start_ARG italic_β start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG italic_π + italic_n italic_π + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) - italic_c italic_o italic_s italic_s italic_i italic_n ( italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) end_ARG start_ARG ( divide start_ARG italic_β start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG + italic_n ) end_ARG ] end_CELL end_ROW (18)

and

u(i)={+1,ifi=0,11,ifi=2,3.𝑢𝑖cases1if𝑖011if𝑖23u(i)=\begin{cases}+1,&\text{if}\ i=0,1\\ -1,&\text{if}\ i=2,3.\end{cases}italic_u ( italic_i ) = { start_ROW start_CELL + 1 , end_CELL start_CELL if italic_i = 0 , 1 end_CELL end_ROW start_ROW start_CELL - 1 , end_CELL start_CELL if italic_i = 2 , 3 . end_CELL end_ROW (19)

Calculating similar forms for Eqns. 13 and 14 can be completed via substitution of Ersubscript𝐸𝑟E_{r}italic_E start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT and Bθsubscript𝐵𝜃B_{\theta}italic_B start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT as functions of purely Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT and its derivatives, using Eqns. 3 and 4. Finally, the standard result of Eqn. 16 can be used. For the integral of Bθsubscript𝐵𝜃B_{\theta}italic_B start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT, the input rf phase, ϕ0subscriptitalic-ϕ0\phi_{0}italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT becomes ϕ0π2subscriptitalic-ϕ0𝜋2\phi_{0}-\frac{\pi}{2}italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT - divide start_ARG italic_π end_ARG start_ARG 2 end_ARG.

I.3 Derivation of single cell TW

The derivation of the momentum gain for TW cavities is more involved, as both the real and imaginary field maps of Ez(r=0)subscript𝐸𝑧𝑟0E_{z}(r=0)italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT ( italic_r = 0 ) are required. This is because the field behaves as described in Eqn. 8. The longitudinal momentum change, ΔPzΔsubscript𝑃𝑧\Delta P_{z}roman_Δ italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT, is therefore found by computing the following integral;

ΔPz=qβzc[A(z)cos(ωzβzc+ϕ0)B(z)sin(ωzβzc+ϕ0)]r24([2A(z)z2cos(ωzβzc+ϕ0)2B(z)z2sin(ωzβzc+ϕ0)]+ω2c2[A(z)cos(ωzβzc+ϕ0)B(z)sin(ωzβzc+ϕ0)])dz.Δsubscript𝑃𝑧𝑞subscript𝛽𝑧𝑐delimited-[]𝐴𝑧𝜔𝑧subscript𝛽𝑧𝑐subscriptitalic-ϕ0𝐵𝑧𝜔𝑧subscript𝛽𝑧𝑐subscriptitalic-ϕ0superscript𝑟24delimited-[]superscript2𝐴𝑧superscript𝑧2𝜔𝑧subscript𝛽𝑧𝑐subscriptitalic-ϕ0superscript2𝐵𝑧superscript𝑧2𝜔𝑧subscript𝛽𝑧𝑐subscriptitalic-ϕ0superscript𝜔2superscript𝑐2delimited-[]𝐴𝑧𝜔𝑧subscript𝛽𝑧𝑐subscriptitalic-ϕ0𝐵𝑧𝜔𝑧subscript𝛽𝑧𝑐subscriptitalic-ϕ0𝑑𝑧\Delta P_{z}=\\ \frac{q}{\beta_{z}c}\int\Bigl{[}A(z)\cos\left(\frac{\omega z}{\beta_{z}c}+\phi% _{0}\right)-B(z)\sin\left(\frac{\omega z}{\beta_{z}c}+\phi_{0}\right)\Bigr{]}-% \\ \frac{r^{2}}{4}\Biggl{(}\Bigl{[}\frac{\partial^{2}A(z)}{\partial z^{2}}\cos% \left(\frac{\omega z}{\beta_{z}c}+\phi_{0}\right)-\frac{\partial^{2}B(z)}{% \partial z^{2}}\sin\left(\frac{\omega z}{\beta_{z}c}+\phi_{0}\right)\Bigr{]}+% \\ \frac{\omega^{2}}{c^{2}}\Bigl{[}A(z)\cos\left(\frac{\omega z}{\beta_{z}c}+\phi% _{0}\right)-B(z)\sin\left(\frac{\omega z}{\beta_{z}c}+\phi_{0}\right)\Bigr{]}% \Biggr{)}dz.start_ROW start_CELL roman_Δ italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT = end_CELL end_ROW start_ROW start_CELL divide start_ARG italic_q end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG ∫ [ italic_A ( italic_z ) roman_cos ( divide start_ARG italic_ω italic_z end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) - italic_B ( italic_z ) roman_sin ( divide start_ARG italic_ω italic_z end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) ] - end_CELL end_ROW start_ROW start_CELL divide start_ARG italic_r start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG 4 end_ARG ( [ divide start_ARG ∂ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_A ( italic_z ) end_ARG start_ARG ∂ italic_z start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG roman_cos ( divide start_ARG italic_ω italic_z end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) - divide start_ARG ∂ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_B ( italic_z ) end_ARG start_ARG ∂ italic_z start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG roman_sin ( divide start_ARG italic_ω italic_z end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) ] + end_CELL end_ROW start_ROW start_CELL divide start_ARG italic_ω start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG start_ARG italic_c start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG [ italic_A ( italic_z ) roman_cos ( divide start_ARG italic_ω italic_z end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) - italic_B ( italic_z ) roman_sin ( divide start_ARG italic_ω italic_z end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT italic_c end_ARG + italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ) ] ) italic_d italic_z . end_CELL end_ROW (20)

Using Eqn. 16, ΔPzΔsubscript𝑃𝑧\Delta P_{z}roman_Δ italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT can be calculated for the TW case, noting that sin(x)=cos(xπ2)𝑥𝑥𝜋2\sin(x)=\cos(x-\frac{\pi}{2})roman_sin ( italic_x ) = roman_cos ( italic_x - divide start_ARG italic_π end_ARG start_ARG 2 end_ARG ). In general, an iteration over a TW single cell requires four times the number of calculations than a SW cell, due to requiring both ansubscript𝑎𝑛a_{n}italic_a start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT and bnsubscript𝑏𝑛b_{n}italic_b start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT coefficients for describing both the real and imaginary TW field components, A(z)𝐴𝑧A(z)italic_A ( italic_z ) and B(z)𝐵𝑧B(z)italic_B ( italic_z ). As a result, the FC2CT method is less effective for TW cavities, as the speed benefit is reduced.

As before, functional forms for ΔPxΔsubscript𝑃𝑥\Delta P_{x}roman_Δ italic_P start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT and ΔPyΔsubscript𝑃𝑦\Delta P_{y}roman_Δ italic_P start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT can be determined using Eqns. 3416 and 18.

I.4 Calculation of Position in SW and TW cavities

The 3D particle position is also updated every rf cell. Firstly, the time of flight, tcellsubscript𝑡𝑐𝑒𝑙𝑙t_{cell}italic_t start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT, is calculated as follows;

tcell=βz¯Lcell,subscript𝑡𝑐𝑒𝑙𝑙¯subscript𝛽𝑧subscript𝐿𝑐𝑒𝑙𝑙t_{cell}=\overline{\beta_{z}}L_{cell},italic_t start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT = over¯ start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG italic_L start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT , (21)

where the average particle velocity along the ithsubscript𝑖𝑡i_{th}italic_i start_POSTSUBSCRIPT italic_t italic_h end_POSTSUBSCRIPT axis is defined

βi¯=Pi¯m2+Px2¯+Py2¯+Pz2¯.¯subscript𝛽𝑖¯subscript𝑃𝑖superscript𝑚2¯superscriptsubscript𝑃𝑥2¯superscriptsubscript𝑃𝑦2¯superscriptsubscript𝑃𝑧2\overline{\beta_{i}}=\frac{\overline{P_{i}}}{\sqrt{m^{2}+\overline{P_{x}^{2}}+% \overline{P_{y}^{2}}+\overline{P_{z}^{2}}}}.over¯ start_ARG italic_β start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_ARG = divide start_ARG over¯ start_ARG italic_P start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_ARG end_ARG start_ARG square-root start_ARG italic_m start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + over¯ start_ARG italic_P start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG + over¯ start_ARG italic_P start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG + over¯ start_ARG italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG end_ARG end_ARG . (22)

The updated positions are therefore;

z=z+Lcell,x=x+tcellcβx¯,y=y+tcellcβy¯.formulae-sequence𝑧𝑧subscript𝐿𝑐𝑒𝑙𝑙formulae-sequence𝑥𝑥subscript𝑡𝑐𝑒𝑙𝑙𝑐¯subscript𝛽𝑥𝑦𝑦subscript𝑡𝑐𝑒𝑙𝑙𝑐¯subscript𝛽𝑦z=z+L_{cell},\hskip 5.69054ptx=x+{t_{cell}}c\overline{\beta_{x}},\hskip 5.6905% 4pty=y+{t_{cell}}c\overline{\beta_{y}}.italic_z = italic_z + italic_L start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT , italic_x = italic_x + italic_t start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT italic_c over¯ start_ARG italic_β start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT end_ARG , italic_y = italic_y + italic_t start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT italic_c over¯ start_ARG italic_β start_POSTSUBSCRIPT italic_y end_POSTSUBSCRIPT end_ARG . (23)

For both the SW and TW methods, the rf phase, ϕ0subscriptitalic-ϕ0\phi_{0}italic_ϕ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT, is updated every cell due to phase slippage. The phase slippage is a function of the difference between particle and design velocity;

Δϕ=ωΔtωLcellβsc(1βsβz¯).Δitalic-ϕ𝜔Δ𝑡𝜔subscript𝐿𝑐𝑒𝑙𝑙subscript𝛽𝑠𝑐1subscript𝛽𝑠¯subscript𝛽𝑧\Delta\phi=\omega\Delta t\approx\frac{\omega L_{cell}}{\beta_{s}c}\left(1-% \frac{\beta_{s}}{\overline{\beta_{z}}}\right).roman_Δ italic_ϕ = italic_ω roman_Δ italic_t ≈ divide start_ARG italic_ω italic_L start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT end_ARG start_ARG italic_β start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT italic_c end_ARG ( 1 - divide start_ARG italic_β start_POSTSUBSCRIPT italic_s end_POSTSUBSCRIPT end_ARG start_ARG over¯ start_ARG italic_β start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT end_ARG end_ARG ) . (24)

A script was written in Python python , that takes the on-axis Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT field map as an input, and extracts the Fourier coefficients. The script tracks a particle beam through an rf cavity with a specified number of the cells, with a specified gradient. The 6D phase space of each particle is updated after every cell, as is the rf phase. The position of the particle is increased by Lcellsubscript𝐿𝑐𝑒𝑙𝑙L_{cell}italic_L start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT in the longitudinal direction and determined transversely using a calculated time of flight and transverse velocity. This allows a single iteration to be performed each rf cell, as opposed to multiple iterations, as used in conventional tracking methods. Section II describes the accuracy of the FC2CT method for both SW for protons with kinetic energy 37.5 and 150 MeV, and TW structures for protons at 150 MeV.

II Performance

For the comparison of SW FC2CT, ASTRA tracking code was used. The input distribution was created using the ASTRA generator function, producing protons at 37.5 and 150 MeV. Protons at 37.5 MeV are simulated as below this energy region, proton acceleration is often accomplished with RFQ and drift tube linac wangler , as the effective shunt impedance is higher than for CCL. Thus, exploring both 37.5 and 150 MeV proton energies assesses FC2CT for different values of relativistic Lorentz factor, γrsubscript𝛾𝑟\gamma_{r}italic_γ start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. In addition, showing FC2CT is accurate for proton energies of 150 MeV, demonstrates the method will be accurate for higher energy protons (as the only approximation is constant relativistic β𝛽\betaitalic_β over a cell).

Refer to caption
(a)
Refer to caption
(b)
Figure 3: Transverse and longitudinal phase space of proton beam (initial energy 37.5 MeV) after traversing 20 SW cells, as calculated by ASTRA and FC2CT.

Side-coupled single cells were designed in CST Microwave Solver CST . The cell lengths were defined such as to keep the field synchronous with protons of energy of 37.5 and 150 MeV. Figure 3 shows the transverse and longitudinal phase space of a proton beam after 20 SW cells. The tracked phase space is shown as calculated by both ASTRA and FC2CT. The two distributions agree strongly, suggesting the constant β𝛽\betaitalic_β approximation is valid for protons at 37.5 MeV.

Refer to caption
(a)
Refer to caption
(b)
Figure 4: Transverse and longitudinal phase space of proton beam (initial energy 150 MeV) after traversing 50 SW cells, as calculated by ASTRA and FC2CT.

Figure 4 displays the output distributions for an initial proton energy of 150 MeV, after 50 SW cells. The two distributions agree well. The largest discrepancy between distributions occurs on the ‘neck’ of the phase space plot. Potential reasons for this are discussed later.

Refer to caption
(a)
Figure 5: Displays the difference in calculated Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT as a function of difference in calculated z𝑧zitalic_z (defined as XASTRAXFC2CTsubscript𝑋𝐴𝑆𝑇𝑅𝐴subscript𝑋𝐹𝐶2𝐶𝑇X_{ASTRA}-X_{FC2CT}italic_X start_POSTSUBSCRIPT italic_A italic_S italic_T italic_R italic_A end_POSTSUBSCRIPT - italic_X start_POSTSUBSCRIPT italic_F italic_C 2 italic_C italic_T end_POSTSUBSCRIPT), after 40 SW cells. The initial proton energy is 150 MeV.

The difference between phase space components after a 40 cell SW structure, as calculated by ASTRA and FC2CT, are plotted in Fig. 5. The plot displays the maximum difference in Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT occurs at maximum (positive) difference in z𝑧zitalic_z. In this region, FC2CT underestimates both longitudinal particle momentum and position. This result is intuitive, as lower momentum particles will travel shorter distances. The maximum longitudinal momentum error is  1 MeV/c, resulting in a maximum percentage error of approximately 0.016 %percent\%% in Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT. The ASTRA time step was set to 0.001 ns, resulting in approximately 150 iterations per cell.

Refer to caption
(a)
Refer to caption
(b)
Figure 6: Transverse and longitudinal phase space of proton beam (initial energy 150 MeV) after traversing 45 TW cells, as calculated by RF-Track and FC2CT.

Particles in this region reside on the ‘neck’ of the phase space plot, see Fig. 4 (b). These particles begin with gentle acceleration, due to a slightly accelerating initial phase. As the particles begin to phase slip, the phase tends to a zero-crossing phase. In the following cells, particles will experience very small changes in Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT, and particles become physically spread out, as bunching occurs. The input distributions of Figures 3 and  4 were uniform in rf phase, however particles in the ‘neck’ are spread out, implying thus small changes in initial conditions (rf phase) result in large changes in output conditions. As a result, FC2CT will perform less accurately on particles in this region.

Very small discrepancies in calculated Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT occurs at maximum (negative) error in z𝑧zitalic_z. In this region, particle position is overestimated by FC2CT. However, the discrepancy in z𝑧zitalic_z is very small, with a maximum percentage error of approximately 0.04%percent\%%. Particles with maximum and minimum Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT are most accurately tracked using FC2CT. This is due to the particles residing at an rf phase that remains far from the zero-crossing phase, where FC2CT performs most poorly.

Figure 6 displays the longitudinal and transverse phase space as calculated by RF-Track and FC2CT for a TW cavity comprised of 45 cells. The longitudinal electric field component at some time, t𝑡titalic_t, is shown in Fig. 9 (b). The FC2CT method closely agrees with the well trusted tracking code, RF-Track. The output distribution has traversed a 45 cell TW cavity with 4π/54𝜋54\pi/54 italic_π / 5 phase advance per cell. For protons at 150 MeV, the length of the cavity is approximately 1 m. The RF-Track time step was set to 0.003 ns, resulting in approximately 44 iterations per cell. It is shown later that 44 iterations is beyond the limit of convergence.

Figure 7 displays the difference in calculated phase space components between FC2CT and RF-Track. Fig. 7 (a) shows a similar error relationship to the SW case shown in Fig. 5. The majority of particles have small discrepancies in Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT, with the phase space of ‘neck’ particles being less well determined. The maximum difference in Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT is approximately 0.02 %percent\%%, similar to the error in the SW case. The main difference is that FC2CT overestimates both Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT and z𝑧zitalic_z for all particles, as ΔPzΔsubscript𝑃𝑧\Delta P_{z}roman_Δ italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT and ΔzΔ𝑧\Delta zroman_Δ italic_z are always negative. Similar to the SW case, maximum Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT particles are well approximated, with small errors in both position and momenta. The maximum position error is similar-to\sim 0.0012 m, approximately 6%percent\%% of a cell length.

Figure 7 (b) displays the discrepancy in transverse momentum as a function of transverse position discrepancy. The relationship between errors appears to be a function of Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT. For low Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT particles (deep purple), ΔPxΔsubscript𝑃𝑥\Delta P_{x}roman_Δ italic_P start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT is a straight line with respect to ΔXΔ𝑋\Delta Xroman_Δ italic_X. For high Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT particles, the relationship is also linear, albeit with a shallower gradient. For all other particles, ΔPxΔsubscript𝑃𝑥\Delta P_{x}roman_Δ italic_P start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT is generally larger, with a maximum discrepancy of approximately 6%percent\%%. The maximum position error is similar-to\sim 1.2 %percent\%% of the beam pipe radius.

Refer to caption
(a)
Refer to caption
(b)
Figure 7: Sub-figure a/b displays the difference in calculated Pz/Pxsubscript𝑃𝑧subscript𝑃𝑥P_{z}/P_{x}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT / italic_P start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT as a function of difference in calculated z/x𝑧𝑥z/xitalic_z / italic_x (defined as XASTRAXFC2CTsubscript𝑋𝐴𝑆𝑇𝑅𝐴subscript𝑋𝐹𝐶2𝐶𝑇X_{ASTRA}-X_{FC2CT}italic_X start_POSTSUBSCRIPT italic_A italic_S italic_T italic_R italic_A end_POSTSUBSCRIPT - italic_X start_POSTSUBSCRIPT italic_F italic_C 2 italic_C italic_T end_POSTSUBSCRIPT), after 45 TW cells. The initial proton energy is 150 MeV.

From results displayed, the FC2CT is a highly efficient and accurate tracking method. The FC2CT method has the ability to vastly reduce the computational expense of large tracking jobs. Whilst FC2CT has been limited above to iterations every rf cell, the method allows iterations over any distance, by changing the bounds of integration in Eqn. 15.

II.1 Changes to FC2CT

FC2CT is based upon the approximation of constant particle β𝛽\betaitalic_β over the cell. This approximation is highly effective for multiple energy ranges for both electrons and protons. The accuracy of the approximation is directly proportional to the change in particle β𝛽\betaitalic_β over an rf cell, ΔβΔ𝛽\Delta\betaroman_Δ italic_β. However, for very low energy protons, ΔβΔ𝛽\Delta\betaroman_Δ italic_β may be small over an rf cell, however β𝛽\betaitalic_β may be changing by a factor of two, thus the accuracy of the approximation must be normalised to the particle β𝛽\betaitalic_β, giving ΔββΔ𝛽𝛽\frac{\Delta\beta}{\beta}divide start_ARG roman_Δ italic_β end_ARG start_ARG italic_β end_ARG.

Figure 8 shows the ratio ΔββΔ𝛽𝛽\frac{\Delta\beta}{\beta}divide start_ARG roman_Δ italic_β end_ARG start_ARG italic_β end_ARG for electrons and protons at different energy. The value of ΔββΔ𝛽𝛽\frac{\Delta\beta}{\beta}divide start_ARG roman_Δ italic_β end_ARG start_ARG italic_β end_ARG is calculated by estimating the energy gain over an rf cell of appropriate cell length with a fixed gradient. The quantitative value of ΔββΔ𝛽𝛽\frac{\Delta\beta}{\beta}divide start_ARG roman_Δ italic_β end_ARG start_ARG italic_β end_ARG is thus irrelevant, but the relative value is important for inferring particle energy where the constant β𝛽\betaitalic_β approximation is valid. The eye guides shown at 37.5 and 150 MeV display the region of the phase space plots shown in Figures 34 and 6, where the FC2CT model is valid and accurate. The value of ΔββΔ𝛽𝛽\frac{\Delta\beta}{\beta}divide start_ARG roman_Δ italic_β end_ARG start_ARG italic_β end_ARG is similar for electrons at 2.5 MeV and protons at 37.5 MeV. As previously discussed, CCL are often appropriate for protons with energy beyond similar-to\sim 30 MeV, as below RFQ and DTL are superior.

Refer to caption
(a)
Figure 8: ΔββΔ𝛽𝛽\frac{\Delta\beta}{\beta}divide start_ARG roman_Δ italic_β end_ARG start_ARG italic_β end_ARG as a function of particle energy. Eye guides are shown at 37.5 and 150 MeV. The starting energy is 2.5 MeV.
Refer to caption
(a) 2π32𝜋3\frac{2\pi}{3}divide start_ARG 2 italic_π end_ARG start_ARG 3 end_ARG disk-loaded TW cavity.
Refer to caption
(b) 4π54𝜋5\frac{4\pi}{5}divide start_ARG 4 italic_π end_ARG start_ARG 5 end_ARG small aperture TW cavity.
Figure 9: Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT field for two TW cavity types.

The FC2CT method takes approximately four times longer for tracking through TW structures, as previously described. For certain TW structures, the beam aperture is small, in order to maximise the shunt impedance. For these structures, the cut-off frequency in the beam pipe is very low, and the field is highly evanescent in this region between cells, as is the case for the TW field in Fig. 9 (b). In these cases, the TW cell can be approximated as a SW cell, utilizing the same method outlined in Section I.2. The field has a fixed phase advance per cell and a symmetric on-axis Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT field about the centre of the rf cell, thus is not a true TW. However, the results can be highly accurate, whilst faster by a factor of similar-to\sim 4.

Figure 10 displays the phase space of a proton distribution after traversing a 45 cell TW structure. The true TW FC2CT method (slow) is shown alongside the SW FC2CT method (quick). Whilst the true TW FC2CT agrees with RF-Track more closely, there is not a huge drop in accuracy for the quick method.

Refer to caption
(a)
Refer to caption
(b)
Figure 10: Transverse and longitudinal phase space of proton beam (initial energy 150 MeV) after traversing 45 TW cells, as calculated by RF-Track and FC2CT as TW (slow) and SW (quick).

Not all TW structures can be treated as SW structures, however. The more asymmetric the Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT field is inside a TW cell, the less accurate the approach becomes. Figure 9 (a) shows Ezsubscript𝐸𝑧E_{z}italic_E start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT for a disk-loaded electron cavity. For this type of cavity, approximating the field as a symmetric SW is not appropriate, and the true TW FC2CT is required. However, the number of Fourier terms required in the Fourier series description of A(z) and B(z) is far fewer than for the case in Fig. 9 (b), saving computation time.

Accuracy improvements for the FC2CT model have been explored by 1) running an iteration over an rf cell twice, updating the particle β𝛽\betaitalic_β with a more accurate (mean) value for the second iteration or, 2) reducing the integration length of the iteration.

Figure 11 displays the change in initial Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT calculation (in a 1D scheme) due to changes in FC2CT parameters, such as number of iterations and integration length, as described in points 1) and 2). The integration length is given as LiterationLcellsubscript𝐿𝑖𝑡𝑒𝑟𝑎𝑡𝑖𝑜𝑛subscript𝐿𝑐𝑒𝑙𝑙\frac{L_{iteration}}{L_{cell}}divide start_ARG italic_L start_POSTSUBSCRIPT italic_i italic_t italic_e italic_r italic_a italic_t italic_i italic_o italic_n end_POSTSUBSCRIPT end_ARG start_ARG italic_L start_POSTSUBSCRIPT italic_c italic_e italic_l italic_l end_POSTSUBSCRIPT end_ARG, so an integration length of 0.5 computes two iterations per cell.

Refer to caption
(a)
Figure 11: The change in initial 1D calculation of Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT for protons at 150 MeV due to 1) updating particle β𝛽\betaitalic_β with a mean value, or, 2) increasing the number of iterations per rf cell by decreasing the integration length.

Figure 11 shows that updating the particle β𝛽\betaitalic_β with a mean value does not change the value of Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT, relative to changing the integration region. The green line shows the change in Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT from running over half an rf cell twice, requiring the same number of calculations as the orange line (two iterations, but updating β𝛽\betaitalic_β for the second iteration). A much larger change occurs when reducing the integration step, relative to updating β𝛽\betaitalic_β.

The change in Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT converges for an integration length of 0.01. Therefore, separating the cell into ten separate calculations is as accurate as the model can be made, beyond which the change is negligible.

Refer to caption
(a)
Refer to caption
(b)
Figure 12: Error in longitudinal and transverse phase space between RF-Track and FC2CT. Two versions of FC2CT are shown, with one (blue) and two (red) iterations per cell.

Figure 12 displays the error in phase space between RF-Track and FC2CT, with one and two iterations per cell. As expected, computing two iterations per rf cell produced an output distribution closer to RF-Track.

It is possible to reduce the computation time for FC2CT considerably for both SW and TW structures by using only the principal harmonic.

As FC2CT was designed as fast tracking code, decreasing the integration length is not advised, as the increase in accuracy is minor, with a maximum change in Pzsubscript𝑃𝑧P_{z}italic_P start_POSTSUBSCRIPT italic_z end_POSTSUBSCRIPT of \approx 0.002 %percent\%%, requiring the computation time to increase by a factor of ten. In addition to reducing the integration length, computing time could be further reduced by iterating over multiple cells in one calculation. In general, the integration length must be chosen to reflect the particle rest mass and energy, in addition to the required accuracy. Another time-saving option for FC2CT is to use only the first harmonic in the Fourier Series expansion. This is possible as higher order spatial harmonics cancel exactly for relativistic particles, and are very small for non-relativistic particles.

III Conclusion and Next Steps

In this paper, the FC2CT method for fast particle tracking was displayed, with its performance compared relative to two well trusted tracking codes, ASTRA and RF-Track. FC2CT demonstrated strong agreement with the codes for both SW and TW cavities. Additional developments for FC2CT were discussed, such as altering the integration length, and treating certain TW cavities as SW cavities.

The SW FC2CT method works very effectively, as the number of computations is low, relative to TW FC2CT. Whilst TW FC2CT was highly accurate as a particle tracker, the computation time is approximately four times longer than the SW case. Currently, the effect of fringe fields at the entrance/exit of an rf cavity is not accounted for. Further work can incorporate the radial impulse due to these fringe fields to better approximate a real life situation.

In order to quantitatively measure the reduction in computation time, an FC2CT mode must be constructed in a compiled coding language. In this study, FC2CT was written in an interpretive language, the script is not written with minimising computation time as a major objective.

Acknowledgements.
The studies presented have been funded through the Cockcroft Core Grant by STFC Grants No. ST/P002056/1 and ST/V001612/1.

References

  • [1] Frank Bowman. Introduction to Bessel functions. Courier Corporation, 2012.
  • [2] Dassault Systemes. CST STUDIO SUITE, R2021x. https://www.3ds.com/products-services/simulia/products/cst-studio-suite/, 2021. Computer code.
  • [3] Veliko Dimov, Michele Caldara, Alberto Degiovanni, L Esposito, DA Fink, Marina Giunta, Adam Jeff, A Valloni, AM Lombardi, SJ Mathot, et al. Beam commissioning of the 750 mhz proton rfq for the light prototype. In 9th International Particle Accelerator Conference (IPAC2018), Vancouver, BC, Canada, JACoW, Geneva, Switzerland, pages 658–660. sn, 2018.
  • [4] Klaus Flottmann. Astra-a space charge tracking algorithm. Technical report, DESY, Hamburg, 2000.
  • [5] David J Griffiths. Introduction to Electrodynamics Fourth Edition. 2021.
  • [6] Andrea Latina et al. Rf-track: Beam tracking in field maps including space-charge effects. features and benchmarks. In Proceedings of the 28th Linear Accelerator Conference-LINAC16, 2016.
  • [7] N Pichoff. Beam dynamics basics in RF linacs. 2006.
  • [8] Georgi P Tolstov. Fourier series. Courier Corporation, 2012.
  • [9] Guido Van Rossum and Fred L Drake Jr. Python tutorial. Centrum voor Wiskunde en Informatica Amsterdam, The Netherlands, 1995.
  • [10] Thomas P Wangler. RF Linear accelerators. John Wiley & Sons, 2008.