# Loading material from Depletion Previous Results using .h5 or Material.xml

**URL:** <https://openmc.discourse.group/t/loading-material-from-depletion-previous-results-using-h5-or-material-xml/1378>\
**Category:** User Support\
**Created:** [August 14, 2021, 2:17pm UTC](https://openmc.discourse.group/t/loading-material-from-depletion-previous-results-using-h5-or-material-xml/1378 "2021-08-14T14:17:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![huak95](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/huak95/32/1442_2.png) [@huak95](https://openmc.discourse.group/u/huak95)\
**Post date:** [August 14, 2021, 2:17pm UTC](https://openmc.discourse.group/t/loading-material-from-depletion-previous-results-using-h5-or-material-xml/1378/1 "2021-08-14T14:17:37Z")

</div>

Hello, OpenMC expert.  
My OpenMC project is to make the density of coolant converged in every depletion steps.

Here is how my program work.

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

So, when the density is not converged, I use the old depletion\_results.h5 file to simulation the same time step again. After the density converged I save the new density to Material.xml file.

So, I was wonder about material using in OpenMC depletion.  
I found that in openmc.deplete prev\_results may pull the material from depletion\_results.h5.  
[openmc.deplete.abc — OpenMC Documentation](https://docs.openmc.org/en/stable/_modules/openmc/deplete/abc.html)

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/9/93da75fc466434cb845f49d81d92c2ca4e1366cd.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/8/8b260b6333a5e09b5420adaf0cdc85577fc470e8.png)

This is the depletion command to use prev\_reults  
`r = openmc.deplete.ResultsList.from_hdf5('depletion_results.h5')`  
`operator = openmc.deplete.Operator(stacktest0, settings_file,"./chain_casl_pwr.xml", prev_results=r)`

Then I don’t know how OpenMC prev\_results actually works. I have thought 2 way.

1. When having Material.xml in the directory and when it use prev\_results the OpenMC will use Material.xml
2. OpenMC will use material from depletion\_results.h5 for next burnup.

Thank you.

---

<div class="post-metadata">

**Author:** ![huak95](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/huak95/32/1442_2.png) [@huak95](https://openmc.discourse.group/u/huak95)\
**Post date:** [August 19, 2021, 1:58am UTC](https://openmc.discourse.group/t/loading-material-from-depletion-previous-results-using-h5-or-material-xml/1378/2 "2021-08-19T01:58:01Z")

</div>

I Figure out that previous\_result option use the result from depletion.h5 (not material.xml) by changing the the temperature before continue running, Is there any way to edit the density/compostion of the material in hdf5 before reume the calculation using previous\_result option.

So I can update the material in my multiphysic loop calculation with out having to run at 0 everytime like  
0 → 2 Mwd/kg , stop and update the composition xml then have to run at 2 again as 0 Mwd/kg  
2 (0) → 3 (1) Mwd/kg

or else update it via new material .xml ?  
Thank you
