synch_rad losses in quad with nonzero kick

Moderators: michael_borland, soliday

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

synch_rad losses in quad with nonzero kick

Post by GPenn » 28 Jan 2020, 19:50

In a KQUAD element with |K1|>1, if either HKICK or VKICK is nonzero (it doesn't matter how small) then the radiation losses are oversized and scale quadratically with K1. An electron could lose more than an MeV in a modest-strength magnet. KSEXT elements have the same issue with the value of K2.

In the file multipole.c, it looks like for a KQUAD element the final calculation of the local magnetic field is obtained by taking K1*r. But instead of treating contributions from lower-order multipoles (including HKICK) independently, the radial coefficients are
separated out and added together, and then they are all multiplied by KnL[0], which for a quadrupole is K1. Instead of a formula like K1*x+xkick*1 for the radiated power, that winds up giving K1*(x+1). When HKICK=VKICK=0 the dipole part is skipped entirely so then it works out okay, giving K1*x.

In the function apply_canonical_multipole_kicks, the quantities sum_Fx and sum_Fy seem to only be the position-related terms, independent of the field strength. This is different from how it is done in csbend.c where the actual forces from the fields are being combined in Fx and Fy. It does make sense to apply kicks from different sources individually and delay only the calculation of the radiation loss until the end of the step, since the kicks add linearly but the radiated power does not. However, the only way to do that is to keep a running total of all the kicks that each particle experiences, instead of the unweighted polynomial that just depends on x and y.

See Figure below, and some sample files are in a zip folder.


-Gregg


hkick_quad_delta.png
Attachments
Kicks.zip
(25.29 KiB) Downloaded 154 times

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

Re: synch_rad losses in quad with nonzero kick

Post by michael_borland » 17 Feb 2020, 13:28

Gregg,

This is definitely a bug. The fix is attached and will appear in the next release, coming soon.

--Michael
Attachments
multipole.c
(68.82 KiB) Downloaded 160 times

Post Reply