Skip to content

Commit

Permalink
Merge pull request #252 from fusion-energy/reshuffle
Browse files Browse the repository at this point in the history
Reshuffle task order
  • Loading branch information
shimwell authored Nov 10, 2023
2 parents 37a6acd + c58d032 commit c6cdd28
Show file tree
Hide file tree
Showing 37 changed files with 63 additions and 52 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ The video below gives a brief explainer of what to expect in the workshop and so
| [Task 6 - DPA](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_06_CSG_cell_tally_DPA) | Displacements Per Atom, Cell tallies, Simulations, Volume calculations | [link](https://youtu.be/VLn59FSc4GA) | [![Task 6](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_6.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_6.yml) |
| [Task 7 - Neutron and photon spectra](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_07_CSG_cell_tally_spectra) | Neutron Spectra, Photon Spectra, Cell tallies, Energy group structures, Flux, Current | [link](https://youtu.be/qHqAuqMLYPA) | [![Task 7](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_7.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_7.yml) |
| [Task 8 - Mesh tallies](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_08_CSG_mesh_tally) | Mesh tallies, Structured meshes | [link](https://youtu.be/KYIsDjip1nQ) |[![Task 8](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_8.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_8.yml)|
| [Task 9 - Dose](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_09_CSG_dose_tallies) | Instantaneous Dose, Cell tallies, Dose coefficients | |[![Task 9](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_9.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_9.yml)|
| [Task 10 - Making CAD geometry](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_10_making_CAD_geometry) | Parametric CAD geometry, Paramak, Geometry visualisation | [link](https://www.youtube.com/watch?v=Bn_TcJSOvaA) |[![Task 10](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_10.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_10.yml)|
| [Task 11 - CAD Cell tallies](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_11_CAD_cell_tally_heat) | CAD-based neutronics, Cell tallies, DAGMC, Heating | |[![Task 11](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_11.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_11.yml)|
| [Task 12 - CAD Mesh tallies](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_12_CAD_mesh_fast_flux) | CAD-based neutronics, Mesh tallies, Paramak, DAGMC, Fast flux | |[![Task 12](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_12.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_12.yml)|
| [Task 13 - Variance_reduction](https://github.com/fusion-energy/neutronics-workshop/tree/develop/tasks/task_13_variance_reduction) | Variance reduction, weight windows | |[![Task 13](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_13.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_13.yml)|
| [Task 14 - Activation transmutation depletion](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_14_activation_transmutation_depletion) | Isotope build up and tally variation as a function of time | |[![Task 14](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_14.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_14.yml)|
| [Task 15 - Detector examples](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_15_detector_examples) | Time filter detector response time of flight | |[![Task 15](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_15.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_15.yml)|
| [Task 16 - stochastic volume calculation](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_16_stochastic_volume_calculation) | stochastic volume material atoms in cell | |[![Task 16](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_16.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_16.yml)|
| [Task 9 - Instantaneous Dose](https://github.com/fusion-energy/neutronics-workshop/tree/reshuffle/tasks/task_09_CSG_instantaneous_dose_tallies) | Instantaneous Dose, Cell tallies, Dose coefficients | |[![Task 9](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_9.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_9.yml)|
| [Task 10 - Activation transmutation depletion](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_10_activation_transmutation_depletion) | Isotope build up and tally variation as a function of time | |[![Task 10](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_10.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_10.yml)|
| [Task 11 - CSG shut down Dose](https://github.com/fusion-energy/neutronics-workshop/tree/reshuffle/tasks/task_11_CSG_shut_down_dose_tallies) | Shut down Dose, Cell tallies, Dose coefficients | |[![Task 11](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_11.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_11.yml)|
| [Task 12 - Detector examples](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_12_detector_examples) | Time filter detector response time of flight | |[![Task 12](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_12.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_12.yml)|
| [Task 13 - stochastic volume calculation](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_13_stochastic_volume_calculation) | stochastic volume material atoms in cell | |[![Task 13](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_13.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_13.yml)|
| [Task 14 - Variance_reduction](https://github.com/fusion-energy/neutronics-workshop/tree/develop/tasks/task_14_variance_reduction) | Variance reduction, weight windows | |[![Task 14](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_14.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_14.yml)|
| [Task 15 - Making CAD geometry](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_15_making_CAD_geometry) | Parametric CAD geometry, Paramak, Geometry visualisation | [link](https://www.youtube.com/watch?v=Bn_TcJSOvaA) |[![Task 15](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_15.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_15.yml)|
| [Task 16 - CAD Cell tallies](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_16_CAD_cell_tally_heat) | CAD-based neutronics, Cell tallies, DAGMC, Heating | |[![Task 16](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_16.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_16.yml)|
| [Task 17 - CAD Mesh tallies](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_17_CAD_mesh_fast_flux) | CAD-based neutronics, Mesh tallies, Paramak, DAGMC, Fast flux | |[![Task 17](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_17.yml/badge.svg?branch=main)](https://github.com/fusion-energy/neutronics-workshop/actions/workflows/ci_task_17.yml)|

<!-- # Run in the cloud (low CPU count)
Expand Down
19 changes: 0 additions & 19 deletions tasks/README.md

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"This is the depltion specific part of the model setup.\n",
"Here we:\n",
"\n",
" specify the chain file, this tells openmc the decay paths between isotopes including proabilities of different routes and half lives\n",
" specify the chain file, this tells openmc the decay paths between isotopes including probabilities of different routes and half lives\n",
" \n",
" set the time steps and corresponding source rates "
]
Expand All @@ -135,7 +135,8 @@
"operator = openmc.deplete.CoupledOperator(\n",
" model=model,\n",
" normalization_mode=\"source-rate\", # set for fixed source simulation, otherwise defaults to fission simulation\n",
" reduce_chain=True # reduced to only the isotopes present in depletable materials and their possible progeny\n",
" reduce_chain=True, # reduced to only the isotopes present in depletable materials and their possible progeny\n",
" reduce_chain_level=5\n",
")\n",
"\n",
"time_steps = [365*24*60*60] * 5 # 5 steps of 5 years in seconds\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@
# decay gamma source from the stable material at that time
# also there are no decay products in this first timestep for this model


photon_sources_for_timestep = []
print(f"making photon source for timestep {i_cool}")

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -14,6 +15,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -61,6 +63,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -78,6 +81,24 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"Names of material tags can be found with the command line tool"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!mbsize -ll dagmc.h5m | grep 'NAME = mat:'"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -90,20 +111,24 @@
"metadata": {},
"outputs": [],
"source": [
"from neutronics_material_maker import Material\n",
"\n",
"import neutronics_material_maker as nmm\n",
"import openmc\n",
"\n",
"# Names of material tags can be found with the command line tool\n",
"# mbsize -ll dagmc.h5m | grep 'NAME = mat:'\n",
"\n",
"\n",
"# simplified material definitions have been used to keen this example minimal\n",
"mat_pf_coil_1 = Material.from_library(name='copper')\n",
"mat_pf_coil_1 = nmm.Material.from_library(name='copper').openmc_material\n",
"mat_pf_coil_1.name='pf_coil_1'\n",
"\n",
"mat_pf_coil_2 = Material.from_library(name='copper')\n",
"mat_pf_coil_2 = nmm.Material.from_library(name='copper').openmc_material\n",
"mat_pf_coil_2.name='pf_coil_2'\n",
"\n",
"mat_pf_coil_3 = Material.from_library(name='copper')\n",
"mat_pf_coil_3 = nmm.Material.from_library(name='copper').openmc_material\n",
"mat_pf_coil_3.name='pf_coil_3'\n",
"\n",
"mat_pf_coil_4 = Material.from_library(name='copper')\n",
"mat_pf_coil_4 = nmm.Material.from_library(name='copper').openmc_material\n",
"mat_pf_coil_4.name='pf_coil_4'\n",
"\n",
"mat_pf_coil_case_1 = openmc.Material(name=\"pf_coil_case_1\")\n",
"mat_pf_coil_case_1.add_element(\"Fe\", 1, \"ao\")\n",
Expand All @@ -129,7 +154,7 @@
"mat_center_column_shield.add_element(\"W\", 1, \"ao\")\n",
"mat_center_column_shield.set_density(\"g/cm3\", 19.3)\n",
"\n",
"mat_outboard_firstwall = openmc.Material(name=\"outboard_firstwall\")\n",
"mat_outboard_firstwall = openmc.Material(name=\"firstwall\")\n",
"mat_outboard_firstwall.add_element(\"Fe\", 1, \"ao\")\n",
"mat_outboard_firstwall.set_density(\"g/cm3\", 7.7)\n",
"\n",
Expand All @@ -149,14 +174,15 @@
"mat_supports.add_element(\"Fe\", 1, \"ao\")\n",
"mat_supports.set_density(\"g/cm3\", 7.7)\n",
"\n",
"mat_outboard_rear_blanket_wall = openmc.Material(name=\"outboard_rear_blanket_wall\")\n",
"mat_outboard_rear_blanket_wall = openmc.Material(name=\"blanket_rear_wall\")\n",
"mat_outboard_rear_blanket_wall.add_element(\"Fe\", 1, \"ao\")\n",
"mat_outboard_rear_blanket_wall.set_density(\"g/cm3\", 7.7)\n",
"\n",
"mat_inboard_tf_coils = Material.from_library(name='copper')\n",
"\n",
"mat_tf_coils = Material.from_library(name='copper')\n",
"mat_inboard_tf_coils = nmm.Material.from_library(name='copper').openmc_material\n",
"mat_inboard_tf_coils.name = 'inboard_tf_coils'\n",
"\n",
"mat_tf_coils = nmm.Material.from_library(name='copper').openmc_material\n",
"mat_tf_coils.name = 'tf_coil'\n",
"\n",
"materials = openmc.Materials(\n",
" [\n",
Expand All @@ -183,6 +209,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -201,6 +228,9 @@
"# makes use of the dagmc geometry\n",
"dag_univ = openmc.DAGMCUniverse(\"dagmc.h5m\")\n",
"\n",
"# prints all the material tags used in the dagmc geometry\n",
"print(dag_univ.material_names)\n",
"\n",
"# creates an edge of universe boundary surface\n",
"vac_surf = openmc.Sphere(r=10000, surface_id=9999, boundary_type=\"vacuum\")\n",
"\n",
Expand Down Expand Up @@ -234,6 +264,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -285,6 +316,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -317,6 +349,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -335,10 +368,11 @@
")\n",
"\n",
"# starts the simulation\n",
"my_model.run()"
"statepoint_filename = my_model.run()"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -351,9 +385,8 @@
"metadata": {},
"outputs": [],
"source": [
"\n",
"# open the results file\n",
"sp = openmc.StatePoint(\"statepoint.10.h5\")\n",
"sp = openmc.StatePoint(statepoint_filename)\n",
"\n",
"# access the tally using pandas dataframes\n",
"heating_tally = sp.get_tally(name=\"heating\")\n",
Expand All @@ -374,16 +407,12 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"The vtk file should have appeared in the file explorer to the left. Right mouse click on the file to download it and then open with Paraview"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_task_14.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _notebook_run(path):
with open(path) as f:
nb = nbformat.read(f, as_version=4)
nb.metadata.get('kernelspec', {})['name'] = kernel_name
ep = ExecutePreprocessor(kernel_name=kernel_name, timeout=1900) #, allow_errors=True
ep = ExecutePreprocessor(kernel_name=kernel_name, timeout=4000) #, allow_errors=True

try:
ep.preprocess(nb, {'metadata': {'path': this_file_directory}})
Expand Down
2 changes: 1 addition & 1 deletion tests/test_task_16.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _notebook_run(path):
with open(path) as f:
nb = nbformat.read(f, as_version=4)
nb.metadata.get('kernelspec', {})['name'] = kernel_name
ep = ExecutePreprocessor(kernel_name=kernel_name, timeout=1900) #, allow_errors=True
ep = ExecutePreprocessor(kernel_name=kernel_name, timeout=4000) #, allow_errors=True

try:
ep.preprocess(nb, {'metadata': {'path': this_file_directory}})
Expand Down

0 comments on commit c6cdd28

Please sign in to comment.