2. An elliptical cavity and its figures of merit¶
Most superconducting linacs use cavities made of elliptical cells: the rounded walls keep the fields on the surface low. Here you build one cell of the TESLA cavity, read its figures of merit, then build the full 9-cell cavity and see how coupled cells behave.
In this tutorial you will:
Build one elliptical cell from its seven dimensions.
Read its figures of merit, including the peak fields on the wall.
Build the 9-cell TESLA cavity, with its end cells and beam pipes.
Find its accelerating mode, the pi-mode, among the modes of its passband.
Check that the accelerating field is the same in every cell.
Look at the field, and at the dipole modes.
Before you start: work through Your first cavity. Running the whole notebook takes about a minute.
1. One elliptical cell¶
An elliptical cell is built from two ellipses joined by a straight line: one at the
equator, the outer wall, and one at the iris, the opening the beam passes through.
Seven numbers in millimetres describe half of a cell, [A, B, a, b, Ri, L, Req]:

parameter |
meaning |
|---|---|
|
half-axes of the equator ellipse, along \(z\) and along \(r\) |
|
half-axes of the iris ellipse |
|
radius of the iris |
|
length of the half-cell, from the iris to the equator; a full cell is |
|
radius of the equator |
These are the dimensions of a cell in the middle of the TESLA cavity.
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='none', name='tesla_cell')
cell.plot('geometry');
With no beam pipes, the cell ends at its two iris planes. The solver treats those as symmetry planes, which is how a cell in the middle of a long cavity behaves in its accelerating mode.
2. The figures of merit of one cell¶
cell.eigenmode.run();
q = cell.eigenmode.qois
for key in ['freq [MHz]', 'R/Q [Ohm]', 'G [Ohm]', 'Epk/Eacc []', 'Bpk/Eacc [mT/MV/m]']:
print(f'{key:20s} {q[key]:8.3f}')
freq [MHz] 1300.202
R/Q [Ohm] 113.470
G [Ohm] 271.066
Epk/Eacc [] 1.992
Bpk/Eacc [mT/MV/m] 4.171
The new quantities are the peak fields on the wall, relative to the accelerating field \(E_{acc}\), the energy a particle gains per metre:
Epk/Eacc, the peak electric field: a high one pulls electrons out of the wall (field emission).Bpk/Eacc[mT per MV/m], the peak magnetic field: a high one makes a superconducting wall lose its superconductivity (a quench).
Both limit how high \(E_{acc}\) can go, so a cell design keeps them low while keeping R/Q high.
The solver’s field has an arbitrary amplitude, so qois also holds absolute values
such as Vacc [MV] and Eacc [MV/m] that are tiny numbers. The ratios and R/Q do
not depend on the amplitude, and those are the numbers to compare.
For this cell: 1300.2 MHz, an R/Q of 113.5 Ohm, a geometry factor of 271.1 Ohm, and peak-field ratios of 1.99 and 4.17 mT/(MV/m). cavsim2d reports R/Q in the linac convention, \(V^2/(\omega U)\); some references quote half of that.
3. The 9-cell cavity¶
The TESLA cavity has nine cells. The two end cells have their own dimensions,
because each sits next to a beam pipe rather than another cell. beampipe='both'
adds a beam pipe at each end.
end_cell_left = [40.34, 40.34, 10, 13.5, 39, 55.716, 103.353]
end_cell_right = [42, 42, 9, 12.8, 39, 56.815, 103.353]
tesla = EllipticalCavity(9, mid_cell, end_cell_left, end_cell_right,
beampipe='both', name='tesla')
tesla.plot('geometry');
4. The passband and the pi-mode¶
Nine coupled cells resonate together in nine modes with close frequencies, called a passband. The modes differ in how the field’s phase changes from one cell to the next. In the highest, the pi-mode, the field flips sign from each cell to the next, so a particle that crosses one cell in half an RF period is pushed forward in every cell. That is the accelerating mode.
tesla.eigenmode.run();
tesla.eigenmode.qois_df[['mode', 'freq [MHz]', 'R/Q [Ohm]']].round(3)
| mode | freq [MHz] | R/Q [Ohm] | |
|---|---|---|---|
| 0 | 0 | 1276.660 | 0.001 |
| 1 | 1 | 1278.723 | 0.000 |
| 2 | 2 | 1281.898 | 0.005 |
| 3 | 3 | 1285.818 | 0.001 |
| 4 | 4 | 1290.020 | 0.007 |
| 5 | 5 | 1293.998 | 0.001 |
| 6 | 6 | 1297.263 | 0.058 |
| 7 | 7 | 1299.405 | 0.075 |
| 8 | 8 | 1300.177 | 1011.953 |
| 9 | 9 | 2381.548 | 0.126 |
| 10 | 10 | 2386.432 | 0.259 |
The first nine modes, from 1276.7 to 1300.2 MHz, are the passband: each cell holds the same kind of field, with a different phase from cell to cell. Only mode 8, the highest, has a large R/Q, 1012 Ohm. In the other eight the cells’ contributions cancel, and R/Q is below 0.1 Ohm. Modes 9 and 10, near 2382 MHz, belong to the next passband.
q = tesla.eigenmode.qois
print('mode of interest', q['mode_of_interest'])
for key in ['freq [MHz]', 'R/Q [Ohm]', 'kcc [%]', 'ff [%]']:
print(f'{key:16s} {q[key]:9.3f}')
mode of interest 9
freq [MHz] 1300.177
R/Q [Ohm] 1011.953
kcc [%] 1.825
ff [%] 97.163
qois reports the pi-mode. Its mode_of_interest is 9, counting from 1: it is
mode 8 in the table above, which counts from 0 (see mode numbering). Its R/Q, 1012 Ohm, is about nine times the single cell’s
113.5 Ohm: the nine cells add up.
Two figures of merit only exist for several cells:
kcc, the cell-to-cell coupling, is 1.83 %: the width of the passband relative to its centre, which says how strongly neighbouring cells are coupled.ff, the field flatness, is 97.2 %. Section 5 shows what it measures.
tesla.eigenmode.plot_spectrum();
Each line is a mode. The nine modes of the passband crowd together just below 1300 MHz, with a triangle at their mean frequency; the next passband starts near 2380 MHz.
5. A flat field¶
The field of the pi-mode along the axis shows whether every cell does its share of the accelerating.
tesla.plot_axis_field();
The field has one peak per cell, nine in all. The solid line marks the highest cell
peak and the dashed line the lowest. The field flatness is the lowest over the
highest, 97.16 % here, the ff in qois: every cell gives the beam nearly the same
push. Beyond the end cells the field dies away, because the beam pipes are too
narrow for this mode to travel along them.
6. The field, and the dipole modes¶
show_fields() shows the mode whose figures of merit qois reports, here the
pi-mode.
tesla.show_fields();
So far the solver has found monopole modes, whose field is the same all the way round the axis. Dipole modes vary once around it, and push a passing beam sideways. They matter for beam stability, and Tutorial 7 comes back to them. Solve them by naming the polarisation; the monopole results stay as they are.
tesla.eigenmode.run({'polarisation': 'dipole'});
modes = tesla.eigenmode.qois_df
modes[modes['polarisation'] == 'dipole'][['mode', 'freq [MHz]', 'R/Q [Ohm]']].round(3)
| mode | freq [MHz] | R/Q [Ohm] | |
|---|---|---|---|
| 11 | 0 | 1620.702 | 0.080 |
| 12 | 1 | 1628.315 | 1.206 |
| 13 | 2 | 1641.145 | 0.199 |
| 14 | 3 | 1658.953 | 6.332 |
| 15 | 4 | 1681.088 | 0.410 |
| 16 | 5 | 1706.529 | 80.360 |
| 17 | 6 | 1733.938 | 118.453 |
| 18 | 7 | 1761.729 | 16.524 |
| 19 | 8 | 1789.029 | 9.997 |
| 20 | 9 | 1799.359 | 5.011 |
| 21 | 10 | 1837.291 | 3.228 |
Eleven dipole modes, between 1621 and 1837 MHz. Two of them, mode 6 at 1734 MHz and mode 5 at 1707 MHz, have by far the largest R/Q, 118 and 80 Ohm, so a passing beam excites them most strongly.
tesla.eigenmode.plot_spectrum();
What you learned¶
An elliptical cell is described by seven dimensions,
[A, B, a, b, Ri, L, Req]; a multicell cavity takes one list for its inner cells and one for each end cell.R/Q, G and the peak-field ratios
Epk/EaccandBpk/Eaccare the figures of merit of a cell.Coupled cells form a passband; the pi-mode is the accelerating mode, and
cav.eigenmode.qoisreports it.kccis the coupling between cells andffthe field flatness;plot_axis_field()shows the field cell by cell.Other polarisations (
'dipole','quadrupole', …) are solved by naming them.
Next¶
Is the mesh fine enough?: how to check that a figure of merit belongs to the cavity and not to the mesh.