Allow get_microxs_and_flux to use OPENMC_CHAIN_FILE environment variable (#2934)

This commit is contained in:
Ethan Peterson 2024-04-05 02:35:15 -04:00 committed by GitHub
parent cc848effe7
commit 0aad22d541
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,10 +27,9 @@ _valid_rxns.append('fission')
def _resolve_chain_file_path(chain_file: str):
# Determine what reactions and nuclides are available in chain
if chain_file is None:
chain_file = openmc.config.get('chain_file')
if 'chain_file' in openmc.config:
if 'chain_file' not in openmc.config:
raise DataError(
"No depletion chain specified and could not find depletion "
"chain in openmc.config['chain_file']"