Matrix concatenation

Moderators: cyao, michael_borland

Post Reply
petrenko
Posts: 43
Joined: 09 Jun 2008, 02:53
Contact:

Matrix concatenation

Post by petrenko » 05 Aug 2008, 04:06

Dear Michael Borland,

Could you please explain what the "matrix concatenation" in elegant means (concat_order option in run_setup)?

I need to simulate a kicked beam decoherence in the Tevatron, over many thousand turns. It's enough for me now to have a second order matrix approximation for all the elements and I actually want to save time tracking the beam only through the concatenated matrices between the BPMs (the idea is to have the simultaneous readouts from all the BPMs for the independent component analysis).

concat_order=2 option in run_setup does not help -- tracking a singe particle over 8000 turns still takes about a minute -- just as long as it takes without the concat_order option.

Thanks,
Alexey.
Attachments
Tevatron.tar.gz
Run count_twiss.tcl first, then track.tcl
(24.41 KiB) Downloaded 225 times

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

Re: Matrix concatenation

Post by michael_borland » 05 Aug 2008, 08:01

Alexey,

The concat_order parameter allows controlling the order of elements that will be concatenated. For example, if you set concat_order=2, then all successive elements that are represented by a matrix of order 2 or less will be concantenated into a single 2nd-order matrix. When elements are seen that cannot be represented by a matrix at all or require a matrix of higher order, the concatenation is stopped and those elements are treated individually.

In your lattice, you have many MONI and MARK elements. These cause the concatenation to work poorly because it must be frequently stopped and restarted. To fix this, I added two lines at the top of your track.ele file:

&transmute_elements name=*, type=MONI, new_type=DRIF &end
&transmute_elements name=*, type=MARK, new_type=DRIF &end

These result in turning all MONI and MARK elements into drifts, which allows them to be concatenated. I tested this and found a ten-fold decrease in run-time for your job.

Another approach to this problem is to use the ILMATRIX element to represent your ring. It has the advantage of being symplectic, but you have to supply tune shift coefficients with amplitude and momentum.

--Michael

petrenko
Posts: 43
Joined: 09 Jun 2008, 02:53
Contact:

Re: Matrix concatenation

Post by petrenko » 05 Aug 2008, 08:47

Thank you very much! Now it works very fast. 3rd-order matrix concatenation takes about 1 minute but then it can track 2 million turns in a couple of minutes.

Using the ILMATRIX element for the Tevatron is not possible, I think, since the horizontal and vertical betatron motion is coupled. This collider has a significant skew-quadrupole component along the entire ring.

Post Reply