PLOTGEOM

Summary

Calls the Plotgeom​ geometry plotting package [Jaa73], to scan slices of the problem geometry and to produce auxiliary files for plotting them, possibly with a magnetic feld superimposed ​​​

​

See also GEOBEGIN, GEOEND

WHAT(1) = 0.0:

axes are plotted

≠ 0.0:

no axes

WHAT(2) = 0.0:

all region boundaries are plotted

≠ 0.0:

only boundaries between different materials are plotted

WHAT(3) = 0.0:

no numbering of regions or boundaries

≠ 0.0:

boundaries and regions are numbered (not yet implemented)

WHAT(4) > 0.0:

maximum length of each worm (see Note 1)

< 0.0:

worm compression is performed

Default
= 2000.0
WHAT(5) = 0.0:

no diagnostic printing

≠ 0.0:

write the scan history to logical output unit WHAT(5) (the filename will be PLOTGEOM.OUT)

number of the logical unit for Plotgeom input. If different from 0.0, the Plotgeom input must be provided in a file PLG.GFXINDAT. Plotgeom input, which is not in standard FLUKA format, is described in Note 4.

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

Notes

  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.

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

    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.

    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).

    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.

    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.

    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 neighbourhood of P1\(_j\) between the two last scanned lines and is found by the subroutine HEADTL (PGMSCN in the FLUKA version), which applies the same principle for finding segments, but on a refined and variable grid.

    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 (PGMSCN​) in the same way as a head.

    The “worms” (head, body, tail) thus created are stored on disk.

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

    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​).

  2. 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.0, PLOTGEOM can be invoked only after materials have already been assigned.

  3. Since Plotgeom now makes use of the same dynamically allocated blank common 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 in blank common. The purpose is twofold:

    1. this maximises the storage available for Plotgeom for a given blank common dimension, and hence minimises the chances of having a too small storage

    2. since Plotgeom frees again all the used storage after completion, the total memory required for the blank common is minimised

    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).

  4. The input data required by Plotgeom to perform a slice scan must 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

    = real coordinates of the bottom left-hand corner of the picture

    X1,

    Y1,

    Z1

    = real coordinates of the top right-hand corner of the picture

    TYX,

    TYY,

    TYZ

    = direction cosines of the y-axis of the plot

    TXX,

    TXY,

    TXZ

    = direction cosines of the x-axis of the plot

    EXPANY, EXPANX

    = expansion factors ≥ 0.1 for the y-axis, resp. 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 three cosines of one of the two axes can be left = 0.0.

    If < 0.1, EXPANX, EXPANY are reset to the default = 1.0. Only their relative value matters.

  5. The scan output file is written (formatted or not according to the value of SDUM) on unit LUNPGS (= 4) with the default name of PLOTGEOM.STORE​.

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

    1st record:

    one CHARACTER*80 variable (title of the scan)

    2nd record:

    14 REAL*4 variables: X0,Y0,Z0, X1,Y1,Z1, TYX,TYY,TYZ, TXX,TXY,TXZ, XAXLEN,YAXLEN

    where:

    X0,Y0,Z0 and X1,Y1,Z1

    = coordinates of the bottom and top corners (from 2\(^{nd}\) input line above)

    TYX,TYY,TYZ and TXX,TXY,TXZ = direction cosines of the axes (from 3\(^{rd}\) input line above)

    XAXLEN and YAXLEN

    = lengths of x and y axes

    Then, repeated ``M`` times (M ≥ 2, typically M = 2):

    M:math:`_1` record: two I*4 variables, representing:

    1. the number of worms NWORMS

    2. a dummy variable

    Then, repeated ``I = 1, NWORMS`` times:

    MI:math:`_1` record:

    three I*4 variables I, IDUM, LENGTH

    where the first one is the worm index, the second is dummy, the third is the worm LENGTH,

    namely the number of points in the worm

    MI:math:`_2` 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***’

Example:

* 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.
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...
PLOTGEOM         1.0       1.0       0.0       0.0       0.0       0.0FORMAT
          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