TET2MCNP: A Conversion Program to Implement Tetrahedral-mesh Models in MCNP

Article information

J. Radiat. Prot. Res. 2016;41(4):389-394
Publication date (electronic) : 2016 December 31
doi : https://doi.org/10.14407/jrpr.2016.41.4.389
Department of Nuclear Engineering, Hanyang University, Seoul, Korea
Corresponding author: Chan Hyeong Kim, Department of Nuclear Engineering, Hanyang University, 222 Wangsimni-ro, Seongdong-gu, Seoul 04763, Korea Tel: +82-2-2220-0513, Fax: +82-2-2220-4054, E-mail: chkim@hanyang.ac.kr
Received 2016 August 22; Accepted 2016 September 19.

Abstract

Background

Tetrahedral-mesh geometries can be used in the MCNP code, but the MCNP code accepts only the geometry in the Abaqus input file format; hence, the existing tetrahedral-mesh models first need to be converted to the Abacus input file format to be used in the MCNP code. In the present study, we developed a simple but useful computer program, TET2MCNP, for converting TetGen-generated tetrahedral-mesh models to the Abacus input file format.

Materials and Methods

TET2MCNP is written in C++ and contains two components: one for converting a TetGen output file to the Abacus input file and the other for the reverse conversion process. The TET2MCP program also produces an MCNP input file. Further, the program provides some MCNP-specific functions: the maximum number of elements (i.e., tetrahedrons) per part can be limited, and the material density of each element can be transferred to the MCNP input file.

Results and Discussion

To test the developed program, two tetrahedral-mesh models were generated using TetGen and converted to the Abaqus input file format using TET2MCNP. Subsequently, the converted files were used in the MCNP code to calculate the object- and organ-averaged absorbed dose in the sphere and phantom, respectively. The results show that the converted models provide, within statistical uncertainties, identical dose values to those obtained using the PHITS code, which uses the original tetrahedral-mesh models produced by the TetGen program. The results show that the developed program can successfully convert TetGen tetrahedral-mesh models to Abacus input files.

Conclusion

In the present study, we have developed a computer program, TET2MCNP, which can be used to convert TetGen-generated tetrahedral-mesh models to the Abaqus input file format for use in the MCNP code. We believe this program will be used by many MCNP users for implementing complex tetrahedral-mesh models, including computational human phantoms, in the MCNP code.

Introduction

Most general-purpose Monte Carlo radiation transport codes now support the use of tetrahedral mesh in geometry modeling [15]. The tetrahedral mesh is a powerful geometry for modeling complex and arbitrarily curved-surface models such as computational human phantoms [69]. The use of tetrahedral mesh overcomes the limitations of voxel geometry in computational human phantoms and precisely preserves the original structure of the polygonal-mesh geometry. Moreover, the use of tetrahedral mesh makes it possible to directly implement Computer-Aided Design (CAD)-based models in Monte Carlo codes.

To implement complex CAD-based models in Monte Carlo codes, many researchers [612] have converted their models to tetrahedral-mesh geometry using TetGen [13], an open source program widely used to generate tetrahedral-mesh geometries. Several studies have reported that the TetGen-generated tetrahedral-mesh geometries were successfully used in Monte Carlo radiation transport codes, providing reliable simulation results. The PHITS code [2] recently adopted the TetGen output file format to implement tetrahedral-mesh geometry from version 2.82.1)

The Monte Carlo N-Particle (MCNP) transport code [1] recently added the unstructured mesh (UM) function, which includes the tetrahedral-mesh geometry, but using a different approach; that is, the MCNP input for tetrahedral-mesh geometry adopted the input file format of Abacus. Therefore, for use in the MCNP code, TetGen-generated tetrahedral-mesh geometries (in the TetGen output file format) must be converted to the Abacus input file format.

In the present study, we developed a conversion program, TET2MCNP, which can be used to convert TetGen-generated tetrahedral-mesh models to the Abacus input file format for use in the MCNP code. The developed program can also convert an Abacus input file format to the TetGen output file format.

To test the developed program, we produced a simple and a complex tetrahedral-mesh models using TetGen and converted them to the Abacus input file format using TET2MCNP. The converted models were implemented in the MCNP code and used for dose calculation. The calculated dose values were finally compared with those obtained using the PHITS code, which uses the original TetGen-generated tetrahedral-mesh models.

Materials and Methods

1. Overview of TET2MCNP

TET2MCNP is written in C++ and has two main components: one for converting a TetGen output file format to the Abacus input file format, and the other for converting an Abaqus input file format to the TetGen output file format. Figure 1 shows the schematic workflow of TET2MCNP.

Fig. 1

Schematic workflow of TET2MCNP.

TET2MCNP is a stand-alone program and is invoked in the command-line user interface with a set of switches. The TET2MCNP program has the following switches:

  • –i: This switch is used to provide the input file name. For TetGen-to-Abaqus conversion, the input file is a file with the extension .ele, and for Abaqus-to-TetGen conversion, the input file is a file with the extension .inp.

  • –o: This switch is used to provide the output file name. If the input file is a file with extension .ele, the output file have to be a file with extension .inp, and vice versa.

  • –t: This switch is an optional switch used to set the maximum number of elements in a part in an TetGen-to-Abaqus conversion.

  • –m: This switch is an optional switch used to import the material density file in a part in a TetGen-to-Abaqus conversion.

2. Data import

TET2MCNP is designed to convert a TetGen output file (*.ele, *.node) to the Abaqus input file format (*.inp), and vice versa. In general, a tetrahedral-mesh model produced by the TetGen program is represented using first-order elements, which means that the generated tetrahedron has only 4-node elements; therefore, the TET2MCNP-converted Abaqus input file is also represented using first-order elements. In other words, an Abaqus input file converted using TET2MCNP is written in C3D4 (Continuum, 3D, and 4-node elements) type [14]. This restriction applies to both data import and export.

3. Subdivision

When implementing an Abaqus input file format in the MCNP code, the MCNP code performs an internal conversion process, which consumes a large amount of CPU processing time if the geometry has multiple parts and at least one of the parts has more than 30,000–50,000 elements [14]. Therefore, TET2MCNP is programmed to perform part subdivision whenever necessary. That is, in a TetGen-to-Abacus conversion, the user can limit the maximum number of elements (i.e., tetrahedrons) in a part by providing the limiting number by using the -t option. The program then splits a part that has more elements than the limiting number into multiple parts such that each part has limiting number or less elements.

4. Data export

TET2MCNP exports the converted tetrahedral-mesh information in the Abaqus input file format. In addition, the program produces an MCNP input file, which is the geometry section of the MCNP input file for the user. If the TET2MCNP is performed with the -m switch, the material density values of the MCNP cells will be automatically set by those in the specified material density file provided with the -m option.

TET2MCNP can also convert a TetGen output file format from an Abaqus input file format. The TetGen output file can be used to show the geometry using the TetView program (i.e., TetGen viewer). During this conversion, if there are subdivided parts in the Abaqus input file, they are automatically merged after removing overlapping nodes and elements.

Results and Discussion

To test the performance of TET2MCNP, two tetrahedral-mesh geometries were produced using the TetGen program: (1) a sphere composed of 100,000 tetrahedrons and (2) THRK-MAN [6]—a tetrahedralized version of the PSRK-MAN phantom [15]—composed of 404,008 tetrahedrons. The conversions process were performed on a personal computer with an Intel® Core™ i7-2600 CPU @ 3.40GHz CPU, and the conversion time was approximately 8 s and 30 s for the sphere and THRK-MAN phantom, respectively. Figure 2A and 2C and Figure 2B and 2D present the tetrahedral-mesh geometries before and after conversion, respectively. These figures visually show that the conversions process were successful.

Fig. 2

The tetrahedral-mesh geometries before and after conversion using TET2MCNP. (A) sphere constructed by TetGen, (B) converted sphere by TET2MCNP, (C) tetrahedral phantom (THRK-MAN) constructed by TetGen, (D) converted THRK-MAN by TET2MCNP.

Figure 3 shows the performance of the subdivision function. Figure 3A, 3B, and 3C present the 100,000-element sphere converted using TET2MCNP with using –t option, for which the limiting number set to 10,000, 20,000, and 50,000, respectively. The results show that the sphere was divided into multiple parts according to the set limiting number. Figure 3D shows the converted sphere without using the -t option, in which the entire 100,000-element sphere is converted as a single part. Overall, these results evidence that the -t options works correctly.

Fig. 3

Sphere of 100,000 elements converted by TET2MCNP with -t option. (A) -t 10000, (B) -t 20000, (C) -t 50000, and (D) -t option is not used.

Figure 4A shows an example material density file, and Figure 4B and 4C show the produced MCNP input files without and with using the -m switch in TET2MCNP, respectively. Note that the material density file has two columns: region ID and density value; the region ID in the material file must match the region information in the TetGen element file (*.ele).

Fig. 4

Example of material density file and produced MCNP input files: (A) material density file, (B) produced MCNP input file without using –m switch in TET2MCNP, and (C) produced MCNP input file with using -m switch in TET2MCNP.

The converted geometries were implemented in MCNP code and used for dose calculations and then calculated values were compared with those obtained using the PHITS code, which uses the original TetGen-generated tetrahedral-mesh models. In each code, the primary particles were irradiated as a broad parallel beam in the anterior–posterior direction. The simulation was performed for seven photon energies (10−2–104 MeV) and ten neutron energies (10−8–101 MeV). All simulations were repeated to achieve a relative error (i.e., statistical uncertainty) of less than 10%. The simulations were performed using MCNP 6.1.1 beta version with the MCPLIB84, EL03, and ENDF70 physics models, and PHITS 2.84 version with the AcelibJ40 physics model.

Figures 5 and 6 present the object- and organ-averaged absorbed doses per photon and neutron fluence in the sphere and THRK-MAN phantom, respectively, calculated using the MCNP and PHITS code. The MCNP code used the tetrahedral-mesh models in the Abacus input file format converted from the TetGen-generated geometry model by using TET2MCNP, and the PHITS code used the original TetGen-generated tetrahedral-mesh models. The results of the calculated values from the MCNP and PHITS codes matched within statistical uncertainties, proving that TET2MCNP can successfully convert TetGet output file format to Abacus input file format.

Fig. 5

Comparison of the absorbed doses per photon (A) and neutron (B) fluence in sphere geometry calculated by MCNP and PHITS.

Fig. 6

Comparison of organ’s absorbed doses per photon (upper) and neutron (lower) fluence in THRK-MAN geometry calculated by MCNP and PHITS, skin (left), bone (middle) and small intestine (right).

Conclusion

In the present study, we developed a simple, but useful stand-alone computer program, TET2MCNP, which can be used to convert TetGen-generated tetrahedral-mesh models to the Abacus input file format for use in the MCNP code. Our test results showed that TET2MCNP can successfully convert TetGet output files to the Abacus input file format. We believe this program will be used by many MCNP users for implementing complex tetrahedral-mesh models, including computational human phantoms, in the MCNP code. The developed program can be freely downloaded from the website of the Hanyang University Radiation Engineering Laboratory.2)

Acknowledgements

The project was supported by Nuclear Safety and Security Commission (NSSC) through Korea Foundation of Nuclear Safety (KOFONS) and also by Ministry of Science, ICT and Future Planning through the National Research Foundation of Korea (Project No.: 1403012, 2016R1D1A1A09916337, 2015M2A2A6A01045241). One of the authors was supported by the Global PhD Fellowship program (Project No.: 2011-0030970).

Notes

2)

Official Website of Hanyang University Radiation Engineering Laboratory (http://hurel.hanyang.ac.kr).

References

1. Goorley JT, et al. Initial MCNP6 release overview-MCNP6 version 1.0. Los Alamos National Laboratory. LA-UR-13-22934 2013. p. 1.
2. Sato T, et al. Particle and heavy ion transport code system, PHITS, version 2.52. J Nucl Sci Technol 2013;50:913–923.
3. Agostinelli S, et al. GEANT4-a simulation toolkit. Nucl Instrum Meth A 2003;506:250–303.
4. Cowan P, Shuttleworth E, Bird A, Cooper A. The launch of MCBEND 10. Radiat Prot Dosim 2005;115:403–7.
5. Badal A, Kyprianou I, Banh DP, Badano A, Sempau J. penMesh-Monte Carlo radiation transport simulation in a triangle mesh geometry. IEEE Trans Med Imaging 2009;28:1894–1901.
6. Yeom YS, Jeong JH, Han MC, Kim CH. Tetrahedral-mesh-based computational human phantom for fast Monte Carlo dose calculations. Phys Med Biol 2014;59:3173–3185.
7. Han MC, Yeom YS, Kim CH, Kim S, Sohn JW. New approach based on tetrahedral-mesh geometry for accurate 4D Monte Carlo patient-dose calculation. Phys Med Biol 2015;60:1601–1612.
8. Nguyen TT, et al. Incorporation of detailed eye model into polygon-mesh versions of ICRP-110 reference phantoms. Phys Med Biol 2015;60:8695–8707.
9. Dogdas B, Stout D, Chatziioannou AF, Leahy RM. Digimouse: a 3D whole body mouse atlas from CT and cryosection data. Phys Med Biol 2007;52:577–587.
10. Poole CM, Cornelius I, Trapp JV, Langton CM. Fast tessellated solid navigation in GEANT4. Ieee Trans Nucl Sci 2012;59:1695–1701.
11. Fonseca GP, Landry G, White S, D’Amours M, Yoriyaz H, Beaulieu L, Reniers B, Verhaegen F. The use of tetrahedral mesh geometries in Monte Carlo simulation of applicator based brachytherapy dose distributions. Phys Med Biol 2014;59:5921–5935.
12. Fang QQ. Mesh-based Monte Carlo method using fast ray-tracing in Plucker coordinates. Biomed Opt Express 2010;1:165–175.
13. Si H. TetGen, a Delaunay-based quality tetrahedral mesh generator. Acm Trans Math Software 2015;41(2):1–36.
14. Martz R. The MCNP6 book on unstructured mesh geometry: User’s guide. Los Alamos National Laboratory. LA-UR-11-05 668-rev8 2014. p. 19–24.
15. Kim CH, Jeong JH, Bolch WE, Cho KW, Hwang SB. A polygon-surface reference Korean male phantom (PSRK-Man) and its direct implementation in Geant4 Monte Carlo simulation. Phys Med Biol 2011;56:3137–3161.

Article information Continued

Fig. 1

Schematic workflow of TET2MCNP.

Fig. 2

The tetrahedral-mesh geometries before and after conversion using TET2MCNP. (A) sphere constructed by TetGen, (B) converted sphere by TET2MCNP, (C) tetrahedral phantom (THRK-MAN) constructed by TetGen, (D) converted THRK-MAN by TET2MCNP.

Fig. 3

Sphere of 100,000 elements converted by TET2MCNP with -t option. (A) -t 10000, (B) -t 20000, (C) -t 50000, and (D) -t option is not used.

Fig. 4

Example of material density file and produced MCNP input files: (A) material density file, (B) produced MCNP input file without using –m switch in TET2MCNP, and (C) produced MCNP input file with using -m switch in TET2MCNP.

Fig. 5

Comparison of the absorbed doses per photon (A) and neutron (B) fluence in sphere geometry calculated by MCNP and PHITS.

Fig. 6

Comparison of organ’s absorbed doses per photon (upper) and neutron (lower) fluence in THRK-MAN geometry calculated by MCNP and PHITS, skin (left), bone (middle) and small intestine (right).