5. Constructing the Ring¶
Ring Construction¶
Fig. 12 Mirror symmetry about the centers of each straight section.¶
In the previous chapters, forward and reverse arc cells, forward and reverse straight section cells, and forward and reverse lines to connect the arcs to the straight sections (with dispersion suppression and matching of the beta functions) were constructed. In this chapter, the entire ring is created, based on the figure above. All that is left is a section to match the straight section to the arc, including dispersion “creation” and matching of the beta functions, as shown in the figure of a sextant below.
Fig. 13 A sextant of the ring.¶
Does this mean that a dispersion creator for both the forward and reverse sextants needs to be matched? Fortunately, no! Considering the mirror symmetry shown above, the quadrupole settings for the forward sextant dispersion suppression and matching are equal to the quadrupole settings for the reverse dispersion creation and matching. Likewise, the reverse dispersion suppression and matching quadrupole settings are equal to those of the forward dispersion creation and matching. Therefore, no matching is necessary here. All that is needed is to connect the lines together.
Example: Forward Straight Section to Arc¶
Start with the lattice of chapter 3:
include("lattices/03-match-to-straight.jl");
As an example, the forward line to connect the straight section to the arc, ss_to_arcf, will be
constructed. Following the figure of the sextant, both the matching section to the dispersion
creator (mdcf) and the dispersion creator itself (dispcref) need to be constructed. By the
mirror symmetry, ss_to_arcf uses the same quadrupoles as arc_to_ssr, in reverse order. Keeping
with our convention of starting each line with a full horizontally focusing quadrupole, this is
# Match the forward straight section to the dispersion creator (reverse quadrupoles)
mdcf = [qfss, d1, db, d2, qdr3, d1, db, d2, qfr3, d1, db, d2, qdr2, d1, db, d2]
# Forward dispersion creator (reverse quadrupoles)
dispcref = [qfr2, d1, bh, d2, qdr1, d1, bh, d2, qfr1, d1, bh, d2, qd, d1, bh, d2]
ss_to_arcf = [mdcf; dispcref];
Note that the elements in a forward line keep the forward order of the drifts (d1 after a
quadrupole, d2 before it); only the quadrupoles come from the reverse sextant.
After matching the straight sections to the arcs, it is now time to construct the full ring. The
reverse line ss_to_arcr is constructed in the same way (exercise 1). In
Julia,
repeat(fodoaf, 20) repeats the cell 20 times, and
[a; b; c] joins the lines a, b and c:
sextant1 = [repeat(fodossf, 4); ss_to_arcf; repeat(fodoaf, 20); arc_to_ssf; repeat(fodossf, 4)]
sextant3 = [repeat(fodossr, 4); ss_to_arcr; repeat(fodoar, 20); arc_to_ssr; repeat(fodossr, 4)]
sextant5 = [repeat(fodossf, 4); ss_to_arcf; repeat(fodoaf, 20); arc_to_ssf; repeat(fodossf, 4)]
sextant7 = [repeat(fodossr, 4); ss_to_arcr; repeat(fodoar, 20); arc_to_ssr; repeat(fodossr, 4)]
sextant9 = [repeat(fodossf, 4); ss_to_arcf; repeat(fodoaf, 20); arc_to_ssf; repeat(fodossf, 4)]
sextant11 = [repeat(fodossr, 4); ss_to_arcr; repeat(fodoar, 20); arc_to_ssr; repeat(fodossr, 4)]
ring = Beamline([sextant1; sextant3; sextant5; sextant7; sextant9; sextant11],
species_ref=electron, pc_ref=pc_ref)
Beamline:
species_ref = electron
pc_ref = 1.7846262612447e10
Index Name Kind L [m] s [m] s_downstream [m]
1 qfss Quadrupole 0.5 0.0f0 0.5
2 d1 Drift 0.609 0.5 1.109
3 db Drift 5.855 1.109 6.964
4 d2 Drift 1.241 6.964 8.205
5 qdss Quadrupole 0.5 8.205 8.705
6 d1 Drift 0.609 8.705 9.314
7 db Drift 5.855 9.314 15.169
8 d2 Drift 1.241 15.169 16.41
9 qfss Quadrupole 0.5 16.41 16.91
10 d1 Drift 0.609 16.91 17.519
11 db Drift 5.855 17.519 23.374
12 d2 Drift 1.241 23.374 24.615
13 qdss Quadrupole 0.5 24.615 25.115
14 d1 Drift 0.609 25.115 25.723999999999997
15 db Drift 5.855 25.723999999999997 31.578999999999997
16 d2 Drift 1.241 31.578999999999997 32.82
17 qfss Quadrupole 0.5 32.82 33.32
18 d1 Drift 0.609 33.32 33.929
19 db Drift 5.855 33.929 39.784000000000006
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
1709 rows omitted
The optics of the whole ring:
tw = twiss(ring)
Twiss:
summ:
q1 = 54.66960302154467
q2 = 54.00669961580698
etac = 0.0006460281674751323
alphac = 0.0006460289873460063
df:
1729×26 DataFrame
Row │ index name kind s beta1 phi1 dx x beta2 phi2 ⋯
│ [m] [m] [2π] [m] [m] [m] [2π] ⋯
──────┼─────────────────────────────────────────────────────────────────────────────────────────────
1 │ 1 qfss Quadrupole 0.0 27.206 0.0 2.08834e-8 0.0 4.96091 0.0 ⋯
2 │ 2 d1 Drift 0.5 27.206 0.00288245 2.08834e-8 0.0 4.96091 0.01
3 │ 3 db Drift 1.109 24.3721 0.00664688 1.97561e-8 0.0 5.64348 0.03
4 │ 4 d2 Drift 6.964 6.54705 0.0833517 8.91782e-9 0.0 21.6264 0.12
5 │ 5 qdss Quadrupole 8.205 4.96091 0.118288 6.62059e-9 0.0 27.206 0.13 ⋯
6 │ 6 d1 Drift 8.705 4.96091 0.134594 5.97482e-9 0.0 27.206 0.13
7 │ 7 db Drift 9.314 5.64348 0.152953 5.51752e-9 0.0 24.3721 0.13
⋮ │ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋱
1724 │ 1724 d1 Drift 3825.23 5.64348 54.5195 5.51751e-9 0.0 24.3721 53.88
1725 │ 1725 qdss Quadrupole 3825.84 4.96091 54.5379 5.97481e-9 0.0 27.206 53.88 ⋯
1726 │ 1726 d2 Drift 3826.34 4.96091 54.5542 6.62059e-9 0.0 27.206 53.89
1727 │ 1727 db Drift 3827.58 6.54705 54.5891 8.91781e-9 0.0 21.6264 53.89
1728 │ 1728 d1 Drift 3833.43 24.3721 54.6658 1.97561e-8 0.0 5.64348 53.98
1729 │ -1 END --- 3834.04 27.206 54.6696 2.08834e-8 0.0 4.96091 54.00 ⋯
17 columns and 1716 rows omitted
using CairoMakie
fig = Figure(size=(800, 450))
ax = Axis(fig[1, 1], ylabel="β [m]")
lines!(ax, tw.s, tw.beta1, label="β₁")
lines!(ax, tw.s, tw.beta2, label="β₂")
axislegend(ax, position=:rt)
ax2 = Axis(fig[2, 1], xlabel="s [m]", ylabel="η [m]")
lines!(ax2, tw.s, tw.dx)
linkxaxes!(ax, ax2)
fig
The beta functions are periodic in the cells of the arcs and of the straight sections, and the dispersion is zero in the straight sections:
maximum(abs, tw.dx[1:33]) # Through the first straight section: the elements 1 to 32 [m]
2.088338236776421e-8
Here 1:33 are beamline indexes: the beginnings of the elements 1 to 32 of the ring, and of the
element 33, which is the end of the straight section.
Exercises¶
Reverse straight section to arc: Construct
ss_to_arcr, using the example above and the figures of the ring and of the sextant.Construct the ring: Construct the ring yourself from the lines of the previous chapters, as above. What are its tunes? Why are they not multiples of the phase advances of the cells?
Check that the ring closes geometrically: The sum of the bend angles must be \(2\pi\):
sum(ele.g_ref*ele.L for ele in ring.line). Compute also the global coordinates at the end of the ring, with the loop of Machine Coordinates: they must be those at the beginning. What is the circumference of the ring?Floor plan: Plot the global coordinates \(Z\) against \(X\) at the exit ends of all elements, to draw the floor plan of the ring. Can you see the six arcs and straight sections? Draw the floor plan of one sextant.
The lattice file of this chapter is
lattices/05-ring.jl.