Truncated cone isotope source

Dear FLUKA experts,
i would like to define an isotope source inside of a truncated cone. I understand that i have to use the source.f routine, but i’m actually very new to FLUKA. Can you please help me?
Best regards,

Hello Leonardo,

sorry for the delay in the answer to your question but I have here some possible solutions for you.

Let me start saying that, not knowing the details of simulations (it would be nice in this regard to have some .inp or .flair to have a reference), I tried to find a general solution to your problem. Any specific details then will depend on your scope.

As you state, it is not possible to define a volumetric source inside a truncated cone through the BEAMPOS card, for this reason a specific source.f routine is needed.

As a first approach a possible solution can be found following what is suggested in this trend.
The source.f routine there described requires you to define in the geometry the TRC where the primaries will be evenly distributed by the routine.

You can find some basic input to check how does it work here:
source_isotope_truncatedcone.inp (1.6 KB)
source_volumetric.f (9.9 KB) (the same source.f of the other topic simply adapted to the TRC I have created in the input file)

Another possibility, not using the recursive subroutine, is to sample geometrically the position of a primary particle in a TRC without the need to define it in the geometry you are using.

I propose you to have a look to this simple routine and to use the input file to check the result:
source_isotope_truncatedcone.inp (1.6 KB) (same input file as before, simply change the SOURCE card)
source.f (10.5 KB) (in this case the user needs to give to the routine the information of the TRC - look at the SOURCE card in the .inp - and it is used just to sample in a TRC with height along the z axis - so the information about height-x and height-y are superfluous)

N.B. in this case due to the logic used in the sampling, the primaries are not evenly distributed in the TRC


Dear Giuseppe,
forgive me for my delay in my answer but I took some time to test the solution you gave to me. First of all, I would like to thank you for spending some time to help me with this topic. I tried both the solutions and I think that they well fit my problem. I thank you also for the routine you gave me because now I understand how to create other types of volumetric sources. I appreciated a lot your answer and I thank you very much. Best regards,

1 Like