# Could not find nuclide C13 in the nuclear data library

**URL:** <https://openmc.discourse.group/t/could-not-find-nuclide-c13-in-the-nuclear-data-library/2071>\
**Category:** User Support\
**Created:** [May 24, 2022, 4:13am UTC](https://openmc.discourse.group/t/could-not-find-nuclide-c13-in-the-nuclear-data-library/2071 "2022-05-24T04:13:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![flowersoul](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@flowersoul](https://openmc.discourse.group/u/flowersoul)\
**Post date:** [May 24, 2022, 4:13am UTC](https://openmc.discourse.group/t/could-not-find-nuclide-c13-in-the-nuclear-data-library/2071/1 "2022-05-24T04:13:30Z")

</div>

hello everyone  
i use openmc python but something quite weird happened  
here is part of my code  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/d/d47d327b42edeabcbaafa2166cf25d7b45da9319.png)  
when i run it with pycharm，it get materials.xml ：  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/0/04e58882a3f57f511f4887e61afef004cf0a2a22.png)  
but when i run it with sublime text，it get materials.xml ：  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/5/50951678ce3035109d148fdc9debb845dde4093f.png)  
you must have noticed that the element carbon is described as two forms：  
c0 and c12+c13  
but the hdf5 cross\_sections i use just have c0.h5 here  
 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/5/5b02ce22272768a4e729e5a7aed46b0dfce3d53d.png)  
so when the code run in sublime-text it give error ：

 ![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/2/22bdf7f1a644569daf2f298109818ca9403d7e62.jpeg)  
is this something new in openmc version update or some other problem？  
could anyone give me some suggestions  
many thx

---

<div class="post-metadata">

**Author:** ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)\
**Post date:** [May 24, 2022, 10:04am UTC](https://openmc.discourse.group/t/could-not-find-nuclide-c13-in-the-nuclear-data-library/2071/2 "2022-05-24T10:04:00Z")

</div>

Carbon nuclear data is often a little different to the other elements, particularly in some of the older cross section libraries. Newer cross section libraries tend to have separate files for each isotope.

c0 indicates natural carbon and OpenMC will split this into C12 and C13

There are a few work arounds

The easy option is to add carbon 12 nuclide instead of carbon element

```auto
uzrc.add_nuclide('C12', 0.92)

```

Another option is to make use of a cross section library that has both C12 and C13 nuclides such as  
TENDL

You could download the entire TENDL library and then combine cross\_section.xml libraries with NNDC.

I’ve actually just been working on making this easier for users so if you are interested in [some under development nuclear data software](https://github.com/openmc-data-storage/openmc_data) then you could try the following…

```auto
pip install openmc_data
convert_tendl --release 2021
download_nndc.py --release b7.1
combine_libraries --libraries tendl-2021-hdf5/cross_sections.xml nndc-b7.1-hdf5/cross_sections.xml --outputfilename new_cross_sections.xml

```

This will make a new cross section xml file which contains TENDL preferentially and NNDC (ENDF) as well. The Carbon 12 and 13 from TENDL should then be found by OpenMC

To use this cross section file the environmental variable will need updating

```auto
export OPENMC_CROSS_SECTIONS=/path_to_your/cross_sections.xml 

```

---

<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:** [May 24, 2022, 11:25am UTC](https://openmc.discourse.group/t/could-not-find-nuclide-c13-in-the-nuclear-data-library/2071/3 "2022-05-24T11:25:17Z")

</div>

@flowersoul When you run `Material.add_element`, OpenMC will look at the file indicated by your `OPENMC_CROSS_SECTIONS` environment variable to determine what naturally occurring isotopes are available. It seems that in your case, pycharm does see the environment variable whereas sublime text does not. You could try starting sublime text using `subl` from a terminal and then it should inherit your environment variables.

---

<div class="post-metadata">

**Author:** ![flowersoul](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@flowersoul](https://openmc.discourse.group/u/flowersoul)\
**Post date:** [May 24, 2022, 2:03pm UTC](https://openmc.discourse.group/t/could-not-find-nuclide-c13-in-the-nuclear-data-library/2071/4 "2022-05-24T14:03:22Z")

</div>

thank you paul , it indeed works  
sublime-text seems not to read environment variable except `PATH` when it is opened with shortcut  
only when it is opened from terminal it does

---

<div class="post-metadata">

**Author:** ![flowersoul](https://avatars.discourse-cdn.com/v4/letter/f/ed8c4c/32.png) [@flowersoul](https://openmc.discourse.group/u/flowersoul)\
**Post date:** [May 24, 2022, 2:04pm UTC](https://openmc.discourse.group/t/could-not-find-nuclide-c13-in-the-nuclear-data-library/2071/5 "2022-05-24T14:04:53Z")

</div>

many thx for your reply  
the problem has been solved
