Struggling to plot geometry with mix_materials

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

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

the error

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:

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 :pray:. also very sorry for my bad english

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

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

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.

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

1 Like

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

Whoaa, thanks, may all good things come to you