Last version:
FLUKA 2024.1.0, April 30th 2024
(last respin 2024.1.0)
flair-2.3-0e 06-May-2024


-- New Fluka Major Release
( 06.05.2024 )

FLUKA 2024.1.0 is available.
Flair-2.3-0epy3 adapted

font_small font_med font_big print_ascii

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

[ full index ]


Calls the PLOTGEOM plotting geometry package [Jaa73], to scan slices of the problem geometry and to produce auxiliary files for plotting for information about PLOTGEOM)


     WHAT(1) = 0.0 : axes are plotted
             = anything else: no axes

     WHAT(2) = 0.0 : all region boundaries are plotted,
             = anything else: only boundaries between different materials
               are plotted

     WHAT(3) = 0.0 : no numbering of regions or boundaries
             = anything else: boundaries and regions are numbered (not yet

     WHAT(4) > 0.0 : maximum length of each worm
             < 0.0 : worm compression is performed
               Default: 2000.

     WHAT(5) = 0.0 : no diagnostic printing
             = anything else: write scan history to logical output unit
               WHAT(6) (filename will be PLOTGEOM.OUT)

     WHAT(6) = number of the logical unit for PLOTGEOM input. If different
               from 0.0, PLOTGEOM input must be provided in a file
               PLG.GFXINDAT. PLOTGEOM input, which is not in standard
               FLUKA format, is described in Note 14).
               Default: PLOTGEOM input immediately follows

     SDUM    = FORMAT: the PLOTGEOM store file will be a formatted one
             = anything else: unformatted store file

     Default (option PLOTGEOM not given): no plotting


  • 1) The PLOTGEOM codeword links to FLUKA the PLOTGEOM program, which was written by R. Jaarsma and H. Rief of the Ispra Joint Nuclear Research Centre, and was adapted as a stand-alone program for the FLUKA Combinatorial Geometry by G.R. Stevenson of CERN. The present version, integrated with the dynamically allocated storage of the FLUKA code as an input option, has been improved from several points of view, mainly higher flexibility and smaller space requirements.

  • 2) The following documentation is extracted with some modifications from the original EURATOM report of Jaarsma and Rief [Jaa73].

  • 3) PLOTGEOM is a program for checking the geometry input data of Monte Carlo particle transport codes. From the points of intersection between the geometrical structure and a mesh of lines of flight, PLOTGEOM generates a picture, representing a cross section of the geometry.

  • 4) The user specifies a two-dimensional cross section of the geometry by giving its orientation with respect to the geometry coordinate axes and the desired coordinates of the corners of the picture (note that the x-y coordinate system of the "picture" is usually different from the one to which the geometry description refers).

  • 5) The program generates a horizontal grid of lines (parallel to the x-axis of the PICTURE), covering the area of the desired picture. The constant distance between adjacent lines is 0.07 cm in the picture. The points of intersection with the medium boundaries are recorded. After having scanned one line, each intersection point P2_j found is compared with each similar point P1_k found on the line immediately preceding. If the distance between a couple of points P1_k, P2_j is =< 0.035 cm, then the linepiece P1_k-P2_j is called a segment. If more than one of the points P2 on the current line satisfies the quoted condition for a given P1, then only the nearest one to that P1 is taken.

  • 6) Now we define a "worm body" as being one segment or a string of segments, so that the endpoint of one segment is the begin point of the next segment.

  • 7) If a worm body with a last point P1_j already exists, the segment P1_j-P2_k is connected to this worm body and the last point of that worm body becomes P2_k. Otherwise, the segment P1_j-P2_k is the first one of a new worm body and the program looks for a "worm head" to be connected to P1_j. This "head" has to be in the neighborhood of P1_j between the two last scanned lines and is found by the subroutine HEADTL, which applies the same principle for finding segments, but on a refined and variable grid.

  • 8) If there is a worm body with a last point P1_j and if on examining all P2 points no segment P1_j-P2_k is found, then this body should be given a "tail". This tail is determined by the subroutine HEADTL in the same way as a head. The "worms" (head, body, tail) thus created are stored on disk.

  • 9) If the horizontal scanning has been finished the same procedure is repeated in the vertical direction (parallel to the y-axis of the picture).

  • 10) Finally the worms are concatenated as far as possible: head to tail, head to head, tail to tail. The strings of worms formed in this way are plotted by means of any available graphics program (e.g. PAW).

  • 11) A PLOTGEOM card can be issued only after the combinatorial geometry input has been read (either from an external file or from standard input). In other words, PLOTGEOM cannot be input before the GEOEND card. In addition, if WHAT(2) is different from 0., PLOTGEOM can be invoked only after materials have already been assigned.

  • 12) Since PLOTGEOM now makes use of the same dynamically allocated storage of FLUKA, it is convenient to issue the PLOTGEOM card just after geometry and material definitions, but before biasing and any other option which makes use of permanent and/or temporary storage. The purpose is twofold:
            a) this maximises the storage available for PLOTGEOM for a given
               storage dimension, and hence minimises the chances of
               having a too small storage
            b) since PLOTGEOM frees again all the used storage after
               completion, the total memory required is minimised

  • 13) On the other hand, if the LATTICE geometry option is used, the PLOTGEOM command must be issued only after all the transformations have been defined (i.e., after all ROT-DEFIni commands).

  • 14) The input data required by PLOTGEOM to perform a slice scan have to be given on the unit specified by WHAT(6) as follows:
            First  line (format A80)   : scan title
            Second line (format 6E10.5): X0 , Y0 , Z0 , X1 , Y1 , Z1
            Third  line (format 6E10.5): TYX, TYY, TYZ, TXX, TXY, TXZ
            Fourth line (format 4E10.5): EXPANY, EXPANX, PFIMXX, PFIMXY

The meaning of the variables is:

            X0,Y0,Z0 are the real coordinates of the bottom left-hand corner
                     of the picture
            X1,Y1,Z1 are the real coordinates of the top right-hand corner of
                     the picture
            TYX,TYY,TYZ are the direction cosines of the y-axis of the plot
            TXX,TXY,TXZ are the direction cosines of the x-axis of the plot

            EXPANY   is an expansion factor for the Y-axis
            EXPANX   is an expansion factor for the X-axis
            PFIMXX, PFIMXY: if > 0, number of intervals along the X- and Y-axis
                     for plotting strength and direction of a magnetic field
                     returned by the user routine MAGFLD

There is some redundancy in the position and direction input: indeed once X0,Y0,Z0,X1,Y1,Z1 are given, only one of the axis is actually required, therefore the user can leave = 0.0 the three cosine of one of the two axes.

EXPANX, EXPANY must be >= 0.1 (only their relative value matters): smaller values are reset to the default value = 1

  • 15) The scan output file is written (formatted/unformatted according to SDUM) on unit LUNPGS (=
  • 4) with the default name of

The formatted version is self explanatory, while the unformatted one is organised as follows:

            1st record: one CHARACTER*80 variable (scan title)
            2nd record: 14 REAL*4 variables:
              (XAXLEN and YAXLEN are the x and y axis length)

Then, repeated m (m>=2, typically it is 2) times:

              m1 record: two I*4 variables, representing the number of worms
                         NWORMS, and a dummy variable

Then, repeated I = 1, NWORMS times:

                 mi1 record: three I*4 variables; the first one is the worm
                             index (= I), the second is dummy, the third
                             is the worm length LENGTH, namely the number of
                             points in the worm.
                 mi2 record: (X(J),Y(J),J=1,LENGTH), where X and Y are the
                             abscissae and ordinates of a vector of LENGTH
                             points to be joined with a line (= a worm), in
                             the plane where the origin (0,0) corresponds to
                             X0,Y0,Z0 and the x and y axis to TXX,TXY,TXZ
                             and TYX,TYY,TYZ

In a compressed file there is just an extra record at the very beginning of the file: it contains a CHARACTER*80 string equal to ' ***COMPRESSED***COMPRESSED*** '


 * Plot a vertical section of a geometry where x-axis points up, y-axis points
 * to the right, and z-axis into the page. The PLOTGEOM file will be formatted.
 PLOTGEOM         1.0       1.0       0.0       0.0       0.0       5. FORMAT
           Vertical section of the tunnel geometry at z = 35 m
     -120.0    -180.0    3500.0     120.0     180.0    3500.0
        1.0       0.0       0.0       0.0       1.0       0.0
        1.0       1.0       0.0

© FLUKA Team 2000–2024

Informativa cookies