Spherical Scoring with USRBIN using Special Binning

Dear Fluka Experts,

I hope you are all well. I am trying to score the integrated dose as a function of the radius produced by a point source at its center in a water sphere. I have tried to use the subroutines musrbr.f, lusrbl.f and fusrbv.f for this matter but I am having trouble with the third one. I have set them up such that:
-musrb.f fixes the scoring to the region of the sphere .
-lursbl.f does not impose any conditions, so it is always the same constant (zero).
-fusrbv.f should be the one dividing the sphere by its radius but I cannot get it to do it.

I have tried to set the parameter FUSRBV inside fusrbv.f to be:
a) FUSRBV = SQRT(XA^2+YA^2+ZA^2), where XA, YA, ZA are the position inputs of fusrbv.f and correspond to the particle position.
b) FUSRBV = SQRT(X^2+Y^2+Z^2), where X, Y, Z are (I believe) the coordinates in my geometry.

In the input, I have set the 3rd variable (the one corresponding to fusrbv.f) to go from zero (the center of the sphere) to the radius of the sphere (100 cm) and divide it in 200 bins. Please find attached the input and subroutines used.

Thank you very much for your time in advance. Any help would be extremely appreciated!

Best regards,
Daniel

let.inp (1.6 KB)
fusrbv.f (1.6 KB)
lusrbl.f (1.2 KB)
musrbr.f (1.4 KB)

Dear @Daniel,

Welcome to the FLUKA forum.

Could you please explain what do you mean by “having trouble with the third one”? What do you obtain that is not as expected? Your option a) looks reasonable to me.

Kind regards,
Francisco

Dear @fogallar,

Thank you for your reply! It is not expected because I have done the same calculation with PENELOPE, TOPAS and FLUKA and, for FLUKA, I obtain noticeably different results. Please find attached the graph where this can be seen.

In the graph, you can see that I have tried two different fusrbv.f choices (“not norm. bin” and “norm. bin”). “Not norm. bin” is option a) above, while “Norm. bin” is a trial where I normalise FUSRBV such that:

FUSRBV = SQRT(XA^2+YA^2+ZA^2)/(4x3.1415x(XA^2+YA^2+ZA^2))

(this can be also seen in the fusrbv.f file I attached above). I chose this to normalise somehow the binned results by the area of a sphere (it was a bit of a wild guess on my side). This second choice gives a better result, although the curve is way too steep.

I was thinking that maybe XA,YA and ZA are not the required coordinates to be recorded to score dose and I was wondering what could be.

Thank you once again for your time.

Best wishes,
Daniel

sphere.eps (108.1 KB)

Dear @danipuerta,

What should be the energy of your photons?

Cheers,
Francisco

Hi,
the variables X,Y,Z do not exist in fusrbv.f.
By means of your a) expression, you are scoring as a function of the distance from the origin (i.e. the radius), but - with the special “mesh” you selected, where no division by the volume can be made by FLUKA itself - you are not scoring the dose, rather the energy deposited in the whole (4*pi) spherical layer corresponding to one radial bin. Since you want to score as a function of the radius, you shall not play with the fusrbv expression, rather dividing by the layer volume - depending on the radius - when plotting the obtained results.

Dear @fogallar,

It should be 1.25 MeV which I believe is right in the input I sent.

Thank you very much for your time.

Best regards,
Daniel

Dear @ceruttif,

Thank you very much for your reply! It is indeed working now. Would you say that is possible to add a USERWEIG card with either comscw.f or fluscw.f subroutines in order to do that normalisation while calculating? Or does it influence that we need to divide by the radius of the spherical layer?

Thank you very much for your time.

Best regards,
Daniel

It’s possible, since one thing is the scored quantity (amount of deposited energy, which is going to be multiplied with comscw.f by a custom factor COMSCW, equal to the inverse of the respective layer volume, by means of the available XA,YA,ZA coordinates), another thing is its assignment to a given radial bin thanks to fusrbv.f. Note that in comscw.f it’s up to you to determine which radial bin the aforementioned coordinates correspond to, such as to properly calculate the spherical layer volume.
(If I’m missing something and things go wrong, please come back here).

Dear @ceruttif,

I tried to normalise the results by means of the COMSCW factor and I got a similar result to when I “normalised” the results using the fusrbv.f. subroutine directly. Please find attached my comscw.f file.

What I did is set COMSCW = 1/(4 x pi x (XA^2+YA^2+ZA^2)*0.5) where, I believe, this is 1 over the approximate volume of a spherical layer.

The other subroutines are equal and I had to modify my input accordingly (please find a copy attached).

Thank you very much for your time.

Best regards,
Daniel

let.inp (1.8 KB)
comscw.f (561 Bytes)

comscw.f

Dear @ceruttif,

Now it is working perfectly. Thank you very much for your help!

Best wishes,
Daniel