matching when cavities_are_drifts_if_matched = 0

Moderators: cyao, michael_borland

Post Reply
astecpete
Posts: 35
Joined: 24 Jul 2008, 04:01
Location: Daresbury Laboratory, UK

matching when cavities_are_drifts_if_matched = 0

Post by astecpete » 22 Dec 2008, 12:06

Hi again michael,

Sorry to keep on bugging you! So i'm doing something really simple, matching a "cell" in a linac. The cell consists of (halfdrift, quad, drift, cryomodule, drift, quad, halfdrift). I was originally using matched = 1 in twiss_output, which gives a nice solution
match1.ps
(19.42 KiB) Downloaded 652 times
. But then i remembered that elegant treats cavities as drifts for the purposes of matching. So i added cavities_are_drifts_if_matched = 0. The match is now not a match
match2.ps
(19.42 KiB) Downloaded 635 times
. The start and end twiss values are no longer equal (although funnily enough beta_x = beta_y at both start and end). Matching the same thing in MAD8 works
mad.ps
(64.55 KiB) Downloaded 659 times
- twiss values at start and end are the same (and beta_x != beta_y at the start and end).

Have i made a boo-boo?

Pete

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

Re: matching when cavities_are_drifts_if_matched = 0

Post by michael_borland » 22 Dec 2008, 14:28

Pete,

I don't think you've done anything incorrectly, but I'm also not sure the request to match a periodic cell is valid in a linac, except when deltaGamma/Gamma is very small. I think that the only way to get periodic beta functions is to match the system cell-by-cell with different quadrupole strengths. The edge and body focusing will of course come into play, and these vary with momentum. Even without those effects, however, the matrix for a cavity changes with the momentum of the incoming beam, since elegant uses trace space (i.e,. x' and y' instead of px and py).

The cavities_are_drifts_if_matched parameter was really only intended to turn off effects in matching storage rings with rf cavities, to avoid annoying small mismatches. Having said that, I think there is a bug: when change_p0=1, elegant shouldn't allow using this flag and treating cavities like drifts, because the momentum change then seems to come from nowhere.

I'm not sure what MAD is doing. An interesting exercise would be to take the solution from MAD and try it in elegant using tracking, then compute the beta function from beta=sigma^2/emittance. I've done this in the past with elegant only, and the beta function computed this way always agrees with twiss_output.

--Michael

Post Reply