GEOUNED: a tool for CAD-to-OpenMC CSG geometry translation

Dear everyone,

I am happy to announce that v1.0 of the GEOUNED tool has been submitted to github and the repo is now fully open. While the tool has been initially developed for CAD-to-CSG_MCNP and CSG_MCNP-to-CAD translation, in the latest update we have also included the option to translate CAD-to-CSG_OpenMC (xml or py). Reverse translation (CSG_OpenMC(xml)-to-CAD) may be supported in the future.

Disclaimer: While the MCNP translation capability is already at v1.0, OpenMC support was just included in the recent update. I have been testing the code in the last days and I think all the basic options work fine.

Some suggestions:

  • If you are using SpaceClaim for geometry production, based on our experience we would recommend to save the file first in .igs format, then open the .igs file and debug it (inexact edges, split edges,…), and finally save it in .stp for translation.
  • There is an option to simplify the CSG cells and for more complex models you can observe a significant speed-up, however, the translation may take up to 10x longer.

https://github.com/GEOUNED-code/GEOUNED

Example:

CAD > OpenMC XML
image >

6 Likes

Just a short update. We are currently also testing (not in the production version of GEOUNED) the translation from xml-to-CAD, but (at least for now) it is going to work only for “MCNP-style” geometries (cells and surfaces defined with numbers, cells constructed using surface numbers) in xml format.

Example: You receive a geometry in XML format (with constraints mentioned above), but you want to modify it due to some design changes. Using GEOUNED, you can translate this openmc xml geometry to STP file, and modify it using your favourite CAD software. After modification, you can translate it back to XML format for new iteration of calculations.

Do you think this can still be useful to OpenMC users?

Attached one example of xml-to-CAD translation:

After translating xml to CAD, the tree structure in STP file gives you information on the materials and cell numbers found in the geometry:
image

3 Likes

@akolsek Yes, I think being able to go from XML to CAD and back would be very useful! Even just going from XML to CAD and being able to visualize with normal CAD software would be a nice capability.