Skip to content

Commit

Permalink
added correct nuc data path
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Oct 17, 2024
1 parent 17c7247 commit 692139d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,47 @@
"This example simulates the variation of a tally responce as a function of time. This particular tally is the tritium breeding ratio and this tends to decrease over time as the lithium gets burnt up by neutron irradiation"
]
},
{
"cell_type": "markdown",
"id": "9256b063",
"metadata": {},
"source": [
"\n",
"First import OpenMC and configure the nuclear data paths"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9f65541a-65d9-423b-99f4-aa21f6e6b017",
"id": "b8b5587a",
"metadata": {},
"outputs": [],
"source": [
"# remove any old files\n",
"!rm settings.xm model.xml materials.xml geometry.xml settings.xml model.xml\n",
"!rm settings.xm model.xml materials.xml geometry.xml settings.xml\n",
"\n",
"import openmc\n",
"import openmc.deplete\n",
"import math\n",
"\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'\n",
"# This chain file was downloaded using the download_endf_chain script that is included in the openmc_data package https://github.com/openmc-data-storage/openmc_data\\n\",\n",
"# this file tells openmc the decay paths between isotopes including probabilities of different routes and half lives\n",
"# To download this xml file you can run these commands\n",
"# pip install openmc_data\n",
"# download_endf_chain -d nuclear_data -r b8.0\n",
"openmc.config['chain_file'] = '/nuclear_data/chain-endf-b8.0.xml'"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9f65541a-65d9-423b-99f4-aa21f6e6b017",
"metadata": {},
"outputs": [],
"source": [
"# MATERIALS\n",
"\n",
"mats = openmc.Materials()\n",
Expand Down Expand Up @@ -125,13 +151,6 @@
"metadata": {},
"outputs": [],
"source": [
"# This chain file was downloaded using the download_endf_chain script that is included in the openmc_data package https://github.com/openmc-data-storage/openmc_data\\n\",\n",
"# this file tells openmc the decay paths between isotopes including probabilities of different routes and half lives\n",
"# To download this xml file you can run these commands\n",
"# pip install openmc_data\n",
"# download_endf_chain -d nuclear_data -r b8.0\n",
"# openmc.config['chain_file'] = '/nuclear_data/chain-endf-b8.0.xml'\n",
"\n",
"operator = openmc.deplete.CoupledOperator(\n",
" model=model,\n",
" normalization_mode=\"source-rate\", # set for fixed source simulation, otherwise defaults to fission simulation\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,20 @@
"# remove any old files\n",
"!rm settings.xm model.xml materials.xml geometry.xml settings.xml\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import openmc\n",
"import openmc.deplete\n",
"import math\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f42c7e11-f514-4859-855f-873fb8f4026e",
"metadata": {},
"outputs": [],
"source": [
"# chain and cross section paths have been set on the docker image but you may want to change them\n",
"#openmc.config['chain_file']=path to chain file\n",
"#openmc.config['cross_sections']=path to cross_sections.xml"
"\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'\n",
"# This chain file was downloaded using the download_endf_chain script that is included in the openmc_data package https://github.com/openmc-data-storage/openmc_data\\n\",\n",
"# this file tells openmc the decay paths between isotopes including probabilities of different routes and half lives\n",
"# To download this xml file you can run these commands\n",
"# pip install openmc_data\n",
"# download_endf_chain -d nuclear_data -r b8.0\n",
"openmc.config['chain_file'] = '/nuclear_data/chain-endf-b8.0.xml'"
]
},
{
Expand Down

0 comments on commit 692139d

Please sign in to comment.