Home

Introduction

Sylt (SYnchrotron Longitudinal Tracker) is a python package used to conveniently describe and analyse realistic longitudinal beam dynamics simulations in synchrotrons.

Implementation

The Bunch, Ring, and Tracker objects must be imported.

from sylt.tracking import Bunch, Ring, Tracker

To demonstrate Single Particle Motion, a basic ring can be instantiated by

ring = Ring(
    R=100,          # machine radius (m)
    h=8,            # rf harmonic
    Vg=80e3,        # gap voltage (V)
    gamma_t=6.1,    # transition
    )

A bivariate gaussian bunch can be generated with

bunch = Bunch(
    E=2.938272e9,   # particle energy (eV)
    n=50e3,         # number of macroparticles
    sig_w=4e6,      # rms energy width
    sig_tau=30e-9,  # rms bunch length
    )

To incorporate intensity effects, a nonzero beam intensity and rms transverse emittance must be defined with respect to the transverse optics and aperture constraints.

bunch.N = 200e12            # number of particles
bunch.sig_eps = 3e-6        # rms transverse emittance (m)

ring.b = (73e-3, 35e-3)     # beam pipe aperture radius (m)
ring.beta = 17              # average beta function
ring.D = (2.66, 0)          # average dispersion function

To incorporate the effects of transverse motion, individual particle emittance need to be generated by indicating.

bunch.eps = None

To track, define a tracker using Tracker and use the track method.

tracker = Tracker(bunch, ring)

for turn in range(10_000):
    tracker.track()

At any point, the bunch’s phase space distribution can be visualized using show. Particle’s whose trajectories are knowingly unstable can be marked by using the clean method.

tracker.clean()
tracker.show()

demo

By setting Tracker.UPDATE = False, macroparticles can be evaluated as ghost particles wherein the characteristic bunch statistics used to determine induced space charge voltage are held constant. Accordingly, the tune spread of single particle motion (SPM), tune shift of space charge (SC) and tune blur due to effects of transverse motion (TM) can be compared by tracking the evolution of monoenergetic ghost particles.

trackers = {
    'SPM': Tracker(Bunch(E, sig_tau, sig_w, n), ring),
    'SPM+SC': Tracker(Bunch(E, sig_tau, sig_w, n, N, sig_eps), ring),
    'SPM+SC+TM': Tracker(Bunch(E, sig_tau, sig_w, n, N, sig_eps, eps=None), ring)
}

for key, tracker in trackers.items():

    tracker.UPDATE = False

    for turn in range(2_000):
    
        tracker.track()
        tracker.clean()
    
        ax.plot(tracker.bunch.tau, tracker.bunch.w, label=key)

comparison

The relative time evolution of particles can be assessed by appending time data into an array and then computing an FFT to return a particle’s synchrotron frequency as a function of it’s maximum oscillation amplitude.

DATA = {}
for i, (key, tracker) in enumerate(trackers.items()):
    tracker.UPDATE = False

    tau = []
    for turn in range(500_000):
        tracker.track()
        tau.append(tracker.bunch.tau)

    tau_hat, f = compute_synchrotron_frequency(np.array(tau), tracker.T)

    DATA[key] = {
        'phi_hat': ring.h*tracker.omega*tau_hat,
        'mu': 2*np.pi*f/tracker.Omega.real,
    }

The evolving relative time data can be processed and depicted as a synchrotron frequency spectrum with using sylt.plotting.plot_tune.

tune

References