Benefit from supporting the cutting-edge researches in various disciplines and industry applications, such as physics, materials, bioscience, medicine, electronics, chemistry, etc., the advanced storage ring of 4th generation synchrotron radiation facility based on multi-bend achromat (MBA) lattices (also known as the diffraction-limited storage ring, DLSR) is emphasized and constructed world widely, pushing beyond the radiation brightness and coherence attained by the 3rd generation storage ring[1]. In the Institute of Advanced Light Source Facilities (IASF, Shenzhen, China), a storage ring of this type for Shenzhen Innovation Light-source Facility (SILF) is proposed and under preliminary design[2]. The SILF storage ring has a circumference of 696 m designed to circulate the electron beam with energy 3.0 GeV, current 200−300 mA and emittance about 84 pm·rad. There are totally 28 cells of two types (type I and type II with 2.0 T and 3.2 T SuperBend magnet, respectively) designed with hybrid 7BA (H7BA) lattice structure and grouped into 4 periodical supercells. Each supercell consists of six type I cells and one type II cell, symmetrically arranged and connected to form the whole storage ring. There are 1 SuperBend (SUPB), 4 longitudinal gradient bending (LGB), 16 quadrupole (QF/QD), 4 Q-bend (QB), 6 sextupole (SF/SD) and 2 octupole (OC) magnets as well as 4 fast and 2 slow independent corrector magnets in each cell. Meanwhile, one slow and one skew-quadrupole correctors are nested in each sextupole magnet by introducing additional windings. Each corrector magnet comprises the horizontal and vertical steering corrections. The QB magnets are dipole magnets with a gradient field in transverse direction, designed as transverse offset quadrupole magnet due to the required relatively high field gradients.
The physics design of SILF storage ring requires high integral field homogeneities for the above magnets of different types, typically lower than 3×10−4 in the good field region (GFR). Therefore, careful design and pole shape optimization should be carried out in the first place. There are some codes or algorithms developed for the multipole magnet pole shape optimization, such as conformal transformation, Poisson, Roxie, etc. However, they mainly focus on the 2D field optimization[3-4]. In this paper, we present a dedicated pole shape optimization procedure for the quadrupole and sextupole magnets using Opera-2D® PYthon script, with consideration of 3D field effect. For easy handling, the field calculation and optimization are fully controlled by the defined parameters and options. It is validated in the updated design of the quadrupole and sextupole magnets for SILF storage ring[5], demonstrating high accuracy, robustness and efficiency. In this paper, the updated designs of the quadrupole, sextupole and Q-Bend magnets are presented first, followed by a detailed description of the pole shape optimization procedure for quadrupole and sextupole magnets.
1 Quadrupole magnets design
According to SILF storage ring physics design, there are totally 11 types of quadrupoles, which can be categorized as 6 groups according to the magnetic lengths, i.e. QF1, QD1/QF3/QD3/QD5, QD2/QF2, QF4/QF5, QD4 and QD6. Figure 1 shows the layout of the QD/QF, SF/SD, OC, LGB and SUPB magnets in type I and type II cells. The required field gradient for different quadrupole types ranges from 27 T/m to 52 T/m, which is relatively low and the magnet pole material (steel laminations) works below saturation. As a result, different quadrupole types in one group share the same design but operate at different currents, and the maximum field gradient in each group is selected as the design value. The pole tip radius, good field radius and the minimum pole vertical gap of all the quadrupoles are designed as 16.0 mm, 9.0 mm and 12.6 mm, respectively. An integral field homogeneity of less than 3×10−4 in GFR is required for all the quadrupoles. The other basic design parameters are listed in Table 1.

Figure 1.Magnets layout of H7BA cell with 2.0 T SuperBend (type I) and 3.2 T SuperBend (type II)

Table 1. Basic design parameters of the quadrupoles
Table 1. Basic design parameters of the quadrupoles
magnets in groups | field gradient/ (T·m−1) | effective magnetic length/cm | current/A | turn number per winding | conductor size/(mm×mm) | power/kW | water flow rate/(L·min−1) | QF1 | 36.23 | 25.0 | 115.4 | 32 | 7×7 | 0.69 | 0.774 | QD1/QF3/QD3/QD5 | −36.2/34.8/−41.9/−37.0 | 18.0 | 133.4 | 32 | 7×7 | 0.77 | 0.852 | QD2/QF2 | −33.1/44.56 | 12.0 | 141.9 | 32 | 7×7 | 0.73 | 0.95 | QF4/QF5 | 51.5/48.0 | 35.0 | 163.9 | 32 | 8×8 | 1.39 | 1.50 | QD4 | −39.1 | 20.0 | 124.5 | 32 | 7×7 | 0.71 | 0.83 | QD6 | −28.0 | 16.0 | 89.1 | 32 | 7×7 | 0.33 | 0.88 |
|
The quadrupoles are designed as a four-in-one structure. The steel lamination with a thickness of 0.5 mm is selected as the yoke material, the laminations are stacked and compressed by the DT4 end plates and tie-rods. The assembled yoke length in longitudinal direction is designed as the effective magnetic length minus the pole tip radius. The pole shape of each group quadrupole is optimized using the developed optimization procedure. The optimization procedure considers the 3D field effect, as a result, without additional end chamfering, the integral field homogeneity in whole GFR fulfils the requirement. In order to minimize the influence of material nonlinearity, for the groups with more than one quadrupole type, a moderate current is selected during pole shape optimization, and the influence is confirmed as acceptable by checking the cases with minimum and maximum operation currents (as an example, for QD2 with operation current, the harmonics B6/B2, B10/B2, B14/B2 and B18/B2 are 2.84×10−5, 1.0×10−5, −1.17×10−5 and −3.04×10−7, respectively, and for QF2 with operation current, the harmonics are −4.85×10−5, 1.0×10−5, −1.15×10−5 and −3.52×10−7, respectively). The integrated field harmonics are also listed in Table 2. The integrated field still follows the 2D field theory when the integration path is extended far enough outside the magnet (so that the field has dropped to zero) and the effect of the magnetic field z-component can be disregarded[6]. As an example, Figure 2 shows the By integral field homogeneity in GFR, the optimized pole shape and the 3D mechanical design of QF1. The plot of Bx integral field homogeneity in GFR is the same as By but rotated by 90°. The integral field homogeneity in GFR is plotted according to the harmonics result from the system errors, i.e. the harmonics 6, 10, 14, …, 46 for quadrupoles and the harmonics 9, 15, 21, …, 69 for sextupoles, and it is verified by extracting the integral field homogeneity along the GFR circumference from the 3D field result.

Table 2. The integrated field harmonics of the quadrupoles
Table 2. The integrated field harmonics of the quadrupoles
magnets in groups | B6/B2 | B10/B2 | B14/B2 | B18/B2 | QF1 | −9.98E-6 | 1.68E-5 | −8.79E-6 | −4.65E-7 | QD1/QF3/QD3/QD5 | −2.26E-5 | 2.84E-5 | −1.21E-5 | −5.09E-7 | QD2/QF2 | −3.95E-6 | 1.01E-5 | −1.16E-5 | −3.20E-7 | QF4/QF5 | −3.52E-5 | 2.21E-5 | −8.80E-6 | −5.10E-7 | QD4 | −8.69E-6 | 1.21E-5 | −9.44E-6 | −2.63E-7 | QD6 | −3.35E-5 | 2.68E-5 | −1.10E-5 | 2.07E-7 |
|

Figure 2.The QF1 By integral field homogeneity in GFR (left), the optimized pole shape (middle) and the 3D mechanical design (right)
2 Q-bend magnets design
The Q-Bend magnets are basically quadrupoles installed with transverse offsets to obtain the required dipole fields. There are four types of Q-Bend magnets categorized into two groups based on the magnetic length, i.e. QB1/QB3 and QB2/QB4. The two types in one group share the same lamination and pole shape design. The transverse offsets (equal to B/G) for QB1, QB3, QB2 and QB4 are −13.31, −11.87, −5.38 and −5.62 mm, respectively. For each magnet group, the type with maximum transverse offset is selected for the design and optimization, so that the required dipole field and field gradient could be reached and adjusted by changing the transverse offset and operation current, respectively. The pole tip radius for QB1/QB3 and QB2/QB4 is designed as 28.0 and 20.0 mm, respectively. The good field radius for all Q-Bend magnets is 8.0 mm, however, considering the different transverse offset, the actual good field radius (origin at magnet center) is designed as 22.0 and 14.0 mm for QB1/QB3 and QB2/QB4, respectively. The minimum pole vertical gap for QB1/QB3 and QB2/QB4 is designed as 20.6 and 15.0 mm, respectively. The integral field homogeneity of all Q-Bend magnets is required to be less than is 3×10−4. Other basic design parameters are listed in Table 3.

Table 3. Basic design parameters of Q-bend and sextupole magnets
Table 3. Basic design parameters of Q-bend and sextupole magnets
magnets | field strength | dipole field/T | magnetic length/cm | current/A | turn number per winding | conductor size/(mm×mm) | power/kW | water flow rate/(L·min−1) | QB1/QB3 | −26.87/-29.08 T/m | 0.3576/0.3452 | 64.5/65.0 | 265.6/287.4 | 32 | 8×8 | 5.78/6.81 | 2.03/2.02 | QB2/QB4 | 51.43/51.16 T/m | −0.2766/-0.2876 | 45.0 | 237.2/236.1 | 36 | 8×8 | 4.94/4.89 | 1.95 | SF1/SD1/SD2 | 1900.4/−1853.1/−1532.8 T/m2 | / | 15.0 | 88.0 | 12 | 6×6 | 0.2 | 0.96 |
|
The Q-Bend magnets structure is similar to quadrupoles and uses the same materials. The pole shape of each group magnet is optimized using the developed optimization procedure, and the result slows that the integral field homogeneity in whole GFR fulfils the requirement without additional end chamfering. Table 4 lists the integrated field harmonics. Figure 3 shows the integral field homogeneity in GFR and the 3D mechanical design of QB4. Due to the small Bx values at the place close to x the x-axis and greater contribution from high harmonics, the Bx integral field homogeneity close to the GFR left edge is relatively high but still fulfils the requirement.

Table 4. The integrated field harmonics of Q-bend and sextupole magnets
Table 4. The integrated field harmonics of Q-bend and sextupole magnets
magnets | B6/B2, B9/B3 | B10/B2, B15/B3 | B14/B2, B21/B3 | B18/B2, B27/B3 | QB1 | −2.45E-5 | 1.32E-4 | −7.28E-5 | −2.0E-5 | QB2 | −7.02E-5 | 4.82E-5 | −2.50E-5 | −3.89E-5 | QB3 | −5.14E-5 | 1.32E-4 | −7.26E-5 | −1.98E-5 | QB4 | −6.93E-5 | 4.82E-5 | −2.50E-5 | −3.89E-6 | SF1/SD1/SD2 | 1.07E-5 | −7.52E-6 | 1.44E-6 | −8.49E-6 |
|

Figure 3.The QB4 Bxand By integral field homogeneity in GFR and the 3D mechanical design (right)
3 Sextupole magnets design
There are only three types of sextupole magnets with the same magnetic length (15.0 cm), pole tip radius (16.0 mm), good field radius (9.0 mm) and integral field homogeneity requirement (≤1.0×10−3). Therefore, they are categorized as one group, i.e. SF1/SD1/SD2. The required field strength of different types ranges from 1532.8 T/m2 to 1900.4 T/m2. The maximum field strength is selected as design value, the types with smaller field strength share the same design but operate at different currents. The minimum pole vertical gap is designed as 8.0 mm. The other parameters are listed in Table 3.
In order to minimize the influences of material inconsistency on field quality, the sextupoles are designed a as six-in-one structure and use the same materials as quadrupoles. The assembled yoke length in longitudinal direction is designed as the effective magnetic length minus 2/3 of the pole tip radius. The pole shape is optimized using the developed optimization procedure, and a moderate current is selected during pole shape optimization in order to minimize the influence of material nonlinearity. The optimization result shows that the integral field homogeneity in whole GFR meets the requirement without additional end chamferring. Figure 4 shows the integral field homogeneity in GFR and the optimized pole shape of SF1.

Figure 4.The SF1 Bx and Byintegral field homogeneity in GFR and the optimized pole shape (right)
Except the water-cooled main coils, each sextupole includes some nested coils to generate horizontal, vertical and skew quadrupole correction fields as illustrated in Figure 5. The required maximum integral field for horizontal and vertical correction is 1.0 T·cm corresponding to a kick angle of 1.0 mrad for the 3.0 GeV electron beam, and the required maximum gradient field for skew quadrupole correction is only 0.8 T/m. Therefore, naturally cooled plain coils wound from varnished copper wire are sufficient for the correction coils. Figure 6 shows the By and Bx integral field along x and y direction for horizontal and vertical correction, respectively.

Figure 5.The nested correction coils in sextupole magnet and the current directions (left) and the 3D mechanical design (right)

Figure 6.The integrated horizontal (left) and vertical (right) correction fields
4 Pole shape optimization method
The physics design of the storage ring usually requires high integral field homogeneity of the quadrupole and sextupole magnets, however, the 3D field effect related to the magnetic length and material nonlinearity affects the homogeneity significantly. Pole shape optimization with 3D model on the other hand is unrealistic due to the low efficiency. As a result, a dedicated pole shape optimization procedure is developed using Opera-2D® Python script for quadrupole and sextupole magnets with the consideration of 3D field effect. The python ‘operapy module’ provided in Opera-2D® program as well as other scientific calculation modules allows user to create and interact with Opera-2D models by scripting and parameterization. The following aspects are considered and achieved in the procedure:
Magnetic field calculation and pole shape optimization are fully controlled by the defined parameters and options, such as the initial pole outline, coil cross-section, mesh sizes, air field sizes, pole and coil position tolerances, 2D and 3D field fitting coefficients, current and turn number, etc. Only the 1/8 (quadrupole) or 1/12 (sextupole) initial pole outline in the first quadrant is necessary input by user (as shown in Figure 7), other parts will be symmetrically constructed by the code.

Figure 7.The initial pole outline definition by input the points coordinates (left) and explanation of the substituted smooth curve (right)
The hyperbolic or arc connection between two adjacent points could be specified and constructed, the defined hyperbola will be discretized into short lines. During pole shape optimization, as illustrated in Figure 7, the points of the discretized lines are partially adjusted following the smooth curve. The connections between the curve and other lines are tangential in order to reduce the field saturation. The height of the horizontal line is half of the defined minimum pole vertical gap and the width Δx is adjusted in the i-loop (see Figure 8 for the optimization chart flow). In order to save run time, the curve start point is not searched by the code in another loop, but input as a parameter by the user.

Figure 8.The chart flow for quadrupole and sextupole magnets pole shape optimization
After each run during the optimization process, the field harmonics in GFR are analyzed automatically. The program finds the case with minimum value of the summed harmonics square (objective function) as optimum. User at the same time could change the weighting factor of the harmonics in objective function. The minimum allowable value of the harmonic B6/B2 (quadrupole) or B9/B3 (sextupole) could also be controlled by input parameter. In case of considering the 3D field effect, a negative harmonic B6/B2 or B9/B3 is usually ensured in order to retain adequate adjusting space for pole end chamfering afterwards (if necessary).
In order to consider the 3D field effect, an initial run of the unoptimized pole with Opera-3D® is necessary, then the fitting coefficients of 2D and 3D fields (Br and Bθ) are obtained and considered in the subsequent optimization. Usually the fitting coefficients are not sensitive to the pole shape, however, user could update them by another 3D run after first optimization. Nevertheless, a final run with Opera-3D® is necessary to confirm the optimization result. As an example, Figure 9 shows the fitting of the ratio from 2D to 3D fields of a quadrupole magnet, only the fields Br and Bθ along the 1/8 GFR circumference are fitted following the equations:

Figure 9.Fitting of the ratio between 2D and 3D fields of a quadrupole magnet
$ {B}_{r,3\mathrm{D}}=\left[{a}_{0} \mathrm{cos}\left(4\theta \right)+{b}_{0} \mathrm{sin}\left(4\theta \right)+{c}_{0}\right] {B}_{r,2\mathrm{D}} $ (1)
$ {B}_{\theta ,3\mathrm{D}}=\left[{a}_{1} \mathrm{cos}\left(4\theta \right)+{b}_{1} \mathrm{sin}\left(4\theta \right)+{c}_{1}\right] {B}_{\theta ,2\mathrm{D}} $ (2)
where a0, b0, c0, a1, b1 and c1 are the fitting coefficients.
In case of considering the pole or coil manufacturing / assembly tolerances, field calculation with full model is performed, which is useful for the evaluation of the influences of manufacturing/assembly tolerances on field quality.
In practice, users need to decide or find the appropriate values of some of the parameters based on their experiences, such as the minimum pole vertical gap, harmonics weighting factor and the minimum allowable value of harmonic B6/B2 or B9/B3, so as to attain the desired harmonics that meet the field quality requirement. Such process doesn’t take very long time since it is fast for one optimization run (usually less than one hour). The above optimization activities indicate that the optimized field harmonics from the optimization procedure the results of corresponding 3D field calculation meet well. Therefore, the optimization procedure is verified as effective, robust and accurate.
Moreover, in order to facilitate the 3D field calculation of multipole magnets in Opera-3D®, another procedure for fast modelling is developed in python. The procedure defines all the necessary parameters and options for different magnet types (dipole, quadrupole, sextupole and octupole magnets), such as the yoke length in longitudinal direction, magnet location and orientation in global coordinate system, air field sizes, mesh sizes, coil type and size, current and turn number, pole end chamfer sizes, etc. The procedure reads the optimized pole coordinates and outputs the ‘comi’ script that is ready to be executed in Opera-3D®.
5 Conclusion
The multipole magnets in SILF storage ring are under preliminary design, which require high integral field homogeneity. Therefore a dedicated pole shape optimization procedure is developed for the quadrupole and sextupole magnets using Opera-2D® python script with the consideration of 3D field effect. In this paper, the magnet configuration in SILF storage ring is first introduced. The design details of SILF quadrupole and sextupole magnets are then presented. The pole shape is optimized using the developed optimization procedure, and the results show that the integral field homogeneity in GFR meets the requirements without additional pole end chamfering. Finally, the pole shape optimization procedure is illustrated in detail, which is verified as effective, robust and accurate.