# About how to use nuclear data library downloaded from the official website

**URL:** <https://openmc.discourse.group/t/about-how-to-use-nuclear-data-library-downloaded-from-the-official-website/4985>\
**Category:** User Support\
**Created:** [November 21, 2024, 12:15pm UTC](https://openmc.discourse.group/t/about-how-to-use-nuclear-data-library-downloaded-from-the-official-website/4985 "2024-11-21T12:15:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Utopia](https://avatars.discourse-cdn.com/v4/letter/u/d07c76/32.png) [@Utopia](https://openmc.discourse.group/u/Utopia)\
**Post date:** [November 21, 2024, 12:15pm UTC](https://openmc.discourse.group/t/about-how-to-use-nuclear-data-library-downloaded-from-the-official-website/4985/1 "2024-11-21T12:15:19Z")

</div>

I would like to ask how to import the nuclear data library downloaded from the official website into OpenMC. I have downloaded three databases from the official website, but I don’t know how to import them into OpenMC on my Linux system. Any reply would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Utopia](https://avatars.discourse-cdn.com/v4/letter/u/d07c76/32.png) [@Utopia](https://openmc.discourse.group/u/Utopia)\
**Post date:** [November 21, 2024, 12:18pm UTC](https://openmc.discourse.group/t/about-how-to-use-nuclear-data-library-downloaded-from-the-official-website/4985/2 "2024-11-21T12:18:12Z")

</div>

I am a newcomer to OpenMC and have some questions about how to start and run OpenMC. I would appreciate any help.

---

<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:** [November 21, 2024, 12:52pm UTC](https://openmc.discourse.group/t/about-how-to-use-nuclear-data-library-downloaded-from-the-official-website/4985/3 "2024-11-21T12:52:02Z")

</div>

Hi @Utopia and welcome to the community. You can find usage instructions [here](https://openmc.org/data-libraries):

> For a given library, download and unpack the archive in a desired location. Inside the directory that is extracted is a file called `cross_sections.xml` . Set your [`OPENMC_CROSS_SECTIONS`](https://docs.openmc.org/en/latest/usersguide/cross_sections.html#environment-variables) environment variable to the absolute path of this file and then it will be recognized when you run OpenMC.

---

<div class="post-metadata">

**Author:** ![Utopia](https://avatars.discourse-cdn.com/v4/letter/u/d07c76/32.png) [@Utopia](https://openmc.discourse.group/u/Utopia)\
**Post date:** [November 22, 2024, 8:55am UTC](https://openmc.discourse.group/t/about-how-to-use-nuclear-data-library-downloaded-from-the-official-website/4985/4 "2024-11-22T08:55:29Z")

</div>

Thank you for your patient reply,I wonder what operating system (Windows or Linux) will the environment be configured on?

---

<div class="post-metadata">

**Author:** ![Utopia](https://avatars.discourse-cdn.com/v4/letter/u/d07c76/32.png) [@Utopia](https://openmc.discourse.group/u/Utopia)\
**Post date:** [November 22, 2024, 12:00pm UTC](https://openmc.discourse.group/t/about-how-to-use-nuclear-data-library-downloaded-from-the-official-website/4985/5 "2024-11-22T12:00:51Z")

</div>

Additionally, I think I need a simple example to verify that my OpenMC is running properly.

---

<div class="post-metadata">

**Author:** ![magnoxemo](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@magnoxemo](https://openmc.discourse.group/u/magnoxemo)\
**Post date:** [November 24, 2024, 3:39am UTC](https://openmc.discourse.group/t/about-how-to-use-nuclear-data-library-downloaded-from-the-official-website/4985/6 "2024-11-24T03:39:28Z")

</div>

Hi @Utopia there are some examples you will find in your open clone ( I am guessing you installed it from the source code). Please go to your openmc directory and open it in the terminal. Then  
run this commands:

```auto
 cd examples/jezebel
 python jezebel.py 

```

if this works then OK other wise you can just copy this input file and run it as a python program.

```auto
import openmc

# Create plutonium metal material
pu = openmc.Material()
pu.set_density('sum')
pu.add_nuclide('Pu239', 3.7047e-02)
pu.add_nuclide('Pu240', 1.7512e-03)
pu.add_nuclide('Pu241', 1.1674e-04)
pu.add_element('Ga', 1.3752e-03)
mats = openmc.Materials([pu])
mats.export_to_xml()

# Create a single cell filled with the Pu metal
sphere = openmc.Sphere(r=6.3849, boundary_type='vacuum')
cell = openmc.Cell(fill=pu, region=-sphere)
geom = openmc.Geometry([cell])
geom.export_to_xml()

# Finally, define some run settings
settings = openmc.Settings()
settings.batches = 200
settings.inactive = 10
settings.particles = 10000
settings.export_to_xml()

# Run the simulation
openmc.run()

# Get the resulting k-effective value
n = settings.batches
with openmc.StatePoint(f'statepoint.{n}.h5') as sp:
    keff = sp.keff
    print(f'Final k-effective = {keff}')

```

also make sure that your `OPENMC_CROSS_SECTIONS ` is set. To check try to run this command in the terminal,

```auto
echo $OPENMC_CROSS_SECTIONS 

```

and it should print out something like this: `/home/ebny_walid/OpenMC/openmc-setup/endfb-viii.0-hdf5/cross_sections.xml `

if you get a blank then copy the path of the` cross_sections.xml` file [for me it was `/home/ebny_walid/OpenMC/openmc-setup/endfb-viii.0-hdf5/cross_sections.xml ` this] and try to set

```auto
export OPENMC_CROSS_SECTIONS ="your_copied_path"

```

to get more examples you can visit this repository: [GitHub - mit-crpg/openmc-reactor-examples: Catalogs a plethora of reactor inputs for OpenMC](https://github.com/mit-crpg/openmc-reactor-examples)
