IDSlotsPerBunch for non-uniform fill pattern

Moderators: cyao, michael_borland

Post Reply
Teresia
Posts: 30
Joined: 04 Oct 2018, 08:42

IDSlotsPerBunch for non-uniform fill pattern

Post by Teresia » 24 Mar 2021, 09:05

Hi,

I'm trying to generate a beam for a non-uniform fill pattern that can be imported using sdds_beam. If I have understood correctly, the best way of getting different charge in different bunches is to use a charge element and create the bunches with different number of particles, but I'm not sure how to correctly handle the IDSlotsPerBunch parameter when doing that. Do I have to create the beam with one bunch per page because of that parameter? Otherwise all bunches will have the same IDSlotsPerBunch despite different number of particles?

I'm also wondering when the IDSlotsPerBunch parameter is actually used? Is it just to create new particle IDs when using n_duplicates in sdds_beam or also for other purposes (such as determining the bunches for the beam_output from ion_effects)? I have noticed that in version 2020.5.0 you get a line "0 bunches present" after sdds_beam has read in the particles, but for me it always says that I have 0 bunches despite that all particles have been read and that the beam works as expected during tracking. I thought perhaps if I had set the IDSlotsPerBunch correctly, that line would give the number of bunches that has been identified in the beam?

Best regards,

Teresia

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

Re: IDSlotsPerBunch for non-uniform fill pattern

Post by michael_borland » 25 Mar 2021, 11:56

Teresia,

Please see viewtopic.php?f=13&t=1151 for a script to help generate arbitrary bunch patterns.

The IDSlotsPerBunch value is the same for all bunches. Some ID values won't be use when a bunch population is low.

This parameter is used to assign particles to bunches. The bunch number is Floor[(particleID-1)/IDSlotsPerBunch].

--Michael

Teresia
Posts: 30
Joined: 04 Oct 2018, 08:42

Re: IDSlotsPerBunch for non-uniform fill pattern

Post by Teresia » 30 Mar 2021, 04:41

Thank you, Michael. That script is exactly what I needed! :)

Ah. Then I understand the use of IDSlotsPerBunch. I was worried that it had to correspond to the number of particles I have in the bunch and that all ID values have to exist in the beam.

Best regards,

Teresia

Post Reply