Coupling physics with Geometrica

Bruno Autin

Physicist, Geometrica's developer

Introduction

The lattice of a particle accelerator is made of cells which, in general, are not all the same because they achieve different functions. The most common cell  is made for the transport of the beam. In its simplest form, it is built of focusing and bending magnets separated by drift sections. The focusing magnets are of type F or D whether they focus or defocus in the horizontal plane. The functions are reversed in the vertical plane. This is a basic difference with light optics where any lens focuses or defocuses in all planes. The reason for that behaviour lies in the effect of Maxwell's law on charged particles. The first problem is to make a set of focusing and defocusing magnets globally focusing. The theory of accelerator lattices was limited to rather simple structures. The advent of Mathematica has permitted the analytical exploration of more sophisticated structures such as the one studied in the present paper where one tries to make the transit time independent of the momentum. This example has been chosen because it cannot be understood without the help of geometry.

Physical context

In the famous experiment on the fall of the bodies, the time for the ball M to roll from the point A to the point B is shorter on an arc of cycloid than on a straight ramp. This rather surprising property is due to the fact that the mean velocity is greater along the cycloid than along the straight ramp and more than compensate the handicap of a longer path. The diagram of the segment of straight line and of the cycloid is a reminder of Geometrica functions.

cyc = 
        PPoint[(Cos[#] + #) &, Sin[#] &, 
          PRange -> {0, 2  π + π, 
              25}];
{a, b, m} = 
        Pointer[cyc, π/2 {1, 4, 2}];
s = Segment[a, b];
te = 
        Legend[{"A", "B", "M"}, {a, b, m}, 
          Offset -> {1, 0}];
Draw[Red, cyc, Blue, a, b, s, te, Black, m];

In a particle accelerator, one may have a similar situation. If one takes as a reference the orbit of a particle of given momentum (Subscript[p, 0]), a particle of larger momentum usually travels on a longer orbit but, as its velocity is greater, its time of flight may be shorter. The design of the orbits in an accelerator is actually an art and, in the example chosen here, the orbits have the same length for any momentum and ultra-relativistic particles (γ close to ∞) have the same time of flight. Such a structure is called an IsoPeriod in BeamOptics. It is characterized by the number of focusing cells and the perturbation introduced into the distribution of the bending magnets. In this case, the number of cells is 5 and the first magnet is missing. The focusing and bending magnets are respectively 0.5 m and 2 m long. The options specify the length of a cell (10 m) and the shape of the bending magnets, here they have parallel end faces.

<< BeamOptics`BeamOptics06`

ip = 
      Timing@IsoPeriod[5,  .5, 2, CellLength -> 10, 
          Edge -> Automatic]

The result comes in the form of a list of replacement rules so that all the data of the machine have a non ambiguous name and can be easily used for other calculations. The change of time of flight on two different orbits is indicated by the RelativeTimeDispersion rule and, as wanted, is very small. The blue and red curves are the envelopes of the vertical and horizontal oscillations of the particles, more precisely called the betatron oscillations characterized by the σ-vectors (SigmaEnd). The green curve is the orbit of a particle which has a momentum twice as large as the reference momentum, it is called the orbit dispersion characterized by the D-vector  (DVectorEnd). For the next calculations, the beam line (BeamLine), the horizontal and vertical σ vectors and the D-vector are needed. As the machine lies in the horizontal plane, there is no vertical orbit dispersion.

{ch, {sih, siv}, dv} = {BeamLine, SigmaEnd, DVectorEnd} /. 
          ip[[2]];

Visualizing the machine

The very first thing one wants to do is to draw the layout of the machine. This is pure geometry whose elements can be extracted from the description of the beam line, namely the lengths of magnet and drifts and the angle of the bending magnets. There is a refinement in the shape of the bending magnets. If the faces are parallel, a rectangle is drawn. If the end faces are tilted (option Edge), a trapezoid with the proper angle of the faces is drawn. The polygonal shape which joins the points at the input and output of the elements can be used for the survey of the machine. The function of Geometrica has been adapted to the layout of accelerators and the only specification of the beam line of head Channel suffices to give all the information. Naming the elements is optional and has to be specified in each element. Coloring can also be modified. The function Draw of Geometrica has been tailored to draw a beam line of head Channel.

Draw[ch];

Orbit shapes

Classical programs of optics plot the dispersion function along a stretched machine whose reference orbit is a straight line.

DPlot[ch, dv, PlotStyle -> Red];

It is then impossible to understand that the orbit length of the off-momentum orbit (in red in the above figure) is the same as the one of the black straight segment which lies on the s-axis. The difficulty can only be resolved by plotting the D-function in a curvilinear system.

AbsoluteDPlot[ch, dv];

One can now trust the tiny path length difference between the two orbits returned by IsoPeriod since the distance along the red curve is lengthened outside of the black reference orbit and shortened inside. The need for such a precise representation has triggered the design of the Paraxial function of Geometrica. That function is a generalization of the concept of parallel curves. It is obtained by modulating the length of the segment normal to the reference orbit by the dispersion function calculated in BeamOptics. It has to be noted that, using Mathematica, it is natural to describe the orbit as an exact continuous function everywhere. This is not the case in other programs where the orbit is calculated correctly at the input and output of the elements only and then interpolated inside the element.

Beam size

The size of a beam depends on the amplitude of the betatron oscillations and on the orbit dispersion. The two contributions add-up linearly when the orbit dispersion is dominant and quadratically otherwise. In the horizontal plane, the envelope of the betatron oscillations can also be plotted in the curvilinear  system of the reference orbit although there is no dramatic effect in the representation. Here, the modulation of the paraxial curve is given by the β-function, the first component of the σ-vector.

AbsoluteBetaPlot[ch, sih];

In the vertical plane, there is no orbit curvature and a staight representation is valid.

BetaPlot[ToVertical@ch, siv];

The effective envelope of the betatron oscillations depends on a quantity which characterizes the source of the beam and called the emittance ϵ

(Subscript[x, β]) = (Sqrt[(Subscript[ϵ, x]) (Subscript[β, x])])
(Subscript[y, β]) = (Sqrt[(Subscript[ϵ, y]) (Subscript[β, y])])

The space occupied by the orbits depends on the relative momentum acceptannce Δ(p/(Subscript[p, 0]))

(Subscript[x, D]) = D Δ(p/(Subscript[p, 0]))

The beam size given in the next figure corresponds to anomalously large values of emittance and momentum acceptance; these values have been used only for a clearer legibility.

AbsoluteBeamPlot[ch, sih, dv, HorizontalEmittance ->  .1, 
        HalfMomentumAcceptance -> 0.1];

The vertical beam size is plotted along a straight reference orbit.

BeamPlot[ToVertical[ch], siv, DVector[0, 0]];

Apertures

One technological aspect directly related to the beam size is the design of the vacuum chamber inside which the beam circulates. It does not fit the beam shape, it is rather straight in focusing magnets and drift spaces and sometimes bent in the bending magnets to avoid an excessive widening of the chamber due to the sagitta of the reference orbit. The aperture of the vacuum chamber in a given element corresponds to the maximum beam size in that element. The next figure shows a profile of the horizontal aperture. A straight reference system is chosen because the distances are easier to measure than in a curvilinear system.

ap = 
        AperturePlot[ch, sih, dv, HorizontalEmittance -> 1, 
          HalfMomentumAcceptance -> 1];

The beam size in the same straight reference system is represented in the next figure.

bp = 
        BeamPlot[ch, sih, dv, HorizontalEmittance -> 1, 
          HalfMomentumAcceptance -> 1, 
          GridLines -> None];

By superimposing the two previous plots, one can understand how the aperture has been derived from the beam size.

Show[bp, ap];

The same procedure can be repeated for the vertical plane.

Once the aperture is known in the two planes, each element is characterized by a pair of numbers ((Subscript[a, x]),(Subscript[a, y])) which can be used to define the cross-section of the vacuum chamber. The simplest shape is a rectangle of sides parallel to the x- and y- axes and half-length (Subscript[a, x]) and (Subscript[a, y]). However, this shape is not necessarily the best one because it is deformed by the atmospheric pressure and may, in the real conditions of operation of an accelerator , lead to a reduction of the physical aperture. Another possible shape is an ellipse. As an ellipse circumscribed to a rectangle is not uniquely defined, some criterion of choice has to be invoked. We have chosen the ellipse of minimum area which is defined in Geometrica and given by the syntax MinimumEllipse[a,b]. All the vacuum chambers corresponding to the calculated beam aperture in each element is given by

vca = VacuumChamberAll[ch, sih, siv, dv];

The shape of the chamber is the optional parameter VacuumChamberShape which can be set to MinimumEllipse (default) or Rectangle. Clearly, it would be a bad idea to fabricate one vacuum chamber per element but, to have all the possible choices permits a rational choice. The largest chamber is at the beginning of the beam line where the orbit dispersion is maximum.

vc1 = vca[[1]]

and the smallest one near the middle of the line where the orbit dispersion is near 0

vc15 = vca[[15]]

A real chamber has a thickness, say 3 mm. To define it by the only ellipse is not sufficient. The ellipse is the inner face and the outer face is the curve parallel to the ellipse at a distance equal to the thickness of the chamber. Geometrica has the function Parallel[c,d] to calculate the curve parallel to c and at the distance d from c. It is actually a special case of Paraxial[c,f] where the pure function f is reduced to a constant. The definition of the vacuum chamber is thus a list of two curves: the ellipse given by its cartesian coordinates and its parallel (which come first) given by a parametric point like the cycloid shown in the introduction.

For the representation of the vacuum chamber, the two curves are painted but the second is white so that it is only the vacuum chamber itself which has a color.

g1 = 
        Draw[Paint[vc1, {Blue, White}],  
          DisplayFunction -> Identity];
g15 = 
        Draw[Paint[vc15, {Red, White}],  
          DisplayFunction -> Identity];
Show[g1, g15, DisplayFunction -> $DisplayFunction]

Conclusion

The design of the vacuum chamber of a particle accelerator might be considered as a very specialized example of coupling between physics and geometry. That would be a short sighted point of view. Even within the same context, the process can be and is actually used to build magnets, accelerating structures and up to the tunnel which accommodates all the components of the machine. Though not yet applied on a large scale, a boat or a building could be designed in the same manner. The point is to have a program of geometry which integrates the constraints of a real project and especially the ability to describe thick elements. Geometrica and Mathematica, with their tools and their deep level of integration are very efficient to apply that methodology.