Skip to content

Commit cc98ca8

Browse files
committed
moved repo from openmc-data-storage
0 parents  commit cc98ca8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+253277
-0
lines changed

.gitignore

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
131+
# dagmc files
132+
*.h5m
133+
134+
# version file
135+
_version.py
136+
137+
138+
139+
*~
140+
*.tar.*
141+
*.tgz
142+
*.zip
143+
mcnp_endfb70/
144+
mcnp_endfb71/
145+
*.h5
146+
147+
# standard output folders produced by data scripts
148+
*-ace/
149+
*-endf/
150+
*-hdf5/
151+
*-download/
152+
tendl_rand/
153+
154+
# output folders made when generating chaain file, these should be standardised
155+
decay/
156+
neutrons/
157+
nfy/

LICENSE

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Copyright (c) 2019-2022 UChicago Argonne LLC and contributors
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7+
the Software, and to permit persons to whom the Software is furnished to do so,
8+
subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
[![test_urls](https://github.com/shimwell/data/actions/workflows/test_urls.yml/badge.svg)](https://github.com/shimwell/data/actions/workflows/test_urls.yml)
2+
3+
[![test_package](https://github.com/openmc-data-storage/openmc_data/actions/workflows/test_package.yml/badge.svg)](https://github.com/openmc-data-storage/openmc_data/actions/workflows/test_package.yml)
4+
5+
[![test_convert_scripts](https://github.com/openmc-data-storage/openmc_data/actions/workflows/test_processing.yml/badge.svg)](https://github.com/openmc-data-storage/openmc_data/actions/workflows/test_processing.yml)
6+
7+
8+
# OpenMC Data Scripts
9+
10+
This repository contains a collection of scripts for generating HDF5 data
11+
libraries and xml chain files that can be used with OpenMC. Some of these
12+
scripts convert existing ACE libraries (such as those produced by LANL) whereas
13+
generate scripts use NJOY to process ENDF files directly.
14+
15+
Another source of data libraries for OpenMC is the [Windowed Multipole Library](https://github.com/mit-crpg/WMP_Library) repository which enables on-the-fly Doppler broadening to an arbitrary temperature.
16+
17+
# Prerequisites
18+
19+
You should have already installed OpenMC, see the [docs](https://docs.openmc.org/en/stable/quickinstall.html) for installation instructions.
20+
21+
# Installation
22+
23+
Currently the package can be installed from this temporary repository.
24+
25+
```bash
26+
pip install openmc_data
27+
```
28+
29+
# Usage
30+
31+
Once installed several scripts are available in your terminal that are able to
32+
download and process nuclear data.
33+
34+
The scripts accept input arguments, to find out the input arguments available
35+
for a particular script run the script name with ```--help``` after the name.
36+
For example:
37+
38+
```convert_endf --help```
39+
40+
Some scripts (mainly the generate scripts) require NJOY to be installed and
41+
added to your path.
42+
43+
A few categories of scripts are available:
44+
<ul>
45+
<li>Scripts that produce h5 cross section files:</li>
46+
<ul>
47+
<li>Convert ACE files to h5 files</li>
48+
<li>Generate h5 file from ENDF files</li>
49+
<li>Download h5 files</li>
50+
</ul>
51+
<li>Scripts that produce xml chain files:</li>
52+
<ul>
53+
<li>Generate xml chain files from ENDF files:</li>
54+
<li>Download xml chain files:</li>
55+
</ul>
56+
<li>Other scripts that don't fall into either category.</li>
57+
</ul>
58+
59+
## Produce Cross Section Files
60+
61+
### Convert cross sections
62+
63+
| Script name | Library | Release | Processed by |
64+
|-|-|-|-|
65+
|convert_mcnp70 | ENDF/B | VII.0 | LANL |
66+
|convert_mcnp71 | ENDF/B | VII.1 | LANL |
67+
|convert_endf | ENDF/B | VII.1 | NNDC |
68+
|convert_lib80x | ENDF/B | VIII.0 | LANL |
69+
|convert_fendl | FENDL | 3.2b<br>3.2a<br>3.2<br>3.1d<br>3.1a<br>3.1<br>3.0<br>2.1 |
70+
|convert_jeff32 | JEFF | 3.2 |
71+
|convert_jeff33 | JEFF | 3.3 |
72+
|convert_tendl | TENDL | 2015<br>2017<br>2019<br>2021 |
73+
74+
### Generate cross sections
75+
76+
| Script name | Library | Release | Processed by |
77+
|-|-|-|-|
78+
| generate_cendl | CENDL | 3.1<br>3.2 | |
79+
| generate_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
80+
| generate_fendl | FENDL | 3.2b<br>3.2a<br>3.2<br>3.1d<br>3.1a<br>3.0 | |
81+
| generate_jendl | JENDL | 4.0<br>5.0 | |
82+
83+
84+
### Download cross sections
85+
86+
| Script name | Library | Release | Processed by |
87+
|-|-|-|-|
88+
| download_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
89+
| download_tendl | TENDL | 2019<br>2021 | |
90+
91+
<!-- | Script name | Library | Release | Processed by | Download available | Downloads ACE files and convert to HDF5 | Downloads ENDF files and convert to HDF5 | Convert local ACE files |
92+
|-|-|-|-|-|-|-|-|
93+
|generate_cendl| CENDL | 3.1<br>3.2 | | | | :heavy_check_mark: | |
94+
|convert_mcnp70| ENDF/B | VII.0 | LANL | [openmc.org](https://anl.box.com/shared/static/t25g7g6v0emygu50lr2ych1cf6o7454b.xz) | | | :heavy_check_mark: |
95+
|convert_mcnp71| ENDF/B | VII.1 | LANL | [openmc.org](https://anl.box.com/shared/static/d359skd2w6wrm86om2997a1bxgigc8pu.xz) | | | :heavy_check_mark: |
96+
|generate_endf| ENDF/B | VII.1 | NNDC | [openmc.org](https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz) | | :heavy_check_mark: | |
97+
|convert_endf| ENDF/B | VII.1 | NNDC | [openmc.org](https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz) | :heavy_check_mark: | :heavy_check_mark: | |
98+
|convert_lib80x| ENDF/B | VIII.0 | LANL | [openmc.org](https://anl.box.com/shared/static/nd7p4jherolkx4b1rfaw5uqp58nxtstr.xz) | | | :heavy_check_mark: |
99+
|generate_endf| ENDF/B | VIII.0 | NNDC | [openmc.org](https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz) | | :heavy_check_mark: | |
100+
|convert_fendl| FENDL | 2.1<br>3.0<br>3.1a<br>3.1d<br>3.2 | | [openmc.org 3.2](https://anl.box.com/shared/static/3cb7jetw7tmxaw6nvn77x6c578jnm2ey.xz) | :heavy_check_mark: | | |
101+
|generate_jendl| JENDL | 4.0 | | | | :heavy_check_mark: | |
102+
|convert_jeff32| JEFF | 3.2 | | [openmc.org](https://anl.box.com/shared/static/pb94oxriiipezysu7w4r2qdoufc2epxv.xz) | :heavy_check_mark: | | |
103+
|convert_jeff33| JEFF | 3.3 | | [openmc.org](https://anl.box.com/shared/static/ddetxzp0gv1buk1ev67b8ynik7f268hw.xz) | :heavy_check_mark: | | |
104+
|convert_tendl| TENDL | 2015<br>2017<br>2019<br>2021| | | :heavy_check_mark: | | | -->
105+
106+
## Produce Depletion Chain files
107+
108+
### Generate chain files
109+
110+
| Script name | Library | Release |
111+
|-|-|-|
112+
|generate_endf_chain | ENDF/B | VII.1<br>VIII.0 |
113+
|generate_jeff_chain | JEFF | 3.3 |
114+
|generate_serpent_fissq | | |
115+
|generate_tendl_chain | TENDL | 2019<br>2021 |
116+
|generate_endf71_chain_casl | ENDF/B | |
117+
118+
### Download chain files
119+
120+
| Script name | Library | Release | Branching options|
121+
|-|-|-|-|
122+
|download_endf_chain | ENDF/B | VII.1<br>VIII.0 | None<br>SFR<br>PWR
123+
124+
<!-- | Sctipt name | Library | Release | Download available | Download ENDF files and generates XML chain files |
125+
|-|-|-|-|-|
126+
|generate_endf71_chain_casl|ENDF/B|-|[https://github.com/openmc-dev/data/tree/master/depletion](https://github.com/openmc-dev/data/tree/master/depletion)|:heavy_check_mark:|
127+
|generate_endf_chain|ENDF/B|-|[https://github.com/openmc-dev/data/tree/master/depletion](https://github.com/openmc-dev/data/tree/master/depletion)|:heavy_check_mark:|
128+
|generate_serpent_fissq|-|-|[https://github.com/openmc-dev/data/tree/master/depletion](https://github.com/openmc-dev/data/tree/master/depletion)|:heavy_check_mark:|
129+
|generate_tendl_chain|TENDL|2019<br>2021|[https://github.com/openmc-dev/data/tree/master/depletion](https://github.com/openmc-dev/data/tree/master/depletion)|:heavy_check_mark:| -->
130+
131+
## Other scripts
132+
133+
| Script name | Description |
134+
|-|-|
135+
| convert_tendl_rand | Download random TENDL libraries from PSI and convert it to a HDF5 library for use with OpenMC. Only certain nuclides are available from PSI. This script generates a cross_sections_tendl.xml file with random TENDL evaluations plus a standard library located in 'OPENMC_CROSS_SECTIONS' |
136+
| sample_sandy | This scripts generates random (gaussian) evaluations of a nuclear data file following its covariance matrix using SANDY, and converts them to HDF5 for use in OpenMC. Script generates a cross_sections_sandy.xml file with the standard library plus the sampled evaluations. |
137+
| make_compton | |
138+
| make_stopping_powers | |
139+
| add_branching_ratios | add branching ratios for n,gamma reactions to a preexisting chain files. |
140+
| reduce_chain | |
141+
| combine_libraries | Combines multiple cross_section.xml files into a single cross_section.xml. |

pyproject.toml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
[build-system]
2+
requires = [
3+
"setuptools >= 65.5.0",
4+
"setuptools_scm[toml] >= 7.0.5",
5+
]
6+
build-backend = "setuptools.build_meta"
7+
8+
9+
[project]
10+
name = "openmc_data"
11+
authors = [
12+
{ name="Jonathan Shimwell", email="[email protected]" },
13+
]
14+
license = {file = "LICENSE"}
15+
description = "A Python package containing a collection of scripts for producing and downloading data for OpenMC"
16+
readme = "README.md"
17+
requires-python = ">=3.8"
18+
keywords = ["openmc", "nuclear", "data", "download", "process", "cross", "section"]
19+
classifiers = [
20+
"Programming Language :: Python :: 3",
21+
"License :: OSI Approved :: MIT License",
22+
"Operating System :: OS Independent",
23+
]
24+
dependencies = [
25+
"numpy>=1.21.1",
26+
]
27+
dynamic = ["version"]
28+
29+
30+
[tool.setuptools_scm]
31+
write_to = "src/openmc_data/_version.py"
32+
33+
34+
[project.optional-dependencies]
35+
tests = [
36+
"pytest",
37+
"requests"
38+
]
39+
40+
[project.urls]
41+
"Homepage" = "https://github.com/fusion-energy/openmc_data"
42+
"Bug Tracker" = "https://github.com/fusion-energy/openmc_data/issues"
43+
44+
[tool.setuptools]
45+
package-dir = {"" = "src"}
46+
47+
[project.scripts]
48+
convert_fendl = "openmc_data.convert.convert_fendl:main"
49+
convert_jeff32 = "openmc_data.convert.convert_jeff32:main"
50+
convert_jeff33 = "openmc_data.convert.convert_jeff33:main"
51+
convert_lib80x = "openmc_data.convert.convert_lib80x:main"
52+
convert_mcnp70 = "openmc_data.convert.convert_mcnp70:main"
53+
convert_mcnp71 = "openmc_data.convert.convert_mcnp71:main"
54+
convert_endf = "openmc_data.convert.convert_endf:main"
55+
convert_tendl = "openmc_data.convert.convert_tendl:main"
56+
57+
generate_cendl = "openmc_data.generate.generate_cendl:main"
58+
generate_endf = "openmc_data.generate.generate_endf:main"
59+
generate_jeff33 = "openmc_data.generate.generate_jeff33:main"
60+
generate_jendl = "openmc_data.generate.generate_jendl:main"
61+
generate_fendl = "openmc_data.generate.generate_fendl:main"
62+
63+
generate_endf71_chain_casl = "openmc_data.depletion.generate_endf71_chain_casl:main"
64+
generate_endf_chain = "openmc_data.depletion.generate_endf_chain:main"
65+
generate_jeff_chain = "openmc_data.depletion.generate_jeff_chain:main"
66+
generate_serpent_fissq = "openmc_data.depletion.generate_serpent_fissq:main"
67+
generate_tendl_chain = "openmc_data.depletion.generate_tendl_chain:main"
68+
69+
convert_tendl_rand = "openmc_data.other.convert_tendl_rand:main"
70+
make_compton = "openmc_data.other.make_compton:main"
71+
make_stopping_powers = "openmc_data.other.make_stopping_powers:main"
72+
add_branching_ratios = "openmc_data.depletion.add_branching_ratios:main"
73+
combine_libraries = "openmc_data.other.combine_libraries:main"
74+
sample_sandy = "openmc_data.other.sample_sandy:main"
75+
reduce_chain = "openmc_data.depletion.reduce_chain:main"
76+
77+
download_endf = "openmc_data.download.download_endf:main"
78+
download_tendl = "openmc_data.download.download_tendl:main"
79+
download_endf_chain = "openmc_data.download.download_endf_chain:main"

0 commit comments

Comments
 (0)