Tracks through a wiggler using canonical integration routines of Y. Wu (Duke University).
Parallel capable? : yes
GPU capable? : no
Back-tracking capable? : no
Parameter Name | Units | Type | Default | Description |
L | M | double | 0.0 | Total length |
B_MAX | T | double | 0.0 | Maximum on-axis magnetic field. |
BX_MAX | T | double | 0.0 | Maximum on-axis magnetic field. Ignored if B_MAX is nonzero. |
BY_MAX | T | double | 0.0 | Maximum on-axis magnetic field. Ignored if B_MAX is nonzero. |
TGU_GRADIENT | 1∕M | double | 0.0 | Transverse gradient divided by maximum on-axis field, used if TGU=1. |
TGU_COMP_FACTOR | NULL | double | 1 | Use to adjust constant field component to reduce trajectory error. |
POLE1_FACTOR | NULL | double | 1 | Use to adjust first and last pole strength, e.g., to reduce trajectory error. |
POLE2_FACTOR | NULL | double | 1 | Use to adjust second and penultimate pole strength, e.g., to reduce trajectory error. |
POLE3_FACTOR | NULL | double | 1 | Use to adjust third and third-from=last pole strength, e.g., to reduce trajectory error. |
DX | M | double | 0.0 | Misaligment. |
DY | M | double | 0.0 | Misaligment. |
DZ | M | double | 0.0 | Misaligment. |
TILT | RAD | double | 0.0 | Rotation about beam axis. |
PERIODS | long | 0 | Number of wiggler periods. |
|
STEPS_PER_PERIOD | long | 12 | Integration steps per period. Must be 4*integer |
|
INTEGRATION_ORDER | short | 4 | Integration order (2 or 4). |
|
BY_FILE | STRING | NULL | Name of SDDS file with By harmonic data. |
|
CWIGGLER continued
Tracks through a wiggler using canonical integration routines of Y. Wu (Duke University).
Parameter Name | Units | Type | Default | Description |
BX_FILE | STRING | NULL | Name of SDDS file with Bx harmonic data. |
|
BY_SPLIT_POLE | short | 0 | Use ”split-pole” expansion for By? |
|
BX_SPLIT_POLE | short | 0 | Use ”split-pole” expansion for Bx? |
|
SYNCH_RAD | short | 0 | Include classical, single-particle synchrotron radiation? |
|
ISR | short | 0 | Include incoherent synchrotron radiation (quantum excitation)? |
|
ISR1PART | short | 1 | Include ISR for single-particle beam only if ISR=1 and ISR1PART=1 |
|
SINUSOIDAL | short | 0 | Ideal sinusoidal wiggler? If non-zero, BX_FILE and BY_FILE are not used. |
|
VERTICAL | short | 0 | If SINUSOIDAL is non-zero, then setting this to non-zero gives a vertical wiggler. Default is horizontal. |
|
HELICAL | short | 0 | Ideal helical wiggler? If non-zero and SINUSOIDAL is also non-zero, BX_FILE and BY_FILE are not used. |
|
TGU | short | 0 | Ideal transverse gradient undulator? If non-zero and SINUSOIDAL is also non-zero, BX_FILE and BY_FILE are not used. Give gradient in TGU_GRADIENT. |
|
FORCE_MATCHED | short | 1 | Force matched dispersion for first harmonics? If non-zero, start and end of magnetic field will be inset from the ends of the device if phase is not 0 or π. |
|
CWIGGLER continued
Tracks through a wiggler using canonical integration routines of Y. Wu (Duke University).
Parameter Name | Units | Type | Default | Description |
FIELD_OUTPUT | STRING | NULL | Name of file to which field samples will be written. Slow, so use only for debugging. |
|
VERBOSITY | short | 0 | A higher value requires more detailed printouts related to computations. |
|
BX_CONSTANT | T | double | 0.0 | Constant horizontal magnetic field. |
BY_CONSTANT | T | double | 0.0 | Constant vertical magnetic field. |
GROUP | string | NULL | Optionally used to assign an element to a group, with a user-defined name. Group names will appear in the parameter output file in the column ElementGroup |
|
This element simulates a wiggler or undulator using a modified version of Ying Wu’s canonical integration code for wigglers. To use the element, one must supply an SDDS file giving harmonic analysis of the wiggler field. The field expansion used by the code for a horizontally-deflecting wiggler is (Y. Wu, Duke University, private communication).
| (37) |
where is the peak value of the on-axis magnetic field, the Cmn give the relative amplitudes of the harmonics, the wavenumbers statisfy kym2 = kxl2 + kzn2, and θzn is the phase.
The file must contain the following columns:
In Version 17.3 and later, for matrix computations elegant uses a first-order matrix derived from particle tracking when it encounterse a CWIGGLER. Tests show that this gives good agreement in the tunes from tracking and Twiss parameter calculations. For radiation integrals, an idealized sinusoidal wiggler model is used with bending radius equal to Bρ∕(B0 ∑ Cmn) for each plane. Energy loss, energy spread, and horizontal emittance should be estimated accurately.
elegant allows specifying field expansions for on-axis By and Bx components, so one can model a helical wiggler. However, in this case one set of components should have θzn = 0 or θzn = π, while the other should have θzn = ±π∕2. Using Wu’s code, the latter set will not have matched dispersion. Our modified version solves this by delaying the beginning of the field components in question by λ∕4 and ending the field prematurely by 3λ∕4. This causes all the fields to start and end at the crest, which ensures matched dispersion. The downside is that the (typically) vertical wiggler component is missing a full period of field. One can turn off this behavior by setting FORCE_MATCHED=0.
Additional field expansions
Y. Wu’s code included field expansions for a vertically-deflecting wiggler as well as the horizontally-deflecting wiggler given above. In both cases, these expansions are suitable for a wiggler with two poles that are above/below or left/right of the beam axis. They are not always suitable for devices with more complex pole geometries.
Another geometry that is important is a “split pole” wiggler, in which each pole is made from two pieces. Such configurations are seen, for example, in devices used to produce variable polarization. In such cases, the expansion given above may not be appropriate. Here, we summarize the form of the various expansions that elegant supports. For brevity, we show the form of a single harmonic component.
Horizontal wiggler, normal poles, produces By only on-axis. Specified by setting BY_SPLIT_POLE=0, and giving BY_FILE or SINUSOIDAL=1 with VERTICAL=0.
Experimental feature: Horizontal wiggler, normal poles, with transverse gradient, producesBy only on-axis. Specified by setting BY_SPLIT_POLE=0, SINUSOIDAL=1, TGU=1, VERTICAL=0. The TGU normalized gradient is given using the TGU_GRADIENT parameter. Taking a as the normalized gradient, the fields are[54]
Horizontal wiggler, split poles, produces By only on-axis. Specified by setting BY_SPLIT_POLE=1, and giving BY_FILE or SINUSOIDAL=1 with VERTICAL=0.
Vertical wiggler, normal poles, produces Bx only on-axis. Specified by setting BX_SPLIT_POLE=0, and giving BX_FILE or SINUSOIDAL=1 with either VERTICAL=1 or HELICAL=1.
Vertical wiggler, split poles, produces Bx only on-axis. Specified by setting BX_SPLIT_POLE=1, and giving BX_FILE or SINUSOIDAL=1 with either VERTICAL=1 or HELICAL=1.
Splitting wigglers
The CWIGGLER element supports a limited ability to split a long element into parts using the element_divisions command or the divide_elements pararameter of the run_setup command.
In addition, if contiguous CWIGGLER elements are seen in a beamline, they will be treated as part of the same element. That means that the pole factors will be ignored except at the ends of the sequence. For this purpose, CWIGGLER elements separated only by MARK or WATCH elements are considered to be contiguous.
DRIF