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
IDSlotsPerBunch for non-uniform fill pattern
Moderators: cyao, michael_borland
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: IDSlotsPerBunch for non-uniform fill pattern
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
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
Re: IDSlotsPerBunch for non-uniform fill pattern
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
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