Merge pull request #818 from nelsonag/new_notebooks

Addition of new notebooks to showcase Multi-Group mode features
This commit is contained in:
Sterling Harper 2017-03-11 08:50:18 -05:00 committed by GitHub
commit cdf1f4380b
34 changed files with 3980 additions and 1401 deletions

Binary file not shown.

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Before After
Before After

View 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

View 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.

View 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.

File diff suppressed because one or more lines are too long

View 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.

File diff suppressed because one or more lines are too long

View 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.

File diff suppressed because one or more lines are too long

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -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