Dear FLUKA experts,
I have succesfully installed the user routine package from the Sampling from energy spectra post.
I have scored the dose after a succesful simulation (both ASC and BIN) for 10,000 primaries and had some resulting questions. According to the manual, ‘Doses will be expressed in GeV/g per unit primary weight’, but how does this apply when the energy spectra sampling user routine package is used?
In other words, if I want to know the contribution of a specific bin to the total dose, should I multiply the resulting average dose value from the ASC files (in GeV/g per unit primary weight) by their weights?
For example (the values are entirely fictional), I have 3 energy bins:
1.0000E-3 1.0000E-1 3.0000E+2
1.0000E-1 1.1000E-1 5.0000E+4
1.1000E-1 3.0000E-1 8.0000E+3
Where the 1st and 2nd column are the min and max energy and the third column the differential flux. Should I multiply the dose from the ASC file by their respective fluxes in the 3rd column to determine how much each bin contributes to this dose value?
Similarly for this example, if I want to plot these results should I include the total sum of the third column, i.e. 5.83E+04 in the normalization factor in order to see the plot for the total number of particles instead of per unit primary weight?
Thank you in advance.
there is nothing that you need to do in addition. The routines take care of the normalization so that it is equivalent to a standard FLUKA calculation. Results can be interpreted as “per primary particle” or if you do residual dose rate/activation calculations “per second”.
To complete my previous answer:
If you want to know the contribution of a specific bin to the total result then you have to multiply it by the fluence in that bin (bin value * bin width) divided by the total fluence (=sum of [all bin values * respective bin widths]).
If you want to know the result for a specific total nr. of particles then you just multiply the result (which is given per primary particle) with the total nr. of primary particles that you are interested in.
Thank you for your explanation, both are clear and fully understood. Regarding the algorithm used from this routine package, there is one final thing I want to ask.
By default, rejection sampling is used. From the explanation in the README file, it is an entirely stochastic process. Does this mean the weights of the third column (the differential flux) are not taken into account? The third algorithm, biased sampling, explicitly mentions that ‘the respective weight is set in the associated fluence’.
For my case, I want the sampling to be based on these fluence weights. From this, is it correct to conclude that the biased sampling algorithm is more representable than the default rejection sampling algorithm?
Thank you kindly,
No, actually the weights in the third column are always taken into account no matter which sampling algorithm you choose.
The difference in the algorithms comes from different performance in terms of efficiency, the fact that some algorithms also allow for taking uncertainty in the weights (3rd column) into account while others that are more quicker cannot do this. In addition the biased sampling method allows to additionally define an importance function on top of the weights which can be useful for synchrotron spectra or cases where you have a low fluence but those energies are the most important ones for your result.
Understood! Thank you very much for your reply and the previous ones. You have been of great help to me.
Wishing you a great day,