-
Notifications
You must be signed in to change notification settings - Fork 1
/
ptc-normal.tex
165 lines (131 loc) · 6.47 KB
/
ptc-normal.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
%%\title{PTC\_NORMAL Module (Non-Linear Machine Parameters)}
% Created by: Valery KAPIN, 21-Mar-2006
\chapter{Non-Linear Machine Parameters}
\label{chap:ptc-normal}
The \texttt{PTC\_NORMAL} module (\cite{schmidt2005} and
\cite{damico2004-2}) of \madx is based on \ptc code. This module takes
full advantage of the \ptc Normal Form analysis which is a considerable
upgrade of what was available with the Lie Algebra technique used in
\madeight. It allows to calculate dispersions, chromaticities,
anharmonicities and Hamiltonian terms to very high order. In fact, the
order is only limited by the available computer memory and computing
time.
The number of terms per order increases with some power law. The
internal \madx tables are not adequate to keep such large amounts of
data. On the other hand, only a reduced set of this data is actually
needed by the user. Thus a much easier and flexible solution is to
gather user requirements with a series of \texttt{SELECT\_PTC\_NORMAL}
command. A special \madx table is dynamically built using those
commands and is filled by a subsequent call to \texttt{PTC\_NORMAL}.
Another essential advantage of this table is that it is
structured to facilitate exchange of Normal Form (including
Hamiltonian terms of high order) between \madx modules. The immediate
goal is to use this table to allow non-linear matching inside the
present \madx \hyperref[chap:match]{\texttt{MATCHING}} module.
\textbf{Synopsis:}
\madbox{
PTC\_CREATE\_UNIVERSE; \\
PTC\_CREATE\_LAYOUT, MODEL=integer, METHOD=integer, NST=integer, [EXACT];\\
\ldots\\
SELECT\_PTC\_NORMAL, DX, \ldots , GNFU;\\
\ldots \\
PTC\_NORMAL;\\
WRITE, TABLE=normal\_results, FILE=normal\_results;\\
\ldots \\
PTC\_END;
}
\section{SELECT\_PTC\_NORMAL}
\label{sec:select-ptc-normal}
The \texttt{SELECT\_PTC\_NORMAL} command selects the parameters to be
calculated by a subsequent \texttt{PTC\_NORMAL} command.
\madbox{
xxxxxxxxxxxxxxxxxx\= \kill
SELECT\_PTC\_NORMAL, \>DX=integer, DPX=integer, DY=integer, DPY=integer, \\
\>Q1=0, Q2=0, DQ1=integer, DQ2=integer, \\
\>ANHX=integerarray, ANHY=integerarray, \\
\>GNFU=integer,0,0, HAML=integer,0,0, \\
\>EIGN=integer,integer;
}
The attributes are:
\begin{madlist}
\ttitem{DX, DPX, DY, DPY} the dispersion paramaters specified as
integer numbers specifying their order:
$D_x^{(n)} = \partial^{(n)} x_{co} / \partial \delta_p^{(n)}$,
$D_{px}^{(n)} = \partial^{(n)} px_{co} / \partial \delta_p^{(n)}$,
$D_y^{(n)} = \partial^{(n)} y_{co} / \partial \delta_p^{(n)}$,
$D_{py}^{(n)} = \partial^{(n)} py_{co} / \partial \delta_p^{(n)}$,
where \texttt{co} is abbreviation of "closed orbit".
\ttitem{Q1, Q2} horizontal and vertical tune paramaters are fixed to
order 0: $Q_1^{(0)}$, $Q_2^{(0)}$
\ttitem{DQ1, QD2} the tune derivative parameters specified as
integer numbers specifying their order.
$\partial^{(n)} Q_1 / \partial \delta_p^{(n)}$,
$\partial^{(n)} Q_2 / \partial \delta_{p}^{(n)}$
\ttitem{ANHX, ANHY} the anharmonicities, each defined by three integer
numbers: the order $n_1$ of $\epsilon_1$, the order $n_2$ of
$\epsilon_2$ and the order $n_3$ of $\delta_p$.
$\partial^{(n_1 + n_2 + n_3)} Q_z / (
\partial\epsilon_1^{(n_1)} \partial\epsilon_2^{(n_2)}
\partial\delta_p^{(n_3)})$.
For example, \texttt{ANHX=2,0,0} represents second order
in $\epsilon_1$: $\partial^{(2)} Q_1 / \partial \epsilon_1^{(2)}$.
And \texttt{ANHY=3,1,2} represents $\partial^{(6)} Q_2 / (
\partial\epsilon_1^{(3)} \partial\epsilon_2^{(1)}
\partial\delta_p^{(2)})$.
\ttitem{EIGN} components of the eigenvectors at the end of the structure
can be specified by two integers: the eigenvector number and the
coordinate coded in the list: \{$x, p_x, y, p_y, t, p_t$\}: \\
The pair $n_1$,$n_2$ defines the $n_2$-th component of
the $n_1$-th eigenvector.
\ttitem{GNFU} The Generating Function can be specified by \{$n_1$, $n_2$,
$n_3$\}.
The positive and negative values of $n-1$ define the order of
upright or skew resonances respectively. The integers $n_2$
and $n_3$ are reserved for a future upgrade and must be set to 0. \\
For example \texttt{GNFU=-5,0,0} calculates all Generating Function
terms for skew decapoles. In the output table the cosine, sine and amplitude
coefficients are denoted as "GNFC", "GNFS" and "GNFA" respectively.
\ttitem{HAML} the Hamiltonian terms can be specified by \{$n_1$, $n_2$,
$n_3$\}
The positive and negative values of $n_1$ define the order of
upright or skew resonances, respectively. The integers $n_2$
and $n_3$ are reserved for a future upgrade and must be set to 0. \\
For example, \texttt{HAML=3,0,0} calculates all Hamiltonian terms for
upright sextupoles. In the output table the cosine, sine and amplitude
coefficients are denoted as "HAMC", "HAMS" and "HAMA" respectively.
\end{madlist}
\textbf{Caution:} if more than one order of terms is selected only the lower one is correct
because higher orders contain "cross terms" from the lower ones.
\section{PTC\_NORMAL}
\label{sec:ptc-normal}
The calculation of the parameters specified by the preceding
\texttt{SELECT\_PTC\_NORMAL} commands is initiated by the
\texttt{PTC\_NORMAL} command, which operates on the working beam
line defined in the latest \hyperref[sec:use]{USE} command.
\madbox{
PTC\_NORMAL, \=ICASE=integer, NORMAL=logical, CLOSED\_ORBIT=logical,\\
\>NO=integer, MAPTABLE=logical, DELTAP=double;
}
The attributes are:
\begin{madlist}
\ttitem{ICASE} user-defined dimensionality of the phase-space
(4, 5 or 6). \\ (Default: 4)
\ttitem{NO} the order of the map. \\ (Default: 1)
\ttitem{CLOSED\_ORBIT} a logical switch to turn on the closed orbit
calculation. \\ (Default: false)
\ttitem{DELTAP} relative momentum offset for reference closed
orbit. \\ (Default: 0.0)
\ttitem{MAPTABLE} a logical flag to activate the storage of the
map-table in memory. \\
\texttt{MAPTABLE=true} and \texttt{NO=1} creates the one-turn matrix which
can be used by the next \hyperref[chap:ptc-twiss]{\texttt{PTC\_TWISS}}
command.\\ (Default: false)
\ttitem{NORMAL} a logical flag to activate the calculation of the
Normal Form. \\ (Default: false)
\end{madlist}
\textbf{Example}\\
The simple example is located on the Web-page for the
\href{http://cern.ch/frs/mad-X_examples/ptc_normal}{\texttt{PTC\_NORMAL}
example}.
%\href{mailto:kapin@itep.ru}{ V.Kapin}(ITEP) and
%\href{mailto:Frank.Schmidt@cern.ch}{ F.Schmidt}, March 2006