Method and device for calculating spatial charge field of accelerator full beam line, equipment and medium

By setting the time step and periodic time mapping, the whole-beamline beam dynamics simulation of a single beam bunch during the accelerator beam transmission process is performed, which solves the problem of insufficient accuracy in calculating the space charge field of the whole accelerator beamline in the existing technology and realizes efficient and accurate beam loss prediction.

CN122197511BActive Publication Date: 2026-07-21INST OF MODERN PHYSICS CHINESE ACADEMY OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INST OF MODERN PHYSICS CHINESE ACADEMY OF SCI
Filing Date
2026-05-18
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing methods for calculating the space charge field of the entire accelerator beamline cannot accurately characterize the force changes and trajectories of detached particles, resulting in a significant decrease in the accuracy of beam loss simulation predictions and making it difficult to meet the high-precision simulation requirements of high-current, high-power accelerators.

Method used

A full-beamline beam dynamics simulation is performed on individual bundles during the accelerator beam propagation process using a set time step. The position and space charge field distribution of each bundle in the full beamline at any time are determined by periodic time mapping using the periodic characteristics of the accelerator, and the space charge force on macroparticles in three-dimensional space is calculated by interpolation algorithm.

Benefits of technology

It achieves high-precision modeling of the space charge effect of multiple bundles under limited computing resources, improves the computational efficiency of the space charge field of the entire beamline, accurately depicts the force changes and motion trajectories of detached particles, and improves the simulation accuracy of beam loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122197511B_ABST
    Figure CN122197511B_ABST
Patent Text Reader

Abstract

The application discloses a kind of accelerator full beam line space charge field calculation method, device, equipment and medium, it is related to accelerator beam dynamics simulation calculation technical field, through periodic time mapping and nearby bunch field selection, significantly improve the efficiency of full beam line space charge field calculation, realize from single bunch data to full beam line field distribution Quick and accurate conversion.Method includes: using set time step to carry out full beam line beam dynamics simulation to single bunch in the process of accelerator beam transmission, obtain single bunch space-time evolution data;Based on single bunch space-time evolution data, using the periodicity characteristics of accelerator operation, the position of each bunch in full beam line at any time and the corresponding space charge field are determined by periodic time mapping;The space charge field distribution corresponding to the nearest bunch is interpolated to each macro-particle position using interpolation algorithm, and the space charge force on each macro-particle in three-dimensional space is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of accelerator beam dynamics simulation and calculation technology, and in particular to a method, apparatus, equipment and medium for calculating the space charge field of an accelerator full beamline. Background Technology

[0002] Large linear accelerators have wide applications in technological needs, cutting-edge scientific research, and people's livelihoods, covering important equipment scenarios such as large colliders, tumor radiotherapy devices, spent fuel transmutation devices, and nuclear energy material irradiation testing devices. Driven by industry development, linear accelerators continue to upgrade towards high-current, high-energy, and high-power directions. The stable operation of high-power accelerators requires strict control of beam loss indicators to prevent damage to accelerator components. Megawatt-level high-power accelerators have extremely high requirements for beam loss control precision, which must rely on accurate beam dynamics simulation methods to complete the beam transmission process deduction and parameter optimization. The accurate calculation of the space charge field is the core foundation for achieving reliable beam dynamics simulation.

[0003] In accelerator beam transport simulation systems, existing technologies generally treat individual beam clusters as independent units for simulation calculations, taking advantage of the periodic operation characteristics of the beam. Addressing the significant nonlinear space charge effect within high-current proton and heavy-ion accelerators, current mainstream approaches typically employ a single-cluster model combined with a particle grid mode. This method only calculates the space charge field within isolated clusters, using the results of local space charge field calculations to simulate beam transport behavior, thereby enabling subsequent beam state analysis and loss prediction.

[0004] However, during accelerator operation, clump particles are prone to longitudinal detachment and intrusion into adjacent clumps, resulting in a superimposed and coupled space charge field across all clumps in the beamline. Limited by computational models and simulation approaches, traditional computational methods focus only on solving the localized field of a single independent clump, neglecting the global electric field changes caused by the coupling of multiple clumps across the beamline. This fails to accurately reproduce the true space charge distribution across the entire accelerator. This one-sided computational approach leads to biased results in the space charge field calculations, failing to accurately characterize the force changes and trajectories of detached particles. Ultimately, this results in a significant decrease in the accuracy of beam loss simulation predictions, making it difficult to meet the high-precision simulation development requirements for ultra-low beam loss control in high-current, high-power accelerators. Summary of the Invention

[0005] In view of this, this application provides a method, apparatus, equipment and medium for calculating the space charge field of the entire accelerator beamline. The main purpose is to solve the problem that the existing calculation methods for the space charge field of the entire accelerator beamline cannot accurately characterize the force changes and motion trajectories of detached particles, which ultimately leads to a significant decrease in the accuracy of beam loss simulation prediction and makes it difficult to meet the high-precision simulation development needs of ultra-low beam loss control for high-current, high-power accelerators.

[0006] In a first aspect, this application provides a method for calculating the space charge field of an accelerator's entire beamline, the method comprising: A full-beamline beam dynamics simulation was performed on a single bundle during the accelerator beam transport process using a set time step to obtain spatiotemporal evolution data of a single bundle. The set time step is related to the bundle period, and the spatiotemporal evolution data of a single bundle includes the simulation timestamp of each propulsion step, the position of the bundle centroid, and the space charge field components on the three-dimensional spatial grid. Based on the spatiotemporal evolution data of the single bunch, the position of each bunch and the corresponding space charge field in the whole beamline at any time are determined by periodic time mapping using the periodic characteristics of accelerator operation, so as to characterize the space charge field distribution of the whole beamline at any time. For each macroparticle, the nearest cluster and its corresponding space charge field distribution are determined. An interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest cluster to the position of each macroparticle to obtain the space charge force experienced by each macroparticle in three-dimensional space.

[0007] Secondly, this application provides a calculation device for the space charge field of an accelerator full beamline, the device comprising: The simulation unit is used to perform full-beamline beam dynamics simulation on a single bundle during the accelerator beam transport process using a set time step, and obtain spatiotemporal evolution data of a single bundle; the set time step is related to the bundle period, and the spatiotemporal evolution data of a single bundle includes the simulation timestamp of each propulsion step, the position of the bundle centroid, and the space charge field components on the three-dimensional spatial grid. The determination unit is used to determine the position of each bunch in the whole beamline and the corresponding space charge field at any time based on the spatiotemporal evolution data of the single bunch and by utilizing the periodic characteristics of the accelerator operation and periodic time mapping, so as to characterize the space charge field distribution of the whole beamline at any time. The interpolation unit is used to determine the nearest cluster and its corresponding space charge field distribution for each macroparticle. The interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest cluster to the position of each macroparticle to obtain the space charge force experienced by each macroparticle in three-dimensional space.

[0008] Thirdly, this application provides a computing device for the space charge field of an accelerator full beamline, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor. When the processor executes the program, it implements the above-described method for calculating the space charge field of the accelerator full beamline.

[0009] Fourthly, this application provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method for calculating the space charge field of the accelerator's full beamline.

[0010] By employing the above technical solutions, this application provides a method, apparatus, device, and medium for calculating the space charge field of an accelerator full beamline. Compared with the prior art's approach of conducting simulation calculations using individual bundles as independent units, this application uses a set time step to perform full beamline beam dynamics simulation on individual bundles during accelerator beam transmission, obtaining spatiotemporal evolution data of a single bundle. The set time step is related to the bundle period, and the spatiotemporal evolution data of a single bundle includes the simulation timestamp of each propulsion step, the position of the bundle's centroid, and the space charge field components on the three-dimensional spatial grid. Based on the spatiotemporal evolution data of the single bundle, utilizing the periodic characteristics of accelerator operation, the position of each bundle in the full beamline and its corresponding space charge field are determined at any given time through periodic time mapping, thus characterizing the space charge field distribution of the full beamline at any given time. For each macroparticle, the nearest bundle and its corresponding space charge field distribution are determined, and an interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest bundle to the position of each macroparticle, obtaining the space charge force experienced by each macroparticle in three-dimensional space. The entire process fully utilizes the periodicity of high-current beams and the sparse physical characteristics of detached particles, innovatively employing a dual simulation strategy to achieve high-precision modeling of the space charge effect of multiple bundles under limited computational resources. By periodic time mapping and selection of the nearest bundle field, the computational efficiency of the full-beamline space charge field is significantly improved, enabling rapid and accurate conversion from single-bundle data to the full-beamline field distribution.

[0011] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0012] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart illustrating a method for calculating the space charge field of an accelerator full beamline in one embodiment of this application. Figure 2 This is a distribution diagram of a beam cluster in a continuous wave accelerator according to one embodiment of this application; Figure 3 This is a flowchart of a simulation of the space charge field of the accelerator full beamline in one embodiment of this application; Figure 4 yes Figure 1 A flowchart illustrating a specific implementation method of step 101; Figure 5This is a flowchart illustrating the full-beam linear dynamics simulation of a single bundle in one embodiment of this application; Figure 6 This is a grid diagram showing the relationship between the bundle and space when calculating the space charge field in one embodiment of this application; Figure 7 yes Figure 1 A flowchart illustrating a specific implementation method for step 102; Figure 8 This is a flowchart of the reconstruction and application of the space charge field of the entire beamline in one embodiment of this application; Figure 9 yes Figure 1 A flowchart illustrating a specific implementation method for step 103; Figure 10 This is a structural diagram of a linear accelerator simulated in a specific scenario of one embodiment of this application; Figure 11 These are simulation results from one embodiment of this application, using both a conventional algorithm and the dual simulation method of this invention. Figure 11 (a), (b), and (c) are simulation results of the traditional algorithm; (a) is the phase space distribution diagram in the horizontal direction; (b) is the phase space distribution diagram in the vertical direction; and (c) is the two-dimensional projection diagram of the beam. Figure 11 (d), (e), and (f) are all simulation results using the dual simulation method; where (d) is the phase space distribution diagram in the horizontal direction; (e) is the phase space distribution diagram in the vertical direction; and (f) is the two-dimensional projection diagram of the beam. Figure 12 This is a schematic diagram of the initial cluster after adding a cluster containing a small amount of negative hydrogen particles at a 180-degree position in one embodiment of this application. Figure 12 (a) is a phase space distribution diagram in the horizontal direction; Figure 12 (b) is a phase space distribution diagram in the vertical direction; Figure 12 (c) is a two-dimensional projection diagram of the beam; Figure 13 This is a simulation result diagram of the complete simulation of the propagation of a cluster of negative hydrogen particles in an accelerator using a dual simulation method in one embodiment of this application; Figure 13 (a), (b), (c), (d), (e), and (f) are phase space distribution diagrams of negative hydrogen particles at 0.1 m, 24.5 m, 36.6 m, 52.7 m, 88.6 m, and 101.1 m, respectively. Figure 14 This is a statistical analysis of the position of the beam-loss particles and the energy distribution of the beam-loss particles obtained after simulation in one embodiment of this application; Figure 14(a) is a statistical graph of beam loss particles; Figure 14 (b) is a diagram showing the energy distribution of beam-loss particles; Figure 15 This is a schematic diagram of the structure of a calculation device for the space charge field of the accelerator full beamline in one embodiment of this application; Figure 16 This is a schematic diagram of the device structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0013] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0014] In accelerator beam transport simulation systems, existing technologies generally treat individual beam clusters as independent units for simulation calculations, relying on the periodic operation characteristics of the beam. However, during accelerator operation, beam cluster particles easily detach longitudinally and intrude into adjacent beam clusters, resulting in a superimposed and coupled space charge field across all beam clusters. Limited by computational models and simulation approaches, traditional calculation methods focus only on solving the localized field of a single independent beam cluster, failing to consider the global electric field changes caused by the coupling effect of multiple beam clusters across the entire beam, thus failing to reproduce the true space charge distribution across the entire accelerator. This one-sided calculation method leads to deviations in the space charge field solution results, failing to accurately characterize the force changes and trajectories of detached particles, ultimately resulting in a significant decrease in the accuracy of beam loss simulation predictions, making it difficult to meet the high-precision simulation development requirements for ultra-low beam loss control in high-current, high-power accelerators.

[0015] To address this problem, this embodiment provides a method for calculating the space charge field of the entire accelerator beamline, such as... Figure 1 As shown, the method includes the following steps: 101. Using a set time step, perform full-beamline beam dynamics simulation on a single bundle during the accelerator beam propagation process to obtain spatiotemporal evolution data of a single bundle.

[0016] The time step is set in relation to the cluster period; for example, the time step is set... For cluster period 1 / 100 of Each bundle period is divided into 100 equidistant advance steps to ensure precise capture of the spatiotemporal variations and differences in the space charge field distribution of the bundle during its propagation throughout the entire beamline. This time step setting satisfies the precision requirements of beam dynamics simulation while avoiding computational redundancy caused by excessively small time steps, thus balancing computational accuracy and efficiency.

[0017] After each propulsion step, relevant data is recorded synchronously to form single-cluster spatiotemporal evolution data. This data includes the simulated timestamp for each propulsion step, the cluster's center of mass position, and the space charge field components on the three-dimensional spatial grid. The simulated timestamp records the specific moment of the current propulsion step; for example, the simulated timestamp for the first propulsion step is 0.1 microseconds, the second is 0.2 microseconds, and so on, until the cluster completes full beamline transmission. The simulated timestamp for the last propulsion step represents the total transmission time of the cluster through the accelerator. The cluster's center of mass position records the longitudinal position of the cluster's center of mass in the current propulsion step. As the simulation progresses, the cluster's center of mass gradually moves from the entrance zero point towards the accelerator exit. For example, at a simulated timestamp of 5 microseconds, the longitudinal position of the cluster's center of mass is 50 meters, corresponding to the middle position of the accelerator beamline. The three-dimensional spatial grid is uniformly distributed according to the bundle's transmission range. The number of points in the three directions of the grid is set to 100, 100, and 200 respectively, covering all spatial regions where the bundle may appear. In each propulsion step, the spatial charge field components of each grid point on the three-dimensional spatial grid are recorded, including the field strength data in the longitudinal (bundle's forward direction), horizontal, and vertical directions.

[0018] The entire simulation process continues until a single bundle completes full bundle transmission, ultimately obtaining spatiotemporal evolution data of a single bundle that includes simulation timestamps of all propulsion steps, the position of the bundle's centroid, and the space charge field components on the three-dimensional spatial grid. This data can fully reflect the spatiotemporal evolution law and space charge field distribution characteristics of a single bundle during full bundle transmission.

[0019] 102. Based on the spatiotemporal evolution data of the single bundle, and utilizing the periodic characteristics of accelerator operation, the position of each bundle in the full beamline and the corresponding space charge field at any given time are determined through periodic time mapping, so as to characterize the space charge field distribution of the full beamline at any given time.

[0020] In this embodiment, periodic time mapping refers to mapping the state of a single cluster at different time steps to the corresponding position in the entire beam cycle according to the injection cycle of the cluster, thereby determining the spatial position of each cluster at any time.

[0021] Specifically, in the process of periodic time mapping, assuming the bundle period is... For any given moment Subtract repeatedly Get the minimum time , The minimum transmission time is set to be greater than or equal to 0, and then the minimum time is repeatedly increased. , in sequence ,until , ,here This indicates the transmission time of each individual bundle. It means The number of clusters in the line is recorded at any given time. Then, the location of each cluster is queried from the first round of records using its transmission time.

[0022] After completing the time mapping calculation, the system performs spatial location matching. Based on the cluster centroid location information in the spatiotemporal evolution data of a single cluster, each cluster is mapped to its corresponding spatial location on the entire beamline. Simultaneously, the space charge field component data of that cluster at the corresponding time step is extracted, thus determining the position of each cluster and its corresponding space charge field within the entire beamline at any given time. This characterizes the space charge field distribution of the entire beamline at any given time, and this data contains complete field distribution information on a three-dimensional spatial grid. During the matching process, the positional offset and field distribution changes of the clusters during transmission must be considered to ensure that the field data of each cluster accurately corresponds to its actual spatial location.

[0023] 103. For each macroparticle, determine the nearest cluster and its corresponding space charge field distribution. Use an interpolation algorithm to interpolate the space charge field distribution corresponding to the nearest cluster to the position of each macroparticle to obtain the space charge force experienced by each macroparticle in three-dimensional space.

[0024] Since the space charge field is generated by charged particles in the clusters, different clusters produce different field distributions in space. When calculating the space charge force on a macroparticle, it is necessary to find the cluster that has the greatest influence on the macroparticle, that is, the closest cluster. Specifically, this can be determined by calculating the longitudinal distance between the macroparticle and all the clusters, thus identifying the closest cluster and its corresponding space charge field distribution.

[0025] In this embodiment, the interpolation algorithm establishes a precise mathematical relationship between the field distribution data on discrete three-dimensional spatial grid nodes and the actual positions of macroparticles in continuous space. Since the space charge field distribution data is stored on regular three-dimensional grid nodes, while the positions of macroparticles are typically not on these grid nodes, an interpolation algorithm is needed to interpolate the field values ​​between adjacent grid nodes to obtain the precise field strength at the macroparticle's location. After obtaining the field strength, the space charge force acting on the macroparticle is calculated, providing crucial force data for subsequent beam dynamics simulations.

[0026] Commonly used interpolation algorithms include, but are not limited to, linear interpolation, bilinear or trilinear interpolation, and higher-order cubic spline interpolation. Specifically, during the interpolation process, the interpolation algorithm accurately maps the field values ​​at the grid nodes to the positions of the macroparticles, thereby obtaining the electric field intensity vector at the macroparticle's location. After obtaining the electric field intensity vector at the macroparticle's location, combined with the charge represented by the macroparticle and its motion state, the space charge force experienced by each macroparticle in three-dimensional space can be calculated using the Lorentz force formula.

[0027] The method for calculating the space charge field of the entire accelerator beamline provided in this application embodiment uses a set time step to perform a full-beamline beam dynamics simulation on a single bunch during the accelerator beam transport process, obtaining single bunch spatiotemporal evolution data. The set time step is related to the bunch period, and the single bunch spatiotemporal evolution data includes the simulation timestamp of each propulsion step, the position of the bunch centroid, and the space charge field components on the three-dimensional spatial grid. Based on the single bunch spatiotemporal evolution data, the position of each bunch in the entire beamline and the corresponding space charge field at any time are determined by periodic time mapping using the periodic characteristics of accelerator operation, so as to characterize the space charge field distribution of the entire beamline at any time. For each macroparticle, the nearest bunch and its corresponding space charge field distribution are determined, and an interpolation algorithm is used to interpolate the space charge field corresponding to the nearest bunch. The entire process makes full use of the periodicity of the high-current beam and the physical characteristics of the sparse detached particles, and innovatively adopts a dual simulation strategy to achieve high-precision modeling of the space charge effect of multiple bunches under limited computing resources. By using periodic time mapping and selecting the nearest bunch field, the computational efficiency of the space charge field of the entire bundle line is significantly improved, enabling a rapid and accurate conversion from single bunch data to the field distribution of the entire bundle line.

[0028] Specifically, in the physical scenario of reconstructing the space charge field of the entire beamline, see [link to relevant documentation]. Figure 2 As shown in the figure, the distribution of beam clusters in a continuous-wave accelerator is illustrated, with arrows indicating the beam direction. Multiple beam clusters are arranged at equal intervals along the beam direction, and the distance between the centers of adjacent beam clusters is labeled as the period T. Taking the superconducting linear accelerator of the accelerator-driven transmutation research device as an example, its superconducting section is 198.3 meters long, and approximately 240 beam clusters operate online simultaneously in continuous-wave mode. If the space charge field of the entire beamline is modeled using existing methods, the computational domain would expand by approximately 10,000 times, the number of particles would increase by 240 times, and the required computation would increase by at least 10,000 times, which is difficult to implement in engineering practice. Furthermore, existing simulation methods can only calculate the space charge effect within a single beam cluster. When charged particles detach from their original beam cluster and enter the region of an adjacent beam cluster, the space charge force they experience cannot be accurately calculated, resulting in insufficient accuracy in beam loss simulation and affecting the safety assessment of accelerator operation.

[0029] To address the aforementioned problems, this invention provides a method for simulating the space charge field of an accelerator's entire beamline. This method employs an innovative dual simulation strategy to achieve accurate modeling of the space charge effect across multiple beam clusters under limited computational resources. It solves the problem of missing calculations of space charge forces when charged particles move across beam clusters, providing a reliable technical means for refined simulation of beam loss. The specific implementation process is described in [reference needed]. Figure 3 As shown.

[0030] The first round of simulations employed fine-grained time steps to simulate the full beamline transport of a single cluster. In this round, the system recorded the timestamp, cluster centroid position, and charge density distribution on a three-dimensional spatial grid at each propulsion step. The spatial grid was uniformly distributed across the cluster region. The space charge force experienced by each macroparticle was calculated using a particle cloud grid algorithm, and the six-dimensional phase space coordinates of the macroparticles were updated based on this force. After the simulation was completed, the system output a log file containing full beamline space charge field data. This file detailed the spatiotemporal evolution of the single cluster during its transport in the accelerator, providing fundamental data support for subsequent simulations.

[0031] The second round of simulations fully utilizes the periodicity of accelerator operation. Based on the spatiotemporal evolution data of single-cluster clusters obtained in the first round of simulations, it deduces the spatial distribution of all clusters within the accelerator at any given time. Combined with the recorded space charge field data, the system reconstructs the complete space charge field distribution along the entire beamline. In this round of simulations, there is no need to recalculate the space charge field; only interpolation based on the real-time particle positions is required to obtain the corresponding space charge force. This method enables the system to perform accurate beam dynamics simulations for all particles, including those detached from clusters, achieving high-fidelity beam loss prediction.

[0032] In practical applications, direct simulation of multiple clusters across the entire beamline requires processing massive numbers of macroparticles simultaneously, consuming enormous computational resources and proving impractical for engineering applications. However, actual accelerator beams exhibit periodicity, with each cluster exhibiting highly similar physical behavior at the same location. Simulation results of a single cluster can effectively represent the evolution of the overall beam. Therefore, precise simulation of individual clusters is necessary to obtain fundamental data, and then the periodic patterns can be used to extrapolate the entire beamline's behavior. Specifically, for example... Figure 4 As shown, step 101 includes the following steps: 201. Within each set time step, the space charge force on each macroparticle is calculated using the particle cloud grid algorithm. The six-dimensional phase space coordinates of each macroparticle are updated based on the space charge force to complete the calculation of the current propulsion step.

[0033] 202. Record the simulation time, the position of the bundle's centroid, and the three-dimensional spatial charge field components at all grid points in each propulsion step to obtain spatiotemporal evolution data of a single bundle.

[0034] In accelerator beam dynamics simulations, a macroparticle ensemble is used to represent the beam cluster, and the cluster information is reflected by statistically analyzing the macroparticle information. Each macroparticle in the cluster is described using six-dimensional coordinates, where three are spatial coordinates and three are momentum in the corresponding direction. The initial simulation conditions are set with the accelerator inlet as the longitudinal position zero point and the simulation start time as the time zero point. The preferred time step is one-hundredth of the cluster period, meaning each period is divided into one hundred steps for propagation calculations.

[0035] Specifically, in the process of calculating the space charge force on each macroparticle using the particle cloud grid algorithm, the charge of each macroparticle in the cluster is weighted and distributed to a three-dimensional spatial grid to obtain the charge density distribution at the spatial grid points; based on the charge density distribution at the spatial grid points, the space charge field components at each grid point are calculated by solving the Poisson equation; the space charge field components at the grid points are interpolated to the positions of each macroparticle to obtain the space charge force on each macroparticle.

[0036] During beam propagation, the space charge effect is a crucial factor influencing the evolution of the beam cluster. The particle cloud grid algorithm can efficiently and accurately calculate the space charge force on each macroparticle. This algorithm discretizes the continuous charge distribution, significantly reducing computational complexity through gridding while maintaining sufficient physical accuracy, making it a core technique in large-scale beam simulation.

[0037] After obtaining the space charge force, the six-dimensional phase space coordinates of each macroparticle are updated based on this force, completing the calculation of the current propulsion step. In each propulsion step, the system records the simulation time, the position of the bunch's center of mass, and the three-dimensional space charge field components at all grid points. Considering the large amount of data and the need for frequent readings in subsequent simulations, an efficient binary storage format is adopted, storing the field components of each grid point sequentially in a nested loop along the vertical, horizontal, and vertical directions. After completing the full-bunchline transport simulation, a record file containing data from all propulsion steps is obtained. The space charge field recorded in each propulsion step constitutes complete spatiotemporal evolution data for a single bunch.

[0038] The above-described process of performing full-beamline beam dynamics simulation on a single beam bunch during accelerator beam propagation is equivalent to the first round of simulation, referring to... Figure 5 As shown, the first round of simulation is a complete recording of the space charge field of a single cluster. First, the accelerator cluster is characterized by a macroparticle ensemble. The calculation is advanced by a fine time step. Each cluster period is divided into one hundred calculation steps. A complete full-beamline beam dynamics simulation is carried out for a single cluster. The cluster transmission process is tracked step by step according to the set time step. At the same time, the space charge field information of the cluster is recorded throughout the entire transmission process of the full beamline, forming complete space charge field data that includes the data from the initial time to the maximum simulation time and from the initial position to the end position of the beamline.

[0039] The specific particle cloud grid algorithm includes the following three steps: The first step is charge distribution, which assigns the charges of each macroparticle in the cluster to a three-dimensional spatial grid according to weights. The spatial grid is uniformly distributed in the region where the cluster is located, with preset values ​​for the number of grid points in each of the three directions, and the total number of grid points is the product of the number of grid points in each direction. Through this distribution method, the point charges that were originally concentrated at the macroparticle's location are dispersed to multiple surrounding grid nodes, forming a continuous charge density distribution.

[0040] The second step is field solving. Based on the charge density distribution at the spatial grid points, the space charge field components at each grid point are calculated by solving the Poisson equation. The Poisson equation describes the physical relationship between charge distribution and electric field, and its solution methods include direct solution, iterative method, and fast Fourier transform (FFT) method. In the three-dimensional case, the FFT method is widely used due to its high computational efficiency, reducing the computational complexity from the cube of the number of grid points to the logarithm of the number of grid points, significantly improving computational speed. After the solution is completed, each grid node obtains its corresponding three-dimensional electric field components.

[0041] The third step is field interpolation, which interpolates the space charge field components at the grid points to the positions of each macroparticle, obtaining the space charge force experienced by each particle. The interpolation method typically corresponds to the charge allocation method to ensure the algorithm's self-consistency. For example, if a linear weighted method is used for charge allocation, then a linear interpolation method is correspondingly used for field interpolation. Through this interpolation operation, the electric field originally defined at discrete grid nodes is transformed into a force defined at the macroparticle positions in continuous space, providing the necessary physical quantities for subsequent dynamic propagation calculations.

[0042] In real-world scenarios, the spatial grid is uniformly distributed across the region where the cluster is located, with the number of grid points in the three directions being as follows: The total number of grid points is For the relationship between the corresponding bundles and the spatial grid, please refer to [link / reference]. Figure 6 As shown, the cubic space is divided into regular three-dimensional grid structures. The grid cells constitute a discrete spatial computational domain. The cluster is composed of a large number of macroparticles, which are distributed inside the grid. They exhibit a distribution pattern of being dense at the center and sparse at the periphery. The particle concentration is highest in the central region and gradually decreases towards the periphery. The spatial grid provides a discretized computational framework for the calculation of the spatial charge field of the cluster, which is used to realize the numerical characterization of the spatial distribution of the cluster and the calculation of the field quantity.

[0043] For example, a three-dimensional spatial grid is set with 120 grid points in both the horizontal and vertical directions, for a total of approximately 1.7 million grid points. During the simulation, the initial macroparticle charge is first distributed linearly to the surrounding eight grid nodes, forming a smooth charge density distribution. Then, the three-dimensional Poisson equation is solved using the Fast Fourier Transform method to obtain the electric field components of all grid nodes. Finally, trilinear interpolation is used to interpolate the electric field to the position of each macroparticle, calculating the space charge force on each macroparticle. This method not only ensures computational accuracy but also keeps the computation time within an acceptable range, providing reliable technical support for full-beamline simulation.

[0044] Accordingly, in each propulsion step, the position of the bundle's center of mass is recorded. Simulation time and all grid points Three-dimensional space charge field components Considering the large amount of data and the need for frequent readings in subsequent simulations, an efficient binary storage format is adopted, according to... → → The nested loop sequentially stores the field components of each grid point.

[0045] Accordingly, after completing the full-beam transmission simulation, a log file containing all propulsion step data is obtained, wherein the simulation time range is [ The range of the position of the bundle's center of mass is [ The space charge field recorded in each propulsion step is denoted as []. The maximum value of the simulation time represents the total transmission time required for the clump to pass through the accelerator. The maximum value at the center of mass of the bundle is the accelerator exit position. .

[0046] In practical applications, the first round of simulation can only obtain simulation data for a single cluster, failing to reflect the real-world operation of multiple clusters simultaneously online at the accelerator. However, leveraging the periodic, equally spaced repetitive operation and consistent evolution patterns of accelerator clusters, the second round of simulation utilizes the accelerator's periodic characteristics to reconstruct the entire beamline's spatial charge field using data from the first round. This eliminates the need to repeatedly solve field equations, significantly reducing computational load, and allows for accurate simulation of the forces and trajectories of particles across clusters, achieving high-precision beam loss prediction. Specifically, for example... Figure 7 As shown, step 102 includes the following steps: 301. For any simulation time, determine the propagation time of each beam cluster operating online in the accelerator.

[0047] 302. Calculate the longitudinal position of each bundle and the corresponding space charge field distribution based on the transmission time, the simulated timestamp of each time advance step and the position of the bundle centroid.

[0048] 303. Based on the longitudinal position of each bundle and the corresponding space charge field distribution, for any macroparticle, determine the bundle closest to its longitudinal position and its corresponding space charge field as the full beamline space charge field distribution at the macroparticle's location.

[0049] Specifically, in determining the propagation time of each cluster operating online in the accelerator, the cluster period is used as the period parameter. For any simulation moment, the period parameter is repeatedly subtracted to obtain a minimum time that is not less than zero. The minimum time is the propagation time of the first cluster closest to the accelerator inlet. The period parameter is repeatedly added to the minimum time to obtain the propagation time of the second cluster, the third cluster, and so on, until the propagation time of the last cluster in the accelerator. The propagation time of the last cluster does not exceed the total time of the single cluster simulation, and the propagation time of the next cluster immediately following it is greater than the total time of the single cluster simulation.

[0050] In other words, for any chosen simulation time, the propagation time of each cluster operating online within the accelerator is first determined. Using the accelerator's inherent cluster period as a reference, the cluster period is repeatedly subtracted from the current simulation time to obtain the minimum non-negative time. This time is the propagation time of the first cluster closest to the accelerator inlet. Based on this, the cluster period is continuously added to obtain the propagation times of subsequent clusters. By filtering out the propagation times of all clusters that do not exceed the total simulation time of a single cluster, the number of clusters operating simultaneously within the accelerator at that moment can be determined.

[0051] Specifically, in calculating the longitudinal position and corresponding space charge field distribution of each bunch, for any target bunch to be calculated, its transmission time is taken as the transmission time to be calculated. Two adjacent time points are selected from the spatiotemporal evolution data of a single bunch, such that the transmission time to be calculated lies between these two adjacent time points. The earlier of the two adjacent time points is taken as the previous recording time point, and the later time point as the next recording time point. The previous and next recording time points correspond to the centroid positions of the previous and next bunches, respectively. An interpolation formula is then used... The longitudinal position of the target cluster is calculated. The longitudinal position is equal to the position of the centroid of the previous cluster plus an increment. The increment is the difference between the centroid positions of the next cluster and the previous cluster multiplied by a scaling factor. The scaling factor is the difference between the transmission time to be calculated and the previous recording time divided by the difference between the next recording time and the previous recording time. Among the space charge field data corresponding to the previous and next recording time points, the space charge field corresponding to the time point closer to the transmission time to be calculated is selected as the space charge field distribution of the target cluster at the current moment.

[0052] In other words, after obtaining the propagation times of all linear clusters, the longitudinal position of each cluster and its corresponding space charge field distribution are calculated by combining the simulation timestamps recorded at each time step in the first round of simulation with the correspondence between the cluster's centroid position. For any linear cluster's propagation time, two adjacent time recording points are selected from the single cluster's spatiotemporal evolution data, ensuring the cluster's propagation time lies between these two points. Based on the cluster centroid positions corresponding to these two time points, the longitudinal position of the current cluster on the accelerator beamline is obtained through linear interpolation. Depending on the proximity of the cluster's propagation time to the two adjacent time recording points, the space charge field data corresponding to the closer time point is selected as the current cluster's own space charge field distribution. This fine-step recording method minimizes changes in cluster morphology between adjacent time steps, making the differences in space charge field distribution negligible. Selecting field data from the nearest time point simplifies the calculation process while maintaining accuracy.

[0053] After determining the longitudinal position of each bundle and its corresponding space charge field distribution, for any macroparticle, the bundle closest to its longitudinal position and its corresponding space charge field are determined as the full-beam space charge field distribution at the macroparticle's location. Using this method, the second round of simulations achieved complete coverage of the full-beam space charge field.

[0054] The process described above, utilizing the periodic characteristics of accelerator operation and through periodic time mapping to determine the position of each bundle in the full beamline and the corresponding space charge field at any given moment, is equivalent to the second round of simulation, referring to... Figure 8 As shown, the second round of simulation is the process of reconstructing and applying the space charge field of the entire bundle. First, the number of bundles and their transmission time are determined, and the bundle period is set to be... For any simulation time By repeatedly subtracting the period To obtain the minimum time that is not less than zero. This time corresponds to The propagation time of the first cluster closest to the accelerator inlet. Repeatedly increase the cycle based on the foundation The propagation time of the second bundle was obtained sequentially. The transmission time of the third bundle Until the first Transmission time of each bundle .in, Not exceeding The maximum value indicates that in There are a total of Each bundle is running online.

[0055] Then, the position and field distribution of each bunch are calculated to obtain the propagation time of each bunch. Then, based on the correspondence between the simulation time and the position of the bundle centroid recorded in the first round, i.e. [ ]and[ The longitudinal position of each bundle is calculated using linear interpolation. Specifically, for a transmission time of... The clusters were identified by finding the two nearest time points in the recorded data. and ( < < The corresponding centroid position is and The longitudinal position of the bundle can then be obtained using the following formula. :

[0056] Then, the space charge field is chosen, for a propagation time of... A cluster of clumps, its space charge field Select and Zhongyu Field data corresponding to more recent time points. For example, ,but ,on the contrary This simplified process is based on the following physical fact: at a fine time step, the variation in the bundle distribution is sufficiently small, and the difference in the space charge field distribution between adjacent time steps is negligible; therefore, the propagation time of all linear bundles can be found using the method described above. Vertical position and the corresponding space charge field .

[0057] Finally, the force calculation for the particle is performed for any longitudinal position. For macroparticles, first determine the distance. The most recent cluster and its corresponding space charge field Then, the precise space charge force experienced by the particle in three-dimensional space is calculated using a standard interpolation algorithm.

[0058] Using the method described above, the second round of simulation achieved complete coverage of the space charge field across the entire beamline, eliminating the need to resolve the field equations and requiring only particle propulsion and field interpolation calculations. This process not only significantly reduces computational complexity and resource consumption but also substantially improves simulation efficiency. By fully considering the periodic characteristics of accelerator operation and the temporal correlation of interactions between beam clusters, this method can effectively avoid the accumulation of numerical errors caused by traditional point-by-point field solutions while ensuring physical realism.

[0059] After the full-beamline space charge field is reconstructed, the field distribution needs to be accurately mapped to the position of each macroparticle in order to calculate the space charge force acting on it. Specifically, such as... Figure 9 As shown, step 103 includes the following steps: 401. For any target macroparticle, calculate the distance between the longitudinal position of the target macroparticle and the longitudinal positions of all bundles, take the bundle with the smallest distance as the nearest bundle corresponding to the target macroparticle, and obtain the spatial position of the nearest bundle and its corresponding space charge field distribution.

[0060] 402. Based on the spatial location of the nearest cluster, determine the interpolation unit of the target macroparticle in the three-dimensional mesh.

[0061] 403. Within the interpolation unit, an interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest cluster to the target macroparticle position, thereby obtaining the space charge force experienced by the target macroparticle in three-dimensional space.

[0062] 404. Repeat the above process to complete the space charge force calculation for all macroparticles in the entire beamline.

[0063] In this embodiment, for any target macroparticle to be processed during the simulation, the longitudinal position of the macroparticle on the accelerator beamline is first obtained, and the distance between this position and the longitudinal positions of all beamclumps at the current moment is calculated sequentially. By comparing the distance values ​​one by one, the beamclump with the smallest distance value is selected and determined as the nearest beamclump corresponding to the current target macroparticle, thereby identifying the source of the beamclump that contributes the most to the electric field effect of the macroparticle.

[0064] After determining the nearest cluster corresponding to the target macroparticle, the grid region to which the target macroparticle's coordinates belong is delineated by combining the spatial range of the nearest cluster and the overall division method of the three-dimensional spatial grid. This determines the interpolation unit corresponding to the target macroparticle in the three-dimensional grid system, which serves as the basis for subsequent field strength interpolation calculations.

[0065] Within the corresponding interpolation unit range, relying on the reconstructed full-beam space charge field distribution, an interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest bundle to the target macroparticle position, obtaining the space charge force experienced by the target macroparticle in three-dimensional space. Through the above interpolation fitting, the magnitude of the space charge force experienced by the target macroparticle in various directions in three-dimensional space can be accurately solved, completing the force solution process for a single macroparticle.

[0066] In practical applications, the aforementioned method for calculating the space charge field of the entire accelerator beamline has been integrated into the beam dynamics simulation program. This process first verifies the algorithm's correctness by simulating the superconducting section of a linear accelerator. Subsequently, a physical model of the propagation of a proton beam containing a cluster of negative hydrogen particles in the accelerator's superconducting section is simulated, accurately simulating the process in a continuous-wave accelerator where charged particles detach from the longitudinal region, causing longitudinal divergence, which in turn leads to transverse divergence and ultimately beam loss.

[0067] For the structure of the linear accelerator simulated in the specific scenario, please refer to [link / reference]. Figure 10 As shown, the beam is generated by the ion source at the far left, and then enters the radio frequency quadrupole accelerator (RF quadrupole accelerator) via a low-energy transmission line. In the RF quadrupole accelerator, the low-energy beam undergoes simultaneous lateral focusing, longitudinal focusing, and longitudinal acceleration. After leaving the RF quadrupole accelerator, the beam enters the medium-energy transmission line, where it is further focused before entering the radio frequency superconducting cavity. The RF superconducting cavity is mainly used to increase the beam energy. Once the beam reaches the designed energy, it enters the high-energy transmission line. The secondary iron of the high-energy transmission line can deflect the beam in different directions to achieve different tasks. For accelerator modeling, the arrangement and size of the accelerator components in the beam dynamics simulation program are consistent with the actual accelerator design. The electromagnetic fields in each component are calculated by electromagnetic simulation software, which provides the corresponding three-dimensional electromagnetic field distribution. The simulation boundaries are set according to the aperture of each component.

[0068] Specifically, during the algorithm verification process, both existing algorithms and the dual simulation method of this invention were used to simulate beam transport in an accelerator under ideal conditions. Since the particles in the bundle are well-focused and will not detach from the longitudinal focusing region, the simulation results from the two methods should be consistent. The simulation conditions include the following: the initial bundle energy at the superconducting section inlet of the linear accelerator is 2.1 MeV, the current intensity is 5 mA, and the beam frequency... 162.5 MHz. After propagation over 202.7 m, the beam energy increased to approximately 621 MeV. The time step of the beam dynamics simulation program... .

[0069] Further simulations were performed using both the traditional algorithm and the dual simulation method of this invention. The simulation results for both methods are shown in [link to simulation results]. Figure 11 As shown, Figure 11(a), (b), and (c) are simulation results from the traditional algorithm. (a) is the phase space distribution diagram in the horizontal direction; its horizontal axis is the horizontal position coordinate x (unit: mm) of the beam particles, and its vertical axis is the horizontal divergence angle x' (unit: mrad, milliradians), reflecting the position and angle correlation distribution of the beam in the horizontal direction, which is the core basis for calculating the beam emittance in the horizontal direction. (b) is the phase space distribution diagram in the vertical direction; its horizontal axis is the vertical position coordinate y (unit: mm) of the beam particles, and its vertical axis is the vertical divergence angle y' (unit: mrad), reflecting the position and angle correlation distribution of the beam in the vertical direction, used to characterize the beam emittance in the vertical direction. (c) is the two-dimensional projection diagram of the beam; its horizontal axis is the horizontal position x (mm), and its vertical axis is the vertical position y (mm), which is the position distribution projection of the beam on the cross-sectional plane, intuitively showing the overall envelope shape and lateral dimensions of the beam. Figure 11 Figures (d), (e), and (f) are simulation results obtained using the dual simulation method. Figure (d) shows the phase space distribution in the horizontal direction; figure (e) shows the phase space distribution in the vertical direction; and figure (f) shows the two-dimensional projection of the beam. The comparison of the phase diagrams in the three directions shows that the final simulation results are basically consistent, verifying the correctness of the dual simulation method in this invention through simulation under ideal conditions.

[0070] In practical applications, a small amount of negative hydrogen particles may be mixed into the proton beam as it passes through the low-energy band in a high-current, high-power accelerator. These negative hydrogen particles will converge with the protons in the radio frequency quadrupole accelerator, with the negative hydrogen cluster and the proton cluster having a 180-degree phase difference. This particular physical model is simulated using the dual simulation method described in this invention. The simulation conditions are consistent with those described above, but after adding a cluster containing a small amount of negative hydrogen particles at the 180-degree position, the initial cluster is shown below. Figure 12 As shown, where, Figure 12 (a) is a phase space distribution diagram in the horizontal direction; Figure 12 (b) is a phase space distribution diagram in the vertical direction; Figure 12 (c) represents the longitudinal space, where the horizontal axis φ is the phase of the beam particles (unit: deg), and the vertical axis energy is the particle energy (unit: MeV), reflecting the phase and energy distribution of the beam. This data is crucial for evaluating the longitudinal dynamics and energy divergence of the beam. After a complete simulation of the transport process of the negative hydrogen particle cluster in the accelerator using a dual simulation method, the simulation results are as follows: Figure 13 As shown, Figure 13Images (a), (b), (c), (d), (e), and (f) show the phase space distribution of negative hydrogen particles at 0.1 m, 24.5 m, 36.6 m, 52.7 m, 88.6 m, and 101.1 m, respectively. This indicates that initially, negative hydrogen particles are accelerated synchronously with the proton cluster in the accelerator. However, when the frequency of the superconducting section changes from 162.5 MHz to 325 MHz, the negative hydrogen cluster leaves the focusing region and begins to diverge longitudinally. The negative hydrogen particles pass through subsequent proton clusters, eventually diverging laterally and experiencing beam loss. After completing the simulation, the precise position statistics and energy distribution of the beam-loss particles can be obtained statistically. (See [reference needed]). Figure 14 As shown, where, Figure 14 (a) is a statistical graph of beam loss particles. The horizontal axis is the beamline position (unit: m), representing the specific position coordinates on the accelerator beamline. The vertical axis is the statistical number of beam loss particles, representing the number of particles lost at the corresponding position. Figure 14 (b) is a beam loss particle energy distribution diagram, with the horizontal axis representing the beamline position (unit: m), and... Figure 14 (a) The position coordinates are completely corresponding, and the vertical axis is the energy of the beam loss particle (unit: MeV).

[0071] Furthermore, as a specific implementation of the above method, embodiments of this application provide a calculation device for the space charge field of an accelerator's entire beamline, such as... Figure 15 As shown, the device includes: Simulation unit 51 is used to perform full-beamline beam dynamics simulation on a single bundle during the accelerator beam transmission process using a set time step, and obtain spatiotemporal evolution data of a single bundle; the set time step is related to the bundle period, and the spatiotemporal evolution data of a single bundle includes the simulation timestamp of each propulsion step, the position of the bundle centroid, and the space charge field components on the three-dimensional spatial grid. The determining unit 52 is used to determine the position of each bunch in the whole beamline and the corresponding space charge field at any time based on the spatiotemporal evolution data of the single bunch and by utilizing the periodic characteristics of the accelerator operation and periodic time mapping, so as to characterize the space charge field distribution of the whole beamline at any time. Interpolation unit 53 is used to determine the nearest cluster and its corresponding space charge field distribution for each macroparticle, and to interpolate the space charge field distribution corresponding to the nearest cluster to the position of each macroparticle using an interpolation algorithm to obtain the space charge force experienced by each macroparticle in three-dimensional space.

[0072] The accelerator full-beamline space charge field calculation device provided in this invention, compared with the prior art's method of conducting simulation calculations using a single bundle as an independent unit, uses a set time step to perform full-beamline beam dynamics simulation on a single bundle during the accelerator beam transport process, obtaining single bundle spatiotemporal evolution data. The set time step is related to the bundle period, and the single bundle spatiotemporal evolution data includes the simulation timestamp of each propulsion step, the bundle centroid position, and the space charge field components on the three-dimensional spatial grid. Based on the single bundle spatiotemporal evolution data, utilizing the periodic characteristics of accelerator operation, the position of each bundle in the full-beamline and the corresponding space charge field at any time are determined through periodic time mapping, so as to characterize the space charge field distribution of the full-beamline at any time. For each macroparticle, the nearest bundle and its corresponding space charge field distribution are determined, and an interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest bundle to the position of each macroparticle, obtaining the space charge force experienced by each macroparticle in three-dimensional space. The entire process fully utilizes the periodicity of high-current beams and the sparse physical characteristics of detached particles, innovatively employing a dual simulation strategy to achieve high-precision modeling of the space charge effect of multiple bundles under limited computational resources. By periodic time mapping and selection of the nearest bundle field, the computational efficiency of the full-beamline space charge field is significantly improved, enabling rapid and accurate conversion from single-bundle data to the full-beamline field distribution.

[0073] In specific application scenarios, the simulation unit is specifically used for: Within each set time step, the space charge force on each macroparticle is calculated using the particle cloud grid algorithm. The six-dimensional phase space coordinates of each macroparticle are updated based on the space charge force to complete the calculation of the current propulsion step. In each propulsion step, the simulation time, the position of the bundle centroid, and the three-dimensional spatial charge field components at all grid points are recorded to obtain the spatiotemporal evolution data of a single bundle.

[0074] In specific application scenarios, the simulation unit is further used for: The charge of each macroparticle in the cluster is weighted and distributed to a three-dimensional spatial grid to obtain the charge density distribution at the spatial grid points; Based on the charge density distribution at the spatial grid points, the spatial charge field components at each grid point are calculated by solving the Poisson equation. The space charge field components at the grid points are interpolated to the positions of each macroparticle to obtain the space charge force experienced by each macroparticle.

[0075] In specific application scenarios, the determining unit is specifically used for: For any simulation time, determine the propagation time of each bundle running online in the accelerator; Based on the transmission time, the simulated timestamp of each time advance step, and the position of the bundle centroid, calculate the longitudinal position of each bundle and the corresponding space charge field distribution. Based on the longitudinal position of each bundle and the corresponding space charge field distribution, for any macroparticle, the bundle closest to its longitudinal position and its corresponding space charge field are determined as the full beamline space charge field distribution at the macroparticle's location.

[0076] In specific application scenarios, the determining unit is further used for: Using the cluster period as a period parameter, for any simulation time, a minimum time not less than zero is obtained by repeatedly subtracting the period parameter. The minimum time is the propagation time of the first cluster closest to the accelerator inlet. By repeatedly increasing the periodic parameter based on the minimum time, the propagation time of the second bundle, the propagation time of the third bundle, and so on, are obtained sequentially. The transmission time of each bundle; Among them, the first The propagation time of each bunch does not exceed the total simulation time of a single bunch, and the following second bunch... The propagation time of each bunch is greater than the total simulation time for a single bunch, indicating that at that simulation moment, the accelerator has a total of Each bundle is running online.

[0077] In specific application scenarios, the determining unit is further used for: For any target cluster to be calculated, its transmission time is taken as the transmission time to be calculated. Two adjacent time points are selected in the spatiotemporal evolution data of the single cluster, such that the transmission time to be calculated is located between the two adjacent time points. The earlier of the two adjacent time points is taken as the previous recording time point, and the later time point is taken as the next recording time point; the previous recording time point and the next recording time point correspond to the centroid positions of the previous and next bundles, respectively. The longitudinal position of the target bundle is calculated using an interpolation formula. The longitudinal position is equal to the centroid position of the previous bundle plus an increment. The increment is the difference between the centroid position of the next bundle and the centroid position of the previous bundle multiplied by a scaling factor. The scaling factor is the difference between the transmission time to be calculated and the previous recording time divided by the difference between the next recording time and the previous recording time. Among the space charge field data corresponding to the previous and next recorded time points, the space charge field corresponding to the time point closer to the transmission time to be calculated is selected as the space charge field distribution of the target bundle at the current time.

[0078] In specific application scenarios, the interpolation unit is specifically used for: For any target macroparticle, calculate the distance between the longitudinal position of the target macroparticle and the longitudinal positions of all bundles, take the bundle with the smallest distance as the nearest bundle corresponding to the target macroparticle, and obtain the spatial position of the nearest bundle and its corresponding space charge field distribution. Based on the spatial location of the nearest cluster, the interpolation unit of the target macroparticle in the three-dimensional mesh is determined; Within the interpolation unit, an interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest cluster to the target macroparticle position, thereby obtaining the space charge force experienced by the target macroparticle in three-dimensional space. Repeat the above process to complete the space charge force calculation for all macroparticles in the entire beamline.

[0079] Based on the above-described method for calculating the space charge field of the accelerator's entire beamline, this application also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described method for calculating the space charge field of the accelerator's entire beamline.

[0080] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.

[0081] Based on the above-described method for calculating the space charge field of the accelerator full beamline, and using a virtual device embodiment, to achieve the above objective, this application embodiment also provides a physical device for calculating the space charge field of the accelerator full beamline. Specifically, it can be a computer, smartphone, tablet computer, smartwatch, server, or network device, etc. The physical device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to implement the above-described method for calculating the space charge field of the accelerator full beamline.

[0082] Optionally, the physical device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.

[0083] In an exemplary embodiment, see Figure 16The aforementioned physical device includes a communication bus, a processor, a memory, and a communication interface. It may also include an input / output interface and a display device. The various functional units can communicate with each other via the bus. The memory stores a computer program, and the processor executes the program stored in the memory to perform the calculation method for the accelerator full-beamline space charge field in the above embodiments.

[0084] Those skilled in the art will understand that the physical device structure for calculating the space charge field of an accelerator full beamline provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.

[0085] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device for calculating the space charge field of the accelerator's entire beamline, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.

[0086] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented in hardware. By applying the technical solution of this application, compared with the existing methods, this application makes full use of the periodicity of high-current beams and the physical characteristics of sparse detached particles, and innovatively adopts a dual simulation strategy to achieve high-precision modeling of the space charge effect of multiple bundles under limited computing resources. Through periodic time mapping and selection of the nearest bundle field, the computational efficiency of the full-beamline space charge field is significantly improved, realizing a fast and accurate conversion from single bundle data to the full-beamline field distribution.

[0087] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.

[0088] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A method for calculating the space charge field of an accelerator's entire beamline, characterized in that, include: A full-beamline beam dynamics simulation was performed on a single bundle during the accelerator beam transport process using a set time step to obtain spatiotemporal evolution data of the single bundle. The set time step is associated with the bunch period, and the spatiotemporal evolution data of a single bunch includes the simulated timestamp of each propulsion step, the position of the bunch centroid, and the space charge field components on the three-dimensional spatial grid. Based on the spatiotemporal evolution data of the single bunch, the position of each bunch and the corresponding space charge field in the whole beamline at any time are determined by periodic time mapping using the periodic characteristics of accelerator operation, so as to characterize the space charge field distribution of the whole beamline at any time. For each macroparticle, the nearest cluster and its corresponding space charge field distribution are determined. An interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest cluster to the position of each macroparticle to obtain the space charge force experienced by each macroparticle in three-dimensional space.

2. The method for calculating the space charge field of the accelerator full beamline according to claim 1, characterized in that, The method involves performing a full-beamline dynamics simulation of a single bundle during accelerator beam propagation using a set time step to obtain spatiotemporal evolution data of the single bundle, including: Within each set time step, the space charge force on each macroparticle is calculated using the particle cloud grid algorithm. The six-dimensional phase space coordinates of each macroparticle are updated based on the space charge force to complete the calculation of the current propulsion step. In each propulsion step, the simulation time, the position of the bundle centroid, and the three-dimensional spatial charge field components at all grid points are recorded to obtain the spatiotemporal evolution data of a single bundle.

3. The method for calculating the space charge field of the accelerator full beamline according to claim 2, characterized in that, The calculation of the space charge force on each macroparticle using the particle cloud grid algorithm includes: The charge of each macroparticle in the cluster is weighted and distributed to a three-dimensional spatial grid to obtain the charge density distribution at the spatial grid points; Based on the charge density distribution at the spatial grid points, the spatial charge field components at each grid point are calculated by solving the Poisson equation. The space charge field components at the grid points are interpolated to the positions of each macroparticle to obtain the space charge force experienced by each macroparticle.

4. The method for calculating the space charge field of the accelerator full beamline according to claim 1, characterized in that, Based on the spatiotemporal evolution data of the single bunch, and utilizing the periodic characteristics of accelerator operation, the position of each bunch in the full beamline and its corresponding space charge field at any given time are determined through periodic time mapping, in order to characterize the space charge field distribution of the full beamline at any given time, including: For any simulation time, determine the propagation time of each bundle running online in the accelerator; Based on the transmission time, the simulated timestamp of each time advance step, and the position of the bundle centroid, calculate the longitudinal position of each bundle and the corresponding space charge field distribution. Based on the longitudinal position of each bundle and the corresponding space charge field distribution, for any macroparticle, the bundle closest to its longitudinal position and its corresponding space charge field are determined as the full beamline space charge field distribution at the macroparticle's location.

5. The method for calculating the space charge field of the accelerator full beamline according to claim 4, characterized in that, Determining the propagation time of each beam bunch operating online in the accelerator for any given simulation time includes: Using the cluster period as a period parameter, for any simulation time, a minimum time not less than zero is obtained by repeatedly subtracting the period parameter. The minimum time is the propagation time of the first cluster closest to the accelerator inlet. By repeatedly increasing the periodic parameter based on the minimum time, the propagation time of the second bundle, the propagation time of the third bundle, and so on, are obtained sequentially. The transmission time of each bundle; Among them, the first The propagation time of each bunch does not exceed the total simulation time of a single bunch, and the following second bunch... The propagation time of each bunch is greater than the total simulation time for a single bunch, indicating that at that simulation moment, the accelerator has a total of Each bundle is running online.

6. The method for calculating the space charge field of the accelerator full beamline according to claim 4, characterized in that, The step of calculating the longitudinal position and corresponding space charge field distribution of each bunch based on the transmission time, the simulated timestamp of each time advance step, and the position of the bunch centroid includes: For any target cluster to be calculated, its transmission time is taken as the transmission time to be calculated. Two adjacent time points are selected in the spatiotemporal evolution data of the single cluster, such that the transmission time to be calculated is located between the two adjacent time points. The earlier of the two adjacent time points is taken as the previous recording time point, and the later time point is taken as the next recording time point; the previous recording time point and the next recording time point correspond to the centroid positions of the previous and next bundles, respectively. The longitudinal position of the target bundle is calculated using an interpolation formula. The longitudinal position is equal to the centroid position of the previous bundle plus an increment. The increment is the difference between the centroid position of the next bundle and the centroid position of the previous bundle multiplied by a scaling factor. The scaling factor is the difference between the transmission time to be calculated and the previous recording time divided by the difference between the next recording time and the previous recording time. Among the space charge field data corresponding to the previous and next recorded time points, the space charge field corresponding to the time point closer to the transmission time to be calculated is selected as the space charge field distribution of the target bundle at the current time.

7. The method for calculating the space charge field of the accelerator full beamline according to any one of claims 1-6, characterized in that, For each macroparticle, the nearest cluster and its corresponding space charge field distribution are determined. An interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest cluster to the position of each macroparticle, thereby obtaining the space charge force experienced by each macroparticle in three-dimensional space, including: For any target macroparticle, calculate the distance between the longitudinal position of the target macroparticle and the longitudinal positions of all bundles, take the bundle with the smallest distance as the nearest bundle corresponding to the target macroparticle, and obtain the spatial position of the nearest bundle and its corresponding space charge field distribution. Based on the spatial location of the nearest cluster, the interpolation unit of the target macroparticle in the three-dimensional mesh is determined; Within the interpolation unit, an interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest cluster to the target macroparticle position, thereby obtaining the space charge force experienced by the target macroparticle in three-dimensional space. Repeat the above process to complete the space charge force calculation for all macroparticles in the entire beamline.

8. A device for calculating the space charge field of an accelerator full-beamline, characterized in that, include: The simulation unit is used to perform full-beamline beam dynamics simulation on a single bundle during the accelerator beam transport process using a set time step, and obtain spatiotemporal evolution data of a single bundle; the set time step is related to the bundle period, and the spatiotemporal evolution data of a single bundle includes the simulation timestamp of each propulsion step, the position of the bundle centroid, and the space charge field components on the three-dimensional spatial grid. The determination unit is used to determine the position of each bunch in the whole beamline and the corresponding space charge field at any time based on the spatiotemporal evolution data of the single bunch and by utilizing the periodic characteristics of the accelerator operation and periodic time mapping, so as to characterize the space charge field distribution of the whole beamline at any time. The interpolation unit is used to determine the nearest cluster and its corresponding space charge field distribution for each macroparticle. The interpolation algorithm is used to interpolate the space charge field distribution corresponding to the nearest cluster to the position of each macroparticle to obtain the space charge force experienced by each macroparticle in three-dimensional space.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.