RFMODE with multiple bunches

Moderators: cyao, michael_borland

Post Reply
Alexis_Gamelin
Posts: 2
Joined: 30 Sep 2022, 08:15

RFMODE with multiple bunches

Post by Alexis_Gamelin » 03 Oct 2022, 08:20

Hi,
I am using Elegant 2021.4.0 and would like to do some beam loading calculations using the RFMODE element but I am struggling to go from single bunch to multiple bunches.

I tried generating a beam with both the generateBunch/generateBunchTrain scripts (viewtopic.php?f=13&t=1151&p=4762&hilit= ... rain#p4762) and also using sdds_beam but I am always getting the same error so I think it is liked to the RFMODE setup and not how I setup the beam.

The RFMODE element (here a passive harmonic cavity) is defined using:

Code: Select all

rf: rfca, VOLT=1.8e6, PHASE=166.55978566105205, FREQ=351820131.44377375, FIDUCIAL="light"
rf_h: rfmode, Q=1e8,Rs=90e8,freq=1407420550.0705662,charge=5.912111838384184e-07,bin_size=1e-12,&
        n_bins=2000,ramp_passes=0,record="%s.rec",sample_interval=10, PRELOAD=1, PRELOAD_CHARGE=5.912111838384184e-07, BUNCHED_BEAM_MODE=1
Using this setting was ok for single bunch and the result of a full simulation is making sense but using the RFMODE element with multiple bunches seem to always trigger this error for me:

Code: Select all

20 of 20 particles  outside of binning region in RFMODE RF_H #1. Consider increasing number of bins. Also, particleID assignments should be checked.
From the manual, I was not able to say which region should be covered by the bins in the first place. Only the bunch, the full RF period or the full beam ? I attached a small exemple which reproduces the error.

Thanks,
Alexis
Attachments
ilmatrix_rfca_h_rfmode_bunched.zip
(3.7 KiB) Downloaded 46 times

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

Re: RFMODE with multiple bunches

Post by michael_borland » 05 Oct 2022, 19:31

Alexis,

The problem is that there's a bug that shows up when the CHARGE parameter is used on RFMODE. This parameter is deprecated, although the manual doesn't say that. You should use a CHARGE element instead. I'll revise the manual to make this clear.

See attached.

--Michael
Attachments
test.lte
(893 Bytes) Downloaded 47 times

Alexis_Gamelin
Posts: 2
Joined: 30 Sep 2022, 08:15

Re: RFMODE with multiple bunches

Post by Alexis_Gamelin » 07 Oct 2022, 09:58

Thank you Michael, with the inclusion of the CHARGE and RECIRC elements I was able to run the computation without issues.

Alexis

SDastan
Posts: 34
Joined: 21 May 2018, 07:08

Re: RFMODE with multiple bunches

Post by SDastan » 17 Nov 2022, 05:55

Dear all,

I tried to do tracking for beam loading calculations using the RFMODE but it seems that I faced the same problem that Alexis faced, however, I didn't use charge in RFMODE.

Code: Select all

3 of 10000 particles outside of binning region in RFMODE RF_H #1. Consider increasing number of bins.
Would you mind if I ask you to take a look at it and gives me your idea?

Regards,
Attachments
Elettra_RFMODE.zip
(3.12 KiB) Downloaded 5 times
Sara

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

Re: RFMODE with multiple bunches

Post by michael_borland » 18 Nov 2022, 18:43

Sara,

I identified several issues
  • The bunch interval (duplicate_stagger in makeBeam.ele) is wrong for your 500 MHz rf system. It should be a multiple of 1/MainRfFrequency.
  • The Q of your harmonic cavity is very high. Even for SC cavities, we need to load the cavity to prevent very high beam-induced voltage and provide easier voltage tuning via the frequency offset.
  • The frequency of your harmonic cavity is exactly a multiple of the main frequency. This again results in very high induced voltage.
  • It is usually a good idea to ramp the charge from zero to the nominal value at a rate that allows the bunches to adiabatically stretch. This avoids transients and particles outside the binning range.
I've attached some files that illustrate how to address the above issues. You'll no doubt want to change some of the harmonic cavity parameters; I just used the APS-U ones as a proof of principle.

--Michael
Attachments
revised.zip
(1.71 KiB) Downloaded 9 times

Post Reply