RSimLogo30pxH
A RSim2.0: A Monte Carlo Application for Radiation Transport Modeling with a GUI and CAD Integration

 

RSim enables users to set up a simulation for modeling radiation effects via a user-friendly interface. Users can create a geometry from geometry primitives (spheres, cones, boxes, etc.) and boolean operations (intersections, unions) on primitives, or import a CAD file. After creating or importing a geometry, users can assign materials to the geometry, specify common radiation sources, and formulate tallies (dose, fluence, etc.). RSim translates the simulation setup into Geant4 input then runs the simulation.

RSim runs on Linux, macOS, and Windows.

Included examples help users quickly learn RSim so they can create their own new simulations.

Introduction

RSim is a cross-platform application for setting up and running Monte Carlo simulations of radiation transport. It uses a well-established radiation transport model Geant4 (version 10.6.0) and offers an interactive GUI for setting up Geant4 simulations and running them. It supports Constructive Solid Geometry and CAD, offers a large material database and has full implementation of sources from the General Particle Source specification. Users can visualize all of the elements of the setup (geometries and sources), as well as the simulation results. Visualization of the simulation data is based on the powerful 3D VisIt visualization tool. RSim is augmented with data exchange capabilities, does not require installation of other software packages to enable workflow, and works on Linux, MacOS and Windows operating systems.

Fig1IntXformUsrInputToGeantInput

Fig.1. Internal transformation of user input into Geant4 input.

 

GEOMETRY IN RSIM

Constructive Solid Geometry (CSG) in RSim

Users can add Constructive Solid Geometry (CSG) primitives, apply Boolean operations to create 1D, 2D, and 3D arrays from those primitves (see Figs. 2, 3).

Fig2AddPrimitives

Fig.2. Adding primitives in RSim.

 

Fig3BooleanOp

Fig.3. Using Boolean operations in RSim allows creation of a rich set of CSG elements.

 

Importing CAD Geometry into RSim

RSim imports CAD data in STEP and STL formats and internally translates that data into tessellated (triangulated) surfaces. Surfaces are visualized in the setup window (see Fig. 4). This internal representation is translated into multiple data structures representing surface and volume meshes. CAD elements can be used for creating arrays (see Fig. 5) and to form Boolean operations between CAD elements and CSG elements.

CAD data can be analyzed and partially healed in RSim. After exporting CAD parts into STL files, RSim will detect the number of closed and open surfaces in the STL data, close detected holes, and export the healed parts in desired formats.

Fig4StpFile

Fig. 4. CAD geometry in STEP format is imported to RSim and visualized in the setup

cadarrayelements

Fig.5. CAD elements can be used to create 1D,2D and 3D arrays

Users of RSim can export geometry data (CSG and CAD) into STL, GDML, H5M (MOAB) surface files and Tetgen volume data. GDML files with tessellated solids and Tetgen data created by RSim can be then also imported back into RSim.


Materials

RSim comes installed with the PyNE database of more than than 700 materials (see Fig. 6).

 

Fig6materials          

Fig. 6. Materials database in RSim

 

Users select materials to add to the simulation, and those materials become available for assignment to specific geometry shapes. On the backend, the GDML definition of the material is determined and assigned to the physics volume of choice. In the case where one material dominates the geometry, there is a way to assign this one materials to all shapes at once (edit it out for materials manually for the shapes using different materials). 

RSim users are not limited to the PyNE materials database. If a specific material is not found in the installed PyNE database, RSim allows users to create new isotopes, as well as composite materials by atoms ratio and mass ratio, which can then be used in simulations.

 

Radiation Sources in RSim

RSim allows users to work with different, customizable radiation sources. Radiation sources of volumes and surfaces can be visualized in RSim, which allows for simpler debugging of simulations.

To set up a radiation source in RSim, users select from three different types of sources: point, surface, or volume (see Fig. 7). If a surface or volume is chosen, users will attach a previously created geometry primitive.

 

;fig7addparticle

Fig. 7 Choosing the shape of the source

               

Fig6ChooseEnergy

Fig. 8 Choosing the energy spectrum of the source

Fig7SpectrumEditor 

Fig 9. Users are presented with different views of the spectrum editor, depending on the type of energy spectrum selected

 

On the backend, RSim translates radiation source data into GPS format for Geant4 and into source cards for PHITS(though only a subset of PHITS sources are currently supported). 

 

Setting Scoring/Tallies

RSim users can define multiple volume (see Fig. 10) and mesh (see Fig. 11) tallies/scorers.

fig10volumescoring

Fig. 10. Multiple types of volume scoring are available in RSim

 

fig11meshscoring

Fig. 11. Multiple types of mesh scoring is available in RSim

fig12vizgeommeshes

Fig. 12. Setup tab in RSim allows visualizations of geometries, sources and meshes.

 

 

 Running Geant4 Simulations

Once geometry, materials, sources and tallies/scorings are defined, users finish a setup by choosing the number of primaries (see Fig. 13) and number of threads and selecting Geant4 physics lists (Fig. 14). Next users can move to the Run panel, run Geant4 and obtain results in .csv file format. The standard output of Geant4 is shown in the log found in the run panel of RSim.

fig13basicsettingrsim

Fig 13. Basic setting of RSim determining the number of primaries,number of simulation threads, and verbosity of output.

fig14physicssetting

Fig. 14. Physics settings allow users to set up production cuts and choose physics lists of Geant4.

Visualization of Tallies/Scorers

Once the simulation is complete, users can visualize the tallies/scoring results by choosing available data and setting up visualization parameters, such as color schemes or cuts. RSim embeds , a powerful graphical analysis tool, to provide qualitative and quantitative visualization capabilities. An example of the volume data visualization is shown on Fig. 15 and mesh scorer visualization is shown on Fig. 16.

fig15vizenergy

Fig.15. Visualization of energy deposition volume scorers in RSim

 

fig16meshscoringviz

Fig. 16. Mesh scoring visualization in RSim.

Future Directions (RSim3.0)

The upcoming release will add flux/fluence scoring capabilities to the list of visualization parameters

References

 

Ready to evaluate VSim|USim|PSim for free?

 

 

 

     
Go To Top