Quick launch:
Last version:
News:
FLUKA 2021.2.6 has been released. Flair-2.3-0bpy3 python3 port on 28.05 |
## Particle sourcesQ:
How do you sample a Synchrotron Radiation spectrum?
A:
There are two ways:
- Sample uniformly an energy in the interval of interest, and load in stack a photon with that energy and a weight equal to the corresponding spectral value, multiplied by the width of the sampling interval.
- Pre-calculate a table of values of the cumulative (i.e. integral) spectrum. There is no need to use sophisticated integration techniques: a simple sum of S(E)*DE is sufficient provided you keep the energy intervals DE sufficiently small. Normalise the table dividing all values by the last one. Take a random number x between 0 and 1, and search the table for the smallest value larger than x. Interpolate the energy between that point and the previous one.
The explained ways of sampling are not limited to the case of a synchrotron radiation spectrum but are used in many similar cases such as sampling from a galactic cosmic ray spectrum. Q:
How do you sample a Gas Bremsstrahlung spectrum?
A:
In short, the technique is the following: Make the electron beam cross a volume of air (or appropriate gas) at atmospheric pressure, or, if the straight line is longer than about 10 m, at 1/10 atm. The results must be normalised to the actual pressure (dividing by a factor which is generally of the order of 1.E11~1.E12). Very important:
- multiple scattering in the gas must be suppressed (there is no appreciable scattering in the residual gas of very low density, but at atmospheric pressure scattering will introduce a non-physical angular spread of the photons)
- Secondary electron and positron production thresholds (Moller and Bhabha thresholds) must be set very large, close to the incoming energy, in order to avoid angular spread coming from those processes as per multiple scattering
- kill the electrons at the end of their trajectory in gas (in real life they would be bent out of the way by some magnet). One way to do this is to make a very thin region of gas with electron cutoff higher than beam energy.
Q:
How do I simulate an isotropic source?
A:
Use a BEAM command with divergence [WHAT(3)] > 6284 (2000 Pi mrad).
Q:
What subroutine should I use to sample from a Gaussian distribution?
A: CALL FLNRRN (RGAUSS)returns one number normally distributed CALL FLNRR2 (RGAUS1, RGAUS2)returns two such numbers, independent of each other Q:
When using the source routine source.f how can beam parameters defined with the BEAM card be preserved?
A:
By default, all settings defined with the beam card are ignored when using source, i.e., you must sample yourself any momentum spread, divergence or distribution of the beam spot. Only the beam momentum, defined with WHAT(1) of the BEAM card is available to the user as variable PBEAM (common block BEAMCM).
Last updated: 26th of April, 2016 |

© FLUKA Team 2000–2022