mit-crpg/openmc — pull request #265 by nelsonag (2014-04-07 19:10:45+00:00)
Title: Expand tallying scores to include legendre and spherical harmonic expansions

This PR includes the following additional tally score options which I had recently created to help in generating multi-group cross-section libraries:
* nu-scatter-N, nu-scatter-PN:
- These are the nu-scatter equivalents to the scatter-N and scatter-PN scores.
- Only analog tallies supported.
* flux-YN:
- Spherical harmonics expansions of the flux angle
- Analog and tracklength tallies supported.
* total-YN
- Spherical harmonics expansion of the total cross-section weighted by the angular flux
- This is needed for using the consistent-P approximation (or extended transport)
- Analog and tracklength tallies supported.
* scatter-Yn, nu-scatter-YN
- legendre expansion of the change in angle, spherical harmonics expansion of the incoming angle.
- Also needed for consistent-P/extended transport
- Only analog tallies provided

Other changes include:
* Updating the users manual to reflect the new scores
* Cleaning up the output of these type of *-N scores so that the code requires less copy-paste when a new moment score is added.

Some other notes:
* The spherical harmonic functions used herein are based on those presented in Chapter 8 of the Handbook of Nuclear Engineering (Chapter 8 by Alain Hebert). This discussion seems to be the most consistent and well-laid out description I have seen so far, so I chose to use that.
* I have tested the new spherical harmonic function calc_rn quite extensively by comparing it with a comparable python script as well as the first few orders that are given in the NE Handbook).
* I have also used this data when generating MGXS libraries over the past few weeks - it seems to work quite well, though more eyes are definitely appreciated.