{% include lib/mathjax.html %}
The undulator is modelled analytically, and the model must include the fast wiggle motion. Puffin may be modified in the future to allow a map of the undulator field to be input. For now, there are a few generic undulator models employed. The undulator magnetic fields are chosen with the zundType string in the main input file.
Available options for use in Puffin are 'helical', 'planepole' - corresponding to a planar wiggler with flat pole faces with natural focusing only in one direction, 'curved' - corresponding to a planar undulator with curved, or canted, pole faces providing natural focusing in both transverse directions equally, and the default Puffin undulator, chosen with a blank string (''), where the transverse polarization is chosen with the sux, suy inputs, controlling the relative magnitudes of the peak magnetic fields in
All of the undulator fields have an associated natural focusing channel, which arises from from the off-axis variation in the magnetic fields. This motion arises naturally when numerically solving the equations, and is not super-imposed artificially upon the electron motion.
The analytic description of the undulator fields are described in more detail here, which in the scaled Puffin notation are:-
helical
plane-pole
canted-pole
$$ b_x = \frac{\bar{k}{\beta x}}{\bar{k}{\beta y}} \sinh(\bar{k}{\beta x} \bar{x} ) \sinh( \bar{k}{\beta y} \bar{y} ) \sin({\bar{z}/2\rho}) \ b_y = \cosh(\bar{k}{\beta x} \bar{x} ) \cosh( \bar{k}{\beta y} \bar{y} ) \sin({\bar{z}/2\rho}) \ b_z = \frac{\sqrt{\eta}}{2\rho \bar{k}{\beta x}} \cosh(\bar{k}{\beta x} \bar{x} ) \sinh( \bar{k}_{\beta y} \bar{y} ) \cos({\bar{z}/2\rho}) $$
variably polarized elliptical
In the 1D approximation,
All of the above have an associated natural focusing channel, which arises from from the off-axis variation in the magnetic fields. This motion arises naturally when numerically solving the equations, and is not super-imposed upon the electron motion.
The undulators also include entry and exit tapers, and they may be switched on or off in the input file with the flag qUndEnds. Setting this to true will model a smooth tapering up and down of the undulator magnetic fields in the first and last 2 periods of the undulator. If they are switched off, the beam is artificially initialized with an expected initial condition in the transverse coordinates for that undulator. Including these ends will model a more realistic and natural entry and exit from the undulator, and will reduce CSE effects from the shape of the wiggler.
The
Each undulator type has an associated natural focusing wavenumber. In the helical case, the natural betatron wavenumber is
$$ \bar{k}{\beta n x} = \bar{k}{\beta n y} = \frac{a_w}{2 \sqrt{2} \rho \gamma_0}, $$
with
In the planar case,
$$ \bar{k}{\beta n y} = 0, \ \bar{k}{\beta n y} = \frac{a_w}{2 \sqrt{2} \rho \gamma_0}. $$
In the canted pole case,
$$ \bar{k}{\beta n x,y} = \frac{a_w \bar{k}{x,y}}{\sqrt{2 \eta} \gamma_0}, $$
where
to be physically valid. They determine the focusing strength in the
$$ \bar{k}{\beta n x} = \bar{k}{\beta n y} = \frac{a_w }{ 4 \rho \gamma_0}. $$
In addition to the natural focusing channel, a constant, 'strong' focussing channel may be utilized, to focus the beam to a smaller transverse area. This is a magnetic field super-imposed upon the wiggler. It may be switched on or off with the flag qFocussing in the main input file, and is specified through the use of the variables sKBetaXSF and sKBetaYSF. It is probably highly artificial - it may be thought of as physically similar to an ion channel. Nevertheless it allows one to obtain strong focusing without using a lattice. It is defined very simply as
$$ b_x = \sqrt{\eta} \frac{\bar{k}_{\beta y}^2}{\kappa}\bar{y}j, \ b_y = - \sqrt{\eta} \frac{\bar{k}{\beta x}^2}{\kappa}\bar{x}_j $$
If either sKBetaXSF or sKBetaYSF are not specified, then no focusing channel will be added for that dimension, even if the qFocussing flag is true.
Magnetic quads between modules can be specified in the lattice file.