Dear Fluka users;
I have problems running the source card routine. I can compile and run the code, but when I plot
the userbin I cannot see the plot; I see a blank graph.
These are the files that I have used:

Spec02.txt (5.8 KB)
y.flair (1.9 KB)

It is my first time using source_newgen.f. I have used the spectrum as a histogram for the source routine.
Thanks !

Dear William,

could you upload your source_newgen.f user routine as well?


Dear William,

I tried running your simulation without the source file, using the highest energy value that you have in your text file, which is 21 keV. At these energies you should also activate the EMFCUT card to tell Fluka to transport photons with energies lower than the default value.


Thank you for replying, I have implemented the card to read energies around 21 KeV, and the simulation does indeed run. But one thing that I can’t understand is the positioning of the beam. Even though I explicitly positioned the beam in a particular way it doesn’t seem too much my position. Must I change the position within the file txt ? Thank you !

This is hard to tell because in your Flair file the beam position is the default one since you left it empty. Did you change it in the source file?

I ran the simulation in another file; this is what I have as an input

but the beam is positioned here else like this:

This is a y-z projection.
I haven’t changed anything on the source file regarding the position

Dear William,

In the absence of the actual input, when using your coordinates with the geometry that you sent earlier the beam is not incident on the target. You can check this in your Geometry tab.

Thank you Mihaela for your response but I am not able to share the file where I have done the simulation. I can only share the input in particular you can see that what I have in the Beampoes dosent match the coordinates of the beam (You can see it form the 2n image y-z projection) and can’t understand why

Dear @william.olivei,
It’s impossible to tell you what is the problem with your source routine if you don’t share the routine itself.

I have figured out the problem Mihaela Parvu was correct thanks!