Questions about source_newgen.f

Dear All,

I had a look at thread and I would like to offer a couple comments.

  1. The momentum_energy in the new source routine means TKEFLK (NPFLKA) or PMOFLK (NPFLKA) whether the energy_logical_flag is true or false.

  2. Using the flux equation as particle weight, while sampling the energy uniformly is a valid way to create a biased source. Please note, some features (like the DETECT scoring requires an analogue simulation and using this source would give meaningless results.) This works well where the energy range only in a “linear range”.

  3. The issue with this biased source when a neutron spectrum needs to be recreated, that the energy range spans from 1e-5 to 1e7+ eV. This means a uniform (linear) sampling would barely give number from the lover end. (This is what you saw)

  4. The neutron spectrum has the special feature, that is mostly flat (with two peaks) in a lethargy plot, meaning that the bins of the histograms contain comparable number of neutrons, even though the difference of energy with of the bins if huge. So, a simple solution would be to convert the flux equation into a histogram.

  5. Furthermore it is possible to convert the flux equation into energy, intensity value pairs, and assume a linear transition between the points. This also can be used for sampling. See the attached spectrum file and source routine.

    source_newgen.f (8.9 KB)
    neutron_spectrum.txt (2.9 KB)

    With this I was able to get:

    source

    which matches with the provided flux equation.

    (Note: The feature of sampling from a spectrum will be included in the source_newgen.f user routine with next release of FLUKA as well.)

I hope this clarifies everything.

Cheers,
David

2 Likes