Dear Michael.
Thanks for your explanation. I did a further comparison of tune-spared from elegant and CETASim.
In elegant, still, it is a one-turn map and the space charge is set as 'nonlinear'
The particle_tunes namelist is set as:
&particle_tunes filename="<root>.nup", start_pid=1, end_pid=10000, pid_interval=1, include_x=1, include_y=1, include_s=1, start_pass=1, segment_length=500 &end
In the simulation, I set 20,000 turns to track. With the last page in *.nup, I generated this plot to compare and here is the result.
Seems like elegant results produce more noise in tune calculation, in this sense, how should I improve its? Does increasing segment_length help?
One more thing to confirm, in elegant, tune data at page 40 is found by NAFF mthod with particle trajectory betwen (19500 to 20000)?
Do I get it correct?
Many thanks Michael
space charge simulation in rings
Moderators: cyao, michael_borland
Re: space charge simulation in rings
Dear Michael,
I am currently testing the bin-method in elegant to evaluate the space-charge forces. For benchmarking, I continue to use an unphysical model based solely on a one-turn matrix. In the simulation, only ILMATRIX + RF + SR + SC are included.
To study the impact of bunch length, I set up two cases—with and without a harmonic cavity—corresponding to a long bunch (≈40 ps) and a short bunch (≈8 ps) natural bunch length.
For the insert_sceffects namelist in elegant, I used the following setup:
&insert_sceffects
name = WC0,
type = WATCH,
element_prefix = "MYSC",
skip = 0,
vertical = 1,
horizontal = 1,
nonlinear = 1,
slice_duration = 2E-12,
slice_threshold = 50
&end
A consistent initial condition is used in the Cetasim code. In both elegant and Cetasim simulations, the number of macro-particles is 100k, and the tracking length is 50k turns.
The comparison between the two codes is shown below.
(1) Long-bunch case (with harmonic cavity) Both codes show the same trend of emittance growth versus beam current. The final emittance values differ at higher current (we may skip this for now).
(2) Short-bunch case (single RF) Surprisingly, in elegant, between 1–3 mA, I observe unusual behavior. When I inspect the horizontal phase-space at 2 mA after 5k turns:
I see two resonance islands generated by the space-charge kick, and these islands continue evolving in later turns.
However, in Cetasim, I see six islands instead. Given that the bare horizontal tune is approximately 0.18 ≈ 1/6, the appearance of six islands is what I expect from particles being trapped by the 1/6 resonance.
Could you please spend a little more time to examine whether my setup for the short-bunch case in elegant is correct?
Many thanks for your help.
Yours,
Chao
I am currently testing the bin-method in elegant to evaluate the space-charge forces. For benchmarking, I continue to use an unphysical model based solely on a one-turn matrix. In the simulation, only ILMATRIX + RF + SR + SC are included.
To study the impact of bunch length, I set up two cases—with and without a harmonic cavity—corresponding to a long bunch (≈40 ps) and a short bunch (≈8 ps) natural bunch length.
For the insert_sceffects namelist in elegant, I used the following setup:
&insert_sceffects
name = WC0,
type = WATCH,
element_prefix = "MYSC",
skip = 0,
vertical = 1,
horizontal = 1,
nonlinear = 1,
slice_duration = 2E-12,
slice_threshold = 50
&end
A consistent initial condition is used in the Cetasim code. In both elegant and Cetasim simulations, the number of macro-particles is 100k, and the tracking length is 50k turns.
The comparison between the two codes is shown below.
(1) Long-bunch case (with harmonic cavity) Both codes show the same trend of emittance growth versus beam current. The final emittance values differ at higher current (we may skip this for now).
(2) Short-bunch case (single RF) Surprisingly, in elegant, between 1–3 mA, I observe unusual behavior. When I inspect the horizontal phase-space at 2 mA after 5k turns:
I see two resonance islands generated by the space-charge kick, and these islands continue evolving in later turns.
However, in Cetasim, I see six islands instead. Given that the bare horizontal tune is approximately 0.18 ≈ 1/6, the appearance of six islands is what I expect from particles being trapped by the 1/6 resonance.
Could you please spend a little more time to examine whether my setup for the short-bunch case in elegant is correct?
Many thanks for your help.
Yours,
Chao