Issue with moments_output for a very perturbed ring

Moderators: cyao, michael_borland

Post Reply
GPenn
Posts: 40
Joined: 28 Aug 2018, 09:46

Issue with moments_output for a very perturbed ring

Post by GPenn » 30 Mar 2020, 20:25

Hi,

I have been looking at the ALS-U ring with large errors that have been corrected with kicker magnets and other adjustments. The final beamline was converted from AT simulations. Although it looks like there is a closed orbit, moments_output produces the following error message:

Warning: particle acquired undefined slopes when integrating through kick multipole

Sometimes I managed to get the moments_output calculation to complete by tweaking the lattice, but there were nonsensical results including negative emittances. There are also some MKL errors.

Does this mean that all elegant calculations will be unreliable, or is it just a problem that moments_output
cannot converge to an answer? When tracking a single particle everything looks reasonable, but the transverse motion is limited due to the apertures.

Example is attached. I apologize for the very long lattice file, I'm not sure how to reduce the problem further.

-Gregg
Attachments
Moments.zip
(44.63 KiB) Downloaded 124 times

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

Re: Issue with moments_output for a very perturbed ring

Post by michael_borland » 04 May 2020, 17:46

Gregg,

I'm not sure of the cause of this problem. I did notice something odd. On the KSEXT elements, you have TILT, DX,and DY errors, but also K1 and J1 values; do you have normal and skew quadrupole correctors on the sexutpoles? If not, I think some errors are being double counted.

I'll keep looking to see if I can resolve the problem.

--Michael

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

Re: Issue with moments_output for a very perturbed ring

Post by michael_borland » 04 May 2020, 20:02

Gregg,

I tracked this down to a bug in how steering kicks are implemented for KSEXT in the moments calculation. The bug results in the kick getting applied multiple times. This happened recently when I changed the code for KSEXT and KQUAD to distribute the kicks throughout the element, rather than just a the ends.

The fix is straightforward, but the code has other modifications so I can't easily post a simple source file with the change. The best workaround is to put the kicks at the ends of the KSEXT elements.

--Michael

GPenn
Posts: 40
Joined: 28 Aug 2018, 09:46

Re: Issue with moments_output for a very perturbed ring

Post by GPenn » 18 May 2020, 16:35

Thank you Michael,

Separating the kicks out is straightforward, I will see what it does. To be clear, there is no bug with KQUAD elements, just KSEXT?

The errors on the magnets in that lattice file are a little strange, I think there is supposed to be a combination of local and global corrections going on.

-Gregg

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

Re: Issue with moments_output for a very perturbed ring

Post by michael_borland » 18 May 2020, 17:21

Gregg,

The serious bug was only in the KSEXT element. KQUAD elements had another issue, namely, that for moments calculations the kicks were placed at the ends of the element, rather than being distributed through the element. Both problems are fixed in the coming release.

--Michael

Post Reply