source: PSPA/madxPSPA/doc/usrguide/ptc_twiss/ptc_twiss.html @ 430

Last change on this file since 430 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 35.1 KB
Line 
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 &amp; 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<!--
15div.Section1
16        {page:Section1;}
17span.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">
38The <b>PTC_TWISS module</b>&nbsp;of MAD-X [<a href="#F._Schmidt">a</a>] is based on
39the PTC code. It
40is a supplementary to the TWISS module. The Twiss parameters are calculated in&nbsp; Ripken's style (invented by G. Ripken in 1970 [31] and most accessible in
41Ref.<font face="Times New Roman"> [<a href="#G.&nbsp;Ripken">b</a>]</font>).
42These parameters were available in MAD8 using the TWISS3 command. This module is
43a 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
45programming has been performed the Twiss calculation will always be
46automatically correct for all machine conditions like closed orbit, coupling or
47after a new element has been introduced into the code. In a traditional coding
48like in MAD8 this depends on reprogramming and modifying the code at various
49places which is inherently error-prone.</p>
50<p align="left">
51The PTC_TWISS tracks a special representation of the beam in three degrees of
52freedom. It works on the coupled lattice functions defined in Ref.<font face="Times New Roman">[<a href="#G.&nbsp;Ripken">b</a>]</font>,
53which are essentially the projections of the lattice functions for the
54eigen-modes on the three planes. The PTC_TWISS lists the projections of the
55ellipses 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
57Ripken'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
60phase advances&nbsp;&nbsp; <i><font face="Symbol">m</font></i><sub><i>j</i></sub>
61in 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
63the index <font color="#FF0000"> <i>j</i>=1...3 denotes the eigen-mode</font>. The PTC_TWISS also calculates the
64dispersion values <i>D</i><sub>1</sub>,...,<i>D</i><sub>4</sub>. In the MAD-X
65commands and tables, these parameters are denoted as <code>beta11,...,beta33,
66alfa11,...,alfa33, gama11,...,gama33, mu1,...,mu3, disp1,...,disp4</code>,
67respectively.</p>
68
69<p>The Ripken parametrization can be transformed into the Edwards-Teng
70parametrization (used in twiss proper) using the formulae of
71Ref.<font face="Times New Roman"> [<a
72href="#V.A.&nbsp;Lebedev">d</a>]</font>. The parameters are noted as
73<code>betx, bety, alfx, alfy</code> and the coupling matrix: R11, R12,
74R21 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
79parameters. The column names <code>beta11p,...,beta33p,
80alfa11p...,alfa33p, gama11p,...,gama33p</code> denote the derivatives
81of the optics parameters w.r.t. deltap/p. <font color="#FF0000">If one
82is interested in evaluating deltap/p-dependency of the Twiss
83parameters, one must ensure that the order (no) of the map is set to 2
84at least.</font>. The derivatives of the dispersion w.r.t. deltap/p
85have column names: <code>disp1p,...,disp4p</code>. Second and third
86order 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>
91In addition, we compute momentum compaction factor  <font
92face="Symbol">a</font><sub>c</sub> up to 1st order (for icase=5) or
933rd order (for icase=56). The values appear in the header of the
94ptc_twiss output file (zero means the value has not been
95computed). This feature is currently only available in the development
96version.</p>
97<p align="left">
98For clarification: <font color="#FF0000">in the 4-D case, there is the
99following 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>
100while in the uncoupled 4-D case <code>beta11</code> is the same as
101the classical <i><font face="Symbol">b</font><sub>x </sub></i>(<code>betx</code>)
102and&nbsp; <code>beta22 </code>is <i><font face="Symbol">b</font><sub>y </sub></i>
103(<code>bety</code>), while&nbsp; <code>beta12 </code>and&nbsp; <code>beta21 </code>
104are zero. When there is coupling all <code>betaNN </code>are non-zero and <code>
105beta11</code> , <code>beta22 </code>are distinctively different from&nbsp; <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">
108PTC_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&nbsp;
110particular 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>,
112respectively&nbsp; (<font color="#FF0000"><i>j</i></font> = number of eigenvector,
113<font color="#FF0000"><i>i</i></font> = number of
114coordinate {<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>
119For 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&nbsp;&nbsp;&nbsp; icase=</b>integer, </strong></var><strong>
165                <var class="option">deltap</var>=double, <b>closed_orbit</b>, <b>slice_magnets</b>, <b><br>
166&nbsp;&nbsp;&nbsp; range=</b>string<b>, file[=</b>string<b>], table[=</b>string<b>],<br>
167&nbsp;&nbsp;&nbsp; initial_matrix_table, initial_matrix_manual, initial_map_manual, beta0=</b>string<b>,
168                <br>
169&nbsp;&nbsp;&nbsp; betx=</b>double,<b> alfx=</b>double<b>, mux=</b>double<b>,
170                <br>
171&nbsp;&nbsp;&nbsp; bety=</b>double,<b> alfy=</b>double<b>, muy=</b>double<b>,
172                <br>
173&nbsp;&nbsp;&nbsp; dx=</b>double,<b> dpx=</b>double,<b> dy=</b>double,<b> dpy=</b>double,<b><br>
174&nbsp;&nbsp;&nbsp; </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&nbsp;&nbsp;&nbsp; <b>re11</b>=double, <b>re12</b>=double, ... ,<b>re16</b>=double,<br>
178&nbsp;&nbsp;&nbsp;
179                ................................................................<br>
180&nbsp;&nbsp;&nbsp; <b>re61</b>=double, <b>re62</b>=double, ... ,<b>re66</b>=double;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
181                </strong><var><strong>&nbsp; </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
191the 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>&nbsp;<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">&nbsp;</td>
285                                                <td width="57">&nbsp;</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">&nbsp;</td>
300                                                <td width="57">&nbsp;</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">&nbsp;</td>
313                                                <td width="57">&nbsp;</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">&nbsp;</td>
328                                                <td width="57">&nbsp;</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">&nbsp;
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
405href="../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>:&nbsp;&nbsp; <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                                &nbsp;</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&nbsp;&nbsp;&nbsp; icase=</b>integer, </strong></var><strong>
435                <var class="option">deltap</var>=double, <b>closed_orbit</b>, <b><br>
436&nbsp;&nbsp;&nbsp; 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&nbsp; 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&nbsp;&nbsp;&nbsp; icase=</b>integer, </strong></var><strong>
458                <var class="option">deltap</var>=double, <b>closed_orbit</b>, <b> slice_magnets</b> <b><br>
459&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;</b></strong></dt>
492                                <dd>&nbsp;</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                (&quot;initial_matrix_table&quot;=ON .AND. <br>&amp; &nbsp;&nbsp;&nbsp;{the map-table exists})&nbsp;&nbsp; THEN<font color="#000000">
501                                                        <br>&nbsp;&nbsp; (</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(&quot;initial_map_manual&quot;=ON) THEN<font color="#000000"><br>&nbsp;&nbsp; (</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(&quot;initial_matrix_manual&quot;=ON) THEN<font color="#000000"><br>&nbsp;&nbsp; (</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>&nbsp;&nbsp; (</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">&nbsp;&nbsp; (</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>&nbsp;&nbsp;&nbsp; PTC_TWISS,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icase=</b>integer,
537                                        </strong></var><strong><var class="option">deltap</var>=double,
538                                        <b>closed_orbit</b>,&nbsp; <b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range=string, file[=</b>string<b>],
539                                        table[=</b>string<b>],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initial_matrix_table</b>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
540                                        </strong><var><strong>&nbsp; </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&nbsp; 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                                                        &quot;Example3&quot;</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>&nbsp;&nbsp;&nbsp; PTC_TWISS,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icase=</b>integer,
580                                        </strong></var><strong><var class="option">deltap</var>=double,
581                                        <b>closed_orbit</b>,&nbsp; <b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range=string, file[=</b>string<b>],
582                                        table[=</b>string<b>],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initial_map_manual</b>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
583                                        </strong><var><strong>&nbsp; </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&nbsp; 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                                                        &quot;Example3&quot;</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&nbsp;&nbsp;&nbsp; PTC_TWISS,<br>
620&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icase=</b>integer, </strong></var>
621                                <strong><var class="option">deltap</var>=double, <b>closed_orbit</b>,
622                                <b><br>
623&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range=string, file=</b>string<b>,
624                                table=</b>string<b>,<br>
625&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initial_matrix_manual, <br>
626&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; re11</b>=double, <b>re12</b>=double,
627                                ... ,<b>re16</b>=double,<br>
628&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
629                                ................................................................<br>
630&nbsp;&nbsp;&nbsp; <b>&nbsp;&nbsp;&nbsp; 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                                                &quot;manually&quot; 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.&nbsp; </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                                                &quot;Example4&quot;</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&nbsp;&nbsp;&nbsp; PTC_TWISS,<br>
656&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icase=</b>integer, </strong></var>
657                                <strong><var class="option">deltap</var>=double, <b>closed_orbit</b>,
658                                <b><br>
659&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range=string, file[=</b>string<b>],
660                                table[=</b>string<b>],<br>
661&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp; <span lang="EN-US">the </span>
672                                                <var class="command">BETA0</var><span lang="EN-US">-block.
673                                                </span>&nbsp;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                                                &quot;Example1&quot;</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&nbsp;&nbsp;&nbsp; PTC_TWISS,<br>
694&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icase=</b>integer, </strong></var>
695                                <strong><var class="option">deltap</var>=double, <b>closed_orbit</b>,
696                                <b><br>
697&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; range=string, file[=</b>string<b>],
698                                table[=</b>string<b>],<br>
699&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </b><b>betx=</b>double,<b> alfx=</b>double<b>,
700                                mux=</b>double<b>, <br>
701&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bety=</b>double,<b> alfy=</b>double<b>,
702                                muy=</b>double<b>, <br>
703&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dx=</b>double,<b> dpx=</b>double,<b> dy=</b>double,<b> dpy=</b>double,<b><br>
704&nbsp;&nbsp;&nbsp; </b><var class="option">&nbsp;&nbsp;&nbsp; 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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp; 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                                                &quot;Example2&quot;</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>, &quot;`<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.&nbsp;Ripken">G.&nbsp;Ripken</a> and F.&nbsp;Willeke, &quot;<a href="http://cern.ch/madx/doc/1988_Ripken.pdf">Methods of
737                Beam Optics</a>&quot;, DESY 88–114, 1988.</li>
738                <li><a name="K._Zhang">K. Zhang</a>, &quot;PTC twiss with initial TWISS
739                parameters&quot;,
740                <a href="http://cern.ch/frs/MAD-X_minutes/Meeting-13/minutes.html">
741                MAD-X Meeting 13 (04.07.2005)</a>,&nbsp; <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.&nbsp;Lebedev">V.A.&nbsp;Lebedev</a> and S.A.&nbsp;Bogacsz, &quot;<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>&quot;, 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">
765V.&nbsp;<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">
768F.&nbsp;Schmidt</a>, </span>March  2006</address>
769
770</body>
771</html>
Note: See TracBrowser for help on using the repository browser.