armi icon indicating copy to clipboard operation
armi copied to clipboard

Set materials.FAIL_ON_RANGE to True by default

Open john-science opened this issue 1 month ago • 3 comments

What is the change? Why is it being made?

We want to set armi.material.materials.FAIL_ON_RANGE to True by default. For the past ~14 years, there has been an uncomfortable situation where if someone called a material property (say Uranium density) outside a temperature range that where we know the values, the simulation would just continue. That meant ARMI simulations could continue even if they have invalid inputs.

We are finally changing the default value, and it feels great.

close #1077

SCR Information

Change Type: features

One-Sentence Rationale: A simulation that has found that it has invalid or insufficient material data should fail by default.

One-line Impact on Requirements: NA


Checklist

  • [x] This PR has only one purpose or idea.
  • [x] Tests have been added/updated to verify any new/changed code.
  • [x] The documentation is still up-to-date in the doc folder.
  • [x] The code style follows good practices.
  • [x] The dependencies are still up-to-date in pyproject.toml.

john-science avatar Dec 12 '25 21:12 john-science

  • @keckler / @aaronjamesreynolds / @sombrereau / @alexhjames

This could break your codebases. I argue this is a good thing. But if that's a problem for you, holler and I can add one line to your repo (or even just conftest.py) to recover the old ARMI functionality:

armi.material.materials.FAIL_ON_RANGE = False

I will happily make such PRs if you are negatively affected, or just hate me for this in some way.

(This PR will not be merged until after the New Year.)

john-science avatar Dec 12 '25 22:12 john-science

@john-science, I asked @jasonbmeng to look into if this affects us since I'll be out of office after today for a few weeks.

alexhjames avatar Dec 12 '25 22:12 alexhjames

@john-science, I asked @jasonbmeng to look into if this affects us since I'll be out of office after today for a few weeks.

Just a head's up, I will not merge this PR until after the New Year.

john-science avatar Dec 12 '25 22:12 john-science