# Investigation into the Uniformization of Proton Beams for FLASH Therapy
## 3 The Physical Principle of Beam Uniformization Using Nonlinear Magnet  
The main function of the transport line shown in Figure 6 is to adjust the envelope and spot size of the proton beam, match the transverse and longitudinal phase spaces, and deliver the beam to the corresponding treatment room [26]. The extraction proton beam from a medical synchrotron has an energy range between 70 MeV and 235 MeV, with an emittance ranging from 1 to 10 \(\pi\)-mm\(\cdot\)mrad [26]. The divergence angle, energy spread, and beam radius are crucial factors in determining the characteristics and behavior of the beam as it progresses through the transport line and interacts with the treatment room components. The specified number of particles indicates the scale at which the simulation or modeling is conducted, allowing for a detailed analysis of the proton beam dynamics. Figure 5: Three-dimensional design diagram of step-like magnet. Figure 6: _Cont._The transport line is primarily composed of two dipole magnets with a bending angle of 30\({}^{\circ}\) and a curvature radius of 1500 mm, offset sections, collimators, and ten quadrupole magnets. Figure 4b shows the envelope figure of the beam. \(\sigma_{0}\) is the RMS radius of the beam envelope. According to the formula \(\sigma_{0}=\sqrt{\varepsilon\beta_{0}}\), the envelope of the beam is related to the emittance of the initial particle distribution and the linear element in the optical path. Table 3 lists the design parameters for the dipole and quadrupole magnets, where the magnetic field gradient represents the setting parameters of the quadrupole magnet and the radius curvature of the central trajectory represents the dipole magnet. M1 and M2 in Figure 6 represent the insertion positions of two pairs of nonlinear magnets. Among them, DIP represents a dipole magnet; according to the design needs, the curvature of the two bipolar irons is 1500 mm and the bending angle is 30\({}^{\circ}\). QP stands for quadrupole magnet. The radius, length, and magnetic field gradient of the quadrupole magnet and the length of drifts are mainly determined by the size of the envelope when the beam passes through the first and second nonlinear magnets and the \(\beta\) value of the horizontal and vertical amplitude functions; the modulation parameters were realized using TRANSPORT 1998 software [27]. As shown in Figure 7, the data input into the transport software mainly consists of the design parameters of the initial particle bundle (including the design of TWISS parameters) and the LATTICE structure design parameters of each element (including the length of the element L, focusing constant K1). The TWISS parameters at the nonlinear magnets are modified using the \"FIT\" command, and the modified results were imported into the TraceWin 2021 [28] beam dynamics software to convert the corresponding gradient value (G), and the aperture size (R) in the corresponding LATTICE was modified according to the envelope size, and the optimal solution are obtained through repeated optimization. Figure 6: (a) The initial distribution of a proton beam with an energy of 233 Mev is used as an example to set by the following parameters, proton energy: 233 MeV, emittance: 1.0000 \(\pi\)-mm\(\cdot\)mrad, initial divergence angle: 1.74\({}^{\circ}\), energy spread: \(\pm\)0.2%, initial beam radius: 10 mm. Number of particles: 100,000, from left to right, the figure represents horizontal and vertical phase spaces and horizontal cross sections of particles, respectively. (b) Transport line layout; (c) corresponding beam envelope. When the particle beam passes through the aforementioned nonlinear magnets, the action of nonlinear forces results in the distortion of the external region while leaving the transverse spatial region unaffected [28]. Consequently, the beam envelope trajectory of the beam remains unchanged. The phase space distortion at the nonlinear magnet induces rotation in the subsequent matrix transport process, effectively moving edge particles towards the center of the beam.