Combination of cylindrical source and spectral sampling

Dear Fluka experts,

I want to set up a cylindrical source, and the photon energy is sampled from the spectrum.There are no errors when the two parts run separately,but when I put them together, it turned out to be strange. After adding the SOURCE card, there will be conflicts with the cylindrical source.It seems to have become a point source.

source.inp (1.7 KB) source2.f (8.1 KB) spectrum.dat (82 Bytes)


Dear Li,

The volumetric sources specified with the BEAMPOS card are disregarded if you use the source user routine. You need to implement the cylindrical sampling manually.


Dear Li,

as pointed out by David your source routine does not include the volumetric sampling which you have to implement yourself.

Otherwise you can use the package provided in this post:

It supports all volumetric source definitions of FLUKA via the input file in combination with spectral sampling. Note that you would have to slightly adapt the input format of your spectrum.