# Depletion calculation error: "KeyError: 'No material exists with ID=100.'"

**URL:** <https://openmc.discourse.group/t/depletion-calculation-error-keyerror-no-material-exists-with-id-100/5411>\
**Category:** User Support\
**Created:** [April 4, 2025, 2:01am UTC](https://openmc.discourse.group/t/depletion-calculation-error-keyerror-no-material-exists-with-id-100/5411 "2025-04-04T02:01:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AbdullahAlharbi](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@AbdullahAlharbi](https://openmc.discourse.group/u/AbdullahAlharbi)\
**Post date:** [April 4, 2025, 2:01am UTC](https://openmc.discourse.group/t/depletion-calculation-error-keyerror-no-material-exists-with-id-100/5411/1 "2025-04-04T02:01:48Z")

</div>

Hello, I tried to use the depletion module for the first time today but I ran into an issue, when I run the depletion just as a test with one time step and a contant power of 100 W, it gives me this error: "WARNING: Negative value(s) found on probability table for nuclide Cd106 at 294K  
WARNING: Negative value(s) found on probability table for nuclide Ar36 at 294K

WARNING: Could not find material 1 specified in plot 1  
WARNING: Could not find material 2 specified in plot 1  
WARNING: Could not find material 3 specified in plot 1  
WARNING: Could not find material 4 specified in plot 1  
WARNING: Could not find material 5 specified in plot 1  
WARNING: Could not find material 6 specified in plot 1  
WARNING: Could not find material 7 specified in plot 1  
WARNING: Could not find material 8 specified in plot 1  
WARNING: Could not find material 1 specified in plot 2  
WARNING: Could not find material 2 specified in plot 2  
WARNING: Could not find material 3 specified in plot 2  
WARNING: Could not find material 4 specified in plot 2  
WARNING: Could not find material 5 specified in plot 2  
WARNING: Could not find material 6 specified in plot 2  
WARNING: Could not find material 7 specified in plot 2  
WARNING: Could not find material 8 specified in plot 2  
WARNING: Could not find material 1 specified in plot 3  
WARNING: Could not find material 2 specified in plot 3  
WARNING: Could not find material 3 specified in plot 3  
WARNING: Could not find material 4 specified in plot 3  
WARNING: Could not find material 5 specified in plot 3  
WARNING: Could not find material 6 specified in plot 3  
WARNING: Could not find material 7 specified in plot 3  
WARNING: Could not find material 8 specified in plot 3  
WARNING: Could not find material 1 specified in plot 4  
WARNING: Could not find material 2 specified in plot 4  
WARNING: Could not find material 3 specified in plot 4  
WARNING: Could not find material 4 specified in plot 4  
WARNING: Could not find material 5 specified in plot 4  
WARNING: Could not find material 6 specified in plot 4  
WARNING: Could not find material 7 specified in plot 4  
WARNING: Could not find material 8 specified in plot 4

InvalidIDError Traceback (most recent call last)  
File ~/OpenMC\_NEW/lib/python3.12/site-packages/openmc/lib/material.py:297, in \_MaterialMapping. **getitem** (self, key)  
296 try:  
 → 297 \_dll.openmc\_get\_material\_index(key, index)  
298 except (AllocationError, InvalidIDError) as e:  
299 # **contains** expects a KeyError to work correctly

File ~/OpenMC\_NEW/lib/python3.12/site-packages/openmc/lib/error.py:29, in \_error\_handler(err, func, args)  
28 if err == errcode(‘OPENMC\_E\_INVALID\_ID’):  
—\> 29 raise exc.InvalidIDError(msg)  
30 elif err == errcode(‘OPENMC\_E\_GEOMETRY’):

InvalidIDError: No material exists with ID=100.

During handling of the above exception, another exception occurred:

KeyError Traceback (most recent call last)  
Cell In[10], line 10  
6 POWER = 301.205 # Watts  
8 integrator = openmc.deplete.PredictorIntegrator(op, TIME, POWER, timestep\_units=‘d’)  
—\> 10 integrator.integrate()

File ~/OpenMC\_NEW/lib/python3.12/site-packages/openmc/deplete/abc.py:793, in Integrator.integrate(self, final\_step, output, path)  
774 “”“Perform the entire depletion process across all steps  
775  
776 Parameters  
(…)  
790 .. versionadded:: 0.15.0  
791 “””  
792 with change\_directory(self.operator.output\_dir):  
 → 793 n = self.operator.initial\_condition()  
794 t, self.\_i\_res = self.\_get\_start\_data()  
796 for i, (dt, source\_rate) in enumerate(self):

File ~/OpenMC\_NEW/lib/python3.12/site-packages/openmc/deplete/coupled\_operator.py:390, in CoupledOperator.initial\_condition(self)  
387 openmc.lib.init(intracomm=comm)  
389 # Generate tallies in memory  
 → 390 materials = [openmc.lib.materials[int(i)] for i in self.burnable\_mats]  
392 return super().initial\_condition(materials)

File ~/OpenMC\_NEW/lib/python3.12/site-packages/openmc/lib/material.py:300, in \_MaterialMapping. **getitem** (self, key)  
297 \_dll.openmc\_get\_material\_index(key, index)  
298 except (AllocationError, InvalidIDError) as e:  
299 # **contains** expects a KeyError to work correctly  
 → 300 raise KeyError(str(e))  
301 return Material(index=index.value)

KeyError: ‘No material exists with ID=100.’"

this is the material ID that raised the error: “materials  
ID = 100  
Name = UO2  
Temperature = None  
Density = 10.55 [g/cm3]  
Volume = 12149.0531936 [cm^3]  
Depletable = True  
S(a,b) Tables  
Nuclides  
U238 = 0.7038400000000001 [wo]  
U236 = 0.00018894 [wo]  
U235 = 0.02438550000000001 [wo]  
U234 = 0.00138556 [wo]  
C12 = 0.00003932267243441033 [wo]  
C13 = 4.773275655896763e-06 [wo]  
Fe54 = 1.78812034782065e-05 [wo]  
Fe56 = 0.000003027013624242066 [wo]  
Fe57 = 0.0001817216316800261e-05 [wo]  
Fe58 = 0.0006002177807866417e-06 [wo]  
O16 = 0.001279596037814502 [wo]  
O17 = 0.0166441332171615e-07 [wo]  
O18 = 0.08873180522809305e-06 [wo]  
N14 = 0.000016584685601599772 [wo]  
N15 = 0.000531439840022731e-06 [wo]  
Al27 = 0.0000000398 [wo]  
B10 = 0.00835549587507326e-06 [wo]  
B11 = 8.164450412492673e-06 [wo]  
Si28 = 0.000008071053361078421 [wo]  
Si29 = 0.0071210210309880436 [wo]  
Si30 = 0.000000063599453582277444 [wo]  
Al27 = 0.08328885 [wo],”

and this is the depletion command: "op = mc.deplete.CoupledOperator(excess\_reactivity,‘/home/user/data/projects/openmc/share/data/chain\_endfb80.xml’)

TIME = [365] # days  
POWER = 100 # Watts

integrator = openmc.deplete.PredictorIntegrator(op, TIME, POWER, timestep\_units=‘d’)

integrator.integrate()"

If anyone has an idea at least of what might be causing the issue, I’d appreciate a suggestion.

---

<div class="post-metadata">

**Author:** ![AbdullahAlharbi](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@AbdullahAlharbi](https://openmc.discourse.group/u/AbdullahAlharbi)\
**Post date:** [April 8, 2025, 4:02pm UTC](https://openmc.discourse.group/t/depletion-calculation-error-keyerror-no-material-exists-with-id-100/5411/2 "2025-04-08T16:02:56Z")

</div>

The problem has been resolved, turned out the issue is caused by the existence of multiple XML files and not reading the intended ones when wanting to run the depletion model.

I have never used the openmc.Model class, and had to use it to run the depletion module, that’s why a confusing with managing XML files occurred in the first place.
