mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
Merge pull request #818 from nelsonag/new_notebooks
Addition of new notebooks to showcase Multi-Group mode features
This commit is contained in:
commit
cdf1f4380b
34 changed files with 3980 additions and 1401 deletions
BIN
docs/source/examples/c5g7.h5
Normal file
BIN
docs/source/examples/c5g7.h5
Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
26
docs/source/examples/index.rst
Normal file
26
docs/source/examples/index.rst
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
.. _examples:
|
||||
|
||||
=================
|
||||
Example Notebooks
|
||||
=================
|
||||
|
||||
The following series of Jupyter_ Notebooks provide examples for usage of OpenMC
|
||||
features via the :ref:`pythonapi`.
|
||||
|
||||
.. _Jupyter: https://jupyter.org/
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
post-processing
|
||||
pandas-dataframes
|
||||
tally-arithmetic
|
||||
mgxs-part-i
|
||||
mgxs-part-ii
|
||||
mgxs-part-iii
|
||||
mg-mode-part-i
|
||||
mg-mode-part-ii
|
||||
mg-mode-part-iii
|
||||
mdgxs-part-i
|
||||
mdgxs-part-ii
|
||||
nuclear-data
|
||||
13
docs/source/examples/mdgxs-part-i.rst
Normal file
13
docs/source/examples/mdgxs-part-i.rst
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
.. _notebook_mdgxs_part_i:
|
||||
|
||||
===================================================================
|
||||
Multi-Group (Delayed) Cross Section Generation Part I: Introduction
|
||||
===================================================================
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. notebook:: mdgxs-part-i.ipynb
|
||||
|
||||
.. only:: latex
|
||||
|
||||
IPython notebooks must be viewed in the online HTML documentation.
|
||||
13
docs/source/examples/mdgxs-part-ii.rst
Normal file
13
docs/source/examples/mdgxs-part-ii.rst
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
.. _notebook_mdgxs_part_ii:
|
||||
|
||||
=========================================================================
|
||||
Multi-Group (Delayed) Cross Section Generation Part II: Advanced Features
|
||||
=========================================================================
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. notebook:: mdgxs-part-ii.ipynb
|
||||
|
||||
.. only:: latex
|
||||
|
||||
IPython notebooks must be viewed in the online HTML documentation.
|
||||
724
docs/source/examples/mg-mode-part-i.ipynb
Normal file
724
docs/source/examples/mg-mode-part-i.ipynb
Normal file
File diff suppressed because one or more lines are too long
13
docs/source/examples/mg-mode-part-i.rst
Normal file
13
docs/source/examples/mg-mode-part-i.rst
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
.. _notebook_mg_mode_part_i:
|
||||
|
||||
=====================================
|
||||
Multi-Group Mode Part I: Introduction
|
||||
=====================================
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. notebook:: mg-mode-part-i.ipynb
|
||||
|
||||
.. only:: latex
|
||||
|
||||
IPython notebooks must be viewed in the online HTML documentation.
|
||||
1645
docs/source/examples/mg-mode-part-ii.ipynb
Normal file
1645
docs/source/examples/mg-mode-part-ii.ipynb
Normal file
File diff suppressed because one or more lines are too long
13
docs/source/examples/mg-mode-part-ii.rst
Normal file
13
docs/source/examples/mg-mode-part-ii.rst
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
.. _notebook_mg_mode_part_ii:
|
||||
|
||||
=============================================================
|
||||
Multi-Group Mode Part II: MGXS Library Generation With OpenMC
|
||||
=============================================================
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. notebook:: mg-mode-part-ii.ipynb
|
||||
|
||||
.. only:: latex
|
||||
|
||||
IPython notebooks must be viewed in the online HTML documentation.
|
||||
1517
docs/source/examples/mg-mode-part-iii.ipynb
Normal file
1517
docs/source/examples/mg-mode-part-iii.ipynb
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,12 +1,12 @@
|
|||
.. _notebook_mgxs_part_iv:
|
||||
.. _notebook_mg_mode_part_iii:
|
||||
|
||||
====================================================
|
||||
MGXS Part IV: Multi-Group Mode Cross-Section Library
|
||||
Multi-Group Mode Part III: Advanced Feature Showcase
|
||||
====================================================
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. notebook:: mgxs-part-iv.ipynb
|
||||
.. notebook:: mg-mode-part-iii.ipynb
|
||||
|
||||
.. only:: latex
|
||||
|
||||
|
|
@ -32,6 +32,7 @@ the latest developmental version of the develop branch can be found on
|
|||
:maxdepth: 1
|
||||
|
||||
quickinstall
|
||||
examples/index
|
||||
releasenotes
|
||||
methods/index
|
||||
usersguide/index
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
.. _notebook_mdgxs_part_i:
|
||||
|
||||
==========================
|
||||
MDGXS Part I: Introduction
|
||||
==========================
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. notebook:: mdgxs-part-i.ipynb
|
||||
|
||||
.. only:: latex
|
||||
|
||||
IPython notebooks must be viewed in the online HTML documentation.
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
.. _notebook_mdgxs_part_ii:
|
||||
|
||||
================================
|
||||
MDGXS Part II: Advanced Features
|
||||
================================
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. notebook:: mdgxs-part-ii.ipynb
|
||||
|
||||
.. only:: latex
|
||||
|
||||
IPython notebooks must be viewed in the online HTML documentation.
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -6,30 +6,13 @@ Python API
|
|||
|
||||
OpenMC includes a rich Python API that enables programmatic pre- and
|
||||
post-processing. The easiest way to begin using the API is to take a look at the
|
||||
example Jupyter_ notebooks provided. However, this assumes that you are already
|
||||
familiar with Python and common third-party packages such as NumPy_. If you have
|
||||
never programmed in Python before, there are many good tutorials available
|
||||
online. We recommend going through the modules from Codecademy_ and/or the
|
||||
`Scipy lectures`_. The full API documentation serves to provide more information
|
||||
on a given module or class.
|
||||
|
||||
-------------------------
|
||||
Example Jupyter Notebooks
|
||||
-------------------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
examples/post-processing
|
||||
examples/pandas-dataframes
|
||||
examples/tally-arithmetic
|
||||
examples/mgxs-part-i
|
||||
examples/mgxs-part-ii
|
||||
examples/mgxs-part-iii
|
||||
examples/mgxs-part-iv
|
||||
examples/mdgxs-part-i
|
||||
examples/mdgxs-part-ii
|
||||
examples/nuclear-data
|
||||
example Jupyter_ notebooks provided in the :ref:`examples` section of the
|
||||
documentation. However, this assumes that you are already familiar with Python
|
||||
and common third-party packages such as NumPy_. If you have never programmed in
|
||||
Python before, there are many good tutorials available online. We recommend
|
||||
going through the modules from Codecademy_ and/or the `Scipy lectures`_. The
|
||||
full API documentation serves to provide more information on a given module or
|
||||
class.
|
||||
|
||||
------------------------------------
|
||||
:mod:`openmc` -- Basic Functionality
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class Settings(object):
|
|||
type are 'variance', 'std_dev', and 'rel_err'. The threshold value
|
||||
should be a float indicating the variance, standard deviation, or
|
||||
relative error used.
|
||||
max_order : int
|
||||
max_order : None or int
|
||||
Maximum scattering order to apply globally when in multi-group mode.
|
||||
multipole_library : str
|
||||
Indicates the path to a directory containing a windowed multipole
|
||||
|
|
@ -456,8 +456,10 @@ class Settings(object):
|
|||
|
||||
@max_order.setter
|
||||
def max_order(self, max_order):
|
||||
cv.check_type('maximum scattering order', max_order, Integral)
|
||||
cv.check_greater_than('maximum scattering order', max_order, 0, True)
|
||||
if max_order is not None:
|
||||
cv.check_type('maximum scattering order', max_order, Integral)
|
||||
cv.check_greater_than('maximum scattering order', max_order, 0,
|
||||
True)
|
||||
self._max_order = max_order
|
||||
|
||||
@source.setter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue