CERN homepage INFN homepage
FLUKA: 2.2.1} Generalities about FLUKA input Previous Index Next

2.2.1} Generalities about FLUKA input

 FLUKA reads user input from an ASCII "standard input" file with extension
 .inp.  The general characteristics and rules of FLUKA input are described in
 Chapter 6}.  The input consists of a variable number of "commands" (called
 also "options"), each consisting of one or more "lines" (called also "cards"
 for historical reasons).

 Apart from FLUKA commands, the input file may contain also the description of
 the geometry of the simulated set-up. Also this description is provided by
 means of specific geometry "command cards" in a special format described in
 Chapter 6}.

 The geometry description can, on request, be kept in a separate ASCII file:
 this feature is especially useful when the same geometry is used in several
 different inputs, not only to save space but because modifications can be
 made in one single place.

 The typical structure of a FLUKA input file is the following:

* Titles and comments for documentation purposes (optional, but recommended)
* Description of the problem geometry (solid bodies and surfaces, combined to
partition space into regions) (mandatory)
* Definition of the materials (mandatory unless pre-defined materials are
* Material assignments (correspondence material-region, mandatory)
* Definition of the particle source (mandatory)
* Definition of the requested "detectors". Each of these is a phase space
domain (region of space, particle direction and energy) where the user wants to calculate the expectation value of a physical quantity such as dose, fluence, etc. Various kinds of detectors are available, corresponding to different quantities and to different algorithms used to estimate them ("estimators"). Detectors are optional, but one at least is expected, at least in the production phase
* Definition of biasing schemes (optional)
* Definition of problem settings such as energy cutoffs, step size, physical
effects not simulated by default, particles not to be transported, etc. (optional)
* Initialisation of the random number sequence (mandatory if an estimation of
the statistical error is desired)
* Starting signal and number of requested histories (mandatory)
In addition, special commands are available in FLUKA for more advanced problems involving magnetic fields, time-dependent calculations, writing of history files (so-called "collision tapes"), transport of optical photons, event-by-event scoring, calling user-written routines, etc. These options are expected to be requested only by users having some previous experience with the more common commands: therefore they will be mostly ignored in this beginner's guide. Let's first recall the general structure of the FLUKA command lines (cards). The geometry commands will be reviewed later. Each card contains:
* one keyword,
* six floating point values (called WHATs),
* one character string (called
Some WHATs represent numerical quantities (e.g. energy, coordinates), while others, converted to integers, are indices corresponding to a material, a type of particle, a region etc. In this latter case, it is possible to replace the number by the corresponding name (a character string). Not necessarily all WHATs and SDUMs are used. In some cases, a command line can be followed by a line of text (for instance a filename path or a title). Any line having an asterisk (*) in the first position is treated as a comment. All lines (commands, text strings and comments) are echoed on the standard output (the file with extension .out). In case of problems, it is a good idea to check how every line has been printed in the standard output. Often, output reveals typing or format errors by showing how the program has misinterpreted them. In addition to the simple echo, an "interpreted" feedback to all commands is provided in the next section of the standard output. Checking this part of the output is also very useful, because it helps making sure that the user's intentions have been expressed correctly and understood by the code. See Chapter 9} on FLUKA output for a detailed description. If a line contains an exclamation mark (!) all following characters are replaced by blanks. This feature can be used for short in-line comments which will not be echoed in output. The order of input commands is generally free, with only a few exceptions reported in Chapter 7}. Therefore, the order suggested in the following should not be considered as mandatory, but only one of the possible ways to write FLUKA input.

Previous Index Next