mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Merge pull request #1613 from paulromano/release-prep
Preparation for 0.12.0 release
This commit is contained in:
commit
10402760fe
6 changed files with 163 additions and 204 deletions
18
MANIFEST.in
18
MANIFEST.in
|
|
@ -1,15 +1,17 @@
|
|||
include CMakeLists.txt
|
||||
include LICENSE
|
||||
include CODE_OF_CONDUCT.md
|
||||
include CODEOWNERS
|
||||
include CONTRIBUTING.md
|
||||
include Dockerfile
|
||||
include schemas.xml
|
||||
include pyproject.toml
|
||||
include pytest.ini
|
||||
include openmc/data/reconstruct.pyx
|
||||
include docs/source/_templates/layout.html
|
||||
include docs/sphinxext/LICENSE
|
||||
recursive-include . *.rst
|
||||
recursive-include cmake *.cmake
|
||||
global-include *.cmake
|
||||
global-include *.cmake.in
|
||||
global-include *.rst
|
||||
recursive-include docs *.css
|
||||
recursive-include docs *.dia
|
||||
recursive-include docs *.png
|
||||
|
|
@ -23,8 +25,10 @@ recursive-include examples *.ipynb
|
|||
recursive-include examples *.png
|
||||
recursive-include examples *.py
|
||||
recursive-include examples *.xml
|
||||
recursive-include include *.h
|
||||
recursive-include man *.1
|
||||
recursive-include src *.F90
|
||||
recursive-inlcude openmc *.pyx
|
||||
recursive-include openmc *.c
|
||||
recursive-include src *.c
|
||||
recursive-include src *.cc
|
||||
recursive-include src *.cpp
|
||||
|
|
@ -34,13 +38,17 @@ recursive-include src *.rnc
|
|||
recursive-include src *.rng
|
||||
recursive-include tests *.dat
|
||||
recursive-include tests *.h5
|
||||
recursive-inlcude tests *.h5m
|
||||
recursive-include tests *.py
|
||||
recursive-include tests *.xml
|
||||
recursive-include vendor CMakeLists.txt
|
||||
recursive-include vendor *.cmake.in
|
||||
recursive-include vendor *.cc
|
||||
recursive-include vendor *.cpp
|
||||
recursive-include vendor *.h
|
||||
recursive-include vendor *.hh
|
||||
recursive-include vendor *.hpp
|
||||
recursive-include vendor *.pc.in
|
||||
recursive-include vendor *.natvis
|
||||
include vendor/gsl-lite/include/gsl/gsl
|
||||
prune docs/build
|
||||
prune docs/source/pythonapi/generated/
|
||||
|
|
|
|||
149
docs/source/releasenotes/0.12.0.rst
Normal file
149
docs/source/releasenotes/0.12.0.rst
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
====================
|
||||
What's New in 0.12.0
|
||||
====================
|
||||
|
||||
.. currentmodule:: openmc
|
||||
|
||||
-------
|
||||
Summary
|
||||
-------
|
||||
|
||||
This release of OpenMC includes an assortment of new features and many bug fixes.
|
||||
In particular, the :mod:`openmc.deplete` module has been heavily tested which
|
||||
has resulted in a number of usability improvements, bug fixes, and other
|
||||
enhancements. Energy deposition calculations, particularly for coupled
|
||||
neutron-photon simulations, have been improved as well.
|
||||
|
||||
Improvements in modeling capabilities continue to be added to the code,
|
||||
including the ability to rotate surfaces in the Python API, several new
|
||||
"composite" surfaces, a variety of new methods on :class:`openmc.Material`,
|
||||
unstructured mesh tallies that leverage the existing DAGMC infrastructure,
|
||||
effective dose coefficients from ICRP-116, and a new cell instance tally
|
||||
filter.
|
||||
|
||||
------------
|
||||
New Features
|
||||
------------
|
||||
|
||||
- All surfaces now have a `rotate` method that allows them to be rotated.
|
||||
- Several "composite" surfaces, which are actually composed of multiple surfaces
|
||||
but can be treated as a normal surface through the -/+ unary operators, have
|
||||
been added. These include:
|
||||
|
||||
- :class:`openmc.model.RightCircularCylinder`
|
||||
- :class:`openmc.model.RectangularParallelepiped`
|
||||
- :class:`openmc.model.XConeOneSided` (and equivalent versions for y- and z-axes)
|
||||
|
||||
- Various improvements related to depletion:
|
||||
|
||||
- The matrix exponential solver can now be configured through the `solver`
|
||||
argument on depletion integrator classes.
|
||||
- The :meth:`openmc.deplete.Chain.reduce` method can automatically reduce the
|
||||
number of nuclides in a depletion chain.
|
||||
- Depletion integrator classes now allow a user to specify timesteps in several
|
||||
units (s, min, h, d, MWd/kg).
|
||||
- :meth:`openmc.deplete.ResultsList.get_atoms` now allows a user to obtain
|
||||
depleted material compositions in atom/b-cm.
|
||||
|
||||
- Several new methods on :class:`openmc.Material`:
|
||||
|
||||
- The :meth:`openmc.Material.add_elements_from_formula` method allows a user
|
||||
to create a material based on a chemical formula.
|
||||
- :meth:`openmc.Material.add_element` now supports the `enrichment` argument for
|
||||
non-uranium elements when only two isotopes are naturally occurring.
|
||||
- :meth:`openmc.Material.add_element` now supports adding elements by name
|
||||
rather than by symbol.
|
||||
- The :meth:`openmc.Material.get_elements` method returns a list of elements
|
||||
within a material.
|
||||
- The :meth:`openmc.Material.mix_materials` method allows multiple materials to
|
||||
be mixed together based on atom, weight, or volume fractions.
|
||||
|
||||
- The acceptable number of lost particles can now be configured through
|
||||
:attr:`openmc.Settings.max_lost_particles` and
|
||||
:attr:`openmc.Settings.rel_max_lost_particles`.
|
||||
- Delayed photons produced from fission are now accounted for by default by
|
||||
scaling the yield of prompt fission photons. This behavior can be modified
|
||||
through the :attr:`openmc.Settings.delayed_photon_scaling` attribute.
|
||||
- A trigger can now be specified for a volume calculation via the
|
||||
:meth:`openmc.VolumeCalculation.set_trigger` method.
|
||||
- The :class:`openmc.stats.SphericalIndependent` and
|
||||
:class:`openmc.stats.CylindricalIndependent` classes allow a user to
|
||||
specify source distributions based on spherical or cylindrical coordinates.
|
||||
- Custom external source distributions can be used via the
|
||||
:attr:`openmc.Source.library` attribute.
|
||||
- Unstructured mesh class, :class:`openmc.UnstructuredMesh`, that can be used in
|
||||
tallies.
|
||||
- The :class:`openmc.CellInstanceFilter` class allows one or more instances of a
|
||||
repeated cell to be tallied. This is effectively a more flexible version of
|
||||
the existing :class:`openmc.DistribcellFilter` class.
|
||||
- The :func:`openmc.data.dose_coefficients` function provides effective dose
|
||||
coefficients from ICRP-116 and can be used in conjunction with
|
||||
:class:`openmc.EnergyFunctionFilter` in a tally.
|
||||
|
||||
---------
|
||||
Bug Fixes
|
||||
---------
|
||||
|
||||
- `Keep user-supplied prev_results on operator <https://github.com/openmc-dev/openmc/pull/1605>`_
|
||||
- `Fix bug when S(a,b) tables appear in depletable material <https://github.com/openmc-dev/openmc/pull/1605>`_
|
||||
- `DAGMC fix for implicit complement material assignment <https://github.com/openmc-dev/openmc/pull/1604>`_
|
||||
- `Bug fix for tallying reaction rates in coupled n-p runs <https://github.com/openmc-dev/openmc/pull/1603>`_
|
||||
- `Corrected issue with multiplicity matrix <https://github.com/openmc-dev/openmc/pull/1598>`_
|
||||
- `Fix depletion with photon transport <https://github.com/openmc-dev/openmc/pull/1595>`_
|
||||
- `Fix secondary photon creation <https://github.com/openmc-dev/openmc/pull/1591>`_
|
||||
- `Bug fix for total xs plotting <https://github.com/openmc-dev/openmc/pull/1563>`_
|
||||
- `Account for light nuclide production in depletion <https://github.com/openmc-dev/openmc/pull/1555>`_
|
||||
- `Reset timer in depletion calculations <https://github.com/openmc-dev/openmc/pull/1539>`_
|
||||
- `Fix for Model.run <https://github.com/openmc-dev/openmc/pull/1536>`_
|
||||
- `Ensure NJOY output goes to specified directory <https://github.com/openmc-dev/openmc/pull/1522>`_
|
||||
- `Fix bug preventing creating photon data <https://github.com/openmc-dev/openmc/pull/1489>`_
|
||||
- `Fix bug when surface ID > 999999 <https://github.com/openmc-dev/openmc/pull/1486>`_
|
||||
- `Fix bug for reading output settings in Settings.from_xml <https://github.com/openmc-dev/openmc/pull/1478>`_
|
||||
- `Fix improve energy deposition for coupled neutron-photon <https://github.com/openmc-dev/openmc/pull/1449>`_
|
||||
- `Use number of particles for tally normalization <https://github.com/openmc-dev/openmc/pull/1442>`_
|
||||
- `Fix a number of problems related to photoatomic data <https://github.com/openmc-dev/openmc/pull/1425>`_
|
||||
- `Fix cosine smearing for S(a,b) <https://github.com/openmc-dev/openmc/pull/1420>`_
|
||||
- `Use relative distances for coincidence test in hex lattice <https://github.com/openmc-dev/openmc/pull/1414>`_
|
||||
- `Fix RPATH for non-Debian linux systems <https://github.com/openmc-dev/openmc/pull/1411>`_
|
||||
- `Fix mesh plotter energy filter bins <https://github.com/openmc-dev/openmc/pull/1409>`_
|
||||
- `Fix memory leak <https://github.com/openmc-dev/openmc/pull/1395>`_
|
||||
- `Fix volume allocation related to burnable materials <https://github.com/openmc-dev/openmc/pull/1392>`_
|
||||
- `Fix tally mesh bug for short tracks <https://github.com/openmc-dev/openmc/pull/1387>`_
|
||||
- `DAGMC void material assignment fix <https://github.com/openmc-dev/openmc/pull/1375>`_
|
||||
- `Fix for Mesh __repr__ methods <https://github.com/openmc-dev/openmc/pull/1385>`_
|
||||
|
||||
------------
|
||||
Contributors
|
||||
------------
|
||||
|
||||
This release contains new contributions from the following people:
|
||||
|
||||
- `Paul Cosgrove <https://github.com/ChasingNeutrons>`_
|
||||
- `Steven Dargaville <https://github.com/stevendargaville>`_
|
||||
- `Andrew Davis <https://github.com/makeclean>`_
|
||||
- `Iurii Drobyshev <https://github.com/dryuri92>`_
|
||||
- `Guillaume Giudicelli <https://github.com/GiudGiud>`_
|
||||
- `Alec Golas <https://github.com/awgolas>`_
|
||||
- `Avery Grieve <https://github.com/NuclearEngideer>`_
|
||||
- `Sterling Harper <https://github.com/smharper>`_
|
||||
- `Yuan Hu <https://github.com/YuanHu-PKU-KIT>`_
|
||||
- `Yue Jin <https://github.com/kingyue737>`_
|
||||
- `Andrew Johnson <https://github.com/drewejohnson>`_
|
||||
- `Mikolaj Kowalski <https://github.com/Mikolaj-A-Kowalski>`_
|
||||
- `Shikhar Kumar <https://github.com/shikhar413>`_
|
||||
- `Jingang Liang <https://github.com/liangjg>`_
|
||||
- `David Long <https://github.com/davidjohnlong>`_
|
||||
- `Amanda Lund <https://github.com/amandalund>`_
|
||||
- `Alex Lyons <https://github.com/alex-lyons>`_
|
||||
- `Adam Nelson <https://github.com/nelsonag>`_
|
||||
- `Ethan Peterson <https://github.com/eepeterson>`_
|
||||
- `Sam Powell-Gill <https://github.com/sampug>`_
|
||||
- `Ariful Islam Pranto <https://github.com/AI-Pranto>`_
|
||||
- `Simon Richards <https://github.com/simondrichards>`_
|
||||
- `Gavin Ridley <https://github.com/gridley>`_
|
||||
- `Paul Romano <https://github.com/paulromano>`_
|
||||
- `Jonathan Shimwell <https://github.com/Shimwell>`_
|
||||
- `Patrick Shriwise <https://github.com/pshriwise>`_
|
||||
- `John Tramm <https://github.com/jtramm>`_
|
||||
- `Paul P.H. Wilson <https://github.com/gonuke>`_
|
||||
- `Jiankai Yu <https://github.com/rockfool>`_
|
||||
|
|
@ -7,6 +7,7 @@ Release Notes
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
0.12.0
|
||||
0.11.0
|
||||
0.10.0
|
||||
0.9.0
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Download ENDF/B-VII.1 ENDF data from NNDC for photo-atomic and atomic
|
||||
relaxation data and convert it to an HDF5 library for use with OpenMC.
|
||||
This data is used for photon transport in OpenMC.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
from pathlib import Path
|
||||
import zipfile
|
||||
|
||||
import openmc.data
|
||||
from openmc._utils import download
|
||||
|
||||
|
||||
class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter,
|
||||
argparse.RawDescriptionHelpFormatter):
|
||||
pass
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description=__doc__,
|
||||
formatter_class=CustomFormatter
|
||||
)
|
||||
parser.add_argument('-c', '--cross-sections',
|
||||
help='cross_sections.xml file to append libraries to')
|
||||
args = parser.parse_args()
|
||||
|
||||
base_url = 'https://www.nndc.bnl.gov/endf/b7.1/zips/'
|
||||
files = ['ENDF-B-VII.1-photoat.zip', 'ENDF-B-VII.1-atomic_relax.zip']
|
||||
block_size = 16384
|
||||
|
||||
# ==============================================================================
|
||||
# DOWNLOAD FILES FROM NNDC SITE
|
||||
|
||||
output = Path('photon_hdf5')
|
||||
output.mkdir(exist_ok=True)
|
||||
|
||||
for f in files:
|
||||
download(base_url + f)
|
||||
|
||||
# ==============================================================================
|
||||
# EXTRACT FILES
|
||||
|
||||
for f in files:
|
||||
print('Extracting {}...'.format(f))
|
||||
zipfile.ZipFile(f).extractall()
|
||||
|
||||
# ==============================================================================
|
||||
# GENERATE HDF5 DATA LIBRARY
|
||||
|
||||
# If previous cross_sections.xml was specified, load it in
|
||||
if args.cross_sections is not None:
|
||||
lib_path = args.cross_sections
|
||||
library = openmc.data.DataLibrary.from_xml(lib_path)
|
||||
else:
|
||||
lib_path = output / 'cross_sections.xml'
|
||||
library = openmc.data.DataLibrary()
|
||||
|
||||
# Iterate over each natural element from Z=1 to Z=100
|
||||
for z in range(1, 101):
|
||||
element = openmc.data.ATOMIC_SYMBOL[z]
|
||||
print('Generating HDF5 file for Z={} ({})...'.format(z, element))
|
||||
|
||||
# Generate instance of IncidentPhoton
|
||||
photo_file = os.path.join('photoat', 'photoat-{:03}_{}_000.endf'.format(z, element))
|
||||
atom_file = os.path.join('atomic_relax', 'atom-{:03}_{}_000.endf'.format(z, element))
|
||||
data = openmc.data.IncidentPhoton.from_endf(photo_file, atom_file)
|
||||
|
||||
# Write HDF5 file and register it
|
||||
hdf5_file = output / (element + '.h5')
|
||||
data.export_to_hdf5(hdf5_file, 'w')
|
||||
library.register_file(hdf5_file)
|
||||
|
||||
library.export_to_xml(lib_path)
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import tarfile
|
||||
|
||||
import numpy as np
|
||||
import h5py
|
||||
|
||||
from openmc._utils import download
|
||||
|
||||
|
||||
base_url = 'http://geant4.cern.ch/support/source/'
|
||||
filename = 'G4EMLOW.6.48.tar.gz'
|
||||
|
||||
# ==============================================================================
|
||||
# DOWNLOAD FILES FROM GEANT4 SITE
|
||||
|
||||
download(base_url + filename)
|
||||
|
||||
# ==============================================================================
|
||||
# EXTRACT FILES FROM TGZ
|
||||
|
||||
if not os.path.isdir('G4EMLOW6.48'):
|
||||
with tarfile.open(filename, 'r') as tgz:
|
||||
print('Extracting {}...'.format(filename))
|
||||
tgz.extractall()
|
||||
|
||||
# ==============================================================================
|
||||
# GENERATE COMPTON PROFILE HDF5 FILE
|
||||
|
||||
print('Generating compton_profiles.h5...')
|
||||
|
||||
shell_file = os.path.join('G4EMLOW6.48', 'doppler', 'shell-doppler.dat')
|
||||
|
||||
with open(shell_file, 'r') as shell, h5py.File('compton_profiles.h5', 'w') as f:
|
||||
# Read/write electron momentum values
|
||||
pz = np.loadtxt(os.path.join('G4EMLOW6.48', 'doppler', 'p-biggs.dat'))
|
||||
f.create_dataset('pz', data=pz)
|
||||
|
||||
for z in range(1, 101):
|
||||
# Create group for this element
|
||||
group = f.create_group('{:03}'.format(z))
|
||||
|
||||
# Read data into one long array
|
||||
path = os.path.join('G4EMLOW6.48', 'doppler', 'profile-{}.dat'.format(z))
|
||||
with open(path, 'r') as profile:
|
||||
j = np.fromstring(profile.read(), sep=' ')
|
||||
|
||||
# Determine number of electron shells and reshape. Profiles are
|
||||
# tabulated against a grid of 31 momentum values.
|
||||
n_shells = j.size // 31
|
||||
j.shape = (n_shells, 31)
|
||||
|
||||
# Write Compton profile for this Z
|
||||
group.create_dataset('J', data=j)
|
||||
|
||||
# Determine binding energies and number of electrons for each shell
|
||||
num_electrons = []
|
||||
binding_energy = []
|
||||
while True:
|
||||
words = shell.readline().split()
|
||||
if words[0] == '-1':
|
||||
break
|
||||
num_electrons.append(float(words[0]))
|
||||
binding_energy.append(float(words[1]))
|
||||
|
||||
# Write binding energies and number of electrons
|
||||
group.create_dataset('num_electrons', data=num_electrons)
|
||||
group.create_dataset('binding_energy', data=binding_energy)
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
from urllib.parse import urlencode
|
||||
from urllib.request import urlopen
|
||||
from lxml import html
|
||||
|
||||
import numpy as np
|
||||
import h5py
|
||||
from openmc.data import ATOMIC_SYMBOL
|
||||
|
||||
|
||||
base_url = 'https://physics.nist.gov/cgi-bin/Star/e_table-t.pl'
|
||||
energies = np.logspace(-3, 3, 200)
|
||||
data = {'matno': '', 'Energies': '\n'.join(str(x) for x in energies)}
|
||||
columns = {1: 's_collision', 2: 's_radiative'}
|
||||
|
||||
# ==============================================================================
|
||||
# SCRAPE DATA FROM ESTAR SITE AND GENERATE STOPPING POWER HDF5 FILE
|
||||
|
||||
print('Generating stopping_powers.h5...')
|
||||
|
||||
with h5py.File('stopping_powers.h5', 'w') as f:
|
||||
|
||||
# Write energies
|
||||
f.create_dataset('energy', data=energies)
|
||||
|
||||
# Look over atomic number; ESTAR only goes up to Z=98 (Californium)
|
||||
for Z in range(1, 99):
|
||||
print('Processing {} data...'.format(ATOMIC_SYMBOL[Z]))
|
||||
|
||||
# Update form-encoded data to send in POST request for this element
|
||||
data['matno'] = '{:03}'.format(Z)
|
||||
payload = urlencode(data).encode("utf-8")
|
||||
|
||||
# Retrieve data from ESTAR site
|
||||
with urlopen(url=base_url, data=payload) as response:
|
||||
r = response.read()
|
||||
|
||||
# Remove text and reformat data -- omit first 12 and last 5 lines to get
|
||||
# only data in table
|
||||
r = html.fromstring(r).xpath('//pre//text()')
|
||||
values = np.fromstring(' '.join(r[12:-5]), sep=' ').reshape((-1, 5)).T
|
||||
|
||||
# Create group for this element
|
||||
group = f.create_group('{:03}'.format(Z))
|
||||
|
||||
# Write the mean excitation energy
|
||||
attributes = np.fromstring(r[3], sep=' ')
|
||||
group.attrs['I'] = attributes[2]
|
||||
|
||||
# Write collision and radiative stopping powers
|
||||
for i in columns:
|
||||
group.create_dataset(columns[i], data=values[i])
|
||||
Loading…
Add table
Add a link
Reference in a new issue