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:
Run a wakefield analysis on one cell with beam pipes.
Read the loss and kick factors.
Plot the longitudinal and transverse impedance.
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');
2. Run the wakefield analysis¶
Three settings matter most:
MROTchooses what to compute:0the longitudinal wake,1the transverse wake,2both.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 |
|---|---|
|
the longitudinal loss factor: the energy the bunch loses, per unit charge squared |
|
the part of it left in the fundamental, accelerating, mode |
|
the rest, left in higher-order modes |
|
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');
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');
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');
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();
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,wakelengthandbunch_lengthare the settings to choose.cav.wakefield.qoisholds the loss and kick factors, split into the fundamental mode and the higher-order modes.plot_impedance(),plot_wake()andplot_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.