Page 1 of 1

Discrepany in R26 and R56 for transversely offset KQUAD

Posted: 29 Nov 2023, 06:55
by Zamank
Hi Michael,

I am creating a beamline with an DX-offset quadrupole to induce some fine-tuned dispersion. But I noticed when I look at the R-matrix for the offset quadrupole there is no effect on the R56. Additionally when I cross-reference with another particle tracking code (Bmad) I get completely different R56 and R26 as well. I did try toggling all the parameters I could find in the KQUAD element to "turn-on" the R56 but with no luck.

Would you have any insight on this matter? I've attached a sample file.

Thanks in advance!

Re: Discrepany in R26 and R56 for transversely offset KQUAD

Posted: 19 Dec 2023, 18:42
by michael_borland
I'll have to look into why that term is missing. Meanwhile, you can add "TRACKING_MATRIX=2" to the definition of the KQUAD element to get a tracking-based matrix, which includes this term.

I suppose that other R5X and RX6 terms will also change as a result.

One thing to be aware of in comparing to other codes is that elegant uses s as the longitudinal coordinate, whereas most other codes use s0-s. So there's a sign change in all terms R5X and RX5.

--Michael

Re: Discrepany in R26 and R56 for transversely offset KQUAD

Posted: 27 Dec 2023, 13:45
by Zamank
Great! Thanks for the reply Michael, I'm currently looking into the discrepancy as switching the "TRACKING_MATRIX=2" did turn on the R56 term but the magnitudes of the R16, R26, and R56 are slightly off.