openmc icon indicating copy to clipboard operation
openmc copied to clipboard

adding mesh tally amalgamation algorithm

Open magnoxemo opened this issue 4 months ago • 1 comments

Description

This PR implements the mesh tally amalgamation algorithm.

If the user wants to do mesh tally amalgamation from cardinal side they will set the _amalgamation = true. Then It will create a hash map of elements point to the first element of the cluster. If any element isn't part of a cluster it will point to itself.

If a reaction happens in any of the element of a cluster, when OpenMC quires the libMesh mesh for tallying it will send the bin we have at the first element in that cluster(using the hash map) . From cardinal side then, the tally score from the first element will be pulled and stored in the all elements in the cluster.

closes #3552

Checklist

  • [x] I have performed a self-review of my own code
  • [x] I have run clang-format (version 15) on any C++ source files (if applicable)
  • [ ] I have followed the style guidelines for Python source files (if applicable)
  • [ ] I have made corresponding changes to the documentation (if applicable)
  • [x] I have added tests that prove my fix is effective or that my feature works (if applicable)

more about this is here PR

magnoxemo avatar Aug 27 '25 18:08 magnoxemo

primary result from Cardinal side:

We will cluster elements together for tallying if the previous OpenMC solution has

  • higher relative error and
  • Almost the same flux (relative error between two adjacent bin 0.001)

OpenMC run 1:

image

amlgamating elements for tallying together:

image

OpenMC solution after mesh tally amalgamation:

image

I think it's ready for review

magnoxemo avatar Aug 29 '25 19:08 magnoxemo