Issues with MeshFilter and Paraview Visualization

Hello everyone,
I am trying to use mesh filters to tally neutron flux and reaction rates and generate VTK files for visualization in Paraview. However, I have encountered some issues. The code snippet below shows how I generate the VTK file. If I add an energy filter to tally.filter , the code throws an error stating that the data size is not compatible. If I ignore the energy filter and only use the mesh filter, the code runs without errors. However, since this is my first time using Paraview, I’m not sure how to visualize the model. Do you have any examples? I have been unable to find any. Lastly, this is also my first time using mesh. Regarding the dimensions, does it mean that I have 100 cuts on the x, y, and z axes in my model, resulting in a total of 1e6 grids for tallying? I am unsure if my understanding is correct.
Thank you very much for your assistance. :melting_face:


Press the green “Apply” button, then select one of the options under “Display” to change how the data is displayed.

Yes, your mesh will have 1003 = 106 elements with a corresponding 106 tally bins.

1 Like

Thanks! @paulromano ,I followed your instructions and made the settings as you suggested, but I still feel like there are some issues.

The colorbar on the right indicates that the range of flux values is 0 (blue) to 1.1e-3 (red). It may just be possible that most of your flux values are 0?

Hi @paulromano Could it be possible that the use of mesh causes smaller neutron flux tallies within each mesh? Additionally, I have a question regarding the normalization of neutron flux units. As it is well known, OpenMC outputs flux units as neutron-cm/source. To convert it to neutron/cm2-sec, you need to divide by the volume V and then multiply by the normalization factor Pnu/QK. If you are using a mesh, the volume would correspond to the volume of the mesh cell (or the volume of the material if using a material filter). Am I correct in understanding this? Furthermore, to obtain nu (neutrons/fission), you need to tally the fission reaction rate and the nu-fission. If using a material filter (to obtain flux within a specific material), would you tally these two quantities within the corresponding material region? Finally, when tallying the reaction rate, its unit is reactions per source particle. I have a question regarding the source particle. Is this value the same for all materials and reactions, and how is it obtained? :smiley: