Skip to content

Commit

Permalink
added nuc data path
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Oct 17, 2024
1 parent 2df1f0e commit 5a740a5
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This section creates a simple material, geometry and settings. This model is used in both the neutron current tally and the neutron flux tally."
"First import OpenMC and configure the nuclear data path"
]
},
{
Expand All @@ -24,6 +24,24 @@
"source": [
"import openmc\n",
"\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": {},
"source": [
"This section creates a simple material, geometry and settings. This model is used in both the neutron current tally and the neutron flux tally."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# MATERIALS\n",
"\n",
"# Due to the hydrogen content water is a very good neutron moderator\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This section creates a simple material, geometry and settings. This model is used in both the neutron current tally and the neutron flux tally."
"\n",
"\n",
"First import OpenMC and configure the nuclear data path\n"
]
},
{
Expand All @@ -34,10 +36,28 @@
"metadata": {},
"outputs": [],
"source": [
"import openmc\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import openmc\n",
"\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": {},
"source": [
"This section creates a simple material, geometry and settings. This model is used in both the neutron current tally and the neutron flux tally."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# MATERIALS\n",
"\n",
"# Due to the hydrogen content water is a very good neutron moderator\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This section creates a simple material, geometry and settings. This model is used in both the neutron current tally and the neutron flux tally."
"First import OpenMC and configure the nuclear data path"
]
},
{
Expand All @@ -40,6 +40,24 @@
"source": [
"import openmc\n",
"\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": {},
"source": [
"This section creates a simple material, geometry and settings. This model is used in both the neutron current tally and the neutron flux tally."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# MATERIALS\n",
"\n",
"# Due to the hydrogen content water is a very good neutron moderator\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This section creates a simple material, geometry and settings. This model is used in both the photon current tally and photon flux tally."
"First import OpenMC and configure the nuclear data path"
]
},
{
Expand All @@ -28,9 +28,27 @@
"metadata": {},
"outputs": [],
"source": [
"import openmc\n",
"import matplotlib.pyplot as plt\n",
"import openmc\n",
"\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": {},
"source": [
"This section creates a simple material, geometry and settings. This model is used in both the photon current tally and photon flux tally."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# MATERIALS\n",
"\n",
"# Tungsten is a very good photon shield, partly due to its high Z number and electrons\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Imports required packages"
"First import OpenMC and configure the nuclear data path"
]
},
{
Expand All @@ -28,9 +28,14 @@
"metadata": {},
"outputs": [],
"source": [
"import openmc\n",
"import matplotlib.pyplot as plt\n",
"from shutil import move"
"from shutil import move\n",
"\n",
"import openmc\n",
"\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'"
]
},
{
Expand Down

0 comments on commit 5a740a5

Please sign in to comment.