Last version:
FLUKA 2021.2.2, September 25th 2021
(last respin )
flair-2.3-0b 30-Jul-2021

News:

-- Fluka Release
( 25.09.2021 )

FLUKA 2021.2.2 has been released.
Fluka Release 30.07.2021 FLUKA 2021.2.1 has been released.
Fluka Major Release 18.05.2021 FLUKA 2021.2.0 has been released.
Congratulations from INFN: ,
Dear Paola,
I wish to congratulate you and all the authors and collaborators for this new Fluka release, which looks at the future and confirms the support of INFN in the development and continuous improvement of this code.
best regards
Diego Bettoni
INFN Executive Committee


font_small font_med font_big print_ascii

[ <--- prev -- ]  [ HOME ]  [ -- next ---> ]

[ full index ]


8 Combinatorial Geometry

The Combinatorial Geometry (CG) used by FLUKA is a modification of the package developed at ORNL for the neutron and gamma-ray transport program MORSE [Emm75] which was based on the original combinatorial geometry by MAGI (Mathematical Applications Group, Inc.) [Gub67,Lic79].

The default input format is fixed, and different from that adopted elsewhere in the FLUKA code. The input sequence must be completely contained between a GEOBEGIN and a GEOEND card (see the corresponding description in (7)).

Two concepts are fundamental in CG: bodies and regions. Originally, MORSE bodies were defined as convex solid bodies (finite portions of space completely delimited by surfaces of first or second degree, i.e. planes or quadrics). In FLUKA, the definition has been extended to include infinite cylinders (circular and elliptical) and planes (half-spaces). Use of such "infinite bodies" is encouraged since it makes input preparation and modification much easier and less error-prone. They also provide a more accurate and faster tracking.

Regions are defined as combinations of bodies obtained by boolean operations: Union, Subtraction and Intersection. Each region is not necessarily simply connected (it can be made of two or more non contiguous parts), but must be of homogeneous material composition. Because the ray tracing routines cannot track across the outermost boundary, all the regions must be contained within a surrounding "blackhole" (an infinitely absorbing material, in MORSE jargon "external void", designated by the FLUKA material number 1), so that all escaping particles are absorbed. It is suggested to make the external blackhole region rather big, so as not to interfere with possible future modifications of the problem layout. The external blackhole must be completely surrounded by the boundary of a closed body, and therefore cannot be defined by means of half-spaces or infinite cylinders only. Inside such outermost boundary, EACH POINT OF SPACE MUST BELONG TO ONE AND ONLY ONE REGION. Note that in MORSE the concept of "region" refers to a portion of space of homogeneous statistical importance or weight setting, which may extend over one or several "zones" (homogeneous in material composition). Since the two MORSE concepts of region and zone coincide in FLUKA (there is a one-to-one correspondence), the term "region" will be used here to define ä portion of space of uniform material composition, obtained by boolean operations on one or more subregions", while "zone" will indicate one of such subregions, obtained by boolean operations on one or more geometrical bodies.

Repetition of sets of regions according to symmetry transformations is possible in FLUKA through the card LATTICE and through a user-written routine. This allows, for instance, to model in detail only a single cell of a calorimeter and to replicate it in the entire volume.


Combinatorial Geometry input

CG input must respect the following sequential order:

     GEOBEGIN card  (in FLUKA standard format, or in free format if requested
                    by a previous FREE command)
     Geometry title (in special format, or in free geometry format if requested
                    by an initial GLOBAL command)
     Body data      (in special or free geometry format)
     END card       (in special or free geometry format)
     Region data    (in special or free geometry format)
     END card       (in special or free geometry format)
     LATTICE cards  (optional, in FLUKA standard format, or in free format if
                    requested by a previous FREE command)
     Region volumes (optional, see Geometry title card)
     GEOEND card    (in FLUKA standard format, or in free format if requested
                    by a previous FREE command)

8.1 GEOBEGIN card

EOBEGIN card|GEOBEGIN card|94|8| -->

This card follows the general FLUKA format (see description in (6)). It can be in free format if the latter has been requested with option FREE. The rest of the geometry must be in a special fixed format described below, unless free geometry format has been requested by a GLOBAL command at the beginning of input.

The meanings of the WHAT and SDUM parameters are:

     WHAT(1)        : not used

     WHAT(2)        : absolute accuracy parameter (Aa) in units of 10**-6 cm.
                      It is used for tracking and boundary identification.
                      Aa should be larger than Ar*L , where L is the largest
                      coordinate value in the geometry description (excluding
                      the outer blackhole shell containing it and Ar is the
                      relative accuracy achievable in double precision (of the
                      order of 1.E-14 - 1.E-15).
                      Default = 0.0001

     WHAT(3)  > 0.0 : logical unit for geometry input. The name of the
                      corresponding file must be input on the next card
                      if WHAT(3) is different from 5. Note that values of
                      WHAT(3) /= 5.0 and < 21.0 must be avoided
                      because of possible conflicts with FLUKA pre-defined
                      units.
                      Default = 5.0 (i.e. geometry input follows)

     WHAT(4)  > 0.0 : logical unit for geometry output. If different from
                      11, the name of the corresponding file must be input
                      on the next card if WHAT(3) = 0 or 5, otherwise on
                      the card following the next one. Values of
                      WHAT(3) /= 11.0 and < 21.0 must be avoided because
                      of possible conflicts with FLUKA pre-defined units.
                      Default = 11.0  (i.e. geometry output is printed on
                      the standard output)

     WHAT(5)        : parentheses optimisation level = i0 + i1 x 1000
                      i0 = 1: logical optimisation only activated
                           2: logical + "plane" optimisation activated
                           3: logical + "plane" + "bounding box"
                              optimisation activated
                             (Default: 3)
                      i1 > 0 forces optimisation even if no parentheses
                             are found in the region under scrutiny
                             (Default: 0)

*    WHAT(6)        : not used

     SDUM = COMBINAT  : Combinatorial geometry is used. See section
                        on Combinatorial Geometry for input description
                        Other geometries, available in older versions of
                        FLUKA, are no longer supported.
                        Default: COMBINAT
     SDUM = COMBNAME  : Combinatorial geometry is used in free format, and
                        names can be used instead of body and region numbers

     Default (option GEOBEGIN not given): not allowed! GEOBEGIN and
           GEOEND must always be present.

8.2 Geometry Title card

Three variables are input in the CG Title card: IVOPT, IDBG, TITLE. The format is (2I5,10X,A60). The first integer value (IVOPT = Input Volume OPTion) is a flag to indicate how to normalise the quantities scored in regions by the FLUKA option SCORE:

    IVOPT = 0 means that no normalisation must be performed (output
              values are total stars or total energy deposited in each
              region).

    IVOPT = 1 and IVOPT = 2 have no meaning in FLUKA and are not
              allowed.

    IVOPT = 3 means that the scores must be normalised dividing by region
              volumes input by the user just before the GEOEND card.

The second integer value can be used to modify the format with which body and region data are read:

    IDBG  = 0 or 10 : default fixed format for both bodies and regions
          =  -10 : high-accuracy fixed format for bodies; default fixed region
                   format
          = -100 : high-accuracy fixed format for bodies; region fixed format
                   allowing more than 10000 regions
          =  100 : default fixed format for bodies; region fixed format allowing
                   more than 10000 regions
          Note however that the maximum number of regions is dimensioned to
          10000 in INCLUDE file (DIMPAR). To take advantage of the wider format
          it is necessary to modify the file and to recompile the program
          Any other value should be avoided. The value of IDBG is irrelevant if
          free geometry format has been requested (see the GLOBAL command).

The remaining 60 characters can be used for any alphanumeric string at the user's choice. If fixed format is not used, the value of IDBG is irrelevant.

8.3 Body data

The geometry must be specified by establishing two tables. The first table describes the type, size and location of the bodies used in the geometry description. The second table defines the physical regions in terms of these bodies.

Each body TYPE is referred to by a three-letter code.

There are three kinds of possible body input formats, two fixed and one free. Free format, if used, implies necessarily also the use of free format in region input (see below).


FIXED FORMAT BODY INPUT

IXED FORMAT BODY INPUT|FIXED FORMAT BODY INPUT|94|8| -->

Fixed format for both body and region input is the default, unless requested differently by a GLOBAL command at the beginning of the input file. In fixed format, each body is defined by: its code, a sequential number, and a set of floating point numerical parameters defining its size, position and orientation in space (all in cm). Default fixed format is the original CG one as used in MORSE and in other Monte Carlo programs. It expects up to 6 floating point values per line. High-accuracy fixed format allows to enter numerical data with full precision (16 significant digits) and accommodates only a maximum of 3 floating point values per line.

The fixed input format for each body depends on the value of the IDBG variable given in the Geometry Title card (see above). If IDBG = 0, 10 or 100, the body input format is (2X, A3, I5, 6D10.3); if IDBG = -10 or -100, the format is (2X, A3, I5, 3D22.15); where the 3-letter code in columns 3-5 is one of the following:

               ARB BOX ELL PLA QUA RAW RCC REC RPP SPH
               TRC WED XCC XEC XYP XZP YCC YEC YZP ZCC ZEC

(columns 3-5 must be left blank in continuation cards).

The integer in columns 6-10 is the body sequential number (if left blank numbers are assigned automatically, but this is not recommended; it must be left blank in continuation cards). The floating-point numbers in columns 11-76 are geometrical quantities defining the body (their number depends on the body type as explained below, and can extend over several continuation lines). The presence of the decimal values in the numerical data is compulsory.

After the last body description, end with a card having the code END in columns 3-5.


FREE FORMAT BODY INPUT

REE FORMAT BODY INPUT|FREE FORMAT BODY INPUT|94|8| -->

Free format is used for both body and region input only if requested by a GLOBAL command at the beginning of the input file or by the string COMBNAME in the SDUM field of the GEOBEGIN command. In free format, each body is defined by: its code, its identifier (an alphanumeric string of up to 8 characters, with the first character alphabetical) and a set of numerical parameters defining its size, position and orientation in space (all in cm). Free format has been introduced only recently and is expected to supersede soon the other formats, which will be kept however for reasons of back compatibility. Its main advantages, in addition to the freedom from strict alignment rules, are the possibility to modify the input sequence without affecting the region description (for instance, by inserting a new body) and the availability of parentheses to perform complex boolean operations in the description of regions.

The input for each body consists of a 3-letter code indicating the body type:

               ARB BOX ELL PLA QUA RAW RCC REC RPP SPH
               TRC WED XCC XEC XYP XZP YCC YEC YZP ZCC ZEC

followed by a unique "body name" (alphanumeric identifier) and a set of geometrical quantities defining the body (their number depends on the body type as explained below). The different items, separated by one or more blanks, or by one of the separators "," "/" ";" "\" ":" can extend over as many lines as needed. See option FREE for more detailed instructions on the use of separators.

After the last body description, end with a line having the code END

With all input formats, a card having an asterisk (*) in column 1 is treated as a comment card. Such comment cards can be inserted freely at any point of Body and Region input, allowing easier identification.


Body types

  • 1. Rectangular Parallelepiped. Code: RPP An RPP has its edges parallel to the coordinate axes. It is defined by 6 numbers in the following order: X_min, X_max, Y_min, Y_max, Z_min, Z_max (minimum and maximum coordinates which bound the parallelepiped). Warning! Of course X_min must be < X_max, Y_min < Y_max and Z_min < Z_max. If this condition is not satisfied, the body is ignored. An RPP definition extends over one single card in default fixed format, or over two cards in high-accuracy body fixed format (IDBG = -10 or -100 in the CG Title card, see above).

Example in default fixed format (the comment lines shown are allowed input lines):

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   RPP    4     -20.0     +20.0     -50.0     +50.0     -38.5     +38.5
 * (a parallelepiped centreed on the origin)

The same input, in high-accuracy fixed format, would be:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   RPP    4                 -20.0                 +20.0                 -50.0
                            +50.0                 -38.5                 +38.5

The same, in free format:

 RPP Smlbrick  -20.0  +20.0  -50.0  +50.0  -38.5  +38.5

  • 2. General Rectangular Parallelepiped. Code: BOX A BOX is also a Rectangular Parallelepiped, but with arbitrary orientation in space. Its use is generally not recommended, since it can be replaced by a suitable combination of infinite planes (PLA, XYP, XZP, YZP). Planes are easier to define, make tracking more accurate and often only a few are needed in a region description. A BOX is defined by 12 numbers in the following order: V_x, V_y, V_z (coordinates of a vertex), H1_x, H1_y, H1_z, H2_x, H2_y, H2_z, H3_x, H3_y, H3_z (x, y and z components of three mutually PERPENDICULAR vectors representing the height, width and length of the box). Note that it is the user's responsibility to ensure perpendicularity. This is best attained if the user has chosen high-accuracy input fixed format (IDBG = -10 or -100 in the CG Title card, see above), or free format, and the value of each vector component is expressed with the largest available number of significant digits. A BOX definition extends over 2 cards in default fixed format, or over 4 cards in high-accuracy body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   BOX   18       0.0       0.0       0.0 7.0710678 7.0710678       0.0
           -14.142136 14.142136       0.0       0.0       0.0      30.0
 * (a parallelepiped with a corner on the origin, with edges 10, 20 and
 *  30 cm long, rotated counterclockwise by 45 degrees in the x-y plane)

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   BOX   18                   0.0                   0.0                   0.0
                7.071067811865475     7.071067811865475                   0.0
               -14.14213562373095     14.14213562373095                   0.0
                              0.0                   0.0                  30.0

The same, in free format:

 BOX tiltslab  0.0  0.0  0.0  7.071067811865475  7.071067811865475  0.0
            -14.14213562373095  14.14213562373095  0.0  0.0  0.0  30.0

  • 3. Sphere. Code: SPH A SPH is defined by 4 numbers: V_x, V_y, V_z (coordinates of the centre), R (radius) A SPH definition extends over one single card in default fixed format, or over two cards in high-precision body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   SPH  002       5.0     -30.0      27.0     528.2
 * (a sphere centreed at point x=5, y=30, z=27, with a radius of 528.2 cm)

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   SPH  002                   5.0                 -30.0                  27.0
                            528.2

The same, in free format:

 SPH  TheBall  5.0  -30.0  27.0  528.2

  • 4. Right Circular Cylinder. Code: RCC An RCC can have any orientation in space. It is limited by a cylindrical surface and by two plane faces perpendicular to its axis. (If the cylinder axis is parallel to one of the coordinate axes, it is worth considering instead the use of an infinite cylinder XCC, YCC or ZCC (see below), leading to increased tracking speed). Each RCC is defined by 7 numbers: V_x, V_y, V_z (coordinates of the centre of one of the circular plane faces), H_x, H_y, H_z (x, y and z components of a vector corresponding to cylinder height, pointing to the other plane face), R (cylinder radius). An RCC definition extends over 2 cards in default fixed format, or over 3 cards in high-accuracy body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   RCC   07       5.0       5.0       5.0 57.735027 57.735027 57.735027
                  37.
 * (a circular cylinder 100 cm long and of 37 cm radius, with base
 *  centred at point x=5, y=5, z=5, its axis making equal angles to
 *  the coordinate axes).

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   RCC   07                   5.0                   5.0                   5.0
                57.73502691896258     57.73502691896258     57.73502691896258
                              37.

The same, in free format:

 RCC  BYGCYL  5.0  5.0  5.0  57.73502691896258  57.73502691896258
         57.73502691896258  37.

  • 5. Right Elliptical Cylinder. Code: REC A REC can have any orientation in space. It is limited by a cylindrical elliptical surface and by two plane faces perpendicular to its axis. (If the cylinder axis is parallel to one of the coordinate axes, it is worth considering instead the use of an infinite cylinder XEC, YEC or ZEC (see below), leading to increased tracking speed). Each REC is defined by 12 numbers: V_x, V_y, V_z (coordinates of the centre of one of the elliptical plane faces), H_x, H_y, H_z (x, y and z components of a vector corresponding to cylinder height, pointing to other plane face), R1_x, R1_y, R1_z (components of a vector corresponding to the minor half-axis of the cylinder elliptical base), R2_x, R2_y, R2_z (ditto for the major half-axis). A REC definition extends over 2 cards in default fixed format, or over 4 cards in high-accuracy body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   REC    1     -10.0      12.0       7.0       0.0      58.0       0.0
                   9.       0.0       0.0       0.0       0.0      17.0
 * (an elliptical cylinder 58 cm long parallel to the y axis, with minor
 *  half-axis 9 cm long parallel to the x coordinate axis, major
 *  half-axis 17 cm long parallel to the z axis, base centreed at point
 *  x=-10, y=12, z=7)

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   REC    1                 -10.0                  12.0                   7.0
                              0.0                  58.0                   0.0
                               9.                   0.0                   0.0
                              0.0                   0.0                  17.0

The same, in free format:

 REC pipesurf -10.0 12.0  7.0  0.0  58.0  0.0  9.0  0.0  0.0  0.0  0.0  17.0

  • 6. Truncated Right Angle Cone. Code: TRC A TRC can have any orientation in space. It is bounded by a conical surface and by two circular plane faces perpendicular to the axis of the cone. Each TRC is defined by 8 numbers: V_x, V_y, V_z, (coordinates of the centre of the major circular base), H_x, H_y, H_z (components of a vector corresponding to the TRC height, directed from the major to the minor base), R1 (radius of the major base), R2 (radius of the minor base) A TRC definition extends over 2 cards in default fixed format, or over 3 cards in high-accuracy body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   TRC  102       0.0       0.0    -130.0       0.0       0.0    1000.0
                 600.     150.0
 * (a truncated cone 1000 cm long parallel to the z axis, with the
 * larger circular base 600 cm in radius located at z = -130 and the
 * smaller base 150 cm in radius located at z = 870)

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   TRC  102                   0.0                   0.0                -130.0
                              0.0                   0.0                1000.0
                             600.                 150.0

The same, in free format:

 TRC  NewCone  0.0  0.0  -130.0  0.0  0.0  1000.0  600.  150.0

  • 7. Ellipsoid of Revolution. Code: ELL An ELL is a prolate (cigar-shaped) ellipsoid, obtainable by revolution of an ellipse around its major axis, and having any orientation in space. Each ELL is defined by 7 numbers: F1_x, F1_y, F1_z, F2_x, F2_y, F2_z, (coordinates of the two foci on the major ellipsoid axis), L (full length of the major axis). An ELL definition extends over 2 cards in default fixed format, or over 3 cards in high-accuracy body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   ELL  003    -400.0       0.0       0.0     400.0       0.0       0.0
                1000.
 * (an ellipsoid obtained by revolution around the x axis of an ellipse
 *  centred at the origin, with major axis parallel to x 1000 cm long and
 *  minor axis 600 cm long).

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   ELL  003                -400.0                   0.0                   0.0
                            400.0                   0.0                   0.0
                            1000.

The same, in free format:

  ELL   TheCigar   -400.0   0.0   0.0   400.0   0.0   0.0  1000.0

  • 8. Right Angle Wedge. Code: WED or RAW A WED is the half of a BOX (see), cut by a plane passing through its centre and through four corners. Its use, like that of the BOX, is now mostly superseded by the availability of infinite planes (XYP, XZP, YZP and PLA). A WED is defined by 12 numbers: V_x, V_y, V_z (coordinates of one of rectangular corners), H1_x, H1_y, H1_z, H2_x, H2_y, H2_z, H3_x, H3_y, H3_z (x, y and z components of three mutually PERPENDICULAR vectors corresponding to the height, width and length of the wedge). Note that it is the user's responsibility to ensure perpendicularity. This is best attained if the user has chosen high-accuracy input fixed format (IDBG = -10 or -100 in the CG Title card, see above), or free format, and the value of each vector component is expressed with the largest available number of significant digits. The face defined by vectors 1 and 3 and that defined by vectors 2 and 3 are rectangular; the 2 faces defined by vectors 1 and 2 are triangular; the fifth face is rectangular with two edges parallel to vector 3 and two edges parallel to the hypotenuse of the triangle made by vectors 1 and 2. A WED definition extends over 2 cards in default fixed format, or over 4 cards in high-accuracy body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   WED   97       0.0       0.0       0.0 7.0710678 7.0710678       0.0
           -14.142136 14.142136       0.0       0.0       0.0      30.0
 * (the bottom half of a parallelepiped with a corner on the origin,
 *  with edges 10, 20 and 30 cm long, rotated counterclockwise by 45
 *  degrees in the x-y plane)

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   WED   97                   0.0                   0.0                   0.0
                7.071067811865475     7.071067811865475                   0.0
               -14.14213562373095     14.14213562373095                   0.0
                              0.0                   0.0                  30.0

The same, in free format:

 WED  halfbox1  0.0  0.0  0.0  7.071067811865475  7.071067811865475
      0.0  -14.14213562373095  14.14213562373095  0.0  0.0  0.0  30.0

  • 9. Arbitrary Convex Polyhedron of 4, 5, or 6 sides. Code: ARB An ARB is a portion of space bounded by 4, 5 or 6 plane faces. Its use is rather complicated and is now superseded by the availability of infinite planes (XYP, XZP, YZP and PLA). For completeness, however, a description of input will be reported here. Assign an index (1 to 8) to each vertex. For each vertex, give the x, y, z coordinates on 4 cards (8 cards in high-accuracy body fixed format), with 6 numbers on each card (3 numbers per card in high-accuracy fixed format):
      V1_x, V1_y, V1_z, V2_x, V2_y, V2_z,
      V3_x, V3_y, V3_z, V4_x, V4_y, V4_z,
      V5_x, V5_y, V5_z, V6_x, V6_y, V6_z,
      V7_x, V7_y, V7_z, V8_x, V8_y, V8_z

The vertices not appearing in face descriptions are ignored, but eight must always be supplied. The above vertex cards are followed by one card describing the faces (two cards in high-accuracy fixed format). Each face is described by a four-digit number in floating point format, such that each digit gives the indices of the three or four vertex points of that face. These indices must be entered in the same order for each face (i.e. all clockwise or all counterclockwise). When the number of the faces is less than 6, the remaining face description(s) must be zero, and must appear at the end of the list. If a face has three vertices, the omitted position may be either 0 or a repeat of one of the other vertices. An ARB definition extends over 5 cards in default fixed format, or over 10 cards in high-accuracy body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   ARB    5     -44.2     -36.5    3572.0     -44.2     -33.5    3572.0
                -37.1     -31.0    3572.0     -37.1     -39.0    3572.0
                -44.2     -36.5       0.0     -44.2     -33.5       0.0
                -37.1     -31.0       0.0     -37.1     -39.0       0.0
                1234.     1562.     5876.     1485.     4378.     6732.
 * (a right prism of trapezoidal base, of height 3572 cm parallel to the
 *  z axis)

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   ARB    5                 -44.2                 -36.5                3572.0
                            -44.2                 -33.5                3572.0
                            -37.1                 -31.0                3572.0
                            -37.1                 -39.0                3572.0
                            -44.2                 -36.5                   0.0
                            -44.2                 -33.5                   0.0
                            -37.1                 -31.0                   0.0
                            -37.1                 -39.0                   0.0
                             1234.                1562.                 5876.
                             1485.                4378.                 6732.

The same, in free format:

 ARB oddbody -44.2 -36.5 3572.0 -44.2 -33.5 3572.0 -37.1 -31.0 3572.0 -37.1
          -39.0 3572.0 -44.2 -36.5 0.0 -44.2 -33.5 0.0 -37.1 -31.0 0.0 -37.1
          -39.0 0.0 1234. 1562. 5876. 1485. 4378. 6732.

  • 10. Infinite half-space delimited by a coordinate plane. Code: XYP, XZP, YZP There are 4 kinds of infinite half-spaces. Three of them are delimited by planes perpendicular to the coordinate axes:
      Delimited by a plane perpendicular to the x-axis. Code: YZP
             or by a plane perpendicular to the y-axis. Code: XZP
             or by a plane perpendicular to the z-axis. Code: XYP
             Each of these half-spaces is defined by a single number:
             V_x (resp. V_y, or V_z), the coordinate of the plane on the
             corresponding perpendicular axis.
             The half-space "inside the body" is the locus of points for
             which x < V_x (resp. y < V_y, or z < V_z).

An YZP, XZP, XYP definition, in fixed format, extends always over a single card.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   YZP   71     -44.2
   XZP   72     108.0
   XYP   73       0.0
 * (respectively, all points having x < -44.2, those having y < 108,
 * and those having z < 0).

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   YZP   71                 -44.2
   XZP   72                 108.0
   XYP   73                   0.0

The same example in free format:

 YZP  horizPla  -44.2
 XZP  vertPla1   108.0
 XYP  vertPla2     0.0

  • 11. Generic infinite half-space. Code: PLA Each PLA is defined by 6 numbers: H_x, H_y, H_z (x, y and z components of a vector of arbitrary length perpendicular to the plane), V_x, V_y, V_z (coordinates of any point lying on the plane). The half-space "inside the body" is that from which the vector is pointing (i.e., the vector points öutside"). A PLA definition extends over a single card in default fixed format, and over two cards in high-accuracy body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   PLA   74       0.0       1.0       1.0     200.0    -300.0     240.0
 * (all points "below" a plane at 45 degrees in the y-z projection which
 * passes through the point x=200, y=-300, z=240 - note that for such a
 * plane the x value of the point is completely irrelevant - )

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   PLA   74                   0.0                   1.0                   1.0
                            200.0                -300.0                 240.0

The same example in free format:

 PLA  tiltPla   0.0  1.0  1.0  200.0  -300.0  240.0

  • 12. Infinite Circular Cylinder parallel to a coordinate axis. Code: XCC, YCC, ZCC A XCC (YCC, ZCC) is an infinite circular cylinder parallel to the x (y, z) axis. Each XCC (YCC, ZCC) is defined by 3 numbers: A_y, A_z (A_z, A_x for YCC, A_x, A_y for ZCC) (coordinates of the cylinder axis), R (cylinder radius) An XCC (YCC, ZCC) definition, in fixed format, extends always over one single card.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   XCC  013    -480.0      25.0     300.0
 * (an infinite cylinder of radius 300 cm, with axis defined by y=-480,
 *  z=25)
   ZCC  014       0.0       0.0       2.5
 * (an infinite cylinder of radius 2.5 cm, with axis equal to the z axis)

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   XCC  013                -480.0                  25.0                 300.0
   ZCC  014                   0.0                   0.0                   2.5

The same, in free format:

 XCC  Column  -480.0  25.0  300.0
 ZCC  Tunnel   0.0   0.0    2.5

  • 13. Infinite Elliptical Cylinder parallel to an axis. Code: XEC, YEC, ZEC A XEC (YEC, ZEC) is an infinite elliptical cylinder parallel to the x (y, z) axis, and with the axes of the ellipse parallel to the other two coordinate axes. Each XEC (YEC, ZEC) is defined by 4 numbers: A_y, A_z (A_z, A_x for YEC, A_x, A_y for ZEC) (coordinates of the cylinder axis), L_y, L_z (L_z, L_x for YEC, L_x, L_y for ZEC) (semiaxes of the ellipse). A XEC (YEC, ZEC) definition extends over one single card in default fixed format, and over two cards in high-accuracy body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   ZEC  101      15.0     319.0      33.0      80.0
 * (an infinite elliptical cylinder, centreed on x=15, y=319, with the
 * ellipse minor semi-axis parallel to x, 33 cm long, and the major
 * semi-axis parallel to y, 80 cm long)

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   ZEC  101                  15.0                 319.0                  33.0
                             80.0

The same body, described in free format:

 ZEC  ChimneyA  15.0  319.0  33.0  80.0

  • 14. Generic Quadric. Code: QUA A QUA is a quadric surface defined by a 2nd degree equation F(x,y,z) = 0. Each QUA is defined by 10 numbers:
      A_xx, A_yy, A_zz, A_xy, A_xz, A_yz, A_x, A_y, A_z, A_0

corresponding to the equation:

      A_xx x^2 + A_yy y^2 + A_zz z^2 + A_xy xy + A_xz xz + A_yz yz +
          + A_x x + A_y y + A_z x + A_0 = 0

A QUA definition extends over two cards in default fixed format, and over 4 cards in high-accuracy body fixed format.

Example in default fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   QUA   27    0.0025      0.04    0.0064       0.0       0.0       0.0
                0.055      0.64    0.0256    1.8881
 * (an ellipsoid centred at x = 11 cm, y = 8 cm, z = -2 cm, with
 * a semi-axis 20 cm long parallel to x, one 5 cm long parallel to y and
 * one 12.5 cm long parallel to z)

The same example in high-accuracy body fixed format:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   QUA   27                0.0025                  0.04                0.0064
                              0.0                   0.0                   0.0
                            0.055                  0.64                0.0256
                           1.8881

The same body, described in free format:

 QUA  Elipsoid  0.0025 0.04 0.0064 0.0 0.0 0.0 0.055 0.64 0.0256 1.8881


NOTE

 +---------------------------------------------------------------------+
 | Whenever it is possible, the following bodies should be preferred:  |
 |   PLA, QUA, RPP, SPH, XCC, XEC, XYP, XZP, YCC, YEC, YZP, ZCC, ZEC   |
 | These should indeed make tracking faster, since for them extra      |
 | coding ensures that unnecessary boundary intersection calculations  |
 | are avoided when the length of the next step is smaller than the    |
 | distance to any boundary of the current region.                     |
 +---------------------------------------------------------------------+

8.4 Geometry directives

Geometry directives are special commands enclosed between two lines

                 $Start_xxx ....... $End_xxx

where "xxx" stands for "expansion", "translat" or "transform". They allow to provide respectively a coordinate expansion, a coordinate translation or a coordinate roto-translation of the bodies embedded between the starting and the ending directive lines. Directives can be nested. The body definitions which are contained between the lines "$Start_xxx" and "$End_xxx" are automatically modified according to the syntax described below.


8.4.1 Expansion

This directive provides a coordinate expansion (or reduction) of the body dimensions by a defined scaling factor, for all bodies embedded between the two lines.

 $Start_expansion [scaling factor]
 ..............
 ..............
 ..............
 $End_expansion

 Example:
 $Start_expansion 10.
 QUA  Elipsoid  0.0025 0.04 0.0064 0.0 0.0 0.0 0.055 0.64 0.0256 1.8881
 $End_expansion

transforms an ellipsoid centred at (11, 8, -2), with semiaxes 20, 5 and 12.5 cm long parallel to the coordinate axes, to one centred at (110, 80, -20) with semiaxes 200, 50 and 125 cm long.


8.4.2 Translation

This directive provides a coordinate translation. The bodies embedded between the two lines are translated by [dX] [dY] [dZ] on the three axes.

 $Start_translat [dX] [dY] [dZ]
 ..............
 ..............
 ..............
 $End_translat

Example:

 $Start_translat -5., -7., +9.
 QUA  Elipsoid  0.0025 0.04 0.0064 0.0 0.0 0.0 0.055 0.64 0.0256 1.8881
 $End_translat

transforms an ellipsoid centred at (11, 8, -2), with semiaxes 20, 5 and 12.5 cm long parallel to the coordinate axes, to an identical one centred at (6, 1, 7)


8.4.3 Roto-translation transformation

This directive provides a coordinate transformation, predefined by a ROT--DEFIni card, for all bodies embedded between the two lines.

 $Start_transform [ROT-DEFIni name] (or [ROT-DEFIni number])
 ..............
 ..............
 ..............
 $End_transform

Example 1:

 ....
 * Cylindrical target is transformed with transformation "Rotdefi1"
 $Start_transform  Rotdefi1
 RCC targRepl   0.0 0.0 -5.0 0.0 0.0 10.0 5.0
 $End_transform
 ....
 * ROT-DEFI transformation: shift of (0,-2,-30) then rotation of -21 degrees
 * around the x axis
 ROT-DEFI         0.0                                    -2.0     -30.0Rotdefi1
 ROT-DEFI        100.                -21.                              Rotdefi1

Example 2 (with lattice):

 ....
 * Cylindrical target
 RCC target     0.0 0.0 -5.0 0.0 0.0 10.0 5.0
 * Target replica is transformed with inverse transformation of the lattice
 $Start_transform  -Rotdefi1
 RCC targRepl   0.0 0.0 -5.0 0.0 0.0 10.0 5.0
 $End_transform
 ....
 * Regions
 TARGET       5 +target
 REPLICA      5 +targRepl
 ....
 * Lattice
 LATTICE      REPLICA                                                  Rotdefi1
 ....
 * ROT-DEFI transformations shift of (0,-2,-30) then rotation of -21 degrees
 * around the x axis
 ROT-DEFI         0.0                                    -2.0     -30.0Rotdefi1
 ROT-DEFI        100.                -21.                              Rotdefi1

Example 3:

 ROT-DEFIni  3. -90.  0.  0.  0.  0. XtoZ
 ........................................
 $Start_transform XtoZ
 $Start_translat 0. -30. +20.
 $Start_expansion 10.
 QUA  Elipsoid  0.0025 0.04 0.0064 0.0 0.0 0.0 0.055 0.64 0.0256 1.8881
 $End_expansion
 $End_translat
 $End_transform

transforms an ellipsoid centred at (11, 8, -2), with semiaxes 20, 5 and 12.5 cm long parallel to the coordinate axes, to a similar one with semiaxes 200, 50 and 125 cm, centred at (11, -22, 18) and rotated by 90 degrees (axis z becomes axis x).


8.4.4 Geometry directives: usage notes

$Start_expansion takes precedence over $Start_translat, which in turn takes precedence over $Start_transform. Directives $Start_expansion and $Start_translat are applied when reading the geometry: therefore they imply no CPU penalty. Directive $Start_transform, instead, is applied at run-time and requires some additional CPU time.

Directives can be nested. All the directives can be used in association with lattices.

The "ROT-DEFIni" cards are used by the geometry directive to transform the coordinates of the bodies (not of the particles!). If a "-" sign is placed in front of the [ROT-DEFIni name or number] of the "$Start_transform" directive the inverse transformation is used instead

8.5 Body END card

Body definitions must be terminated by a card with the string END (in column 3-5 if fixed format is used).

8.6 Region data

The various regions are described in terms of differences, intersections and unions of bodies. As in the case of body description, the user has the choice between free format and two kinds of fixed format. One of the latter is the traditional format used by the original Combinatorial Geometry as implemented for example in MORSE. The other fixed format is similar to it, but has been extended to allow body numbers larger than 10000. Both fixed formats are now superseded by the more convenient free region input format, recently introduced. Free format is based on body mnemonic "names" instead of sequential numerical identifiers and allows the use of parentheses to perform more complex boolean operations. However, the two fixed formats are still available for back compatibility reasons. With any input format, a line having an asterisk (*) in column 1 is treated as a comment card.


FIXED FORMAT REGION INPUT

IXED FORMAT REGION INPUT|FIXED FORMAT REGION INPUT|94|8| -->

Each region is described as a combination of one or more bodies, by means of the three operator symbols:

                              -,   +,   OR

referring respectively to the boolean operations of subtraction (or complement), intersection and union.

Each body is referred to by its sequential number in the body description table (see above the description of fixed format body input). Input for each region extends on one or more cards, in a format which depends on the value of IDBG on the Geometry Title card (see above). If IDBG = 0, 10 or -10, region input format is (2X,A3,I5,9(A2,I5)); if IDBG = 100 or -100, region input format is (2X,A3,I5,7(A2,I7));

  • where the 3 characters in columns 3-5 are:
  • on the first input card of a given region, an arbitrary non-blank string chosen by the user (it can be used, together with optional comment cards, to help identifying the region or the region material).
    Note that regions are identified in the code by an integer number corresponding to the order of their input definition: therefore it can be useful (but not mandatory) to have that number appearing in the string. For instance, if the 5th region is air, it could be labelled AI5.
  • on all continuation cards, columns 3-5 must be blank.
  • the integer in columns 6-10 (variable NAZ) is the number of regions which can be entered by a particle leaving any of the bodies defined for the region being described (leave blank in continuation cards). The NAZ number is used to allocate memory for this so-called "contiguity list",
    and it is not essential that it be exact (if left blank, it is set to 5).
    Any number is accepted, but if the final sum of these integers is close to the actual sum, tracking speed can be slightly improved.
  • in columns 11-73, alternate as many 2-character fields ('OR' or blank) and integer fields (body numbers preceded by + or - sign),
    as are needed to complete the description of that region (see below for an explanation of symbol meaning). If one card is not sufficient,
    any number of continuation cards can be added (identified by a blank field in column 3-5).

After the last region description, end with a card having the code END in columns 3-5.

  • If a body number appears in a zone description preceded by a + operator, it means that the zone being described is wholly contained inside the body (boolean intersection).
  • If a body number appears in a zone description preceded by a - operator, it means that the zone being described is wholly outside the body (boolean complement).

Obviously, in the description of each region the symbol + must appear at least once. Examples:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   BA1    4     +7     +3
 * (the above zone is the part of space common to body 7 and 3)
   MU2    7     +3     -4     -7    +20
 * (the above zone is the part of space common to body 3 and 20,
 * excluding however that which is inside body 4 and that which is
 * inside 7)
   AIR    5    +19
 * (the latter zone coincides entirely with body 19)

  • In some instances a region may be described in terms of subregions (or "zones") lumped together. The OR operator is used as a boolean union operator in order to combine subregions (partially overlapping or not).
    Subregions (also called "zones" in this manual) are formed as intersections or differences as explained above, and then the region is formed by a union of these subregions. When OR operators are used there are always two or more of them, and they refer to all body numbers following them until the next OR or the end of the region description,
    each body being preceded by its + or
  • sign.

Examples:

 *...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
   SA7   11OR   +4     +6     -7     -8OR   +6     +3    -21
 *         <---- first subregion -----><- second subregion ->
   G18    2OR   +9OR  +15OR   +1OR   +8     -2OR   +8     -3OR   +8    +18
 *         < 1st >< 2nd >< 3rd ><--- 4th ----><--- 5th ----><--- 6th ---->
           OR  +12    -10    -11    -13    -14
 *< blank ><---- 7th and last subregion -----> (continuation line)

Region END card

Region data must be terminated by a card with the string END in column 3-5.


FREE FORMAT REGION INPUT

REE FORMAT REGION INPUT|FREE FORMAT REGION INPUT|94|8| -->

Each region is described as a combination of one or more bodies, by means of the three operator symbols:

                              -,   +,   |

referring respectively to the boolean operations of subtraction (or complement), intersection and union.

Each body is referred to by its "name" (an alphanumeric string of up to 8 characters, the first character being alphabetical) in the body description table (see above the description of free format body input). Input for each region starts on a new line and extends on as many continuation lines as are needed. It is of the form:

 REGNAME  NAZ  boolean zone expression
 or
 REGNAME  NAZ  | boolean zone expression | boolean zone expression | ...

where REGNAME, NAZ and the remaining part are separated by one or more blanks.

  • REGNAME is the region "name" (an arbitrary unique alphanumeric character string chosen by the user). The region name must begin by an alphabetical character and must not be longer than 8 characters.
  • NAZ is an integer indicating (approximately) the number of regions which can be entered by a particle leaving any of the bodies appearing in the region description that follows. The NAZ number is used to allocate memory for this so-called "contiguity list", and it is not essential that it be exact. Any number is accepted, but if the final sum of these integers is close to the actual sum, tracking speed can be slightly improved. If the input value of NAZ is equal to 0, it is set equal to 5.
  • "boolean zone expression" is a sequence of one or more body names preceded by the operators + (intersection) or
  • (complement or subtraction). A zone expression can be contained inside one or more sets of left and right parentheses. Several zone expressions can be combined by the union operator | (corresponding to OR in fixed format input).
    When | operators are used there are always two or more of them, and they refer to all bodies following them until the next | or the end of the region description, each body being preceded by its + or
  • sign.
    In evaluating the expressions, the highest operator precedence is given to parentheses (the most inner ones first), followed by the | operator.
    In each zone expression, at least one body name preceded by + must be present. If one line is not sufficient, any number of continuation lines can be added. Blanks are ignored.

Meaning of the operators:

  • If a body name is preceded by a + operator in an expression describing a zone (or a zone component surrounded by parentheses) it means that the zone or zone component being described is wholly contained inside the body (boolean intersection).
  • If a body name is preceded by a
  • operator in an expression describing a zone (or a zone component surrounded by parentheses) it means that the zone or zone component being described is wholly outside the body (boolean complement).

Obviously, in the description of each region the symbol + must appear at least once. The same is true for each zone (subregion delimited by | operators) and for each zone component (subzone delimited by parentheses)

Examples of regions consisting of a single zone:

  lastlayr   4  +bigball  +slab
  * Region "lastlayr" is the part of space common to body "bigball" and body
  * "slab"

  MidVacuu  7 +cylind2   -slit  -sqrhole +Plane1
  * Region "MidVacuu" is the part of space common to bodies "cylind2" and
  * "Plane1", excluding however that which is inside body "slit" and that which
  * is inside body "sqrhole"

  H2Osphere   5   +marble
  * Region "H2Osphere" coincides entirely with body "marble"

Examples of regions consisting of the union of several zones, possibly (but not necessarily) partially overlapping:

  Corners  6 | +dice +topNorth | +dice +topEast | +dice +topSouth |
  +dice +topWest | +dice +botNorth | +dice +botEast | +dice +botSouth | +dice
  +botWest
  * Region "Corners" is made of the 8 corners of a cube, each of which is
  * obtained by the intersection of a cubic body "dice" and a tilted plane
  * described by vector pointing to the centre of the cube

  twoparts 0 | +leftpart -outerbox | +rghtpart +topplane
  * Region "twoparts" is the sum of two parts of space: the space points which
  * are inside body "leftpart" but not inside body öuterbox", plus those which
  * are common to bodies "rghtpart" and "topplane"

Examples of a region defined as a single zone by means of parentheses:

  AirAroun 5  + tunnel + Column - (+outrpipe-innrpipe)
  * Region "AirAroun" contains the space points located inside the intersection
  * of body "tunnel" and body "Column", with the exception of those which are
  * inside body öutrpipe" but not inside body "innrpipe"

  CmplexRg | +longcyl + (+shortcyl +vertPla1 -vertPla2) | (+Brick | + ceeling
  - floor)
  * Region CmplexRg is the union of two zones. The first zone is the
  * intersection of body "longcyl" with a portion of space contained inside
  * both bodies "shortcyl" and "vertPla1" but not inside body "vertPla2".
  * The second zone is the union of the space points inside body "Brick"
  * and the space points contained by body  "ceeling" but located outside
  * body "floor".

Region END card

Region data must be terminated by a line with the string END.


Region Volumes

This is an optional set of cards which must be input if (and only if) flag IVOPT in the CG Title card has been given a value 3. As many volume definition cards must be given as is needed to input a volume for every region. The input variable is an array VNOR(I) = volume of the Ith region. The format is (7E10.5). Volume data are used by FLUKA only to normalise energy or star densities in regions requested by the SCORE command.

8.7 LATTICE card

This is an optional card for modular geometries. Its use needs some more effort and preparation:

  • The basic unit of the geometry, composed by an arbitrary number of regions, must be described in full detail in the body and region data.

  • Additional body and region data must also be provided to describe "container" regions representing the "boxes", or lattice cells, wherein the basic unit has to be replicated. No material assignment is needed for these lattice-cell regions.

  • A roto-translation must be defined (option ROT-DEFI) and associated with each lattice to provide the transformation bringing from any point and direction inside each lattice cell to the corresponding point and direction in the basic unit. Alternatively, a user routine (LATTIC, see (13)) can be written for the same purpose.

  • The LATTICE card itself identifies the lattice cells and establishes the correspondence between region number and lattice cell number, where the region number is the sequential number in the region table, and the lattice cell number is that used in the tracking to address the transformation routine, and is chosen by the user. Contiguous numbering is recommended for memory management reasons, but is not mandatory.
    Non-contiguous numbering can be done using several LATTICE cards.

In the LATTICE card, the meanings of the WHAT parameters are:

     WHAT(1) = "Container-region" number of the first lattice cell
               ("From region WHAT(1)...")
               No default

     WHAT(2) = "Container-region" number of the last lattice cell
               ("...to region WHAT(2)...")
               Default = WHAT(1)

     WHAT(3) = step length in assigning "Container-region" numbers
               ("...in steps of  WHAT(3)").
               Default = 1.

     WHAT(4) = lattice number of the first lattice cell (or corresponding name),
               assigned to region WHAT(1)
               No default

     WHAT(5) = lattice number of the last lattice cell (or corresponding name),
               assigned to region WHAT(2)

     WHAT(6) = step length in assigning cell numbers/names
               ("...in steps of WHAT(6)").
               Default = 1.

     SDUM    = possible index of transformation associated with this lattice.
               Exceptionally, here SDUM can contain an integer number, in free
               format, following any of the strings "ROT#", "Rot#", "rot#",
               "RO#", "Ro#", "ro#. If any one of such strings is present, an
               integer identifying the associated roto-translation is read in
               the following characters. If no such string is found, the LATTIC
               user routine will be called whenever a transformation is
               required.

A single geometry can be a mixture of modular areas, described by lattices, and "normal" areas, described by standard regions. Many different LATTICE cards may be issued in the same geometry, when different symmetries are present in different areas. In principle, any analytical symmetry transformation can be implemented (rotation, translation, reflection, or combination of these).

Care must be taken to ensure that any region in the basic unit is fully contained (after coordinate transformation) in any lattice cell belonging to its symmetry transformation. Regions falling across two different lattice cells would lead to unpredictable behaviour.

The basic unit does not need necessarily to describe a "real" geometry region, but can as well be used only as a prototype to reproduce in any number of "copies".

NOTE: The lattice cell regions do not need to be included in the other input option cards. Materials, thresholds, etc, must be assigned ONLY to the regions contained in the basic unit. Of course, this implies that all copies of a same basic unit share the same material, setting and biasing properties.

8.8 GEOEND card

EOEND card|GEOEND card|94|8| -->

A card with the string GEOEND in column 1-6 must terminate the combinatorial geometry input.


Geometry debugger

The GEOEND card can be used also to activate the geometry debugger, using the WHAT and SDUM parameters. In this case, a second GEOEND card (continuation) may be necessary. It is recommended that a STOP card should follow immediately, avoiding to start transport when debugging is completed.

1st GEOEND card:

     WHAT(1) = X_max of the geometry region to be debugged (no default)

     WHAT(2) = Y_max of the geometry region to be debugged (no default)

     WHAT(3) = Z_max of the geometry region to be debugged (no default)

     WHAT(4) = X_min of the geometry region to be debugged (no default)

     WHAT(5) = Y_min of the geometry region to be debugged (no default)

     WHAT(6) = Z_min of the geometry region to be debugged (no default)

     SDUM:   must be = DEBUG to activate the debugger

2nd (optional) GEOEND card:

     WHAT(1) = Number of steps in the x-direction between
               X_min and X_max (default: 20)

     WHAT(2) = Number of steps in the y-direction between
               Y_min and Y_max (default: 20)

     WHAT(3) = Number of steps in the z-direction between
               Z_min and Z_max (default: 20)

     WHAT(4,5,6) : not used

     SDUM    = & in any position in column 71 to 78

See the Notes to GEOEND option for more details and instructions.

8.9 Voxel Geometry

It is possible to describe a complex geometry in terms of "voxels" (tiny parallelepipeds forming a 3-dimensional grid). In principle this can be done with any geometry but it is especially useful when translating a CT scan of a human body into a dosimetry phantom [Zan01]. Therefore, we will use loosely the word örgan" to indicate a contiguous group of voxels (or even more than one group) made of the same material. The code handles each organ as a Combinatorial Geometry region, possibly in addition to other conventional "non-voxel" regions defined by the user, and assigns automatically to each organ a new region number.

To describe a voxel geometry, the user must:

  • 1) Assign an organ to each voxel. Each organ is identified by a unique integer =< 32767. The numbering does not need to be contiguous, i.e. "holes" in the numbering sequence are allowed. One of the organs must have number 0 and plays the role of the medium surrounding the voxels (usually vacuum or air). The assignment is done via a special file where the organ corresponding to each voxel is listed sequentially in Fortran list-oriented format, with the x coordinate running faster than y, and y running faster than z. In practice the file is always written by a program similar to the one reported below. The user will need to modify the values of the parameters DX, DY DZ, NX, NY, NZ (respectively voxel size and number of voxels for each coordinate), and possibly some other more trivial things (file names, title, reading from the original CT scan file). The following program takes also care of recompacting the original organ numbers by eliminating all gaps in the sequence, and writes a translation table to the screen:
             WRITE(*,'(A,2I10)')' New number, old number: ', NO, IC

After having modified the program (assumed to be in a file writegolem.f), compile it:

             fff writegolem.f

link it with the FLUKA library:

             lfluka -o writegolem writegolem.o

execute it:

             writegolem

The result will be a file golem.vxl (or equivalent name chosen by the user) which will be referred to by a special command line in the geometry input (see below).

 *------------------------------------------------------------------------------
       PROGRAM WRITEGOLEM

       INCLUDE '(DBLPRC)'
       INCLUDE '(DIMPAR)'
       INCLUDE '(IOUNIT)'
 *  COLUMNS: FROM LEFT TO RIGHT
 *  ROWS: FROM BACK TO FRONT
 *  SLICES: FROM TOP TO BOTTOM
       PARAMETER ( DX = 0.208D+00 )
       PARAMETER ( DY = 0.208D+00 )
       PARAMETER ( DZ =-0.8D+00   )
       PARAMETER ( NX = 256 )
       PARAMETER ( NY = 256 )
       PARAMETER ( NZ = 220 )
       DIMENSION GOLEM(NX,NY,NZ)
       INTEGER*2 GOLEM
       CHARACTER TITLE*80
       DIMENSION IREG(1000), KREG(1000)
       INTEGER*2 IREG, KREG
 *
       CALL CMSPPR
       DO IC = 1, 1000
          KREG(IC) = 0
       END DO
       OPEN(UNIT=30,FILE='ascii_segm_golem',STATUS='OLD')
       READ(30,*) GOLEM
       NO=0
       MO=0
       DO IZ=1,NZ
          DO IY=1,NY
             DO IX=1,NX
                IF (GOLEM(IX,IY,IZ) .GT. 0) THEN
                   IC = GOLEM(IX,IY,IZ)
                   MO = MAX (MO,IC)
                   DO IR=1,NO
                      IF (IREG(IR) .EQ. IC) GO TO 1000
                   END DO
                   NO=NO+1
                   IREG(NO)=IC
                   KREG(IC)=NO
                   WRITE(*,'(A,2I10)')' New number, old number: ', NO, IC
  1000             CONTINUE
                END IF
             END DO
          END DO
       END DO
 *     NO = number of different organs
 *     MO = max. organ number before compacting
       WRITE(*,*) ' NO,MO',NO,MO
       OPEN(UNIT=31,FILE='golem.vxl',STATUS='UNKNOWN',FORM='UNFORMATTED')
       TITLE = 'Golem'
       WRITE(31) TITLE
       WRITE(31) NX,NY,NZ,NO,MO
       WRITE(31) DX,DY,DZ
       WRITE(31) GOLEM
       WRITE(31) (KREG(IC),IC=1,MO)
       STOP
       END
  *----------------------------------------------------------------------

  • 2) Prepare the usual FLUKA input file. The geometry must be written like a normal Combinatorial Geometry input (in any of the allowed formats, as part of the normal input stream or in a separate file), but in addition must include:

  • A VOXELS card as a first line, before the Geometry title card,
    with the following information:
        WHAT(1), WHAT(2), WHAT(3) = x, y, z coordinates chosen as the
               origin of the "voxel volume", i.e. of a region made of a
               single RPP body which contains all the voxels
        WHAT(4) = index (or name) of the ROT-DEFIni card for an eventual
                  roto/translation of the VOXELs
        WHAT(5), WHAT(6): not used
        SDUM = name of the voxel file (extension will be assumed to be .vxl).

  • The usual list of NB bodies, not including the RPP corresponding to the "voxel volume" (see VOXELS card above). This RPP will be generated and added automatically by the code as the (NB+1)th body, with one corner in the point indicated in the VOXELS card, and dimensions NX*DX, NY*DY and NZ*DZ as read from the voxel file.

  • The usual region list of NR regions, with the space occupied by body NB+1 (the "voxel volume") subtracted. In other words, the NR regions listed must cover the whole available space, excepted the space corresponding to the "voxel volume". This is easily obtained by subtracting body NB+1 in the relevant region definitions, even though this body is not explicitly input at the end of the body list.
    The code will automatically generate and add several regions:

       Name      Number  Description
       --------  ------  -------------
       VOXEL     NR+1    this is a sort of "cage" for all the voxels. Nothing
                         (energy etc.) should ever be deposited in it: the user
                         shall assign VACUUM to it
       VOXEL001  NR+2    containing all voxels belonging to organ number 0.
                         There must be at least 2 of such voxels, but in general
                         they should be many more. Typical material assignment
                         to region NR+2 is AIR.
       VOXEL002  NR+3    corresponding to organ 1
       VOXEL003  NR+4    corresponding to organ 2
       ........  ....    ........................
       VOX#####  NR+2+NO corresponding to organ NO

Where NO = number of non-zero organs

The assignment of materials shall be made by command ASSIGNMAt (and in a similar way other region-dependent options) referring to the first NR regions in the usual way, and to the additional regions using the correspondence to organs as explained above.

© FLUKA Team 2000–2021

Informativa cookies