armi icon indicating copy to clipboard operation
armi copied to clipboard

Request: Enable restarting at EOL node

Open keckler opened this issue 3 years ago • 5 comments

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.

keckler avatar Oct 18 '22 16:10 keckler

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?

john-science avatar Oct 22 '22 16:10 john-science

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.

keckler avatar Oct 24 '22 17:10 keckler

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 avatar Oct 24 '22 18:10 john-science

@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.)

john-science avatar Mar 12 '24 21:03 john-science

Just unassigned myself.

keckler avatar Mar 17 '24 15:03 keckler

There is a PR currently open that should greatly simplify this ticket.

Essentially, the EOL will be correctly in place now, and differentiable from the last cycle, node combination. Now we just need to update getPreviousTimeNode() with some way to access the EOL data in the DB:

https://github.com/terrapower/armi/blob/d0092e8b022c593e341c09cecb4f597687222417/armi/utils/init.py#L433

We could allow for "EOL" to be provided as a string. Or use -1 to represent it, or something.

But it should be quite doable now.

john-science avatar Jul 15 '24 17:07 john-science

@keckler Can we close this ticket now?

john-science avatar Jul 31 '24 23:07 john-science

Yes, I suppose that after #1100 , the EOL isotopics are no longer stored. So this ticket is now irrelevant.

keckler avatar Aug 01 '24 16:08 keckler