Phase space file energy spectrum problem

Dear FLUKA users and experts,

When I run a source routine example about phase space file txt,I have been puzzled by several questions.The first one is that the program runs extremely fast, flashing by quickly, regardless of whether the number of particles is large or small. This doesn’t align with the expectation that more particles should require more time to process.

The second issue is that the error in the energy spectrum is particularly large, and even with a large number of particles, this error does not decrease, which contradicts the typical behavior of a Monte Carlo program.

This is the example program I ran. I didn’t modify any code. Could you please take a look?

phase_space_file.txt (5.7 MB)

source_routine_ex1b.inp (2.9 KB)

source_routine_ex1b.flair (4.1 KB)

source_newgen_ex1b.f (7.8 KB)

Dear Dejun,
Regarding fast running speed, please change the “true” to “false” in the “call read_phase_space_file (” phase-spaci_file. txt “,” GeV/c “,” cm “, phase-spaci_dentry,. true., nomore)” command of the source_newgen. f file
Regarding the error not decreasing, please increase the number of cycles to 2 or more.

1 Like

Thank you for your response. The program is now running correctly. I will proceed to increase the number of cycles as you suggested. Thank you again for your reply.:handshake: