当前位置: X-MOL 学术Comput. Phys. Commun. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
PENGEOM — A general-purpose geometry package for Monte Carlo simulation of radiation transport in complex material structures (New Version Announcement)
Computer Physics Communications ( IF 7.2 ) Pub Date : 2021-04-05 , DOI: 10.1016/j.cpc.2021.107962
Julio Almansa , Francesc Salvat-Pujol , Gloria Díaz-Londoño , Artur Carnicer , Antonio M. Lallena , Francesc Salvat

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 corrects a bug in the Fortran subroutines, and it includes various improvements of the Java graphical user interface.

New Version Program Summary

Program Title: pengeom

CPC Library link to program files: https://doi.org/10.17632/zgswr8kyf5.1

Licensing provisions: CC BY NC 3.0

Programming language: Fortran 90, Java

Journal reference of previous version: Comput. Phys. Commun. 199 (2016) 102–113

Does the new version supersede the previous version?: Yes

Reasons for the new version: The original Fortran code contained a subtle bug, which had an effect only when (1) a particle moving within a void region entered a material body, and (2) the particle was left in the void volume because of numerical roundoff errors (undershot). In such case, the steering main program erroneously concluded that the particle was in the external vacuum and, consequently, it discontinued the simulation of the particle trajectory. This anomalous behavior has been corrected by shifting the position of the particle a small distance, determined by the parameters of the master ray equation, which places the particle a small distance inside the material body.

In the original Fortran subroutines, inconsistencies in the geometry-definition file resulted in a stop of the program; this reaction was hard to control from a graphical user interface. The present new version has been verified to work correctly under Java 8, Java 11, and Java 13.

Summary of revisions: In the new version the tracking bug is corrected. In addition, any apparent syntax error is now resolved by returning the control to the calling program with an error flag activated and with an error message.

Various aspects of the Java user interface have been improved: the text editor now includes line numbers, which are used to locate possible inconsistencies and errors in the geometry definition file; the size of the application window can now be modified, and the possible sizes of the graphics windows are adapted to the actual resolution of the monitor; the action of keystroke commands under Windows, Linux, and macOS is now the same.

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.

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 pengeoem 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 increased by editing the source file.

[1] J. Almansa, F. Salvat-Pujol, G. Díaz-Londoño, A. Carnicer, A.M. Lallena, and Francesc Salvat, Comput. Phys. Commun. 199 (2016) 102–113.



中文翻译:

PENGEOM —用于复杂材料结构中辐射传输的蒙特卡洛模拟的通用几何软件包(新版本公告)

介绍了一种新版本的代码系统pengeom ,它提供了一套完整的工具来处理辐射传输的蒙特卡洛模拟中不同几何形状该分发包由一组Fortran子例程和一个Java图形用户界面组成,该Java图形用户界面允许构建和调试几何定义文件,并生成二维和三维的几何图像。这些工具的详细说明在原始论文中提供。物理 公社 199(2016)102–113]和分发包中随附的代码手册中。当前的新版本纠正了Fortran子例程中的错误,并且包括Java图形用户界面的各种改进。

新版本程序摘要

节目名称: pengeom

CPC库链接到程序文件: https : //doi.org/10.17632/zgswr8kyf5.1

许可条款: CC BY NC 3.0

编程语言: Fortran 90,Java

先前版本的期刊参考:计算。物理 公社 199(2016)102–113

新版本会取代旧版本吗?:

使用新版本的原因:原始的Fortran代码包含一个细微的错误,仅当(1)在空隙区域内移动的粒子进入材料主体,并且(2)由于以下原因而将粒子留在空隙体积中时,该错误才有效数值四舍五入误差(下冲)。在这种情况下,操纵主程序会错误地得出结论:粒子处于外部真空中,因此,它中断了粒子轨迹的模拟。通过将粒子的位置移动一小段距离(由主射线方程的参数确定),可以纠正这种异常行为,该距离将粒子放置在材料主体内部一小段距离。

在原始的Fortran子例程中,geometry-definition文件中的不一致导致程序停止。这种反应很难通过图形用户界面来控制。当前的新版本已经过验证,可以在Java 8,Java 11和Java 13下正常工作。

修订摘要:在新版本中,跟踪错误已得到纠正。此外,现在可以通过将控件返回到激活了错误标志并带有错误消息的调用程序来解决任何明显的语法错误。

Java用户界面的各个方面都得到了改进:文本编辑器现在包括行号,这些行号用于在几何定义文件中定位可能存在的不一致和错误;现在可以修改应用程序窗口的大小,并且可以将图形窗口的大小调整为适合显示器的实际分辨率;Windows,Linux和macOS下的击键命令操作现在相同。

问题性质: Fortran子例程使用任意交互模型在辐射传输的蒙特卡洛模拟中执行所有几何运算。它们通过复杂的二次几何形状(通过由二次曲面限制的均质体组成的材料系统)跟踪粒子。粒子以给定长度的步长(自由飞行)移动,该长度由模拟程序决定,并在它们穿过不同成分的介质之间的界面或进入选定的物体时被暂停。在每个步骤的最后,pengeom返回粒子所在的材料和物体的索引。

解决方法: 定制pengeom以优化仿真速度和准确性。快速跟踪是通过使用二次曲面来实现的,该二次曲面有助于射线相交的计算,并且使用按层次结构组织的模块(受二次曲面限制的连接体积)。通过考虑模糊曲面,并借助简单的算法来保持射线和曲面的多个交点的控制,可以获得最佳的精度。64位Java GUI PenGeomJar提供了一个完整的几何工具箱。它允许构建和调试几何定义文件,以及可视化二维和三维结果几何。

其他注释,包括限制和不寻常的功能:所有几何运算都在内部执行。转向主程序与跟踪例程之间的连接是通过Fortran模块进行的,该模块包含所传输粒子的状态变量以及子例程STEP的输入输出自变量。二维和三维图像的渲染是使用pengeoem子例程执行的,因此我们在图像中看到的就是传递给模拟程序的图像。

默认情况下,pengeom可以处理最多5,000个实体和10,000个表面的系统。这些数字可以通过编辑源文件来增加。

[1] J. Almansa,F。Salvat-Pujol,G。Díaz-Londoño,A。Carnicer,AM Lallena和Francesc Salvat,Comput。物理 公社 199(2016)102–113。

更新日期:2021-04-08
down
wechat
bug