Re: [fluka-discuss]: Scoring flux inside a receptor from a spherical volume source

From: Santana, Mario <msantana_at_slac.stanford.edu>
Date: Tue, 23 Jan 2018 19:55:44 +0000

Hi Riya,

I will use your original email to include my comments of it based on a quick analysis of your files.

> On Jan 23, 2018, at 3:18 AM, riyadey_at_barc.gov.in wrote:
>
> Dear FLUKA experts,
>
> I was trying to calculate flux of photons entering into a sphere (receptor) of radius 1 cm which is surrounded by a volume source in the form of a sphere having radius 100 meter

In your source file use PIPIPI instead of just ‘3.14’ otherwise you leave a small volume of your sphere upsampled.
Also you are trying to reject particles that are inside of the 1 cm radius sphere, but you do it wrongly, as you compare your sampled x, y, z with the respective extremes (-1 or 1) for each variable. You should just verify that the radius is larger than ONEONE.

> emitting photons isotropically having energy of 1.29 MeV.

This is not what you do. In your source routine you assign TKEFLK (NPFLKA) = ENERGY, with ENERGY = 0.0001 = 0.1 MeV.

Also, again you use 3.14 instead of PIPIPI (or at least 3.141592654). Moreover, you should verify that UBEAM**2+VBEAM**2+WBEAM**2 = ONEONE, otherwise you may have problems due to rounding errors.

> I gave no of histories 1E7 , and no of energy bins 20.

No, the number of energy bins is set to default, i.e. 10. If you want 20 you must input that value in the corresponding WHAT() of USRBDX

> But in the output file I am getting only some flux at lower energy bin with 99% relative error.

This is quite normal, as your lower energy bin spans from 0.0 to 1.29E-4 (=0.129 MeV), and the starting energy of your photons is 0.1 MeV, thus detected photons must be within that lower bin only.

Note that in FLUKA the error is computed from output files of different runs (with different seed numbers). Thus, regarding of your simulation size (in your case 1E7), your error will be 1E7 if you only have one run.

> The same problem was run using MCNP and there good results are obtained.
>
> Can anyone tell me what is the issue while scoring in FLUKA?

Mainly you set the wrong energy, but also at least you have some minor errors in the source routine.

> Also,In MCNP, f5 tally is used to get flux values at the receptor location, and then these fluxes can be converted into dose (using FLUX to DOSE CONVERSION FACTORs from ICRP-21) internally by interpolation. Is there any way to do the same in FLUKA?

Please take a look at the scoring options in the FLUKA manual.

Finally, I’d suggest that you start by doing more simple comparisons that don’t involve use of user routines, just to learn more about basic functions such as scoring and physics. Also, very important in your case is that you set the generation/transport thresholds for electrons/positrons and photons (EMF-CUT cards), which you haven’t done and it will be computed internally by FLUKA to some value that may not be suitable for your study


>
> The input files are attached here.
>
> With regards,
> Riya Dey<input.inp><sphsour.f>


-Mario

(Ƨځ맲r*'~&x%Zm 0nߖi'iw
Received on Tue Jan 23 2018 - 22:06:16 CET

This archive was generated by hypermail 2.3.0 : Tue Jan 23 2018 - 22:06:41 CET