PENGEOM – A general-purpose geometry package for Monte Carlo simulation of radiation transport in complex material structures (New Version Announcement)
A new version of the code system pengeom , which provides a complete set of tools to handle different geometries in Monte Carlo simulations of radiation transport, is presented. The distribution package consists of a set of Fortran subroutines and a Java graphical user interface that allows building and debugging the geometry-definition file, and producing images of the geometry in two- and three dimensions. A detailed description of these tools is given in the original paper [ Comput. Phys. Commun. 199 (2016) 102–113] and in the code manual included in the distribution package. The present new version differs from the previous one in that 1) it implements a more systematic handling of round-off errors, 2) the set of examples has been updated, and 3) it allows including a single voxelized box as a geometry module. With the last optional feature, a Monte Carlo code can readily be used for describing irradiation processes with complex material structures, such as medical treatments. NEW VERSION PROGRAM SUMMARY Program Title: pengeom CPC Library link to program files: https://doi.org/10.17632/zgswr8kyf5.2 Licensing provisions: CC BY NC 3.0 Programming language: Fortran 90, Java Journal reference of previous version: Comput. Phys. Commun. 204 (2021) 107962 Does the new version supersede the previous version?: Yes. Reasons for the new version: The present version extends the original Fortran code by implementing a more strict control of round-off errors and by allowing the inclusion of a voxelised box. The latter addition permits applying the Monte Carlo program to processes involving complex geometrical structures, such as medical radiotherapy treatments. Summary of revisions: Any apparent syntax error is resolved by returning the control to the calling program with an error flag activated and with an error message. Various formal aspects of the Java user interface have been improved. Finally, the new version contains a more strict handling of round-off errors, it contains an updated set of examples, and it allows including a voxelised box as part of the quadric geometry. Nature of problem: The Fortran subroutines perform all geometry operations in Monte Carlo simulations of radiation transport with arbitrary interaction models. They track particles through complex quadric geometries, i.e. , through material systems consisting of homogeneous bodies limited by quadric surfaces. Particles are moved in steps (free flights) of a given length, which is dictated by the simulation program, and are halted when they cross an interface between media of different compositions or when they enter selected bodies. At the end of each step, pengeom returns the indices of the material and body where the particle is. Solution method: pengeom is tailored to optimize simulation speed and accuracy. Fast tracking is accomplished by the use of quadric surfaces, which facilitate the calculation of ray intersections, and of modules (connected volumes limited by quadric surfaces) organized in a hierarchical structure. Optimal accuracy is obtained by considering fuzzy surfaces, with the aid of a simple algorithm that keeps control of multiple intersections of a ray and a surface. The 64-bit Java GUI PenGeomJar provides a complete geometry toolbox; it allows building and debugging of the geometry definition file, as well as visualizing the resulting geometry in two and three dimensions. The present new version has been verified to work correctly under Windows and Linux with either Java 8 or Java 17. Additional comments including restrictions and unusual features: All geometrical operations are performed internally. The connection between the steering main program and the tracking routines is through a Fortran module, which contains the state variables of the transported particle, and the input-output arguments of subroutine STEP . Rendering of two- and three-dimensional images is performed by using the pengeom subroutines, so that what we see in the images is what is passed to the simulation program. By default pengeom can handle systems with up to 5,000 bodies and 10,000 surfaces. These numbers can be modified by editing the source file. References [1] J. Almansa, F. Salvat-Pujol, G. Díaz-Londoño, A. Carnicer, A.M. Lallena, Francesc Salvat, Comput. Phys. Commun. 199 (2016) 102–113.
Authors
- F. Salvat (ORCID: https://orcid.org/0000-0002-6162-8841)
- Antonio M. Lallena (ORCID: https://orcid.org/0000-0003-1962-6217)
- Artur Carnicer (ORCID: https://orcid.org/0000-0002-4936-5778)
- Julio F. Almansa (ORCID: https://orcid.org/0000-0002-3584-3900)
- Gloria Díaz-Londoño (ORCID: https://orcid.org/0000-0002-3235-1193)
Institutions
- Universidad de Granada (ES)
- Universidad Nacional de Colombia (CO)
- Hospital Universitario Virgen de las Nieves (ES)
- European Organization for Nuclear Research (CH)
- Universitat de Barcelona (ES)
Publication Details
- Journal
- Computer Physics Communications
- Published
- 2025-04-23
- DOI
- https://doi.org/10.1016/j.cpc.2025.109634
- Citations
- 1
- Primary Topic
- Electron and X-Ray Spectroscopy Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.66
Funders
- Ministerio de Ciencia, Innovación y Universidades
- Junta de Andalucía
- European Regional Development Fund