基于CADMesh的Geant4高效自动建模系统设计及应用
Design and Application of an Efficient Automatic Modeling System for Geant4 Based on CADMesh
DOI: 10.12677/csa.2025.1510248, PDF,    科研立项经费支持
作者: 杨 聪:安徽理工大学计算机科学与工程学院,安徽 淮南;合肥综合性国家科学中心能源研究院(安徽省能源实验室),安徽 合肥;卢 棚, 洪 兵*, 李肖华, 李 帅, 顾 威, 甘子阳, 许 欣:合肥综合性国家科学中心能源研究院(安徽省能源实验室),安徽 合肥
关键词: Geant4复杂几何建模AutoG4CAD系统CADMesh四面体网格Geant4 Complex Geometric Modeling AutoG4CAD System CADMesh Tetrahedral Mesh
摘要: 为解决Geant4复杂几何建模中商业软件依赖、中间格式转换限制、可视化交互不足及导航效率低等问题,本文设计了一种基于CADMesh的自动建模系统AutoG4CAD。该系统支持STL、OBJ、PLY等多种格式的CAD模型直接导入Geant4,规避传统STEP→GDML转换的拓扑错误;通过Qt5与PyVista构建可视化交互层,集成6种视图和NIST标准材料库及自定义材料管理功能;结合TetGen四面体网格划分与智能体素化技术,提升导航速度,自动生成适用于Geant4的蒙特卡罗代码DetectConstruction.cc文件,实现CAD模型到Geant4编译C++文件直接输出。在核设施剂量评估、航天器辐射屏蔽设计等场景中降低人工建模错误率,为复杂几何体的高精度粒子仿真提供了可靠的工具支撑。
Abstract: To address issues in complex geometric modeling with Geant4, such as reliance on commercial software, limitations of intermediate format conversion, insufficient visual interaction, and low navigation efficiency, this paper designs an automatic modeling system called AutoG4CAD based on CADMesh. The system supports direct import of CAD models in various formats (e.g., STL, OBJ, and PLY) into Geant4, avoiding topological errors in the traditional STEP → GDML conversion process. A visual interaction layer is built using Qt5 and PyVista, integrating 6 types of views, the NIST standard material library, and custom material management functions. By combining TetGen tetrahedral meshing with smart voxelization technology, navigation speed is improved. The system automatically generates the Monte Carlo code file DetectConstruction.cc suitable for Geant4, enabling direct output from CAD models to Geant4-compilable C++ files. It reduces the error rate of manual modeling in scenarios such as nuclear facility dose assessment and spacecraft radiation shielding design, providing reliable tool support for high-precision particle simulation of complex geometries.
文章引用:杨聪, 卢棚, 洪兵, 李肖华, 李帅, 顾威, 甘子阳, 许欣. 基于CADMesh的Geant4高效自动建模系统设计及应用[J]. 计算机科学与应用, 2025, 15(10): 34-42. https://doi.org/10.12677/csa.2025.1510248

参考文献

[1] 李传龙, 骆志平, 毕远杰, 等. 基于CADMesh的蒙特卡罗自动建模方法及应用[J]. 原子能科学技术, 2015, 49(9): 1711-1714.
[2] Agostinelli, S., Allison, J., Amako, K.A., Apostolakis, J., Araujo, H., Arce, P., Asai, M., Axen, D., Banerjee, S., Barrand, G., et al. (2003) Geant4 Simulation Toolkit. Nuclear Instruments and Methods in Physics Research-Section A Only, 506, 250-303.
[3] US Product Data Association (2007) Initial Graphics Exchange Specification 5.
[4] Pratt, M.J. (2001) Introduction to ISO 10303—The STEP Standard for Product Data Exchange. Journal of Computing and Information Science in Engineering, 1, 102-103. [Google Scholar] [CrossRef
[5] Pinto, M. and Gonçalves, P. (2019) GUIMesh: A Tool to Import STEP Geometries into Geant4 via GDML. Computer Physics Communications, 239, 150-156. [Google Scholar] [CrossRef
[6] Alpat, A.B., Coban, A., Kaya, H. and Bartolini, G. (2023) MRADSIM-Converter: A New Software for STEP to GDML Conversion. Computer Physics Communications, 286, Article ID: 108688. [Google Scholar] [CrossRef
[7] Poole, C.M., Cornelius, I., Trapp, J.V. and Langton, C.M. (2012) A CAD Interface for Geant4. Australasian Physical & Engineering Sciences in Medicine, 35, 329-334. [Google Scholar] [CrossRef] [PubMed]
[8] Open CASCADE (2011) Open Cascade. SAS.
https://dev.opencascade.org
[9] Poole, C.M., Cornelius, I., Trapp, J.V. and Langton, C.M. (2012) Fast Tessellated Solid Navigation in Geant4. IEEE Transactions on Nuclear Science, 59, 1695-1701. [Google Scholar] [CrossRef
[10] Han, M.C., Kim, C.H., Jeong, J.H., Yeom, Y.S., Kim, S., Wilson, P.P.H., et al. (2013) DagSolid: A New Geant4 Solid Class for Fast Simulation in Polygon-Mesh Geometry. Physics in Medicine and Biology, 58, 4595-4609. [Google Scholar] [CrossRef] [PubMed]
[11] QT (1991) QT Group.
https://www.qt.io/
[12] Emmitt, J., McAlister, A., Bawden, N. and Armstrong, J. (2021) XRF and 3D Modelling on a Composite Etruscan Helmet. Applied Sciences, 11, Article 8026. [Google Scholar] [CrossRef
[13] (2012) TetGen: A Quality Tetrahedral Mesh Generator and a 3D Delaunay Triangulator, Computer Software.
http://tetgen.berlios.de/
[14] Wendling, M., Zijp, L.J., McDermott, L.N., Smit, E.J., Sonke, J., Mijnheer, B.J., et al. (2007) A Fast Algorithm for Gamma Evaluation in 3D. Medical Physics, 34, 1647-1654. [Google Scholar] [CrossRef] [PubMed]