Tallying particle directions

Hi,

I would like to tally the directions of neutrons through a quadratic surface, but I am unsure how to do this. Does anyone know how to achieve this in principle?

Using filters like the PolarFilter or AzimuthalFilter for scoring the current only yields one set of scoring bins, but I would need 2 angles to know the direction of the particle? Maybe I am getting the purpose of these filters wrong.

Thanks!

Hi Simon,

If you wanted to collect information about the angle of individual particles as they move across a surface, this is not currently possible in OpenMC. Tallies generally give you quantities that are averaged over all particle histories. However, as a potential one-off solution, if you are building from source, if would be pretty easy to make a change to get the information you want by just printing it out (or writing to a file) as particles pass through the surface. Also, if I am misunderstanding your question, please feel free to elaborate.

Best regards,
Paul

Sorry for being imprecise:
I do not need individual particles, averaged quantities are perfectly fine.

I am just unsure how to interpret the results from the polar or azimuthal tallies.

Simon,

Filters can be combined, so in a single tally you can add both a PolarFilter and an AzimuthalFilter. I’ve put together a quick demonstration of how this would work for tallying the particle’s direction on a sphere. My model has a source that is directed in the positive x direction, so you can see that the highest flux on the surface appears in the polar/azimuthal bin corresponding to the positive x direction.
https://nbviewer.jupyter.org/gist/paulromano/badf81031c03889fad2af4c32236bee6

Best regards,
Paul

To be noted for future readers.

Paul Romano’s example is fine except that from Version 0.13 it is no more possible to apply a “flux” score on a surface. But the example works fine when the score is swapped for “current”.