Angular distribution, position information about source_newgen.f

Dear teachers, I have some questions about source_newgen.f. I need to take the neutron energy spectrum from other software simulations as the input of Fluka’s neutron source. At first, I only considered the energy information, so I wroteE(min)、E(max)、dN/dE into test. spec. In the test.spec file, I get good results. Now I need to write the angular distribution, position information to test. spec file. There are about 4,000 neutrons, How can I add the rest of the information to this file?
Here is mysource_newgen.f , I hope experts can answer my questions, thank you very much!
mysource_ng1.f (19.0 KB)
截图 2024-03-22 16-29-44

Dear @David,

If you want to read a file that also contains the direction of the primary particles, you cannot use the

sample_histogram_momentum_energy( "test.spec", "keV" )


A possibility would be to use the

call read_phase_space_file( [filename], [energy_unit], [length_unit], phase_space_entry, [sequential_logical_flag], nomore )

routine, which can read a text file containing all the relevant information for each primary. This would require you to adapt the file you provide as input for the source.

1 Like

3 posts were split to a new topic: Scored particles energy is much higher than the source one