but I have difficulties on retrieving the scattering cross section, \sigma_{s,l}(E’->E), where l is the legendre expansion order starting from 0. I guess for MC, these quantities are not needed because the distribution data are directly provided by the nuclear data library. Can you point me a way to evaluate these scattering cross sections. I guess right now I do not care much about the efficiency.
Also it will save me amount of time if you can point me where the fission spectrum is evaluated. Are you using watt_spectrum in the physics module?
As you point out, for Monte Carlo the double-differential scattering cross section is not stored as Legendre moments (or coefficients). Generally, the outgoing energy and angle distributions for any reaction (elastic scattering, inelastic scattering, fission, n,2n, etc) can be represented in a variety of “ACE laws”. In the simplest case, it is just a tabulated PDF. Fission spectra are often represented as Watt or Maxwell spectra, but they don’t have to be and sometimes you’ll see them represented as tabulated PDFs. For more details on this, you can look at the OpenMC methodology guide: http://mit-crpg.github.io/openmc/methods/physics.html#secondary-angles-and-energy-distributions or alternatively the MCNP manual volume III. From an implementation standpoint, if you look at the ace_header module, you’ll see the Reaction derived type, which has components called adist and edist that represent that secondary angle and energy distributions (if any).
One thing you can do is tally the PN scattering moment. In the user’s guide (http://mit-crpg.github.io/openmc/usersguide/input.html#tally-element) you’ll see under the sub-element of , you can put scatter-N to get the N-th scattering moment. You would also want to use energy and energyout filters to get cross section groups.
Bryan or Adam (CCed) might have more to say on this topic as they are more involved in multigroup cross section generation.
As Paul mentioned, there is no direct way to access \sigma_{s,l}(E’->E) from the ACE data. Perhaps you can generate ultra-fine group cross-sections with OpenMC in the way Paul mentioned (the scatter-PN tally score) and those may fit your desire for continuous-energy data.
If, however, you truly want continuous energy data, I suggest you bypass OpenMC (and all monte carlo codes) altogether and access the ACE data directly in your method. To make this job simpler, the OpenMC license allows you to take whatever parts of OpenMC’s source code you need to save you time. There is also a Python library called PyNE (www.pynesim.org) which may prove useful for your needs.
These two options only allow you to have access to the ACE data, you will have to write your own methods to perform the Legendre expansion and combination of all reaction channels in to one set of \sigma_{s,l}(E’->E) values. Some codes like NJOY or PREPRO perhaps could be modified to give you what you need. I also have a code I am writing for my research which will do some of this for you (it would still need significant modifications), and the code is a few months away from being made public.
The OpenMC methodology guide link is quite useful. I think it is probably not appropriate to merge all kinds of scattering laws of all nuclides and all different reaction types into the scattering kernel. Especially for light nuclides, the scattering event will spread the secondary neutron into a large range of smaller energy, which makes the scattering kernel a dense matrix. Also energy and angle distributions of elastic scatterings or discrete-level inelastic scatterings are correlated, which requires high legendre expansion orders. For a particular material, it might be a good idea to merge some of reactions of part of nuclides into the expanded scattering cross sections in order to save the computing time. I am looking forward to the code Adam is developing.
The code (CRSRD) can generate MCNP multi-group format. It is discussed in the manual “MCNP multigroup/adjoint Capabilites”. But the derivation on converting scattering Pn moments to Monte Carlo sampling PDF is detailed in an appendix of the old MORSE code manual. We’v been using a FORTRAN code I wrote based on the MORSE manual. For P1 cross sections, MCNP can take it as a linear PDF. For higher Pn order, the MORSE method will convert Pn moments to discrete angle probabilities. If interested, I can share the code I wrote,
The link you shared to the secondary angles and energy distributions just gave a 404 “There isn’t a GitHub Pages site here.” Reading this post for the first time and was wondering what is supposed to be at this page.
@ligross The documentation has moved since this topic was originally discussed 8 years ago. You can now find the documentation at https://docs.openmc.org/. The particular page you are looking for is here.