Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ee54801
Add decay data to data download
LukeSeifert Nov 6, 2025
82fab1c
Add endf decay preprocessing
LukeSeifert Nov 6, 2025
8ecfe91
Add endf Pn capture and error handling
LukeSeifert Nov 6, 2025
0df4c67
Clean up preprocessing and add more half-life collection
LukeSeifert Nov 6, 2025
e7170c9
Fix cbar error and account for 0 lin regression
LukeSeifert Nov 6, 2025
5c5288a
Update git ignore to include new data sim
LukeSeifert Nov 6, 2025
58844f9
Only include data with halflives and emission probabilities
LukeSeifert Nov 6, 2025
3b32a9c
Add sensitivty subplot input option
LukeSeifert Nov 6, 2025
09c4608
Fix typo in defaults
LukeSeifert Nov 7, 2025
f293ed5
Greatly simplify data handling
LukeSeifert Nov 7, 2025
152b468
Account for multiple neutron emissions
LukeSeifert Nov 7, 2025
c19d85a
Add countrate warning suppression for ufloat uncertainties
LukeSeifert Nov 10, 2025
6c8bd5b
Add jeff preprocessing
LukeSeifert Nov 10, 2025
cec5991
Automate JEFF 3.1.1 data download
LukeSeifert Nov 10, 2025
afc65ff
Update gitignore and iaea matching and empty file
LukeSeifert Nov 11, 2025
1c88bf3
Merge remote-tracking branch 'upstream/main' into endf-data
LukeSeifert Nov 12, 2025
2156f9a
Update the readme to include new JEFF data
LukeSeifert Nov 12, 2025
e46fad1
Small change to readme for tests to pass
LukeSeifert Nov 12, 2025
76f50df
Change residual to chi-squared
LukeSeifert Nov 14, 2025
206915d
Update default params
LukeSeifert Nov 14, 2025
ccc9d46
Align all U_i values
LukeSeifert Nov 14, 2025
80871f5
Switch from chi-squared back to residual (numerical instabilities)
LukeSeifert Nov 14, 2025
380cb96
Undo chi square statistic due to numerical instability
LukeSeifert Nov 14, 2025
6d70e31
Update tests to be more lax for groups and to account for changes to …
LukeSeifert Nov 14, 2025
00bf9b0
Add condition number logging
LukeSeifert Nov 14, 2025
9b500b8
Adjust pie charts to have nuc,percent
LukeSeifert Nov 19, 2025
740c887
Add concentration test
LukeSeifert Dec 22, 2025
426d09e
Clean up preprocessing
LukeSeifert Dec 22, 2025
27a0bae
Clean up concentrations
LukeSeifert Dec 22, 2025
91045d6
Clean up countrate
LukeSeifert Dec 22, 2025
513cbb2
Clean up group fit
LukeSeifert Dec 22, 2025
b4165aa
Clean up post
LukeSeifert Dec 22, 2025
e97d807
Clean up post processing and add new defaults
LukeSeifert Dec 22, 2025
4729674
Remove parent feeding from default
LukeSeifert Dec 22, 2025
601e993
Remove parent feeding from input handler
LukeSeifert Dec 22, 2025
7fbaf63
Add temporary environment file for debugging
LukeSeifert Dec 24, 2025
f98c2a8
Add literature data for six group thermal U235
LukeSeifert Dec 24, 2025
b6a1179
Add U238 data for test
LukeSeifert Dec 24, 2025
5292186
Add the top level pip requirements for debugging
LukeSeifert Dec 24, 2025
454c7e7
Clean up literature data treatment
LukeSeifert Dec 24, 2025
535f753
Rename to literature groups
LukeSeifert Dec 24, 2025
34b000c
Clean up reprocessing scheme treatment
LukeSeifert Dec 24, 2025
7645e53
Fix reprocessing treatment to account for scaling properly
LukeSeifert Dec 24, 2025
8b381e6
Force IPv4
LukeSeifert Dec 27, 2025
8765748
Fix environment issue and test minor diff
LukeSeifert Dec 27, 2025
fe5cc26
Clean up postproc handling; only write once instead of per iteration
LukeSeifert Jan 12, 2026
083e1ca
Add nuclide color setting to user input
LukeSeifert Jan 12, 2026
64b813c
Remove old comments from test
LukeSeifert Jan 12, 2026
85cae8f
Fix concentration test bug
LukeSeifert Jan 14, 2026
6900b1a
Fix spacing in MSBR file
LukeSeifert Jan 30, 2026
a2ec4b0
remove empty run example
LukeSeifert Jan 30, 2026
c312302
Make chemical removal generic
LukeSeifert Jan 30, 2026
62e4697
Fix missing apostrophe in count rate doc string
LukeSeifert Jan 30, 2026
c87d8a4
Use better variable name for fission yields
LukeSeifert Jan 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,19 @@ cython_debug/
/examples/huynh_2014/postproc.json
/examples/huynh_2014/images/*

/examples/empty_run/*.csv
/examples/empty_run/postproc.json
/examples/empty_run/images/*

/examples/msre/*.csv
/examples/msre/postproc.json
/examples/msre/images/*

/examples/pure_endfb71/*.csv
/examples/pure_endfb71/postproc.json
/examples/pure_endfb71/images/*

/examples/iaea_matching/*.csv
/examples/iaea_matching/postproc.json
/examples/iaea_matching/images/*


/examples/prelim_results/*
!/examples/prelim_results/input.json
!/examples/prelim_results/results_generator.py
Expand Down
30 changes: 24 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# MoSDeN
Molten Salt Delayed Neutron (MoSDeN) is a tool used for reconstruction of
Molten Salt Delayed Neutron (MoSDeN) is a tool used for generation of
delayed neutron precursor groups in molten salt reactors.
This tool can also be used for traditional light water reactors, as users
can adjust ex-core residence times of fissile samples to be zero and chemical
removal rates to be zero.

## History
This tool had a previous version in this repository accessible with
Expand All @@ -26,9 +29,12 @@ The exact organization of raw, unprocessed data is flexible, with some notable
exceptions:
- OpenMC chain files to be should all be in a subdirectory labeled with
"omcchain" (see `preprocessing.py` for all keywords)
- ENDF NFY data should all be in a subdirectory labeled `nfy`
- ENDF fission yield data should all be in a subdirectory labeled `nfy`
- JEFF fission yield data should all be in a subdirectory labeled `nfpy`
- ENDF NFY files should be named "nfy-<ZZZ>_<ID>_<AAA>.csv", so 235U would be
`nfy-092_U_235.csv`.
- JEFF NFPY files should be named "nfpy_<NUMS>_<ZZ>-<ID>-<AAA>.dat", so 235U
would be `nfpy_3542_92-U-235.dat` (the `NUMS` value meaning is unclear).
- IAEA beta-delayed neutron emission data should be in a directory `iaea` and
be called `eval.csv` (default when downloading data).

Expand All @@ -41,6 +47,20 @@ cumulative fission yields (with energy dependence based on nearest energy)
- [IAEA data](https://www-nds.iaea.org/beta-delayed-neutron/database.html):
these give emission probabilities and half-lives

Some data are provided without additional downloading steps.
These data include: chemical reprocessing schemes and group parameter data.
- Chemical removal rates provided should represent *scaled* removal (the removal
rate applied to the entire volume). This is generally how the data is presented
in the literature. The scripts assume the data is in this form. The user input
captures this effect via the `base_removal_scaling`. This term represents, as a
value from 0 to 1, the ex-core fraction (assuming chemical removal in the that
region). Whatever chemical removal rates are used, this term should represent
the scaling that has been applied to that data (for example, if the removal
occurs everywhere in the primary loop, then the scaling would be 1.0 since this
term captures the spatial component.)
- The group parameter data from the literature should be given as absolute
yields (calculable from the relative yield and total yield values).

### Processing
Processing consists of three steps:
1. Generate concentrations (or collect fission yield data).
Expand All @@ -67,11 +87,9 @@ including analysis of each step.
## Using the tool from source
Download the repository from GitHub.
The environment will also to be created by running
`conda env create -f environment.yml`.
`mamba env create -f environment.yml`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason for this change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mamba seemed to work better when I was doing some debugging (conda was giving me some bugs). This may no longer be the case (since I fixed some other bugs in the environment file), but I have tested and confirmed that I can build the environment, download data, and successfully run the tests when using mamba. It should also work with conda, but I have more confidence that it will work with mamba for users.

This should be followed with `conda activate mosdenv` to activate
the environment.
Run `pip install -e .` to make the package available to use on the command line
as `mosden` in the `mosdenv` environment.
Download the data used in tests by running `bash download_data.sh`.
Check that tests pass by running `pytest` or `pytest -m "not slow"` for the
faster version.
Expand All @@ -97,4 +115,4 @@ various debug outputs.
- [<20] is the info level (This is the suggested level)
- [<30] is the warning level
- [<40] is the error level
- [<50] is the critical level
- [<50] is the critical level
74 changes: 63 additions & 11 deletions download_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ roman_to_int() {
}

DATA_DIR="mosden/data/unprocessed"
mkdir -p "$DATA_DIR"

# ENDF --------------------------------------------------------------------
ENDF_VERSION="VII.1"
Expand All @@ -29,8 +30,6 @@ if [[ ! " ${ALLOWED_VERSIONS[*]} " =~ " ${ENDF_VERSION} " ]]; then
exit 1
fi

mkdir -p "$DATA_DIR"

LOWERCASE_VERSION=$(echo "${ENDF_VERSION//./}" | tr '[:upper:]' '[:lower:]')

ROMAN_PART="${LOWERCASE_VERSION//[0-9]/}"
Expand All @@ -40,48 +39,101 @@ LOWERCASE_VERSION="${INTEGER_VALUE}${DIGIT_PART}"

ENDF_DIR="${DATA_DIR}/endfb${LOWERCASE_VERSION}"
NFY_DIR="${ENDF_DIR}"
decay_DIR="${ENDF_DIR}"
mkdir -p "$NFY_DIR"

if [[ "${ENDF_VERSION}" == "VII.1" ]]; then
SEPARATOR="-"
decay_SEPARATOR="-"
elif [[ "${ENDF_VERSION}" == "VIII.0" ]]; then
SEPARATOR="_"
decay_SEPARATOR="_"
fi

NFY_ZIP_NAME="ENDF-B-${ENDF_VERSION}${SEPARATOR}nfy.zip"
NFY_URL="https://www.nndc.bnl.gov/endf-b7.1/zips/${NFY_ZIP_NAME}"
NFY_URL="https://www.nndc.bnl.gov/endf-b${INTEGER_VALUE}.${DIGIT_PART}/zips/${NFY_ZIP_NAME}"

echo "Downloading NFY data for ENDF/B-${ENDF_VERSION}..."
TEMP_ZIP="${NFY_DIR}/${NFY_ZIP_NAME}"
wget --show-progress -O "$TEMP_ZIP" "$NFY_URL"
echo "Accessing ${NFY_URL}"
wget -4 --show-progress -O "$TEMP_ZIP" "$NFY_URL"
echo "Extracting NFY data..."
unzip "$TEMP_ZIP" -d "$NFY_DIR"
rm "$TEMP_ZIP"
echo "NFY data handled"

decay_ZIP_NAME="ENDF-B-${ENDF_VERSION}${decay_SEPARATOR}decay.zip"
decay_URL="https://www.nndc.bnl.gov/endf-b${INTEGER_VALUE}.${DIGIT_PART}/zips/${decay_ZIP_NAME}"

echo "Downloading decay data for ENDF/B-${ENDF_VERSION}..."
TEMP_ZIP="${decay_DIR}/${decay_ZIP_NAME}"
echo "Accessing ${decay_URL}"
wget -4 --show-progress -O "$TEMP_ZIP" "$decay_URL"
echo "Extracting decay data..."
unzip "$TEMP_ZIP" -d "$decay_DIR"
rm "$TEMP_ZIP"
echo "Decay data handled"

# /ENDF --------------------------------------------------------------------



# JEFF --------------------------------------------------------------------
JEFF_VERSION="3.1.1"
ALLOWED_VERSIONS=("3.1.1")

if [[ ! " ${ALLOWED_VERSIONS[*]} " =~ " ${JEFF_VERSION} " ]]; then
echo "Error: Invalid JEFF version '${JEFF_VERSION}'"
echo "Allowed versions: ${ALLOWED_VERSIONS[*]}"
exit 1
fi
JEFF_VERSION_NOP="${JEFF_VERSION//./}"

JEFF_DIR="${DATA_DIR}/jeff${JEFF_VERSION_NOP}"
NFY_DIR="${JEFF_DIR}/nfpy/"
mkdir -p "$NFY_DIR"
echo "Saving data to ${NFY_DIR}"

if [[ "${JEFF_VERSION}" == "3.1.1" ]]; then
JEFF_URL="https://www-nds.iaea.org/public/download-endf/JEFF-${JEFF_VERSION}/nfpy/"
fi


echo "Downloading NFY data for JEFF-${JEFF_VERSION}..."
echo "Accessing ${JEFF_URL}"
wget -4 --show-progress --recursive --no-parent --accept "*.zip" --no-host-directories --cut-dirs=3 -P "${JEFF_DIR}" "$JEFF_URL"
echo "Extracting NFY data..."
for f in "$NFY_DIR"/*.zip; do
unzip "$f" -d "$NFY_DIR"
done
echo "Removing zip files..."
rm "$NFY_DIR"/*.zip
echo "NFY data handled"


# /JEFF --------------------------------------------------------------------

# IAEA --------------------------------------------------------------------
IAEA_DIR="${DATA_DIR}/iaea"
IAEA_FILE="$IAEA_DIR/eval.csv"
IAEA_URL="https://www-nds.iaea.org/relnsd/delayedn/eval.csv"
mkdir -p "$IAEA_DIR"

echo "Downloading IAEA delayed neutron data..."
wget -q --show-progress -O "$IAEA_FILE" "$IAEA_URL"
wget -4 -q --show-progress -O "$IAEA_FILE" "$IAEA_URL"
echo "Saved to $IAEA_FILE"

# /IAEA --------------------------------------------------------------------

# OpenMC --------------------------------------------------------------------
OPENMC_DIR="${ENDF_DIR}/omcchain/"
mkdir -p "$OPENMC_DIR"
wget -q --show-progress -O "${OPENMC_DIR}chain_casl_pwr.xml" "https://anl.box.com/shared/static/3nvnasacm2b56716oh5hyndxdyauh5gs.xml"
wget -q --show-progress -O "${OPENMC_DIR}chain_casl_sfr.xml" "https://anl.box.com/shared/static/9fqbq87j0tx4m6vfl06pl4ccc0hwamg9.xml"
wget -4 -q --show-progress -O "${OPENMC_DIR}chain_casl_pwr.xml" "https://anl.box.com/shared/static/3nvnasacm2b56716oh5hyndxdyauh5gs.xml"
wget -4 -q --show-progress -O "${OPENMC_DIR}chain_casl_sfr.xml" "https://anl.box.com/shared/static/9fqbq87j0tx4m6vfl06pl4ccc0hwamg9.xml"
if [[ "${ENDF_VERSION}" == "VII.1" ]]; then
wget -q --show-progress -O "${OPENMC_DIR}chain_endfb71_pwr.xml" "https://anl.box.com/shared/static/os1u896bwsbopurpgas72bi6aij2zzdc.xml"
wget -q --show-progress -O "${OPENMC_DIR}chain_endfb71_sfr.xml" "https://anl.box.com/shared/static/9058zje1gm0ekd93hja542su50pccvj0.xml"
wget -4 -q --show-progress -O "${OPENMC_DIR}chain_endfb71_pwr.xml" "https://anl.box.com/shared/static/os1u896bwsbopurpgas72bi6aij2zzdc.xml"
wget -4 -q --show-progress -O "${OPENMC_DIR}chain_endfb71_sfr.xml" "https://anl.box.com/shared/static/9058zje1gm0ekd93hja542su50pccvj0.xml"
elif [[ "${ENDF_VERSION}" == "VIII.0" ]]; then
wget -q --show-progress -O "${OPENMC_DIR}chain_endfb71_pwr.xml" "https://anl.box.com/shared/static/nyezmyuofd4eqt6wzd626lqth7wvpprr.xml"
wget -q --show-progress -O "${OPENMC_DIR}chain_endfb71_sfr.xml" "https://anl.box.com/shared/static/x3kp739hr5upmeqpbwx9zk9ep04fnmtg.xml"
wget -4 -q --show-progress -O "${OPENMC_DIR}chain_endfb71_pwr.xml" "https://anl.box.com/shared/static/nyezmyuofd4eqt6wzd626lqth7wvpprr.xml"
wget -4 -q --show-progress -O "${OPENMC_DIR}chain_endfb71_sfr.xml" "https://anl.box.com/shared/static/x3kp739hr5upmeqpbwx9zk9ep04fnmtg.xml"
fi
165 changes: 12 additions & 153 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,158 +1,17 @@
name: mosdenv
channels:
- conda-forge
- defaults
dependencies:
- _libgcc_mutex=0.1
- _openmp_mutex=4.5
- asttokens=3.0.0
- blosc=1.21.6
- brotli=1.1.0
- brotli-bin=1.1.0
- bzip2=1.0.8
- c-ares=1.34.5
- ca-certificates=2025.10.5
- cached-property=1.5.2
- cached_property=1.5.2
- colorama=0.4.6
- contourpy=1.3.3
- cycler=0.12.1
- dagmc=3.2.4
- decorator=5.2.1
- eigen=3.4.0
- endf=0.1.4
- exceptiongroup=1.3.0
- executing=2.2.0
- fonttools=4.59.0
- freetype=2.13.3
- future=1.0.0
- h5py=3.13.0
- hdf4=4.2.15
- hdf5=1.14.3
- iniconfig=2.0.0
- ipython=9.4.0
- ipython_pygments_lexers=1.1.1
- jedi=0.19.2
- jinja2=3.1.6
- keyutils=1.6.1
- kiwisolver=1.4.8
- krb5=1.21.3
- lcms2=2.17
- ld_impl_linux-64=2.44
- lerc=4.0.0
- libaec=1.1.4
- libblas=3.9.0
- libbrotlicommon=1.1.0
- libbrotlidec=1.1.0
- libbrotlienc=1.1.0
- libcblas=3.9.0
- libcurl=8.14.1
- libdeflate=1.24
- libedit=3.1.20250104
- libev=4.33
- libexpat=2.7.1
- libffi=3.4.6
- libfreetype=2.13.3
- libfreetype6=2.13.3
- libgcc=15.1.0
- libgcc-ng=15.1.0
- libgfortran=15.1.0
- libgfortran5=15.1.0
- libgomp=15.1.0
- libiconv=1.18
- libjpeg-turbo=3.1.0
- liblapack=3.9.0
- liblzma=5.8.1
- libnetcdf=4.9.2
- libnghttp2=1.64.0
- libnsl=2.0.1
- libopenblas=0.3.30
- libpng=1.6.50
- libsqlite=3.50.4
- libssh2=1.11.1
- libstdcxx=15.1.0
- libstdcxx-ng=15.1.0
- libtiff=4.7.0
- libuuid=2.38.1
- libwebp-base=1.6.0
- libxcb=1.17.0
- libxcrypt=4.4.36
- libxml2=2.13.8
- libxslt=1.1.43
- libzip=1.11.2
- libzlib=1.3.1
- lxml=6.0.0
- lz4-c=1.10.0
- markupsafe=3.0.2
- matplotlib-base=3.10.5
- matplotlib-inline=0.1.7
- metis=5.1.0
- moab=5.5.1
- munkres=1.1.4
- ncrystal=4.2.6
- ncrystal-core=4.2.6
- ncrystal-lib=4.2.6
- ncrystal-python=4.2.6
- ncurses=6.5
- njoy2016=2016.78
- numpy=2.3.2
- openjpeg=2.5.3
- openmc=0.15.2
- openssl=3.5.4
- packaging=25.0
- pandas=2.3.1
- parso=0.8.4
- patsy=1.0.1
- pexpect=4.9.0
- pickleshare=0.7.5
- pillow=11.3.0
- pip=25.2
- pluggy=1.6.0
- prompt-toolkit=3.0.51
- pthread-stubs=0.4
- ptyprocess=0.7.0
- pure_eval=0.2.3
- pygments=2.19.2
- pyparsing=3.2.3
- pytest=8.4.1
- python=3.12.11
- python-dateutil=2.9.0.post0
- python-tzdata=2025.2
- python_abi=3.12
- pytz=2025.2
- qhull=2020.2
- readline=8.2
- scipy=1.16.0
- seaborn=0.13.2
- seaborn-base=0.13.2
- setuptools=80.9.0
- six=1.17.0
- snappy=1.2.2
- stack_data=0.6.3
- statsmodels=0.14.5
- tempest-remap=2.2.0
- tk=8.6.13
- tomli=2.2.1
- tqdm=4.67.1
- traitlets=5.14.3
- typing_extensions=4.14.1
- tzdata=2025b
- uncertainties=3.2.3
- unicodedata2=16.0.0
- wcwidth=0.2.13
- wheel=0.45.1
- xorg-libxau=1.0.12
- xorg-libxdmcp=1.1.5
- zlib=1.3.1
- zstd=1.5.7
- python=3.12
- numpy
- pip
- pytest
- pandas
- uncertainties
- scipy
- tqdm
- openmc
- seaborn
- pip:
- https://github.com/terrapower/armi/archive/main.zip
- coverage==7.10.5
- ordered-set==4.1.0
- pydoe==0.3.8
- pyevtk==1.6.0
- ruamel-yaml==0.18.15
- ruamel-yaml-clib==0.2.12
- toml==0.10.2
- voluptuous==0.15.2
- yamlize==0.7.1
- -e .
- https://github.com/terrapower/armi/archive/main.zip
Empty file removed examples/empty_run/input.json
Empty file.
Loading
Loading