Centroid Offsets with Multi-bunch Operation and FRFMODE
Posted: 15 Oct 2020, 13:42
I am observing a numerical effect in ELEGANT when using multi-bunch trains on the LCLS2-HE linac for BBU studies, which I was hoping you might have some insight about. Analysis of the watch data for the bunches reveals an offset of the bunch centroids in the X coordinate that affects all bunches in the train and seems to be magnified when the number of bunches is increased. The effect is correlated with the use of the FRFMODE element (monopole wakes), but is absent when using only the FTRFMODE element (dipole wakes). Monopole wakes may produce offsets, since their energy kicks can be translated into X offsets by dispersive elements. However, I would not expect the magnitude of these offsets to change for bunches at the head of the train when additional bunches are added to the tail of the train.
I show below a simple example (X offset vs bunch number), where I run 10 (blue dots) and then 20 (orange dots) bunches through a single linac section (consisting only of cavities and quadrupoles). Even the first bunch in the train shows a relative offset when more bunches are added to the simulation. The only difference between the two runs is the number of bunches. I plot only up to bunch M = 10. When I turn off the monopole wakes, the two data sets below overlap exactly.
For reference, I am using n_duplicate to make the bunches and I verified that the phase spaces of the input bunches are all identical except for their z-positions. Although the difference noted above appears small, it is magnified when more bunches are used. When I run 500 bunches through the full linac, for example, I get an offset of 10 microns at the head of the train that is not present when only a single bunch is used. I’m wondering if perhaps it is some accumulation of numerical errors? For small number of bunches and a single cavity I do not see the effect… it becomes pronounced only with longer linacs and/or more bunches.
Any thoughts you may have on the cause of this would be much appreciated.
I show below a simple example (X offset vs bunch number), where I run 10 (blue dots) and then 20 (orange dots) bunches through a single linac section (consisting only of cavities and quadrupoles). Even the first bunch in the train shows a relative offset when more bunches are added to the simulation. The only difference between the two runs is the number of bunches. I plot only up to bunch M = 10. When I turn off the monopole wakes, the two data sets below overlap exactly.
For reference, I am using n_duplicate to make the bunches and I verified that the phase spaces of the input bunches are all identical except for their z-positions. Although the difference noted above appears small, it is magnified when more bunches are used. When I run 500 bunches through the full linac, for example, I get an offset of 10 microns at the head of the train that is not present when only a single bunch is used. I’m wondering if perhaps it is some accumulation of numerical errors? For small number of bunches and a single cavity I do not see the effect… it becomes pronounced only with longer linacs and/or more bunches.
Any thoughts you may have on the cause of this would be much appreciated.