# OpenMC Homogenous Cell Test verification

**URL:** <https://openmc.discourse.group/t/openmc-homogenous-cell-test-verification/4664>\
**Category:** User Support\
**Created:** [August 8, 2024, 7:33am UTC](https://openmc.discourse.group/t/openmc-homogenous-cell-test-verification/4664 "2024-08-08T07:33:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bushnag](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@Bushnag](https://openmc.discourse.group/u/Bushnag)\
**Post date:** [August 8, 2024, 7:33am UTC](https://openmc.discourse.group/t/openmc-homogenous-cell-test-verification/4664/1 "2024-08-08T07:33:31Z")

</div>

Greetings dear community,

I am testing the homogenous function of “openmc.Material.mix\_materials()” and comparing it with the results of manually defined mix material. and the results differ significantly.

The test is:  
cube cell of 1.26 cm in length (reflective surfaces) with 2 materials:  
H2O  
UO2 (4.5% U235)

isotopes used  
H1, H2, O16, O17, O18, U238, U234, U235 (4.5%)  
all the isotopes are of natural abundance composition except U235

the first test I defined each material separately and then used the openmc function.  
the second test i defined one material incorporating the composition of the two materials with updating the density, w%, a% of each isotope respective to the new state of matter as a mixture.

Results are:  
OpenMC function: K = 1.43 ,  
Manually: K = 1.2

am I missing something? or should I consider extra elements when defining the homogenous mixture in Openmc? or it just doesn’t run properly if I defined it manually?

I would pretty much appreciate the help.

---

<div class="post-metadata">

**Author:** ![wahidluthfi](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/wahidluthfi/32/3375_2.png) [@wahidluthfi](https://openmc.discourse.group/u/wahidluthfi)\
**Post date:** [August 8, 2024, 9:45am UTC](https://openmc.discourse.group/t/openmc-homogenous-cell-test-verification/4664/2 "2024-08-08T09:45:05Z")

</div>

Hi Bushnag, welcome to community.  
I think you can check the atomic density of each isotopes calculated by openmc mix material and compared it with your calculated (manual) atomic density.  
Try using the get\_nuclide\_atom\_densities(), get\_mass() or get\_mass\_density()  
[https://docs.openmc.org/en/latest/pythonapi/generated/openmc.Material.html#openmc.Material](https://docs.openmc.org/en/latest/pythonapi/generated/openmc.Material.html#openmc.Material)

You can start from something simple at first, maybe just mixing some isotopes instead of nuclide, then nuclide with natural abundance, and then an enriched one.  
I think it might came from the difference between what we think openmc did and what actually have been done inside openmc.

---

<div class="post-metadata">

**Author:** ![Bushnag](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@Bushnag](https://openmc.discourse.group/u/Bushnag)\
**Post date:** [August 8, 2024, 10:34am UTC](https://openmc.discourse.group/t/openmc-homogenous-cell-test-verification/4664/3 "2024-08-08T10:34:06Z")

</div>

Thank you for your response. 😄 I will check this and try solving the issue. i’ll do as you suggested.  
thanks again!
