Hello,
I am relatively new to OpenMC. I created a relatively complex reactor model using OpenMc. I defined my materials and made sure those were the materials i specified in all cells. However, when i run openmc i get this error message.
" Reading settings XML file…
Reading cross sections XML file…
Reading materials XML file…
Reading geometry XML file…
ERROR: Could not find material 86 specified on cell 17818
Abort(-1) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0
this is a snippet from the code
import openmc
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
openmc.config.cross_sections = ‘/openmc/cross-sections/cross_sections.xml’
Define Materials
CR meat made of cadmium
cd = openmc.Material(name=‘control cadmium’)
cd.set_density(‘g/cm3’, 8.65)
cd.add_element(‘Cd’, 1.0)
ss304 CR clad, Reactivty adjuster rod clad
ss304 = openmc.Material(name=’ stainless steel ss304’)
ss304.set_density(‘g/cm3’, 7.8)
ss304.add_element(‘Fe’, 0.70845, ‘wo’)
ss304.add_element(‘Cr’, 0.1800, ‘wo’)
ss304.add_element(‘Ni’, 0.0800, ‘wo’)
ss304.add_element(‘Mn’, 0.0200, ‘wo’)
ss304.add_element(‘S’, 0.0100, ‘wo’)
ss304.add_element(‘C’, 0.0008, ‘wo’)
ss304.add_element(‘P’, 0.00045, ‘wo’)
ss304.add_element(‘Si’, 0.00030, ‘wo’)
Active Fuel Material
uo2 = openmc.Material(name=‘active fuel uo2’)
uo2.set_density(‘g/cm3’, 10.66)
uo2.add_nuclide(‘U235’, 0.114313381, ‘wo’)
uo2.add_nuclide(‘U238’, 0.761063318, ‘wo’)
uo2.add_nuclide(‘U234’, 0.001758667, ‘wo’)
uo2.add_nuclide(‘U236’, 0.002198334, ‘wo’)
uo2.add_element(‘O’, 0.11839, ‘wo’)
uo2.add_element(‘Al’, 0.000250000000, ‘wo’)
uo2.add_element(‘C’, 0.000100000000, ‘wo’)
uo2.add_element(‘Ca’, 0.000100000000, ‘wo’)
Instantiate a Materials collection and export to xml
materials_file = openmc.Materials([cd, uo2, ss304])
Export materials to XML
materials_file.export_to_xml()
#Geometry definitions
Define Cylindrical Surfaces with Boundary Conditions
fuel_outer_radius = openmc.ZCylinder(r=0.215, boundary_type=‘reflective’)
clad_outer_radius = openmc.ZCylinder(r=0.275, boundary_type=‘reflective’)
#defining planes
uo2_meat_max = openmc.ZPlane(z0=11.50, boundary_type=‘reflective’)
uo2_meat_min = openmc.ZPlane(z0=-11.50, boundary_type=‘reflective’)
zr4_clad_max = openmc.ZPlane(z0=12.40, boundary_type=‘reflective’)
zr4_clad_min = openmc.ZPlane(z0=-12.40, boundary_type=‘reflective’)
Create a Universe to encapsulate the fuel rod
fuel_universe = openmc.Universe(name=‘uo2 fuel Universe’)
Create uO2 cell
uo2_cell = openmc.Cell(name=‘uo2’)
uo2_cell.fill = uo2
uo2_cell.region = -fuel_outer_radius & +uo2_meat_min & -uo2_meat_max
fuel_universe.add_cell(uo2_cell)
Please what could be the problem. Please note that this is not the complete code. It is quite long.