What is the reliable path to run OpenMC simulations on CAD files?

Hi everyone I’m trying to go from STEP → Cubit → DAGMC (.h5m) → OpenMC, and I’m clearly missing a few key steps. I’d really appreciate a sanity check on my workflow and where I should tighten things up.

What I did

Imported several STEP parts into Cubit, scaled to meters, ran imprint/merge, then created a triangular surface mesh. Created material groups in Cubit and exported DAGMC (export dagmc “dagmc.h5m”). In OpenMC, built a DAGMCUniverse and ran a small k-eigenvalue problem.

What goes wrong

  1. “No material property found for volume …”
    OpenMC reports volumes without a material even though I thought I tagged everything.
  2. Source rejection (>95% rejected)
    I also hit the “>95% of external source sites were rejected” abort, even when I assign fuel to previously untagged volumes.
  3. Meshing/geometry visibility
    Very thin features (e.g., cladding) can disappear in OpenMC plots, while they are visible in STL files generated from the same .h5m file OpenMC is loading.

What I’m asking for

  1. A bulletproof recipe for DAGMC export: the exact sequence (imprint/merge, mesh sizing for thin walls, how to create mat: groups on volumes, and whether a graveyard shell is strongly recommended for OpenMC cases).
  2. A checklist for verifying an .h5m before running (e.g., confirm groups named mat: exist and that every Volume has exactly one mat: parent; quick ways to spot unassigned volumes).
  3. OpenMC-side best practices: using DAGMCUniverse safely (ID auto-assignment) and robust initial sources that won’t over-reject even if materials are imperfect.

Any advice or minimal working examples would be amazing. My goal is a reliable CAD to OpenMC path that avoids the two failure modes above. Thanks!

The most robust and reproducible method IMO is to script clean geometry creation with CadQuery and mesh with Gmsh (again scripted). Then convert the gmsh file to a h5m with cad-to-dagmc. Here is a minimal example

A few simple manual checks on can do are things like:

The openmc.Model.plot(n_samples=1000) allows one to plot the geometry with source points. This can be used to check the source is in the geometry.

Check units, as openmc expects cm and CAD is often in mm.

root = openmc.DAGMCUniverse(‘dagmc.h5m’)

print(root.bounding_box) # check the bounding box is the right scale.

I think xdg will bring some improvements to the CAD based workflow in the future so perhaps also something to look into.

Thank you very much, Shimwell. I’m currently trying out this workflow, and I’ll let you know how it goes in the meantime.

Hello Shimwell, this workflow works great, really appreciate your help!