Skip to content

Commit

Permalink
added nuc data config for task 4
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Oct 9, 2024
1 parent c5b38e5 commit 295ca24
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@
"IFrame(src=\"https://www.youtube.com/embed/KYIsDjip1nQ\", width=560, height=340)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First import packages needed and configure the OpenMC nuclear data path"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import openmc\n",
"# Setting the cross section path to the correct location in the docker image.\n",
"# If you are running this outside the docker image you will have to change this path to your local cross section path.\n",
"openmc.config['cross_sections'] = '/nuclear_data/cross_sections.xml'"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -42,9 +62,6 @@
"metadata": {},
"outputs": [],
"source": [
"import openmc\n",
"import matplotlib.pyplot as plt\n",
"\n",
"# MATERIALS\n",
"\n",
"# creates two materials, one is a neutron multiplier (lead) and the other a tritium breeder (lithium)\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@
"This first code block defines the model geometry, materials and neutron source."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First import OpenMC and configure the nuclear data path"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import openmc\n",
"# Setting the cross section path to the correct location in the docker image.\n",
"# If you are running this outside the docker image you will have to change this path to your local cross section path.\n",
"openmc.config['cross_sections'] = '/nuclear_data/cross_sections.xml'"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -28,8 +47,6 @@
},
"outputs": [],
"source": [
"import openmc\n",
"\n",
"# MATERIALS\n",
"\n",
"breeder_material = openmc.Material() # Pb84.2Li15.8\n",
Expand Down
19 changes: 19 additions & 0 deletions tasks/task_08_CSG_mesh_tally/3_example_cylinder_mesh_tallies.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@
"This first code block defines the model geometry and materials."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"First import OpenMC and configure the nuclear data path"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import openmc\n",
"# Setting the cross section path to the correct location in the docker image.\n",
"# If you are running this outside the docker image you will have to change this path to your local cross section path.\n",
"openmc.config['cross_sections'] = '/nuclear_data/cross_sections.xml'"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 295ca24

Please sign in to comment.