R-matrix question

Moderators: cyao, michael_borland

Post Reply
jtobin
Posts: 47
Joined: 23 Jul 2008, 15:00

R-matrix question

Post by jtobin » 28 Jul 2010, 13:47

Hello all,
Imagine i have beamline ..say Q1 Q2 Q3.... Qn. where n is the number of quads. Now, I use elegant to calculate the overall R-matrix (.fin).
Say, if i insert a skew quad somewhere along the beamline.. The lattice becomes Q1 Q2..... SK... Qn..
a] How to compute R-matrix for only that part of the beamline say beginning from...SK.. QjQk.. Qn..using a script and without changing the lattice?
b] How to compute the R-matrix for a single element say the skew quad alone?
Thanks.
regards,
Charles

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

Re: R-matrix question

Post by michael_borland » 28 Jul 2010, 13:51

Charles,

For (1), use matrix_output and set the start_from field to "SK". Set the SDDS_output field to the name of a file to hold the matrix output.

For (2), use matrix_output and set individual_matrices=1. Alternatively, you can use the printout field to get a printout of all the matrices, which by default contains the individual matrices.

--Michael

jtobin
Posts: 47
Joined: 23 Jul 2008, 15:00

Re: R-matrix question

Post by jtobin » 28 Jul 2010, 14:09

That reply was much faster than my computer ! Thanks
when you set individual_matrices = 1, the mpr file has after every element a C row followed by the R matrix..What is this C row supposed to mean?

Charles

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

Re: R-matrix question

Post by michael_borland » 28 Jul 2010, 14:53

Charles,

The C row is the centroid vector. If you have, for example, a MALIGN element or a dipole with a strength error, this effect is incorporated in the C component.
Normally, however, only the 5th component is nonzero, since that represents longitudinal coordinate (the distance traveled).

--Michael

ilkyoung.shin
Posts: 8
Joined: 09 Nov 2009, 16:18

Re: R-matrix question

Post by ilkyoung.shin » 30 Nov 2010, 11:52

Hello,

What are T11, T12, T13 ... following C row and R matrix in .mpr file?

Ilkyoung

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

Re: R-matrix question

Post by michael_borland » 30 Nov 2010, 17:39

Ilkyoung,

You can get the Tijk elements from matrix_output as follows:

&matrix_output
printout = %s.mpr,
printout_order = 2,
&end

if you want text output, or

&matrix_output
SDDS_output = %s.mat,
SDDS_output_order = 2
&end

if you want SDDS output, or

&matrix_output
printout = %s.mpr,
printout_order = 2,
SDDS_output = %s.mat,
SDDS_output_order = 2
&end

if you want both SDDS and text output.

--Michael

Post Reply