openmc-data 2.3.0__tar.gz → 2.3.2__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.
Files changed (77) hide show
  1. {openmc_data-2.3.0 → openmc_data-2.3.2}/.github/workflows/test_package.yml +1 -1
  2. {openmc_data-2.3.0 → openmc_data-2.3.2}/.github/workflows/test_processing.yml +12 -11
  3. {openmc_data-2.3.0 → openmc_data-2.3.2}/PKG-INFO +4 -3
  4. {openmc_data-2.3.0 → openmc_data-2.3.2}/README.md +3 -2
  5. {openmc_data-2.3.0 → openmc_data-2.3.2}/pyproject.toml +2 -1
  6. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/_version.py +16 -3
  7. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/convert/convert_fendl.py +2 -2
  8. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/convert/convert_jeff32.py +2 -2
  9. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/convert/convert_jeff33.py +2 -2
  10. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/convert/convert_tendl.py +2 -2
  11. openmc_data-2.3.0/src/openmc_data/download/download_endf_chain.py → openmc_data-2.3.2/src/openmc_data/download/download_chain.py +17 -8
  12. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/generate/generate_cendl.py +2 -2
  13. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/generate/generate_endf.py +2 -2
  14. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/generate/generate_fendl.py +3 -3
  15. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/generate/generate_jeff33.py +2 -2
  16. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/generate/generate_jendl.py +2 -2
  17. openmc_data-2.3.2/src/openmc_data/generate/generate_tendl.py +124 -0
  18. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/urls.py +24 -0
  19. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/urls_xml.py +4 -0
  20. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data.egg-info/PKG-INFO +4 -3
  21. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data.egg-info/SOURCES.txt +2 -1
  22. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data.egg-info/entry_points.txt +2 -1
  23. {openmc_data-2.3.0 → openmc_data-2.3.2}/.github/workflows/python-publish.yml +0 -0
  24. {openmc_data-2.3.0 → openmc_data-2.3.2}/.github/workflows/test_urls.yml +0 -0
  25. {openmc_data-2.3.0 → openmc_data-2.3.2}/.gitignore +0 -0
  26. {openmc_data-2.3.0 → openmc_data-2.3.2}/LICENSE +0 -0
  27. {openmc_data-2.3.0 → openmc_data-2.3.2}/setup.cfg +0 -0
  28. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/__init__.py +0 -0
  29. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/convert/__init__.py +0 -0
  30. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/convert/convert_endf.py +0 -0
  31. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/convert/convert_lib80x.py +0 -0
  32. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/convert/convert_mcnp70.py +0 -0
  33. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/convert/convert_mcnp71.py +0 -0
  34. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/__init__.py +0 -0
  35. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/add_branching_ratios.py +0 -0
  36. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/branching_ratios_pwr.json +0 -0
  37. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/branching_ratios_sfr.json +0 -0
  38. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/casl_chain.py +0 -0
  39. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain-nndc-b7.1.xml +0 -0
  40. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain_casl_pwr.xml +0 -0
  41. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain_casl_sfr.xml +0 -0
  42. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain_endf_b7.1.xml +0 -0
  43. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain_endf_b7.1_pwr.xml +0 -0
  44. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain_endf_b7.1_sfr.xml +0 -0
  45. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain_endf_b8.0.xml +0 -0
  46. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain_endf_b8.0_pwr.xml +0 -0
  47. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain_endf_b8.0_sfr.xml +0 -0
  48. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain_endfb71_pwr.xml +0 -0
  49. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/chain_endfb71_sfr.xml +0 -0
  50. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/generate_endf71_chain_casl.py +0 -0
  51. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/generate_endf_chain.py +0 -0
  52. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/generate_jeff_chain.py +0 -0
  53. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/generate_jendl_chain.py +0 -0
  54. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/generate_serpent_fissq.py +0 -0
  55. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/generate_tendl_chain.py +0 -0
  56. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/reduce_chain.py +0 -0
  57. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/serpent_fissq.json +0 -0
  58. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/tendl2019_nuclides.json +0 -0
  59. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/depletion/tendl2021_nuclides.json +0 -0
  60. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/download/__init__.py +0 -0
  61. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/download/download_endf.py +0 -0
  62. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/download/download_tendl.py +0 -0
  63. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/generate/__init__.py +0 -0
  64. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/other/__init__.py +0 -0
  65. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/other/combine_libraries.py +0 -0
  66. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/other/convert_tendl_rand.py +0 -0
  67. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/other/make_compton.py +0 -0
  68. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/other/make_stopping_powers.py +0 -0
  69. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/other/sample_sandy.py +0 -0
  70. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/urls_chain.py +0 -0
  71. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/urls_h5.py +0 -0
  72. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data/utils.py +0 -0
  73. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data.egg-info/dependency_links.txt +0 -0
  74. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data.egg-info/requires.txt +0 -0
  75. {openmc_data-2.3.0 → openmc_data-2.3.2}/src/openmc_data.egg-info/top_level.txt +0 -0
  76. {openmc_data-2.3.0 → openmc_data-2.3.2}/tests/test_urls.py +0 -0
  77. {openmc_data-2.3.0 → openmc_data-2.3.2}/tests/test_version.py +0 -0
@@ -69,7 +69,7 @@ jobs:
69
69
 
70
70
  - name: Test download chain files scripts exist
71
71
  run: |
72
- download_endf_chain --help
72
+ download_chain --help
73
73
 
74
74
  - name: Test other scripts exist
75
75
  run: |
@@ -112,22 +112,23 @@ jobs:
112
112
  download_tendl -r 2019
113
113
  download_tendl -r 2021
114
114
 
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')
117
117
  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
125
126
 
126
127
  - name: test default add_branching_ratios
127
128
  if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/depletion/add_branching_ratios.py')
128
129
  run: |
129
130
  echo "add_branching_ratios.py file has been modified."
130
- download_endf_chain -r b8.0
131
+ download_chain -l endf -r b8.0
131
132
  add_branching_ratios -i chain-endf-b8.0.xml -o chain_endf_b8.0_sfr.xml -b sfr
132
133
  add_branching_ratios -i chain-endf-b8.0.xml -o chain_endf_b8.0_pwr.xml -b pwr
133
134
 
@@ -135,5 +136,5 @@ jobs:
135
136
  if: contains(steps.changed-files-specific.outputs.modified_files, 'src/openmc_data/depletion/reduce_chain.py')
136
137
  run: |
137
138
  echo "reduce_chain.py file has been modified."
138
- download_endf_chain -r b8.0
139
+ download_chain -l endf -r b8.0
139
140
  reduce_chain -i chain-endf-b8.0.xml -o chain_endf_b8.0_sfr.xml -hl 1e15
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openmc_data
3
- Version: 2.3.0
3
+ Version: 2.3.2
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
@@ -110,8 +110,9 @@ A few categories of scripts are available:
110
110
  |-|-|-|-|
111
111
  | generate_cendl | CENDL | 3.1<br>3.2 | |
112
112
  | generate_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
113
- | generate_fendl | FENDL | 3.2b<br>3.2a<br>3.2<br>3.1d<br>3.1a<br>3.0 | |
113
+ | generate_fendl | FENDL | 3.2c<br>3.2b<br>3.2a<br>3.2<br>3.1d<br>3.1a<br>3.0 | |
114
114
  | generate_jendl | JENDL | 4.0<br>5.0 | |
115
+ | generate_tendl | TENDL | 2023<br>2025 | |
115
116
 
116
117
 
117
118
  ### Download cross sections
@@ -153,7 +154,7 @@ A few categories of scripts are available:
153
154
 
154
155
  | Script name | Library | Release | Branching options|
155
156
  |-|-|-|-|
156
- |download_endf_chain | ENDF/B | VII.1<br>VIII.0 | None<br>SFR<br>PWR
157
+ |download_chain | ENDF/B<br><br><br>TENDL | VII.1<br>VIII.0<br><br>2019 | None<br>SFR<br>PWR<br><br>FNS |
157
158
 
158
159
  <!-- | Sctipt name | Library | Release | Download available | Download ENDF files and generates XML chain files |
159
160
  |-|-|-|-|-|
@@ -71,8 +71,9 @@ A few categories of scripts are available:
71
71
  |-|-|-|-|
72
72
  | generate_cendl | CENDL | 3.1<br>3.2 | |
73
73
  | generate_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
74
- | generate_fendl | FENDL | 3.2b<br>3.2a<br>3.2<br>3.1d<br>3.1a<br>3.0 | |
74
+ | generate_fendl | FENDL | 3.2c<br>3.2b<br>3.2a<br>3.2<br>3.1d<br>3.1a<br>3.0 | |
75
75
  | generate_jendl | JENDL | 4.0<br>5.0 | |
76
+ | generate_tendl | TENDL | 2023<br>2025 | |
76
77
 
77
78
 
78
79
  ### Download cross sections
@@ -114,7 +115,7 @@ A few categories of scripts are available:
114
115
 
115
116
  | Script name | Library | Release | Branching options|
116
117
  |-|-|-|-|
117
- |download_endf_chain | ENDF/B | VII.1<br>VIII.0 | None<br>SFR<br>PWR
118
+ |download_chain | ENDF/B<br><br><br>TENDL | VII.1<br>VIII.0<br><br>2019 | None<br>SFR<br>PWR<br><br>FNS |
118
119
 
119
120
  <!-- | Sctipt name | Library | Release | Download available | Download ENDF files and generates XML chain files |
120
121
  |-|-|-|-|-|
@@ -59,6 +59,7 @@ generate_endf = "openmc_data.generate.generate_endf:main"
59
59
  generate_jeff33 = "openmc_data.generate.generate_jeff33:main"
60
60
  generate_jendl = "openmc_data.generate.generate_jendl:main"
61
61
  generate_fendl = "openmc_data.generate.generate_fendl:main"
62
+ generate_tendl = "openmc_data.generate.generate_tendl:main"
62
63
 
63
64
  generate_endf71_chain_casl = "openmc_data.depletion.generate_endf71_chain_casl:main"
64
65
  generate_endf_chain = "openmc_data.depletion.generate_endf_chain:main"
@@ -77,4 +78,4 @@ reduce_chain = "openmc_data.depletion.reduce_chain:main"
77
78
 
78
79
  download_endf = "openmc_data.download.download_endf:main"
79
80
  download_tendl = "openmc_data.download.download_tendl:main"
80
- download_endf_chain = "openmc_data.download.download_endf_chain:main"
81
+ download_chain = "openmc_data.download.download_chain:main"
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '2.3.0'
21
- __version_tuple__ = version_tuple = (2, 3, 0)
31
+ __version__ = version = '2.3.2'
32
+ __version_tuple__ = version_tuple = (2, 3, 2)
33
+
34
+ __commit_id__ = commit_id = 'gddeef93f0'
@@ -32,13 +32,13 @@ parser.add_argument(
32
32
  help="Directory to create new library in",
33
33
  )
34
34
  parser.add_argument(
35
- "--download", action="store_true", help="Download files from IAEA-NDS"
35
+ "--download", action="store_true", help="Download files"
36
36
  )
37
37
  parser.add_argument(
38
38
  "--no-download",
39
39
  dest="download",
40
40
  action="store_false",
41
- help="Do not download files from IAEA-NDS",
41
+ help="Do not download files",
42
42
  )
43
43
  parser.add_argument("--extract", action="store_true", help="Extract tar/zip files")
44
44
  parser.add_argument(
@@ -32,13 +32,13 @@ parser.add_argument(
32
32
  help="Directory to create new library in",
33
33
  )
34
34
  parser.add_argument(
35
- "--download", action="store_true", help="Download files from OECD-NEA"
35
+ "--download", action="store_true", help="Download files files"
36
36
  )
37
37
  parser.add_argument(
38
38
  "--no-download",
39
39
  dest="download",
40
40
  action="store_false",
41
- help="Do not download files from OECD-NEA",
41
+ help="Do not download files files",
42
42
  )
43
43
  parser.add_argument("--extract", action="store_true", help="Extract tar/zip files")
44
44
  parser.add_argument(
@@ -35,13 +35,13 @@ parser.add_argument(
35
35
  help="Directory to create new library in",
36
36
  )
37
37
  parser.add_argument(
38
- "--download", action="store_true", help="Download tarball from OECD-NEA"
38
+ "--download", action="store_true", help="Download files"
39
39
  )
40
40
  parser.add_argument(
41
41
  "--no-download",
42
42
  dest="download",
43
43
  action="store_false",
44
- help="Do not download tarball from OECD-NEA",
44
+ help="Do not download files",
45
45
  )
46
46
  parser.add_argument("--extract", action="store_true", help="Extract zip files")
47
47
  parser.add_argument(
@@ -32,12 +32,12 @@ parser.add_argument(
32
32
  default=None,
33
33
  help="Directory to create new library in",
34
34
  )
35
- parser.add_argument("--download", action="store_true", help="Download files from PSI")
35
+ parser.add_argument("--download", action="store_true", help="Download files")
36
36
  parser.add_argument(
37
37
  "--no-download",
38
38
  dest="download",
39
39
  action="store_false",
40
- help="Do not download files from PSI",
40
+ help="Do not download files",
41
41
  )
42
42
  parser.add_argument("--extract", action="store_true", help="Extract tar/zip files")
43
43
  parser.add_argument(
@@ -37,20 +37,30 @@ parser.add_argument(
37
37
  parser.add_argument(
38
38
  "-r",
39
39
  "--release",
40
- choices=["b7.1", "b8.0"],
41
- default="b8.0",
40
+ choices=["b7.1", "b8.0", "2019"],
41
+ default="2019",
42
42
  help="The nuclear data library release version. The currently supported "
43
43
  "options are b7.1 and b8.0.",
44
44
  )
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
+ )
45
52
  parser.add_argument(
46
53
  "-b",
47
54
  "--branching_ratios",
48
55
  choices=["None", "SFR", "PWR", "FNS"],
49
56
  default="FNS",
50
57
  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.",
54
64
  )
55
65
 
56
66
  parser.set_defaults()
@@ -59,11 +69,10 @@ args = parser.parse_args()
59
69
 
60
70
  def main():
61
71
 
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"]
64
73
 
65
74
  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")
67
76
  print(f'Using default filename {args.filename}')
68
77
 
69
78
  download(
@@ -26,9 +26,9 @@ parser = argparse.ArgumentParser(
26
26
  parser.add_argument('-d', '--destination', type=Path, default=None,
27
27
  help='Directory to create new library in')
28
28
  parser.add_argument('--download', action='store_true',
29
- help='Download files from OECD-NEA')
29
+ help='Download files')
30
30
  parser.add_argument('--no-download', dest='download', action='store_false',
31
- help='Do not download files from OECD-NEA')
31
+ help='Do not download files')
32
32
  parser.add_argument('--extract', action='store_true',
33
33
  help='Extract tar/zip files')
34
34
  parser.add_argument('--no-extract', dest='extract', action='store_false',
@@ -35,9 +35,9 @@ parser = argparse.ArgumentParser(
35
35
  parser.add_argument('-d', '--destination', type=Path,
36
36
  help='Directory to create new library in')
37
37
  parser.add_argument('--download', action='store_true',
38
- help='Download zip files from NNDC')
38
+ help='Download files')
39
39
  parser.add_argument('--no-download', dest='download', action='store_false',
40
- help='Do not download zip files from NNDC')
40
+ help='Do not download files')
41
41
  parser.add_argument('--extract', action='store_true',
42
42
  help='Extract zip files')
43
43
  parser.add_argument('--no-extract', dest='extract', action='store_false',
@@ -27,9 +27,9 @@ parser = argparse.ArgumentParser(
27
27
  parser.add_argument('-d', '--destination', type=Path, default=None,
28
28
  help='Directory to create new library in')
29
29
  parser.add_argument('--download', action='store_true',
30
- help='Download files from JAEA')
30
+ help='Download files')
31
31
  parser.add_argument('--no-download', dest='download', action='store_false',
32
- help='Do not download files from JAEA')
32
+ help='Do not download files')
33
33
  parser.add_argument('--extract', action='store_true',
34
34
  help='Extract tar/zip files')
35
35
  parser.add_argument('--no-extract', dest='extract', action='store_false',
@@ -40,7 +40,7 @@ parser.add_argument('--libver', choices=['earliest', 'latest'],
40
40
  "performance")
41
41
  parser.add_argument('-r', '--release', choices=["3.2c", "3.2b", "3.2a", "3.2", "3.1d", "3.1a", "3.0"], default="3.2c",
42
42
  help="The nuclear data library release version. "
43
- "The options currently supported are 3.2b, 3.2a, 3.2, 3.1d, 3.1a, 3.0")
43
+ "The options currently supported are 3.2c, 3.2b, 3.2a, 3.2, 3.1d, 3.1a, 3.0")
44
44
  parser.add_argument('--cleanup', action='store_true',
45
45
  help="Remove download directories when data has "
46
46
  "been processed")
@@ -42,9 +42,9 @@ parser.add_argument('--libver', choices=['earliest', 'latest'],
42
42
  "'earliest' for backwards compatibility or 'latest' for "
43
43
  "performance")
44
44
  parser.add_argument('--download', action='store_true',
45
- help='Download zip files from NNDC')
45
+ help='Download files')
46
46
  parser.add_argument('--no-download', dest='download', action='store_false',
47
- help='Do not download zip files from NNDC')
47
+ help='Do not download files')
48
48
  parser.add_argument('--use-tmpdir', dest='tmpdir', action='store_true',
49
49
  help='Use temporary directory while processing')
50
50
  parser.add_argument('--no-use-tmpdir', dest='tmpdir', action='store_false',
@@ -27,9 +27,9 @@ parser = argparse.ArgumentParser(
27
27
  parser.add_argument('-d', '--destination', type=Path, default=None,
28
28
  help='Directory to create new library in')
29
29
  parser.add_argument('--download', action='store_true',
30
- help='Download files from JAEA')
30
+ help='Download files')
31
31
  parser.add_argument('--no-download', dest='download', action='store_false',
32
- help='Do not download files from JAEA')
32
+ help='Do not download files')
33
33
  parser.add_argument('--extract', action='store_true',
34
34
  help='Extract tar/zip files')
35
35
  parser.add_argument('--no-extract', dest='extract', action='store_false',
@@ -0,0 +1,124 @@
1
+ #!/usr/bin/env python3
2
+
3
+ """
4
+ Download TENDL data from PSI and convert it to a HDF5 library for
5
+ use with OpenMC.
6
+ """
7
+
8
+ import argparse
9
+ import ssl
10
+ from multiprocessing import Pool
11
+ from pathlib import Path
12
+ from urllib.parse import urljoin
13
+
14
+ import openmc.data
15
+ from openmc_data import download, extract, process_neutron, state_download_size, all_release_details
16
+
17
+
18
+ class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter,
19
+ argparse.RawDescriptionHelpFormatter):
20
+ pass
21
+
22
+
23
+ parser = argparse.ArgumentParser(
24
+ description=__doc__,
25
+ formatter_class=CustomFormatter
26
+ )
27
+ parser.add_argument('-d', '--destination', type=Path, default=None,
28
+ help='Directory to create new library in')
29
+ parser.add_argument('--download', action='store_true',
30
+ help='Download files')
31
+ parser.add_argument('--no-download', dest='download', action='store_false',
32
+ help='Do not download files')
33
+ parser.add_argument('--extract', action='store_true',
34
+ help='Extract tar/zip files')
35
+ parser.add_argument('--no-extract', dest='extract', action='store_false',
36
+ help='Do not extract tar/zip files')
37
+ parser.add_argument('--libver', choices=['earliest', 'latest'],
38
+ default='latest', help="Output HDF5 versioning. Use "
39
+ "'earliest' for backwards compatibility or 'latest' for "
40
+ "performance")
41
+ parser.add_argument('-r', '--release', choices=["2023", "2025"], default="2025",
42
+ help="The nuclear data library release version. "
43
+ "The options currently supported are 2023 and 2025")
44
+ parser.add_argument('--cleanup', action='store_true',
45
+ help="Remove download directories when data has "
46
+ "been processed")
47
+ parser.add_argument('--no-cleanup', dest='cleanup', action='store_false',
48
+ help="Do not remove download directories when data has "
49
+ "been processed")
50
+ parser.set_defaults(download=True, extract=True, cleanup=False)
51
+ args = parser.parse_args()
52
+
53
+
54
+ def main():
55
+
56
+ library_name = 'tendl'
57
+
58
+ cwd = Path.cwd()
59
+
60
+ endf_files_dir = cwd.joinpath('-'.join([library_name, args.release, 'endf']))
61
+ download_path = cwd.joinpath('-'.join([library_name, args.release, 'download']))
62
+ # the destination is decided after the release is known
63
+ # to avoid putting the release in a folder with a misleading name
64
+ if args.destination is None:
65
+ args.destination = Path('-'.join([library_name, args.release, 'hdf5']))
66
+
67
+ # This dictionary contains all the unique information about each release.
68
+ # This can be exstened to accommodated new releases
69
+ details = all_release_details[library_name][args.release]['neutron']['endf']
70
+
71
+ # ==============================================================================
72
+ # DOWNLOAD FILES FROM WEBSITE
73
+
74
+ if args.download:
75
+ state_download_size(details['compressed_file_size'], details['uncompressed_file_size'], 'GB')
76
+ for f in details['compressed_files']:
77
+ # Establish connection to URL
78
+ download(
79
+ urljoin(details['base_url'], f),
80
+ context=ssl._create_unverified_context(),
81
+ output_path=download_path,
82
+ as_browser=True
83
+ )
84
+
85
+ # ==============================================================================
86
+ # EXTRACT FILES FROM TGZ
87
+ if args.extract:
88
+ extract(
89
+ compressed_files=[download_path/ f for f in details['compressed_files']],
90
+ extraction_dir=endf_files_dir,
91
+ del_compressed_file=args.cleanup
92
+ )
93
+
94
+ # ==============================================================================
95
+ # GENERATE HDF5 LIBRARY -- NEUTRON FILES
96
+
97
+ # Get a list of all ENDF files
98
+ neutron_files = endf_files_dir.glob(details['endf_files'])
99
+
100
+ # Create output directory if it doesn't exist
101
+ args.destination.mkdir(parents=True, exist_ok=True)
102
+
103
+ library = openmc.data.DataLibrary()
104
+
105
+ with Pool() as pool:
106
+ results = []
107
+ for filename in sorted(neutron_files):
108
+ func_args = (filename, args.destination, args.libver)
109
+ r = pool.apply_async(process_neutron, func_args)
110
+ results.append(r)
111
+
112
+ for r in results:
113
+ r.wait()
114
+
115
+ # Register with library
116
+ for p in sorted((args.destination).glob('*.h5')):
117
+ library.register_file(p)
118
+
119
+ # Write cross_sections.xml
120
+ library.export_to_xml(args.destination / 'cross_sections.xml')
121
+
122
+
123
+ if __name__ == '__main__':
124
+ main()
@@ -48,6 +48,30 @@ all_release_details = {
48
48
  }
49
49
  }
50
50
  },
51
+ "2023": {
52
+ "neutron": {
53
+ "endf": {
54
+ "base_url": "https://tendl.web.psi.ch/tendl_2023/tar_files/",
55
+ "compressed_files": ["TENDL-n.2024new.tgz"],
56
+ "endf_files": "n-*.tendl",
57
+ "metastables": "n-*m.tendl",
58
+ "compressed_file_size": 3.5,
59
+ "uncompressed_file_size": 20,
60
+ }
61
+ }
62
+ },
63
+ "2025": {
64
+ "neutron": {
65
+ "endf": {
66
+ "base_url": "https://tendl.web.psi.ch/tendl_2025/tar_files/",
67
+ "compressed_files": ["TENDL-n.tgz"],
68
+ "endf_files": "n-*.tendl",
69
+ "metastables": "n-*m.tendl",
70
+ "compressed_file_size": 3.1,
71
+ "uncompressed_file_size": 13.9,
72
+ }
73
+ }
74
+ },
51
75
  },
52
76
  "fendl": {
53
77
  "3.2c": {
@@ -33,6 +33,10 @@ all_chain_release_details = {
33
33
  "url": "https://github.com/openmc-data-storage/openmc_data/raw/main/src/openmc_data/depletion/chain_endf_b8.0_pwr.xml"
34
34
  }
35
35
  },
36
+ }
37
+ },
38
+ "tendl": {
39
+ "2019": {
36
40
  "FNS": {
37
41
  "chain": {
38
42
  "url": "https://github.com/jbae11/openmc_activator/raw/refs/heads/main/fns_spectrum.chain.xml"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openmc_data
3
- Version: 2.3.0
3
+ Version: 2.3.2
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
@@ -110,8 +110,9 @@ A few categories of scripts are available:
110
110
  |-|-|-|-|
111
111
  | generate_cendl | CENDL | 3.1<br>3.2 | |
112
112
  | generate_endf | ENDF/B | VII.1<br>VIII.0 | NNDC |
113
- | generate_fendl | FENDL | 3.2b<br>3.2a<br>3.2<br>3.1d<br>3.1a<br>3.0 | |
113
+ | generate_fendl | FENDL | 3.2c<br>3.2b<br>3.2a<br>3.2<br>3.1d<br>3.1a<br>3.0 | |
114
114
  | generate_jendl | JENDL | 4.0<br>5.0 | |
115
+ | generate_tendl | TENDL | 2023<br>2025 | |
115
116
 
116
117
 
117
118
  ### Download cross sections
@@ -153,7 +154,7 @@ A few categories of scripts are available:
153
154
 
154
155
  | Script name | Library | Release | Branching options|
155
156
  |-|-|-|-|
156
- |download_endf_chain | ENDF/B | VII.1<br>VIII.0 | None<br>SFR<br>PWR
157
+ |download_chain | ENDF/B<br><br><br>TENDL | VII.1<br>VIII.0<br><br>2019 | None<br>SFR<br>PWR<br><br>FNS |
157
158
 
158
159
  <!-- | Sctipt name | Library | Release | Download available | Download ENDF files and generates XML chain files |
159
160
  |-|-|-|-|-|
@@ -55,8 +55,8 @@ src/openmc_data/depletion/serpent_fissq.json
55
55
  src/openmc_data/depletion/tendl2019_nuclides.json
56
56
  src/openmc_data/depletion/tendl2021_nuclides.json
57
57
  src/openmc_data/download/__init__.py
58
+ src/openmc_data/download/download_chain.py
58
59
  src/openmc_data/download/download_endf.py
59
- src/openmc_data/download/download_endf_chain.py
60
60
  src/openmc_data/download/download_tendl.py
61
61
  src/openmc_data/generate/__init__.py
62
62
  src/openmc_data/generate/generate_cendl.py
@@ -64,6 +64,7 @@ src/openmc_data/generate/generate_endf.py
64
64
  src/openmc_data/generate/generate_fendl.py
65
65
  src/openmc_data/generate/generate_jeff33.py
66
66
  src/openmc_data/generate/generate_jendl.py
67
+ src/openmc_data/generate/generate_tendl.py
67
68
  src/openmc_data/other/__init__.py
68
69
  src/openmc_data/other/combine_libraries.py
69
70
  src/openmc_data/other/convert_tendl_rand.py
@@ -10,8 +10,8 @@ convert_mcnp70 = openmc_data.convert.convert_mcnp70:main
10
10
  convert_mcnp71 = openmc_data.convert.convert_mcnp71:main
11
11
  convert_tendl = openmc_data.convert.convert_tendl:main
12
12
  convert_tendl_rand = openmc_data.other.convert_tendl_rand:main
13
+ download_chain = openmc_data.download.download_chain:main
13
14
  download_endf = openmc_data.download.download_endf:main
14
- download_endf_chain = openmc_data.download.download_endf_chain:main
15
15
  download_tendl = openmc_data.download.download_tendl:main
16
16
  generate_cendl = openmc_data.generate.generate_cendl:main
17
17
  generate_endf = openmc_data.generate.generate_endf:main
@@ -23,6 +23,7 @@ generate_jeff_chain = openmc_data.depletion.generate_jeff_chain:main
23
23
  generate_jendl = openmc_data.generate.generate_jendl:main
24
24
  generate_jendl_chain = openmc_data.depletion.generate_jendl_chain:main
25
25
  generate_serpent_fissq = openmc_data.depletion.generate_serpent_fissq:main
26
+ generate_tendl = openmc_data.generate.generate_tendl:main
26
27
  generate_tendl_chain = openmc_data.depletion.generate_tendl_chain:main
27
28
  make_compton = openmc_data.other.make_compton:main
28
29
  make_stopping_powers = openmc_data.other.make_stopping_powers:main
File without changes
File without changes
File without changes