Particle accelerator beam dynamics simulation platform
-
Install Visual Studio (Windows) / GCC (Linux), minimum C++ version 17.
-
Install CUDA (version 12.2 or higher recommended).
-
Install CUDSS (cuDSS 0.7.1 Downloads | NVIDIA Developer). After installation, add it to your system environment variables, for example:
- Windows: C:\Program Files\NVIDIA cuDSS\v0.7\bin\13
Also, modify the cuDSS directory in CMakeLists.txt according to the existing paths.
- Install Python (version 3.12 or higher recommended) and the tfs-pandas library.
- Install CMake (version 3.29 or higher recommended).
- Modify the file paths in the CMakeLists.txt file according to your software installation path.
- Navigate to the PASS folder and create a new folder named "build".
- Navigate to the "build" folder and execute the following commands to build the project:
Particle classes containing phase information (high memory usage, suitable for incoherent tune analysis): cmake ..
Particle classes not containing phase information (low memory usage, not suitable for incoherent tune analysis): cmake -DPASS_CAL_PHASE=OFF ..
- Execute the following command to compile the project:
cmake --build . --config Release -j16
-
Navigate to the
parafolder, modify the parameter configuration in thegenerate_main.pyfile, run the program, and generate the input file, such asbeam.json. -
Optical files can be entered manually, or you can input Twiss files, Error files, etc., generated by MADX in TFS format. If reading MADX files, it is recommended to include the following columns in the MADX file and set the optical calculations to be performed in the component center:
FLAG=TWISS,COLUMN=NAME,KEYWORD,S,L,BETX,ALFX,MUX,BETY,ALFY,MUY,X,Y,DX,DPX,K0L,K1L,K2L,K3L,E1,E2,H1,H2,HGAP,FINT,FINTX; TWISS, CENTRE, FILE=twiss.tfs;The MADX Twiss command can output all columns as follows:
MADX Twiss output NAME KEYWORD S BETX ALFX MUX BETY ALFY MUY X PX Y PY T PT DX DPX DY DPY WX PHIX DMUX WY PHIY DMUY DDX DDPX DDY DDPY R11 R12 R21 R22 ENERGY L ANGLE K0L K0SL K1L K1SL K2L K2SL K3L K3SL K4L K4SL K5L K5SL K6L K6SL K7L K7SL K8L K8SL K9L K9SL K10L K10SL K11L K11SL K12L K12SL K13L K13SL K14L K14SL K15L K15SL K16L K16SL K17L K17SL K18L K18SL K19L K19SL K20L K20SL KSI HKICK VKICK TILT E1 E2 H1 H2 HGAP FINT FINTX VOLT LAG FREQ HARMON SLOT_ID ASSEMBLY_ID MECH_SEP V_POS BBCHARGE XMA YMA SIGX SIGY LRAD PARENT COMMENTS RE11 RE12 RE13 RE14 RE15 RE16 RE21 RE22 RE23 RE24 RE25 RE26 RE31 RE32 RE33 RE34 RE35 RE36 RE41 RE42 RE43 RE44 RE45 RE46 RE51 RE52 RE53 RE54 RE55 RE56 RE61 RE62 RE63 RE64 RE65 RE66 KMAX KMIN CALIB POLARITY ALFA BETA11 BETA12 BETA13 BETA21 BETA22 BETA23 BETA31 BETA32 BETA33 ALFA11 ALFA12 ALFA13 ALFA21 ALFA22 ALFA23 ALFA31 ALFA32 ALFA33 GAMA11 GAMA12 GAMA13 GAMA21 GAMA22 GAMA23 GAMA31 GAMA32 GAMA33 ALFA11P ALFA12P ALFA13P ALFA21P ALFA22P ALFA23P ALFA31P ALFA32P ALFA33P GAMA11P GAMA12P GAMA13P GAMA21P GAMA22P GAMA23P GAMA31P GAMA32P GAMA33P BETA11P BETA12P BETA13P BETA21P BETA22P BETA23P BETA31P BETA32P BETA33P DISP1 DISP2 DISP3 DISP4 DISP1P DISP2P DISP3P DISP4P DISP1P2 DISP2P2 DISP3P2 DISP4P2 DISP1P3 DISP2P3 DISP3P3 DISP4P3 MU1 MU2 MU3 SIG11 SIG12 SIG13 SIG14 SIG15 SIG16 SIG21 SIG22 SIG23 SIG24 SIG25 SIG26 SIG31 SIG32 SIG33 SIG34 SIG35 SIG36 SIG41 SIG42 SIG43 SIG44 SIG45 SIG46 SIG51 SIG52 SIG53 SIG54 SIG55 SIG56 SIG61 SIG62 SIG63 SIG64 SIG65 SIG66 N1
- In Windows, the program is located in the build/Release folder. Execute the command: .\build\Release\PASS.exe --beam0=..\para\beam.json
- In Linux, the program is located in the build folder. Execute the command: ./build/PASS --beam0=../para/beam.json