Plotting Mesh Tallies

Hi all,

I would like to create 3 different figures with the openmc-plot-mesh-tally script, each one showing the neuron flux for a specific energy group: thermal (0 to 3 eV), intermediate (3 eV to 0.1 MeV) and fast (0.1 MeV to 10 MeV). For this purpose, I defined the following tally with mesh and energy filters:

mesh400 = openmc.RegularMesh(mesh_id=20)

mesh400.dimension = [100, 100]

mesh400.lower_left = [-27.02, -23.4]

mesh400.width = [0.5404, 0.468]

tally404 = openmc.Tally(name=‘flux’)

tally404.scores = [‘flux’]

tally404.filters = [openmc.MeshFilter(mesh400), openmc.EnergyFilter([0.0, 3.0, 0.1e6, 20.0e6])]

tallies.append(tally404)

From the Mesh Tally Plotter, I saw that the energy filter was separated like this: ([0. 3.] to [3.e+00 1.e+05]) and ([3.e+00 1.e+05] to [100000. 20000000.]). However, I was expecting three different intervals: [0, 3], [3, 1e+5] and [1e+5, 20e+6]. In addition, I cannot see the geometry.

I attached as an example a plot that I obtained defining a tally with an energy filter [0.0, 2.99, 3.0] and 100x100 mesh. I thought that with this energy filter I could create 2 images but I noticed that only one was generated.

Please, any suggestion on how to create these 3 different images considering the corresponding energy group

Thanks,

Javier

Hi Javier,

We’ve been working on a plotting application for OpenMC (https://github.com/openmc-dev/plotter) which may be able to provide what you’re looking for. I ran a quick example of a pincell model scoring flux with a mesh and energy filter so you can see what that might look like. The application lets you add geometry boundary outlines over the tally data (which is what I think you’re requesting).

If you want to try it out, you’d want to use this tally viz branch (https://github.com/pshriwise/plotter/tree/tally_data). Note that there are a couple additional dependencies required (PySide2 and Matplotlib) for the GUI to run. Run it from the directory with your model and statepoint file. Once the GUI is loaded, you can open your statepoint file from the “Data” menu. It’s currently under review to be added to the main repository, so you’ll definitely be beta testing it but feel free to pull that branch down and try it out! I’ve already noted that it doesn’t seem to play well with 2D meshes (something to work on), but if you provide a single bin for the third dimension (making it 100x100x1) it will hopefully work just fine.

Feel free to let us know about any issues you run into along the way.

Cheers,

Looking at this again, this issue with the energy bins being off in openmc-plot-mesh-tally has been resolved in this PR.

So as much as I’d like more ppl trying out the plotter, it might be faster to update to the development version of OpenMC ( the develop branch) to get the images you want. I suppose you still won’t be able to see the geomtery on top of the tally data - that’s only in the plotting application from my previous response, but I wanted to make sure you were aware of all the options.

Patrick Shriwise

608-446-8173

Hi Patrick,

Thank you very much for all the information. I will let you know about this.

Javier