02.05.2014 Views

PENELOPE 2003 - OECD Nuclear Energy Agency

PENELOPE 2003 - OECD Nuclear Energy Agency

PENELOPE 2003 - OECD Nuclear Energy Agency

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

170 Chapter 5. Constructive quadric geometry<br />

or its opposite, depending on whether the particle approaches or leaves the interface.<br />

Notice that this strategy requires that the direction of movement (U,V,W) be defined<br />

before calling LOCATE. The extra displacement effectively eliminates the risk of particle<br />

trapping at interfaces; but it also sets a limit to the space resolution (geometrical details<br />

that are less than ∼10 Å in size cannot be described).<br />

pengeom admits up to 250 surfaces and 125 bodies and modules. When the input<br />

file contains a larger number of elements, the program stops and a corresponding error<br />

message is printed. To describe such complex material systems, it is necessary to edit the<br />

source file PENGEOM.F and increase the values of the parameters NS (maximum number<br />

of surfaces) and NB (maximum number of bodies) in all subroutines. It is assumed<br />

that the number of bodies in a module is less than NX = 100, which is also the upper<br />

limit for the number of surfaces that can be used to define a body or a module (those<br />

with FLAG < 5). When NX is too small, the module that causes the trouble should be<br />

decomposed into several submodules. Although it is possible to increase the parameter<br />

NX, this would waste a lot of memory. As a consequence, a system with more than 100<br />

surfaces or bodies must be decomposed into modules.<br />

5.6 Debugging and viewing the geometry<br />

A pair of computer programs named gview2d and gview3d have been written to<br />

visualize the geometry and to help the user to debug the definition file. These codes<br />

generate two- and three-dimensional 24-bit colour images of the system using specific<br />

graphics routines. The executable codes included in the distribution package run on<br />

personal computers under Microsoft Windows.<br />

The most characteristic (and useful) feature of gview2d is that displayed pictures<br />

are generated by using the pengeom package and, therefore, errors and inconsistencies<br />

in the geometry definition file that would affect the results of actual simulations are<br />

readily identified. The method to generate the image consists of following a particle<br />

that moves on a plane perpendicular to an axis of the reference frame, which is mapped<br />

on the window. The particle starts from a position that corresponds to the left-most<br />

pixel and moves along a straight trajectory to the right of the window. To do this,<br />

we call subroutine STEP repeatedly, maintaining the direction of movement and with a<br />

large value of DS (such that each body is crossed in a single step). A colour code is<br />

assigned to each material, and pixels are lit up with the active colour when they are<br />

crossed by the particle trajectory. The active colour is changed when the particle enters<br />

a new material. The final picture is a map of the bodies and materials intersected by<br />

the window plane. The orientation of the window plane, as well as the position and size<br />

of the window view, may be changed interactively by entering one of the one-character<br />

commands shown in table 5.2, directly from the graphics window (upper- and lower-case<br />

letters may work differently). With gview2d we can inspect the internal structure of<br />

the system with arbitrary magnification (limited only by the intrinsic resolution of the<br />

pengeom routines).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!