XYZ range in usrbin card

Dear Fluka experts,

When I set up the usrbin card as shown in the figure0.5a
and I got the result in the figure below.0.5

But when I change the scope (as shown in the figure)0.1a
The results are strange0.1
I don’t know what caused this result.


Could you please share your input to better understand the problem.

source.inp (1.5 KB) source2.f (8.1 KB)

Thank you @nostaaal,
the spectrum.dat file is missing

BTW one remark on your input file (unrelated to your problem) is that you dont set on the BEAM card the PHOTON energy/momentum.

Despite you are using a custom source.f routine you need to set as energy/momentum the maximum energy/momentum that your source.f can deliver. Otherwise it will set a very high value of 200GeV/c resulting to unnecessary computation of tabulations out of the energy range of your problem

Thank you for your advice. I will pass on the missing documents
spectrum.dat (82 Bytes)

Hi @nostaaal
you photons start in the air region (magenta ring points)

and are going towards the Z direction.

Therefore all photons are hitting the Ti cage region,
outside the scoring of [-0.1…0.1] or your smaller usrbin

practically you see nothing apart from a few back-scatters

But the results were strange,The value of Z is different from what I set in the source2.f file, and it’s not isotropic.
source.inp (1.5 KB) source2.f (8.0 KB) spectrum.dat (82 Bytes)

Dear Li,

The value of Z is correctly sampled even in your first source routine. If you score ALL-PART instead of DOSE, it is clearly visible.

One thing is not clear to me, if you want to sample on the surface of the AGGG region (in this case the sampling is correct), or in the volume (here you need to sample the radius correctly as well.)

For the problem of isotropic direction see:


The value of z is uniform, within [-0.1625 , 0.1625] however the beam direction is taken from BEAMPOS card as
Notice that there is NO sampling, simply taken the direction cosines as is therefore [0,0,1]

I thought it would be isotropic to set beam cards like this.

But now I understand. Thank you very much