-
Notifications
You must be signed in to change notification settings - Fork 580
depletion-thermochemistry: Redox control transfer rates #2783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
depletion-thermochemistry: Redox control transfer rates #2783
Conversation
|
Why should this be added to OpenMC? IMO it is a little too specific and unrelated to particle transport. There are a variety of ways to solve this particular problem, potentially using the Gibbs energy minimization approach, for example. What I hope we could add is a way to modify the conditions of the depletion run so that very specific code like this can be kept in an external package. For example it would be nice to make changes through the C API over the course of depletion. As a matter of fact this is something I've been looking into lately, for example doing branch calculations at each depletion point. Considering how many reactor concepts are out there, IMO we should make the code general so that specifics like this can be handled on the user side. |
|
Hi @gridley and thanks for your comment. I agree this can be solved in many different ways, but this implementation relies on recent TransferRates implementation to add a new term to the Bateman equation directly, i.e. modifying the nuclides vector continuously, without acting step-wise at each depletion point. I've also pulled another PR #2693 to perform batchwise actions during a depletion calculation, if is somehow related to your branch implementation, we should probably combine the efforts. |
|
After looking at the code, I now see that this is a single up-front step rather than something done continuously over the depletion run. So, it even further solidifies my opinion that this should go into an external package for two main reasons.
I think we should just wait for someone else's opinion on the matter here though. Perhaps my thinking is totally out of line with how the OpenMC project should be steered. After all, why not add all the bells and whistles? |
|
@gridley thanks for getting back to this. In regards to your concerns:
|
|
@church89 Well, I have been thinking about this problem for a while. I think it sounds like a useful feature for a small subpopulation of openmc users. Are there any published papers showing that this works? Or showing the impacts of tracking the redox? Back in my day studying this stuff, I found that adding buffer has a pretty negligible impact on neutronics for the most part, although I understand why it'd be nice to be extra sure and check this. One thing that bothers me is that there doesn't seem to be a straightforward way to track the total amount of buffer added over time, at the moment. Am I correct in thinking the current code does not do that? It would be essential for checking the mass balance is reasonable. Lastly, I'm a little confused about one thing. The buffer addition rate is controlled by the loss or gain rate of nuclides in a material, which in general might represent values that change over time. So, this matrix has to get re-formed at every single depletion substep, correct? It isn't just using the 1rst step's reaction rates, right? |
|
Hi @gridley thanks again for taking a look at this:
|
|
Makes sense to me @church89! This is a pretty neat feature... I wonder if there's any experimental data for MSRE, as to how much buffer was added to the salt over time. Wasn't it just uranium metal that was added in the sampler bucket? Also, it appears one pretty essential piece of machinery is missing. Don't you think we should have the addition rate and total amount of buffer added over time as an output? Currently this approach is going to continuously add mass over time, but appears to not account for the volume increase that comes along with that. It would be nice to check the mass balance. I assume that mass density is frozen. This will make it look like other nuclides are vanishing if you add in material and account for it in the isotopic breakdown but do not adjust density to preserve total mass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@church89 Can you get this branch up-to-date (looks like there are conflicts currently)? Apologies this one has lingered!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@church89 Here's an initial review for this PR. I don't see any major blocking issues here so just a few minor things to take care of. It looks like your branch has gotten out-of-sync again with the develop branch, so please update that when you get a chance as well.
Once you get the branch updated based on the comments, feel free to hit the "Allow maintainers to edit" checkbox and I can take care of any lingering items at that point and get this merged. Thanks for your contribution again and sorry for the long delay on this PR!
openmc/deplete/chain.py
Outdated
| gains = np.concatenate((array[:i,i], array[i+1:,i])) * np.delete(ox, i) | ||
| # Loss: multiply the i-th term by its corresponding oxidation state value | ||
| loss = array[i,i] * ox[i] | ||
| # Calculate the redox term | ||
| redox = np.append(redox, loss + sum(gains)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've stared at this a long time and it looks to me like both terms here are positive, which would mean there's really no point of treating the off-diagonal terms separately. Based on the equation, it looks like the gains should be negative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I guess I wanted to separate the two terms (loss and gain) for better comprehensions, but it's much more cleaner and simple to combine in one simple notation.
Also regarding the sign it's a bit misleading, I'll update the equation and the text to better explain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, thanks @church89! Just ping me once this PR is ready for another review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @paulromano, should be good now. Unfortunately I don't find the "Allow maintainers to edit" button as the PR is created from a fork living under an organization (I think it's a current Github problem, inconveniently not easy to overcome)
Updates on redox branch for PR 2783
Description
This PR adds a redox control (initially thought for molten salt reactors) functionality to the$F^{-}$ ), a cationic charge deficiency and therefore a reduction of the fuel salt (decrease of redox potential).
TransferRatesclass, as a further term added to the Bateman equation to maintain the redox of the fuel salt constant during a depletion simulation, by continuously adding or removing a user-defined buffer nuclides vector.In uranium fluoride molten salts , for example, assuming all uranium is UF4 (therefore assuming oxidation state of Uranium +4), 4 atoms of fluorine are free every time a fission event occurs, which will then bind with fission products with lower oxidation states than uranium (with an average oxidation state of approx. +3), giving rise to an excess of free fluorine anions (
Assuming the oxidation states of the nuclides present in the salt are known, the average oxidation state$\bar{OS}$ can be computed multiplying the number of atoms $N_i$ of each nuclide present in the salt, by their oxidation states $OS_i$ :
A generic buffer nuclide$N_j$ can be used to compensate the exact change of fluorine atoms and a further term added to the Bateman equation as such:
where the first terms of the equation have been omitted.
$OS$ is the oxidation state vector and $a_{ij}$ the corresponding term of the depletion matrix.
Example
Results
In case of no redox control, there is an increase of fluorine atoms that can be compensated by adding buffer U238 to the fuel salt:
Checklist
[ ] I have run clang-format (version 15) on any C++ source files (if applicable)