Skip to content

Conversation

@john-science
Copy link
Member

@john-science john-science commented Oct 24, 2025

What is the change? Why is it being made?

This PR is non-API-breaking progress on ticket number 473. This is a follow up to the step 0 PR and the thermal scatter redesign PR.

In this PR, I try to get rid of the global access to nuclideBases information wherever possible. I am STILL using the global data, as this PR is not API-breaking in any way. But I switch to using the reference of Reactor.nuclideBases. The goal of this PR is to finish off ALL the work we can do to get rid of global nuclides, without breaking the ARMI API. As such, this is a big PR with a lot of little changes:

Architectural Changes

  • added Reactor.nuclideBases to the Reactor constructor
  • added a nuclideBases property to every Composite, to try and grab nuclides from the Reactor
  • Case._initBurnChain now takes r as an input
  • Moved getReactionRateDict from global into Composite class
  • Moved initBurnChain from Case to Reactor
  • Removed all that addToGlobal stuff from PR number 2303.

Switched from using Global to r.nuclideBases where Easy

  • armi/bookkeeping/db/database.py:from armi.nucDirectory import nuclideBases
  • armi/nucDirectory/init.py: - docstrings
  • armi/nucDirectory/nuclideBases.py: - docstrings
  • armi/nucDirectory/elements.py: from armi.nucDirectory import elements
  • armi/physics/neutronics/latticePhysics/latticePhysicsWriter.py:from armi.nucDirectory import nuclideBases
  • armi/reactor/blocks.py:from armi import nuclideBases
  • armi/reactor/components/component.py:from armi.nucDirectory import nuclideBases
  • armi/reactor/composites.py:from armi.nucDirectory import elements, nucDir, nuclideBases
  • armi/materials/water.py:from armi.nucDirectory import elements
  • armi/nucDirectory/tests/test_elements.py:from armi.nucDirectory.nuclideBases import NuclideBases
  • armi/nucDirectory/tests/test_nucDirectory.py:from armi.nucDirectory import nuclideBases
  • armi/nucDirectory/tests/test_nuclideBases.py:from armi.nucDirectory.nuclideBases import (
  • armi/nucDirectory/tests/test_transmutations.py:from armi.nucDirectory.nuclideBases import NuclideBases
  • armi/nuclearDataIO/cccc/tests/test_dlayxs.py:from armi.nucDirectory import nuclideBases
  • armi/nuclearDataIO/cccc/tests/test_isotxs.py:from armi.nucDirectory import nuclideBases
  • armi/nuclearDataIO/tests/test_xsLibraries.py:from armi.nucDirectory import nuclideBases
  • armi/physics/neutronics/fissionProductModel/tests/test_fissionProductModel.py:from armi import nuclideBases
  • armi/physics/neutronics/fissionProductModel/tests/test_lumpedFissionProduct.py:from armi.nucDirectory import ...
  • armi/reactor/blueprints/tests/test_blueprints.py:from armi.nucDirectory.elements import bySymbol
  • armi/cases/case.py
  • armi/reactor/tests/test_blocks.py:from armi.nucDirectory import nucDir, nuclideBases
  • armi/utils/tests/test_densityTools.py:from armi.nucDirectory import elements, nuclideBases
  • cleaning up docs
    • doc/gallery-src/analysis/run_blockMcnpMaterialCard.py:from armi.nucDirectory import nuclideBases as nb
    • doc/gallery-src/framework/run_chartOfNuclides.py:from armi.nucDirectory.nuclideBases import NuclideBases
    • doc/gallery-src/framework/run_computeReactionRates.py:from armi import configure, nuclideBases, settings
    • doc/gallery-src/framework/run_materials.py:from armi.nucDirectory import nuclideBases
    • doc/gallery-src/framework/run_transmutationMatrix.py:from armi.nucDirectory import nuclideBases
    • doc/tutorials/nuclide_demo.ipynb: "from armi.nucDirectory import elements, nuclideBases"

SCR Information

Change Type: features

One-Sentence Description: Moving to use Reactor.nuclideBases, where possible.

One-line Impact on Requirements: I_ARMI_ND_ELEMENTS0 for R_ARMI_ND_ELEMENTS0 is being rewritten to be less global. All implementation tags for R_ARMI_ND_ISOTOPES should be considered touched, as we are rewriting that code to be less global. Touched I_ARMI_R because we added a property to the Reactor class. Minor tweak to T_ARMI_UTIL_EXP_MASS_FRACS, but no meaningful change.


Checklist

@john-science john-science added the architecture Issues related to big picture system architecture label Oct 24, 2025
@opotowsky
Copy link
Member

ping me offline when you're ready for a review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architecture Issues related to big picture system architecture

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants