From 7581a715abfa9d73e824eafc08703c0140868df0 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Tue, 13 May 2025 11:51:46 -0400 Subject: [PATCH 1/4] added notebook for solid angle calculation --- analysis/neutron/solid_angle.ipynb | 854 +++++++++++++++++++++++++++++ 1 file changed, 854 insertions(+) create mode 100644 analysis/neutron/solid_angle.ipynb diff --git a/analysis/neutron/solid_angle.ipynb b/analysis/neutron/solid_angle.ipynb new file mode 100644 index 0000000..c060a03 --- /dev/null +++ b/analysis/neutron/solid_angle.ipynb @@ -0,0 +1,854 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "isotopes ['Al27', 'Ar36', 'Ar38', 'Ar40', 'B10', 'B11', 'Be9', 'C12', 'C13', 'Ca40', 'Ca42', 'Ca43', 'Ca44', 'Ca46', 'Ca48', 'Cl35', 'Cl37', 'Co59', 'Cr50', 'Cr52', 'Cr53', 'Cr54', 'Cu63', 'Cu65', 'F19', 'Fe54', 'Fe56', 'Fe57', 'Fe58', 'H1', 'H2', 'He3', 'He4', 'K39', 'K40', 'K41', 'Li6', 'Li7', 'Mg24', 'Mg25', 'Mg26', 'Mn55', 'Mo100', 'Mo92', 'Mo94', 'Mo95', 'Mo96', 'Mo97', 'Mo98', 'N14', 'N15', 'Na23', 'Nb93', 'Ni58', 'Ni60', 'Ni61', 'Ni62', 'Ni64', 'O16', 'O17', 'O18', 'P31', 'Pb204', 'Pb206', 'Pb207', 'Pb208', 'S32', 'S33', 'S34', 'S36', 'Si28', 'Si29', 'Si30', 'Ti46', 'Ti47', 'Ti48', 'Ti49', 'Ti50', 'W182', 'W183', 'W184', 'W186', 'Zr90', 'Zr91', 'Zr92', 'Zr94', 'Zr96']\n", + "Searching libraries with the following priority {'ENDFB-8.0-NNDC': 1}\n", + "Isotopes found matching library requirements 556\n", + "Isotopes found matching particle requirements 1789\n", + "Isotopes found matching isotope requirements 345\n", + "Isotopes found matching all requirements 87\n", + " library remote_file \\\n", + "1233 ENDFB-8.0-NNDC H1.h5 \n", + "1234 ENDFB-8.0-NNDC H2.h5 \n", + "1236 ENDFB-8.0-NNDC He3.h5 \n", + "1237 ENDFB-8.0-NNDC He4.h5 \n", + "1238 ENDFB-8.0-NNDC Li6.h5 \n", + "... ... ... \n", + "1649 ENDFB-8.0-NNDC W186.h5 \n", + "1689 ENDFB-8.0-NNDC Pb204.h5 \n", + "1691 ENDFB-8.0-NNDC Pb206.h5 \n", + "1692 ENDFB-8.0-NNDC Pb207.h5 \n", + "1693 ENDFB-8.0-NNDC Pb208.h5 \n", + "\n", + " url \\\n", + "1233 https://github.com/openmc-data-storage/ENDF-B-... \n", + "1234 https://github.com/openmc-data-storage/ENDF-B-... \n", + "1236 https://github.com/openmc-data-storage/ENDF-B-... \n", + "1237 https://github.com/openmc-data-storage/ENDF-B-... \n", + "1238 https://github.com/openmc-data-storage/ENDF-B-... \n", + "... ... \n", + "1649 https://github.com/openmc-data-storage/ENDF-B-... \n", + "1689 https://github.com/openmc-data-storage/ENDF-B-... \n", + "1691 https://github.com/openmc-data-storage/ENDF-B-... \n", + "1692 https://github.com/openmc-data-storage/ENDF-B-... \n", + "1693 https://github.com/openmc-data-storage/ENDF-B-... \n", + "\n", + " local_file particle isotope element priority \n", + "1233 ENDFB-8.0-NNDC_H1.h5 neutron H1 H 1 \n", + "1234 ENDFB-8.0-NNDC_H2.h5 neutron H2 H 1 \n", + "1236 ENDFB-8.0-NNDC_He3.h5 neutron He3 He 1 \n", + "1237 ENDFB-8.0-NNDC_He4.h5 neutron He4 He 1 \n", + "1238 ENDFB-8.0-NNDC_Li6.h5 neutron Li6 Li 1 \n", + "... ... ... ... ... ... \n", + "1649 ENDFB-8.0-NNDC_W186.h5 neutron W186 W 1 \n", + "1689 ENDFB-8.0-NNDC_Pb204.h5 neutron Pb204 Pb 1 \n", + "1691 ENDFB-8.0-NNDC_Pb206.h5 neutron Pb206 Pb 1 \n", + "1692 ENDFB-8.0-NNDC_Pb207.h5 neutron Pb207 Pb 1 \n", + "1693 ENDFB-8.0-NNDC_Pb208.h5 neutron Pb208 Pb 1 \n", + "\n", + "[87 rows x 8 columns]\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_H1.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_H2.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_He3.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_He4.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Li6.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Li7.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Be9.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_B10.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_B11.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_C12.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_C13.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_N14.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_N15.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_O16.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_O17.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_O18.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_F19.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Na23.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mg24.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mg25.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mg26.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Al27.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Si28.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Si29.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Si30.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_P31.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_S32.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_S33.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_S34.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_S36.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Cl35.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Cl37.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ar36.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ar38.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ar40.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_K39.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_K40.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_K41.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ca40.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ca42.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ca43.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ca44.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ca46.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ca48.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ti46.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ti47.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ti48.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ti49.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ti50.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Cr50.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Cr52.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Cr53.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Cr54.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mn55.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Fe54.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Fe56.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Fe57.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Fe58.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Co59.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ni58.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ni60.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ni61.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ni62.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Ni64.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Cu63.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Cu65.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Zr90.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Zr91.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Zr92.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Zr94.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Zr96.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Nb93.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mo92.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mo94.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mo95.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mo96.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mo97.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mo98.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Mo100.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_W182.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_W183.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_W184.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_W186.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Pb204.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Pb206.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Pb207.h5, already downloaded\n", + "Skipping cross_sections/ENDFB-8.0-NNDC_Pb208.h5, already downloaded\n", + "written cross sections xml file to /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/cross_sections.xml\n", + "setting OPENMC_CROSS_SECTIONS to /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/cross_sections.xml\n" + ] + } + ], + "source": [ + "from openmc_model import baby_model, cllif_nat\n", + "\n", + "my_model = baby_model()" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "\n", + "for cell_id, cell in my_model.geometry.get_all_cells().items():\n", + " if cell.fill == cllif_nat:\n", + " salt_cell = cell\n", + " \n", + " cell.fill = None" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Surface\n", + " \tID =\t226\n", + " \tName =\t\n", + " \tType =\tz-plane\n", + " \tBoundary =\ttransmission\n", + " \tCoefficients \n", + " z0 =\t107.401,\n", + " Surface\n", + " \tID =\t227\n", + " \tName =\t\n", + " \tType =\tz-plane\n", + " \tBoundary =\ttransmission\n", + " \tCoefficients \n", + " z0 =\t113.91922,\n", + " Surface\n", + " \tID =\t235\n", + " \tName =\t\n", + " \tType =\tz-cylinder\n", + " \tBoundary =\ttransmission\n", + " \tCoefficients \n", + " x0 =\t587\n", + " y0 =\t60\n", + " r =\t7.0,\n", + " Surface\n", + " \tID =\t241\n", + " \tName =\t\n", + " \tType =\tz-cylinder\n", + " \tBoundary =\ttransmission\n", + " \tCoefficients \n", + " x0 =\t587\n", + " y0 =\t60\n", + " r =\t0.439,\n", + " Surface\n", + " \tID =\t242\n", + " \tName =\t\n", + " \tType =\tz-plane\n", + " \tBoundary =\ttransmission\n", + " \tCoefficients \n", + " z0 =\t108.279,\n", + " Surface\n", + " \tID =\t243\n", + " \tName =\t\n", + " \tType =\tz-plane\n", + " \tBoundary =\ttransmission\n", + " \tCoefficients \n", + " z0 =\t133.679]" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "salt_surfaces = list(salt_cell.region.get_surfaces().values())\n", + "\n", + "salt_surfaces" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [], + "source": [ + "import openmc\n", + "\n", + "surf_filter = openmc.SurfaceFilter(salt_surfaces)\n", + "from_cell_filter = openmc.CellFromFilter(salt_cell)" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [], + "source": [ + "tally= openmc.Tally(name=\"salt tally\")\n", + "tally.filters = [surf_filter, from_cell_filter]\n", + "tally.scores = ['current']\n", + "\n", + "my_model.tallies = [\n", + " tally,\n", + "]" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "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-2025 MIT, UChicago Argonne LLC, and contributors\n", + " License | https://docs.openmc.org/en/latest/license.html\n", + " Version | 0.15.2\n", + " Commit Hash | e23760b0264c66fb7bb373aa0596801e5209d920\n", + " Date/Time | 2025-05-13 11:50:53\n", + " MPI Processes | 1\n", + " OpenMP Threads | 32\n", + "\n", + " Reading model XML file 'model.xml' ...\n", + " Reading cross sections XML file...\n", + " Reading Al27 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Al27.h\n", + " 5\n", + " Reading Cu63 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cu63.h\n", + " 5\n", + " Reading Cu65 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cu65.h\n", + " 5\n", + " Reading C12 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_C12.h5\n", + " Reading C13 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_C13.h5\n", + " Reading N14 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_N14.h5\n", + " Reading O16 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_O16.h5\n", + " Reading Ar40 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ar40.h\n", + " 5\n", + " Reading H1 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_H1.h5\n", + " Reading Na23 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Na23.h\n", + " 5\n", + " Reading Mg24 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mg24.h\n", + " 5\n", + " Reading Mg25 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mg25.h\n", + " 5\n", + " Reading Mg26 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mg26.h\n", + " 5\n", + " Reading Si28 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Si28.h\n", + " 5\n", + " Reading Si29 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Si29.h\n", + " 5\n", + " Reading Si30 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Si30.h\n", + " 5\n", + " Reading K39 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_K39.h5\n", + " Reading K40 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_K40.h5\n", + " Reading K41 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_K41.h5\n", + " Reading Ca40 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca40.h\n", + " 5\n", + " Reading Ca42 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca42.h\n", + " 5\n", + " Reading Ca43 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca43.h\n", + " 5\n", + " Reading Ca44 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca44.h\n", + " 5\n", + " Reading Ca46 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca46.h\n", + " 5\n", + " Reading Ca48 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca48.h\n", + " 5\n", + " Reading Fe54 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Fe54.h\n", + " 5\n", + " Reading Fe56 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Fe56.h\n", + " 5\n", + " Reading Fe57 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Fe57.h\n", + " 5\n", + " Reading Fe58 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Fe58.h\n", + " 5\n", + " Reading S32 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_S32.h5\n", + " Reading S33 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_S33.h5\n", + " Reading S34 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_S34.h5\n", + " Reading S36 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_S36.h5\n", + " Reading Mn55 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mn55.h\n", + " 5\n", + " Reading P31 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_P31.h5\n", + " Reading Cr50 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cr50.h\n", + " 5\n", + " Reading Cr52 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cr52.h\n", + " 5\n", + " Reading Cr53 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cr53.h\n", + " 5\n", + " Reading Cr54 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cr54.h\n", + " 5\n", + " Reading Ni58 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ni58.h\n", + " 5\n", + " Reading Ni60 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ni60.h\n", + " 5\n", + " Reading Ni61 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ni61.h\n", + " 5\n", + " Reading Ni62 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ni62.h\n", + " 5\n", + " Reading Ni64 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ni64.h\n", + " 5\n", + " Reading W182 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_W182.h\n", + " 5\n", + " Reading W183 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_W183.h\n", + " 5\n", + " Reading W184 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_W184.h\n", + " 5\n", + " Reading W186 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_W186.h\n", + " 5\n", + " Reading Pb204 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Pb204.\n", + " h5\n", + " Reading Pb206 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Pb206.\n", + " h5\n", + " Reading Pb207 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Pb207.\n", + " h5\n", + " Reading Pb208 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Pb208.\n", + " h5\n", + " Reading B10 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_B10.h5\n", + " Reading B11 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_B11.h5\n", + " Reading H2 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_H2.h5\n", + " Reading Zr90 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Zr90.h\n", + " 5\n", + " Reading Zr91 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Zr91.h\n", + " 5\n", + " Reading Zr92 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Zr92.h\n", + " 5\n", + " Reading Zr94 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Zr94.h\n", + " 5\n", + " Reading Zr96 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Zr96.h\n", + " 5\n", + " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 250K\n", + " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 294K\n", + " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 600K\n", + " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 900K\n", + " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 1200K\n", + " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 2500K\n", + " Reading Be9 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Be9.h5\n", + " Reading O17 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_O17.h5\n", + " Reading O18 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_O18.h5\n", + " Reading Ti46 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ti46.h\n", + " 5\n", + " Reading Ti47 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ti47.h\n", + " 5\n", + " Reading Ti48 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ti48.h\n", + " 5\n", + " Reading Ti49 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ti49.h\n", + " 5\n", + " Reading Ti50 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ti50.h\n", + " 5\n", + " Reading Li6 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Li6.h5\n", + " Reading Li7 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Li7.h5\n", + " Reading F19 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_F19.h5\n", + " Reading Co59 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Co59.h\n", + " 5\n", + " Reading Nb93 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Nb93.h\n", + " 5\n", + " Reading Mo92 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo92.h\n", + " 5\n", + " Reading Mo94 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo94.h\n", + " 5\n", + " Reading Mo95 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo95.h\n", + " 5\n", + " Reading Mo96 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo96.h\n", + " 5\n", + " Reading Mo97 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo97.h\n", + " 5\n", + " Reading Mo98 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo98.h\n", + " 5\n", + " Reading Mo100 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo100.\n", + " h5\n", + " Reading Cl35 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cl35.h\n", + " 5\n", + " Reading Cl37 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cl37.h\n", + " 5\n", + " Reading N15 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_N15.h5\n", + " Reading Ar36 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ar36.h\n", + " 5\n", + " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 250K\n", + " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 294K\n", + " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 600K\n", + " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 900K\n", + " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 1200K\n", + " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 2500K\n", + " Reading Ar38 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ar38.h\n", + " 5\n", + " Reading He3 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_He3.h5\n", + " Reading He4 from\n", + " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_He4.h5\n", + " Minimum neutron data temperature: 250 K\n", + " Maximum neutron data temperature: 2500 K\n", + " Preparing distributed cell instances...\n", + " Writing summary.h5 file...\n", + " Maximum neutron transport energy: 20000000 eV for C13\n", + "\n", + " ===============> FIXED SOURCE TRANSPORT SIMULATION <===============\n", + "\n", + " Simulating batch 1\n", + " Simulating batch 2\n", + " Simulating batch 3\n", + " Simulating batch 4\n", + " Simulating batch 5\n", + " Simulating batch 6\n", + " Simulating batch 7\n", + " Simulating batch 8\n", + " Simulating batch 9\n", + " Simulating batch 10\n", + " Simulating batch 11\n", + " Simulating batch 12\n", + " Simulating batch 13\n", + " Simulating batch 14\n", + " Simulating batch 15\n", + " Simulating batch 16\n", + " Simulating batch 17\n", + " Simulating batch 18\n", + " Simulating batch 19\n", + " Simulating batch 20\n", + " Simulating batch 21\n", + " Simulating batch 22\n", + " Simulating batch 23\n", + " Simulating batch 24\n", + " Simulating batch 25\n", + " Simulating batch 26\n", + " Simulating batch 27\n", + " Simulating batch 28\n", + " Simulating batch 29\n", + " Simulating batch 30\n", + " Simulating batch 31\n", + " Simulating batch 32\n", + " Simulating batch 33\n", + " Simulating batch 34\n", + " Simulating batch 35\n", + " Simulating batch 36\n", + " Simulating batch 37\n", + " Simulating batch 38\n", + " Simulating batch 39\n", + " Simulating batch 40\n", + " Simulating batch 41\n", + " Simulating batch 42\n", + " Simulating batch 43\n", + " Simulating batch 44\n", + " Simulating batch 45\n", + " Simulating batch 46\n", + " Simulating batch 47\n", + " Simulating batch 48\n", + " Simulating batch 49\n", + " Simulating batch 50\n", + " Simulating batch 51\n", + " Simulating batch 52\n", + " Simulating batch 53\n", + " Simulating batch 54\n", + " Simulating batch 55\n", + " Simulating batch 56\n", + " Simulating batch 57\n", + " Simulating batch 58\n", + " Simulating batch 59\n", + " Simulating batch 60\n", + " Simulating batch 61\n", + " Simulating batch 62\n", + " Simulating batch 63\n", + " Simulating batch 64\n", + " Simulating batch 65\n", + " Simulating batch 66\n", + " Simulating batch 67\n", + " Simulating batch 68\n", + " Simulating batch 69\n", + " Simulating batch 70\n", + " Simulating batch 71\n", + " Simulating batch 72\n", + " Simulating batch 73\n", + " Simulating batch 74\n", + " Simulating batch 75\n", + " Simulating batch 76\n", + " Simulating batch 77\n", + " Simulating batch 78\n", + " Simulating batch 79\n", + " Simulating batch 80\n", + " Simulating batch 81\n", + " Simulating batch 82\n", + " Simulating batch 83\n", + " Simulating batch 84\n", + " Simulating batch 85\n", + " Simulating batch 86\n", + " Simulating batch 87\n", + " Simulating batch 88\n", + " Simulating batch 89\n", + " Simulating batch 90\n", + " Simulating batch 91\n", + " Simulating batch 92\n", + " Simulating batch 93\n", + " Simulating batch 94\n", + " Simulating batch 95\n", + " Simulating batch 96\n", + " Simulating batch 97\n", + " Simulating batch 98\n", + " Simulating batch 99\n", + " Simulating batch 100\n", + " Creating state point statepoint.100.h5...\n", + "\n", + " =======================> TIMING STATISTICS <=======================\n", + "\n", + " Total time for initialization = 5.4348e+00 seconds\n", + " Reading cross sections = 5.3718e+00 seconds\n", + " Total time in simulation = 5.6021e+00 seconds\n", + " Time in transport only = 5.4964e+00 seconds\n", + " Time in active batches = 5.6021e+00 seconds\n", + " Time accumulating tallies = 8.5315e-02 seconds\n", + " Time writing statepoints = 3.4747e-03 seconds\n", + " Total time for finalization = 8.7180e-06 seconds\n", + " Total time elapsed = 1.1098e+01 seconds\n", + " Calculation Rate (active) = 178503 particles/second\n", + "\n", + " ============================> RESULTS <============================\n", + "\n", + " Leakage Fraction = 1.00000 +/- 0.00000\n", + "\n" + ] + }, + { + "data": { + "text/plain": [ + "PosixPath('/home/remidm/baby-1L-run-4/analysis/neutron/statepoint.100.h5')" + ] + }, + "execution_count": 38, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "my_model.run()" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
surfacecellfromnuclidescoremeanstd. dev.
022644totalcurrent0.0000000.000000
122744totalcurrent0.0300570.000145
223544totalcurrent0.0313530.000172
324144totalcurrent0.0000230.000004
424244totalcurrent0.0549970.000209
524344totalcurrent0.0000000.000000
\n", + "
" + ], + "text/plain": [ + " surface cellfrom nuclide score mean std. dev.\n", + "0 226 44 total current 0.00e+00 0.00e+00\n", + "1 227 44 total current 3.01e-02 1.45e-04\n", + "2 235 44 total current 3.14e-02 1.72e-04\n", + "3 241 44 total current 2.30e-05 4.46e-06\n", + "4 242 44 total current 5.50e-02 2.09e-04\n", + "5 243 44 total current 0.00e+00 0.00e+00" + ] + }, + "execution_count": 39, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sp = openmc.StatePoint(f\"statepoint.{my_model.settings.batches}.h5\")\n", + "tally = sp.get_tally(name=\"salt tally\").get_pandas_dataframe()\n", + "\n", + "tally" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "0.11643\n" + ] + } + ], + "source": [ + "print(tally['mean'].sum())" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "baby-1l-run-4", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.10" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 32af9963cda9afeae2c4a09b97f4ef99bb782516 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Tue, 13 May 2025 20:12:34 -0400 Subject: [PATCH 2/4] cell from filter --- analysis/neutron/solid_angle.ipynb | 575 +++++++++++++---------------- 1 file changed, 253 insertions(+), 322 deletions(-) diff --git a/analysis/neutron/solid_angle.ipynb b/analysis/neutron/solid_angle.ipynb index c060a03..377c026 100644 --- a/analysis/neutron/solid_angle.ipynb +++ b/analysis/neutron/solid_angle.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 8, + "execution_count": 1, "metadata": {}, "outputs": [ { @@ -155,7 +155,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -169,28 +169,28 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[Surface\n", - " \tID =\t226\n", + " \tID =\t7\n", " \tName =\t\n", " \tType =\tz-plane\n", " \tBoundary =\ttransmission\n", " \tCoefficients \n", " z0 =\t107.401,\n", " Surface\n", - " \tID =\t227\n", + " \tID =\t8\n", " \tName =\t\n", " \tType =\tz-plane\n", " \tBoundary =\ttransmission\n", " \tCoefficients \n", " z0 =\t113.91922,\n", " Surface\n", - " \tID =\t235\n", + " \tID =\t16\n", " \tName =\t\n", " \tType =\tz-cylinder\n", " \tBoundary =\ttransmission\n", @@ -199,7 +199,7 @@ " y0 =\t60\n", " r =\t7.0,\n", " Surface\n", - " \tID =\t241\n", + " \tID =\t22\n", " \tName =\t\n", " \tType =\tz-cylinder\n", " \tBoundary =\ttransmission\n", @@ -208,14 +208,14 @@ " y0 =\t60\n", " r =\t0.439,\n", " Surface\n", - " \tID =\t242\n", + " \tID =\t23\n", " \tName =\t\n", " \tType =\tz-plane\n", " \tBoundary =\ttransmission\n", " \tCoefficients \n", " z0 =\t108.279,\n", " Surface\n", - " \tID =\t243\n", + " \tID =\t24\n", " \tName =\t\n", " \tType =\tz-plane\n", " \tBoundary =\ttransmission\n", @@ -223,7 +223,7 @@ " z0 =\t133.679]" ] }, - "execution_count": 18, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -236,34 +236,44 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "import openmc\n", "\n", "surf_filter = openmc.SurfaceFilter(salt_surfaces)\n", - "from_cell_filter = openmc.CellFromFilter(salt_cell)" + "\n", + "from_cell_filter = openmc.CellFromFilter([cell for cell in my_model.geometry.get_all_cells().values()if cell != salt_cell]) \n", + "# from_cell_filter = openmc.CellFromFilter([salt_cell]) \n", + "# from_cell_filter = openmc.CellFromFilter([cell for cell in my_model.geometry.get_all_cells().values()]) \n" ] }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ - "tally= openmc.Tally(name=\"salt tally\")\n", + "tally = openmc.Tally(name=\"salt tally\")\n", "tally.filters = [surf_filter, from_cell_filter]\n", - "tally.scores = ['current']\n", + "tally.scores = [\"current\"]\n", "\n", - "my_model.tallies = [\n", - " tally,\n", - "]" + "my_model.tallies = [tally]" ] }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "my_model.materials = []" + ] + }, + { + "cell_type": "code", + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -299,265 +309,16 @@ " License | https://docs.openmc.org/en/latest/license.html\n", " Version | 0.15.2\n", " Commit Hash | e23760b0264c66fb7bb373aa0596801e5209d920\n", - " Date/Time | 2025-05-13 11:50:53\n", + " Date/Time | 2025-05-13 20:12:02\n", " MPI Processes | 1\n", " OpenMP Threads | 32\n", "\n", " Reading model XML file 'model.xml' ...\n", " Reading cross sections XML file...\n", - " Reading Al27 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Al27.h\n", - " 5\n", - " Reading Cu63 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cu63.h\n", - " 5\n", - " Reading Cu65 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cu65.h\n", - " 5\n", - " Reading C12 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_C12.h5\n", - " Reading C13 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_C13.h5\n", - " Reading N14 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_N14.h5\n", - " Reading O16 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_O16.h5\n", - " Reading Ar40 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ar40.h\n", - " 5\n", - " Reading H1 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_H1.h5\n", - " Reading Na23 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Na23.h\n", - " 5\n", - " Reading Mg24 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mg24.h\n", - " 5\n", - " Reading Mg25 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mg25.h\n", - " 5\n", - " Reading Mg26 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mg26.h\n", - " 5\n", - " Reading Si28 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Si28.h\n", - " 5\n", - " Reading Si29 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Si29.h\n", - " 5\n", - " Reading Si30 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Si30.h\n", - " 5\n", - " Reading K39 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_K39.h5\n", - " Reading K40 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_K40.h5\n", - " Reading K41 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_K41.h5\n", - " Reading Ca40 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca40.h\n", - " 5\n", - " Reading Ca42 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca42.h\n", - " 5\n", - " Reading Ca43 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca43.h\n", - " 5\n", - " Reading Ca44 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca44.h\n", - " 5\n", - " Reading Ca46 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca46.h\n", - " 5\n", - " Reading Ca48 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ca48.h\n", - " 5\n", - " Reading Fe54 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Fe54.h\n", - " 5\n", - " Reading Fe56 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Fe56.h\n", - " 5\n", - " Reading Fe57 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Fe57.h\n", - " 5\n", - " Reading Fe58 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Fe58.h\n", - " 5\n", - " Reading S32 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_S32.h5\n", - " Reading S33 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_S33.h5\n", - " Reading S34 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_S34.h5\n", - " Reading S36 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_S36.h5\n", - " Reading Mn55 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mn55.h\n", - " 5\n", - " Reading P31 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_P31.h5\n", - " Reading Cr50 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cr50.h\n", - " 5\n", - " Reading Cr52 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cr52.h\n", - " 5\n", - " Reading Cr53 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cr53.h\n", - " 5\n", - " Reading Cr54 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cr54.h\n", - " 5\n", - " Reading Ni58 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ni58.h\n", - " 5\n", - " Reading Ni60 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ni60.h\n", - " 5\n", - " Reading Ni61 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ni61.h\n", - " 5\n", - " Reading Ni62 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ni62.h\n", - " 5\n", - " Reading Ni64 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ni64.h\n", - " 5\n", - " Reading W182 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_W182.h\n", - " 5\n", - " Reading W183 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_W183.h\n", - " 5\n", - " Reading W184 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_W184.h\n", - " 5\n", - " Reading W186 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_W186.h\n", - " 5\n", - " Reading Pb204 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Pb204.\n", - " h5\n", - " Reading Pb206 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Pb206.\n", - " h5\n", - " Reading Pb207 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Pb207.\n", - " h5\n", - " Reading Pb208 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Pb208.\n", - " h5\n", - " Reading B10 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_B10.h5\n", - " Reading B11 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_B11.h5\n", - " Reading H2 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_H2.h5\n", - " Reading Zr90 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Zr90.h\n", - " 5\n", - " Reading Zr91 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Zr91.h\n", - " 5\n", - " Reading Zr92 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Zr92.h\n", - " 5\n", - " Reading Zr94 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Zr94.h\n", - " 5\n", - " Reading Zr96 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Zr96.h\n", - " 5\n", - " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 250K\n", - " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 294K\n", - " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 600K\n", - " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 900K\n", - " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 1200K\n", - " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 2500K\n", - " Reading Be9 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Be9.h5\n", - " Reading O17 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_O17.h5\n", - " Reading O18 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_O18.h5\n", - " Reading Ti46 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ti46.h\n", - " 5\n", - " Reading Ti47 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ti47.h\n", - " 5\n", - " Reading Ti48 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ti48.h\n", - " 5\n", - " Reading Ti49 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ti49.h\n", - " 5\n", - " Reading Ti50 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ti50.h\n", - " 5\n", - " Reading Li6 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Li6.h5\n", - " Reading Li7 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Li7.h5\n", - " Reading F19 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_F19.h5\n", - " Reading Co59 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Co59.h\n", - " 5\n", - " Reading Nb93 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Nb93.h\n", - " 5\n", - " Reading Mo92 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo92.h\n", - " 5\n", - " Reading Mo94 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo94.h\n", - " 5\n", - " Reading Mo95 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo95.h\n", - " 5\n", - " Reading Mo96 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo96.h\n", - " 5\n", - " Reading Mo97 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo97.h\n", - " 5\n", - " Reading Mo98 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo98.h\n", - " 5\n", - " Reading Mo100 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Mo100.\n", - " h5\n", - " Reading Cl35 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cl35.h\n", - " 5\n", - " Reading Cl37 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Cl37.h\n", - " 5\n", - " Reading N15 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_N15.h5\n", - " Reading Ar36 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ar36.h\n", - " 5\n", - " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 250K\n", - " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 294K\n", - " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 600K\n", - " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 900K\n", - " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 1200K\n", - " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 2500K\n", - " Reading Ar38 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_Ar38.h\n", - " 5\n", - " Reading He3 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_He3.h5\n", - " Reading He4 from\n", - " /home/remidm/baby-1L-run-4/analysis/neutron/cross_sections/ENDFB-8.0-NNDC_He4.h5\n", - " Minimum neutron data temperature: 250 K\n", - " Maximum neutron data temperature: 2500 K\n", + " Minimum neutron data temperature: 1.7976931348623157e+308 K\n", + " Maximum neutron data temperature: 0 K\n", " Preparing distributed cell instances...\n", " Writing summary.h5 file...\n", - " Maximum neutron transport energy: 20000000 eV for C13\n", "\n", " ===============> FIXED SOURCE TRANSPORT SIMULATION <===============\n", "\n", @@ -665,16 +426,16 @@ "\n", " =======================> TIMING STATISTICS <=======================\n", "\n", - " Total time for initialization = 5.4348e+00 seconds\n", - " Reading cross sections = 5.3718e+00 seconds\n", - " Total time in simulation = 5.6021e+00 seconds\n", - " Time in transport only = 5.4964e+00 seconds\n", - " Time in active batches = 5.6021e+00 seconds\n", - " Time accumulating tallies = 8.5315e-02 seconds\n", - " Time writing statepoints = 3.4747e-03 seconds\n", - " Total time for finalization = 8.7180e-06 seconds\n", - " Total time elapsed = 1.1098e+01 seconds\n", - " Calculation Rate (active) = 178503 particles/second\n", + " Total time for initialization = 6.7872e-02 seconds\n", + " Reading cross sections = 1.9729e-05 seconds\n", + " Total time in simulation = 1.5233e+01 seconds\n", + " Time in transport only = 1.4424e+01 seconds\n", + " Time in active batches = 1.5233e+01 seconds\n", + " Time accumulating tallies = 7.3802e-01 seconds\n", + " Time writing statepoints = 1.3866e-02 seconds\n", + " Total time for finalization = 1.4052e-05 seconds\n", + " Total time elapsed = 1.5301e+01 seconds\n", + " Calculation Rate (active) = 65645.1 particles/second\n", "\n", " ============================> RESULTS <============================\n", "\n", @@ -688,7 +449,7 @@ "PosixPath('/home/remidm/baby-1L-run-4/analysis/neutron/statepoint.100.h5')" ] }, - "execution_count": 38, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -699,7 +460,34 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Cell\n", + "\tID =\t7\n", + "\tName =\t\n", + "\tFill =\tNone\n", + "\tRegion =\t(7 -8 -16 (22 | -23 | 24))\n", + "\tRotation =\tNone\n", + "\tTranslation =\tNone\n", + "\tVolume =\tNone" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "salt_cell" + ] + }, + { + "cell_type": "code", + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -733,74 +521,214 @@ " \n", " \n", " \n", - " 0\n", - " 226\n", - " 44\n", + " 25\n", + " 7\n", + " 9\n", + " total\n", + " current\n", + " 0.065932\n", + " 0.000239\n", + " \n", + " \n", + " 29\n", + " 7\n", + " 14\n", + " total\n", + " current\n", + " 0.040766\n", + " 0.000201\n", + " \n", + " \n", + " 30\n", + " 7\n", + " 13\n", + " total\n", + " current\n", + " 0.220096\n", + " 0.000384\n", + " \n", + " \n", + " 65\n", + " 8\n", + " 14\n", + " total\n", + " current\n", + " 0.024657\n", + " 0.000155\n", + " \n", + " \n", + " 66\n", + " 8\n", + " 13\n", " total\n", " current\n", - " 0.000000\n", - " 0.000000\n", + " 0.228077\n", + " 0.000356\n", " \n", " \n", - " 1\n", - " 227\n", - " 44\n", + " 97\n", + " 16\n", + " 9\n", " total\n", " current\n", - " 0.030057\n", - " 0.000145\n", + " 0.004492\n", + " 0.000070\n", " \n", " \n", - " 2\n", - " 235\n", - " 44\n", + " 98\n", + " 16\n", + " 8\n", " total\n", " current\n", - " 0.031353\n", - " 0.000172\n", + " 0.009801\n", + " 0.000087\n", " \n", " \n", - " 3\n", - " 241\n", - " 44\n", + " 101\n", + " 16\n", + " 14\n", " total\n", " current\n", - " 0.000023\n", + " 0.012204\n", + " 0.000117\n", + " \n", + " \n", + " 102\n", + " 16\n", + " 13\n", + " total\n", + " current\n", + " 0.587235\n", + " 0.000512\n", + " \n", + " \n", + " 131\n", + " 22\n", + " 5\n", + " total\n", + " current\n", + " 0.000060\n", + " 0.000009\n", + " \n", + " \n", + " 133\n", + " 22\n", + " 9\n", + " total\n", + " current\n", + " 0.000015\n", " 0.000004\n", " \n", " \n", - " 4\n", - " 242\n", - " 44\n", + " 136\n", + " 22\n", + " 11\n", + " total\n", + " current\n", + " 0.000198\n", + " 0.000015\n", + " \n", + " \n", + " 137\n", + " 22\n", + " 14\n", " total\n", " current\n", - " 0.054997\n", - " 0.000209\n", + " 0.000026\n", + " 0.000005\n", " \n", " \n", - " 5\n", - " 243\n", - " 44\n", + " 138\n", + " 22\n", + " 13\n", " total\n", " current\n", - " 0.000000\n", - " 0.000000\n", + " 0.002361\n", + " 0.000052\n", + " \n", + " \n", + " 167\n", + " 23\n", + " 5\n", + " total\n", + " current\n", + " 0.005769\n", + " 0.000073\n", + " \n", + " \n", + " 169\n", + " 23\n", + " 9\n", + " total\n", + " current\n", + " 0.004155\n", + " 0.000063\n", + " \n", + " \n", + " 173\n", + " 23\n", + " 14\n", + " total\n", + " current\n", + " 0.038108\n", + " 0.000219\n", + " \n", + " \n", + " 174\n", + " 23\n", + " 13\n", + " total\n", + " current\n", + " 0.224097\n", + " 0.000375\n", + " \n", + " \n", + " 208\n", + " 24\n", + " 11\n", + " total\n", + " current\n", + " 0.000030\n", + " 0.000005\n", + " \n", + " \n", + " 210\n", + " 24\n", + " 13\n", + " total\n", + " current\n", + " 0.141635\n", + " 0.000367\n", " \n", " \n", "\n", "" ], "text/plain": [ - " surface cellfrom nuclide score mean std. dev.\n", - "0 226 44 total current 0.00e+00 0.00e+00\n", - "1 227 44 total current 3.01e-02 1.45e-04\n", - "2 235 44 total current 3.14e-02 1.72e-04\n", - "3 241 44 total current 2.30e-05 4.46e-06\n", - "4 242 44 total current 5.50e-02 2.09e-04\n", - "5 243 44 total current 0.00e+00 0.00e+00" + " surface cellfrom nuclide score mean std. dev.\n", + "25 7 9 total current 0.065932 0.000239\n", + "29 7 14 total current 0.040766 0.000201\n", + "30 7 13 total current 0.220096 0.000384\n", + "65 8 14 total current 0.024657 0.000155\n", + "66 8 13 total current 0.228077 0.000356\n", + "97 16 9 total current 0.004492 0.000070\n", + "98 16 8 total current 0.009801 0.000087\n", + "101 16 14 total current 0.012204 0.000117\n", + "102 16 13 total current 0.587235 0.000512\n", + "131 22 5 total current 0.000060 0.000009\n", + "133 22 9 total current 0.000015 0.000004\n", + "136 22 11 total current 0.000198 0.000015\n", + "137 22 14 total current 0.000026 0.000005\n", + "138 22 13 total current 0.002361 0.000052\n", + "167 23 5 total current 0.005769 0.000073\n", + "169 23 9 total current 0.004155 0.000063\n", + "173 23 14 total current 0.038108 0.000219\n", + "174 23 13 total current 0.224097 0.000375\n", + "208 24 11 total current 0.000030 0.000005\n", + "210 24 13 total current 0.141635 0.000367" ] }, - "execution_count": 39, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -809,19 +737,22 @@ "sp = openmc.StatePoint(f\"statepoint.{my_model.settings.batches}.h5\")\n", "tally = sp.get_tally(name=\"salt tally\").get_pandas_dataframe()\n", "\n", + "# filter where mean is not zero\n", + "tally = tally[tally['mean'] != 0]\n", + "\n", "tally" ] }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "0.11643\n" + "1.609714\n" ] } ], From 43bf908a7124a600659db4f552d7f53d4213077f Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Tue, 13 May 2025 20:52:23 -0400 Subject: [PATCH 3/4] added CellFilter --- analysis/neutron/solid_angle.ipynb | 282 ++++++++--------------------- 1 file changed, 79 insertions(+), 203 deletions(-) diff --git a/analysis/neutron/solid_angle.ipynb b/analysis/neutron/solid_angle.ipynb index 377c026..0571a70 100644 --- a/analysis/neutron/solid_angle.ipynb +++ b/analysis/neutron/solid_angle.ipynb @@ -244,9 +244,11 @@ "\n", "surf_filter = openmc.SurfaceFilter(salt_surfaces)\n", "\n", - "from_cell_filter = openmc.CellFromFilter([cell for cell in my_model.geometry.get_all_cells().values()if cell != salt_cell]) \n", - "# from_cell_filter = openmc.CellFromFilter([salt_cell]) \n", - "# from_cell_filter = openmc.CellFromFilter([cell for cell in my_model.geometry.get_all_cells().values()]) \n" + "cell_filter = openmc.CellFilter(salt_cell)\n", + "\n", + "all_cells = list(my_model.geometry.get_all_cells().values())\n", + "from_cell_filter = openmc.CellFromFilter([cell for cell in all_cells if cell != salt_cell]) \n", + "# from_cell_filter = openmc.CellFromFilter([salt_cell])\n" ] }, { @@ -256,7 +258,7 @@ "outputs": [], "source": [ "tally = openmc.Tally(name=\"salt tally\")\n", - "tally.filters = [surf_filter, from_cell_filter]\n", + "tally.filters = [surf_filter, from_cell_filter, cell_filter]\n", "tally.scores = [\"current\"]\n", "\n", "my_model.tallies = [tally]" @@ -309,7 +311,7 @@ " License | https://docs.openmc.org/en/latest/license.html\n", " Version | 0.15.2\n", " Commit Hash | e23760b0264c66fb7bb373aa0596801e5209d920\n", - " Date/Time | 2025-05-13 20:12:02\n", + " Date/Time | 2025-05-13 20:51:16\n", " MPI Processes | 1\n", " OpenMP Threads | 32\n", "\n", @@ -426,16 +428,16 @@ "\n", " =======================> TIMING STATISTICS <=======================\n", "\n", - " Total time for initialization = 6.7872e-02 seconds\n", - " Reading cross sections = 1.9729e-05 seconds\n", - " Total time in simulation = 1.5233e+01 seconds\n", - " Time in transport only = 1.4424e+01 seconds\n", - " Time in active batches = 1.5233e+01 seconds\n", - " Time accumulating tallies = 7.3802e-01 seconds\n", - " Time writing statepoints = 1.3866e-02 seconds\n", - " Total time for finalization = 1.4052e-05 seconds\n", - " Total time elapsed = 1.5301e+01 seconds\n", - " Calculation Rate (active) = 65645.1 particles/second\n", + " Total time for initialization = 7.1622e-02 seconds\n", + " Reading cross sections = 3.0352e-05 seconds\n", + " Total time in simulation = 2.2002e+01 seconds\n", + " Time in transport only = 2.1141e+01 seconds\n", + " Time in active batches = 2.2002e+01 seconds\n", + " Time accumulating tallies = 7.7813e-01 seconds\n", + " Time writing statepoints = 1.1754e-02 seconds\n", + " Total time for finalization = 1.2298e-05 seconds\n", + " Total time elapsed = 2.2073e+01 seconds\n", + " Calculation Rate (active) = 45451.3 particles/second\n", "\n", " ============================> RESULTS <============================\n", "\n", @@ -513,6 +515,7 @@ " \n", " surface\n", " cellfrom\n", + " cell\n", " nuclide\n", " score\n", " mean\n", @@ -524,208 +527,30 @@ " 25\n", " 7\n", " 9\n", - " total\n", - " current\n", - " 0.065932\n", - " 0.000239\n", - " \n", - " \n", - " 29\n", " 7\n", - " 14\n", - " total\n", - " current\n", - " 0.040766\n", - " 0.000201\n", - " \n", - " \n", - " 30\n", - " 7\n", - " 13\n", - " total\n", - " current\n", - " 0.220096\n", - " 0.000384\n", - " \n", - " \n", - " 65\n", - " 8\n", - " 14\n", - " total\n", - " current\n", - " 0.024657\n", - " 0.000155\n", - " \n", - " \n", - " 66\n", - " 8\n", - " 13\n", - " total\n", - " current\n", - " 0.228077\n", - " 0.000356\n", - " \n", - " \n", - " 97\n", - " 16\n", - " 9\n", - " total\n", - " current\n", - " 0.004492\n", - " 0.000070\n", - " \n", - " \n", - " 98\n", - " 16\n", - " 8\n", - " total\n", - " current\n", - " 0.009801\n", - " 0.000087\n", - " \n", - " \n", - " 101\n", - " 16\n", - " 14\n", - " total\n", - " current\n", - " 0.012204\n", - " 0.000117\n", - " \n", - " \n", - " 102\n", - " 16\n", - " 13\n", - " total\n", - " current\n", - " 0.587235\n", - " 0.000512\n", - " \n", - " \n", - " 131\n", - " 22\n", - " 5\n", - " total\n", - " current\n", - " 0.000060\n", - " 0.000009\n", - " \n", - " \n", - " 133\n", - " 22\n", - " 9\n", " total\n", " current\n", - " 0.000015\n", - " 0.000004\n", + " 0.061531\n", + " 0.000223\n", " \n", " \n", " 136\n", " 22\n", " 11\n", + " 7\n", " total\n", " current\n", - " 0.000198\n", - " 0.000015\n", - " \n", - " \n", - " 137\n", - " 22\n", - " 14\n", - " total\n", - " current\n", - " 0.000026\n", - " 0.000005\n", - " \n", - " \n", - " 138\n", - " 22\n", - " 13\n", - " total\n", - " current\n", - " 0.002361\n", - " 0.000052\n", - " \n", - " \n", - " 167\n", - " 23\n", - " 5\n", - " total\n", - " current\n", - " 0.005769\n", - " 0.000073\n", - " \n", - " \n", - " 169\n", - " 23\n", - " 9\n", - " total\n", - " current\n", - " 0.004155\n", - " 0.000063\n", - " \n", - " \n", - " 173\n", - " 23\n", - " 14\n", - " total\n", - " current\n", - " 0.038108\n", - " 0.000219\n", - " \n", - " \n", - " 174\n", - " 23\n", - " 13\n", - " total\n", - " current\n", - " 0.224097\n", - " 0.000375\n", - " \n", - " \n", - " 208\n", - " 24\n", - " 11\n", - " total\n", - " current\n", - " 0.000030\n", - " 0.000005\n", - " \n", - " \n", - " 210\n", - " 24\n", - " 13\n", - " total\n", - " current\n", - " 0.141635\n", - " 0.000367\n", + " 0.000107\n", + " 0.000011\n", " \n", " \n", "\n", "" ], "text/plain": [ - " surface cellfrom nuclide score mean std. dev.\n", - "25 7 9 total current 0.065932 0.000239\n", - "29 7 14 total current 0.040766 0.000201\n", - "30 7 13 total current 0.220096 0.000384\n", - "65 8 14 total current 0.024657 0.000155\n", - "66 8 13 total current 0.228077 0.000356\n", - "97 16 9 total current 0.004492 0.000070\n", - "98 16 8 total current 0.009801 0.000087\n", - "101 16 14 total current 0.012204 0.000117\n", - "102 16 13 total current 0.587235 0.000512\n", - "131 22 5 total current 0.000060 0.000009\n", - "133 22 9 total current 0.000015 0.000004\n", - "136 22 11 total current 0.000198 0.000015\n", - "137 22 14 total current 0.000026 0.000005\n", - "138 22 13 total current 0.002361 0.000052\n", - "167 23 5 total current 0.005769 0.000073\n", - "169 23 9 total current 0.004155 0.000063\n", - "173 23 14 total current 0.038108 0.000219\n", - "174 23 13 total current 0.224097 0.000375\n", - "208 24 11 total current 0.000030 0.000005\n", - "210 24 13 total current 0.141635 0.000367" + " surface cellfrom cell nuclide score mean std. dev.\n", + "25 7 9 7 total current 0.061531 0.000223\n", + "136 22 11 7 total current 0.000107 0.000011" ] }, "execution_count": 9, @@ -752,12 +577,63 @@ "name": "stdout", "output_type": "stream", "text": [ - "1.609714\n" + "Solid angle: 6.16% of the source neutrons enter the salt cell\n" ] } ], "source": [ - "print(tally['mean'].sum())" + "print(f\"Solid angle: {tally['mean'].sum():.2%} of the source neutrons enter the salt cell\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Analytical" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solid angle: 9.05e-01 sr\n" + ] + } + ], + "source": [ + "distance_between_source_and_salt = 107.401 - (94.365)\n", + "baby_diameter = 14 # cm\n", + "baby_radius = 0.5 * baby_diameter\n", + "salt_area = 3.14 * (baby_radius**2)\n", + "\n", + "solid_angle = salt_area/distance_between_source_and_salt**2\n", + "\n", + "print(f\"Solid angle: {solid_angle:.2e} sr\")" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Solid angle: 7.21% of 4pi sr\n" + ] + } + ], + "source": [ + "# to percentage\n", + "solid_angle_percentage = solid_angle / (4 * 3.14)\n", + "\n", + "print(f\"Solid angle: {solid_angle_percentage:.2%} of 4pi sr\")" ] } ], From d7c27a1db999f631914d9a007ff3f9c3ab97e0d8 Mon Sep 17 00:00:00 2001 From: RemDelaporteMathurin Date: Mon, 19 May 2025 15:57:59 -0400 Subject: [PATCH 4/4] typing --- analysis/neutron/openmc_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analysis/neutron/openmc_model.py b/analysis/neutron/openmc_model.py index c98ee69..d1198b6 100644 --- a/analysis/neutron/openmc_model.py +++ b/analysis/neutron/openmc_model.py @@ -312,7 +312,7 @@ def baby_geometry(x_c: float, y_c: float, z_c: float): return sphere, cllif_cell, cells -def baby_model(): +def baby_model() -> openmc.Model: """Returns an openmc model of the BABY experiment. Returns: