Repository navigation
XDG Mesh Geometry - #4215
Draft
pshriwise wants to merge 38 commits into
Draft
XDG Mesh Geometry#4215pshriwise wants to merge 38 commits into
pshriwise wants to merge 38 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…ry support in the test suite
pshriwise
commented
Dec 4, 2026
Contributor
Author
There was a problem hiding this comment.
Noting here that materials are added to this input file because it was switched from the model using UWUW materials to the DAGMC file (same mesh) sans UWUW material specifications. Expected results for this test did not need to change.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the ability to apply
UnstructuredMeshobjects using the 'xdg' interface as geometry (for both surface meshes and volumetric meshes).There is still some work to be done here but I wanted to open the PR sooner rather than later and keep momentum moving after #3889.
Surface Mesh
XDG can support both DAGMC (MOAB .h5m) and libMesh files for surface mesh. This capability effectively behaves like DAGMC with the double-down plugin enabled. That capability comes built-in, however, and does not require building an additional piece of software. As in the case of DAGMC+double-down, the Embree library is still required.
The specification for .h5m files is the same as that of DAGMC to allow DAGMC users to easily transition to the more streamlined software stack that XDG provides.
For libMesh, material assignment metadata relies on mesh block data (subdomain IDs). Boundary conditions are handled somewhat specially. Information on the expected file format can be found here. This file format is new and may be subject to minor changes as it gets exercised by the community.
libMesh meshes in neutronics applications are almost always volumetric meshes. These meshes can be used as surface mesh, similar to that of DAGMC models, where the boundary faces of blocks are treated as geometric boundaries. These internal block interfaces are resolved automatically and sideset boundary conditions applying across sets of faces adjacent to multiple blocks are resolved appropriately.
Significantly, this applies to libMesh meshes composed of either tetrahedra or hexahedral geometry, making this meaningful for many MOOSE reactor geometries to a degree – prism6 element types and support for mixed element types is on its way.
Volumetric Mesh
This PR also introduces the ability to treat volumetric meshes as geometry wherein each element of a mesh is treated as a geometric region with its own properties (i.e. material, density multiplier, temperature, etc.).
This provides an ability to apply OpenMC calculations for geometry representations in workflows like that of Attila4MC and applies to both tetrahedral and hexahedral meshes as well.
Volumetric meshes can also be as hybrid geometry in the same way that surface mesh can be applied where meshes are used to fill CSG cells or are applied in lattices.
Verification
Users are encouraged to execute (and share!) their own verification exercises in comparison to DAGMC geometry using both the MOAB and libMesh formats.
Surface mesh – comparison against DAGMC + double-down
Models
Three well-trusted (i.e. watertight and topologically well-formed) DAGMC models were used for comparison. Results for each model can be examined in the link above by selecting the model from the dropdown menu.
Advanced test reactor (ATR): 5900 volumes; 28k surfaces; 5M triangles
This model has a CSG counterpart was used as verification for the initial implementation of DAGMC in OpenMC (https://www.ans.org/pubs/transactions/article-48262/)
Molten Salt Reactor Experiment (MSRE): 106 volumes; 23k surfaces; 13M triangles
This model has a CSG counterpart, applies hybrid CSG/CAD geometry, and was studied extensively in the following publication: https://doi.org/10.3389/fnuen.2024.1385478
Tokamak: 20 volumes; 243 surfaces; 7.1M triangles
This model has been used in several DAGMC tutorials including our example notebooks and this Coreform DAGMC tutorial: https://www.youtube.com/watch?v=2TzgTQidfwk
Performance and flux results for all of these runs can be examined on the benchmarking site we've been using:
https://xdg-benchmarking-site.onrender.com/?run=20261030_200432&run=20261103_151250&model=atr&exe=dd&exe=xdg&metric=active
Results
Each of these models shows identical flux results when using the CCFE-1024 group structure (not intended for fission spectra, but a fine group structure to perform comparisons). The results between XDG and DAGMC+double-down are identical. This is expected as the implementation of the two are the same, but with double-down now into XDG.
Performance
Threaded performance shows the same characteristics as that of DAGMC+double-down as well for all three models.
Volumetric mesh
I'll add comparison against MCNP 6.2 calculations here soon. I'm still working on a comprehensive analysis of a couple of models.
All results shown below were performed using ENDF/B VIII.0 LANL-based data.
Void Sphere
This model is a simple tet mesh of a sphere centered on the origin with radius 10 cm inside a CSG box with vacuum boundary conditions. The mesh consists of 4516 tets.
With 10M particles the results between OpenMC and MCNP are consistent with one another.
Iron Sphere
The same geometry was applied but using iron in the sphere. Similar agreement is reflected in the comparison of the OpenMC and MCNP results.
Nested spheres problem
The following test case is a set of nested spheres modeling on octant of a prototypic fusion wall with reflecting boundary conditions applied at the lower x, y, and z planes. The geometry is as shown
The mesh is contiguous (no gaps or overlaps) and composed of 61,484 elements.
The following are rough statistical analysis of the results between MCNP 6.2 and OpenMC
Volumetric mesh capabilities apply to hexahedral meshes as well:
AI Assistance
AI was used for debugging a few software engineering/build issues throughout the development of this process.
Checklist