Longitudinal tracking using sdds_beam

Moderators: cyao, michael_borland

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

Longitudinal tracking using sdds_beam

Post by Teresia » 04 Oct 2018, 09:17

Hi,

I want to use elegant to do longitudinal tracking of different fill patterns with a passive harmonic cavity. I am attempting to modify the APS-24Bunch-CBI for my case. For testing I have started with no harmonic cavity and the main cavities without beam loading by using RFCA. So far I have managed to set up the ilmatrix and sreffects and got the simulation to run using bunched_beam. Now I want to change to use sdds_beam instead to have many bunches, but I have run into problems.

- I started using a bunch with 1000 particles and tried to create a second bunch with n_duplicates = 1 and offsetting it longitudinally using duplicate_stagger[4] as in the example. However, it only works if I have duplicate_stagger[4] = 0. If I try offsetting the second bunch according to the bunch spacing given by the RF frequency the particles in the second bunch is lost. Depending on what offset I use (for example two bunches after each other or two bunches equally spaced around the ring) particles in the first bunch is sometimes also lost. Is it not possible to combine sdds_beam with RFCA so I have to model the RF cavities using RFMODE?

- For testing I decided to simplify my simulation to only use 1 particle per bunch. Using sdds_beam that works when only having one bunch, but when adding n_duplicates = 1 the simulation gets stuck. The output says that I have 2 particles that should be tracked, but the tracking never starts. Can there be a problem with the fiducialization when having only 1 particle per bunch? I tried different settings related to the fiducialization, but none helped.

Best regards,

Teresia

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

Re: Longitudinal tracking using sdds_beam

Post by michael_borland » 04 Oct 2018, 14:25

Teresia,

The problem is probably with the default phasing/fiducialization algorithm in RFCA. By default, it phases the cavity to the mean arrival time of the *beam*, since RFCA doesn't understand bunches. You can fix this by setting FIDUCIAL_MODE="light" on RFCA, if your beam is highly relativistic. If not, try FIDUCIAL_MODE="first".

--Michael

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

Re: Longitudinal tracking using sdds_beam

Post by Teresia » 05 Oct 2018, 05:33

Thank you, Michael. That fixed the problem when tracking with many particles. Now I can track two bunches with 1000 particles without them getting lost.

However, the problem when only tracking with few particles seems to be something else because it occurs also if my ring only consist of an Ilmatrix. I can track 1 or 2 bunches with 10 particles, but when only having 5 particles I can only track 1 bunch. When attempting to have 2 bunches, the output just says "tracking 10 particles" and the simulation gets stuck. My guess is that this is also a fiducialization problem since the next line in the output if the simulation had worked would be "This step establishes energy profile vs s (fiducial beam)". Is it not possible to track with only few particles per bunch? For example, I am interested in having just a single particle per bunch to compare the result with single-particle tracking codes that do not take the longitudinal bunch profile into account.

Best regards,

Teresia

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

Re: Longitudinal tracking using sdds_beam

Post by michael_borland » 05 Oct 2018, 11:58

Teresia,

Can you provide some input files that demonstrate the problem? I can't think of a reason that would happen. Is this with the serial or parallel version?

--Michael

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

Re: Longitudinal tracking using sdds_beam

Post by Teresia » 08 Oct 2018, 04:16

I am using the parallel version and I realised what the problem is. I cannot use more cores than I have particles per bunch. I was running on 10 cores and then problems occurred when having fewer particles than 10. I reduced the number of cores and now it seems to work fine :)

Best regards,

Teresia

guenzel
Posts: 4
Joined: 11 Dec 2018, 10:38

Longitudinal tracking

Post by guenzel » 01 Feb 2019, 12:44

Hello !

This question actually is not related with sdds_beam. It is more basic. :oops:

In order to assure a reasonable synchrotron motion a couple of parameters have to be set. I prepared a bunched beam with &bunched_beam,
setting sigma_dp=1e-3, sigma_s=4.6e-3, Po=5870.84. Moreover, I put a cavity in the structure with rf-phase=163.46 and a FREQ=503020667.3,
and ILMATRIX I put alpha=8.72e-4. Is this enough to get a reasonable synchrotron motion? I guess, I also have to put SREFFECTS, but actually, upon doing it I got an error message when, the values of JX , JY , and EXREF were nan so the tracking didn't start off. Does SREFFECTS compute the Losses automatically, i.e. I don't need to put them ? Finally do the impedance elements like ZLONGIT and ZTRANSVERSE the information about the energy from the Po -parameter given in the &bunched_beam ? I am asking because it my little structure I simulate they don't seem to work yet.

Thank you for any help

Thomas Guenzel

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

Re: Longitudinal tracking using sdds_beam

Post by michael_borland » 02 Feb 2019, 19:23

Thomas,

At minimum, for ILMATRIX you need to specify L, ALPHAC, BETAX, BETAY, NUX, and NUY. You need the BETA and NU values even if you are not interested in transverse motion.

SREFFECTS won't get configured automatically unless you have a full ring lattice defined and invoke the &twiss_output command with radiation_integrals=1. If you are using ILMATRIX, that's not going to work, but you can configure SREFFECTS manually or using a script.

You don't need to specify the momentum of the beam in bunched_beam unless for some reason you want it to be different from the reference value defined in &run_setup. If you do specify it separately, then it is reflected in wake calculations.

The attached example includes a script called SREffectsSetup that can help you set up SREFFECTS easily. There's also a script called ILMatrixSetup that does the same for ILMATRIX.

--Michael
Attachments
broadBandImpedance.zip
(5.21 KiB) Downloaded 277 times

guenzel
Posts: 4
Joined: 11 Dec 2018, 10:38

Re: Longitudinal tracking using sdds_beam

Post by guenzel » 06 Feb 2019, 12:36

Dear Michael,

thank you for the explanation and the zip-file. I will try it out.

Cheers,
Thomas

Post Reply