openmc-data 0.1.3__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openmc_data-0.1.3 → openmc_data-0.2.0}/.github/workflows/python-publish.yml +2 -2
- {openmc_data-0.1.3 → openmc_data-0.2.0}/.github/workflows/test_package.yml +3 -3
- {openmc_data-0.1.3 → openmc_data-0.2.0}/.github/workflows/test_processing.yml +13 -13
- {openmc_data-0.1.3 → openmc_data-0.2.0}/PKG-INFO +7 -9
- {openmc_data-0.1.3 → openmc_data-0.2.0}/README.md +6 -8
- {openmc_data-0.1.3 → openmc_data-0.2.0}/pyproject.toml +3 -3
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/__init__.py +1 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/_version.py +2 -2
- openmc_data-0.1.3/src/openmc_data/convert/convert_nndc71.py → openmc_data-0.2.0/src/openmc_data/convert/convert_endf.py +2 -2
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/generate_endf_chain.py +7 -36
- openmc_data-0.2.0/src/openmc_data/depletion/generate_tendl_chain.py +170 -0
- openmc_data-0.1.3/src/openmc_data/download/download_nndc.py → openmc_data-0.2.0/src/openmc_data/download/download_endf.py +7 -7
- openmc_data-0.1.3/src/openmc_data/download/download_nndc_chain.py → openmc_data-0.2.0/src/openmc_data/download/download_endf_chain.py +1 -1
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/generate/generate_jendl.py +8 -8
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/other/sample_sandy.py +2 -2
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/urls.py +11 -1
- openmc_data-0.2.0/src/openmc_data/urls_chain.py +58 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/urls_h5.py +1 -1
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/urls_xml.py +1 -1
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data.egg-info/PKG-INFO +7 -9
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data.egg-info/SOURCES.txt +4 -3
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data.egg-info/entry_points.txt +3 -3
- openmc_data-0.1.3/src/openmc_data/depletion/generate_tendl_chain.py +0 -147
- {openmc_data-0.1.3 → openmc_data-0.2.0}/.github/workflows/test_urls.yml +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/.gitignore +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/LICENSE +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/setup.cfg +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/convert/__init__.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/convert/convert_fendl.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/convert/convert_jeff32.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/convert/convert_jeff33.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/convert/convert_lib80x.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/convert/convert_mcnp70.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/convert/convert_mcnp71.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/convert/convert_tendl.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/__init__.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/add_branching_ratios.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/branching_ratios_pwr.json +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/branching_ratios_sfr.json +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/casl_chain.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/chain-nndc-b7.1.xml +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/chain_casl_pwr.xml +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/chain_casl_sfr.xml +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/chain_endf_vii.1.xml +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/chain_endf_viii.0.xml +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/chain_endfb71_pwr.xml +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/chain_endfb71_sfr.xml +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/generate_endf71_chain_casl.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/generate_serpent_fissq.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/reduce_chain.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/serpent_fissq.json +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/tendl2019_nuclides.json +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/tendl2021_nuclides.json +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/download/__init__.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/generate/__init__.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/generate/generate_cendl.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/generate/generate_endf.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/generate/generate_jeff33.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/other/__init__.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/other/combine_libraries.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/other/convert_tendl_rand.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/other/make_compton.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/other/make_stopping_powers.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/utils.py +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data.egg-info/dependency_links.txt +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data.egg-info/requires.txt +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data.egg-info/top_level.txt +0 -0
- {openmc_data-0.1.3 → openmc_data-0.2.0}/tests/test_urls.py +0 -0
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
convert_lib80x --help
|
|
47
47
|
convert_mcnp70 --help
|
|
48
48
|
convert_mcnp71 --help
|
|
49
|
-
|
|
49
|
+
convert_endf --help
|
|
50
50
|
convert_tendl --help
|
|
51
51
|
|
|
52
52
|
- name: Test generate scripts exist
|
|
@@ -58,11 +58,11 @@ jobs:
|
|
|
58
58
|
|
|
59
59
|
- name: Test download h5 scripts exist
|
|
60
60
|
run: |
|
|
61
|
-
|
|
61
|
+
download_endf --help
|
|
62
62
|
|
|
63
63
|
- name: Test download chain files scripts exist
|
|
64
64
|
run: |
|
|
65
|
-
|
|
65
|
+
download_endf_chain --help
|
|
66
66
|
|
|
67
67
|
- name: Test other scripts exist
|
|
68
68
|
run: |
|
|
@@ -72,11 +72,11 @@ jobs:
|
|
|
72
72
|
echo "convert_jeff33.py file has been modified."
|
|
73
73
|
convert_jeff33 -r 3.3 -t 293 --cleanup
|
|
74
74
|
|
|
75
|
-
- name: test default
|
|
76
|
-
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/convert/
|
|
75
|
+
- name: test default convert_endf
|
|
76
|
+
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/convert/convert_endf.py')
|
|
77
77
|
run: |
|
|
78
|
-
echo "
|
|
79
|
-
|
|
78
|
+
echo "convert_endf.py file has been modified."
|
|
79
|
+
convert_endf --cleanup
|
|
80
80
|
|
|
81
81
|
- name: test default convert_tendl
|
|
82
82
|
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/convert/convert_tendl.py')
|
|
@@ -91,15 +91,15 @@ jobs:
|
|
|
91
91
|
convert_tendl_rand --nuclides O16 --cleanup
|
|
92
92
|
|
|
93
93
|
# download scripts
|
|
94
|
-
- name: test default
|
|
95
|
-
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/download/
|
|
94
|
+
- name: test default download_endf
|
|
95
|
+
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/download/download_endf.py')
|
|
96
96
|
run: |
|
|
97
|
-
echo "
|
|
98
|
-
|
|
97
|
+
echo "download_endf.py file has been modified."
|
|
98
|
+
download_endf
|
|
99
99
|
|
|
100
|
-
- name: test default
|
|
101
|
-
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/download/
|
|
100
|
+
- name: test default download_endf_chain
|
|
101
|
+
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/download/download_endf_chain.py')
|
|
102
102
|
run: |
|
|
103
|
-
echo "
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
echo "download_endf_chain.py file has been modified."
|
|
104
|
+
download_endf_chain -r b7.1
|
|
105
|
+
download_endf_chain -r b8.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: openmc_data
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A Python package containing a collection of scripts for producing and downloading data for OpenMC
|
|
5
5
|
Author-email: Jonathan Shimwell <mail@jshimwell.com>
|
|
6
6
|
License: Copyright (c) 2019-2022 UChicago Argonne LLC and contributors
|
|
@@ -61,8 +61,6 @@ Currently the package can be installed from this temporary repository.
|
|
|
61
61
|
pip install openmc_data
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
In the future pip installing from PyPi or Conda could be provided
|
|
65
|
-
|
|
66
64
|
# Usage
|
|
67
65
|
|
|
68
66
|
Once installed several scripts are available in your terminal that are able to
|
|
@@ -72,7 +70,7 @@ The scripts accept input arguments, to find out the input arguments available
|
|
|
72
70
|
for a particular script run the script name with ```--help``` after the name.
|
|
73
71
|
For example:
|
|
74
72
|
|
|
75
|
-
```
|
|
73
|
+
```convert_endf --help```
|
|
76
74
|
|
|
77
75
|
Some scripts (mainly the generate scripts) require NJOY to be installed and
|
|
78
76
|
added to your path.
|
|
@@ -101,7 +99,7 @@ A few categories of scripts are available:
|
|
|
101
99
|
|-|-|-|-|
|
|
102
100
|
|convert_mcnp70 | ENDF/B | VII.0 | LANL |
|
|
103
101
|
|convert_mcnp71 | ENDF/B | VII.1 | LANL |
|
|
104
|
-
|
|
|
102
|
+
|convert_endf | ENDF/B | VII.1 | NNDC |
|
|
105
103
|
|convert_lib80x | ENDF/B | VIII.0 | LANL |
|
|
106
104
|
|convert_fendl | FENDL | 2.1<br>3.0<br>3.1a<br>3.1d<br>3.2|
|
|
107
105
|
|convert_jeff32 | JEFF | 3.2 |
|
|
@@ -114,13 +112,13 @@ A few categories of scripts are available:
|
|
|
114
112
|
|-|-|-|-|
|
|
115
113
|
| generate_cendl | CENDL | 3.1<br>3.2 | |
|
|
116
114
|
| generate_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
|
|
117
|
-
| generate_jendl | JENDL | 4.0 | |
|
|
115
|
+
| generate_jendl | JENDL | 4.0<br>5.0 | |
|
|
118
116
|
|
|
119
117
|
### Download cross sections
|
|
120
118
|
|
|
121
119
|
| Script name | Library | Release | Processed by |
|
|
122
120
|
|-|-|-|-|
|
|
123
|
-
|
|
|
121
|
+
| download_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
|
|
124
122
|
|
|
125
123
|
<!-- | 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 |
|
|
126
124
|
|-|-|-|-|-|-|-|-|
|
|
@@ -128,7 +126,7 @@ A few categories of scripts are available:
|
|
|
128
126
|
|convert_mcnp70| ENDF/B | VII.0 | LANL | [openmc.org](https://anl.box.com/shared/static/t25g7g6v0emygu50lr2ych1cf6o7454b.xz) | | | :heavy_check_mark: |
|
|
129
127
|
|convert_mcnp71| ENDF/B | VII.1 | LANL | [openmc.org](https://anl.box.com/shared/static/d359skd2w6wrm86om2997a1bxgigc8pu.xz) | | | :heavy_check_mark: |
|
|
130
128
|
|generate_endf| ENDF/B | VII.1 | NNDC | [openmc.org](https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz) | | :heavy_check_mark: | |
|
|
131
|
-
|
|
|
129
|
+
|convert_endf| ENDF/B | VII.1 | NNDC | [openmc.org](https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz) | :heavy_check_mark: | :heavy_check_mark: | |
|
|
132
130
|
|convert_lib80x| ENDF/B | VIII.0 | LANL | [openmc.org](https://anl.box.com/shared/static/nd7p4jherolkx4b1rfaw5uqp58nxtstr.xz) | | | :heavy_check_mark: |
|
|
133
131
|
|generate_endf| ENDF/B | VIII.0 | NNDC | [openmc.org](https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz) | | :heavy_check_mark: | |
|
|
134
132
|
|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: | | |
|
|
@@ -152,7 +150,7 @@ A few categories of scripts are available:
|
|
|
152
150
|
|
|
153
151
|
| Script name | Library | Release | Processed by |
|
|
154
152
|
|-|-|-|-|
|
|
155
|
-
|
|
|
153
|
+
|download_endf_chain | ENDF/B | VII.1<br>VIII.0 | NNDC |
|
|
156
154
|
|
|
157
155
|
<!-- | Sctipt name | Library | Release | Download available | Download ENDF files and generates XML chain files |
|
|
158
156
|
|-|-|-|-|-|
|
|
@@ -26,8 +26,6 @@ Currently the package can be installed from this temporary repository.
|
|
|
26
26
|
pip install openmc_data
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
In the future pip installing from PyPi or Conda could be provided
|
|
30
|
-
|
|
31
29
|
# Usage
|
|
32
30
|
|
|
33
31
|
Once installed several scripts are available in your terminal that are able to
|
|
@@ -37,7 +35,7 @@ The scripts accept input arguments, to find out the input arguments available
|
|
|
37
35
|
for a particular script run the script name with ```--help``` after the name.
|
|
38
36
|
For example:
|
|
39
37
|
|
|
40
|
-
```
|
|
38
|
+
```convert_endf --help```
|
|
41
39
|
|
|
42
40
|
Some scripts (mainly the generate scripts) require NJOY to be installed and
|
|
43
41
|
added to your path.
|
|
@@ -66,7 +64,7 @@ A few categories of scripts are available:
|
|
|
66
64
|
|-|-|-|-|
|
|
67
65
|
|convert_mcnp70 | ENDF/B | VII.0 | LANL |
|
|
68
66
|
|convert_mcnp71 | ENDF/B | VII.1 | LANL |
|
|
69
|
-
|
|
|
67
|
+
|convert_endf | ENDF/B | VII.1 | NNDC |
|
|
70
68
|
|convert_lib80x | ENDF/B | VIII.0 | LANL |
|
|
71
69
|
|convert_fendl | FENDL | 2.1<br>3.0<br>3.1a<br>3.1d<br>3.2|
|
|
72
70
|
|convert_jeff32 | JEFF | 3.2 |
|
|
@@ -79,13 +77,13 @@ A few categories of scripts are available:
|
|
|
79
77
|
|-|-|-|-|
|
|
80
78
|
| generate_cendl | CENDL | 3.1<br>3.2 | |
|
|
81
79
|
| generate_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
|
|
82
|
-
| generate_jendl | JENDL | 4.0 | |
|
|
80
|
+
| generate_jendl | JENDL | 4.0<br>5.0 | |
|
|
83
81
|
|
|
84
82
|
### Download cross sections
|
|
85
83
|
|
|
86
84
|
| Script name | Library | Release | Processed by |
|
|
87
85
|
|-|-|-|-|
|
|
88
|
-
|
|
|
86
|
+
| download_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
|
|
89
87
|
|
|
90
88
|
<!-- | 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 |
|
|
91
89
|
|-|-|-|-|-|-|-|-|
|
|
@@ -93,7 +91,7 @@ A few categories of scripts are available:
|
|
|
93
91
|
|convert_mcnp70| ENDF/B | VII.0 | LANL | [openmc.org](https://anl.box.com/shared/static/t25g7g6v0emygu50lr2ych1cf6o7454b.xz) | | | :heavy_check_mark: |
|
|
94
92
|
|convert_mcnp71| ENDF/B | VII.1 | LANL | [openmc.org](https://anl.box.com/shared/static/d359skd2w6wrm86om2997a1bxgigc8pu.xz) | | | :heavy_check_mark: |
|
|
95
93
|
|generate_endf| ENDF/B | VII.1 | NNDC | [openmc.org](https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz) | | :heavy_check_mark: | |
|
|
96
|
-
|
|
|
94
|
+
|convert_endf| ENDF/B | VII.1 | NNDC | [openmc.org](https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz) | :heavy_check_mark: | :heavy_check_mark: | |
|
|
97
95
|
|convert_lib80x| ENDF/B | VIII.0 | LANL | [openmc.org](https://anl.box.com/shared/static/nd7p4jherolkx4b1rfaw5uqp58nxtstr.xz) | | | :heavy_check_mark: |
|
|
98
96
|
|generate_endf| ENDF/B | VIII.0 | NNDC | [openmc.org](https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz) | | :heavy_check_mark: | |
|
|
99
97
|
|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: | | |
|
|
@@ -117,7 +115,7 @@ A few categories of scripts are available:
|
|
|
117
115
|
|
|
118
116
|
| Script name | Library | Release | Processed by |
|
|
119
117
|
|-|-|-|-|
|
|
120
|
-
|
|
|
118
|
+
|download_endf_chain | ENDF/B | VII.1<br>VIII.0 | NNDC |
|
|
121
119
|
|
|
122
120
|
<!-- | Sctipt name | Library | Release | Download available | Download ENDF files and generates XML chain files |
|
|
123
121
|
|-|-|-|-|-|
|
|
@@ -51,7 +51,7 @@ convert_jeff33 = "openmc_data.convert.convert_jeff33:main"
|
|
|
51
51
|
convert_lib80x = "openmc_data.convert.convert_lib80x:main"
|
|
52
52
|
convert_mcnp70 = "openmc_data.convert.convert_mcnp70:main"
|
|
53
53
|
convert_mcnp71 = "openmc_data.convert.convert_mcnp71:main"
|
|
54
|
-
|
|
54
|
+
convert_endf = "openmc_data.convert.convert_endf:main"
|
|
55
55
|
convert_tendl = "openmc_data.convert.convert_tendl:main"
|
|
56
56
|
generate_cendl = "openmc_data.generate.generate_cendl:main"
|
|
57
57
|
generate_endf = "openmc_data.generate.generate_endf:main"
|
|
@@ -68,5 +68,5 @@ add_branching_ratios = "openmc_data.depletion.add_branching_ratios:main"
|
|
|
68
68
|
combine_libraries = "openmc_data.other.combine_libraries:main"
|
|
69
69
|
sample_sandy = "openmc_data.other.sample_sandy:main"
|
|
70
70
|
reduce_chain = "openmc_data.depletion.reduce_chain:main"
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
download_endf = "openmc_data.download.download_endf:main"
|
|
72
|
+
download_endf_chain = "openmc_data.download.download_endf_chain:main"
|
|
@@ -29,7 +29,7 @@ parser.add_argument(
|
|
|
29
29
|
"-d",
|
|
30
30
|
"--destination",
|
|
31
31
|
type=Path,
|
|
32
|
-
default="
|
|
32
|
+
default="endf-b7.1-hdf5",
|
|
33
33
|
help="Directory to create new library in",
|
|
34
34
|
)
|
|
35
35
|
parser.add_argument(
|
|
@@ -81,7 +81,7 @@ args = parser.parse_args()
|
|
|
81
81
|
|
|
82
82
|
def main():
|
|
83
83
|
|
|
84
|
-
library_name = "
|
|
84
|
+
library_name = "endf"
|
|
85
85
|
release = "b7.1"
|
|
86
86
|
|
|
87
87
|
cwd = Path.cwd()
|
|
@@ -8,15 +8,15 @@ from urllib.parse import urljoin
|
|
|
8
8
|
import openmc.deplete
|
|
9
9
|
|
|
10
10
|
from openmc_data.utils import download, extract
|
|
11
|
-
|
|
11
|
+
from openmc_data import all_decay_release_details
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
# Parse command line arguments
|
|
15
15
|
parser = ArgumentParser()
|
|
16
|
-
parser.add_argument('-r', '--release', choices=['
|
|
17
|
-
default='
|
|
18
|
-
"version. The currently supported options are
|
|
19
|
-
"
|
|
16
|
+
parser.add_argument('-r', '--release', choices=['b7.1', 'b8.0'],
|
|
17
|
+
default='b8.0', help="The nuclear data library release "
|
|
18
|
+
"version. The currently supported options are n7.1, "
|
|
19
|
+
"b8.0")
|
|
20
20
|
parser.add_argument(
|
|
21
21
|
"-d",
|
|
22
22
|
"--destination",
|
|
@@ -43,39 +43,9 @@ def main():
|
|
|
43
43
|
|
|
44
44
|
# This dictionary contains all the unique information about each release.
|
|
45
45
|
# This can be extended to accommodated new releases
|
|
46
|
-
release_details = {
|
|
47
|
-
'vii.1': {
|
|
48
|
-
'neutron': {
|
|
49
|
-
'base_url': ['https://www.nndc.bnl.gov/endf-b7.1/zips/'],
|
|
50
|
-
'compressed_files': ['ENDF-B-VII.1-neutrons.zip'],
|
|
51
|
-
},
|
|
52
|
-
'decay': {
|
|
53
|
-
'base_url': ['https://www.nndc.bnl.gov/endf-b7.1/zips/'],
|
|
54
|
-
'compressed_files': ['ENDF-B-VII.1-decay.zip']
|
|
55
|
-
},
|
|
56
|
-
'nfy': {
|
|
57
|
-
'base_url': ['https://www.nndc.bnl.gov/endf-b7.1/zips/'],
|
|
58
|
-
'compressed_files': ['ENDF-B-VII.1-nfy.zip']
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
'viii.0': {
|
|
62
|
-
'neutron': {
|
|
63
|
-
'base_url': ['https://www.nndc.bnl.gov/endf-b8.0/zips/'],
|
|
64
|
-
'compressed_files': ['ENDF-B-VIII.0_neutrons.zip'],
|
|
65
|
-
},
|
|
66
|
-
'decay': {
|
|
67
|
-
'base_url': ['https://www.nndc.bnl.gov/endf-b8.0/zips/'],
|
|
68
|
-
'compressed_files': ['ENDF-B-VIII.0_decay.zip']
|
|
69
|
-
},
|
|
70
|
-
'nfy': {
|
|
71
|
-
'base_url': ['https://www.nndc.bnl.gov/endf-b8.0/zips/'],
|
|
72
|
-
'compressed_files': ['ENDF-B-VIII.0_nfy.zip']
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
46
|
|
|
77
47
|
for file_type, extract_dir in zip(['neutron', 'decay', 'nfy'], [neutron_dir, decay_dir, nfy_dir]):
|
|
78
|
-
details =
|
|
48
|
+
details = all_decay_release_details[library_name][args.release][file_type]
|
|
79
49
|
for base_url, file in zip(details['base_url'], details['compressed_files']):
|
|
80
50
|
downloaded_file = download(
|
|
81
51
|
url=urljoin(base_url, file),
|
|
@@ -107,5 +77,6 @@ def main():
|
|
|
107
77
|
chain.export_to_xml(args.destination)
|
|
108
78
|
print(f'Chain file written to {args.destination}')
|
|
109
79
|
|
|
80
|
+
|
|
110
81
|
if __name__ == '__main__':
|
|
111
82
|
main()
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Generate a depletion chain based on TENDL 2019 data. Note that TENDL 2019 does
|
|
5
|
+
not contain any decay or fission product yield (FPY) sublibraries, so these must
|
|
6
|
+
be borrowed from another library. The --lib flag for this script indicates what
|
|
7
|
+
library should be used for decay and FPY evaluations and defaults to JEFF 3.3.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
from argparse import ArgumentParser
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
from urllib.parse import urljoin
|
|
14
|
+
import openmc_data
|
|
15
|
+
|
|
16
|
+
import openmc.data
|
|
17
|
+
import openmc.deplete as dep
|
|
18
|
+
|
|
19
|
+
from openmc_data.utils import download, extract
|
|
20
|
+
from openmc_data import all_decay_release_details
|
|
21
|
+
|
|
22
|
+
# Parse command line arguments
|
|
23
|
+
parser = ArgumentParser()
|
|
24
|
+
parser.add_argument(
|
|
25
|
+
"--lib",
|
|
26
|
+
choices=("jeff33", "endf80"),
|
|
27
|
+
default="jeff33",
|
|
28
|
+
help="Library to use for decay and fission product yields",
|
|
29
|
+
)
|
|
30
|
+
parser.add_argument(
|
|
31
|
+
"-r",
|
|
32
|
+
"--release",
|
|
33
|
+
choices=["2015", "2017", "2019", "2021"],
|
|
34
|
+
default="2021",
|
|
35
|
+
help="The nuclear data library release "
|
|
36
|
+
"version. The currently supported options are 2019, "
|
|
37
|
+
"and 2021.",
|
|
38
|
+
)
|
|
39
|
+
parser.add_argument(
|
|
40
|
+
"-d",
|
|
41
|
+
"--destination",
|
|
42
|
+
type=Path,
|
|
43
|
+
default=None,
|
|
44
|
+
help="filename of the chain file xml file produced. If left as None then "
|
|
45
|
+
"the filename will follow this format 'chain_tendl_{release}_{lib}.xml'",
|
|
46
|
+
)
|
|
47
|
+
parser.add_argument("--extract", action="store_true", help="Extract tar/zip files")
|
|
48
|
+
parser.add_argument(
|
|
49
|
+
"--no-extract",
|
|
50
|
+
dest="extract",
|
|
51
|
+
action="store_false",
|
|
52
|
+
help="Do not extract tar/zip files",
|
|
53
|
+
)
|
|
54
|
+
parser.set_defaults(extract=True)
|
|
55
|
+
args = parser.parse_args()
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def fix_jeff33_nfy(path):
|
|
59
|
+
print(f"Fixing TPID in {path.name}...")
|
|
60
|
+
new_path = path.with_name(path.name + "_fixed")
|
|
61
|
+
if not new_path.exists():
|
|
62
|
+
with path.open("r") as f:
|
|
63
|
+
data = f.read()
|
|
64
|
+
with new_path.open("w") as f:
|
|
65
|
+
# Write missing TPID line
|
|
66
|
+
f.write(" " * 66 + " 1 0 0 0\n")
|
|
67
|
+
f.write(data)
|
|
68
|
+
return new_path
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def main():
|
|
72
|
+
|
|
73
|
+
library_name = "tendl"
|
|
74
|
+
|
|
75
|
+
cwd = Path.cwd()
|
|
76
|
+
|
|
77
|
+
endf_files_dir = cwd.joinpath("-".join([library_name, args.release, "endf"]))
|
|
78
|
+
download_path = cwd.joinpath("-".join([library_name, args.release, "download"]))
|
|
79
|
+
|
|
80
|
+
neutron_dir = endf_files_dir / "neutron"
|
|
81
|
+
decay_dir = endf_files_dir / "decay"
|
|
82
|
+
nfy_dir = endf_files_dir / "nfy"
|
|
83
|
+
|
|
84
|
+
# This dictionary contains all the unique information about each release.
|
|
85
|
+
# This can be extended to accommodated new releases
|
|
86
|
+
release_details = all_decay_release_details["tendl"][args.release]
|
|
87
|
+
|
|
88
|
+
# adds in either jeff or endf neutron fission yields and decay data
|
|
89
|
+
if args.lib == "jeff33":
|
|
90
|
+
release_details["decay"] = {
|
|
91
|
+
"base_url": "https://www.oecd-nea.org/dbdata/jeff/jeff33/downloads/",
|
|
92
|
+
"compressed_files": ["JEFF33-rdd.zip"],
|
|
93
|
+
}
|
|
94
|
+
release_details["nfy"] = {
|
|
95
|
+
"base_url": "https://www.oecd-nea.org/dbdata/jeff/jeff33/downloads/",
|
|
96
|
+
"compressed_files": ["JEFF33-nfy.asc"],
|
|
97
|
+
}
|
|
98
|
+
elif args.lib == "endf80":
|
|
99
|
+
release_details["decay"] = {
|
|
100
|
+
"base_url": "https://www.nndc.bnl.gov/endf-b8.0/zips/",
|
|
101
|
+
"compressed_files": ["ENDF-B-VIII.0_decay.zip"],
|
|
102
|
+
}
|
|
103
|
+
release_details["nfy"] = {
|
|
104
|
+
"base_url": "https://www.nndc.bnl.gov/endf-b8.0/zips/",
|
|
105
|
+
"compressed_files": ["ENDF-B-VIII.0_nfy.zip"],
|
|
106
|
+
}
|
|
107
|
+
else:
|
|
108
|
+
raise ValueError(
|
|
109
|
+
f"lib argument must be either jeff33 or endf80 and can not be {args.lib}"
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
# ==========================================================================
|
|
113
|
+
# Incident neutron data
|
|
114
|
+
for f in release_details["neutron"]["compressed_files"]:
|
|
115
|
+
downloaded_file = download(
|
|
116
|
+
url=urljoin(release_details["neutron"]["base_url"], f),
|
|
117
|
+
output_path=download_path,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
extract(downloaded_file, neutron_dir)
|
|
121
|
+
|
|
122
|
+
neutron_files = [
|
|
123
|
+
p
|
|
124
|
+
for p in list(neutron_dir.rglob("*.tendl"))
|
|
125
|
+
]
|
|
126
|
+
print(neutron_files)
|
|
127
|
+
# ==========================================================================
|
|
128
|
+
# Decay and fission product yield data
|
|
129
|
+
|
|
130
|
+
decay_zip = download(
|
|
131
|
+
urljoin(
|
|
132
|
+
release_details["decay"]["base_url"],
|
|
133
|
+
release_details["decay"]["compressed_files"][0],
|
|
134
|
+
),
|
|
135
|
+
output_path=decay_dir,
|
|
136
|
+
)
|
|
137
|
+
nfy_zip = download(
|
|
138
|
+
urljoin(
|
|
139
|
+
release_details["nfy"]["base_url"],
|
|
140
|
+
release_details["nfy"]["compressed_files"][0],
|
|
141
|
+
),
|
|
142
|
+
output_path=nfy_dir,
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
extract(decay_zip, decay_dir)
|
|
146
|
+
|
|
147
|
+
if args.lib == "jeff33":
|
|
148
|
+
nfy_file = nfy_zip # file is already uncompressed
|
|
149
|
+
decay_files = list(decay_dir.glob("*.ASC"))
|
|
150
|
+
nfy_file_fixed = fix_jeff33_nfy(nfy_file)
|
|
151
|
+
nfy_files = openmc.data.endf.get_evaluations(nfy_file_fixed)
|
|
152
|
+
|
|
153
|
+
elif args.lib == "endf80":
|
|
154
|
+
decay_files = list(decay_dir.rglob("*.endf"))
|
|
155
|
+
extract(nfy_zip, nfy_dir)
|
|
156
|
+
nfy_files = list(nfy_dir.rglob("*.endf"))
|
|
157
|
+
|
|
158
|
+
chain = dep.Chain.from_endf(
|
|
159
|
+
decay_files, nfy_files, neutron_files, reactions=dep.chain.REACTIONS.keys()
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
if args.destination is None:
|
|
163
|
+
args.destination = f"chain_{library_name}_{args.release}_{args.lib}.xml"
|
|
164
|
+
|
|
165
|
+
chain.export_to_xml(args.destination)
|
|
166
|
+
print(f"Chain file written to {args.destination}")
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
if __name__ == "__main__":
|
|
170
|
+
main()
|
|
@@ -66,15 +66,15 @@ args = parser.parse_args()
|
|
|
66
66
|
|
|
67
67
|
def main():
|
|
68
68
|
|
|
69
|
-
library_name = '
|
|
69
|
+
library_name = 'endf'
|
|
70
70
|
details = all_h5_release_details[library_name][args.release]["neutron-photon"]
|
|
71
71
|
|
|
72
|
-
cwd = Path.cwd()
|
|
73
|
-
|
|
74
|
-
download_path = cwd.joinpath("-".join([library_name, args.release, "download"]))
|
|
75
|
-
|
|
76
72
|
if args.destination is None:
|
|
77
|
-
|
|
73
|
+
download_path = Path("-".join([library_name, args.release, "download"]))
|
|
74
|
+
destination = Path("-".join([library_name, args.release, "hdf5"]))
|
|
75
|
+
else:
|
|
76
|
+
download_path = args.destination / Path("-".join([library_name, args.release, "download"]))
|
|
77
|
+
destination = args.destination / Path("-".join([library_name, args.release, "hdf5"]))
|
|
78
78
|
|
|
79
79
|
if args.download:
|
|
80
80
|
state_download_size(
|
|
@@ -92,7 +92,7 @@ def main():
|
|
|
92
92
|
compressed_files=[
|
|
93
93
|
download_path / f for f in details["compressed_files"]
|
|
94
94
|
],
|
|
95
|
-
extraction_dir=
|
|
95
|
+
extraction_dir=destination,
|
|
96
96
|
del_compressed_file=args.cleanup,
|
|
97
97
|
)
|
|
98
98
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
|
|
3
3
|
"""
|
|
4
|
-
Download JENDL
|
|
4
|
+
Download JENDL data from JAEA and convert it to a HDF5 library for
|
|
5
5
|
use with OpenMC.
|
|
6
6
|
"""
|
|
7
7
|
|
|
@@ -38,9 +38,9 @@ parser.add_argument('--libver', choices=['earliest', 'latest'],
|
|
|
38
38
|
default='latest', help="Output HDF5 versioning. Use "
|
|
39
39
|
"'earliest' for backwards compatibility or 'latest' for "
|
|
40
40
|
"performance")
|
|
41
|
-
parser.add_argument('-r', '--release', choices=['4.0'], default='4.0',
|
|
41
|
+
parser.add_argument('-r', '--release', choices=['4.0', '5.0'], default='4.0',
|
|
42
42
|
help="The nuclear data library release version. "
|
|
43
|
-
"The
|
|
43
|
+
"The options currently supported are 4.0 and 5.0")
|
|
44
44
|
parser.add_argument('--cleanup', action='store_true',
|
|
45
45
|
help="Remove download directories when data has "
|
|
46
46
|
"been processed")
|
|
@@ -75,9 +75,11 @@ def main():
|
|
|
75
75
|
state_download_size(details['compressed_file_size'], details['uncompressed_file_size'], 'GB')
|
|
76
76
|
for f in details['compressed_files']:
|
|
77
77
|
# Establish connection to URL
|
|
78
|
-
download(
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
download(
|
|
79
|
+
urljoin(details['base_url'], f),
|
|
80
|
+
context=ssl._create_unverified_context(),
|
|
81
|
+
output_path=download_path
|
|
82
|
+
)
|
|
81
83
|
|
|
82
84
|
# ==============================================================================
|
|
83
85
|
# EXTRACT FILES FROM TGZ
|
|
@@ -88,7 +90,6 @@ def main():
|
|
|
88
90
|
del_compressed_file=args.cleanup
|
|
89
91
|
)
|
|
90
92
|
|
|
91
|
-
|
|
92
93
|
# ==============================================================================
|
|
93
94
|
# GENERATE HDF5 LIBRARY -- NEUTRON FILES
|
|
94
95
|
|
|
@@ -100,7 +101,6 @@ def main():
|
|
|
100
101
|
|
|
101
102
|
library = openmc.data.DataLibrary()
|
|
102
103
|
|
|
103
|
-
|
|
104
104
|
with Pool() as pool:
|
|
105
105
|
results = []
|
|
106
106
|
for filename in sorted(neutron_files):
|
|
@@ -32,7 +32,7 @@ parser.add_argument("-n", "--nuclides", nargs="+",
|
|
|
32
32
|
parser.add_argument("-d", "--destination", default=None,
|
|
33
33
|
help="Directory to create new library in")
|
|
34
34
|
parser.add_argument("-l", "--libdir", default=None,
|
|
35
|
-
help="Directory of endf library to sample
|
|
35
|
+
help="Directory of endf library to sample")
|
|
36
36
|
parser.add_argument("-x", "--xlib", default=None,
|
|
37
37
|
help="cross_section.xml library to add random evaluations to. Default is OPENMC_CROSS_SECTIONS")
|
|
38
38
|
parser.add_argument("-s", "--samples", default=200,
|
|
@@ -60,7 +60,7 @@ def main():
|
|
|
60
60
|
|
|
61
61
|
libdir = args.libdir
|
|
62
62
|
if libdir == None:
|
|
63
|
-
raise Exception("Directory of ENDF library required for sampling
|
|
63
|
+
raise Exception("Directory of ENDF library required for sampling. Use -l prefix to specify")
|
|
64
64
|
else:
|
|
65
65
|
libdir = Path(libdir).resolve()
|
|
66
66
|
|
|
@@ -205,7 +205,7 @@ all_release_details = {
|
|
|
205
205
|
},
|
|
206
206
|
},
|
|
207
207
|
},
|
|
208
|
-
'
|
|
208
|
+
'endf': {
|
|
209
209
|
"b7.1": {
|
|
210
210
|
"neutron": {
|
|
211
211
|
"base_url": "http://www.nndc.bnl.gov/endf-b7.1/aceFiles/",
|
|
@@ -318,6 +318,16 @@ all_release_details = {
|
|
|
318
318
|
'compressed_file_size': '0.2',
|
|
319
319
|
'uncompressed_file_size': '2'
|
|
320
320
|
}
|
|
321
|
+
},
|
|
322
|
+
'5.0': {
|
|
323
|
+
'neutron': {
|
|
324
|
+
'base_url': 'https://wwwndc.jaea.go.jp/ftpnd/ftp/JENDL/',
|
|
325
|
+
'compressed_files': ['jendl5-n.tar.gz'],
|
|
326
|
+
'endf_files': 'jendl5-n/*.dat',
|
|
327
|
+
'metastables': 'jendl5-n/*m1.dat',
|
|
328
|
+
'compressed_file_size': '4.1',
|
|
329
|
+
'uncompressed_file_size': '16'
|
|
330
|
+
}
|
|
321
331
|
}
|
|
322
332
|
}
|
|
323
333
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
all_decay_release_details = {
|
|
2
|
+
'endf': {
|
|
3
|
+
'b7.1': {
|
|
4
|
+
'neutron': {
|
|
5
|
+
'base_url': ['https://www.nndc.bnl.gov/endf-b7.1/zips/'],
|
|
6
|
+
'compressed_files': ['ENDF-B-VII.1-neutrons.zip'],
|
|
7
|
+
},
|
|
8
|
+
'decay': {
|
|
9
|
+
'base_url': ['https://www.nndc.bnl.gov/endf-b7.1/zips/'],
|
|
10
|
+
'compressed_files': ['ENDF-B-VII.1-decay.zip']
|
|
11
|
+
},
|
|
12
|
+
'nfy': {
|
|
13
|
+
'base_url': ['https://www.nndc.bnl.gov/endf-b7.1/zips/'],
|
|
14
|
+
'compressed_files': ['ENDF-B-VII.1-nfy.zip']
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
'b8.0': {
|
|
18
|
+
'neutron': {
|
|
19
|
+
'base_url': ['https://www.nndc.bnl.gov/endf-b8.0/zips/'],
|
|
20
|
+
'compressed_files': ['ENDF-B-VIII.0_neutrons.zip'],
|
|
21
|
+
},
|
|
22
|
+
'decay': {
|
|
23
|
+
'base_url': ['https://www.nndc.bnl.gov/endf-b8.0/zips/'],
|
|
24
|
+
'compressed_files': ['ENDF-B-VIII.0_decay.zip']
|
|
25
|
+
},
|
|
26
|
+
'nfy': {
|
|
27
|
+
'base_url': ['https://www.nndc.bnl.gov/endf-b8.0/zips/'],
|
|
28
|
+
'compressed_files': ['ENDF-B-VIII.0_nfy.zip']
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
'tendl': {
|
|
33
|
+
'2015': {
|
|
34
|
+
'neutron':{
|
|
35
|
+
'base_url': 'https://tendl.web.psi.ch/tendl_2015/tar_files/',
|
|
36
|
+
'compressed_files': ['TENDL-n.tgz'],
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
'2017': {
|
|
40
|
+
'neutron':{
|
|
41
|
+
'base_url': 'https://tendl.web.psi.ch/tendl_2017/tar_files/',
|
|
42
|
+
'compressed_files': ['TENDL-n.tgz'],
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
'2019': {
|
|
46
|
+
'neutron':{
|
|
47
|
+
'base_url': 'https://tendl.web.psi.ch/tendl_2019/tar_files/',
|
|
48
|
+
'compressed_files': ['TENDL-n.tgz'],
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
'2021': {
|
|
52
|
+
'neutron':{
|
|
53
|
+
'base_url': 'https://tendl.web.psi.ch/tendl_2021/tar_files/',
|
|
54
|
+
'compressed_files': ['TENDL-n.tgz'],
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: openmc-data
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A Python package containing a collection of scripts for producing and downloading data for OpenMC
|
|
5
5
|
Author-email: Jonathan Shimwell <mail@jshimwell.com>
|
|
6
6
|
License: Copyright (c) 2019-2022 UChicago Argonne LLC and contributors
|
|
@@ -61,8 +61,6 @@ Currently the package can be installed from this temporary repository.
|
|
|
61
61
|
pip install openmc_data
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
In the future pip installing from PyPi or Conda could be provided
|
|
65
|
-
|
|
66
64
|
# Usage
|
|
67
65
|
|
|
68
66
|
Once installed several scripts are available in your terminal that are able to
|
|
@@ -72,7 +70,7 @@ The scripts accept input arguments, to find out the input arguments available
|
|
|
72
70
|
for a particular script run the script name with ```--help``` after the name.
|
|
73
71
|
For example:
|
|
74
72
|
|
|
75
|
-
```
|
|
73
|
+
```convert_endf --help```
|
|
76
74
|
|
|
77
75
|
Some scripts (mainly the generate scripts) require NJOY to be installed and
|
|
78
76
|
added to your path.
|
|
@@ -101,7 +99,7 @@ A few categories of scripts are available:
|
|
|
101
99
|
|-|-|-|-|
|
|
102
100
|
|convert_mcnp70 | ENDF/B | VII.0 | LANL |
|
|
103
101
|
|convert_mcnp71 | ENDF/B | VII.1 | LANL |
|
|
104
|
-
|
|
|
102
|
+
|convert_endf | ENDF/B | VII.1 | NNDC |
|
|
105
103
|
|convert_lib80x | ENDF/B | VIII.0 | LANL |
|
|
106
104
|
|convert_fendl | FENDL | 2.1<br>3.0<br>3.1a<br>3.1d<br>3.2|
|
|
107
105
|
|convert_jeff32 | JEFF | 3.2 |
|
|
@@ -114,13 +112,13 @@ A few categories of scripts are available:
|
|
|
114
112
|
|-|-|-|-|
|
|
115
113
|
| generate_cendl | CENDL | 3.1<br>3.2 | |
|
|
116
114
|
| generate_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
|
|
117
|
-
| generate_jendl | JENDL | 4.0 | |
|
|
115
|
+
| generate_jendl | JENDL | 4.0<br>5.0 | |
|
|
118
116
|
|
|
119
117
|
### Download cross sections
|
|
120
118
|
|
|
121
119
|
| Script name | Library | Release | Processed by |
|
|
122
120
|
|-|-|-|-|
|
|
123
|
-
|
|
|
121
|
+
| download_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
|
|
124
122
|
|
|
125
123
|
<!-- | 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 |
|
|
126
124
|
|-|-|-|-|-|-|-|-|
|
|
@@ -128,7 +126,7 @@ A few categories of scripts are available:
|
|
|
128
126
|
|convert_mcnp70| ENDF/B | VII.0 | LANL | [openmc.org](https://anl.box.com/shared/static/t25g7g6v0emygu50lr2ych1cf6o7454b.xz) | | | :heavy_check_mark: |
|
|
129
127
|
|convert_mcnp71| ENDF/B | VII.1 | LANL | [openmc.org](https://anl.box.com/shared/static/d359skd2w6wrm86om2997a1bxgigc8pu.xz) | | | :heavy_check_mark: |
|
|
130
128
|
|generate_endf| ENDF/B | VII.1 | NNDC | [openmc.org](https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz) | | :heavy_check_mark: | |
|
|
131
|
-
|
|
|
129
|
+
|convert_endf| ENDF/B | VII.1 | NNDC | [openmc.org](https://anl.box.com/shared/static/9igk353zpy8fn9ttvtrqgzvw1vtejoz6.xz) | :heavy_check_mark: | :heavy_check_mark: | |
|
|
132
130
|
|convert_lib80x| ENDF/B | VIII.0 | LANL | [openmc.org](https://anl.box.com/shared/static/nd7p4jherolkx4b1rfaw5uqp58nxtstr.xz) | | | :heavy_check_mark: |
|
|
133
131
|
|generate_endf| ENDF/B | VIII.0 | NNDC | [openmc.org](https://anl.box.com/shared/static/uhbxlrx7hvxqw27psymfbhi7bx7s6u6a.xz) | | :heavy_check_mark: | |
|
|
134
132
|
|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: | | |
|
|
@@ -152,7 +150,7 @@ A few categories of scripts are available:
|
|
|
152
150
|
|
|
153
151
|
| Script name | Library | Release | Processed by |
|
|
154
152
|
|-|-|-|-|
|
|
155
|
-
|
|
|
153
|
+
|download_endf_chain | ENDF/B | VII.1<br>VIII.0 | NNDC |
|
|
156
154
|
|
|
157
155
|
<!-- | Sctipt name | Library | Release | Download available | Download ENDF files and generates XML chain files |
|
|
158
156
|
|-|-|-|-|-|
|
|
@@ -9,6 +9,7 @@ pyproject.toml
|
|
|
9
9
|
src/openmc_data/__init__.py
|
|
10
10
|
src/openmc_data/_version.py
|
|
11
11
|
src/openmc_data/urls.py
|
|
12
|
+
src/openmc_data/urls_chain.py
|
|
12
13
|
src/openmc_data/urls_h5.py
|
|
13
14
|
src/openmc_data/urls_xml.py
|
|
14
15
|
src/openmc_data/utils.py
|
|
@@ -19,13 +20,13 @@ src/openmc_data.egg-info/entry_points.txt
|
|
|
19
20
|
src/openmc_data.egg-info/requires.txt
|
|
20
21
|
src/openmc_data.egg-info/top_level.txt
|
|
21
22
|
src/openmc_data/convert/__init__.py
|
|
23
|
+
src/openmc_data/convert/convert_endf.py
|
|
22
24
|
src/openmc_data/convert/convert_fendl.py
|
|
23
25
|
src/openmc_data/convert/convert_jeff32.py
|
|
24
26
|
src/openmc_data/convert/convert_jeff33.py
|
|
25
27
|
src/openmc_data/convert/convert_lib80x.py
|
|
26
28
|
src/openmc_data/convert/convert_mcnp70.py
|
|
27
29
|
src/openmc_data/convert/convert_mcnp71.py
|
|
28
|
-
src/openmc_data/convert/convert_nndc71.py
|
|
29
30
|
src/openmc_data/convert/convert_tendl.py
|
|
30
31
|
src/openmc_data/depletion/__init__.py
|
|
31
32
|
src/openmc_data/depletion/add_branching_ratios.py
|
|
@@ -48,8 +49,8 @@ src/openmc_data/depletion/serpent_fissq.json
|
|
|
48
49
|
src/openmc_data/depletion/tendl2019_nuclides.json
|
|
49
50
|
src/openmc_data/depletion/tendl2021_nuclides.json
|
|
50
51
|
src/openmc_data/download/__init__.py
|
|
51
|
-
src/openmc_data/download/
|
|
52
|
-
src/openmc_data/download/
|
|
52
|
+
src/openmc_data/download/download_endf.py
|
|
53
|
+
src/openmc_data/download/download_endf_chain.py
|
|
53
54
|
src/openmc_data/generate/__init__.py
|
|
54
55
|
src/openmc_data/generate/generate_cendl.py
|
|
55
56
|
src/openmc_data/generate/generate_endf.py
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
[console_scripts]
|
|
2
2
|
add_branching_ratios = openmc_data.depletion.add_branching_ratios:main
|
|
3
3
|
combine_libraries = openmc_data.other.combine_libraries:main
|
|
4
|
+
convert_endf = openmc_data.convert.convert_endf:main
|
|
4
5
|
convert_fendl = openmc_data.convert.convert_fendl:main
|
|
5
6
|
convert_jeff32 = openmc_data.convert.convert_jeff32:main
|
|
6
7
|
convert_jeff33 = openmc_data.convert.convert_jeff33:main
|
|
7
8
|
convert_lib80x = openmc_data.convert.convert_lib80x:main
|
|
8
9
|
convert_mcnp70 = openmc_data.convert.convert_mcnp70:main
|
|
9
10
|
convert_mcnp71 = openmc_data.convert.convert_mcnp71:main
|
|
10
|
-
convert_nndc71 = openmc_data.convert.convert_nndc71:main
|
|
11
11
|
convert_tendl = openmc_data.convert.convert_tendl:main
|
|
12
12
|
convert_tendl_rand = openmc_data.other.convert_tendl_rand:main
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
download_endf = openmc_data.download.download_endf:main
|
|
14
|
+
download_endf_chain = openmc_data.download.download_endf_chain:main
|
|
15
15
|
generate_cendl = openmc_data.generate.generate_cendl:main
|
|
16
16
|
generate_endf = openmc_data.generate.generate_endf:main
|
|
17
17
|
generate_endf71_chain_casl = openmc_data.depletion.generate_endf71_chain_casl:main
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Generate a depletion chain based on TENDL 2019 data. Note that TENDL 2019 does
|
|
5
|
-
not contain any decay or fission product yield (FPY) sublibraries, so these must
|
|
6
|
-
be borrowed from another library. The --lib flag for this script indicates what
|
|
7
|
-
library should be used for decay and FPY evaluations and defaults to JEFF 3.3.
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
import json
|
|
11
|
-
import tarfile
|
|
12
|
-
from argparse import ArgumentParser
|
|
13
|
-
from pathlib import Path
|
|
14
|
-
from urllib.parse import urljoin
|
|
15
|
-
from zipfile import ZipFile
|
|
16
|
-
import openmc_data
|
|
17
|
-
|
|
18
|
-
import openmc.data
|
|
19
|
-
import openmc.deplete as dep
|
|
20
|
-
|
|
21
|
-
from openmc_data.utils import download, extract
|
|
22
|
-
|
|
23
|
-
# Parse command line arguments
|
|
24
|
-
parser = ArgumentParser()
|
|
25
|
-
parser.add_argument('--lib', choices=('jeff33', 'endf80'), default='jeff33',
|
|
26
|
-
help='Library to use for decay and fission product yields')
|
|
27
|
-
parser.add_argument('-r', '--release', choices=['2019', '2021'],
|
|
28
|
-
default='2021', help="The nuclear data library release "
|
|
29
|
-
"version. The currently supported options are 2019, "
|
|
30
|
-
"and 2021.")
|
|
31
|
-
parser.add_argument(
|
|
32
|
-
"-d",
|
|
33
|
-
"--destination",
|
|
34
|
-
type=Path,
|
|
35
|
-
default=None,
|
|
36
|
-
help="filename of the chain file xml file produced. If left as None then "
|
|
37
|
-
"the filename will follow this format 'chain_tendl_{release}_{lib}.xml'",
|
|
38
|
-
)
|
|
39
|
-
args = parser.parse_args()
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def fix_jeff33_nfy(path):
|
|
43
|
-
print(f'Fixing TPID in {path}...')
|
|
44
|
-
new_path = path.with_name(path.name + '_fixed')
|
|
45
|
-
if not new_path.exists():
|
|
46
|
-
with path.open('r') as f:
|
|
47
|
-
data = f.read()
|
|
48
|
-
with new_path.open('w') as f:
|
|
49
|
-
# Write missing TPID line
|
|
50
|
-
f.write(" "*66 + " 1 0 0 0\n")
|
|
51
|
-
f.write(data)
|
|
52
|
-
return new_path
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
def main():
|
|
56
|
-
|
|
57
|
-
library_name = 'tendl'
|
|
58
|
-
|
|
59
|
-
cwd = Path.cwd()
|
|
60
|
-
|
|
61
|
-
endf_files_dir = cwd.joinpath('-'.join([library_name, args.release, 'endf']))
|
|
62
|
-
download_path = cwd.joinpath('-'.join([library_name, args.release, 'download']))
|
|
63
|
-
|
|
64
|
-
neutron_dir = endf_files_dir / "neutrons"
|
|
65
|
-
decay_dir = endf_files_dir / "decay"
|
|
66
|
-
nfy_dir = endf_files_dir / "nfy"
|
|
67
|
-
|
|
68
|
-
# This dictionary contains all the unique information about each release.
|
|
69
|
-
# This can be extended to accommodated new releases
|
|
70
|
-
release_details = {
|
|
71
|
-
'2019': {
|
|
72
|
-
'base_url': 'https://tendl.web.psi.ch/tendl_2019/tar_files/',
|
|
73
|
-
'compressed_files': ['TENDL-n.tgz'],
|
|
74
|
-
'transport_nuclides': 'depletion/tendl2019_nuclides.json',
|
|
75
|
-
'neutron_files': endf_files_dir.glob('tendl19c/*'),
|
|
76
|
-
},
|
|
77
|
-
'2021': {
|
|
78
|
-
'base_url': 'https://tendl.web.psi.ch/tendl_2021/tar_files/',
|
|
79
|
-
'compressed_files': ['TENDL-n.tgz'],
|
|
80
|
-
'transport_nuclides': 'depletion/tendl2021_nuclides.json',
|
|
81
|
-
'neutron_files': endf_files_dir.glob('tendl21c/*'),
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
DECAY_LIB = {
|
|
86
|
-
'jeff33': 'https://www.oecd-nea.org/dbdata/jeff/jeff33/downloads/JEFF33-rdd.zip',
|
|
87
|
-
'endf80': 'https://www.nndc.bnl.gov/endf-b8.0/zips/ENDF-B-VIII.0_decay.zip',
|
|
88
|
-
}
|
|
89
|
-
NFY_LIB = {
|
|
90
|
-
'jeff33': 'https://www.oecd-nea.org/dbdata/jeff/jeff33/downloads/JEFF33-nfy.asc',
|
|
91
|
-
'endf80': 'https://www.nndc.bnl.gov/endf-b8.0/zips/ENDF-B-VIII.0_nfy.zip',
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
# ==========================================================================
|
|
96
|
-
# Incident neutron data
|
|
97
|
-
for f in release_details[args.release]['compressed_files']:
|
|
98
|
-
downloaded_file = download(
|
|
99
|
-
url=urljoin(release_details[args.release]['base_url'], f),
|
|
100
|
-
output_path=download_path
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
extract(downloaded_file, neutron_dir)
|
|
104
|
-
|
|
105
|
-
# Get list of transport nuclides in TENDL-2019
|
|
106
|
-
with open(Path(openmc_data.__path__[0])/release_details[args.release]['transport_nuclides'], 'r') as fh:
|
|
107
|
-
transport_nuclides = set(json.load(fh))
|
|
108
|
-
|
|
109
|
-
neutron_files = [
|
|
110
|
-
p
|
|
111
|
-
for p in release_details[args.release]['neutron_files']
|
|
112
|
-
if p.name[2:-6] in transport_nuclides # filename is n-XXNNN.tendl
|
|
113
|
-
]
|
|
114
|
-
|
|
115
|
-
# ==========================================================================
|
|
116
|
-
# Decay and fission product yield data
|
|
117
|
-
|
|
118
|
-
decay_zip = download(DECAY_LIB[args.lib], output_path=download_path)
|
|
119
|
-
nfy_file = download(NFY_LIB[args.lib], output_path=download_path)
|
|
120
|
-
|
|
121
|
-
extract(decay_zip, decay_dir)
|
|
122
|
-
if args.lib == 'jeff33':
|
|
123
|
-
decay_files = list(decay_dir.glob('*.ASC'))
|
|
124
|
-
|
|
125
|
-
nfy_file_fixed = fix_jeff33_nfy(nfy_file)
|
|
126
|
-
nfy_files = openmc.data.endf.get_evaluations(nfy_file_fixed)
|
|
127
|
-
|
|
128
|
-
elif args.lib == 'endf80':
|
|
129
|
-
decay_files = list(decay_dir.rglob('*.endf'))
|
|
130
|
-
|
|
131
|
-
extract(nfy_file, nfy_dir)
|
|
132
|
-
nfy_files = list(nfy_dir.rglob('*.endf'))
|
|
133
|
-
|
|
134
|
-
chain = dep.Chain.from_endf(
|
|
135
|
-
decay_files, nfy_files, neutron_files,
|
|
136
|
-
reactions=dep.chain.REACTIONS.keys()
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
if args.destination is None:
|
|
140
|
-
args.destination=f'chain_{library_name}_{args.release}_{args.lib}.xml'
|
|
141
|
-
|
|
142
|
-
chain.export_to_xml(args.destination)
|
|
143
|
-
print(f'Chain file written to {args.destination}')
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if __name__ == "__main__":
|
|
147
|
-
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openmc_data-0.1.3 → openmc_data-0.2.0}/src/openmc_data/depletion/generate_endf71_chain_casl.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|