7. Wakefields and impedance

A bunch of charge passing through a cavity leaves electromagnetic fields behind it: the wakefield. It takes energy from the bunch and acts on the bunches that follow. Its frequency content, the impedance, shows which modes of the cavity are responsible. cavsim2d computes the wakefield with ABCI, a time-domain code from KEK.

In this tutorial you will:

  1. Run a wakefield analysis on one cell with beam pipes.

  2. Read the loss and kick factors.

  3. Plot the longitudinal and transverse impedance.

  4. Plot the wake potential and the loss-factor spectrum.

Before you start: work through An elliptical cavity, and install ABCI as the installation guide describes. Without ABCI the run stops at once with a message saying where to get it. Running the whole notebook takes a few minutes.

1. The cavity

The TESLA cell again, now with a beam pipe at each end. ABCI needs a pipe at each end of the structure; a cavity without them gets them added for the wakefield run.

from cavsim2d import EllipticalCavity

mid_cell = [42, 42, 12, 19, 35, 57.7, 103.353]      # A, B, a, b, Ri, L, Req  [mm]
cell = EllipticalCavity(1, mid_cell, beampipe='both', name='tesla_cell_wake')
cell.plot('geometry');
../_images/11b462062bbe7340ee59f6aea5ed287a028a2917c48011ec2a2ee17c98ec406b.png

2. Run the wakefield analysis

Three settings matter most:

  • MROT chooses what to compute: 0 the longitudinal wake, 1 the transverse wake, 2 both.

  • wakelength, in metres, is how far behind the bunch the wake is followed. A longer wake resolves the impedance more finely in frequency, and takes longer to compute.

  • bunch_length, in millimetres, is the bunch’s rms length. A shorter bunch excites higher frequencies, and needs a finer mesh.

cell.wakefield.run({'MROT': 2, 'wakelength': 20, 'bunch_length': 25});

3. Loss and kick factors

cell.wakefield.qois sums the wake up in four numbers:

quantity

meaning

|k_loss| [V/pC]

the longitudinal loss factor: the energy the bunch loses, per unit charge squared

k_FM [V/pC]

the part of it left in the fundamental, accelerating, mode

k_loss_HOM [V/pC]

the rest, left in higher-order modes

|k_kick| [V/pC/m]

the transverse kick factor: the sideways kick per unit charge and per metre of offset

for key, value in cell.wakefield.qois.items():
    print(f'{key:20s} {value:.4g}')
|k_loss| [V/pC]      0.1799
k_FM [V/pC]          0.1509
k_loss_HOM [V/pC]    0.02897
|k_kick| [V/pC/m]    5.758

The bunch loses 0.180 V/pC in all. Of that, 0.151 V/pC, 84 %, goes into the fundamental mode, and 0.029 V/pC into higher-order modes. The kick factor, 5.76 V/pC/m, measures the sideways push on a bunch that passes off the axis.

4. The impedance

The impedance is the wake seen as a function of frequency. Each peak is a mode of the cavity that the bunch excites; the higher the peak, the stronger the coupling.

cell.wakefield.plot_impedance('longitudinal');
../_images/201df6e4c90b7611e5ac844b40c2b3a6618152ef693d179b01e3ab0d60f56b5b.png

The tallest peak, about 6.3 kOhm, is the fundamental mode near 1300 MHz. The next, about 3.6 kOhm near 2420 MHz, is a higher-order monopole mode, and a small one appears near 3860 MHz. A narrow resonance needs a long wake to resolve, so the height of a peak depends on wakelength. To compare modes, use the areas under the peaks, which the loss-factor spectrum in section 5 adds up.

cell.wakefield.plot_impedance('transverse');
../_images/05f19023d32fbaade72e97c2bbe76aec9df75984252881944b10fde9cac3690f.png

The transverse impedance shows the dipole modes, the ones that kick a bunch sideways: two strong peaks near 1730 and 1840 MHz, of about 30 and 70 kOhm/m, and weaker ones above 2400 MHz.

5. The wake potential

The wake potential is the wake in time, or rather in distance s behind the bunch: the voltage a following charge would see.

cell.wakefield.plot_wake('longitudinal');
../_images/3846a89fee53b1c68a14e19b43442ea872334dc02dbd90f79ff77a28c9f9d120.png

Behind the bunch the field keeps ringing, at about 1 V/pC, for the whole 20 m. The fundamental mode loses its energy very slowly, so its wake barely decays over this distance.

The loss-factor spectrum adds up the loss factor from zero frequency to each frequency. Its steps show which modes take the bunch’s energy.

cell.wakefield.plot_k_loss();
../_images/7c8c9f1056d5827b4fd0cbdb8fe0f18f8bbcbe8117c86eb323893a156387eac0.png

Each step is a mode taking its share of the bunch’s energy. The step near 1300 MHz is the fundamental mode, 0.151 V/pC, the k_FM above. The steps near 2420 and 3860 MHz add the higher-order modes’ 0.029 V/pC, reaching the total of 0.180 V/pC.

What you learned

  • cav.wakefield.run() runs ABCI; MROT, wakelength and bunch_length are the settings to choose.

  • cav.wakefield.qois holds the loss and kick factors, split into the fundamental mode and the higher-order modes.

  • plot_impedance(), plot_wake() and plot_k_loss() show where in frequency and in time the wake lives.

Next

Multipacting: electrons at the cavity wall that can multiply until they limit the field.