Last version:
FLUKA 2023.3.4, April 10th 2024
(last respin 2023.3.4)
flair-2.3-0d 13-Sep-2023

News:

-- Fluka Release
( 10.04.2024 )

FLUKA 2023.3.4 has been released.


font_small font_med font_big print_ascii

previous FAQback to FAQ listnext FAQ

Particle sources

Q:

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 second way can be extended to sample from a biased spectrum: indeed in many problems you don't want to sample too many photons at the lowest energies, which contribute little to most of the quantities of interest. Using the first way, all energies are sampled with the same probability.

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.
See Ferrari et al., Nucl. Instr. Meth. B83, 518 (1993). A detailed example is shown on the FLUKA web page: Examples

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–2024

Informativa cookies