# Chain Depletion

**URL:** <https://openmc.discourse.group/t/chain-depletion/534>\
**Category:** User Support\
**Created:** [January 6, 2020, 8:32pm UTC](https://openmc.discourse.group/t/chain-depletion/534 "2020-01-06T20:32:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Javier\_Gonzalez](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/javier_gonzalez/32/1095_2.png) [@Javier\_Gonzalez](https://openmc.discourse.group/u/Javier_Gonzalez)\
**Post date:** [January 6, 2020, 8:32pm UTC](https://openmc.discourse.group/t/chain-depletion/534/1 "2020-01-06T20:32:26Z")

</div>

Hello,

Please, someone can tell me if the depletion chain generated by the script “openmc-make-depletion-chain” (which creates the file “chain\_endfb71.xml”) can be used to analyze advanced systems such as liquid salt cooled reactors?

Thanks,

Javier

---

<div class="post-metadata">

**Author:** ![Andrew\_Johnson](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@Andrew\_Johnson](https://openmc.discourse.group/u/Andrew_Johnson)\
**Post date:** [January 8, 2020, 12:59am UTC](https://openmc.discourse.group/t/chain-depletion/534/2 "2020-01-08T00:59:48Z")

</div>

Hi Javier,

The main drawback to that script is that your capture branching ratios will not match the true spectrum of your problem. Instead, I would first recommend using either the Fast Spectrum ENDF/B-VII.1 Chain or Fast Spectrum Simplified Chain found at [https://openmc.org/depletion-chains/](https://openmc.org/depletion-chains/). Alternatively, if you have a more representative collection of isomeric branching ratios, you can apply these to any depletion chain using the [openmc.deplete.Chain.set\_branch\_ratios](https://docs.openmc.org/en/latest/pythonapi/generated/openmc.deplete.Chain.html#openmc.deplete.Chain.set_branch_ratios) method.

Regards,

Andrew

---

<div class="post-metadata">

**Author:** ![Javier\_Gonzalez](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/javier_gonzalez/32/1095_2.png) [@Javier\_Gonzalez](https://openmc.discourse.group/u/Javier_Gonzalez)\
**Post date:** [January 8, 2020, 3:31pm UTC](https://openmc.discourse.group/t/chain-depletion/534/3 "2020-01-08T15:31:43Z")

</div>

Hi Andrew,

Thanks for your reply, now, I am having a new issue. In a previous post, it was recommended setting the OPENMC\_CROSS\_SECTIONS environment variable, I did it and my depletion analysis was running. Today, I restarted the computer and I am having again the error message “OSError: No cross\_sections.xml specified in materials.” I followed the steps to set up the OPENMC\_CROSS\_SECTIONS environment variable but it is not working.

Any idea on what may be happening?

Javier

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [January 10, 2020, 1:27pm UTC](https://openmc.discourse.group/t/chain-depletion/534/4 "2020-01-10T13:27:51Z")

</div>

Hi Javier,

That exception is only raised if the OPENMC\_CROSS\_SECTIONS is not set. You can see the code where that comes from here (notice the check first for OPENMC\_CROSS\_SECTIONS):  
[https://github.com/openmc-dev/openmc/blob/f4e46fd620ddb96755f73df6d2d079ea694ae8a6/openmc/deplete/operator.py#L694-L708](https://github.com/openmc-dev/openmc/blob/f4e46fd620ddb96755f73df6d2d079ea694ae8a6/openmc/deplete/operator.py#L694-L708)

To double check, you could open a Python interactive prompt and make sure it can see the environment variable. For example, on my machine this is what I get:

~ $ python  
Python 3.7.5 (default, Oct 31 2019, 12:53:15)  
[GCC 9.2.1 20191008] on linux  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > import os  
> > > os.environ[‘OPENMC\_CROSS\_SECTIONS’]  
> > > ‘/opt/data/hdf5/nndc\_hdf5\_v15/cross\_sections.xml’

Best regards,  
Paul

---

<div class="post-metadata">

**Author:** ![Javier\_Gonzalez](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/javier_gonzalez/32/1095_2.png) [@Javier\_Gonzalez](https://openmc.discourse.group/u/Javier_Gonzalez)\
**Post date:** [January 10, 2020, 3:28pm UTC](https://openmc.discourse.group/t/chain-depletion/534/5 "2020-01-10T15:28:31Z")

</div>

Hi Paul,

Thanks for replying.  
One more time, I followed what was suggested but unfortunately the problem persists. Please, see what I did:

---

<div class="post-metadata">

**Author:** ![Javier\_Gonzalez](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/javier_gonzalez/32/1095_2.png) [@Javier\_Gonzalez](https://openmc.discourse.group/u/Javier_Gonzalez)\
**Post date:** [January 10, 2020, 4:21pm UTC](https://openmc.discourse.group/t/chain-depletion/534/6 "2020-01-10T16:21:46Z")

</div>

Hi guys,

Now, I defined the environment variable modifying the.bashrc file and it is working. It seems I was doing wrong. Here what I did:

~ vi .bashrc ~ vi .bashrc  
export OPENMC\_CROSS\_SECTIONS=/path/to/cross\_sections.xml  
~$ source .bashrc

Thanks,  
Javier
