Page 1 of 1

rf_setup return <0 values for Ss & Sdelta

Posted: 18 Apr 2018, 16:07
by Philippe Piot
Hello,
I was wondering what is the meaning of Ss0 and Sdelta0 and how they are computed in rf_setup. For the example attached I am puzzled as the rf_setup returns negative values for these two variables. Also, I am surprised by the magnitude of Sdelta [O(10**-10)] assuming there is just an issue with the sign. If I just use these value as input for my sddsbeam, I see the beam is longitudinally mismatched. It there an easy way to find out the ideal initial longitudinal beam parameter to be matched and avoid large oscillation in bunch length and energy spread?
Thank you, -- Philippe.

Re: rf_setup return <0 values for Ss & Sdelta

Posted: 11 May 2018, 11:45
by michael_borland
Philippe,

The problem is that the code wasn't properly handling negative momentum compaction. I fixed this and attach the revised source code.

Also, I now use eta=alpha-1/gamma^2, whereas before I just used alpha. Doesn't make a significant difference in most cases.

--Michael

Re: rf_setup return <0 values for Ss & Sdelta

Posted: 16 May 2018, 04:39
by Philippe Piot
Michael,
Thank you. The signs are fixed but I am still just confused by the meaning of Sz0 and Sdelta0 are these the expected equilibrium bunch length and relative energy spread? Thank you, -- Philippe.

Re: rf_setup return <0 values for Ss & Sdelta

Posted: 16 May 2018, 07:48
by michael_borland
Philippe,

Here's the code that compiles with the present release of elegant.

Ss0 and Sdelta0 are indeed the equilibrium values of the bunch length (in meters) and fractional momentum spread.

--Michael