mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Merge remote-tracking branch 'upstream/develop' into cmfd-omp
This commit is contained in:
commit
2c9a222536
121 changed files with 7573 additions and 6213 deletions
|
|
@ -6,6 +6,8 @@
|
|||
# Note 32 of the 255 nuclides appeare twice as they are both activation
|
||||
# nuclides (category 1) and fission product nuclides (category 3).
|
||||
|
||||
# Te129 has been added due to it's link to I129 production.
|
||||
|
||||
CASL_CHAIN = {
|
||||
# Nuclide: (Stable, CAT, IFPY, Special yield treatment)
|
||||
# Stable: True if nuclide has no decay reactions
|
||||
|
|
@ -187,6 +189,7 @@ CASL_CHAIN = {
|
|||
'Sb127': (False, 3, 2, None),
|
||||
'Te127': (False, 3, -1, None),
|
||||
'Te127_m1': (False, 3, -1, None),
|
||||
'Te129': (False, 3, 1, None),
|
||||
'Te129_m1': (False, 3, 2, None),
|
||||
'Te132': (False, 3, 2, None),
|
||||
'I127': (True, 3, 1, None),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import glob
|
||||
import os
|
||||
from pathlib import Path
|
||||
from zipfile import ZipFile
|
||||
|
||||
from openmc._utils import download
|
||||
|
|
@ -15,15 +15,28 @@ URLS = [
|
|||
]
|
||||
|
||||
def main():
|
||||
for url in URLS:
|
||||
basename = download(url)
|
||||
with ZipFile(basename, 'r') as zf:
|
||||
print('Extracting {}...'.format(basename))
|
||||
zf.extractall()
|
||||
endf_dir = os.environ.get("OPENMC_ENDF_DATA")
|
||||
if endf_dir is not None:
|
||||
endf_dir = Path(endf_dir)
|
||||
elif all(os.path.isdir(lib) for lib in ("neutrons", "decay", "nfy")):
|
||||
endf_dir = Path(".")
|
||||
else:
|
||||
for url in URLS:
|
||||
basename = download(url)
|
||||
with ZipFile(basename, 'r') as zf:
|
||||
print('Extracting {}...'.format(basename))
|
||||
zf.extractall()
|
||||
endf_dir = Path(".")
|
||||
|
||||
decay_files = glob.glob(os.path.join('decay', '*.endf'))
|
||||
nfy_files = glob.glob(os.path.join('nfy', '*.endf'))
|
||||
neutron_files = glob.glob(os.path.join('neutrons', '*.endf'))
|
||||
decay_files = tuple((endf_dir / "decay").glob("*endf"))
|
||||
neutron_files = tuple((endf_dir / "neutrons").glob("*endf"))
|
||||
nfy_files = tuple((endf_dir / "nfy").glob("*endf"))
|
||||
|
||||
# check files exist
|
||||
for flist, ftype in [(decay_files, "decay"), (neutron_files, "neutron"),
|
||||
(nfy_files, "neutron fission product yield")]:
|
||||
if not flist:
|
||||
raise IOError("No {} endf files found in {}".format(ftype, endf_dir))
|
||||
|
||||
chain = openmc.deplete.Chain.from_endf(decay_files, nfy_files, neutron_files)
|
||||
chain.export_to_xml('chain_endfb71.xml')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue