Large linear accelerators have extensive applications in national major demands,frontier science research,and people’s daily life.To meet the requirements of more advanced applications such as large colliders,tumor radiation therapy devices,transmutation systems for spent nuclear fuel,and irradiation test facilities for nuclear materials,linear accelerators worldwide are advancing towards higher intensity,higher power,and greater stability.The China Initiative Accelerator Driven System(CiADS)is one of the major national scientific infrastructure projects in China’s 12 th Five-Year Plan.It employs a technical scheme combining high-intensity,high-power linear accelerators,high-power spallation targets,and a subcritical reactor to achieve transmutation of high level radioactive nuclear waste.This technical approach has gained wide recognition from the international community and is regarded as an effective solution to the issue of nuclear waste.To meet the requirements of subcritical reactors in terms of operational stability,material safety and expected lifetime,the CiADS superconducting linear accelerator needs to achieve higher operational safety and stability.This requires more precise,faster and more accurate beam transport simulations to meet the numerical simulation requirements for tasks such as compensating for RF cavity failures and analysing accelerator stability.First,in order to achieve lower beam loss,large-scale multiparticle simulations are required.The computation of space charge forces is the main bottleneck limiting the speed of simulations,and there is room and demand for improvement.Secondly,to more effectively support the operational commissioning of accelerators,simulations of the beam commissioning process are required.However,due to engineering errors,phase references and other limitations,the component parameters in the simulation program,in particular the amplitude and phase of accelerating elements,differ from those of the real accelerator.Therefore,it is necessary to establish a mapping relationship between the accelerator component parameters in realistic accelerator beam commissioning and operational control,and the parameters in the computer simulation program,and integrate numerical simulations closely with beam commissioning for direct beam parameter presetting and control.This paper develops a general linear accelerator simulation program called AVAS(Advanced Virtual Accelerator Software)specifically designed for CiADS requirements.Based on the traditional PIC algorithm,the S-PICNIC(SymmetricParticles In Cells Numerical Integration between Cubes)algorithm are proposed to solve the space charge effect.To balance the requirements for both accuracy and speed,the real-time switching of various core algorithms is realized for different components.Compared with the common linear accelerator simulation software,these methods greatly enhance the speed of multi-particle simulations while ensuring simulation accuracy.At the same time,AVAS preliminary establishes a relationship between simulation parameters and accelerator operating parameters,enabling it to assist in accelerator operational commissioning.The program has been tested on the Chinese ADS Front-end Demo Linac(CAFe).The main achievements and conclusions of this paper are as follows:1.A S-PICNIC algorithm is developed.The algorithm for solving space charge effects is optimized based on symmetry.The solution process is decomposed into two parts: the solution of symmetric space charge field component and the addition of asymmetric field component.This maximizes the utilization of the symmetry of the beam,and prioritise the calculation of the part that contributes the most to the space charge field.These optimizations significantly reduce the computational effort of the standard algorithm.After testing,compared to the standard PICNIC algorithm,SPICNIC can speed up the solution process of space charge fields by four times while ensuring accuracy,which provides a fast and efficient algorithm for multi-particle simulations.2.Real-time switching of multiple core algorithms.For high-power linear accelerators with long beamlines,the simulation may involve accelerator components that utilize different models,and the energy and size of the beam can vary significantly.To accommodate different boundary conditions and component models,two 3D space charge effect solving algorithms and two particle-moving modes are integrated into AVAS.The program can dynamically switch between particle-moving modes based on the specific component model,effectively balancing accuracy and speed of numerical simulations.3.Parallel computing.The paper extensively optimizes the simulation speed of AVAS by redesigning parallel algorithms,ensuring load balancing,and implementing appropriate data partitioning techniques.Subsequently,the code is further refactored to enhance program execution efficiency.These optimizations led to a significant improvement in AVAS’ simulation speed.Test results clearly show that AVAS achieves approximately twice the simulation speed of TraceWin,giving AVAS a significant advantage in large-scale multi-particle simulations and computationally intensive scenarios.4.Mapping of numerical simulation and accelerator operating parameters.The paper constructs the framework of the accelerator simulation program AVAS based on the structure,functionality,parameters,errors,and operational logic of a real accelerator.Using AVAS,the mapping relationship between the operating parameters and the simulation parameters of the CAFe superconducting section is successfully established.In actual test experiments,AVAS effectively sets the operating parameters of the CAFe superconducting section,resulting in negligible beam loss during beam operation and the deviation between the energy set value and the actual measured value is about 0.5%. |