Hi everyone,
I am working on simulating the fuel cycle of a CANDU within OpenMC, including depletion into refuelling and balancing criticality with soluble boron. I am having issues with transferring the material.xml from the depletion results to the criticality search function I have setup. I am wondering how others have achieved this, since, as far as I know every reactor requires criticality balancing over their lifetime, therefore if someone has simulated a fuel cycle before they must have completed this. I have tried some methods to pass in the materials and reconstruct the moderator, and it worked for a simplified model, but it corrupts the files when used on my full-core model for some reason (it screws up the float variables even though there isn’t any visible issues, they don’t act like proper floats anymore and as a result I get a stod error when running a transport sim) thereby preventing me from the next step. If anyone who has done this could inform me on how they managed to make it work I would appreciate it a lot, either through this post or by pming me.
From what I can tell, we are pretty early on for depletion in a critical configuration using OpenMC. There is an open PR right now that is fleshing out how to do search for keff combined with depletion, but it’s still a WIP. I am also very interested in critical depletion, so I can update you if I hear anything. But feel free to monitor progress / contribute here.
I’m also curious about the exact error messages you’re getting / how you’ve set up your critical search to work with depletion. AFAIK it might be a little tricky to
- 
search for critical
 - 
update the model
 - 
then run a depletion step
 
on your own as of now.
Hi Ligross,
I must admit I am ignorant of architecture of code and data storage, I figured this was an easy problem once you had the model created and the criticality search function defined, and that this was one of the main purposes of a criticality function (following depletion), but clearly there is something I don’t understand. Thinking this, I added a little bit of code to pass in the materials.xml that I exported from the results into the parametrized model, as you can see from this post I made here helping someone with a similar issue,
This worked for a simplified model I had of only a 2 by 2 infinite array of CANDU fuel, but when I tried to use my full CANDU model it gives me the STOD error.
So something is getting corrupted or confused during the model building. It might have to do with how I have my model build dynamically. It gives this error even outside of the criticality search function during a normal transport run. I tried to troubleshoot and find which float could be incorrect, but I couldn’t find anything, everything looks normal even looking at the hidden code. At this point, I will probably just make a simplified function that evaluates the k-eff and how close it is to criticality, which will keep running transports and evaluating the result as if someone was manually adjusting the concentration, without using a parametrized model, since for my case I am modifying a variable that has a simple relationship with k-eff (boron is a strong poison, especially absorption, so increasing concentration will always lower the k-eff) therefore there shouldn’t be issues with converging.
I have tried a bunch of different changes, and the thing that fixed it was setting the nuclides that had concentrations of 1e-30 (this was arbitrary, just a low enough value to not be significant) and below to 1e-29. I pass in the materials by writing a script that basically logs all the useful information from a materials container that contains the materials after depletion into an excel spreadsheet, and then pulling from that spreadsheet the data within the criticality function’s model declaration, except for the moderator (as that contained the boron being parametrized) in which I reconstruct normally as its concentration doesn’t change with depletion. Lastly, modifying the nuclide densities of the fuel that were below 1e-30 as previously stated. I did 0 at first, but if I kept that it would constantly be resetting the buildup of my isotopes from depletion, this way if they were going to build up to significant quantities, they would have the ability to do so, but just starting at a slightly higher concentration. I had concentrations of 1e-187 (this was the lowest I saw from a quick scroll through the nuclide densities although there might be some even lower), and I think these were having issues when trying to do a criticality search. I didn’t think this would be the issue since I was able to run a criticality search of a simplified version (4 fuel elements) that had these type of values for their concentrations, and I was able to run a normal k-eff run with the exact same complicated model (~1100 fuel elements) but without the moderator parametrized for the criticality search function. I even tried to run the same model using openmc.run using the parametrized model not in the criticality function and the same stod error appeared. It was the combination of both the parametrized model and the very low isotopes that caused the stod errors. I have no idea why, but now that it works I don’t care to figure out more, if anyone wants to justify it I would be interested, but otherwise I am moving on. If someone wants the fix so they can run a depletion into a criticality search I can tell you more in detail how I managed it if requested.


