Page 1 of 1

Issue with EMATRIX and DELTAP

Posted: 05 Nov 2015, 13:18
by astecjames
Hello!

I am trying to simulate off energy particle tracking through an undulator beam-line, where the undulator is implemented as a matrix (the nominal design is for a helical undulator). I need to obtain the trajectory at various momenta, so I use the centroid file and vary an initial MALIGN element to change the particle DP. As expected the output parameter Cdelta shows the change in DP I input. Everything works as expected until I interact with the EMATRIX element, whereby the parameter Cdelta reverts to 0 (presumably as C6 for that element is 0?) and then stays at 0 for the rest of the beamline. Looking in the manual, this is not the expected way this should work, since C6 is defined as a "change" in DP (and as would make sense...!).

Discussing with Peter Williams (the inimitable astec_pete), we thought it might be a fiduzialization issue, but we can't seem to get rid of this behaviour. We therefore think it might be a bug. Or, possibly, our incompetence. But we would be grateful if you could take a look either way.

I have included some example files to demonstrate the effect.

Thanks!

James Jones
ASTeC, STFC, UK

Re: Issue with EMATRIX and DELTAP

Posted: 05 Nov 2015, 22:58
by michael_borland
James,

I think it is simply a result of not setting R66. For some odd reason, the default value all matrix elements is 0. If you set R66=1, you should get the desired behavior.

--Michael

Re: Issue with EMATRIX and DELTAP

Posted: 06 Nov 2015, 07:59
by astecjames
Michael,

Thanks! That is so obvious, but I completely missed it.
I had translated the deck from a MAD line, which assumes the identity matrix if not told otherwise.

James

Re: Issue with EMATRIX and DELTAP

Posted: 06 Nov 2015, 08:14
by michael_borland
James,

Sorry about the confusing usage. I added a note to the manual for the next release to warn about this.

--Michael