1 | <?xml version="1.0" encoding="ISO-8859-1" ?> |
---|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
---|
3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
---|
4 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
5 | <head> |
---|
6 | <meta name="author" content="Valery Kapin & Frank Schmidt" /> |
---|
7 | <meta name="description" content="MADX PTC_TWISS Module" /> |
---|
8 | <meta name="keywords" content="MADX MAD-X PTC PTC_TWISS TWISS Twiss-parameters Ripken TWISS3" /> |
---|
9 | <link rel="stylesheet" type="text/css" href="madxdoc.css" /> |
---|
10 | <title>MAD-X PTC_TWISS Module</title> |
---|
11 | <!-- Created by: Valery KAPIN, 21-Mar-2006 --> |
---|
12 | <!-- Changed by: Frank Schmidt 04-Apr-2006 --> |
---|
13 | <style> |
---|
14 | <!-- |
---|
15 | div.Section1 |
---|
16 | {page:Section1;} |
---|
17 | span.SpellE |
---|
18 | {} |
---|
19 | --> |
---|
20 | </style> |
---|
21 | </head> |
---|
22 | |
---|
23 | <body bgcolor="#ffffff"> |
---|
24 | |
---|
25 | <div style="text-align:center;"> |
---|
26 | <center> |
---|
27 | EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH |
---|
28 | <img SRC="http://cern.ch/madx/icons/mx7_25.gif" align="right" alt="MAD-X Logo" /> |
---|
29 | <h1>PTC_TWISS Module <br> |
---|
30 | (Ripken Optics Parameters)</h1> |
---|
31 | </center> |
---|
32 | </div> |
---|
33 | |
---|
34 | <div class="madxdocContent"> |
---|
35 | |
---|
36 | <div> |
---|
37 | <p align="left"> |
---|
38 | The <b>PTC_TWISS module</b> of MAD-X [<a href="#F._Schmidt">a</a>] is based on |
---|
39 | the PTC code. It |
---|
40 | 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 |
---|
41 | Ref.<font face="Times New Roman"> [<a href="#G. Ripken">b</a>]</font>). |
---|
42 | These parameters were available in MAD8 using the TWISS3 command. This module is |
---|
43 | a typical example of the advantages when using PTC and its Normal Form technique |
---|
44 | (and of course the object-oriented Fortran90 coding): once the rather modest |
---|
45 | programming has been performed the Twiss calculation will always be |
---|
46 | automatically correct for all machine conditions like closed orbit, coupling or |
---|
47 | after a new element has been introduced into the code. In a traditional coding |
---|
48 | like in MAD8 this depends on reprogramming and modifying the code at various |
---|
49 | places which is inherently error-prone.</p> |
---|
50 | <p align="left"> |
---|
51 | The PTC_TWISS tracks a special representation of the beam in three degrees of |
---|
52 | freedom. It works on the coupled lattice functions defined in Ref.<font face="Times New Roman">[<a href="#G. Ripken">b</a>]</font>, |
---|
53 | which are essentially the projections of the lattice functions for the |
---|
54 | eigen-modes on the three planes. The PTC_TWISS lists the projections of the |
---|
55 | ellipses of motion onto the three planes (<i>x</i>, <i>p<sub>x</sub></i>), (<i>y</i>, |
---|
56 | <i>p<sub>y</sub></i>), (<i>t</i>, <i>p<sub>t</sub></i>) expressed them via the |
---|
57 | Ripken's parameters <i><font face="Symbol">b</font><sub>k</sub></i><sub>,<i>j</i></sub>, |
---|
58 | <i><font face="Symbol">a</font><sub>k</sub></i><sub>,<i>j, </i></sub><i> |
---|
59 | <font face="Symbol">g</font><sub>k</sub></i><sub>,<i>j</i></sub> along with the |
---|
60 | phase advances <i><font face="Symbol">m</font></i><sub><i>j</i></sub> |
---|
61 | in selected positions, where index <font color="#FF0000"> <i>k</i>=1...3</font> refers |
---|
62 | <font color="#FF0000">to the plane (<i>x</i>, <i>y</i>,...)</font>, and |
---|
63 | the index <font color="#FF0000"> <i>j</i>=1...3 denotes the eigen-mode</font>. The PTC_TWISS also calculates the |
---|
64 | dispersion values <i>D</i><sub>1</sub>,...,<i>D</i><sub>4</sub>. In the MAD-X |
---|
65 | commands and tables, these parameters are denoted as <code>beta11,...,beta33, |
---|
66 | alfa11,...,alfa33, gama11,...,gama33, mu1,...,mu3, disp1,...,disp4</code>, |
---|
67 | respectively.</p> |
---|
68 | |
---|
69 | <p>The Ripken parametrization can be transformed into the Edwards-Teng |
---|
70 | parametrization (used in twiss proper) using the formulae of |
---|
71 | Ref.<font face="Times New Roman"> [<a |
---|
72 | href="#V.A. Lebedev">d</a>]</font>. The parameters are noted as |
---|
73 | <code>betx, bety, alfx, alfy</code> and the coupling matrix: R11, R12, |
---|
74 | R21 and R22. In absence of coupling it holds: |
---|
75 | <code>betx=beta11</code>, <code>bety=beta22</code>, |
---|
76 | <code>alfx=alfa11</code> and <code>alfy=alfa22</code>.</p> |
---|
77 | |
---|
78 | <p>PTC_TWISS can also compute the deltap/p-dependency of the Twiss |
---|
79 | parameters. The column names <code>beta11p,...,beta33p, |
---|
80 | alfa11p...,alfa33p, gama11p,...,gama33p</code> denote the derivatives |
---|
81 | of the optics parameters w.r.t. deltap/p. <font color="#FF0000">If one |
---|
82 | is interested in evaluating deltap/p-dependency of the Twiss |
---|
83 | parameters, one must ensure that the order (no) of the map is set to 2 |
---|
84 | at least.</font>. The derivatives of the dispersion w.r.t. deltap/p |
---|
85 | have column names: <code>disp1p,...,disp4p</code>. Second and third |
---|
86 | order derivatives have respective column names: |
---|
87 | <code>disp1p2,...,disp4p2</code> for the second order, and |
---|
88 | <code>disp1p3,...,disp4p3</code> for the third order.</p> |
---|
89 | |
---|
90 | <p> |
---|
91 | In addition, we compute momentum compaction factor <font |
---|
92 | face="Symbol">a</font><sub>c</sub> up to 1st order (for icase=5) or |
---|
93 | 3rd order (for icase=56). The values appear in the header of the |
---|
94 | ptc_twiss output file (zero means the value has not been |
---|
95 | computed). This feature is currently only available in the development |
---|
96 | version.</p> |
---|
97 | <p align="left"> |
---|
98 | For clarification: <font color="#FF0000">in the 4-D case, there is the |
---|
99 | following correspondence between MAD-X and the Ripken's notations: <code>beta11</code><font face="Symbol"><code><font face="Symbol">®</font></code></font><i><font face="Symbol">b</font></i><sub><i>x</i>I</sub>, <code>beta12</code><font face="Symbol"><code><font face="Symbol">®</font></code></font><i><font face="Symbol">b</font></i><sub><i>x</i>II</sub>, <code>beta21</code><font face="Symbol"><code><font face="Symbol">®</font></code></font><i><font face="Symbol">b</font></i><sub><i>y</i>I</sub>, <code>beta22</code><font face="Symbol"><code><font face="Symbol">®</font></code></font><i><font face="Symbol">b</font></i><sub><i>y</i>II</sub>, </font> |
---|
100 | while in the uncoupled 4-D case <code>beta11</code> is the same as |
---|
101 | the classical <i><font face="Symbol">b</font><sub>x </sub></i>(<code>betx</code>) |
---|
102 | and <code>beta22 </code>is <i><font face="Symbol">b</font><sub>y </sub></i> |
---|
103 | (<code>bety</code>), while <code>beta12 </code>and <code>beta21 </code> |
---|
104 | are zero. When there is coupling all <code>betaNN </code>are non-zero and <code> |
---|
105 | beta11</code> , <code>beta22 </code>are distinctively different from <i><font face="Symbol">b</font><sub>x </sub></i> |
---|
106 | , <i><font face="Symbol">b</font><sub>y</sub></i>, respectively.</p> |
---|
107 | <p align="left"> |
---|
108 | PTC_TWISS also tracks the eigenvectors and prints them to Twiss table according to the SELECT command |
---|
109 | (flag=ptc_twiss). Either all 36 components or |
---|
110 | particular components of the eigenvectors can be selected with |
---|
111 | <font face="Courier New">eign</font> or <font face="Courier New">eign<i>ij</i></font>, |
---|
112 | respectively (<font color="#FF0000"><i>j</i></font> = number of eigenvector, |
---|
113 | <font color="#FF0000"><i>i</i></font> = number of |
---|
114 | coordinate {<i>x</i>, <i> |
---|
115 | p<sub>x</sub></i>, <i>y</i>, <i>p<sub>y</sub></i>, <i>t</i>,<i> |
---|
116 | p<sub>t</sub></i>}).</p> |
---|
117 | |
---|
118 | <p> |
---|
119 | 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). |
---|
120 | </p> |
---|
121 | </div> |
---|
122 | |
---|
123 | <hr /> |
---|
124 | |
---|
125 | <div> |
---|
126 | <dl> |
---|
127 | <dt>Synopsis</dt> |
---|
128 | <dd><i><code>PTC_CREATE_UNIVERSE;</code></i></dd> |
---|
129 | <dd><i><code>PTC_CREATE_LAYOUT, model=integer,method=integer, |
---|
130 | nst=integer, [exact];</code></i></dd> |
---|
131 | <dd><code>..............................<br> |
---|
132 | SELECT, flag=ptc_twiss, clear;</code></dd> |
---|
133 | <dd><code>SELECT, flag=ptc_twiss, column=name, s, |
---|
134 | <br> |
---|
135 | beta11,...,beta33,alfa11,..., alfa33,gama11,...,gama33, |
---|
136 | <br> |
---|
137 | beta11p,...,beta33p,alfa11p,...,alfa33p,gama11p,...,gama33p, |
---|
138 | <br> |
---|
139 | mu1,...,mu3, |
---|
140 | <br> |
---|
141 | disp1,...,disp4, |
---|
142 | <br> |
---|
143 | disp1p,...,disp4p, |
---|
144 | <br> |
---|
145 | disp1p2,...,disp4p2, |
---|
146 | <br> |
---|
147 | disp1p3,...,disp4p3, |
---|
148 | </code></dd> |
---|
149 | <dd><code>[<font color="#FF0000">eign], eign11, ...,eign16,...,eign61,...,eign66;</font></code></dd> |
---|
150 | <dd><code>..............................</code></dd> |
---|
151 | <dd><code>PTC_TWISS;</code></dd> |
---|
152 | <dd><code>..............................</code></dd> |
---|
153 | <dd><i><code>PTC_END; </code></i></dd> |
---|
154 | </dl> |
---|
155 | </div> |
---|
156 | |
---|
157 | <div> |
---|
158 | <dl> |
---|
159 | <dt>Commands</dt> |
---|
160 | <dd> |
---|
161 | <div> |
---|
162 | <dl> |
---|
163 | <dt class="command"><var><strong><b>PTC_TWISS, <br> |
---|
164 | icase=</b>integer, </strong></var><strong> |
---|
165 | <var class="option">deltap</var>=double, <b>closed_orbit</b>, <b>slice_magnets</b>, <b><br> |
---|
166 | range=</b>string<b>, file[=</b>string<b>], table[=</b>string<b>],<br> |
---|
167 | initial_matrix_table, initial_matrix_manual, initial_map_manual, beta0=</b>string<b>, |
---|
168 | <br> |
---|
169 | betx=</b>double,<b> alfx=</b>double<b>, mux=</b>double<b>, |
---|
170 | <br> |
---|
171 | bety=</b>double,<b> alfy=</b>double<b>, muy=</b>double<b>, |
---|
172 | <br> |
---|
173 | dx=</b>double,<b> dpx=</b>double,<b> dy=</b>double,<b> dpy=</b>double,<b><br> |
---|
174 | </b><var class="option">x</var>=double, <var class="option">px</var>=double, |
---|
175 | <var class="option">y</var>=double, <var class="option">py</var>=double, |
---|
176 | <var class="option">t</var>=double, <var class="option">pt</var>=double,<br> |
---|
177 | <b>re11</b>=double, <b>re12</b>=double, ... ,<b>re16</b>=double,<br> |
---|
178 | |
---|
179 | ................................................................<br> |
---|
180 | <b>re61</b>=double, <b>re62</b>=double, ... ,<b>re66</b>=double; |
---|
181 | </strong><var><strong> </strong></var></dt> |
---|
182 | <dd> |
---|
183 | <div> |
---|
184 | <dl> |
---|
185 | <dt>Description</dt> |
---|
186 | <dd> |
---|
187 | <!-- <strong>TRACK, DELTAP= double, ONEPASS, DUMP, ONETABLE, FILE= string;</strong> (MADX version 1)<br /> |
---|
188 | <strong>TRACK, DELTAP= double, ONEPASS, DAMP, QUANTUM, DUMP, ONETABLE, FILE= string;</strong> (MADX version 2)<br /> --> |
---|
189 | The <var class="command">PTC_TWISS </var>command causes |
---|
190 | computation of the Twiss parameters in |
---|
191 | the Ripken's style. It operates on the working beam line defined in the latest |
---|
192 | <a href="../control/general.html#use"> |
---|
193 | USE</a> command. Several options can be specified, the most |
---|
194 | important being <var class="option">icase, deltap</var>, |
---|
195 | <var class="option">closed_orbit, slice_magnets,</var> <var class="option">no, |
---|
196 | </var>and |
---|
197 | <var class="option">file, table</var>. (see the table below). |
---|
198 | Other options should be specified for particular tasks. |
---|
199 | Applications for the <var class="command">PTC_TWISS </var> |
---|
200 | command are similar to the <var class="command"> |
---|
201 | <a href="../twiss/twiss.html">TWISS</a></var>-command. |
---|
202 | The PTC_TWISS can be applied to two basic tasks. It can calculate |
---|
203 | either a <a href="#Periodical_Solution">periodical solution</a> |
---|
204 | or a <a href="#Initial_Conditions">solution with initial |
---|
205 | conditions</a>.</dd> |
---|
206 | <dt>Options</dt> |
---|
207 | <dd> |
---|
208 | <table cellspacing="0" cellpadding="3" border="1" id="table1" width="789"> |
---|
209 | <tr> |
---|
210 | <th width="143">Option</th> |
---|
211 | <th colspan="2">Meaning</th> |
---|
212 | <th width="84">Default Value</th> |
---|
213 | <th width="57">Value Type</th> |
---|
214 | </tr> |
---|
215 | <tr> |
---|
216 | <td width="143"><a name="ICASE">ICASE</a></td> |
---|
217 | <td colspan="2"><span lang="EN-US">the user-defined dimensionality |
---|
218 | 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.</span></td> |
---|
219 | <td width="84">4</td> |
---|
220 | <td width="57">integer</td> |
---|
221 | </tr> |
---|
222 | <tr> |
---|
223 | <td width="143"><a name="NO">NO</a></td> |
---|
224 | <td colspan="2"><span lang="EN-US">the order of the map, which is often |
---|
225 | supplied as 1 but must be at least set to 2 to retrieve chromaticities |
---|
226 | for instance. |
---|
227 | For evaluating the Twiss parameters derivatives w.r.t. deltap/p, one |
---|
228 | must pass order 2 at least. |
---|
229 | </span></td> |
---|
230 | <td width="84">1</td> |
---|
231 | <td width="57">integer</td> |
---|
232 | </tr> |
---|
233 | <tr> |
---|
234 | <td width="143">DELTAP</td> |
---|
235 | <td colspan="2"> |
---|
236 | <p align="left">relative momentum offset for reference closed orbit.</td> |
---|
237 | <td width="84">0.0</td> |
---|
238 | <td width="57">double</td> |
---|
239 | </tr> |
---|
240 | <tr> |
---|
241 | <td width="143">CLOSED_ORBIT</td> |
---|
242 | <td colspan="2"><span lang="EN-US">the switch to turn on |
---|
243 | the closed orbit calculation |
---|
244 | (</span><a href="#Periodical_Solution">periodical solution</a> |
---|
245 | ONLY)<span lang="EN-US">. </span></td> |
---|
246 | <td width="84">.FALSE.</td> |
---|
247 | <td width="57">logical</td> |
---|
248 | </tr> |
---|
249 | <tr> |
---|
250 | <td width="143">DELTAP_DEPENDENCY</td> |
---|
251 | <td colspan="2"><span lang="EN-US">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.</span></td> |
---|
252 | <td width="84">.FALSE.</td> |
---|
253 | <td width="57">logical</td> |
---|
254 | </tr> |
---|
255 | <tr> |
---|
256 | <td width="143">SLICE_MAGNETS</td> |
---|
257 | <td colspan="2"><span lang="EN-US">the switch to turn on |
---|
258 | the evaluation of Twiss parameters at each thin slice inside |
---|
259 | successive magnets, instead of at the middle of each magnet. |
---|
260 | Slices are located at the so-called |
---|
261 | 'integration nodes' determined by the number of steps (nst) selected |
---|
262 | when creating the PTC layout. Note that extremities and fringes are skipped, |
---|
263 | whereas only the inner slices are kept.</span> |
---|
264 | </td> |
---|
265 | <td width="84">.FALSE.</td> |
---|
266 | <td width="57">logical</td> |
---|
267 | </tr> |
---|
268 | <tr> |
---|
269 | <td width="143">CENTER_MAGNETS</td> |
---|
270 | <td colspan="2"><span lang="EN-US">the switch to turn on |
---|
271 | the evaluation of Twiss parameters at the middle of each magnet. |
---|
272 | This relies on internal slicing and |
---|
273 | 'integration nodes' as determined by the number of steps (nst) selected |
---|
274 | when creating the PTC layout. This number is assumed to be even otherwise the program issues a warning. </span> |
---|
275 | </td> |
---|
276 | <td width="84">.FALSE.</td> |
---|
277 | <td width="57">logical</td> |
---|
278 | </tr> |
---|
279 | |
---|
280 | <tr> |
---|
281 | <td rowspan="2" width="143">FILE</td> |
---|
282 | <td width="79">omitted </td> |
---|
283 | <td width="279">no output written to a file</td> |
---|
284 | <td width="84"> </td> |
---|
285 | <td width="57"> </td> |
---|
286 | </tr> |
---|
287 | <tr> |
---|
288 | <td width="79">present</td> |
---|
289 | <td width="279">the name of the file for printing |
---|
290 | the PTC_TWISS |
---|
291 | output.</td> |
---|
292 | <td width="84">ptc_twiss</td> |
---|
293 | <td width="57">string</td> |
---|
294 | </tr> |
---|
295 | <tr> |
---|
296 | <td width="143" rowspan="2">TABLE</td> |
---|
297 | <td>omitted </td> |
---|
298 | <td>no output written to a internal table</td> |
---|
299 | <td width="84"> </td> |
---|
300 | <td width="57"> </td> |
---|
301 | </tr> |
---|
302 | <tr> |
---|
303 | <td>present</td> |
---|
304 | <td>the name of the internal PTC_TWISS table </td> |
---|
305 | <td width="84">ptc_twiss</td> |
---|
306 | <td width="57">string</td> |
---|
307 | </tr> |
---|
308 | <tr> |
---|
309 | <td rowspan="2" width="143">SUMMARY_FILE</td> |
---|
310 | <td width="79">omitted </td> |
---|
311 | <td width="279">no output written to a file</td> |
---|
312 | <td width="84"> </td> |
---|
313 | <td width="57"> </td> |
---|
314 | </tr> |
---|
315 | <tr> |
---|
316 | <td width="79">present</td> |
---|
317 | <td width="279">the name of the file for printing |
---|
318 | the PTC_TWISS_SUMMARY table |
---|
319 | output.</td> |
---|
320 | <td width="84">ptc_twiss_summary</td> |
---|
321 | <td width="57">string</td> |
---|
322 | </tr> |
---|
323 | <tr> |
---|
324 | <td width="143" rowspan="2">SUMMARY_TABLE</td> |
---|
325 | <td>omitted </td> |
---|
326 | <td>no output written to a internal table</td> |
---|
327 | <td width="84"> </td> |
---|
328 | <td width="57"> </td> |
---|
329 | </tr> |
---|
330 | <tr> |
---|
331 | <td>present</td> |
---|
332 | <td>the name of the internal PTC_TWISS_SUMMARY table </td> |
---|
333 | <td width="84">ptc_twiss_summary</td> |
---|
334 | <td width="57">string</td> |
---|
335 | </tr> |
---|
336 | <tr> |
---|
337 | <td width="143"> |
---|
338 | <a href="../Introduction/ranges.html#range"> |
---|
339 | RANGE</a></td> |
---|
340 | <td colspan="2">specifies a segment of beam-line for <br> |
---|
341 | the PTC_TWISS calculation</td> |
---|
342 | <td width="84">#s/#e</td> |
---|
343 | <td width="57">string</td> |
---|
344 | </tr> |
---|
345 | <tr> |
---|
346 | <td width="143"> |
---|
347 | INITIAL_MATRIX_TABLE</td> |
---|
348 | <td colspan="2"><span lang="EN-US">Reading |
---|
349 | the transfer matrix from the |
---|
350 | map-table in memory (preceding </span> <var class="command"> |
---|
351 | <a href="../ptc_normal/ptc_normal.html">PTC_NORMAL</a></var> command |
---|
352 | needed).</td> |
---|
353 | <td width="84">.FALSE.</td> |
---|
354 | <td width="57">logical</td> |
---|
355 | </tr> |
---|
356 | <tr> |
---|
357 | <td width="143"> |
---|
358 | INITIAL_MATRIX_MANUAL</td> |
---|
359 | <td colspan="2"><span lang="EN-US">Using the input |
---|
360 | variables RE11,...,RE66 (see next entry) as the transfer matrix. </span></td> |
---|
361 | <td width="84">.FALSE.</td> |
---|
362 | <td width="57">logical</td> |
---|
363 | </tr> |
---|
364 | <tr> |
---|
365 | <td width="143"> |
---|
366 | INITIAL_MAP_MANUAL</td> |
---|
367 | <td colspan="2"><span lang="EN-US">Using the input map stored beforehand |
---|
368 | in file fort.18 (e.g. by some initial run of |
---|
369 | <a href="../ptc_normal/ptc_normal.html">PTC_NORMAL</a>). |
---|
370 | </span></td> |
---|
371 | <td width="84">.FALSE.</td> |
---|
372 | <td width="57">logical</td> |
---|
373 | </tr> |
---|
374 | <tr> |
---|
375 | <td width="143"> |
---|
376 | RE11,..., RE66</td> |
---|
377 | <td colspan="2">Values of the 6x6 transfer matrix. </td> |
---|
378 | <td width="84">unit matrix</td> |
---|
379 | <td width="57">double</td> |
---|
380 | </tr> |
---|
381 | <tr> |
---|
382 | <td width="143"> |
---|
383 | BETA0</td> |
---|
384 | <td colspan="2"><span lang="EN-US">The name of the </span> |
---|
385 | <var class="command">BETA0</var><span lang="EN-US">-block, |
---|
386 | which contains the Twiss parameters for the |
---|
387 | input. When icase=6, this information must be complemented |
---|
388 | by supplying a value for 'betz' on the ptc_twiss command line.</span></td> |
---|
389 | <td width="84">beta0</td> |
---|
390 | <td width="57">string</td> |
---|
391 | </tr> |
---|
392 | <tr> |
---|
393 | <td width="143"> |
---|
394 | betx, alfx, mux, bety, alfy, muy, |
---|
395 | dx,dpx,dy, dpy</td> |
---|
396 | <td colspan="2"><span lang="EN-US"> |
---|
397 | <a href="../twiss/twiss.html">Twiss and dispersion parameters</a> </span><i> |
---|
398 | <font face="Symbol">b</font><sub>x,y</sub></i>, |
---|
399 | <i><font face="Symbol">a</font><sub>x</sub></i><sub>,<i>y, |
---|
400 | </i></sub><i><font face="Symbol">g</font><sub>x,y, |
---|
401 | </sub></i><span lang="EN-US"><i>D<sub>x</sub></i>, |
---|
402 | <i>D<sub>px</sub></i>, <i>D<sub>y</sub></i>, <i> |
---|
403 | D<sub>py</sub></i> </span> |
---|
404 | <a |
---|
405 | href="../Introduction/bibliography.html#edwards">(Edwards and Teng)</a><span lang="EN-US">.</span></td> |
---|
406 | <td width="84">0</td> |
---|
407 | <td width="57">double</td> |
---|
408 | </tr> |
---|
409 | <tr> |
---|
410 | <td width="143"> |
---|
411 | x, px, y, py, t, pt</td> |
---|
412 | <td colspan="2">The |
---|
413 | <a href="../Introduction/tables.html#canon"> |
---|
414 | <strong>canonical</strong></a> coordinates of |
---|
415 | the initial orbit.</td> |
---|
416 | <td width="84">0</td> |
---|
417 | <td width="57">double</td> |
---|
418 | </tr> |
---|
419 | </table></dd> |
---|
420 | <dt>Remarks</dt> |
---|
421 | <dd><b>ICASE</b>: <span lang="EN-US">It can be |
---|
422 | internally corrected by the code. For example, if RF cavity has the voltage set to zero and |
---|
423 | for <a href="#ICASE">icase</a>=6, the code sets |
---|
424 | <a href="#ICASE">icase</a>=4.<br> |
---|
425 | </span></dd> |
---|
426 | </dl></div></dd> |
---|
427 | </dl></div> |
---|
428 | </dd> |
---|
429 | <dt><a name="Periodical_Solution">Periodical Solution</a></dt> |
---|
430 | <dd> |
---|
431 | <div> |
---|
432 | <dl> |
---|
433 | <dt class="command"><var><strong><b>PTC_TWISS, <br> |
---|
434 | icase=</b>integer, </strong></var><strong> |
---|
435 | <var class="option">deltap</var>=double, <b>closed_orbit</b>, <b><br> |
---|
436 | range=</b>string<b>, file[=</b>string<b>], table[=</b>string<b>];</b></strong></dt> |
---|
437 | <dd> |
---|
438 | <div> |
---|
439 | <dl> |
---|
440 | <dt>Description</dt> |
---|
441 | <dd> |
---|
442 | <!-- <strong>TRACK, DELTAP= double, ONEPASS, DUMP, ONETABLE, FILE= string;</strong> (MADX version 1)<br /> |
---|
443 | <strong>TRACK, DELTAP= double, ONEPASS, DAMP, QUANTUM, DUMP, ONETABLE, FILE= string;</strong> (MADX version 2)<br /> --> |
---|
444 | This is the simplest form of the <var class="command">PTC_TWISS</var> |
---|
445 | command, which computes the periodic solution for a specified |
---|
446 | beam line. It may accept all basic options described in |
---|
447 | the above table.</dd> |
---|
448 | </dl></div></dd> |
---|
449 | </dl></div> |
---|
450 | </dd> |
---|
451 | |
---|
452 | <dt><a name="Slicing_Magnets">Evaluation of Twiss parameters inside magnets</a></dt> |
---|
453 | <dd> |
---|
454 | <div> |
---|
455 | <dl> |
---|
456 | <dt class="command"><var><strong><b>PTC_TWISS, <br> |
---|
457 | icase=</b>integer, </strong></var><strong> |
---|
458 | <var class="option">deltap</var>=double, <b>closed_orbit</b>, <b> slice_magnets</b> <b><br> |
---|
459 | range=</b>string<b>, file[=</b>string<b>], table[=</b>string<b>];</b></strong></dt> |
---|
460 | <dd> |
---|
461 | <div> |
---|
462 | <dl> |
---|
463 | <dt>Description</dt> |
---|
464 | <dd> |
---|
465 | <!-- <strong>TRACK, DELTAP= double, ONEPASS, DUMP, ONETABLE, FILE= string;</strong> (MADX version 1)<br /> |
---|
466 | <strong>TRACK, DELTAP= double, ONEPASS, DAMP, QUANTUM, DUMP, ONETABLE, FILE= string;</strong> (MADX version 2)<br /> --> |
---|
467 | This computes the periodic solution for a specified |
---|
468 | beam line and evaluates the Twiss parameters at each thin-slice |
---|
469 | (a.k.a "integration-node") inside magnets. The number of such integration-nodes |
---|
470 | is given by the number of steps (nst) selected when creating the PTC layout. |
---|
471 | All other basic options described in the above table may be selected |
---|
472 | .</dd> |
---|
473 | |
---|
474 | <dt>Example</dt> |
---|
475 | <dd>An example is found in the |
---|
476 | <a href="http://isscvs.cern.ch/cgi-bin/viewcvs-all.cgi/madX-examples/REF/ptc_twiss/SliceMagnets/?root=madx-examples"> |
---|
477 | <var class="command">PTC_TWISS</var> Examples'</a> repository. |
---|
478 | .</dd> |
---|
479 | |
---|
480 | </dl></div></dd> |
---|
481 | </dl></div> |
---|
482 | </dd> |
---|
483 | |
---|
484 | |
---|
485 | |
---|
486 | |
---|
487 | <dt>Solution with <a name="Initial_Conditions">Initial Conditions</a></dt> |
---|
488 | <dd> |
---|
489 | <div> |
---|
490 | <dl> |
---|
491 | <dt class="command"><b>Code Logic:</b><strong><b> </b></strong></dt> |
---|
492 | <dd> </dd> |
---|
493 | <dd> |
---|
494 | <table border="1" width="39%" id="table11" bgcolor="#CCFFCC"> |
---|
495 | <tr> |
---|
496 | <td> |
---|
497 | <dl> |
---|
498 | <dd> |
---|
499 | <p class="important"><font size="2" face="Courier">IF |
---|
500 | ("initial_matrix_table"=ON .AND. <br>& {the map-table exists}) THEN<font color="#000000"> |
---|
501 | <br> (</font></font><font color="#000000"><font size="2">from |
---|
502 | a <a href="#map-table">Map-Table</a></font><font size="2" face="Courier">)</font></font></dd> |
---|
503 | <dd> |
---|
504 | <p class="important"><font size="2" face="Courier">ELSEIF("initial_map_manual"=ON) THEN<font color="#000000"><br> (</font></font><font color="#000000"><font size="2">from |
---|
505 | a <a href="#Given_Map_File">Given Map File</a></font><font size="2" face="Courier">)</font></font></dd> |
---|
506 | <dd> |
---|
507 | <p class="important"><font size="2" face="Courier">ELSEIF("initial_matrix_manual"=ON) THEN<font color="#000000"><br> (</font></font><font color="#000000"><font size="2">from |
---|
508 | a <a href="#Given_Matrix">Given Matrix</a></font><font size="2" face="Courier">)</font></font></dd> |
---|
509 | <dd> |
---|
510 | <p class="important"><font size="2" face="Courier">ELSEIF(BETA0 block =ON) THEN |
---|
511 | <font color="#000000"><br> (</font></font><font color="#000000"><font size="2">from |
---|
512 | Twiss Parameters via <a href="#BETA0-block">BETA0-block</a></font><font size="2" face="Courier">)</font></font></dd> |
---|
513 | <dd> |
---|
514 | <p class="important"><font size="2" face="Courier">ELSE<br> |
---|
515 | <font color="#000000"> (</font></font><font color="#000000"><font size="2">from |
---|
516 | <a href="#Given_Twiss">Given Twiss</a> Parameters</font><font size="2" face="Courier">)</font></font></dd> |
---|
517 | <dd> |
---|
518 | <p class="important"><font face="Courier" size="2">ENDIF</font></dd> |
---|
519 | </dl></td> |
---|
520 | </tr> |
---|
521 | </table> |
---|
522 | </dd> |
---|
523 | </dl></div></dd> |
---|
524 | </dl> |
---|
525 | <dl> |
---|
526 | <dd> |
---|
527 | <div> |
---|
528 | <dl> |
---|
529 | <dl> |
---|
530 | <dt class="command"><b><u><i>Initial Values from a |
---|
531 | <font color="#FF0000"><a name="map-table">Map-Table</a></font></i></u></b><var><strong><b><u><i> |
---|
532 | <br> |
---|
533 | (obtainable by a preceding </i></u></b></strong></var> <var class="command"> |
---|
534 | <a href="../ptc_normal/ptc_normal.html">PTC_NORMAL</a></var><b><i> |
---|
535 | </i></b><var><strong><b><u><i>command)</i></u></b></strong><b><i><strong><u>:<br> |
---|
536 | </u></strong></i><strong> PTC_TWISS,<br> icase=</b>integer, |
---|
537 | </strong></var><strong><var class="option">deltap</var>=double, |
---|
538 | <b>closed_orbit</b>, <b><br> range=string, file[=</b>string<b>], |
---|
539 | table[=</b>string<b>],<br> initial_matrix_table</b>; |
---|
540 | </strong><var><strong> </strong></var></dt> |
---|
541 | <dd> |
---|
542 | <div> |
---|
543 | <dl> |
---|
544 | <dt>Description</dt> |
---|
545 | <dd> |
---|
546 | <!-- <strong>TRACK, DELTAP= double, ONEPASS, DUMP, ONETABLE, FILE= string;</strong> (MADX version 1)<br /> |
---|
547 | <strong>TRACK, DELTAP= double, ONEPASS, DAMP, QUANTUM, DUMP, ONETABLE, FILE= string;</strong> (MADX version 2)<br /> --> |
---|
548 | <var class="command">PTC_TWISS</var> calculates a solution |
---|
549 | with initial conditions given as a map-table of |
---|
550 | preceding ring or beam-line. It requires the input option |
---|
551 | <var class="option">initial_matrix_table</var> and an existence of the map-table in |
---|
552 | memory, which was generated |
---|
553 | by a preceding <var class="command"> |
---|
554 | <a href="../ptc_normal/ptc_normal.html">PTC_NORMAL</a></var> command.</dd> |
---|
555 | <dt>Example</dt> |
---|
556 | <dd>An example is found in the |
---|
557 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss"> |
---|
558 | <var class="command">PTC_TWISS</var> Examples</a> in |
---|
559 | the folder |
---|
560 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss/Example3/"> |
---|
561 | "Example3"</a>.</dd> |
---|
562 | </dl></div></dd> |
---|
563 | </dl> |
---|
564 | |
---|
565 | |
---|
566 | |
---|
567 | |
---|
568 | |
---|
569 | |
---|
570 | <!-- map-file entry --> |
---|
571 | |
---|
572 | <dl> |
---|
573 | <dt class="command"><b><u><i>Initial Values from a |
---|
574 | <font color="#FF0000"><a name="Given_Map_File">Map-File</a></font></i></u></b><var><strong><b><u><i> |
---|
575 | <br> |
---|
576 | (obtainable by a preceding </i></u></b></strong></var> <var class="command"> |
---|
577 | <a href="../ptc_normal/ptc_normal.html">PTC_NORMAL</a></var><b><i> |
---|
578 | </i></b><var><strong><b><u><i>command)</i></u></b></strong><b><i><strong><u>:<br> |
---|
579 | </u></strong></i><strong> PTC_TWISS,<br> icase=</b>integer, |
---|
580 | </strong></var><strong><var class="option">deltap</var>=double, |
---|
581 | <b>closed_orbit</b>, <b><br> range=string, file[=</b>string<b>], |
---|
582 | table[=</b>string<b>],<br> initial_map_manual</b>; |
---|
583 | </strong><var><strong> </strong></var></dt> |
---|
584 | <dd> |
---|
585 | <div> |
---|
586 | <dl> |
---|
587 | <dt>Description</dt> |
---|
588 | <dd> |
---|
589 | <!-- <strong>TRACK, DELTAP= double, ONEPASS, DUMP, ONETABLE, FILE= string;</strong> (MADX version 1)<br /> |
---|
590 | <strong>TRACK, DELTAP= double, ONEPASS, DAMP, QUANTUM, DUMP, ONETABLE, FILE= string;</strong> (MADX version 2)<br /> --> |
---|
591 | <var class="command">PTC_TWISS</var> calculates a solution |
---|
592 | with initial conditions given as a map-file fort.18 obtained from a |
---|
593 | preceding ring or beam-line. It requires the input option |
---|
594 | <var class="option">initial_map_manual</var> and an existence of the map-file named |
---|
595 | a fort.18 file, which was generated |
---|
596 | by a preceding <var class="command"> |
---|
597 | <a href="../ptc_normal/ptc_normal.html">PTC_NORMAL</a></var> command.</dd> |
---|
598 | <dt>Example</dt> |
---|
599 | <dd>An example is found in the |
---|
600 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss"> |
---|
601 | <var class="command">PTC_TWISS</var> Examples</a> in |
---|
602 | the folder |
---|
603 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss/Example3/"> |
---|
604 | "Example3"</a>.</dd> |
---|
605 | </dl></div></dd> |
---|
606 | </dl> |
---|
607 | |
---|
608 | |
---|
609 | <!-- end of map-file entry --> |
---|
610 | |
---|
611 | |
---|
612 | |
---|
613 | |
---|
614 | |
---|
615 | |
---|
616 | <dt class="command"><u><i><b>Initial Values from a |
---|
617 | <font color="#FF0000"> <a name="Given_Matrix"> |
---|
618 | Given Matrix</a></font></b></i></u><var><strong><b><u><i>:</i></u><br> |
---|
619 | PTC_TWISS,<br> |
---|
620 | icase=</b>integer, </strong></var> |
---|
621 | <strong><var class="option">deltap</var>=double, <b>closed_orbit</b>, |
---|
622 | <b><br> |
---|
623 | range=string, file=</b>string<b>, |
---|
624 | table=</b>string<b>,<br> |
---|
625 | initial_matrix_manual, <br> |
---|
626 | re11</b>=double, <b>re12</b>=double, |
---|
627 | ... ,<b>re16</b>=double,<br> |
---|
628 | |
---|
629 | ................................................................<br> |
---|
630 | <b> re61</b>=double, <b>re62</b>=double, |
---|
631 | ... ,<b>re66</b>=double;</strong></dt> |
---|
632 | <dd> |
---|
633 | <div> |
---|
634 | <dl> |
---|
635 | <dt>Description</dt> |
---|
636 | <dd> |
---|
637 | <!-- <strong>TRACK, DELTAP= double, ONEPASS, DUMP, ONETABLE, FILE= string;</strong> (MADX version 1)<br /> |
---|
638 | <strong>TRACK, DELTAP= double, ONEPASS, DAMP, QUANTUM, DUMP, ONETABLE, FILE= string;</strong> (MADX version 2)<br /> --> |
---|
639 | <var class="command">PTC_TWISS</var> calculates a solution |
---|
640 | with initial conditions given by the matrix, which is |
---|
641 | "manually" entered on the command-line. It requires the |
---|
642 | option <var class="option">initial_matrix_manual</var>. |
---|
643 | MAD-X expects a symplectic 6x6 transfer matrix as input. </dd> |
---|
644 | <dt>Example</dt> |
---|
645 | <dd>An example is found in the |
---|
646 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss"> |
---|
647 | <var class="command">PTC_TWISS</var> Examples</a> in the |
---|
648 | folder |
---|
649 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss/Example4/"> |
---|
650 | "Example4"</a>.</dd> |
---|
651 | </dl></div></dd> |
---|
652 | <dt class="command"><u><i><b>Initial Values from Twiss Parameters via |
---|
653 | <font color="#FF0000"> |
---|
654 | <a name="BETA0-block">BETA0-block</a></font></b></i></u><var><strong><b><u><i>:</i></u><br> |
---|
655 | PTC_TWISS,<br> |
---|
656 | icase=</b>integer, </strong></var> |
---|
657 | <strong><var class="option">deltap</var>=double, <b>closed_orbit</b>, |
---|
658 | <b><br> |
---|
659 | range=string, file[=</b>string<b>], |
---|
660 | table[=</b>string<b>],<br> |
---|
661 | beta0=</b>string<b>;</b></strong></dt> |
---|
662 | <dd> |
---|
663 | <div> |
---|
664 | <dl> |
---|
665 | <dt>Description</dt> |
---|
666 | <dd> |
---|
667 | <!-- <strong>TRACK, DELTAP= double, ONEPASS, DUMP, ONETABLE, FILE= string;</strong> (MADX version 1)<br /> |
---|
668 | <strong>TRACK, DELTAP= double, ONEPASS, DAMP, QUANTUM, DUMP, ONETABLE, FILE= string;</strong> (MADX version 2)<br /> --> |
---|
669 | <var class="command">PTC_TWISS</var> calculates a solution |
---|
670 | with initial conditions given by Twiss parameters, which |
---|
671 | are transferred from <span lang="EN-US">the </span> |
---|
672 | <var class="command">BETA0</var><span lang="EN-US">-block. |
---|
673 | </span> The data in the <span lang="EN-US">the |
---|
674 | </span><var class="command">BETA0</var><span lang="EN-US">-block |
---|
675 | have to be filled </span>by a combination of the |
---|
676 | <a href="../control/general.html#savebeta"> |
---|
677 | SAVEBETA</a> and |
---|
678 | <a href="../twiss/twiss.html"> |
---|
679 | TWISS</a> commands of a preceding ring or beam-line. Note, that |
---|
680 | this case is limited to uncoupled motion of the preceding |
---|
681 | machine.</dd> |
---|
682 | <dt>Example</dt> |
---|
683 | <dd>An example is found in the |
---|
684 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss"> |
---|
685 | <var class="command">PTC_TWISS</var> Examples</a> in the |
---|
686 | folder |
---|
687 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss/Example1/"> |
---|
688 | "Example1"</a>.</dd> |
---|
689 | </dl></div></dd> |
---|
690 | <dt class="command"><u><i><b>Initial Values from the |
---|
691 | <font color="#FF0000"> |
---|
692 | <a name="Given_Twiss">Given Twiss</a></font> Parameters</b></i></u><var><strong><b><u><i>:</i></u><br> |
---|
693 | PTC_TWISS,<br> |
---|
694 | icase=</b>integer, </strong></var> |
---|
695 | <strong><var class="option">deltap</var>=double, <b>closed_orbit</b>, |
---|
696 | <b><br> |
---|
697 | range=string, file[=</b>string<b>], |
---|
698 | table[=</b>string<b>],<br> |
---|
699 | </b><b>betx=</b>double,<b> alfx=</b>double<b>, |
---|
700 | mux=</b>double<b>, <br> |
---|
701 | bety=</b>double,<b> alfy=</b>double<b>, |
---|
702 | muy=</b>double<b>, <br> |
---|
703 | dx=</b>double,<b> dpx=</b>double,<b> dy=</b>double,<b> dpy=</b>double,<b><br> |
---|
704 | </b><var class="option"> x</var>=double, |
---|
705 | <var class="option">px</var>=double, <var class="option">y</var>=double, |
---|
706 | <var class="option">py</var>=double, <var class="option"><br> |
---|
707 | t</var>=double, <var class="option">pt</var>=double;</strong></dt> |
---|
708 | <dd> |
---|
709 | <div> |
---|
710 | <dl> |
---|
711 | <dt>Description</dt> |
---|
712 | <dd> |
---|
713 | <!-- <strong>TRACK, DELTAP= double, ONEPASS, DUMP, ONETABLE, FILE= string;</strong> (MADX version 1)<br /> |
---|
714 | <strong>TRACK, DELTAP= double, ONEPASS, DAMP, QUANTUM, DUMP, ONETABLE, FILE= string;</strong> (MADX version 2)<br /> --> |
---|
715 | <var class="command">PTC_TWISS</var> calculates a solution |
---|
716 | with initial conditions given by the Twiss parameters, |
---|
717 | which are explicitly typed on the |
---|
718 | command line. Note, that this case is also limited to |
---|
719 | uncoupled motion of the preceding ring or beam-line.</dd> |
---|
720 | <dt>Example</dt> |
---|
721 | <dd>An example is found in the |
---|
722 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss"> |
---|
723 | <var class="command">PTC_TWISS</var> Examples</a> in the |
---|
724 | folder |
---|
725 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss/Example2/"> |
---|
726 | "Example2"</a>.</dd> |
---|
727 | </dl></div></dd> |
---|
728 | </dl></div></dd> |
---|
729 | </dl> |
---|
730 | <dl> |
---|
731 | <dt>References for PTC_TWISS</dt> |
---|
732 | </dl> |
---|
733 | <ol type="a"> |
---|
734 | <li><a name="F._Schmidt">F. Schmidt</a>, "`<a href="http://cern.ch/madx/doc/MPPE012.pdf">MAD-X PTC Integration</a>'', |
---|
735 | Proc. of the 2005 PAC Conference in Knoxville, USA, pp.1272.</li> |
---|
736 | <li><a name="G. Ripken">G. Ripken</a> and F. Willeke, "<a href="http://cern.ch/madx/doc/1988_Ripken.pdf">Methods of |
---|
737 | Beam Optics</a>", DESY 88114, 1988.</li> |
---|
738 | <li><a name="K._Zhang">K. Zhang</a>, "PTC twiss with initial TWISS |
---|
739 | parameters", |
---|
740 | <a href="http://cern.ch/frs/MAD-X_minutes/Meeting-13/minutes.html"> |
---|
741 | MAD-X Meeting 13 (04.07.2005)</a>, <font color="#000000">slides in |
---|
742 | <a href="http://cern.ch/frs/MAD-X_minutes/Meeting-13/Input_of_PTC_TWISS_module.ppt"> |
---|
743 | ppt</a>.</font></li> |
---|
744 | <li><a name="V.A. Lebedev">V.A. Lebedev</a> and S.A. Bogacsz, "<a href="http://cern.ch/madx/doc/1748-0221_5_10_P10010.pdf">Betatron motion with coupling of horizontal and vertical degrees of motion</a>", Thomas Jefferson National Accelerator Facility 2010.</li> |
---|
745 | |
---|
746 | </ol> |
---|
747 | </div> |
---|
748 | <div> |
---|
749 | <dl> |
---|
750 | <dt>See Also</dt> |
---|
751 | <dd> |
---|
752 | <var class="command"> |
---|
753 | <a href="../twiss/twiss.html">TWISS</a></var>, |
---|
754 | <a href="http://cern.ch/frs/mad-X_examples/ptc_twiss"> |
---|
755 | <var class="command">PTC_TWISS</var> Examples</a>.</dd> |
---|
756 | </dl> |
---|
757 | </div> |
---|
758 | |
---|
759 | </div> |
---|
760 | |
---|
761 | <hr /> |
---|
762 | <address> |
---|
763 | <span lang="EN-US"> |
---|
764 | <a style="color: blue; text-decoration: underline; text-underline: single" href="mailto:kapin@itep.ru"> |
---|
765 | V. <span class="SpellE">Kapin<span style="text-decoration: none"> </span></span> |
---|
766 | </a></span>(ITEP) and <span lang="EN-US"> |
---|
767 | <a style="color: blue; text-decoration: underline; text-underline: single" href="mailto:Frank.Schmidt@cern.ch"> |
---|
768 | F. Schmidt</a>, </span>March 2006</address> |
---|
769 | |
---|
770 | </body> |
---|
771 | </html> |
---|