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

Request: Enable restarting at EOL node #945

Open keckler opened 1 year ago

keckler commented 1 year ago

Sometimes there are calculations performed at the EOL step. Right now, if you want to restart to that point, the best you can do is to restart to the last (cycle, node), but that still puts you at the beginning of that (cycle, node) (at least that is my understanding), and then you have to traverse all the interfaces at the time point.

It'd be nice to be able to skip all the calcs of the last (cycle, node) and just go straight to the EOL step.

Seems like this should be possible.

john-science commented 1 year ago

It sounds like most people in this scenario would just load the Database, after the simulation is done, to do analysis.

Is there a reason using the "restart" logic is easier than that?

keckler commented 1 year ago

Well, I'm not talking about some minor post-processing calculations here. I have numerous interfaces in the stack that have interactEOL() hooks with heavy calculations. I guess what you're saying is possible, but then I'd have to trigger the interfaces myself, instead of just running through the stack.

In the past few days, I've had to redo those EOL calculations numerous times, and it's been a little annoying having to repeat all the calculations from the last cycle/node before being able to get to the EOL step.

To me, EOL is a step, and restarting at that step seems like it should be possible.

This is just a request, not urgently needed. But somewhere that the code is currently lacking that could be improved.

john-science commented 1 year ago

That makes sense.

Let's see, the relevant lines of code are here:

https://github.com/terrapower/armi/blob/54623442d2dff168ad835e182775afe7c779af24/armi/bookkeeping/db/database3.py#L325-L336

And that gets called by Database3._activateDB().

I believe this would be a minimal-effort, low-impact change. I'm on board.

john-science commented 3 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 going through all the ARMI tickets.)

keckler commented 3 months ago

Just unassigned myself.