# Struggling to plot geometry with mix\_materials

**URL:** https://openmc.discourse.group/t/struggling-to-plot-geometry-with-mix-materials/4798
**Category:** User Support
**Created:** [September 15, 2024, 5:07am UTC](https://openmc.discourse.group/t/struggling-to-plot-geometry-with-mix-materials/4798 "2024-09-15T05:07:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![danii](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@danii](https://openmc.discourse.group/u/danii)
#### Post date: [September 15, 2024, 5:07am UTC](https://openmc.discourse.group/t/struggling-to-plot-geometry-with-mix-materials/4798/1 "2024-09-15T05:07:40Z")

</div>

Hi, I encountered this error while trying to plot universe with mix\_materials involved in it. Here the code

```auto
core_1_uni.plot(basis = 'xy', origin = [0, 0, 0])

```

the error

```auto
No macroscopic data or nuclides specified on material 9 -------------------------------------------------------------------------- MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD with errorcode -1. NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them. --------------------------------------------------------------------------

```

material 9:

```auto
mix_fast = openmc.Material(name = 'Homogenised Fast Material')
mix_fast.mix_materials([UO2, PuO2, SUS, sodium], [0.56, 0.14, 0.1, 0.2], 'wo')
materials.append(mix_fast)

```

how can i resolve this error? thank you 🙏. also very sorry for my bad english

---

<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: [September 16, 2024, 12:16am UTC](https://openmc.discourse.group/t/struggling-to-plot-geometry-with-mix-materials/4798/2 "2024-09-16T00:16:16Z")

</div>

Hi Rahmadani, welcome back to the community.  
I think the problem came from your mixed materials input, which makes the material has no isotopes in its composition and failed to plot.  
Instead of initializing mix\_fast as and openmc.Material and add the mix\_materials properties in it, you can declare the mix\_fast directly as a mix material. then the openmc will declare each isotope composition.

this is what it looks like when you use your input, the mix\_fast will be empty

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/3/3894cb5fbbce596f56970a6d964f893378378dd9.png)

but, if you declare your mix\_fast as an openmc.Material.mix\_materials (directly), then it will look like this and the composition will be added to the material

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/4/4d61e3c6c347632345559aab98aeed2578534414.png)

here is the modified input script, you can add a name or if you forgot, then by default, it will use the mix material fraction you used as its name.

```auto
mix_fast = openmc.Material.mix_materials([UO2, PuO2, SUS, sodium], [0.56, 0.14, 0.1, 0.2], 'wo')
# mix_fast = openmc.Material.mix_materials([UO2, PuO2, SUS, sodium], [0.56, 0.14, 0.1, 0.2], 'wo', name = 'Homogenised Fast Material')
mix_fast

```

after that, I can use the material in my plot

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/8/880e6801101aedcc5f9960cb311cab7bf115b055.png)

---

<div class="post-metadata">

### Author: ![danii](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@danii](https://openmc.discourse.group/u/danii)
#### Post date: [September 16, 2024, 7:04am UTC](https://openmc.discourse.group/t/struggling-to-plot-geometry-with-mix-materials/4798/3 "2024-09-16T07:04:53Z")

</div>

thank you very much sir! may God ease all your ways

---

<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: [September 16, 2024, 10:37pm UTC](https://openmc.discourse.group/t/struggling-to-plot-geometry-with-mix-materials/4798/4 "2024-09-16T22:37:56Z")

</div>

Whoaa, thanks, may all good things come to you
