Skip to content

Commit

Permalink
Merge pull request #62 from fusion-energy/develop
Browse files Browse the repository at this point in the history
Fixing old links and moving to Jupyter Lab 🎉
  • Loading branch information
shimwell authored Jan 7, 2022
2 parents 548b427 + e68d93e commit 43c508b
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 108 deletions.
20 changes: 11 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This Dockerfile creates an enviroment / dependancies needed to run the
# neutronics-workflow.
# neutronics-workshop.

# This Dockerfile can be build locally or a prebuild image can be downloaded

# To download the prebuild image
# docker pull ghcr.io/fusion-energy/neutronics-workflow
# docker pull ghcr.io/fusion-energy/neutronics-workflow:embree
# docker pull ghcr.io/fusion-energy/neutronics-workflow:embree-avx
# docker pull ghcr.io/fusion-energy/neutronics-workshop
# docker pull ghcr.io/fusion-energy/neutronics-workshop:embree
# docker pull ghcr.io/fusion-energy/neutronics-workshop:embree-avx

# To build this Dockerfile into a docker image:
# docker build -t neutronics-workflow .
# docker build -t neutronics-workshop .


# To build this Dockerfile with different options --build-arg can be used
Expand All @@ -23,10 +23,12 @@
# true false
# controls if the Embree is built to use AVX instruction set (true) or not (false). AVX is not supported by all CPUs

# docker build -t neutronics-workflow --build-arg compile_cores=7 --build-arg build_double_down=OFF .
# docker build -t neutronics-workflow:embree --build-arg compile_cores=7 --build-arg build_double_down=ON --build-arg include_avx=true .
# docker build -t neutronics-workflow:embree-avx --build-arg compile_cores=7 --build-arg build_double_down=ON --build-arg include_avx=false .
# docker build -t neutronics-workshop --build-arg compile_cores=7 --build-arg build_double_down=OFF .
# docker build -t neutronics-workshop:embree --build-arg compile_cores=7 --build-arg build_double_down=ON --build-arg include_avx=true .
# docker build -t neutronics-workshop:embree-avx --build-arg compile_cores=7 --build-arg build_double_down=ON --build-arg include_avx=false .

# for local testing I tend to use this build command
# docker build -t neutronics-workshop --build-arg compile_cores=14 --build-arg build_double_down=ON .

# This can't be done currently as the base images uses conda installs for moab / dagmc which don't compile with OpenMC
FROM ghcr.io/openmc-data-storage/miniconda3_4.9.2_endfb-7.1_nndc_tendl_2019:latest as dependencies
Expand Down Expand Up @@ -283,4 +285,4 @@ WORKDIR /tasks
ENV PORT 8888

# could switch to --ip='*'
CMD ["jupyter", "notebook", "--notebook-dir=/tasks", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]
CMD ["jupyter", "lab", "--notebook-dir=/tasks", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]
28 changes: 14 additions & 14 deletions tasks/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

| Tasks | Keywords | Video(s) |
|-|-|-|
| [Task 1 - Cross sections](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_01_cross_sections) | Nuclear data, cross-sections, MT numbers, Doppler | [link1](https://youtu.be/eBZ2lY_2v7I) [link2](https://youtu.be/ELZNeIdSuMY) [link3](https://youtu.be/ec5BLLL6Q_g) [link4](https://youtu.be/mkl1mVnTO6g) |
| [Task 2 - Materials](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_02_making_materials) | Materials, Neutronics Material Maker, Mixed materials | [link](https://youtu.be/-NGnY-1TWCA) |
| [Task 3 - CSG geometry](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_03_making_CSG_geometry) | CSG geometry, Geometry visualisation | [link](https://youtu.be/Ovr7oYukYRw) |
| [Task 4 - Sources](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_04_make_sources) | Neutron point sources, Gamma sources, Plasma sources, Neutron track visualisation | [link](https://youtu.be/j9dT1Viqcu4) |
| [Task 5 - TBR](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_05_CSG_cell_tally_TBR) | Tritium Breeding Ratio, Cell tallies, Simulations | [link](https://youtu.be/Vc7Qy7QW4o8) |
| [Task 6 - DPA](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_06_CSG_cell_tally_DPA) | Displacements Per Atom, Cell tallies, Simulations, Volume calculations | [link](https://youtu.be/VLn59FSc4GA) |
| [Task 7 - Neutron and photon spectra](https://github.com/ukaea/openmc_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 8 - Mesh tallies](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_08_CSG_mesh_tally) | Mesh tallies, Structured meshes | [link](https://youtu.be/KYIsDjip1nQ) |
| [Task 9 - Dose](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_09_CSG_surface_tally_dose) | Dose, Cell tallies, Dose coefficients | |
| [Task 10 - Making CAD geometry](https://github.com/ukaea/openmc_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 11 - CAD Cell tallies](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_11_CAD_mesh_tally_heat) | CAD-based neutronics, Cell tallies, DAGMC, Heating | |
| [Task 12 - CAD Mesh tallies](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_12_CAD_cell_tally_fast_flux) | CAD-based neutronics, Mesh tallies, Paramak, DAGMC, Fast flux | |
| [Task 13 - Techniques for sampling parameter space](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_13_parameter_study_sampling) | Sampling, Interpolation, Multi-dimensional parameter studies | |
| [Task 14 - Parameter study optimisation](https://github.com/ukaea/openmc_workshop/tree/main/tasks/task_14_parameter_study_optimisation) | Data science machine learning approaches | |
| [Task 1 - Cross sections](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_01_cross_sections) | Nuclear data, cross-sections, MT numbers, Doppler | [link1](https://youtu.be/eBZ2lY_2v7I) [link2](https://youtu.be/ELZNeIdSuMY) [link3](https://youtu.be/ec5BLLL6Q_g) [link4](https://youtu.be/mkl1mVnTO6g) |
| [Task 2 - Materials](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_02_making_materials) | Materials, Neutronics Material Maker, Mixed materials | [link](https://youtu.be/-NGnY-1TWCA) |
| [Task 3 - CSG geometry](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_03_making_CSG_geometry) | CSG geometry, Geometry visualisation | [link](https://youtu.be/Ovr7oYukYRw) |
| [Task 4 - Sources](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_04_make_sources) | Neutron point sources, Gamma sources, Plasma sources, Neutron track visualisation | [link](https://youtu.be/j9dT1Viqcu4) |
| [Task 5 - TBR](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_05_CSG_cell_tally_TBR) | Tritium Breeding Ratio, Cell tallies, Simulations | [link](https://youtu.be/Vc7Qy7QW4o8) |
| [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 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 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 9 - Dose](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_09_CSG_surface_tally_dose) | Dose, Cell tallies, Dose coefficients | |
| [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 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 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 13 - Techniques for sampling parameter space](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_13_parameter_study_sampling) | Sampling, Interpolation, Multi-dimensional parameter studies | |
| [Task 14 - Parameter study optimisation](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_14_parameter_study_optimisation) | Data science machine learning approaches | |
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Part 3 - Making materials from a library\n",
"\n",
Expand All @@ -15,25 +14,24 @@
"Fortunately, there is an app for that called the Neutronics Material Maker which makes material making very convenient. Full transparency - the author of this package is also the author of this OpenMC workshop :-)\n",
"\n",
"Further details on this open-source Python package are available here:\n",
"https://github.com/ukaea/neutronics_material_maker\n",
"https://github.com/fusion-energy/neutronics_material_maker\n",
"https://neutronics-material-maker.readthedocs.io/en/latest/\n",
"https://pypi.org/project/neutronics-material-maker/\n",
"\n",
"This python notebook allows users to create different materials using the Neutronics Material Maker."
]
],
"metadata": {}
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The following code block is a simple example of importing the package and using it to create Eurofer."
]
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# example material from the library\n",
"\n",
Expand All @@ -42,58 +40,58 @@
"eurofer_mat = nmm.Material.from_library('eurofer')\n",
"\n",
"eurofer_mat.openmc_material"
]
],
"outputs": [],
"metadata": {}
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Some materials require additional arguments to correctly calculate material properties.\n",
"\n",
"Coolants such as water, helium, CO2 and others require temperature and density information to find the density.\n",
"\n",
"This code block creates H2O at a particular temperature and pressure."
]
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Water requires temperature and pressure arguments to be passed\n",
"water = nmm.Material.from_library('H2O', temperature=300, pressure=100000)\n",
"\n",
"water.openmc_material"
]
],
"outputs": [],
"metadata": {}
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Some materials can also take enrichment arguments which adjust the material density.\n",
"\n",
"The following code blocks create Li4SiO4 materials with different enrichments and packing fractions."
]
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Lithium Orthosilicate (Li4SiO4) can take arguments of 'enrichment', 'enrichment_target', 'enrichment_type' and 'packing_fraction'\n",
"# Note: for some lithium crystals, 'enrichment_target' and 'enrichment_type' are defined by default, but can be changed\n",
"\n",
"default_Li4SiO4 = nmm.Material.from_library('Li4SiO4')\n",
"default_Li4SiO4.openmc_material"
]
],
"outputs": [],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# the following command creates Li4SiO4 with respect to given arguments but uses the default values for enrichment_target and enrichment_type\n",
"# enrichment_target='Li6', enrichment_type='ao' defined by default\n",
Expand All @@ -104,24 +102,26 @@
" packing_fraction=0.64\n",
") \n",
"enriched_and_packed_Li4SiO4.openmc_material"
]
],
"outputs": [],
"metadata": {}
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The Neutronics Material Maker is a powerful tool which allows complicated materials to be created easily, but what about fine tuning these materials or mixing them together? These are covered in the next parts."
]
],
"metadata": {}
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Learning Outcomes for Part 3:**\n",
"\n",
"- The Neutronics Material Maker is a python package which can be used to create neutronics materials easily.\n",
"- The package makes it easy to account for isotopic enrichment, temperature and pressure effects."
]
],
"metadata": {}
}
],
"metadata": {
Expand All @@ -145,4 +145,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 2 additions & 0 deletions tasks/task_06_CSG_cell_tally_DPA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Expected outputs from this task are also in the [presentation](https://slides.co

In this task you will use OpenMC to run simple neutronics simulations to tally DPA using a cell tally.

This is a highly simplified method of estimating DPA and more accurate DPA measurments are avialbe using [improved methods](https://www.sciencedirect.com/science/article/pii/S0022311520304670#fig6)

**Learning Outcomes**

- Damage energy deposited can be found with the OpenMC MT 444 tally.
Expand Down
Loading

0 comments on commit 43c508b

Please sign in to comment.