terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
212 stars 82 forks source link

Create a super minimal test reactor, and use it to speed up our unit tests #1736

Closed john-science closed 1 week ago

john-science commented 1 week ago

Right now, ARMI provides the test functionality to generate a test reactor object with loadTestReactor(). By default that uses armiRun.yaml, which generates a hex-assembly-based reactor with 9 rings and 73 assemblies.

If the developer wants a smaller reactor, they can use the method reduceTestReactorRings() to reduce the number of rings in the test reactor. But that is itself quite slow, and can slow down a test.

The only silver-bullet solution to speeding up our unit tests would be to generate a smaller test reactor from the start.

I propose the solution:

  1. We create a loadTestReactorOneBlock(), which generates a 1-assembly, 1-block reactor using the existing refOneBlockReactor.yaml.
  2. Then, where possible, we replace loadTestReactor() with the new function to speed up our unit tests.