File Menu

The File menu contains options to control creating, opening, closing, and saving RSim files and simulation directories.

file menu

Fig. 12 File Menu

New

File –> New has two options:

  • From Example
  • Simulation

Open Simulation

To open a directory where existing simulation files reside, select Open Simulation from the File menu.

file menu open simulation

Fig. 13 Open selection from File menu

The default directory, simulations, is created for you when installed RSim. You can modify this in the Tools –> Settings –> Host settings –> Paths menu.

file menu open simulation window

Fig. 14 Open Simulation window

Save Simulation

After a simulation is open, going to File –> Save Simulation allows you to save any modifications to the input file. The saving process will also run the translator to create a valid .pre file based on the selected simulation model.

Save Simulation As

After a simulation is open, clicking on File –> Save Simulation As allows you to save any modifications to the input file and write it in to a new file. The saving process will also run the translator to create a valid .pre file based on the selected simulation model.

Close Simulation

After a simulation is open, File –> Close Simulation allows you to close the current simulation and will return you to the Welcome window.

Open Auxiliary File

This can be used to open any file related to a simulation. It is most useful for opening and viewing tally data.

Save Auxiliary File

This can be used to save any changes made to an auxiliary file.

Close Auxiliary File

This can be used to close an associated auxiliary file that was previously opened.

Import

RSim can be used to import several types of geometry files for use either in an RSim simulation, or to be exported for use with another radiation transport code.

The supported import file formats are any of .ele/.node (Tetrahedral Mesh for PHITS), .stl, .ply, .vtk, .h5m (DAGMC), .stp, .step, .p12, .gdml (Tessellated)

Importing DAGMC and preserving the names of all parts requires the usage of external tools, such as CUBIT (https://cubit.sandia.gov/) or TRELIS (https://www.csimsoft.com/trelis) and DAGMC plugin (https://svalinn.github.io/DAGMC/usersguide/trelis_basics.html).

Note that a .gdml (CSG) format is not currently available for import, though it may be in future releases.

Once a file has been imported it can be assigned a material and color like any other geometry.

Export

RSim can be used to export geometries into several file formats. These are .ele/.node (Tetrahedral Mesh for PHITS), .stl, .ply, .vtk, .h5m (DAGMC), .gdml (CSG or tessellated, .vsh5, .tvsh5

Only the geometries that are currently being visualized in 3D View will be included in a geometry export.

Once the geometry has been exported it can be used in other radiation transport codes, such as PHITS, MCNP or DAGMC.

A seperate usage of the RSim Geometry Export feature could be for integration of geometry data to existing, complex Geant4 simulations The code below should be put into the Geant4 Detector construction class.

Note

#include “G4GDMLParser.hh”

#include “G4VPhysicalVolume.hh”

#include “G4RunManager.hh”

// In constructor

G4GDMLParser* parser = new G4GDMLParser();

parser->Read(gdmlFile); // gdmlFile is G4String with the name of the file.

fWorld = parser->GetWorldVolume(); //Now you have all world with all volumes in it

G4RunManager::GetRunManager()->DefineWorldVolume(fWorld);

G4RunManager::GetRunManager()->GeometryDirectlyUpdated();

Note

If exporting into a Tetrahedral Mesh for PHITS each part will have an individual .ele/.node file pair. Each file will assume a Universe = 1000. If exporting into a mesh, it is recommended for a minimum tessellation of 0.1, as otherwise it can take a significant amount of time to generate the mesh.

Recent Simulations

To access data to visualize from a recently conducted simulation, select Recent Simulations from the File menu in the menu bar.

recent simulation menu

Fig. 15 Recent Simulation Selection in File Menu

Click on the name of the simulation whose data you want to open.

Quit

File –> Quit will close RSim.