Merged w/ upstream

This commit is contained in:
Adam Nelson 2015-09-16 07:21:02 -04:00
commit 9dd810e7b6
54 changed files with 4515 additions and 7457 deletions

View file

@ -5,7 +5,7 @@ User's Guide
============
Welcome to the OpenMC User's Guide! This tutorial will guide you through the
essential aspects of using OpenMC to perform neutronic simulations.
essential aspects of using OpenMC to perform simulations.
.. toctree::
:numbered:
@ -14,5 +14,6 @@ essential aspects of using OpenMC to perform neutronic simulations.
beginners
install
input
output/index
processing
troubleshoot

View file

@ -59,6 +59,31 @@ Prerequisites
sudo apt-get install cmake
* HDF5_ Library for portable binary output format
OpenMC uses HDF5 for binary output files. As such, you will need to have
HDF5 installed on your computer. The installed version will need to have
been compiled with the same compiler you intend to compile OpenMC with. If
you are using HDF5 in conjunction with MPI, we recommend that your HDF5
installation be built with parallel I/O features. An example of
configuring HDF5_ is listed below::
FC=/opt/mpich/3.1/bin/mpif90 CC=/opt/mpich/3.1/bin/mpicc \
./configure --prefix=/opt/hdf5/1.8.12 --enable-fortran \
--enable-fortran2003 --enable-parallel
You may omit ``--enable-parallel`` if you want to compile HDF5_ in serial.
On Debian derivatives, HDF5 and/or parallel HDF5 can be installed through
the APT package manager:
.. code-block:: sh
sudo apt-get install libhdf5-8 libhdf5-dev hdf5-helpers
Note that the exact package names may vary depending on your particular
distribution and version.
.. admonition:: Optional
* An MPI implementation for distributed-memory parallel runs
@ -72,20 +97,6 @@ Prerequisites
sudo apt-get install mpich libmpich-dev
sudo apt-get install openmpi-bin libopenmpi1.6 libopenmpi-dev
* HDF5_ Library for portable binary output format
To compile with support for HDF5_ output (highly recommended), you will
need to have HDF5 installed on your computer. The installed version will
need to have been compiled with the same compiler you intend to compile
OpenMC with. HDF5_ must be built with parallel I/O features if you intend
to use HDF5_ with MPI. An example of configuring HDF5_ is listed below::
FC=/opt/mpich/3.1/bin/mpif90 CC=/opt/mpich/3.1/bin/mpicc \
./configure --prefix=/opt/hdf5/1.8.12 --enable-fortran \
--enable-fortran2003 --enable-parallel
You may omit ``--enable-parallel`` if you want to compile HDF5_ in serial.
* git_ version control software for obtaining source code
.. _gfortran: http://gcc.gnu.org/wiki/GFortran
@ -194,27 +205,26 @@ command, i.e.
FC=mpif90 cmake /path/to/openmc
Compiling with HDF5
+++++++++++++++++++
To compile with MPI, set the :envvar:`FC` environment variable to the path to
the HDF5 Fortran wrapper. For example, in a bash shell:
Selecting HDF5 Installation
+++++++++++++++++++++++++++
CMakeLists.txt searches for the ``h5fc`` or ``h5pfc`` HDF5 Fortran wrapper on
your PATH environment variable and subsequently uses it to determine library
locations and compile flags. If you have multiple installations of HDF5 or one
that does not appear on your PATH, you can set the HDF5_ROOT environment
variable to the root directory of the HDF5 installation, e.g.
.. code-block:: sh
export FC=h5fc
export HDF5_ROOT=/opt/hdf5/1.8.15
cmake /path/to/openmc
As noted above, an environment variable can typically be set for a single
command, i.e.
This will cause CMake to search first in /opt/hdf5/1.8.15/bin for ``h5fc`` /
``h5pfc`` before it searches elsewhere. As noted above, an environment variable
can typically be set for a single command, i.e.
.. code-block:: sh
FC=h5fc cmake /path/to/openmc
To compile with support for both MPI and HDF5, use the parallel HDF5 wrapper
``h5pfc`` instead. Note that this requires that your HDF5 installation be
compiled with ``--enable-parallel``.
HDF5_ROOT=/opt/hdf5/1.8.15 cmake /path/to/openmc
Compiling on Linux and Mac OS X
-------------------------------
@ -308,6 +318,25 @@ This will build an executable named ``openmc``.
.. _MinGW: http://www.mingw.org
.. _SourceForge: http://sourceforge.net/projects/mingw
Compiling for the Intel Xeon Phi
--------------------------------
In order to build OpenMC for the Intel Xeon Phi using the Intel Fortran
compiler, it is necessary to specify that all objects be compiled with the
``-mmic`` flag as follows:
.. code-block:: sh
mkdir build && cd build
FC=ifort FFLAGS=-mmic cmake -Dopenmp=on ..
make
Note that unless an HDF5 build for the Intel Xeon Phi is already on your target
machine, you will need to cross-compile HDF5 for the Xeon Phi. An `example
script`_ to build zlib and HDF5 provides several necessary workarounds.
.. _example script: https://github.com/paulromano/install-scripts/blob/master/install-hdf5-mic
Testing Build
-------------

View file

@ -0,0 +1,14 @@
.. _usersguide_output:
===================
Output File Formats
===================
.. toctree::
:numbered:
:maxdepth: 3
statepoint
source
particle_restart
track

View file

@ -0,0 +1,59 @@
.. _usersguide_particle_restart:
============================
Particle Restart File Format
============================
The current revision of the particle restart file format is 1.
**/filetype** (*int*)
Flags what type of file this is. A value of -1 indicates a statepoint file,
a value of -2 indicates a particle restart file, a value of -3 indicates a
source file, and a value of -4 indicates a track file.
**/revision** (*int*)
Revision of the particle restart file format. Any time a change is made in
the format, this integer is incremented.
**/current_batch** (*int*)
The number of batches already simulated.
**/gen_per_batch** (*int*)
Number of generations per batch.
**/current_gen** (*int*)
The number of generations already simulated.
**/n_particles** (*int8_t*)
Number of particles used per generation.
**/run_mode** (*int*)
Run mode used. A value of 1 indicates a fixed-source run and a value of 2
indicates an eigenvalue run.
**/id** (*int8_t*)
Unique identifier of the particle.
**/weight** (*double*)
Weight of the particle.
**/energy** (*double*)
Energy of the particle in MeV.
**/xyz** (*double[3]*)
Position of the particle.
**/uvw** (*double[3]*)
Direction of the particle.

View file

@ -0,0 +1,21 @@
.. _usersguide_source:
==================
Source File Format
==================
Normally, source data is stored in a state point file. However, it is possible
to request that the source be written separately, in which case the format used
is that documented here.
**/filetype** (*int*)
Flags what type of file this is. A value of -1 indicates a statepoint file,
a value of -2 indicates a particle restart file, a value of -3 indicates a
source file, and a value of -4 indicates a track file.
**/source_bank** (Compound type)
Source bank information for each particle. The compound type has fields
``wgt``, ``xyz``, ``uvw``, and ``E`` which represent the weight, position,
direction, and energy of the source particle, respectively.

View file

@ -0,0 +1,276 @@
.. _usersguide_statepoint:
=======================
State Point File Format
=======================
The current revision of the statepoint file format is 13.
**/filetype** (*int*)
Flags what type of file this is. A value of -1 indicates a statepoint file,
a value of -2 indicates a particle restart file, a value of -3 indicates a
source file, and a value of -4 indicates a track file.
**/revision** (*int*)
Revision of the state point file format. Any time a change is made in the
format, this integer is incremented.
**/version_major** (*int*)
Major version number for OpenMC
**/version_minor** (*int*)
Minor version number for OpenMC
**/version_release** (*int*)
Release version number for OpenMC
**/time_stamp** (*char[19]*)
Date and time the state point was written.
**/path** (*char[255]*)
Absolute path to directory containing input files.
**/seed** (*int8_t*)
Pseudo-random number generator seed.
**/run_mode** (*int*)
Run mode used. A value of 1 indicates a fixed-source run and a value of 2
indicates an eigenvalue run.
**/n_particles** (*int8_t*)
Number of particles used per generation.
**/n_batches** (*int*)
Number of batches to simulate.
**/current_batch** (*int*)
The number of batches already simulated.
if (run_mode == MODE_EIGENVALUE)
**/n_inactive** (*int*)
Number of inactive batches.
**/gen_per_batch** (*int*)
Number of generations per batch.
**/k_generation** (*double[]*)
k-effective for each generation simulated.
**/entropy** (*double[]*)
Shannon entropy for each generation simulated
**/k_col_abs** (*double*)
Sum of product of collision/absorption estimates of k-effective
**/k_col_tra** (*double*)
Sum of product of collision/track-length estimates of k-effective
**/k_abs_tra** (*double*)
Sum of product of absorption/track-length estimates of k-effective
**/k_combined** (*double[2]*)
Mean and standard deviation of a combined estimate of k-effective
**/cmfd_on** (*int*)
Flag indicating whether CMFD is on (1) or off (0).
if (cmfd_on)
**/cmfd/indices** (*int[4]*)
Indices for cmfd mesh (i,j,k,g)
**/cmfd/k_cmfd** (*double[]*)
CMFD eigenvalues
**/cmfd/cmfd_src** (*double[][][][]*)
CMFD fission source
**/cmfd/cmfd_entropy** (*double[]*)
CMFD estimate of Shannon entropy
**/cmfd/cmfd_balance** (*double[]*)
RMS of the residual neutron balance equation on CMFD mesh
**/cmfd/cmfd_dominance** (*double[]*)
CMFD estimate of dominance ratio
**/cmfd/cmfd_srccmp** (*double[]*)
RMS comparison of difference between OpenMC and CMFD fission source
**/tallies/n_meshes** (*int*)
Number of meshes in tallies.xml file
**/tally/meshes/ids** (*int[]*)
Internal unique ID of each mesh.
**/tally/meshes/keys** (*int[]*)
User-identified unique ID of each mesh
*do i = 1, n_meshes*
**/tallies/meshes/mesh i/id** (*int*)
Unique identifier of the mesh.
**/tallies/meshes/mesh i/type** (*int*)
Type of mesh.
**/tallies/meshes/mesh i/n_dimension** (*int*)
Number of dimensions for mesh (2 or 3).
**/tallies/meshes/mesh i/dimension** (*int*)
Number of mesh cells in each dimension.
**/tallies/meshes/mesh i/lower_left** (*double[]*)
Coordinates of lower-left corner of mesh.
**/tallies/meshes/mesh i/upper_right** (*double[]*)
Coordinates of upper-right corner of mesh.
**/tallies/meshes/mesh i/width** (*double[]*)
Width of each mesh cell in each dimension.
**/tallies/n_tallies** (*int*)
Number of user-defined tallies.
**/tallies/ids** (*int[]*)
Internal unique ID of each tally.
**/tallies/keys** (*int[]*)
User-identified unique ID of each tally.
*do i = 1, n_tallies*
**/tallies/tally i/estimator** (*int*)
Type of tally estimator: analog (1) or tracklength (2).
**/tallies/tally i/n_realizations** (*int*)
Number of realizations.
**/tallies/tally i/n_filters** (*int*)
Number of filters used.
*do j = 1, tallies(i) % n_filters*
**/tallies/tally i/filter j/type** (*int*)
Type of tally filter.
**/tallies/tally i/filter j/offset** (*int*)
Filter offset (used for distribcell).
**/tallies/tally i/filter j/n_bins** (*int*)
Number of bins for filter.
**/tallies/tally i/filter j/bins** (*int[]* or *double[]*)
Value for each filter bin of this type.
**/tallies/tally i/n_nuclides** (*int*)
Number of nuclide bins. If none are specified, this is just one.
**/tallies/tally i/nuclides** (*int[]*)
Values of specified nuclide bins (ZAID identifiers)
**/tallies/tally i/n_score_bins** (*int*)
Number of scoring bins.
**/tallies/tally i/score_bins** (*int*)
Values of specified scoring bins (e.g. SCORE_FLUX).
**/tallies/tally i/n_user_score_bins**
Number of scoring bins without accounting for those added by
expansions, e.g. scatter-PN.
*do J = 1, total number of moments*
**/tallies/tally i/moments/orderJ** (*char[8]*)
Tallying moment order for Legendre and spherical
harmonic tally expansions (*e.g.*, 'P2', 'Y1,2', etc.).
**/source_present** (*int*)
Flag indicated if source bank is present in the file
**/n_realizations** (*int*)
Number of realizations for global tallies.
**/n_global_tallies** (*int*)
Number of global tally scores.
**/global_tallies** (Compound type)
Accumulated sum and sum-of-squares for each global tally. The compound type
has fields named ``sum`` and ``sum_sq``.
**tallies_present** (*int*)
Flag indicated if tallies are present in the file.
*do i = 1, n_tallies*
**/tallies/tally i/results** (Compound type)
Accumulated sum and sum-of-squares for each bin of the tally i-th tally
if (run_mode == MODE_EIGENVALUE and source_present)
**/source_bank** (Compound type)
Source bank information for each particle. The compound type has fields
``wgt``, ``xyz``, ``uvw``, and ``E`` which represent the weight,
position, direction, and energy of the source particle, respectively.

View file

@ -0,0 +1,32 @@
.. _usersguide_track:
=================
Track File Format
=================
The current revision of the particle track file format is 1.
**/filetype** (*int*)
Flags what type of file this is. A value of -1 indicates a statepoint file,
a value of -2 indicates a particle restart file, a value of -3 indicates a
source file, and a value of -4 indicates a track file.
**/revision** (*int*)
Revision of the track file format. Any time a change is made in the format,
this integer is incremented.
**/n_particles** (*int*)
Number of particles for which tracks are recorded.
**/n_coords** (*int[]*)
Number of coordinates for each particle.
*do i = 1, n_particles*
**/coordinates_i** (*double[][3]*)
(x,y,z) coordinates for the *i*-th particle.

View file

@ -194,7 +194,7 @@ Data Extraction
---------------
A great deal of information is available in statepoint files (See
:ref:`devguide_statepoint`), most of which is easily extracted by the provided
:ref:`usersguide_statepoint`), most of which is easily extracted by the provided
utility statepoint.py. This utility provides a Python class to load statepoints
and extract data - it is used in many of the provided plotting utilities, and
can be used in user-created scripts to carry out manipulations of the data. To