# Distinguish depletion materials when using diff\_burnable\_mats=True

**URL:** <https://openmc.discourse.group/t/distinguish-depletion-materials-when-using-diff-burnable-mats-true/3587>\
**Category:** User Support\
**Created:** [November 2, 2023, 3:11am UTC](https://openmc.discourse.group/t/distinguish-depletion-materials-when-using-diff-burnable-mats-true/3587 "2023-11-02T03:11:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fyh\_sinap](https://avatars.discourse-cdn.com/v4/letter/f/ed655f/32.png) [@fyh\_sinap](https://openmc.discourse.group/u/fyh_sinap)\
**Post date:** [November 2, 2023, 3:11am UTC](https://openmc.discourse.group/t/distinguish-depletion-materials-when-using-diff-burnable-mats-true/3587/1 "2023-11-02T03:11:17Z")

</div>

Dear guys,  
I’m trying to partition the fuel to realize an accurate burnup calculation , get power distribution evolution over time and obtain local burnup level . For this purpose, I use the diff\_burnable\_mats=True property in CoupledOperator instance to distinguish the same fuel material in different lattice. However, In the materials.xml file getting from the results class, these materials become indistinguishable except the id.  
I want to know how to relate the id of these materials to the cell index where the fuel is located so that I can get the burnup depth at different locations.  
Thank you.

 ![2023-11-02 110559](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/d/d0c0c17d4eb833e7b0fc92ac4abedacebc2e1681.png)

---

<div class="post-metadata">

**Author:** ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)\
**Post date:** [November 2, 2023, 11:01am UTC](https://openmc.discourse.group/t/distinguish-depletion-materials-when-using-diff-burnable-mats-true/3587/2 "2023-11-02T11:01:59Z")

</div>

Hi fyh\_sinap

Perhaps you can use the cell bounding box to get the location of the material, here are some links to the docs for the latest version of openmc. Bounding\_box has a . **center** attribute

[https://docs.openmc.org/en/latest/pythonapi/generated/openmc.Cell.html](https://docs.openmc.org/en/latest/pythonapi/generated/openmc.Cell.html)  
**bounding\_box**

[https://docs.openmc.org/en/latest/pythonapi/generated/openmc.BoundingBox.html#openmc.BoundingBox](https://docs.openmc.org/en/latest/pythonapi/generated/openmc.BoundingBox.html#openmc.BoundingBox)

---

<div class="post-metadata">

**Author:** ![cjwiguna](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/cjwiguna/32/3728_2.png) [@cjwiguna](https://openmc.discourse.group/u/cjwiguna)\
**Post date:** [March 19, 2025, 7:11pm UTC](https://openmc.discourse.group/t/distinguish-depletion-materials-when-using-diff-burnable-mats-true/3587/3 "2025-03-19T19:11:43Z")

</div>

Hello, I’m far too late to join the party, but for the records I think I get the gist of how to know which material at what cells.

Method 1:  
First, we can get cell instance from a coordinate in geometry using `Geometry.find`:  
`targetCell = geometry.find((x,y,z))[-1]`  
Then add volume: `targetCell.volume = fuelVolumeAtThatCell`  
At last, `nuclidesInTarget = targetCell.atoms`

Method 2:  
First, generate the CSG paths:  
`geometry.determine_paths()`  
Then get instance number with `Geometry.get_instances`:  
`instanceIdx = geometry.get_instances(le_path)`

To get `le_path`, we should consult [the geometry docs](https://docs.openmc.org/en/stable/pythonapi/generated/openmc.Geometry.html#openmc.Geometry.get_instances). But if our lattices are simple enough, one could deduct the pattern of the CSG paths. Let say we want to know the path for **all cell instances** :  
`print(targetCell.paths)`

It may returns something like:

```auto
['u9->c10->l7(7,1)->u5->c7->l3(0,0)->u1->c1',
 'u9->c10->l7(7,1)->u5->c7->l3(1,0)->u1->c1',
 'u9->c10->l7(7,1)->u5->c7->l3(2,0)->u1->c1',
 'u9->c10->l7(7,1)->u5->c7->l3(3,0)->u1->c1',
...
]

```

This is an AP-1000 miniaturized cores. Let’s say we want to get cell at assembly (8,8) (the center assembly), and in that assembly we want to get the fuel pin next to the center guide tube (coordinate 9,8), so:  
`le_path = 'u9->c10->l7(8,8)->u5->c7->l3(9,8)->u1->c1'`

The result is `instanceIdx = 20724` (the total pins inside AP-1000 is 41448, and 20724 is exactly half of it). We can use `instanceIdx` to then determine which materials assign to that cell specifically (just count all the materials with the same name until 20724, beware of off-by-one error!).

For the record, I don’t like either methods; there should be a way to return composition of nuclides inside a cell whose fill\_type is distribmat, inside a lattices from the get-go.
