The PTC_TWISS module of MAD-X [a] is based on the PTC code. It is a supplementary to the TWISS module. The Twiss parameters are calculated in Ripken's style (invented by G. Ripken in 1970 [31] and most accessible in Ref. [b]). These parameters were available in MAD8 using the TWISS3 command. This module is a typical example of the advantages when using PTC and its Normal Form technique (and of course the object-oriented Fortran90 coding): once the rather modest programming has been performed the Twiss calculation will always be automatically correct for all machine conditions like closed orbit, coupling or after a new element has been introduced into the code. In a traditional coding like in MAD8 this depends on reprogramming and modifying the code at various places which is inherently error-prone.
The PTC_TWISS tracks a special representation of the beam in three degrees of
freedom. It works on the coupled lattice functions defined in Ref.[b],
which are essentially the projections of the lattice functions for the
eigen-modes on the three planes. The PTC_TWISS lists the projections of the
ellipses of motion onto the three planes (x, px), (y,
py), (t, pt) expressed them via the
Ripken's parameters bk,j,
ak,j,
gk,j along with the
phase advances mj
in selected positions, where index k=1...3 refers
to the plane (x, y,...), and
the index j=1...3 denotes the eigen-mode. The PTC_TWISS also calculates the
dispersion values D1,...,D4. In the MAD-X
commands and tables, these parameters are denoted as beta11,...,beta33,
alfa11,...,alfa33, gama11,...,gama33, mu1,...,mu3, disp1,...,disp4
,
respectively.
The Ripken parametrization can be transformed into the Edwards-Teng
parametrization (used in twiss proper) using the formulae of
Ref. [d]. The parameters are noted as
betx, bety, alfx, alfy
and the coupling matrix: R11, R12,
R21 and R22. In absence of coupling it holds:
betx=beta11
, bety=beta22
,
alfx=alfa11
and alfy=alfa22
.
PTC_TWISS can also compute the deltap/p-dependency of the Twiss
parameters. The column names beta11p,...,beta33p,
alfa11p...,alfa33p, gama11p,...,gama33p
denote the derivatives
of the optics parameters w.r.t. deltap/p. If one
is interested in evaluating deltap/p-dependency of the Twiss
parameters, one must ensure that the order (no) of the map is set to 2
at least.. The derivatives of the dispersion w.r.t. deltap/p
have column names: disp1p,...,disp4p
. Second and third
order derivatives have respective column names:
disp1p2,...,disp4p2
for the second order, and
disp1p3,...,disp4p3
for the third order.
In addition, we compute momentum compaction factor ac up to 1st order (for icase=5) or 3rd order (for icase=56). The values appear in the header of the ptc_twiss output file (zero means the value has not been computed). This feature is currently only available in the development version.
For clarification: in the 4-D case, there is the
following correspondence between MAD-X and the Ripken's notations: beta11
®
bxI, beta12
®
bxII, beta21
®
byI, beta22
®
byII,
while in the uncoupled 4-D case beta11
is the same as
the classical bx (betx
)
and beta22
is by
(bety
), while beta12
and beta21
are zero. When there is coupling all betaNN
are non-zero and
beta11
, beta22
are distinctively different from bx
, by, respectively.
PTC_TWISS also tracks the eigenvectors and prints them to Twiss table according to the SELECT command (flag=ptc_twiss). Either all 36 components or particular components of the eigenvectors can be selected with eign or eignij, respectively (j = number of eigenvector, i = number of coordinate {x, px, y, py, t, pt}).
For ring lattices, PTC_TWISS computes momentum compaction, transition energy, as well as other one-turn characteristics such as the tunes (Q1,Q2 and if icase=6 with cavity Qs) and chromaticities (for no>=2).
PTC_CREATE_UNIVERSE;
PTC_CREATE_LAYOUT, model=integer,method=integer,
nst=integer, [exact];
..............................
SELECT, flag=ptc_twiss, clear;
SELECT, flag=ptc_twiss, column=name, s,
beta11,...,beta33,alfa11,..., alfa33,gama11,...,gama33,
beta11p,...,beta33p,alfa11p,...,alfa33p,gama11p,...,gama33p,
mu1,...,mu3,
disp1,...,disp4,
disp1p,...,disp4p,
disp1p2,...,disp4p2,
disp1p3,...,disp4p3,
[eign], eign11, ...,eign16,...,eign61,...,eign66;
..............................
PTC_TWISS;
..............................
PTC_END;
Option | Meaning | Default Value | Value Type | |
---|---|---|---|---|
ICASE | the user-defined dimensionality of the phase-space (4, 5 or 6). Note that the value is internally set to 56 when attempting to set icase=6 with no cavity. | 4 | integer | |
NO | the order of the map, which is often supplied as 1 but must be at least set to 2 to retrieve chromaticities for instance. For evaluating the Twiss parameters derivatives w.r.t. deltap/p, one must pass order 2 at least. | 1 | integer | |
DELTAP |
relative momentum offset for reference closed orbit. |
0.0 | double | |
CLOSED_ORBIT | the switch to turn on the closed orbit calculation (periodical solution ONLY). | .FALSE. | logical | |
DELTAP_DEPENDENCY | the switch to turn on computation of the Twiss and dispersion derivatives w.r.t. deltap/p. Derivation formula assume that icase=5, so that deltap/p is supplied as a parameter. | .FALSE. | logical | |
SLICE_MAGNETS | the switch to turn on the evaluation of Twiss parameters at each thin slice inside successive magnets, instead of at the middle of each magnet. Slices are located at the so-called 'integration nodes' determined by the number of steps (nst) selected when creating the PTC layout. Note that extremities and fringes are skipped, whereas only the inner slices are kept. | .FALSE. | logical | |
CENTER_MAGNETS | the switch to turn on the evaluation of Twiss parameters at the middle of each magnet. This relies on internal slicing and 'integration nodes' as determined by the number of steps (nst) selected when creating the PTC layout. This number is assumed to be even otherwise the program issues a warning. | .FALSE. | logical | |
FILE | omitted | no output written to a file | ||
present | the name of the file for printing the PTC_TWISS output. | ptc_twiss | string | |
TABLE | omitted | no output written to a internal table | ||
present | the name of the internal PTC_TWISS table | ptc_twiss | string | |
SUMMARY_FILE | omitted | no output written to a file | ||
present | the name of the file for printing the PTC_TWISS_SUMMARY table output. | ptc_twiss_summary | string | |
SUMMARY_TABLE | omitted | no output written to a internal table | ||
present | the name of the internal PTC_TWISS_SUMMARY table | ptc_twiss_summary | string | |
RANGE | specifies a segment of beam-line for the PTC_TWISS calculation |
#s/#e | string | |
INITIAL_MATRIX_TABLE | Reading the transfer matrix from the map-table in memory (preceding PTC_NORMAL command needed). | .FALSE. | logical | |
INITIAL_MATRIX_MANUAL | Using the input variables RE11,...,RE66 (see next entry) as the transfer matrix. | .FALSE. | logical | |
INITIAL_MAP_MANUAL | Using the input map stored beforehand in file fort.18 (e.g. by some initial run of PTC_NORMAL). | .FALSE. | logical | |
RE11,..., RE66 | Values of the 6x6 transfer matrix. | unit matrix | double | |
BETA0 | The name of the BETA0-block, which contains the Twiss parameters for the input. When icase=6, this information must be complemented by supplying a value for 'betz' on the ptc_twiss command line. | beta0 | string | |
betx, alfx, mux, bety, alfy, muy, dx,dpx,dy, dpy | Twiss and dispersion parameters bx,y, ax,y, gx,y, Dx, Dpx, Dy, Dpy (Edwards and Teng). | 0 | double | |
x, px, y, py, t, pt | The canonical coordinates of the initial orbit. | 0 | double |
|