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
221 stars 87 forks source link

Add setting to turn off blocks/components being auto-flagged as DEPLETABLE #451

Open keckler opened 2 years ago

keckler commented 2 years ago

Right now, a block (or component) that is not flagged by the user as DEPLETABLE will be auto-flagged by the code as DEPLETABLE if it contains an isotope/element which has been set burn=True in its nuclideFlag. This makes it so that blocks/components that a user may not have intended to deplete will be depleted. Apparently the only way to override this behavior is to explicitly assign a flag to the block/component so that the auto-flagging capability is disabled entirely for that block/component.

I would like to propose two options to override this behavior so that blocks/components are not necessarily depleted just because they contain burnable isotopes. I understand that backwards compatibility is desired on this topic, so neither of my proposals will break that.

  1. Introduce a new flag like NONDEPLETABLE that forces a given block/component to not be depleted, no matter the isotopics. This would allow a user to turn off depletion on a block-by-block basis.
  2. Introduce a new global setting that turns off the auto-flagging for the DEPLETABLE flag such that only blocks/components with the DEPLETABLE flag are actually depleted. Leave the default behavior as is.

In my opinion, this would be very useful. Oftentimes is it useful for particular compositions to not change as others are burned. This would enable a user to accomplish this without having to assign arbitrary flags to components.

Any thoughts?

jakehader commented 2 years ago

I agree that this can be improved and I like option 2. Ultimately, I'd like to see the the removal of the nuclide flags in the blueprints and have these moved to settings or represented in a different way.

For now, making a global/setting that can disable auto assigning the depletable flag to components is pretty straightforward. Want to put in a PR for this?

Maybe taking this a step further, we could have the setting be generic to disable auto flag generation from names as well. Thoughts on this @ntouran or @john-science?

keckler commented 2 years ago

I can do it, but would like to hear what @ntouran and @john-science have to say first.

john-science commented 2 years ago

Question 1

...we could have the setting be generic to disable auto flag generation from names as well.

Sorry, what? I don't follow that.

Question 2

Sorry though, I do not full understand why we want to stop depletion? Isn't this... modeling real physics in the reactor? Why would we want to spend all this effort to make the model less physical? Honest question.

My Opinion

As for the options above, I think (1) is not sufficiently different from the current situation that we should bother.

It sounds like (2) is probably the way to go. As long as old settings files that don't have this flag default to the old behavior, I'm happy.

If @keckler wants to put a PR in for this, assign me to review. I probably won't get to it this week, I'm traveling.

keckler commented 2 years ago

My understanding of what @jakehader means is this -- Right now ARMI will spawn flags for components/blocks/assemblies based on their names. So an assembly called fuel assembly 1 will get a FUEL flag and an assembly called primary absorber assembly 2 will get a PRIMARY flag, whereas an assembly called assembly 1 will not get any because it doesn't have any special keywords. I think he is suggesting a way to turn that off. Correct me if I'm wrong, though.

To your Question 2 -- There are a number of scenarios where one might want to turn off depletion from a given assembly, in the same way that one might not want to deplete a given isotope. For instance, most of the time I don't want to deplete reflector assemblies or shield assemblies, or perhaps the lower/upper reflector regions of fuel assemblies. Obviously in reality they do indeed 'deplete', but sometimes that effect is so small that it is not worth the computational expense. Right now we have the ability to turn on/off depletion of isotopes using the NuclideFlags. But just because I want to deplete one particular isotope in a given block does not mean I want to deplete every block that also contains that single isotope.

I agree that option (2) is the better way to get this done. I might not work on this immediately, but I can take the task to work on it.

Any other thoughts?

bmingst commented 2 years ago

Embedding functional information into a name field has the drawback that the name used will sometimes need to be different than the name used in the reference documents – especially if the documents are from non-English speakers. I like the idea of a setting to turn off auto-generation of flags. This would prevent unintentional flag settings based on block names and keep some backward compatibility.

john-science commented 5 months ago

@keckler This ticket is still assigned to you. That's cool with me, but if you aren't planning on working on it, please un-assign it.

(You are not being singled out, I am just trying to go through all the ARMI tickets.)

keckler commented 5 months ago

Done!