moments_output: how to use with coupling

Moderators: cyao, michael_borland

Post Reply
simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

moments_output: how to use with coupling

Post by simone.dimitri » 14 Oct 2013, 09:08

Hello everybody,

I am a beginner with elegant for rings and I have questions about &moments_output.
I understood the rf parameters have to be set properly in ordert to make &moments_output calculating the equilibrium emittances correctly (I am in the matched=1, equilibrium=1 and radiation=1 mode). That said,...

...first, I noted the equilibrium horizontal emittance in the .mom file coincides with that in the .twi file (named ex0) **only** for a very fine and apparently ad hoc adjustment of the rf params. Could you please explain to me the physical sense of such a high sensitivity?

Second, I want to include coupling in the lattice as due both to vertical dispersion and skew quads. I understood that, this time, only &moments_output could correctly evaluate the coupling parameters and the equilibrium vertical emittance. Am I right?

Third, shall I first tune the rf params so that the horizontal emittance is like in .twi file (see first point above), and then proceed with the coupling study?

I would appreciate comments or answers from Michael as well as from other code experts. I am sorry for such basic questions. Thank you in advance,
Simone

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

Re: moments_output: how to use with coupling

Post by michael_borland » 12 Nov 2013, 15:17

Simone,

Sorry for the late response. The notification feature on the forum is not reliable.

The ex0 calculation in the twiss output file is a very idealized calculation. In particular, it would not include things like the variation of the orbit around the ring, or coupling between planes. Hence, it is only expected to agree approximately with the results of the &moments_output calculation.

&moments_output is the only quick and reliable way to compute the effecs of vertical dispersion and skew quads in elegant. (I think other codes use the same algorithm.) One can also perform multi-particle tracking with element-by-element radiation, but that is hardly quick.

I'm not sure what tuning of the rf parameters you are performing. I suggest using the &rf_setup comment to set up your rf cavities. The results of the &moments_output calculation should be close to those of &twiss_output.

--Michael

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: moments_output: how to use with coupling

Post by simone.dimitri » 22 Oct 2014, 10:43

Hi Michael,
still working with moments_output, now for optimization.

First question.
For the bare lattice, in which I use RF cavities, the moments_output command works well.
For a perturbed lattice with errors, orbit and tune correction, Elegant says that the third mode is unstable (but the RF cavities are still in) and that only two modes will be calculated (I presume the transverse ones).
Does this mean I am in trouble with the RF? And if so, why are the sigma matrix elements (moments_output print out with verbose=2) *all* filled with finite numbers?

Second question.
In the Elegant manual you say to use the notation "sijm", 1<=i<=j<=6, for the optimization of sigma matrix elements. However, in the *.mom output file I find, e.g., s1, s2, s3, etc., for the diagonal elements. I guess s3 stays here for rms vertical beam size. So, shall I use for example "s3", or maybe "s3m" in the optimization loop, or "s33m"?

I am also incurring in some troubles with the sigma matrix, as I find finite value for s3beta, while s3 is not defined....but still working on it, I am sure I am doing something wrong macroscopically.
Many thanks,
S.

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

Re: moments_output: how to use with coupling

Post by michael_borland » 22 Oct 2014, 11:52

Simone,

I've never seen that message about one of the modes being unstable, but it does seem odd given that the matrix is finite. Perhaps if you can send a concise set of input files that show the error, I can find out the reason.

For optimization, you should use something like "M1.s33m sqrt" to get the vertical beamsize, where M1 is the name of a MARK element that has FITPOINT=1.

Hope this helps.

--Michael

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

Re: moments_output: how to use with coupling

Post by michael_borland » 22 Oct 2014, 11:53

Make that "M1#1.s33m sqrt". The "#1" indicates to use the first occurrence of the M1 marker.

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: moments_output: how to use with coupling

Post by simone.dimitri » 24 Oct 2014, 09:51

OK Michael,

I am attaching concise versions of my files, *.ele, *.lte, input settings file and printout of sigma matrix (*.rtf) for two cases, one for the bare lattice and below that, for the lattice perturbed by errors. The latter case is depicted by the Elegant files as they are. If you want to run the bare lattice (no errors), just uncomment the first "&stop" in the *.ele file.

One thing I thought about the moments_output warning message (3rd mode unstable) is that in the presence of errors, I should retune the RF phase of my four cavities. Bu then I do not know how to do it. Also, to my understanding the files are providing a solution for the transverse dynamics, but then I do not understand why the sigma matrix has negative elements (!).

I am sure I am making a lot of confusion somewhere in the files. Thank you in advance for your help.
S.
Attachments
settings.sdds
(323 Bytes) Downloaded 217 times
elettra_forum.lte
(65.74 KiB) Downloaded 221 times
elettra_forum.ele
(18.76 KiB) Downloaded 222 times

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: moments_output: how to use with coupling

Post by simone.dimitri » 24 Oct 2014, 09:52

And here attached is my printout.
S.
Attachments
Elettra_moments_output.rtf
(9.27 KiB) Downloaded 295 times

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

Re: moments_output: how to use with coupling

Post by michael_borland » 29 Oct 2014, 12:12

Simone,

I apologize for taking so long to get back to you.

I think the problem is just that you have synchrotron radiation disabled on the CSBEND elements. This is a little tricky. If you set radiation=1 on &moments_output, elegant knows that it needs to include radiation from SBEND, QUAD, and SEXT elements. However, for CSBEND, KQUAD, and KSEXT, it respects the ISR and SYNCH_RAD settings. So you need to change flag_isr and flag_sr to 1 in your .lte file. I'll try to improve the manual on this, since it isn't at all obvious.

The sigma matrix can have negative elements off-diagonal, but all the on-diagonal elements should be positive.

--Michael

simone.dimitri
Posts: 46
Joined: 09 Jun 2008, 01:19

Re: moments_output: how to use with coupling

Post by simone.dimitri » 30 Oct 2014, 15:17

You are right Michael, now it works and I have al positive elements on the diagonal of the sigmamatrix. Many thanks,
S.

.

Post Reply