Skip to content

Commit 34db4d0

Browse files
authored
Merge pull request #15 from openmc-data-storage/download-chain-tendl-addition
FNS branching ratio chain is tendl data not endf data
2 parents e3d74ea + e9a8e10 commit 34db4d0

File tree

6 files changed

+36
-22
lines changed

6 files changed

+36
-22
lines changed

.github/workflows/test_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
7070
- name: Test download chain files scripts exist
7171
run: |
72-
download_endf_chain --help
72+
download_chain --help
7373
7474
- name: Test other scripts exist
7575
run: |

.github/workflows/test_processing.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,28 +112,29 @@ jobs:
112112
download_tendl -r 2019
113113
download_tendl -r 2021
114114
115-
- name: test default download_endf_chain
116-
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/download/download_endf_chain.py')
115+
- name: test default download_chain
116+
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/download/download_chain.py')
117117
run: |
118-
echo "download_endf_chain.py file has been modified."
119-
download_endf_chain -r b7.1 -b None
120-
download_endf_chain -r b8.0 -b None
121-
download_endf_chain -r b7.1 -b SFR
122-
download_endf_chain -r b8.0 -b SFR
123-
download_endf_chain -r b7.1 -b PWR
124-
download_endf_chain -r b8.0 -b PWR
118+
echo "download_chain.py file has been modified."
119+
download_chain -l endf -r b7.1 -b None
120+
download_chain -l endf -r b8.0 -b None
121+
download_chain -l endf -r b7.1 -b SFR
122+
download_chain -l endf -r b8.0 -b SFR
123+
download_chain -l endf -r b7.1 -b PWR
124+
download_chain -l endf -r b8.0 -b PWR
125+
download_chain -l endf -r b8.0 -b PWR
125126
126127
- name: test default add_branching_ratios
127128
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/depletion/add_branching_ratios.py')
128129
run: |
129130
echo "add_branching_ratios.py file has been modified."
130-
download_endf_chain -r b8.0
131+
download_chain -l endf -r b8.0
131132
add_branching_ratios -i chain-endf-b8.0.xml -o chain_endf_b8.0_sfr.xml -b sfr
132133
add_branching_ratios -i chain-endf-b8.0.xml -o chain_endf_b8.0_pwr.xml -b pwr
133134
134135
- name: test default reduce_chain
135136
if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/depletion/reduce_chain.py')
136137
run: |
137138
echo "reduce_chain.py file has been modified."
138-
download_endf_chain -r b8.0
139+
download_chain -l endf -r b8.0
139140
reduce_chain -i chain-endf-b8.0.xml -o chain_endf_b8.0_sfr.xml -hl 1e15

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ A few categories of scripts are available:
114114

115115
| Script name | Library | Release | Branching options|
116116
|-|-|-|-|
117-
|download_endf_chain | ENDF/B | VII.1<br>VIII.0 | None<br>SFR<br>PWR
117+
|download_chain | ENDF/B<br><br><br>TENDL | VII.1<br>VIII.0<br><br>2019 | None<br>SFR<br>PWR<br><br>FNS |
118118

119119
<!-- | Sctipt name | Library | Release | Download available | Download ENDF files and generates XML chain files |
120120
|-|-|-|-|-|

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ reduce_chain = "openmc_data.depletion.reduce_chain:main"
7777

7878
download_endf = "openmc_data.download.download_endf:main"
7979
download_tendl = "openmc_data.download.download_tendl:main"
80-
download_endf_chain = "openmc_data.download.download_endf_chain:main"
80+
download_chain = "openmc_data.download.download_chain:main"

src/openmc_data/download/download_endf_chain.py renamed to src/openmc_data/download/download_chain.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,30 @@ class CustomFormatter(
3737
parser.add_argument(
3838
"-r",
3939
"--release",
40-
choices=["b7.1", "b8.0"],
41-
default="b8.0",
40+
choices=["b7.1", "b8.0", "2019"],
41+
default="2019",
4242
help="The nuclear data library release version. The currently supported "
4343
"options are b7.1 and b8.0.",
4444
)
45+
parser.add_argument(
46+
"-l",
47+
"--library",
48+
choices=["endf", "tendl"],
49+
default="tendl",
50+
help="The nuclear data library. The currently supported options are endf and tendl",
51+
)
4552
parser.add_argument(
4653
"-b",
4754
"--branching_ratios",
4855
choices=["None", "SFR", "PWR", "FNS"],
4956
default="FNS",
5057
help="The nuclear data library release version. The currently supported "
51-
"options are b7.1 and b8.0 with branching ratio options of None, SFR "
52-
"(sodium fast reactor), PWR (pressurized water reactor) or FNS "
53-
"(fusion neutron source)",
58+
"options are endf b7.1 and b8.0 with branching ratio options of None, "
59+
"SFR (sodium fast reactor), PWR (pressurized water reactor) or tendl "
60+
"2019 with FNS (fusion neutron source) branching ratio. The tendl "
61+
"chains are processed with neutron induced fission yields from"
62+
"ENDF/B-VIII.0. There is an option to use JEFF 3.3 if you generate"
63+
"your own chain file with the generate_tendl_chain command line tool.",
5464
)
5565

5666
parser.set_defaults()
@@ -59,11 +69,10 @@ class CustomFormatter(
5969

6070
def main():
6171

62-
library_name = 'endf'
63-
details = all_chain_release_details[library_name][args.release][args.branching_ratios]["chain"]
72+
details = all_chain_release_details[args.library][args.release][args.branching_ratios]["chain"]
6473

6574
if args.filename is None:
66-
args.filename = Path("-".join(["chain", library_name, args.release])+".xml")
75+
args.filename = Path("-".join(["chain", args.library, args.release])+".xml")
6776
print(f'Using default filename {args.filename}')
6877

6978
download(

src/openmc_data/urls_xml.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
"url": "https://github.com/openmc-data-storage/openmc_data/raw/main/src/openmc_data/depletion/chain_endf_b8.0_pwr.xml"
3434
}
3535
},
36+
}
37+
},
38+
"tendl": {
39+
"2019": {
3640
"FNS": {
3741
"chain": {
3842
"url": "https://github.com/jbae11/openmc_activator/raw/refs/heads/main/fns_spectrum.chain.xml"

0 commit comments

Comments
 (0)