diff --git a/docs/img/3dcore.png b/docs/img/3dcore.png new file mode 100644 index 0000000000..69fed4a079 Binary files /dev/null and b/docs/img/3dcore.png differ diff --git a/docs/img/3dgeomplot.png b/docs/img/3dgeomplot.png new file mode 100644 index 0000000000..5c16d8d831 Binary files /dev/null and b/docs/img/3dgeomplot.png differ diff --git a/docs/img/atr.jpg b/docs/img/atr.jpg new file mode 100644 index 0000000000..c19d10e988 Binary files /dev/null and b/docs/img/atr.jpg differ diff --git a/docs/source/usersguide/index.rst b/docs/source/usersguide/index.rst index 443640151a..675ed4081a 100644 --- a/docs/source/usersguide/index.rst +++ b/docs/source/usersguide/index.rst @@ -14,5 +14,5 @@ essential aspects of using OpenMC to perform neutronic simulations. beginners install input - Processing + processing troubleshoot diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index a99d5c4187..a6efb6e723 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -941,6 +941,8 @@ tallies. This element should be followed by "true" or "false". *Default*: false +.. _usersguide_plotting: + -------------------------------------------- Geometry Plotting Specification -- plots.xml -------------------------------------------- diff --git a/docs/source/usersguide/processing.rst b/docs/source/usersguide/processing.rst new file mode 100644 index 0000000000..e7e31c0fcc --- /dev/null +++ b/docs/source/usersguide/processing.rst @@ -0,0 +1,98 @@ +.. _usersguide_processing: + +================================= +Data Processing and Visualization +================================= + +This section is intended to explain in detail the recommended procedures for +carrying out common tasks with OpenMC. While several utilities of varying +complexity are provided to help automate the process, in many cases it will be +extremely beneficial to do some coding in Python to quickly obtain results. In +these cases, and for many of the provided utilities, it is necessary for your +Python installation to contain: + +* `Numpy `_ +* `Scipy `_ +* `Matplotlib `_ (optional for plotting utilities) +* `Silomesh `_ (optional for plotting + utilities) +* `VTK `_ (optional for plotting utilities) + +---------------------- +Geometry Visualization +---------------------- + +Geometry plotting is carried out by creating a plots.xml, specifying plots, and +running OpenMC with the -plot or -p command-line option (See +:ref:`usersguide_plotting`). + +Plotting in 2D +-------------- + +.. image:: ../../img/atr.jpg + :height: 200px + +After running OpenMC to obtain PPM files, images should be saved to another +format before using them elsewhere. This cuts down the size of the file by +orders of magnitude. Most image viewers and editors that can view PPM images +can also save to other formats (e.g. `Gimp `_, `IrfanView +`_, etc.). However, more likey the user will want to +convert to another format on the command line. This is easily accomplished with +the ``convert`` command available on most linux distributions as part of the +`ImageMagick `_ package. (On +Ubuntu: ``sudo apt-get install imagemagick``). Images are then converted like: + +.. code-block:: sh + + convert plot.ppm plot.png + +Plotting in 3D +-------------- + +.. image:: ../../img/3dgeomplot.png + :height: 200px + +The binary VOXEL files output by OpenMC can not be viewed directly by any +existing viewers. In order to view them, they must be converted into a standard +mesh format that can be viewed in ParaView, Visit, etc. The provided utility +voxel.py accomplishes this for SILO: + +.. code-block:: sh + + /src/utils/voxel.py myplot.voxel -o output.silo + +and VTK: + +.. code-block:: sh + + /src/utils/myplot.voxel --vtk -o output.vti + +To use this utility you need either + +* `Silomesh `_ + +or + +* `VTK `_ with python bindings - On Ubuntu, these are easily obtained with ``sudo apt-get install python-vtk`` + +Users can process the binary into any other format if desired by following the +example of voxel.py. For the binary file structure, see :ref:`devguide_voxel`. + +------------------- +Tally Visualization +------------------- + +Data Extraction +--------------- + +Plotting in 2D +-------------- + +Plotting in 3D +-------------- + +.. image:: ../../img/3dcore.png + :height: 200px + +Getting Data into MATLAB +------------------------