simulation with a (time-depended) bumper

Moderators: cyao, michael_borland

Post Reply
li.chao
Posts: 62
Joined: 18 Aug 2021, 08:59

simulation with a (time-depended) bumper

Post by li.chao » 04 Aug 2026, 09:05

Hi,

I am trying to simulate a fan-out kicker model by bumper.

In the attached file. I set up a bunch train uniformly occupying the ring.

1. The initial bunch distribution is 80b_1MP_even.sdds

2. The Bumper file is set up as fan_kick.wf following a sine function, and inserted in the lattice.

When the bunch train passes through the bumper for the first time.
I expect the head-bunch to experience delta_xp=0. And the following bunches with delta_xp follow the strength set-up in the bumper (fan_kick.wf).

By checking data (s,xp) in FANKICKWATCH_2.WC file (exactly after the bumper), I found two things expected:
1. not all bunches experience the kick from the bumper.
2. head-bunches experience stronger kick than following bunches.

Can anyone help me to check how to set-up the simulation correctly?
Many thanks
Attachments
bumper_sim.zip
(2.04 MiB) Downloaded 6 times

michael_borland
Posts: 2059
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: simulation with a (time-depended) bumper

Post by michael_borland » 05 Aug 2026, 10:08

The problem is related to the way the BUMPER element aligns the time coordinates of the beam to the time coordinates of the waveform. In particular, it computes <t> for the particles and aligns that to t=0 in the waveform file. If you center your waveform t data about t=0, you should get the results you expect.

--Michael

li.chao
Posts: 62
Joined: 18 Aug 2021, 08:59

Re: simulation with a (time-depended) bumper

Post by li.chao » 06 Aug 2026, 13:31

Hi Michael,
Thanks a lot for you quick reply.

Following your suggestion, I set up a new bumper as shown in the attached file.
To clearly show how bumper kick different bunches.
I set 2 watch element before and after the bumper and calculated the delta_Px and compare with
the kicker strength set up in bumper.

The results is show as
80bunches_xp_compare_2E-4rad.png
Still there are two things those confuse me.

1. in the file "tracking.ele" , I insert the bumper as

&insert_elements name = BPM_SWL_7, type= "MONI",
element_def="Fanout_KICKER:BUMPER,L=0.0,WAVEFORM=\"fan_kick.wf=t+Waveform\",ANGLE=2E-3,tilt=0,FIRE_ON_PASS=1,TIME_OFFSET=3.77E-6"
&end

As you noticed, I set TIME_OFFSET=3.77E-6. With this value, I can align the bunch_train with the bumper.
I put the BUMPER at 530m, then the time offset_should be 1.77E-6. Why is there a 2E-6 time shift?

2. As shown in the plot. The delta_px (difference before and after bumper) experienced by bunches.
The bunches along the ring occupy a time window of 1 unit. To generate this plot,20 turns are tracked.
From left to right is the pass time of pass turns.
My question is: within a bunch train, which bunch is the head bunch and which is the tail bunch?
It seems like the time convention is t_{head} < t_{tail}, is it?

For example in the plot,
take the time window from 11 to 12. I expect the head bunch to experience zero kick and the tail to experience 1.4E-3 rad kick ,

Could you clarify it?

Many thanks
Chao
Attachments
bumper.zip
(1.97 MiB) Downloaded 5 times

li.chao
Posts: 62
Joined: 18 Aug 2021, 08:59

Re: simulation with a (time-depended) bumper

Post by li.chao » 10 Aug 2026, 05:31

michael_borland wrote:
05 Aug 2026, 10:08
The problem is related to the way the BUMPER element aligns the time coordinates of the beam to the time coordinates of the waveform. In particular, it computes <t> for the particles and aligns that to t=0 in the waveform file. If you center your waveform t data about t=0, you should get the results you expect.

--Michael
Hi, Michael,

Sorry for keeping asking the same questions on Bumper simulation.

In the past few days, I tried to run the bumper simulation again. The Elegant script can be found in the attached bumper.zip.
Scripte can be run "elegant tracking.ele -macro=root=test"

Two output files will be generated: FanKickWatch1.WC and FanKickWatch2.WC, which are particle coordinates before and after the bumper.
Then comparing the xp in these two files can tell me how particles are kicked by the bumper element.

I assume that the ring is occupied uniformly by 80 bunches, (I set 1 particle per bunch).
Since the bumper is set to a sine curve, I expect the head bunch to experience a 0 kick and the tail bunch to experience a larger kick when the bunch train passes through the bumper element for the first time.

Again, the following plot shows the comparison between delta_xp and bumper setups.
80bunches_xp_compare.png
Two questions.

1. I have to set TIME_OFFSET=3.77E-6 in bumper. With this value, I can align the bunch_train with the bumper.
In the ring, I put the BUMPER at 530m, then it should be TIME_OFFSET=530/3E+8 = 1.77E-6, isn;t it?

2. As shown in the plot. The bunches along the ring occupy a time window of 1 unit and the bumper is turned on at the 8th turn.
Within turns 8 to 9, I expect that the head is not kicked and the tailing bunches experience larger kicks.
Whereas the simulation shows the opposite: the tail bunches are not kicked, and the head is kicked by a large angle.

Could you please help me? How can I set up the simulation with such a bumper correctly?
Many thanks
Chao
Attachments
bumper.zip
(698.52 KiB) Downloaded 1 time

li.chao
Posts: 62
Joined: 18 Aug 2021, 08:59

Re: simulation with a (time-depended) bumper

Post by li.chao » 11 Aug 2026, 07:33

Dear Michael,

By going through the source file of kicker.c. If I understand the logic correctly, it is lines from 104 to 223 that update the xp or yp from the kicker.

From line 104 onward in the code, all particles' coordinates will be updated; Elegnat does not identify which bunch the particle is in.
Whereas, for a multi-bunch tracking study, the initial particle coordinate time (t) of bunches is set by separating t= n * trf as desired.
In line 132, the kick angle of a certain particle is calculated as:

132: angle *= (amplitude = INTERPOLATE(kicker->amp_wf, kicker->amp_wf[i + 1], kicker->t_wf, kicker->t_wf[i + 1], time));

where time is the particle time shift referenced to the bumper defined in line 106.
106: time = part[ip][4] / (c_mks * beta_from_delta(p_central, part[ip][5])) - time_offset;

Then, I would say, for a single-bunch simulation, the algorithm applied in code is still ok.
However, for multi-bunch tracking, it does not behave as expected (the head bunch experiences zero kick and the tail bunch experiences a stronger kick in my example). Do you agree?

Thanks for the discussion.

Yours Chao
Attachments
kicker.c
(17.31 KiB) Not downloaded yet

Post Reply