mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Adding unstructured mesh with CAD example.
This commit is contained in:
parent
3d9abfba57
commit
a15aa6dd70
4 changed files with 729 additions and 0 deletions
BIN
examples/jupyter/images/manifold-cad.png
Normal file
BIN
examples/jupyter/images/manifold-cad.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 97 KiB |
BIN
examples/jupyter/images/manifold_flux.png
Normal file
BIN
examples/jupyter/images/manifold_flux.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
729
examples/jupyter/unstructured_mesh_II.ipynb
Normal file
729
examples/jupyter/unstructured_mesh_II.ipynb
Normal file
|
|
@ -0,0 +1,729 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import urllib.request\n",
|
||||
"\n",
|
||||
"manifold_geom_url = 'https://tinyurl.com/rp7grox'\n",
|
||||
"manifold_mesh_url = 'https://tinyurl.com/wojemuh'\n",
|
||||
"\n",
|
||||
"def download(url, filename='dagmc.h5m'):\n",
|
||||
" \"\"\"\n",
|
||||
" Helper function for retrieving dagmc models\n",
|
||||
" \"\"\"\n",
|
||||
" u = urllib.request.urlopen(url)\n",
|
||||
" \n",
|
||||
" if u.status != 200:\n",
|
||||
" raise RuntimeError(\"Failed to download file.\")\n",
|
||||
" \n",
|
||||
" # save file as dagmc.h5m\n",
|
||||
" with open(filename, 'wb') as f:\n",
|
||||
" f.write(u.read())"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Unstructured Mesh Tallies with CAD Geometry in OpenMC\n",
|
||||
"\n",
|
||||
"In the first notebook on this topic, we looked at how to set up a tally using an unstructured mesh in OpenMC.\n",
|
||||
"In this notebook, we will explore using unstructured mesh in conjunction with CAD-based geometry to perform detailed geometry analysis on complex geomerty.\n",
|
||||
"\n",
|
||||
"_NOTE: This notebook will not run successfully if OpenMC has not been built with DAGMC support enabled._"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import openmc\n",
|
||||
"import openmc.lib\n",
|
||||
"\n",
|
||||
"assert(openmc.lib._dagmc_enabled())"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The model we'll be looking at today is a steel piping manifold:\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This is a nice example of a model which would be extremely difficult to model using CSG. To get started, we'll need two files: \n",
|
||||
" 1. the DAGMC gometry file on which we'll track particles and \n",
|
||||
" 2. a tetrahedral mesh of the piping structure on which we'll score tallies\n",
|
||||
" \n",
|
||||
"To start, let's create the materials we'll need for this problem. The pipes are steel and we'll model the surrounding area as air."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"air = openmc.Material(name='air')\n",
|
||||
"air.set_density('g/cc', 0.001205)\n",
|
||||
"air.add_nuclide('N14',0.781557629247)\n",
|
||||
"air.add_nuclide('N15',0.002873370753)\n",
|
||||
"air.add_nuclide('O16',0.210668126508)\n",
|
||||
"air.add_nuclide('O17',7.9873492e-05)\n",
|
||||
"air.add_nuclide('Ar36',1.53456e-05)\n",
|
||||
"air.add_nuclide('Ar38',2.8934e-06)\n",
|
||||
"air.add_nuclide('Ar40',0.004581761)\n",
|
||||
"\n",
|
||||
"steel = openmc.Material(name='steel')\n",
|
||||
"steel.set_density('g/cc', 8.0)\n",
|
||||
"steel.add_nuclide('Si28',0.0092672382464)\n",
|
||||
"steel.add_nuclide('Si29',0.00047056391679999997)\n",
|
||||
"steel.add_nuclide('Si30',0.00031019783679999996)\n",
|
||||
"steel.add_nuclide('P31',0.00023)\n",
|
||||
"steel.add_nuclide('S32',0.000218593702)\n",
|
||||
"steel.add_nuclide('S33',1.721987e-06)\n",
|
||||
"steel.add_nuclide('S34',9.650777000000001e-06)\n",
|
||||
"steel.add_nuclide('S36',3.3534e-08)\n",
|
||||
"steel.add_nuclide('Mn55',0.011014)\n",
|
||||
"steel.add_nuclide('Fe54',0.03910305)\n",
|
||||
"steel.add_nuclide('Fe56',0.6138342600000001)\n",
|
||||
"steel.add_nuclide('Fe57',0.01417611)\n",
|
||||
"steel.add_nuclide('Fe58',0.0018865800000000001)\n",
|
||||
"steel.add_nuclide('Ni58',0.08169227999999999)\n",
|
||||
"steel.add_nuclide('Ni60',0.03146772)\n",
|
||||
"steel.add_nuclide('Ni61',0.00136788)\n",
|
||||
"steel.add_nuclide('Ni62',0.0043614000000000005)\n",
|
||||
"steel.add_nuclide('Ni64',0.00111072)\n",
|
||||
"steel.add_nuclide('Mo100',0.0024360000000000002)\n",
|
||||
"steel.add_nuclide('Mo92',0.0036622500000000006)\n",
|
||||
"steel.add_nuclide('Mo94',0.0022967499999999997)\n",
|
||||
"steel.add_nuclide('Mo95',0.00396825)\n",
|
||||
"steel.add_nuclide('Mo96',0.00416825)\n",
|
||||
"steel.add_nuclide('Mo97',0.0023955)\n",
|
||||
"steel.add_nuclide('Mo98',0.006073)\n",
|
||||
"\n",
|
||||
"materials = openmc.Materials([air, steel])\n",
|
||||
"materials.export_to_xml()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"download(manifold_geom_url)\n",
|
||||
"download(manifold_mesh_url, 'manifold.h5m')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Next we'll create a point source at the entrance the single pipe on the low side of the model."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"src_pnt = openmc.stats.Point(xyz=(0.0, 0.0, 0.0))\n",
|
||||
"src_energy = openmc.stats.Discrete(x=[10.0], p=[1.0])\n",
|
||||
"\n",
|
||||
"source = openmc.Source(space=src_pnt, energy=src_energy)\n",
|
||||
"\n",
|
||||
"settings = openmc.Settings()\n",
|
||||
"settings.source = source\n",
|
||||
"\n",
|
||||
"settings.run_mode = \"fixed source\"\n",
|
||||
"settings.batches = 10\n",
|
||||
"settings.particles = 5000"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"And we'll indicate that we're using a CAD-based geometry."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"settings.dagmc = True\n",
|
||||
"\n",
|
||||
"settings.export_to_xml()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We'll run a few particles through this geometry to make sure everything is working properly."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 20,
|
||||
"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-2020 MIT and OpenMC contributors\n",
|
||||
" License | http://openmc.readthedocs.io/en/latest/license.html\n",
|
||||
" Version | 0.12.0-dev\n",
|
||||
" Git SHA1 | 21a5b51f2d59f7ceaf7546efd7b21786d55c6d87\n",
|
||||
" Date/Time | 2020-03-17 18:43:06\n",
|
||||
" OpenMP Threads | 96\n",
|
||||
"\n",
|
||||
" Reading settings XML file...\n",
|
||||
" Reading cross sections XML file...\n",
|
||||
" Reading materials XML file...\n",
|
||||
" Reading DAGMC geometry...\n",
|
||||
"Loading file dagmc.h5m\n",
|
||||
"Initializing the GeomQueryTool...\n",
|
||||
"Using faceting tolerance: 0.001\n",
|
||||
"Building OBB Tree...\n",
|
||||
" Reading N14 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/N14.h5\n",
|
||||
" Reading N15 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/N15.h5\n",
|
||||
" Reading O16 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/O16.h5\n",
|
||||
" Reading O17 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/O17.h5\n",
|
||||
" Reading Ar36 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ar36.h5\n",
|
||||
" WARNING: Negative value(s) found on probability table for nuclide Ar36 at 294K\n",
|
||||
" Reading Ar38 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ar38.h5\n",
|
||||
" Reading Ar40 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ar40.h5\n",
|
||||
" Reading Si28 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Si28.h5\n",
|
||||
" Reading Si29 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Si29.h5\n",
|
||||
" Reading Si30 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Si30.h5\n",
|
||||
" Reading P31 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/P31.h5\n",
|
||||
" Reading S32 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/S32.h5\n",
|
||||
" Reading S33 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/S33.h5\n",
|
||||
" Reading S34 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/S34.h5\n",
|
||||
" Reading S36 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/S36.h5\n",
|
||||
" Reading Mn55 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mn55.h5\n",
|
||||
" Reading Fe54 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Fe54.h5\n",
|
||||
" Reading Fe56 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Fe56.h5\n",
|
||||
" Reading Fe57 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Fe57.h5\n",
|
||||
" Reading Fe58 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Fe58.h5\n",
|
||||
" Reading Ni58 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ni58.h5\n",
|
||||
" Reading Ni60 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ni60.h5\n",
|
||||
" Reading Ni61 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ni61.h5\n",
|
||||
" Reading Ni62 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ni62.h5\n",
|
||||
" Reading Ni64 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ni64.h5\n",
|
||||
" Reading Mo100 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo100.h5\n",
|
||||
" Reading Mo92 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo92.h5\n",
|
||||
" Reading Mo94 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo94.h5\n",
|
||||
" Reading Mo95 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo95.h5\n",
|
||||
" Reading Mo96 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo96.h5\n",
|
||||
" Reading Mo97 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo97.h5\n",
|
||||
" Reading Mo98 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo98.h5\n",
|
||||
" Maximum neutron transport energy: 20000000.000000 eV for N15\n",
|
||||
" Minimum neutron data temperature: 294.000000 K\n",
|
||||
" Maximum neutron data temperature: 294.000000 K\n",
|
||||
" Preparing distributed cell instances...\n",
|
||||
" Writing summary.h5 file...\n",
|
||||
" Initializing source particles...\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",
|
||||
" Creating state point statepoint.10.h5...\n",
|
||||
"\n",
|
||||
" =======================> TIMING STATISTICS <=======================\n",
|
||||
"\n",
|
||||
" Total time for initialization = 1.5505e+01 seconds\n",
|
||||
" Reading cross sections = 1.5735e+00 seconds\n",
|
||||
" Total time in simulation = 1.2177e+01 seconds\n",
|
||||
" Time in transport only = 9.8645e+00 seconds\n",
|
||||
" Time in active batches = 1.2177e+01 seconds\n",
|
||||
" Time sampling source = 2.3088e+00 seconds\n",
|
||||
" Time accumulating tallies = 6.5960e-06 seconds\n",
|
||||
" Total time for finalization = 3.7800e-07 seconds\n",
|
||||
" Total time elapsed = 2.7916e+01 seconds\n",
|
||||
" Calculation Rate (active) = 4106.22 particles/second\n",
|
||||
"\n",
|
||||
" ============================> RESULTS <============================\n",
|
||||
"\n",
|
||||
" Leakage Fraction = 0.78918 +/- 0.00118\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"openmc.run()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now let's setup the unstructured mesh tally. We'll do this the same way we did in the previous notebook."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"unstructured_mesh = openmc.UnstructuredMesh(filename=\"manifold.h5m\")\n",
|
||||
"\n",
|
||||
"mesh_filter = openmc.MeshFilter(unstructured_mesh)\n",
|
||||
"\n",
|
||||
"tally = openmc.Tally()\n",
|
||||
"tally.filters = [mesh_filter]\n",
|
||||
"tally.scores = ['flux']\n",
|
||||
"tally.estimator = 'tracklength'\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"tallies = openmc.Tallies([tally])\n",
|
||||
"tallies.export_to_xml()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 29,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"settings.batches = 200\n",
|
||||
"settings.export_to_xml()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 30,
|
||||
"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-2020 MIT and OpenMC contributors\n",
|
||||
" License | http://openmc.readthedocs.io/en/latest/license.html\n",
|
||||
" Version | 0.12.0-dev\n",
|
||||
" Git SHA1 | 21a5b51f2d59f7ceaf7546efd7b21786d55c6d87\n",
|
||||
" Date/Time | 2020-03-17 19:02:12\n",
|
||||
" OpenMP Threads | 96\n",
|
||||
"\n",
|
||||
" Reading settings XML file...\n",
|
||||
" Reading cross sections XML file...\n",
|
||||
" Reading materials XML file...\n",
|
||||
" Reading DAGMC geometry...\n",
|
||||
"Loading file dagmc.h5m\n",
|
||||
"Initializing the GeomQueryTool...\n",
|
||||
"Using faceting tolerance: 0.001\n",
|
||||
"Building OBB Tree...\n",
|
||||
" Reading N14 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/N14.h5\n",
|
||||
" Reading N15 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/N15.h5\n",
|
||||
" Reading O16 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/O16.h5\n",
|
||||
" Reading O17 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/O17.h5\n",
|
||||
" Reading Ar36 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ar36.h5\n",
|
||||
" WARNING: Negative value(s) found on probability table for nuclide Ar36 at 294K\n",
|
||||
" Reading Ar38 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ar38.h5\n",
|
||||
" Reading Ar40 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ar40.h5\n",
|
||||
" Reading Si28 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Si28.h5\n",
|
||||
" Reading Si29 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Si29.h5\n",
|
||||
" Reading Si30 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Si30.h5\n",
|
||||
" Reading P31 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/P31.h5\n",
|
||||
" Reading S32 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/S32.h5\n",
|
||||
" Reading S33 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/S33.h5\n",
|
||||
" Reading S34 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/S34.h5\n",
|
||||
" Reading S36 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/S36.h5\n",
|
||||
" Reading Mn55 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mn55.h5\n",
|
||||
" Reading Fe54 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Fe54.h5\n",
|
||||
" Reading Fe56 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Fe56.h5\n",
|
||||
" Reading Fe57 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Fe57.h5\n",
|
||||
" Reading Fe58 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Fe58.h5\n",
|
||||
" Reading Ni58 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ni58.h5\n",
|
||||
" Reading Ni60 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ni60.h5\n",
|
||||
" Reading Ni61 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ni61.h5\n",
|
||||
" Reading Ni62 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ni62.h5\n",
|
||||
" Reading Ni64 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Ni64.h5\n",
|
||||
" Reading Mo100 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo100.h5\n",
|
||||
" Reading Mo92 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo92.h5\n",
|
||||
" Reading Mo94 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo94.h5\n",
|
||||
" Reading Mo95 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo95.h5\n",
|
||||
" Reading Mo96 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo96.h5\n",
|
||||
" Reading Mo97 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo97.h5\n",
|
||||
" Reading Mo98 from /home/pshriwise/opt/openmc/xs/nndc_hdf5/Mo98.h5\n",
|
||||
" Maximum neutron transport energy: 20000000.000000 eV for N15\n",
|
||||
" Minimum neutron data temperature: 294.000000 K\n",
|
||||
" Maximum neutron data temperature: 294.000000 K\n",
|
||||
" Reading tallies XML file...\n",
|
||||
" Preparing distributed cell instances...\n",
|
||||
" Writing summary.h5 file...\n",
|
||||
" Initializing source particles...\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",
|
||||
" Simulating batch 101\n",
|
||||
" Simulating batch 102\n",
|
||||
" Simulating batch 103\n",
|
||||
" Simulating batch 104\n",
|
||||
" Simulating batch 105\n",
|
||||
" Simulating batch 106\n",
|
||||
" Simulating batch 107\n",
|
||||
" Simulating batch 108\n",
|
||||
" Simulating batch 109\n",
|
||||
" Simulating batch 110\n",
|
||||
" Simulating batch 111\n",
|
||||
" Simulating batch 112\n",
|
||||
" Simulating batch 113\n",
|
||||
" Simulating batch 114\n",
|
||||
" Simulating batch 115\n",
|
||||
" Simulating batch 116\n",
|
||||
" Simulating batch 117\n",
|
||||
" Simulating batch 118\n",
|
||||
" Simulating batch 119\n",
|
||||
" Simulating batch 120\n",
|
||||
" Simulating batch 121\n",
|
||||
" Simulating batch 122\n",
|
||||
" Simulating batch 123\n",
|
||||
" Simulating batch 124\n",
|
||||
" Simulating batch 125\n",
|
||||
" Simulating batch 126\n",
|
||||
" Simulating batch 127\n",
|
||||
" Simulating batch 128\n",
|
||||
" Simulating batch 129\n",
|
||||
" Simulating batch 130\n",
|
||||
" Simulating batch 131\n",
|
||||
" Simulating batch 132\n",
|
||||
" Simulating batch 133\n",
|
||||
" Simulating batch 134\n",
|
||||
" Simulating batch 135\n",
|
||||
" Simulating batch 136\n",
|
||||
" Simulating batch 137\n",
|
||||
" Simulating batch 138\n",
|
||||
" Simulating batch 139\n",
|
||||
" Simulating batch 140\n",
|
||||
" Simulating batch 141\n",
|
||||
" Simulating batch 142\n",
|
||||
" Simulating batch 143\n",
|
||||
" Simulating batch 144\n",
|
||||
" Simulating batch 145\n",
|
||||
" Simulating batch 146\n",
|
||||
" Simulating batch 147\n",
|
||||
" Simulating batch 148\n",
|
||||
" Simulating batch 149\n",
|
||||
" Simulating batch 150\n",
|
||||
" Simulating batch 151\n",
|
||||
" Simulating batch 152\n",
|
||||
" Simulating batch 153\n",
|
||||
" Simulating batch 154\n",
|
||||
" Simulating batch 155\n",
|
||||
" Simulating batch 156\n",
|
||||
" Simulating batch 157\n",
|
||||
" Simulating batch 158\n",
|
||||
" Simulating batch 159\n",
|
||||
" Simulating batch 160\n",
|
||||
" Simulating batch 161\n",
|
||||
" Simulating batch 162\n",
|
||||
" Simulating batch 163\n",
|
||||
" Simulating batch 164\n",
|
||||
" Simulating batch 165\n",
|
||||
" Simulating batch 166\n",
|
||||
" Simulating batch 167\n",
|
||||
" Simulating batch 168\n",
|
||||
" Simulating batch 169\n",
|
||||
" Simulating batch 170\n",
|
||||
" Simulating batch 171\n",
|
||||
" Simulating batch 172\n",
|
||||
" Simulating batch 173\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" Simulating batch 174\n",
|
||||
" Simulating batch 175\n",
|
||||
" Simulating batch 176\n",
|
||||
" Simulating batch 177\n",
|
||||
" Simulating batch 178\n",
|
||||
" Simulating batch 179\n",
|
||||
" Simulating batch 180\n",
|
||||
" Simulating batch 181\n",
|
||||
" Simulating batch 182\n",
|
||||
" Simulating batch 183\n",
|
||||
" Simulating batch 184\n",
|
||||
" Simulating batch 185\n",
|
||||
" Simulating batch 186\n",
|
||||
" Simulating batch 187\n",
|
||||
" Simulating batch 188\n",
|
||||
" Simulating batch 189\n",
|
||||
" Simulating batch 190\n",
|
||||
" Simulating batch 191\n",
|
||||
" Simulating batch 192\n",
|
||||
" Simulating batch 193\n",
|
||||
" Simulating batch 194\n",
|
||||
" Simulating batch 195\n",
|
||||
" Simulating batch 196\n",
|
||||
" Simulating batch 197\n",
|
||||
" Simulating batch 198\n",
|
||||
" Simulating batch 199\n",
|
||||
" Simulating batch 200\n",
|
||||
" Creating state point statepoint.200.h5...\n",
|
||||
" Writing unstructured mesh tally_3.200.vtk...\n",
|
||||
"\n",
|
||||
" =======================> TIMING STATISTICS <=======================\n",
|
||||
"\n",
|
||||
" Total time for initialization = 3.6126e+01 seconds\n",
|
||||
" Reading cross sections = 1.5844e+00 seconds\n",
|
||||
" Total time in simulation = 2.5434e+02 seconds\n",
|
||||
" Time in transport only = 2.0793e+02 seconds\n",
|
||||
" Time in active batches = 2.5434e+02 seconds\n",
|
||||
" Time sampling source = 4.5688e+01 seconds\n",
|
||||
" Time accumulating tallies = 9.6858e-02 seconds\n",
|
||||
" Total time for finalization = 1.2644e-01 seconds\n",
|
||||
" Total time elapsed = 2.9086e+02 seconds\n",
|
||||
" Calculation Rate (active) = 3931.70 particles/second\n",
|
||||
"\n",
|
||||
" ============================> RESULTS <============================\n",
|
||||
"\n",
|
||||
" Leakage Fraction = 0.78744 +/- 0.00041\n",
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"openmc.run()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Again we should see that `tally_1.100.vtk` file which we can use to visualize our results in VisIt or another tool of your choice that supports VTK files."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 31,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"tally_1.100.vtk tally_3.100.vtk tally_3.200.vtk\r\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"!ls *.vtk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"S of the elements have no score We indeed see that the flux values are larger near the source at the bottom of the model"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"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.7.1"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue