R56 issue?

Moderators: cyao, soliday

Post Reply
simona.bettoni
Posts: 45
Joined: 06 Jul 2011, 03:14

R56 issue?

Post by simona.bettoni » 05 Dec 2017, 11:33

Hi,
we are trying to run Elegant. We generated a lattice file of MAD-X and Elegant. We plot the dispersion with the two codes and we obtain similar result, but when we try to plot R56 we have a discrepancy of a factor 2.
We tried with two versions of Elegant (both of them of 2017) and with different lattices.
I upload the relevant Elegant files, the plots of the dispersion and R56 for MAD-X and Elegant.
To generate R56 we used the command:
&matrix_output
SDDS_output = %s.mat
SDDS_output_order = 2
&end
in the .ele file.
We have also a tool to compute (and we measured in the machine) R56, and this is fitting with the MAD-X expectations.
It is possible that we are doing something really wrong doing the computation of R56...
Many thanks for any suggestion,
Simona.
Attachments
200pC_600k_wake.out
(29.76 MiB) Downloaded 610 times
Picture2.png
R56 Elegant-MAD-X
Picture1.png
Dispersion Elegant-MAD-X

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

Re: R56 issue?

Post by michael_borland » 05 Dec 2017, 12:44

Simona,

Is there acceleration in the system? If so, that could cause a misunderstanding of what the reference momentum is supposed to be. In elegant, R56 is defined as ds/dpIntial, where pInitial is the momentum at the start of the beamline. In many cases, people compute ds/dpChicaneInput, which is a different number when there is acceleration.

To say more, I'd need a copy of your .ele and .lte files.

--Michael

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

Re: R56 issue?

Post by michael_borland » 05 Dec 2017, 12:45

Sorry, that should be
R56 = ds/dpIntial*pInitial0, etc.

--Michael

simona.bettoni
Posts: 45
Joined: 06 Jul 2011, 03:14

Re: R56 issue?

Post by simona.bettoni » 06 Dec 2017, 03:51

Sorry, I thought I uploaded all of them, but not. Here they are.
The section where we see the discrepancy in SINBC02.
Thanks.
Attachments
SF-Injector.lte
(54.05 KiB) Downloaded 596 times
SF-Injector.ele
(778 Bytes) Downloaded 598 times

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

Re: R56 issue?

Post by michael_borland » 06 Dec 2017, 11:50

Simona,

As I suspected, the problem is that MAD-X is not correctly taking into account the change in beam momentum. It is computing the local R56, resulting from a local change in delta, rather than the R56 with respect to the initial delta. Hence, the total R56 computed by MAD-X is not really the total R56. The factor-of-two error is approximately the ratio of the initial energy to the energy at the main chicane.

To prove this, I ran a tracking simulation and computed the R56 from that. As you can see, it agrees well with the matrix analysis from elegant.
checkR56.png
checkR56.png (10.68 KiB) Viewed 13105 times
I've also attached my files so you can see how I did the calculation. (Note: I changed your lattice file, turning RFCWs into RFCAs and adding a misalignment element that allows me to vary the initial delta).

As for why your measurements are agreeing with MAD-X, I can't be sure, but suspect you are varying and measuring the energy at the chicane, rather than the entrance of the linac. If you wan to check that calculation with elegant, you need to simulate just the chicane, not the linac plus chicane.

--Michael
Attachments
2017-12-06.zip
(8.52 KiB) Downloaded 632 times

simona.bettoni
Posts: 45
Joined: 06 Jul 2011, 03:14

Re: R56 issue?

Post by simona.bettoni » 11 Dec 2017, 10:44

Many thanks for your reply.

Post Reply