Depletion with transfer rates is extremely slow -- culprit successfully found

Hello, I have been testing depletion with the material transfer rates feature and found it extremely slow (multiple days runtime). At first I thought that the problem was in the solver (since the matrix becomes huge and the depletion problem is solved in a single-threaded fashion) but then I discovered that the problem is actually in the form_rr_term method of deplete.chain.

There are some optimisation candidates in the v0.15.3 implementation, mainly the fact that components = tr_rates.get_components(mat, current_timestep) gets called inside the nuclide loop. After having the method optimised, the runtime drops from days to minutes (for my problem).

I’ve opened PR Speed up depletion with transfer rates by GuySten · Pull Request #3839 · openmc-dev/openmc · GitHub to fix this.

1 Like