Easiest Method to Copying Cells

Hi, I am making a CANDU reactor for depletion, and I have decided to separate my core into individual fuel bundles in order to be able to preform accurate refueling between depletion steps. I also reduced it down to a 1/4 core with reflective conditions to simulate a full core. I’m wondering if the easiest way is to duplicate the cells that will be required in multiple universes, for example my standard fuel universe is defined using a bundle universe made of 2 cells, a pressure tube cell, a CO2 cell, a Calandria cell, and lastly the moderator cell. Now if I wanted to separate these all, from my understanding I need to duplicate every cell using the following line,
cell1_copy = cell.clone(clone_materials=False, clone_regions=False)
Which makes a completely unique cell with unique identifier but uses the same material?. Therefore, if I were to try to replace after a depletion calculation I would have an issue since its the same material spread over the reactor right? So do I need to make an individual fuel material for each fuel cell? and instead of cloning it, I just reconstruct the same cell with the only difference being the material, and then when I want to refuel just swap the depleted material to fresh fuel, while cloning the rest? I see that the clone feature allows you to clone materials as well, which seems like this is the use case, but how would you interact with the clone materials before the next depletion step if you haven’t directly created it. Thanks for your help in advance, I hope I made it clear what issues I have been having.

Hi Jarret, welcome to the community
I haven’t used the clone feature before, but from this documentation, I think openmc can create separate material with different IDs if you use clone_materials=True, i.e. CopyOfCellA = CellA.clone(clone_materials=True, clone_regions=False)
https://docs.openmc.org/en/stable/pythonapi/generated/openmc.Cell.html#openmc.Cell
But you will need to check the material ID for each clone to interact with it after doing some depletion calculation because openmc will assign the appropriate material ID to it.

But if you already have comfort with generating separate material with your specific ID assigned, i.e FuelA1 (material_id=11), FuelA2(material_id=12), FuelA3(material_id=13) … FuelB1(material_id=21), FuelB2(material_id=22) so on… and then apply this material to separated cell/universe, then you will have full control of your depleted material, including their assigned ID.

update: I am trying this feature this morning and I think you need more attention to the assigned material ID being used on your cloned cell, just to make sure that you have that material on your material list. Here my small example notebook for this case, and I also use clone material
cloning.ipynb (34.3 KB)

I hope other members who have experience with cell clones can give their insight on this topic.

Thank you for you input, I wish there was a feature where you could clone the materials and cell using this feature directly assigning the cloned material with a name as well.

I think that already possible as you can see from that notebook that you could assign the new cloned material as a fill material to the cloned cell. But maybe that’s not as “directly” as you want, since it needs some additional line input. Hehehe