Quick launch:
Last version:
News:
--
Fluka Release
|
[ <--- prev -- ] [ HOME ] [ -- next ---> ] 6 General features of FLUKA inputThe input of FLUKA consists of a text file containing a sequence of option
lines (often called "cards") which are followed sometimes by data cards
specific of the option (or command) requested. Option cards have all the same
structure, and can be read in fixed format or in free format. A description
of free format is given in (7), options GLOBAL and FREE.
CODEWD, (WHAT(I), I = 1, 6), SDUM (the fixed format is A8, 2X, 6E10.0, A8) where:
Since 2006, a very practical and appealing feature has been introduced: INPUT BY NAMES. This means that the numeric WHAT fields can be filled with pre-defined or user-defined names, such as:
Names must be at most 8 character long, with the exception of detector names
(estimator options (USRBDX, USRTRACK, USRCOLL, USRBIN, USRYIELD, RESNUCLEi)
which can be 10 character long. Leading and trailing blanks are automatically
stripped, and the input parser is case sensitive.
Most definitions have some default values. If these are acceptable, it is not
compulsory that the corresponding option card appear explicitly in the input
sequence. Furthermore for most WHAT and/or SDUM parameters a default value
(that may be different from the default value when the definition has not been
input) is applied if the corresponding field is left blank (or set = 0.0) in
the input card.
"From .... to .... in step of ...." (corresponding to a Fortran DO-loop) making the input more compact. An example can be found below in the description of
option ASSIGNMAt, which is used to set a one-to-many correspondence between
material numbers and region numbers.
Physical unitsPhysical units consistently used in FLUKA input and output are: distance cm (and derived units cm2, cm3 for areas and volumes) energy GeV Exceptions: eV is used for average ionisation potential and for damage energy threshold input by option MAT-PROP g/(MeV cm2) is used for the first Birks coefficient input by option TCQUENCH, and g2/(MeV2 cm4) for the second coefficient. momentum GeV/c temperature degree Kelvin solid angle sr (exception: degrees may be used, on user's request, with option USRYIELD) magnetic field T electric field kV/cm time s (option TCQUENCH) or ns (option TIME-CUT) activity Bq LET keV/(micrometer g/cm3) dose equivalent pSv 6.1 The input preprocessor
FLUKA, since 2005, comes bundled with an internal preprocessor, a simplified version of a C-like preprocessor. The preprocessor can modify the input file before it is executed with the use of conditions. Presently the functionality is limited to 3 types of directives, DEFINITION, CONDITIONAL and INCLUDE, and probably will be expanded in the future. The preprocessor is a particularly useful way to include or remove blocks of input cards, allowing a more flexible and easy organization of an input file. One can write the input file around a few directives to allow easier debugging, changing thresholds, biasing and scoring cards for the final production. SyntaxAll preprocessor directives are single lines starting with the # character in the first column and can appear anywhere in the input file, either between normal input cards or inside the geometry definition (inline or externally defined). Each identifier can be up to 40 characters in length. Definition of ConstantsWith the DEFINITION DIRECTIVES one can define identifiers to be used later for inclusion or removal parts of the input file: #define [identifier_name] defines [identifier_name] without giving it a value. This can be used in conjunction with another set of directives that allow conditional execution. #undef [identifier_name] deletes any previously defined [identifier_name]. Conditional directivesWith the CONDITIONAL DIRECTIVES one can include or remove parts of the input file before execution. The #if, #elif, #else blocks must be terminated with a closing #endif. There is a maximum of 10 nesting levels that can be used. #if [identifier_name] ... #elif [identifier_name] ... #else ... #endif The #if and #elif (else-if) directive is followed by an identifier. If the
identifier is defined then the statement evaluates to true, otherwise to false.
#define DEBUG #define PLOT1 ... #if DEBUG *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 GEOEND 100.0 100.0 100.0 -100.0 -100.0 -100.0 DEBUG GEOEND 50.0 50.0 50.0 & #else GEOEND #endif ... #if PLOT1 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 PLOTGEOM 1.0 -2000.0 MBWD6L1 -100.0 0.0 -21620.0 100.0 0.0 -21250.0 1.0 0.0 0.0 0.0 0.0 1.0 -100.0 0.0 -21200.0 100.0 0.0 -20800.0 STOP #endif Include directiveThe INCLUDE DIRECTIVE switches the input stream from the original input file to a different file, and back to the original file after the end-of-file is met. It can be applied also to geometry input. Include directives can be nested at multiple levels. #include [path/filename] where "path" can be an absolute path, or a relative path (relative to the
"launching" directory).
#include /home/geometries/target2.geom #include frontplanes.geom |
© FLUKA Team 2000–2024