Depletion using analytical solution

Hi everyone,

While using openmc a lot for various purposes, I wondered if they were a solver using analytical solution for depletion in openmc. I think the answer is no, right ?

I mean an algorithm that solves the problem X’ = AX, with X, the isotope quanties vector and A, the mass transfer matrix (with flux, cross sections, decay constants etc…)

The main advantage of this solution is to replace Independant operators, when there is no flux variations and no external mass transfer (we can still use the analytical solution if the mass transfer is constant over time by solving X’ = AX + B) no need to use a complicated and possibly unstable solver to track nuclides quantity evolution.

Do you think it is an interesting capability to be developed ?

1 Like

Jin has made a proof of concept PR which you might be interested in as it sounds similar microxs from mg flux and chain file by jbae11 · Pull Request #2755 · openmc-dev/openmc · GitHub

Well, I would get more focused on the resolution of bateman equations. If you have constant mass transfer, flux, microxs and decay constants, you can always solve your problem analytically.

I developed my own code that does that, as a layer 2 for openmc (it takes the same chain.xml file and MicroXS.csv format as openmc).

For my purpose, it works well enough but maybe some other people are interested in that.

1 Like

I’m interested in that, any chance we can have a lightning talk at the next openmc monthly meet up?

Why not, I need authorizations from my managers, then I am coming back to you asap.

Hi everyone. I am so sorry for the time it took, I started the process for the code to be released out but got taken by other obligations. I am now allowed to share my code with you, guys. A lot of it is just recovering openmc depletion data that already exists natively and should be easy to reproduce. The “solver” part is not really complicated.

Are you still interested ?

Yes it still sounds interesting to me at least, is there a git repository that we can take a look at

1 Like

Yes → GitHub - pferney05/batman.py: A little code development to be integrated hopefully to openmc

So you can look at what demo0.py and demo1.py do to understand the philosophy of my code.

If you have null flux you can just load a depletion_chain file (demo0.py). These depletion chain files are the same as the one used by openmc.
If you have flux, ou will need in input a XS.csv file similar to thee ones produced by the old version of openmc for depletion (demo1.py).

Most of batman.py is of no particular interest as Depletion objects probably do a similar job of loading the depletion chain. The Sequence class do not work properly. You might want to use the Continuous class to solve depletion problems. What might be of interest is line 603, the solve method, that defines a problem solvable using scipy.

If you have any question, please feel free to reach me.

1 Like