Page 1 of 1

RFMODE with multiple bunches

Posted: 03 Oct 2022, 08:20
by Alexis_Gamelin
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

Re: RFMODE with multiple bunches

Posted: 05 Oct 2022, 19:31
by michael_borland
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

Re: RFMODE with multiple bunches

Posted: 07 Oct 2022, 09:58
by Alexis_Gamelin
Thank you Michael, with the inclusion of the CHARGE and RECIRC elements I was able to run the computation without issues.

Alexis

Re: RFMODE with multiple bunches

Posted: 17 Nov 2022, 05:55
by SDastan
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,

Re: RFMODE with multiple bunches

Posted: 18 Nov 2022, 18:43
by michael_borland
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