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.
R56 issue?
-
- Posts: 45
- Joined: 06 Jul 2011, 03:14
R56 issue?
- Attachments
-
- 200pC_600k_wake.out
- (29.76 MiB) Downloaded 610 times
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: R56 issue?
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
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
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: R56 issue?
Sorry, that should be
R56 = ds/dpIntial*pInitial0, etc.
--Michael
R56 = ds/dpIntial*pInitial0, etc.
--Michael
-
- Posts: 45
- Joined: 06 Jul 2011, 03:14
Re: R56 issue?
Sorry, I thought I uploaded all of them, but not. Here they are.
The section where we see the discrepancy in SINBC02.
Thanks.
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
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: R56 issue?
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. 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
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. 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