Hello,
I want to run a neutron transport model using native OpenMC geometry and then run flux tallies on an overlayed unstructured mesh similar to this Example with the main differences being I only want flux tallies and the geometry of the flux mesh I want is a reactor pressure vessel (RPV) rather than LWR pins. I already have the reactor model I want to use, but I am having trouble with the mesh bit.
In the example linked above, it says that the file visualized is generated by Trelis, which I can see being no problem because the bit that is visualized is the Exodus file. However, the file that is run is the MOAB .h5m file. My organization uses Coreform Cubit for meshing, and I do not believe there is a way for Coreform Cubit to natively export MOAB files. I would be happy to try to use libmesh as the OpenMC mesh library, but it sounds like it does not have support for flux tallies.
I take this to mean I need to convert my Exodus (.e) mesh to MOAB (.h5m).
A bit about the mesh:
Executive Exodus summary:
Number of dimensions = 3
Number of element blocks = 12
Number of sidesets = 0
Number of nodesets = 0
Number of bc sets = 1
Number of elements = 10368
Number of nodes = 15558
Element type is HEX8. I bring this up because when we tried to run the exodus file with MOAB set as the mesh library we got this error back:
RuntimeError: --------------------- Error Message ------------------------------------ [0]MOAB ERROR: ../inputs/openmc_RPV_mesh.e: File is not HDF5! [0]MOAB ERROR: set_up_read() line 438 in src/io/ReadHDF5.cpp [0]MOAB ERROR: --------------------- Error Message ------------------------------------ [0]MOAB ERROR: NULL file handle.! [0]MOAB ERROR: is_error() line 125 in src/io/ReadHDF5.hpp WARNING: Non-tetrahedral elements found in unstructured mesh file: ../inputs/openmc_RPV_mesh.e *** stack smashing detected ***: terminated [castle-bravo:2665942] *** Process received signal *** [castle-bravo:2665942] Signal: Aborted (6) [castle-bravo:2665942] Signal code: (-6) [castle-bravo:2665942] *** Process received signal *** [castle-bravo:2665942] Signal: Segmentation fault (11) [castle-bravo:2665942] Signal code: (128) [castle-bravo:2665942] Failing at address: (nil)
Which I take to mean there are two problems:
- This isnât a .H5M file (understandable)
- The mesh may be able to be read in some limited capacity, but that it didnât like that I was using non-tet elements. This is the more interesting of the errors to me. The few examples Iâve seen of the unstructured mesh capability being used in OpenMC have all been TET meshes, so I guess one question I have would be can HEX elements be used with OpenMCâs unstructured mesh tally feature?
Iâve only been looking into this since yesterday, but it seems that if I wanted to convert between mesh files the first place most start is using meshio. I have installed it via conda and their documentation makes conversion seem as easy as the one liner: meshio convert input.e output.h5m
However, when I do this I get the following warnings:
It does generate a .h5m file though. When trying to run it in OpenMC though we get this error:
Creating state point statepoint.60.h5...
Writing unstructured mesh tally_5.60.vtk...
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Nothing to write!
[0]MOAB ERROR: gather_mesh() line 191 in src/io/WriteVtk.cpp
Writer with name VTK for file tally_5.60.vtk using extension vtk (file type "(null)") was unsuccessful
Using default writer WriteHDF5Parallel for file tally_5.60.vtk
I wanted to be thorough in my initial question for visibility into my problem, but to summarize my questions:
- What kind of meshes are currently supported within OpenMCâs unstructured mesh functionality? Iâm interested in element type, file type, and features available for each (if different).
- What is the intended workflow for unstructured mesh generation for use with OpenMC, and is it different from the most low-effort/fastest setup workflow? What would the differences be between them?
Any help would be greatly appreciated!