diff --git a/tasks/task_05_CSG_cell_tally_TBR/2_example_tritium_production_study.ipynb b/tasks/task_05_CSG_cell_tally_TBR/2_example_tritium_production_study.ipynb
index 8e6a2977..7fd018e5 100644
--- a/tasks/task_05_CSG_cell_tally_TBR/2_example_tritium_production_study.ipynb
+++ b/tasks/task_05_CSG_cell_tally_TBR/2_example_tritium_production_study.ipynb
@@ -211,7 +211,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.5"
+ "version": "3.8.11"
}
},
"nbformat": 4,
diff --git a/tasks/task_11_CAD_cell_tally_heat/1_simulate_CAD_neutronics_geometry_with_cell_tally_heat.ipynb b/tasks/task_11_CAD_cell_tally_heat/1_simulate_CAD_neutronics_geometry_with_cell_tally_heat.ipynb
index 04b40475..3fdb813f 100644
--- a/tasks/task_11_CAD_cell_tally_heat/1_simulate_CAD_neutronics_geometry_with_cell_tally_heat.ipynb
+++ b/tasks/task_11_CAD_cell_tally_heat/1_simulate_CAD_neutronics_geometry_with_cell_tally_heat.ipynb
@@ -18,9 +18,226 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 1,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Overwriting auto display for cadquery Workplane and Shape\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "d31bb369313d479483cfcbd9844f3875",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "HBox(children=(VBox(children=(HBox(children=(Checkbox(value=False, description='Axes', indent=False, _dom_clas…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/html": [
+ ""
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 1,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"import paramak\n",
"\n",
@@ -63,9 +280,20 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 3,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'dagmc.h5m'"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"from stl_to_h5m import stl_to_h5m\n",
"\n",
@@ -87,7 +315,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
@@ -105,9 +333,126 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 6,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Using the DOUBLE-DOWN interface to Embree.\n",
+ "Loading file dagmc.h5m\n",
+ "Initializing the GeomQueryTool...\n",
+ "Using faceting tolerance: 1.81323e-317\n",
+ "Building acceleration data structures...\n",
+ "Implicit Complement assumed to be Vacuum\n"
+ ]
+ },
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ " WARNING: No graveyard volume found in the DagMC model. This may result in lost\n",
+ " particles and rapid simulation failure.\n",
+ "/opt/openmc/openmc/mixin.py:67: IDWarning: Another Surface instance already exists with id=9999.\n",
+ " warn(msg, IDWarning)\n",
+ "/opt/openmc/openmc/mixin.py:67: IDWarning: Another Cell instance already exists with id=9999.\n",
+ " warn(msg, IDWarning)\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " %%%%%%%%%%%%%%%\n",
+ " %%%%%%%%%%%%%%%%%%%%%%%%\n",
+ " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
+ " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
+ " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
+ " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
+ " %%%%%%%%%%%%%%%%%%%%%%%%\n",
+ " %%%%%%%%%%%%%%%%%%%%%%%%\n",
+ " ############### %%%%%%%%%%%%%%%%%%%%%%%%\n",
+ " ################## %%%%%%%%%%%%%%%%%%%%%%%\n",
+ " ################### %%%%%%%%%%%%%%%%%%%%%%%\n",
+ " #################### %%%%%%%%%%%%%%%%%%%%%%\n",
+ " ##################### %%%%%%%%%%%%%%%%%%%%%\n",
+ " ###################### %%%%%%%%%%%%%%%%%%%%\n",
+ " ####################### %%%%%%%%%%%%%%%%%%\n",
+ " ####################### %%%%%%%%%%%%%%%%%\n",
+ " ###################### %%%%%%%%%%%%%%%%%\n",
+ " #################### %%%%%%%%%%%%%%%%%\n",
+ " ################# %%%%%%%%%%%%%%%%%\n",
+ " ############### %%%%%%%%%%%%%%%%\n",
+ " ############ %%%%%%%%%%%%%%%\n",
+ " ######## %%%%%%%%%%%%%%\n",
+ " %%%%%%%%%%%\n",
+ "\n",
+ " | The OpenMC Monte Carlo Code\n",
+ " Copyright | 2011-2021 MIT and OpenMC contributors\n",
+ " License | https://docs.openmc.org/en/latest/license.html\n",
+ " Version | 0.13.0-dev\n",
+ " Git SHA1 | 209fdd86ed14a16d4b73e9c44de8a9710a898e64\n",
+ " Date/Time | 2021-10-24 22:52:28\n",
+ " MPI Processes | 1\n",
+ " OpenMP Threads | 8\n",
+ "\n",
+ " Reading settings XML file...\n",
+ " Reading cross sections XML file...\n",
+ " Reading materials XML file...\n",
+ " Reading geometry XML file...\n",
+ "Using the DOUBLE-DOWN interface to Embree.\n",
+ "Loading file dagmc.h5m\n",
+ "Initializing the GeomQueryTool...\n",
+ "Using faceting tolerance: 0\n",
+ "Building acceleration data structures...\n",
+ "Implicit Complement assumed to be Vacuum\n",
+ " Reading H2 from /home/jshim/nuc_data/cross_section_data/ENDFB-7.1-NNDC_H2.h5\n",
+ " Reading H3 from /home/jshim/nuc_data/cross_section_data/TENDL-2019_H3.h5\n",
+ " Reading Li6 from /home/jshim/nuc_data/cross_section_data/ENDFB-7.1-NNDC_Li6.h5\n",
+ " Reading Li7 from /home/jshim/nuc_data/cross_section_data/ENDFB-7.1-NNDC_Li7.h5\n",
+ " Reading Si30 from\n",
+ " /home/jshim/nuc_data/cross_section_data/ENDFB-7.1-NNDC_Si30.h5\n",
+ " Reading Si29 from\n",
+ " /home/jshim/nuc_data/cross_section_data/ENDFB-7.1-NNDC_Si29.h5\n",
+ " Reading Si28 from\n",
+ " /home/jshim/nuc_data/cross_section_data/ENDFB-7.1-NNDC_Si28.h5\n",
+ " Reading O17 from /home/jshim/nuc_data/cross_section_data/ENDFB-7.1-NNDC_O17.h5\n",
+ " Reading O18 from /home/jshim/nuc_data/cross_section_data/TENDL-2019_O18.h5\n",
+ " Reading O16 from /home/jshim/nuc_data/cross_section_data/ENDFB-7.1-NNDC_O16.h5\n",
+ " Minimum neutron data temperature: 294.0 K\n",
+ " Maximum neutron data temperature: 294.0 K\n",
+ " Reading tallies XML file...\n",
+ " Preparing distributed cell instances...\n",
+ " Writing summary.h5 file...\n",
+ " Maximum neutron transport energy: 20000000.0 eV for H3\n",
+ "\n",
+ " ===============> FIXED SOURCE TRANSPORT SIMULATION <===============\n",
+ "\n",
+ " Simulating batch 1\n",
+ " Creating state point statepoint.1.h5...\n",
+ "\n",
+ " =======================> TIMING STATISTICS <=======================\n",
+ "\n",
+ " Total time for initialization = 4.2430e-01 seconds\n",
+ " Reading cross sections = 3.4402e-01 seconds\n",
+ " Total time in simulation = 4.4844e-03 seconds\n",
+ " Time in transport only = 2.7150e-03 seconds\n",
+ " Time in active batches = 4.4844e-03 seconds\n",
+ " Time accumulating tallies = 4.1920e-06 seconds\n",
+ " Time writing statepoints = 1.7576e-03 seconds\n",
+ " Total time for finalization = 1.0161e-04 seconds\n",
+ " Total time elapsed = 4.3080e-01 seconds\n",
+ " Calculation Rate (active) = 22299.4 particles/second\n",
+ "\n",
+ " ============================> RESULTS <============================\n",
+ "\n",
+ " WARNING: Could not compute uncertainties -- only one active batch simulated!\n",
+ " Leakage Fraction = 0.77000\n",
+ "\n"
+ ]
+ }
+ ],
"source": [
"# this links the material tags in the dagmc h5m file with materials.\n",
"# these materials are input as strings so they will be looked up in the\n",
@@ -143,9 +488,49 @@
"my_model = openmc.Model(\n",
" materials=materials, geometry=geometry, settings=settings, tallies=tallies\n",
")\n",
- "statepoint_file = my_model.run()\n",
+ "statepoint_file = my_model.run()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Extracting the resulting tally value from the statepoint file"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/opt/openmc/openmc/tallies.py:278: RuntimeWarning: invalid value encountered in true_divide\n",
+ " self._std_dev[nonzero] = np.sqrt((self.sum_sq[nonzero]/n -\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "0 0.282663\n",
+ "Name: mean, dtype: float64"
+ ]
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "sp = openmc.StatePoint(statepoint_file)\n",
+ "\n",
+ "tbr_tally = sp.get_tally(name='blanket_TBR')\n",
+ "\n",
+ "df = tbr_tally.get_pandas_dataframe()\n",
"\n",
- "odw.process_results(statepoint_file, fusion_power=1e9)"
+ "tbr_tally_result"
]
},
{
@@ -156,6 +541,13 @@
"\n",
"- Neutronics simulations can be performed by combining CAD models, neutron sources and material definitions."
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
}
],
"metadata": {
@@ -174,7 +566,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.5"
+ "version": "3.8.11"
}
},
"nbformat": 4,
diff --git a/tasks/task_12_CAD_mesh_fast_flux/1_making_shapes_into_a_neutronics_model.ipynb b/tasks/task_12_CAD_mesh_fast_flux/1_making_shapes_into_a_neutronics_model.ipynb
index 0799348d..6827d4c2 100644
--- a/tasks/task_12_CAD_mesh_fast_flux/1_making_shapes_into_a_neutronics_model.ipynb
+++ b/tasks/task_12_CAD_mesh_fast_flux/1_making_shapes_into_a_neutronics_model.ipynb
@@ -489,11 +489,25 @@
"my_model = openmc.Model(\n",
" materials=materials, geometry=geometry, settings=settings, tallies=tallies\n",
")\n",
- "statepoint_file = my_model.run()\n",
+ "statepoint_file = my_model.run()"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Work in progress\n",
"\n",
- "odw.process_results(statepoint_file, fusion_power=1e9)"
+ "method of extracting vtk file is in progress https://github.com/fusion-energy/regular_mesh_plotter/issues/6"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ },
{
"cell_type": "markdown",
"metadata": {},
@@ -542,7 +556,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.5"
+ "version": "3.8.11"
}
},
"nbformat": 4,