Coder Social home page Coder Social logo

wmp_library's Introduction

Windowed Multipole Library

This repository contains neutron cross section data for isotopes in windowed multipole (WMP) format which requires less memory than pointwise cross sections and allows on-the-fly Doppler broadening to arbitrary temperature.

In WMP format, the entire energy range is chopped into equal-in-momentum domains , or windows. For each window, poles in certain range are evaluated exactly and the rest is curve-fitted by low-order polynomials. The 0K cross section can be expressed as:

wmp 0k

where wmp 0k and wmp 0k are poles and residues in the complex plane and wmp 0k is the polynomial coefficients.

Both the poles term and polynomial term can be analytically Doppler broadened to any temperature.

wmp Tk

wmp Tk cont wmp Tk cont wmp Tk cont

wmp Tk cont wmp Tk cont wmp Tk cont

wmp Tk cont

The poles of the nuclides in this library have been generated using Vector Fitting technique [1]. Then the OpenW code is used to process the multipole cross sections into windowed multipole library.

The current library includes 423 nuclides processed from ENDF/B VII.1 library, with a target maximum relative error for all cross sections of 0.1%. An overview of the library can be found in the table in 'nuclides.md'.

More details about the windowed multipole method or multipole representation can be found in [2-4].

  • [1] J. Liang, X. Peng, S. Liu, C. Josey, B. Forget and K. Smith. "Processing Of A Comprehensive Windowed Multipole Library via Vector Fitting." PHYSOR 2018: Reactor Physics paving the way towards more efficient systems. Cancun, Mexico, April 22-26, 2018.
  • [2] C. Josey, P. Ducru, B. Forget, and K. Smith. "Windowed multipole for cross section Doppler broadening." Journal of Computational Physics, volume 307, pp. 715–727 (2016).
  • [3] B. Forget, S. Xu, and K. Smith. "Direct Doppler broadening in Monte Carlo simulations using the multipole representation." Annals of Nuclear Energy, volume 64, pp. 78–85 (2014).
  • [4] R. N. Hwang. "A rigorous pole representation of multilevel cross sections and its practical applications." Nuclear Science and Engineering, volume 96(3), pp. 192–209 (1987).

Library format specifications

Windowed multipole data is stored in HDF5 files, containing the energy boundaries, window structure, poles/residues, and curve fit coefficients, etc.

Detailed specifications can be found in 'Windowed Multipole Library Format'.

Download

  • download the compressed library from the latest releases: https://github.com/mit-crpg/WMP_Library/releases

    $ wget https://github.com/mit-crpg/WMP_Library/releases/download/v1.0.1/WMP_Library_v1.0.1.tar.gz
  • clone from git repository

    Git LFS is used to store the binary HDF5 files. To download the real WMP library, you need to firstly install Git LFS and then clone this repository.

    $ git clone https://github.com/mit-crpg/WMP_Library.git

Usage

With the windowed multipole library, it is convenient and efficient to compute cross sections at arbitrary temperature (in 0 K-3000 K range) and energy (in the resolved resonance range) for 4 reactions: total, elastic scattering, absorption, and fission.

An excellent reference is OpenMC, which implements WMP in both the transport solver and the OpenMC Python API. You can also check the scripts scripts/WMP.py for a Python implementation, which illustrates how to read, evaluate and export an windowed multipole format library. For example, the following script demonstrates how to utilize WMP library using the nuclear data interface WindowedMultipole.

# load a library
import WMP
u238_multipole = WMP.WindowedMultipole.from_hdf5('092238.h5')

# evaluate cross sections at a given energy and temperature
scatt_xs, absorption_xs, fission_xs = u238_multipole(E=1.0, T=300.)

# comparison with ACE library (HDF5 format used in OpenMC)
import openmc.data
u238_ace = openmc.data.IncidentNeutron.from_hdf5('U238.h5')
energy = np.logspace(np.log10(u238_multipole.E_min), np.log10(u238_multipole.E_max), 1E4)
scatt_xs_wmp = u238_multipole(energy, T=293.75)[0]
scatt_xs_ace = u238_ace[2].xs['294K'](energy)
# then you can plot the cross sections with energies

Reporting

wmp_library's People

Contributors

jiankai-yu avatar liangjg avatar paulromano avatar rockfool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wmp_library's Issues

request for license

Fantastic package, just wondering if there is a usage license for the repository.

As I would like to make use of these h5 data files in the openmc_data_downloader but don't want to break any license terms and conditions.

Thanks for making this

How to evaluate XS over E_max?

Hello!
Thank you for a nice library.
It looks like the E_max values for major isotopes such as U235 are quite small compared to the maximum energy we encounter in neutronics simulation.
How do I compute the cross sections over E_max? Do I need to be augmented by point-wise XS?

Issue running WMP.py from "/scripts"

I am attempting to reproduce the example in the "Usage" portion of the readme. Specifically I cannot load in a library using the method described in the readme i.e.

u238_multipole = WMP.WindowedMultipole.from_hdf5('092238.h5')

When attempting I get the following error:
File "/Users/mlazaric/WMP_Library/scripts/WMP.py", line 428, in from_hdf5
out.spacing = group['spacing'].value
AttributeError: 'Dataset' object has no attribute 'value'

WindowedMultipole.window Index question

Hello,

In the help(WindowedMultipole) documentation the WindowedMultipole object is described as below:
windows : np.ndarray
A 2D array of Integral values. windows[i, 0] - 1 is the index of the
first pole in window i. windows[i, 1] - 1 is the index of the last pole
in window i.

When interacting with this object I'm finding that the first window (i.e windows[0,:]) is often [0,-1]. Does this mean the indices are therefore -1 and -2 respectively (due to the "-1" in the documentation above)?

Meaning of 'version'

@liangjg Right now, OpenMC checks the version of the multipole library and aborts if it does not match what it expects. Going forward, it seems reasonable to expect a new multipole library (perhaps based on a different data library) that still has the same file format. Should version in the HDF5 file be interpreted as "version of the file format" or "version of the data itself"? If the latter, then we shouldn't be aborting OpenMC based on whatever appears.

Adding filetype attribute on WMP files

One thing I'd like to do is to be able to specify multipole files inside of OpenMC's cross_sections.xml file. To distinguish between the various HDF5 files, all OpenMC data files (neutron, photon, thermal scattering) use a filetype attribute on the root group in the HDF5 file. It would be nice if the HDF5 files contained in this library also had a filetype attribute that was set to "wmp" or "multipole". @liangjg Would it be possible to do a 1.0.1 release with a filetype attribute added?

Divergence of Faddeeva function

Hello!
I have one more question about the usage of this library.
If my understanding is proper, Im(z) can easily become a large negative value for fluctuating poles because the denominator 2*sqrt(xsi) is a small value due to the Boltzmann constant (= 8.6173303E-05 eV/K).
This causes divergence of my Faddeeva function evalulator.
How did you avoid this problem?
Many thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.