mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Updated documentation for CMFD merge.
This commit is contained in:
parent
21346109ff
commit
374d2e5bbf
31 changed files with 2363 additions and 64 deletions
BIN
_images/math/0ef6215a44c46c244ccd86bf6aadaa33b87b4e6d.png
Normal file
BIN
_images/math/0ef6215a44c46c244ccd86bf6aadaa33b87b4e6d.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 465 B |
BIN
_images/math/2d94d2e3228f1977c395a51961b7184af5514ca7.png
Normal file
BIN
_images/math/2d94d2e3228f1977c395a51961b7184af5514ca7.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 905 B |
BIN
_images/math/48addcaae47a04de47d2a40f0095c771ec2ce891.png
Normal file
BIN
_images/math/48addcaae47a04de47d2a40f0095c771ec2ce891.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 861 B |
BIN
_images/math/610a7fba4c1d89de40e26ba8f6c2915102b17eae.png
Normal file
BIN
_images/math/610a7fba4c1d89de40e26ba8f6c2915102b17eae.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 406 B |
BIN
_images/math/d939cb7e10ed48f1e43b0dd6c646e423a581ab40.png
Normal file
BIN
_images/math/d939cb7e10ed48f1e43b0dd6c646e423a581ab40.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 817 B |
|
|
@ -13,5 +13,7 @@ as debugging.
|
|||
:maxdepth: 2
|
||||
|
||||
structures
|
||||
styleguide
|
||||
workflow
|
||||
xml-fortran
|
||||
statepoint
|
||||
|
|
|
|||
|
|
@ -4,6 +4,621 @@
|
|||
State Point Binary File Specifications
|
||||
======================================
|
||||
|
||||
----------
|
||||
Revision 5
|
||||
----------
|
||||
|
||||
**integer(4) REVISION_STATEPOINT**
|
||||
|
||||
Revision of the binary state point file. Any time a change is made in the
|
||||
format of the state-point file, this integer is incremented.
|
||||
|
||||
**integer(4) VERSION_MAJOR**
|
||||
|
||||
Major version number for OpenMC
|
||||
|
||||
**integer(4) VERSION_MINOR**
|
||||
|
||||
Minor version number for OpenMC
|
||||
|
||||
**integer(4) VERSION_RELEASE**
|
||||
|
||||
Release version number for OpenMC
|
||||
|
||||
**character(19) time_stamp**
|
||||
|
||||
Date and time the state point was written.
|
||||
|
||||
**integer(8) seed**
|
||||
|
||||
Pseudo-random number generator seed.
|
||||
|
||||
**integer(4) run_mode**
|
||||
|
||||
run mode used. The modes are described in constants.F90.
|
||||
|
||||
**integer(8) n_particles**
|
||||
|
||||
Number of particles used per generation.
|
||||
|
||||
**integer(4) n_batches**
|
||||
|
||||
Total number of batches (active + inactive).
|
||||
|
||||
**integer(4) current_batch**
|
||||
|
||||
The number of batches already simulated.
|
||||
|
||||
if (run_mode == MODE_CRITICALITY)
|
||||
|
||||
**integer(4) n_inactive**
|
||||
|
||||
Number of inactive batches
|
||||
|
||||
**integer(4) gen_per_batch**
|
||||
|
||||
Number of generations per batch for criticality calculations
|
||||
|
||||
*do i = 1, current_batch*
|
||||
|
||||
**real(8) k_batch(i)**
|
||||
|
||||
k-effective for the i-th batch
|
||||
|
||||
*do i = 1, current_batch*
|
||||
|
||||
**real(8) entropy(i)**
|
||||
|
||||
Shannon entropy for the i-th batch
|
||||
|
||||
**integer(4) n_meshes**
|
||||
|
||||
Number of meshes in tallies.xml file
|
||||
|
||||
*do i = 1, n_meshes*
|
||||
|
||||
**integer(4) meshes(i) % type**
|
||||
|
||||
Type of mesh.
|
||||
|
||||
**integer(4) meshes(i) % n_dimension**
|
||||
|
||||
Number of dimensions for mesh (2 or 3).
|
||||
|
||||
**integer(4) meshes(i) % dimension(:)**
|
||||
|
||||
Number of mesh cells in each dimension.
|
||||
|
||||
**real(8) meshes(i) % lower_left(:)**
|
||||
|
||||
Coordinates of lower-left corner of mesh.
|
||||
|
||||
**real(8) meshes(i) % upper_right(:)**
|
||||
|
||||
Coordinates of upper-right corner of mesh.
|
||||
|
||||
**real(8) meshes(i) % width(:)**
|
||||
|
||||
Width of each mesh cell in each dimension.
|
||||
|
||||
**integer(4) n_tallies**
|
||||
|
||||
*do i = 1, n_tallies*
|
||||
|
||||
**integer(4) tallies(i) % n_realizations**
|
||||
|
||||
Number of realizations for the i-th tally.
|
||||
|
||||
**integer(4) size(tallies(i) % scores, 1)**
|
||||
|
||||
Total number of score bins for the i-th tally
|
||||
|
||||
**integer(4) size(tallies(i) % scores, 2)**
|
||||
|
||||
Total number of filter bins for the i-th tally
|
||||
|
||||
**integer(4) tallies(i) % n_filters**
|
||||
|
||||
*do j = 1, tallies(i) % n_filters*
|
||||
|
||||
**integer(4) tallies(i) % filter(j) % type**
|
||||
|
||||
Type of tally filter.
|
||||
|
||||
**integer(4) tallies(i) % filter(j) % n_bins**
|
||||
|
||||
Number of bins for filter.
|
||||
|
||||
**integer(4)/real(8) tallies(i) % filter(j) % bins(:)**
|
||||
|
||||
Value for each filter bin of this type.
|
||||
|
||||
**integer(4) tallies(i) % n_nuclide_bins**
|
||||
|
||||
Number of nuclide bins. If none are specified, this is just one.
|
||||
|
||||
*do j = 1, tallies(i) % n_nuclide_bins*
|
||||
|
||||
**integer(4) tallies(i) % nuclide_bins(j)**
|
||||
|
||||
Values of specified nuclide bins
|
||||
|
||||
**integer(4) tallies(i) % n_score_bins**
|
||||
|
||||
Number of scoring bins.
|
||||
|
||||
*do j = 1, tallies(i) % n_score_bins*
|
||||
|
||||
**integer(4) tallies(i) % score_bins(j)**
|
||||
|
||||
Values of specified scoring bins (e.g. SCORE_FLUX).
|
||||
|
||||
**integer(4) n_realizations**
|
||||
|
||||
Number of realizations for global tallies.
|
||||
|
||||
**integer(4) N_GLOBAL_TALLIES**
|
||||
|
||||
Number of global tally scores
|
||||
|
||||
*do i = 1, N_GLOBAL_TALLIES*
|
||||
|
||||
**real(8) global_tallies(i) % sum**
|
||||
|
||||
Accumulated sum for the i-th global tally
|
||||
|
||||
**real(8) global_tallies(i) % sum_sq**
|
||||
|
||||
Accumulated sum of squares for the i-th global tally
|
||||
|
||||
**integer(4) tallies_on**
|
||||
|
||||
Flag indicated if tallies are present in the file.
|
||||
|
||||
if (tallies_on > 0)
|
||||
|
||||
*do i = 1, n_tallies*
|
||||
|
||||
*do k = 1, size(tallies(i) % scores, 2)*
|
||||
|
||||
*do j = 1, size(tallies(i) % scores, 1)*
|
||||
|
||||
**real(8) tallies(i) % scores(j,k) % sum**
|
||||
|
||||
Accumulated sum for the j-th score and k-th filter of the
|
||||
i-th tally
|
||||
|
||||
**real(8) tallies(i) % scores(j,k) % sum_sq**
|
||||
|
||||
Accumulated sum of squares for the j-th score and k-th
|
||||
filter of the i-th tally
|
||||
|
||||
if (run_mode == MODE_CRITICALITY)
|
||||
|
||||
*do i = 1, n_particles*
|
||||
|
||||
**real(8) source_bank(i) % wgt**
|
||||
|
||||
Weight of the i-th source particle
|
||||
|
||||
**real(8) source_bank(i) % xyz(1:3)**
|
||||
|
||||
Coordinates of the i-th source particle.
|
||||
|
||||
**real(8) source_bank(i) % uvw(1:3)**
|
||||
|
||||
Direction of the i-th source particle
|
||||
|
||||
**real(8) source_bank(i) % E**
|
||||
|
||||
Energy of the i-th source particle.
|
||||
|
||||
----------
|
||||
Revision 4
|
||||
----------
|
||||
|
||||
**integer(4) REVISION_STATEPOINT**
|
||||
|
||||
Revision of the binary state point file. Any time a change is made in the
|
||||
format of the state-point file, this integer is incremented.
|
||||
|
||||
**integer(4) VERSION_MAJOR**
|
||||
|
||||
Major version number for OpenMC
|
||||
|
||||
**integer(4) VERSION_MINOR**
|
||||
|
||||
Minor version number for OpenMC
|
||||
|
||||
**integer(4) VERSION_RELEASE**
|
||||
|
||||
Release version number for OpenMC
|
||||
|
||||
**character(19) time_stamp**
|
||||
|
||||
Date and time the state point was written.
|
||||
|
||||
**integer(8) seed**
|
||||
|
||||
Pseudo-random number generator seed.
|
||||
|
||||
**integer(4) run_mode**
|
||||
|
||||
run mode used. The modes are described in constants.F90.
|
||||
|
||||
**integer(8) n_particles**
|
||||
|
||||
Number of particles used per generation.
|
||||
|
||||
**integer(4) n_batches**
|
||||
|
||||
Total number of batches (active + inactive).
|
||||
|
||||
**integer(4) current_batch**
|
||||
|
||||
The number of batches already simulated.
|
||||
|
||||
if (run_mode == MODE_CRITICALITY)
|
||||
|
||||
**integer(4) n_inactive**
|
||||
|
||||
Number of inactive batches
|
||||
|
||||
**integer(4) gen_per_batch**
|
||||
|
||||
Number of generations per batch for criticality calculations
|
||||
|
||||
*do i = 1, current_batch*
|
||||
|
||||
**real(8) k_batch(i)**
|
||||
|
||||
k-effective for the i-th batch
|
||||
|
||||
*do i = 1, current_batch*
|
||||
|
||||
**real(8) entropy(i)**
|
||||
|
||||
Shannon entropy for the i-th batch
|
||||
|
||||
**integer(4) n_meshes**
|
||||
|
||||
Number of meshes in tallies.xml file
|
||||
|
||||
*do i = 1, n_meshes*
|
||||
|
||||
**integer(4) meshes(i) % type**
|
||||
|
||||
Type of mesh.
|
||||
|
||||
**integer(4) meshes(i) % n_dimension**
|
||||
|
||||
Number of dimensions for mesh (2 or 3).
|
||||
|
||||
**integer(4) meshes(i) % dimension(:)**
|
||||
|
||||
Number of mesh cells in each dimension.
|
||||
|
||||
**real(8) meshes(i) % lower_left(:)**
|
||||
|
||||
Coordinates of lower-left corner of mesh.
|
||||
|
||||
**real(8) meshes(i) % upper_right(:)**
|
||||
|
||||
Coordinates of upper-right corner of mesh.
|
||||
|
||||
**real(8) meshes(i) % width(:)**
|
||||
|
||||
Width of each mesh cell in each dimension.
|
||||
|
||||
**integer(4) n_tallies**
|
||||
|
||||
*do i = 1, n_tallies*
|
||||
|
||||
**integer(4) size(tallies(i) % scores, 1)**
|
||||
|
||||
Total number of score bins for the i-th tally
|
||||
|
||||
**integer(4) size(tallies(i) % scores, 2)**
|
||||
|
||||
Total number of filter bins for the i-th tally
|
||||
|
||||
**integer(4) tallies(i) % n_filters**
|
||||
|
||||
*do j = 1, tallies(i) % n_filters*
|
||||
|
||||
**integer(4) tallies(i) % filter(j) % type**
|
||||
|
||||
Type of tally filter.
|
||||
|
||||
**integer(4) tallies(i) % filter(j) % n_bins**
|
||||
|
||||
Number of bins for filter.
|
||||
|
||||
**integer(4)/real(8) tallies(i) % filter(j) % bins(:)**
|
||||
|
||||
Value for each filter bin of this type.
|
||||
|
||||
**integer(4) tallies(i) % n_nuclide_bins**
|
||||
|
||||
Number of nuclide bins. If none are specified, this is just one.
|
||||
|
||||
*do j = 1, tallies(i) % n_nuclide_bins*
|
||||
|
||||
**integer(4) tallies(i) % nuclide_bins(j)**
|
||||
|
||||
Values of specified nuclide bins
|
||||
|
||||
**integer(4) tallies(i) % n_score_bins**
|
||||
|
||||
Number of scoring bins.
|
||||
|
||||
*do j = 1, tallies(i) % n_score_bins*
|
||||
|
||||
**integer(4) tallies(i) % score_bins(j)**
|
||||
|
||||
Values of specified scoring bins (e.g. SCORE_FLUX).
|
||||
|
||||
**integer(4) N_GLOBAL_TALLIES**
|
||||
|
||||
Number of global tally scores
|
||||
|
||||
*do i = 1, N_GLOBAL_TALLIES*
|
||||
|
||||
**real(8) global_tallies(i) % sum**
|
||||
|
||||
Accumulated sum for the i-th global tally
|
||||
|
||||
**real(8) global_tallies(i) % sum_sq**
|
||||
|
||||
Accumulated sum of squares for the i-th global tally
|
||||
|
||||
**integer(4) tallies_on**
|
||||
|
||||
Flag indicated if tallies are present in the file.
|
||||
|
||||
if (tallies_on > 0)
|
||||
|
||||
**integer(4) n_realizations**
|
||||
|
||||
Number of realizations for tally random variables.
|
||||
|
||||
*do i = 1, n_tallies*
|
||||
|
||||
*do k = 1, size(tallies(i) % scores, 2)*
|
||||
|
||||
*do j = 1, size(tallies(i) % scores, 1)*
|
||||
|
||||
**real(8) tallies(i) % scores(j,k) % sum**
|
||||
|
||||
Accumulated sum for the j-th score and k-th filter of the
|
||||
i-th tally
|
||||
|
||||
**real(8) tallies(i) % scores(j,k) % sum_sq**
|
||||
|
||||
Accumulated sum of squares for the j-th score and k-th
|
||||
filter of the i-th tally
|
||||
|
||||
if (run_mode == MODE_CRITICALITY)
|
||||
|
||||
*do i = 1, n_particles*
|
||||
|
||||
**real(8) source_bank(i) % wgt**
|
||||
|
||||
Weight of the i-th source particle
|
||||
|
||||
**real(8) source_bank(i) % xyz(1:3)**
|
||||
|
||||
Coordinates of the i-th source particle.
|
||||
|
||||
**real(8) source_bank(i) % uvw(1:3)**
|
||||
|
||||
Direction of the i-th source particle
|
||||
|
||||
**real(8) source_bank(i) % E**
|
||||
|
||||
Energy of the i-th source particle.
|
||||
|
||||
----------
|
||||
Revision 3
|
||||
----------
|
||||
|
||||
**integer(4) REVISION_STATEPOINT**
|
||||
|
||||
Revision of the binary state point file. Any time a change is made in the
|
||||
format of the state-point file, this integer is incremented.
|
||||
|
||||
**integer(4) VERSION_MAJOR**
|
||||
|
||||
Major version number for OpenMC
|
||||
|
||||
**integer(4) VERSION_MINOR**
|
||||
|
||||
Minor version number for OpenMC
|
||||
|
||||
**integer(4) VERSION_RELEASE**
|
||||
|
||||
Release version number for OpenMC
|
||||
|
||||
**character(19) time_stamp**
|
||||
|
||||
Date and time the state point was written.
|
||||
|
||||
**integer(8) seed**
|
||||
|
||||
Pseudo-random number generator seed.
|
||||
|
||||
**integer(4) run_mode**
|
||||
|
||||
run mode used. The modes are described in constants.F90.
|
||||
|
||||
**integer(8) n_particles**
|
||||
|
||||
Number of particles used per generation.
|
||||
|
||||
**integer(4) n_batches**
|
||||
|
||||
Total number of batches (active + inactive).
|
||||
|
||||
**integer(4) current_batch**
|
||||
|
||||
The number of batches already simulated.
|
||||
|
||||
if (run_mode == MODE_CRITICALITY)
|
||||
|
||||
**integer(4) n_inactive**
|
||||
|
||||
Number of inactive batches
|
||||
|
||||
**integer(4) gen_per_batch**
|
||||
|
||||
Number of generations per batch for criticality calculations
|
||||
|
||||
*do i = 1, current_batch*
|
||||
|
||||
**real(8) k_batch(i)**
|
||||
|
||||
k-effective for the i-th batch
|
||||
|
||||
*do i = 1, current_batch*
|
||||
|
||||
**real(8) entropy(i)**
|
||||
|
||||
Shannon entropy for the i-th batch
|
||||
|
||||
**integer(4) N_GLOBAL_TALLIES**
|
||||
|
||||
Number of global tally scores
|
||||
|
||||
*do i = 1, N_GLOBAL_TALLIES*
|
||||
|
||||
**real(8) global_tallies(i) % sum**
|
||||
|
||||
Accumulated sum for the i-th global tally
|
||||
|
||||
**real(8) global_tallies(i) % sum_sq**
|
||||
|
||||
Accumulated sum of squares for the i-th global tally
|
||||
|
||||
**integer(4) n_meshes**
|
||||
|
||||
Number of meshes in tallies.xml file
|
||||
|
||||
*do i = 1, n_meshes*
|
||||
|
||||
**integer(4) meshes(i) % type**
|
||||
|
||||
Type of mesh.
|
||||
|
||||
**integer(4) meshes(i) % n_dimension**
|
||||
|
||||
Number of dimensions for mesh (2 or 3).
|
||||
|
||||
**integer(4) meshes(i) % dimension(:)**
|
||||
|
||||
Number of mesh cells in each dimension.
|
||||
|
||||
**real(8) meshes(i) % lower_left(:)**
|
||||
|
||||
Coordinates of lower-left corner of mesh.
|
||||
|
||||
**real(8) meshes(i) % upper_right(:)**
|
||||
|
||||
Coordinates of upper-right corner of mesh.
|
||||
|
||||
**real(8) meshes(i) % width(:)**
|
||||
|
||||
Width of each mesh cell in each dimension.
|
||||
|
||||
**integer(4) n_tallies**
|
||||
|
||||
*do i = 1, n_tallies*
|
||||
|
||||
**integer(4) size(tallies(i) % scores, 1)**
|
||||
|
||||
Total number of score bins for the i-th tally
|
||||
|
||||
**integer(4) size(tallies(i) % scores, 2)**
|
||||
|
||||
Total number of filter bins for the i-th tally
|
||||
|
||||
**integer(4) tallies(i) % n_filters**
|
||||
|
||||
*do j = 1, tallies(i) % n_filters*
|
||||
|
||||
**integer(4) tallies(i) % filter(j) % type**
|
||||
|
||||
Type of tally filter.
|
||||
|
||||
**integer(4) tallies(i) % filter(j) % n_bins**
|
||||
|
||||
Number of bins for filter.
|
||||
|
||||
**integer(4)/real(8) tallies(i) % filter(j) % bins(:)**
|
||||
|
||||
Value for each filter bin of this type.
|
||||
|
||||
**integer(4) tallies(i) % n_nuclide_bins**
|
||||
|
||||
Number of nuclide bins. If none are specified, this is just one.
|
||||
|
||||
*do j = 1, tallies(i) % n_nuclide_bins*
|
||||
|
||||
**integer(4) tallies(i) % nuclide_bins(j)**
|
||||
|
||||
Values of specified nuclide bins
|
||||
|
||||
**integer(4) tallies(i) % n_score_bins**
|
||||
|
||||
Number of scoring bins.
|
||||
|
||||
*do j = 1, tallies(i) % n_score_bins*
|
||||
|
||||
**integer(4) tallies(i) % score_bins(j)**
|
||||
|
||||
Values of specified scoring bins (e.g. SCORE_FLUX).
|
||||
|
||||
**integer(4) tallies_on**
|
||||
|
||||
Flag indicated if tallies are present in the file.
|
||||
|
||||
if (tallies_on > 0)
|
||||
|
||||
*do i = 1, n_tallies*
|
||||
|
||||
*do k = 1, size(tallies(i) % scores, 2)*
|
||||
|
||||
*do j = 1, size(tallies(i) % scores, 1)*
|
||||
|
||||
**real(8) tallies(i) % scores(j,k) % sum**
|
||||
|
||||
Accumulated sum for the j-th score and k-th filter of the
|
||||
i-th tally
|
||||
|
||||
**real(8) tallies(i) % scores(j,k) % sum_sq**
|
||||
|
||||
Accumulated sum of squares for the j-th score and k-th
|
||||
filter of the i-th tally
|
||||
|
||||
if (run_mode == MODE_CRITICALITY)
|
||||
|
||||
*do i = 1, n_particles*
|
||||
|
||||
**real(8) source_bank(i) % wgt**
|
||||
|
||||
Weight of the i-th source particle
|
||||
|
||||
**real(8) source_bank(i) % xyz(1:3)**
|
||||
|
||||
Coordinates of the i-th source particle.
|
||||
|
||||
**real(8) source_bank(i) % uvw(1:3)**
|
||||
|
||||
Direction of the i-th source particle
|
||||
|
||||
**real(8) source_bank(i) % E**
|
||||
|
||||
Energy of the i-th source particle.
|
||||
|
||||
----------
|
||||
Revision 2
|
||||
----------
|
||||
|
|
@ -57,7 +672,9 @@ Revision 2
|
|||
|
||||
if (entropy_on)
|
||||
|
||||
**real(8) entropy for the i-th batch**
|
||||
**real(8) entropy(i)**
|
||||
|
||||
Shannon entropy for the i-th batch
|
||||
|
||||
**integer(4) N_GLOBAL_TALLIES**
|
||||
|
||||
|
|
@ -156,7 +773,9 @@ Revision 1
|
|||
|
||||
if (entropy_on)
|
||||
|
||||
**real(8) entropy for the i-th batch**
|
||||
**real(8) entropy(i)**
|
||||
|
||||
Shannon entropy for the i-th batch
|
||||
|
||||
**integer(4) N_GLOBAL_TALLIES**
|
||||
|
||||
|
|
|
|||
|
|
@ -4,3 +4,86 @@
|
|||
Data Structures
|
||||
===============
|
||||
|
||||
The purpose of this section is to give you an overview of the major data
|
||||
structures in OpenMC and how they are logically related. A majority of variables
|
||||
in OpenMC are `derived types`_ (similar to a struct in C). These derived types
|
||||
are defined in the various header modules, e.g. src/geometry_header.F90. Most
|
||||
important variables are found in the `global module`_. Have a look through that
|
||||
module to get a feel for what variables you'll often come across when looking at
|
||||
OpenMC code.
|
||||
|
||||
--------
|
||||
Particle
|
||||
--------
|
||||
|
||||
Perhaps the variable that you will see most often is simply called ``p`` and is
|
||||
of type(Particle). This variable stores information about a particle's physical
|
||||
characteristics (coordinates, direction, energy), what cell and material it's
|
||||
currently in, how many collisions it has undergone, etc. In practice, only one
|
||||
particle is followed at a time so there is no array of type(Particle). The
|
||||
Particle type is defined in the `particle_header module`_.
|
||||
|
||||
You will notice that the direction and angle of the particle is stored in a
|
||||
linked list of type(LocalCoord). In geometries with multiple :ref:`universes`,
|
||||
the coordinates in each universe are stored in this linked list. If universes or
|
||||
lattices are not used in a geometry, only one LocalCoord is present in the
|
||||
linked list.
|
||||
|
||||
The LocalCoord type has a component called cell which gives the index in the
|
||||
``cells`` array in the `global module`_. The ``cells`` array is of type(Cell)
|
||||
and stored information about each region defined by the user.
|
||||
|
||||
----
|
||||
Cell
|
||||
----
|
||||
|
||||
The Cell type is defined in the `geometry_header module`_ along with other
|
||||
geometry-related derived types. Each cell in the problem is described in terms
|
||||
of its bounding surfaces, which are listed on the ``surfaces`` component. The
|
||||
absolute value of each item in the ``surfaces`` component contains the index of
|
||||
the corresponding surface in the ``surfaces`` array defined in the `global
|
||||
module`_. The sign on each item in the ``surfaces`` component indicates whether
|
||||
the cell exists on the positive or negative side of the surface (see
|
||||
:ref:`methods_geometry`).
|
||||
|
||||
Each cell can either be filled with another universe/lattice or with a
|
||||
material. If it is filled with a material, the ``material`` component gives the
|
||||
index of the material in the ``materials`` array defined in the `global
|
||||
module`_.
|
||||
|
||||
-------
|
||||
Surface
|
||||
-------
|
||||
|
||||
The Surface type is defined in the `geometry_header module`_. A surface is
|
||||
defined by a type (sphere, cylinder, etc.) and a list of coefficients for that
|
||||
surface type. The simplest example would be a plane perpendicular to the xy, yz,
|
||||
or xz plane which needs only one parameter. The ``type`` component indicates the
|
||||
type through integer parameters such as SURF_SPHERE or SURF_CYL_Y (these are
|
||||
defined in the `constants module`_). The ``coeffs`` component gives the
|
||||
necessary coefficients to parameterize the surface type (see
|
||||
:ref:`surface_element`).
|
||||
|
||||
--------
|
||||
Material
|
||||
--------
|
||||
|
||||
The Material type is defined in the `material_header module`_. Each material
|
||||
contains a number of nuclides at a given atom density. Each item in the
|
||||
``nuclide`` component corresponds to the index in the global ``nuclides`` array
|
||||
(as usual, found in the `global module`_). The ``atom_density`` component is the
|
||||
same length as the ``nuclides`` component and lists the corresponding atom
|
||||
density in atom/barn-cm for each nuclide in the ``nuclides`` component.
|
||||
|
||||
If the material contains nuclides for which binding effects are important in
|
||||
low-energy scattering, a :math:`S(\alpha,\beta)` can be associated with that
|
||||
material through the ``sab_table`` component. Again, this component contains the
|
||||
index in the ``sab_tables`` array from the `global module`_.
|
||||
|
||||
|
||||
.. _derived types: http://nf.nci.org.au/training/FortranAdvanced/slides/slides.025.html
|
||||
.. _global module: https://github.com/mit-crpg/openmc/blob/master/src/global.F90
|
||||
.. _particle_header module: https://github.com/mit-crpg/openmc/blob/master/src/particle_header.F90
|
||||
.. _geometry_header module: https://github.com/mit-crpg/openmc/blob/master/src/geometry_header.F90
|
||||
.. _constants module: https://github.com/mit-crpg/openmc/blob/master/src/constants.F90
|
||||
.. _material_header module: https://github.com/mit-crpg/openmc/blob/master/src/material_header.F90
|
||||
|
|
|
|||
144
_sources/devguide/styleguide.txt
Normal file
144
_sources/devguide/styleguide.txt
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
.. _devguide_styleguide:
|
||||
|
||||
======================
|
||||
Style Guide for OpenMC
|
||||
======================
|
||||
|
||||
In order to keep the OpenMC code base consistent in style, this guide specifies
|
||||
a number of rules which should be adhered to when modified existing code or
|
||||
adding new code in OpenMC.
|
||||
|
||||
-------------
|
||||
General Rules
|
||||
-------------
|
||||
|
||||
Conform to the Fortran 2008 standard.
|
||||
|
||||
Make sure code can be compiled with most common compilers, especially gfortran
|
||||
and the Intel Fortran compiler. This supercedes the previous rule --- if a
|
||||
Fortran 2003/2008 feature is not implemented in a common compiler, do not use
|
||||
it.
|
||||
|
||||
Do not use special extensions that can be only be used from certain compilers.
|
||||
|
||||
In general, write your code in lower-case. Having code in all caps does not
|
||||
enhance code readability or otherwise.
|
||||
|
||||
Always include comments to describe what your code is doing. Do not be afraid of
|
||||
using copious amounts of comments.
|
||||
|
||||
Use <, >, <=, >=, ==, and /= rather than .lt., .gt., .le., .ge., .eq., and .ne.
|
||||
|
||||
Try to keep code within 80 columns when possible.
|
||||
|
||||
Don't use ``print *`` or ``write(*,*)``. If writing to a file, use a specific
|
||||
unit. Writing to standard output or standard error should be handled by the
|
||||
``write_message`` subroutine or functionality in the error module.
|
||||
|
||||
-------------------------
|
||||
Subroutines and Functions
|
||||
-------------------------
|
||||
|
||||
Above each subroutine/function, include a comment block giving a brief
|
||||
description of what the subroutine or function does.
|
||||
|
||||
Arguments to subroutines/functions should be explicitly specified as intent(in),
|
||||
intent(out), or intent(inout).
|
||||
|
||||
Include a comment describing what each argument to a subroutine/function is.
|
||||
|
||||
---------
|
||||
Variables
|
||||
---------
|
||||
|
||||
Never, under any circumstances, should implicit variables be used! Always
|
||||
include ``implicit none`` and define all your variables.
|
||||
|
||||
Variable names should be all lower-case and descriptive, i.e. not a random
|
||||
assortment of letters that doesn't give any information to someone seeing it for
|
||||
the first time. Variables consisting of multiple words should be separated by
|
||||
underscores, not hyphens or in camel case.
|
||||
|
||||
Constant (parameter) variables should be in ALL CAPITAL LETTERS and defined in
|
||||
in the constants.F90 module.
|
||||
|
||||
32-bit reals (real(4)) should never be used. Always use 64-bit reals (real(8)).
|
||||
|
||||
For arbitrary length character variables, use the pre-defined lengths
|
||||
MAX_LINE_LEN, MAX_WORD_LEN, and MAX_FILE_LEN if possible.
|
||||
|
||||
Do not use old-style character/array length (e.g. character*80, real*8).
|
||||
|
||||
Integer values being used to indicate a certain state should be defined as named
|
||||
constants (see the constants.F90 module for many examples).
|
||||
|
||||
Yes:
|
||||
|
||||
.. code-block:: fortran
|
||||
|
||||
if (boundary_condition == BC_VACUUM) then
|
||||
|
||||
No:
|
||||
|
||||
.. code-block:: fortran
|
||||
|
||||
if (boundary_condition == -10) then
|
||||
|
||||
Avoid creating arrays with a pre-defined maximum length. Use dynamic memory
|
||||
allocation instead. Use allocatable variables instead of pointer variables when
|
||||
possible.
|
||||
|
||||
Shared/Module Variables
|
||||
-----------------------
|
||||
|
||||
Always put shared variables in modules. Access module variables through a
|
||||
``use`` statement. Always use the ``only`` specifier on the ``use`` statement
|
||||
except for variables from the global, constants, and various header modules.
|
||||
|
||||
Never use ``equivalence`` statements, ``common`` blocks, or ``data`` statements.
|
||||
|
||||
-------------------------
|
||||
Derived Types and Classes
|
||||
-------------------------
|
||||
|
||||
Derived types and classes should have CamelCase names with words not separated
|
||||
by underscores or hyphens.
|
||||
|
||||
-----------
|
||||
Indentation
|
||||
-----------
|
||||
|
||||
Never use tab characters. Indentation should always be applied using
|
||||
spaces. Emacs users should include the following line in their .emacs file:
|
||||
|
||||
.. code-block:: common-lisp
|
||||
|
||||
(setq-default indent-tabs-mode nil)
|
||||
|
||||
vim users should include the following line in their .vimrc file::
|
||||
|
||||
set expandtab
|
||||
|
||||
Use 2 spaces per indentation level. This applies to all constructs such as
|
||||
program, subroutine, function, if, associate, etc. Emacs users should set the
|
||||
variables f90-if-indent, f90-do-indent, f90-continuation-indent,
|
||||
f90-type-indent, f90-associate-indent, and f90-program indent to 2.
|
||||
|
||||
Continuation lines should be indented by an extra 5 spaces. This is the default
|
||||
value of f90-continuation-indent in Emacs.
|
||||
|
||||
-------------------------
|
||||
Whitespace in Expressions
|
||||
-------------------------
|
||||
|
||||
Avoid extraneous whitespace in the following situations:
|
||||
|
||||
- In subroutine/function calls::
|
||||
|
||||
Yes: call somesub(x, y(2), z)
|
||||
No: call somesub( x, y( 2 ), z )
|
||||
|
||||
- In logical expressions, use one space around operators but nowhere else::
|
||||
|
||||
Yes: if (variable == 2) then
|
||||
No: if ( variable==2 ) then
|
||||
45
_sources/devguide/workflow.txt
Normal file
45
_sources/devguide/workflow.txt
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
.. _devguide_workflow:
|
||||
|
||||
====================
|
||||
Development Workflow
|
||||
====================
|
||||
|
||||
Anyone wishing to make contributions to OpenMC should be fully acquianted and
|
||||
comfortable working with git_ and GitHub_. The primary means of modifying and
|
||||
making contributions to OpenMC is through GitHub `pull requests`_. This is
|
||||
what's known as a fork and pull development model. The steps for this are as
|
||||
follows:
|
||||
|
||||
1. Fork the main openmc repository from `mit-crpg/openmc`_. This will create a
|
||||
repository with the same name under your personal account. As such, you can
|
||||
commit to it as you please without disrupting other developers.
|
||||
|
||||
2. Create a branch that you want merged back to `mit-crpg/openmc`_ and make
|
||||
commits that you intend to go back. If you have made other changes that should
|
||||
not be merged back, those changes should be on another branch.
|
||||
|
||||
3. Issue a pull request from GitHub and select the branch you want merged.
|
||||
|
||||
4. The OpenMC integration manager will review your pull request and make sure it
|
||||
conforms to the :ref:`devguide_styleguide`, compiles correctly, runs in parallel
|
||||
correctly, does not break other features in the code, etc. Any issues with the
|
||||
pull request can be discussed directly on the pull request page itself.
|
||||
|
||||
5. After the pull request has been thoroughly vetted, it is merged back into
|
||||
`mit-crpg/openmc`_.
|
||||
|
||||
While the process above depends on the fork of the OpenMC repository being
|
||||
publicly available on GitHub, you may also wish to do development on a private
|
||||
repository for research or commercial purposes. The proper way to do this is to
|
||||
create a complete copy of the OpenMC repository (not a fork from GitHub). The
|
||||
private repository can then either be stored just locally or in conjunction with
|
||||
a private repository on Github (this requires a `paid plan`_). If you want to
|
||||
merge some changes you've made in your private repository back to
|
||||
`mit-crpg/openmc`_ repository, simply follow the steps above with an extra step
|
||||
of pulling a branch from your private repository into your public fork.
|
||||
|
||||
.. _git: http://git-scm.com/
|
||||
.. _GitHub: https://github.com/
|
||||
.. _pull requests: https://help.github.com/articles/using-pull-requests
|
||||
.. _mit-crpg/openmc: https://github.com/mit-crpg/openmc
|
||||
.. _paid plan: https://github.com/plans
|
||||
|
|
@ -4,3 +4,37 @@
|
|||
xml-fortran Input Parsing
|
||||
=========================
|
||||
|
||||
OpenMC relies on the xml-fortran package for reading and intrepreting the XML
|
||||
input files for geometry, materials, settings, tallies, etc. The use of an XML
|
||||
format makes writing input files considerably more flexible than would otherwise
|
||||
be possible.
|
||||
|
||||
With the xml-fortran package, extending the user input files to include new tags
|
||||
is fairly straightforward. A "template" file exists for each diferent type of
|
||||
input file that tells xml-fortran what to expect in a file. These template files
|
||||
can be found in the src/templates directory. The steps for modifying/adding
|
||||
input are as follows:
|
||||
|
||||
1. Add a ``<variable>``` tag to the desired template file,
|
||||
e.g. src/templates/geometry_t.xml. See the `xml-fortran documentation`_ for a
|
||||
description of the acceptable fields.
|
||||
|
||||
2. In the input_xml module, any input given in your new tag will be read
|
||||
automatically through a call to, e.g. read_xml_file_geometry_t. Whatever
|
||||
variable name you specified should have the data available.
|
||||
|
||||
3. Add code in the appropriate subroutine to check the variable for any possible
|
||||
errors.
|
||||
|
||||
4. Add a variable in OpenMC to copy the temporary variable into if there are no
|
||||
errors.
|
||||
|
||||
A set of `RELAX NG`_ schemata exists that enables real-time validation of input
|
||||
files when using the GNU Emacs text editor. You should also modify the RELAX NG
|
||||
schema for the template you changed (e.g. src/templates/geometry.rnc) so that
|
||||
those who use Emacs can confirm whether their input is valid before they
|
||||
run. You will need to be familiar with RELAX NG `compact syntax`_.
|
||||
|
||||
.. _xml-fortran documentation: http://xml-fortran.sourceforge.net/documentation.html
|
||||
.. _RELAX NG: http://relaxng.org/
|
||||
.. _compact syntax: http://relaxng.org/compact-tutorial-20030326.html
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ In OpenMC, any second-order surface of the form
|
|||
can be modeled in OpenMC. For example, the equation for a sphere centered at
|
||||
:math:`(\bar{x},\bar{y},\bar{z})` and of radius :math:`R` can be written as
|
||||
|
||||
.. _universes:
|
||||
|
||||
Universes
|
||||
---------
|
||||
|
||||
|
|
|
|||
|
|
@ -5,18 +5,18 @@ Publications
|
|||
============
|
||||
|
||||
- Paul K. Romano and Benoit Forget, "Reducing Parallel Communication in Monte
|
||||
Carlo Simulations via Batch Statistics," *Trans. Am. Nucl. Soc.*, Accepted
|
||||
(2012).
|
||||
Carlo Simulations via Batch Statistics," *Trans. Am. Nucl. Soc.*, **107**,
|
||||
xxx--xxx (2012).
|
||||
|
||||
- Paul K. Romano and Benoit Forget, "The OpenMC Monte Carlo Particle Transport
|
||||
Code," *Annals of Nuclear Energy*, Accepted (2012).
|
||||
Code," *Ann. Nucl. Energy*, **51**, 274--281
|
||||
(2012). `<http://dx.doi.org/10.1016/j.anucene.2012.06.040>`_
|
||||
|
||||
- Andrew R. Siegel, Kord Smith, Paul K. Romano, Benoit Forget, and Kyle Felker,
|
||||
"The effect of load imbalances on the performance of Monte Carlo codes in LWR
|
||||
analysis", *Journal of Computational Physics*,
|
||||
analysis", *J. Comput. Phys.*,
|
||||
`<http://dx.doi.org/10.1016/j.jcp.2012.06.012>`_ (2012).
|
||||
|
||||
- Paul K. Romano and Benoit Forget, "Parallel Fission Bank Algorithms in Monte
|
||||
Carlo Criticality Calculations," *Nuclear Science and Engineering*, **170**,
|
||||
pp. 125--135 (2012). [`PDF
|
||||
<http://web.mit.edu/romano7/www/nse_v170_n2_pp125-135.pdf>`_]
|
||||
Carlo Criticality Calculations," *Nucl. Sci. Eng.*, **170**, 125--135
|
||||
(2012). `<http://hdl.handle.net/1721.1/73569>`_
|
||||
|
|
|
|||
|
|
@ -18,11 +18,13 @@ and libraries may be needed. These include:
|
|||
- A Fortran compiler such as gfortran_
|
||||
- git_ version control software for obtaining source code (*optional*)
|
||||
- An MPI implementation for parallel runs (*optional*)
|
||||
- HDF5_ Library for improved output format (*optional*)
|
||||
- HDF5_ Library for portable binary output format (*optional*)
|
||||
- PETSc_ for CMFD acceleration (*optional*)
|
||||
|
||||
.. _gfortran: http://gcc.gnu.org/wiki/GFortran
|
||||
.. _git: http://git-scm.com
|
||||
.. _HDF5: http://www.hdfgroup.org/HDF5/
|
||||
.. _PETSc: http://www.mcs.anl.gov/petsc/
|
||||
|
||||
--------------------
|
||||
Obtaining the Source
|
||||
|
|
|
|||
|
|
@ -37,16 +37,19 @@ Overview of Files
|
|||
-----------------
|
||||
|
||||
To assemble a complete model for OpenMC, one needs to create separate XML files
|
||||
for the geometry, materials, and settings. Additionally, there are two optional
|
||||
for the geometry, materials, and settings. Additionally, there are three optional
|
||||
input files. The first is a tallies XML file that specifies physical quantities
|
||||
to be tallied. The second is a plots XML file that specifies regions of geometry
|
||||
which should be plotted. OpenMC expects that these files are called:
|
||||
which should be plotted. The third is a CMFD XML file that specifies coarse mesh
|
||||
acceleration geometry and execution parameters. OpenMC expects that these
|
||||
files are called:
|
||||
|
||||
* ``geometry.xml``
|
||||
* ``materials.xml``
|
||||
* ``settings.xml``
|
||||
* ``tallies.xml``
|
||||
* ``plots.xml``
|
||||
* ``cmfd.xml``
|
||||
|
||||
--------------------------------------
|
||||
Settings Specification -- settings.xml
|
||||
|
|
@ -454,6 +457,8 @@ could be written as:
|
|||
|
||||
</geometry>
|
||||
|
||||
.. _surface_element:
|
||||
|
||||
``<surface>`` Element
|
||||
---------------------
|
||||
|
||||
|
|
@ -519,6 +524,21 @@ The following quadratic surfaces can be modeled:
|
|||
A sphere of the form :math:`(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 =
|
||||
R^2`. The coefficients specified are ":math:`x_0 \: y_0 \: z_0 \: R`".
|
||||
|
||||
:x-cone:
|
||||
A cone parallel to the x-axis of the form :math:`(y - y_0)^2 + (z - z_0)^2 =
|
||||
R^2 (x - x_0)^2`. The coefficients specified are ":math:`x_0 \: y_0 \: z_0
|
||||
\: R^2`".
|
||||
|
||||
:y-cone:
|
||||
A cone parallel to the y-axis of the form :math:`(x - x_0)^2 + (z - z_0)^2 =
|
||||
R^2 (y - y_0)^2`. The coefficients specified are ":math:`x_0 \: y_0 \: z_0
|
||||
\: R^2`".
|
||||
|
||||
:z-cone:
|
||||
A cone parallel to the x-axis of the form :math:`(x - x_0)^2 + (y - y_0)^2 =
|
||||
R^2 (z - z_0)^2`. The coefficients specified are ":math:`x_0 \: y_0 \: z_0
|
||||
\: R^2`".
|
||||
|
||||
``<cell>`` Element
|
||||
------------------
|
||||
|
||||
|
|
@ -962,3 +982,184 @@ sub-elements:
|
|||
materials to plot. This overrides any ``col_spec`` color specifications.
|
||||
|
||||
*Default*: None
|
||||
|
||||
--------------------------------------------
|
||||
CMFD Specification -- cmfd.xml
|
||||
--------------------------------------------
|
||||
|
||||
Coarse mesh finite difference acceleration method has been implemented in OpenMC.
|
||||
Currently, it allows users to accelerate fission source convergence during
|
||||
inactive neutron batches. To run CMFD, the ``<run_cmfd>`` element in
|
||||
``settings.xml`` should be set to ``.true.``.
|
||||
|
||||
``<active_flush>`` Element
|
||||
--------------------------
|
||||
|
||||
The ``<active_flush>`` element controls the batch where CMFD tallies should be
|
||||
reset. CMFD tallies should be reset before active batches so they are accumulated
|
||||
without bias.
|
||||
|
||||
*Default*: 0
|
||||
|
||||
``<begin>`` Element
|
||||
-------------------
|
||||
|
||||
The ``<begin>`` element controls what batch CMFD calculations should begin.
|
||||
|
||||
*Default*: 1
|
||||
|
||||
``<feedback>`` Element
|
||||
----------------------
|
||||
|
||||
The ``<feedback>`` element controls whether or not the CMFD diffusion result is
|
||||
used to adjust the weight of fission source neutrons on the next OpenMC batch.
|
||||
It can be turned on with ".true." and off with ".false.".
|
||||
|
||||
*Default*: .false.
|
||||
|
||||
``<inactive>`` Element
|
||||
----------------------
|
||||
|
||||
The ``<inactive>`` element controls if cmfd tallies should be accumulated
|
||||
during inactive batches. For some applications, CMFD tallies may not be
|
||||
needed until the start of active batches. This option can be turned on
|
||||
with ".true." and off with ".false."
|
||||
|
||||
*Default*: .true.
|
||||
|
||||
``<keff_tol>`` Element
|
||||
----------------------
|
||||
|
||||
The ``<keff_tol>`` element specifies acceptance criteria of a CMFD eigenvalue.
|
||||
If the CMFD eigenvalue and OpenMC batch eigenvalue are within this tolerance,
|
||||
CMFD is allowed to modify source neutron weights.
|
||||
|
||||
*Default*: 0.005
|
||||
|
||||
``<ksp_monitor>`` Element
|
||||
-------------------------
|
||||
|
||||
The ``<ksp_monitor>`` element is used to view the convergence of linear GMRES
|
||||
iterations in PETSc. This option can be turned on with ".true." and turned off
|
||||
with ".false.".
|
||||
|
||||
|
||||
*Default*: .false.
|
||||
|
||||
``<mesh>`` Element
|
||||
------------------
|
||||
|
||||
If a structured mesh is desired as a filter for a tally, it must be specified in
|
||||
a separate element with the tag name ``<mesh>``. This element has the following
|
||||
attributes/sub-elements:
|
||||
|
||||
:type:
|
||||
The type of structured mesh. Only "rectangular" is currently supported.
|
||||
|
||||
:lower_left:
|
||||
The lower-left corner of the structured mesh. If only two coordinate are
|
||||
given, it is assumed that the mesh is an x-y mesh.
|
||||
|
||||
:upper_right:
|
||||
The upper-right corner of the structrued mesh. If only two coordinate are
|
||||
given, it is assumed that the mesh is an x-y mesh.
|
||||
|
||||
:dimension:
|
||||
The number of mesh cells in each direction.
|
||||
|
||||
:width:
|
||||
The width of mesh cells in each direction.
|
||||
|
||||
:energy:
|
||||
Energy bins [in MeV], listed in ascending order (e.g. 0.0 0.625e-7 20.0)
|
||||
for CMFD tallies and acceleration. If no energy bins are listed, OpenMC
|
||||
automatically assumes a one energy group calculation over the entire
|
||||
energy range.
|
||||
|
||||
:albedo:
|
||||
Surface ratio of incoming to outgoing partial currents on global boundary
|
||||
conditions. They are listed in the following order: -x +x -y +y -z +z.
|
||||
|
||||
*Default*: 1.0 1.0 1.0 1.0 1.0 1.0
|
||||
|
||||
:map:
|
||||
An optional acceleration map can be specified to overlay on the coarse
|
||||
mesh spatial grid. If this option is used a ``1`` is used for a
|
||||
non-accelerated region and a ``2`` is used for an accelerated region.
|
||||
For a simple 4x4 coarse mesh with a 2x2 fuel lattice surrounded by
|
||||
reflector, the map is:
|
||||
|
||||
``1 1 1 1``
|
||||
|
||||
``1 2 2 1``
|
||||
|
||||
``1 2 2 1``
|
||||
|
||||
``1 1 1 1``
|
||||
|
||||
Therefore a 2x2 system of equations is solved rather than a 4x4. This
|
||||
is extremely important to use in reflectors as neutrons will not
|
||||
contribute to any tallies far away from fission source neutron regions.
|
||||
A ``2`` must be used to identify any fission source region.
|
||||
|
||||
.. note:: Only two of the following three sub-elements are needed:
|
||||
``lower_left``, ``upper_right`` and ``width``. Any combination
|
||||
of two of these will yield the third.
|
||||
|
||||
``<norm>`` Element
|
||||
------------------
|
||||
|
||||
The ``<norm>`` element is used to normalize the CMFD fission source distribution
|
||||
to a particular value. For example, if a fission source is calculated for a
|
||||
17 x 17 lattice of pins, the fission source may be normalized to the number of
|
||||
fission source regions, in this case 289. This is useful when visualizing this
|
||||
distribution as the average peaking factor will be unity. This parameter will
|
||||
not impact the calculation.
|
||||
|
||||
*Default*: 1.0
|
||||
|
||||
``<n_procs_cmfd>`` Element
|
||||
--------------------------
|
||||
|
||||
The ``<n_procs_cmfd>`` element is used to set the number of processors used
|
||||
for CMFD calculation. It should be less than or equal to the number of
|
||||
processors used during OpenMC.
|
||||
|
||||
*Default*: 1
|
||||
|
||||
``<power_monitor>`` Element
|
||||
---------------------------
|
||||
|
||||
The ``<power_monitor>`` element is used to view the convergence of power iteration.
|
||||
This option can be turned on with ".true." and turned off with ".false.".
|
||||
|
||||
|
||||
*Default*: .false.
|
||||
|
||||
``<write_balance>`` Element
|
||||
---------------------------
|
||||
|
||||
The ``<write_balance>`` element is used to view the balance of OpenMC tally
|
||||
residuals for every coarse mesh region and energy group. This option can be
|
||||
turned on with ".true." and off with ".false.".
|
||||
|
||||
|
||||
*Default*: .false.
|
||||
|
||||
``<write_hdf5>`` Element
|
||||
------------------------
|
||||
|
||||
The ``<write_hdf5>`` element can be turned on with ".true." to get an
|
||||
HDF5 output file of CMFD results.
|
||||
|
||||
*Default*: .false.
|
||||
|
||||
``<write_matrices>`` Element
|
||||
----------------------------
|
||||
|
||||
The ``<write_matrices>`` element is used to view the PETSc sparse matrices
|
||||
created when solving CMFD equations. These binary output files can be imported
|
||||
into MATLAB using PETSc-MATLAB utilities. This option can be
|
||||
turned on with ".true." and off with ".false.".
|
||||
|
||||
*Default*: .false.
|
||||
|
|
|
|||
|
|
@ -32,10 +32,15 @@ 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.
|
||||
|
||||
To enable CMFD acceleration, you will need to have PETSc_ installed on your
|
||||
computer. The installed version will need to have been compiled with the same
|
||||
compiler you intend to compile OpenMC with.
|
||||
|
||||
.. _gfortran: http://gcc.gnu.org/wiki/GFortran
|
||||
.. _OpenMPI: http://www.open-mpi.org
|
||||
.. _MPICH2: http://www.mcs.anl.gov/mpi/mpich/
|
||||
.. _HDF5: http://www.hdfgroup.org/HDF5/
|
||||
.. _PETSc: http://www.mcs.anl.gov/petsc/
|
||||
|
||||
--------------------
|
||||
Obtaining the Source
|
||||
|
|
|
|||
|
|
@ -58,11 +58,30 @@ structure of the OpenMC source code and how to do various development tasks such
|
|||
as debugging.</p>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="structures.html">1. Data Structures</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="xml-fortran.html">2. xml-fortran Input Parsing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="statepoint.html">3. State Point Binary File Specifications</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="statepoint.html#revision-2">3.1. Revision 2</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="statepoint.html#revision-1">3.2. Revision 1</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="structures.html">1. Data Structures</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="structures.html#particle">1.1. Particle</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="structures.html#cell">1.2. Cell</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="structures.html#surface">1.3. Surface</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="structures.html#material">1.4. Material</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="styleguide.html">2. Style Guide for OpenMC</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="styleguide.html#general-rules">2.1. General Rules</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="styleguide.html#subroutines-and-functions">2.2. Subroutines and Functions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="styleguide.html#variables">2.3. Variables</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="styleguide.html#derived-types-and-classes">2.4. Derived Types and Classes</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="styleguide.html#indentation">2.5. Indentation</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="styleguide.html#whitespace-in-expressions">2.6. Whitespace in Expressions</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="workflow.html">3. Development Workflow</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="xml-fortran.html">4. xml-fortran Input Parsing</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="statepoint.html">5. State Point Binary File Specifications</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="statepoint.html#revision-5">5.1. Revision 5</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="statepoint.html#revision-4">5.2. Revision 4</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="statepoint.html#revision-3">5.3. Revision 3</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="statepoint.html#revision-2">5.4. Revision 2</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="statepoint.html#revision-1">5.5. Revision 1</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>3. State Point Binary File Specifications — OpenMC Documentation</title>
|
||||
<title>5. State Point Binary File Specifications — OpenMC Documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
<link rel="top" title="OpenMC Documentation" href="../index.html" />
|
||||
<link rel="up" title="Developer’s Guide" href="index.html" />
|
||||
<link rel="next" title="Publications" href="../publications.html" />
|
||||
<link rel="prev" title="2. xml-fortran Input Parsing" href="xml-fortran.html" />
|
||||
<link rel="prev" title="4. xml-fortran Input Parsing" href="xml-fortran.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="xml-fortran.html">2. xml-fortran Input Parsing</a>
|
||||
«  <a href="xml-fortran.html">4. xml-fortran Input Parsing</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
|
|
@ -53,9 +53,537 @@
|
|||
|
||||
|
||||
<div class="section" id="state-point-binary-file-specifications">
|
||||
<span id="devguide-statepoint"></span><h1>3. State Point Binary File Specifications<a class="headerlink" href="#state-point-binary-file-specifications" title="Permalink to this headline">¶</a></h1>
|
||||
<span id="devguide-statepoint"></span><h1>5. State Point Binary File Specifications<a class="headerlink" href="#state-point-binary-file-specifications" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="revision-5">
|
||||
<h2>5.1. Revision 5<a class="headerlink" href="#revision-5" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>integer(4) REVISION_STATEPOINT</strong></p>
|
||||
<blockquote>
|
||||
<div>Revision of the binary state point file. Any time a change is made in the
|
||||
format of the state-point file, this integer is incremented.</div></blockquote>
|
||||
<p><strong>integer(4) VERSION_MAJOR</strong></p>
|
||||
<blockquote>
|
||||
<div>Major version number for OpenMC</div></blockquote>
|
||||
<p><strong>integer(4) VERSION_MINOR</strong></p>
|
||||
<blockquote>
|
||||
<div>Minor version number for OpenMC</div></blockquote>
|
||||
<p><strong>integer(4) VERSION_RELEASE</strong></p>
|
||||
<blockquote>
|
||||
<div>Release version number for OpenMC</div></blockquote>
|
||||
<p><strong>character(19) time_stamp</strong></p>
|
||||
<blockquote>
|
||||
<div>Date and time the state point was written.</div></blockquote>
|
||||
<p><strong>integer(8) seed</strong></p>
|
||||
<blockquote>
|
||||
<div>Pseudo-random number generator seed.</div></blockquote>
|
||||
<p><strong>integer(4) run_mode</strong></p>
|
||||
<blockquote>
|
||||
<div>run mode used. The modes are described in constants.F90.</div></blockquote>
|
||||
<p><strong>integer(8) n_particles</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of particles used per generation.</div></blockquote>
|
||||
<p><strong>integer(4) n_batches</strong></p>
|
||||
<blockquote>
|
||||
<div>Total number of batches (active + inactive).</div></blockquote>
|
||||
<p><strong>integer(4) current_batch</strong></p>
|
||||
<blockquote>
|
||||
<div>The number of batches already simulated.</div></blockquote>
|
||||
<p>if (run_mode == MODE_CRITICALITY)</p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) n_inactive</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of inactive batches</div></blockquote>
|
||||
<p><strong>integer(4) gen_per_batch</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of generations per batch for criticality calculations</div></blockquote>
|
||||
<p><em>do i = 1, current_batch</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) k_batch(i)</strong></p>
|
||||
<blockquote>
|
||||
<div>k-effective for the i-th batch</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><em>do i = 1, current_batch</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) entropy(i)</strong></p>
|
||||
<blockquote>
|
||||
<div>Shannon entropy for the i-th batch</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) n_meshes</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of meshes in tallies.xml file</div></blockquote>
|
||||
<p><em>do i = 1, n_meshes</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) meshes(i) % type</strong></p>
|
||||
<blockquote>
|
||||
<div>Type of mesh.</div></blockquote>
|
||||
<p><strong>integer(4) meshes(i) % n_dimension</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of dimensions for mesh (2 or 3).</div></blockquote>
|
||||
<p><strong>integer(4) meshes(i) % dimension(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of mesh cells in each dimension.</div></blockquote>
|
||||
<p><strong>real(8) meshes(i) % lower_left(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Coordinates of lower-left corner of mesh.</div></blockquote>
|
||||
<p><strong>real(8) meshes(i) % upper_right(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Coordinates of upper-right corner of mesh.</div></blockquote>
|
||||
<p><strong>real(8) meshes(i) % width(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Width of each mesh cell in each dimension.</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) n_tallies</strong></p>
|
||||
<p><em>do i = 1, n_tallies</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) tallies(i) % n_realizations</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of realizations for the i-th tally.</div></blockquote>
|
||||
<p><strong>integer(4) size(tallies(i) % scores, 1)</strong></p>
|
||||
<blockquote>
|
||||
<div>Total number of score bins for the i-th tally</div></blockquote>
|
||||
<p><strong>integer(4) size(tallies(i) % scores, 2)</strong></p>
|
||||
<blockquote>
|
||||
<div>Total number of filter bins for the i-th tally</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % n_filters</strong></p>
|
||||
<p><em>do j = 1, tallies(i) % n_filters</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) tallies(i) % filter(j) % type</strong></p>
|
||||
<blockquote>
|
||||
<div>Type of tally filter.</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % filter(j) % n_bins</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of bins for filter.</div></blockquote>
|
||||
<p><strong>integer(4)/real(8) tallies(i) % filter(j) % bins(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Value for each filter bin of this type.</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % n_nuclide_bins</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of nuclide bins. If none are specified, this is just one.</div></blockquote>
|
||||
<p><em>do j = 1, tallies(i) % n_nuclide_bins</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) tallies(i) % nuclide_bins(j)</strong></p>
|
||||
<blockquote>
|
||||
<div>Values of specified nuclide bins</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % n_score_bins</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of scoring bins.</div></blockquote>
|
||||
<p><em>do j = 1, tallies(i) % n_score_bins</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) tallies(i) % score_bins(j)</strong></p>
|
||||
<blockquote>
|
||||
<div>Values of specified scoring bins (e.g. SCORE_FLUX).</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) n_realizations</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of realizations for global tallies.</div></blockquote>
|
||||
<p><strong>integer(4) N_GLOBAL_TALLIES</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of global tally scores</div></blockquote>
|
||||
<p><em>do i = 1, N_GLOBAL_TALLIES</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) global_tallies(i) % sum</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum for the i-th global tally</div></blockquote>
|
||||
<p><strong>real(8) global_tallies(i) % sum_sq</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum of squares for the i-th global tally</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) tallies_on</strong></p>
|
||||
<blockquote>
|
||||
<div>Flag indicated if tallies are present in the file.</div></blockquote>
|
||||
<p>if (tallies_on > 0)</p>
|
||||
<blockquote>
|
||||
<div><p><em>do i = 1, n_tallies</em></p>
|
||||
<blockquote>
|
||||
<div><p><em>do k = 1, size(tallies(i) % scores, 2)</em></p>
|
||||
<blockquote>
|
||||
<div><p><em>do j = 1, size(tallies(i) % scores, 1)</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) tallies(i) % scores(j,k) % sum</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum for the j-th score and k-th filter of the
|
||||
i-th tally</div></blockquote>
|
||||
<p><strong>real(8) tallies(i) % scores(j,k) % sum_sq</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum of squares for the j-th score and k-th
|
||||
filter of the i-th tally</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p>if (run_mode == MODE_CRITICALITY)</p>
|
||||
<blockquote>
|
||||
<div><p><em>do i = 1, n_particles</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) source_bank(i) % wgt</strong></p>
|
||||
<blockquote>
|
||||
<div>Weight of the i-th source particle</div></blockquote>
|
||||
<p><strong>real(8) source_bank(i) % xyz(1:3)</strong></p>
|
||||
<blockquote>
|
||||
<div>Coordinates of the i-th source particle.</div></blockquote>
|
||||
<p><strong>real(8) source_bank(i) % uvw(1:3)</strong></p>
|
||||
<blockquote>
|
||||
<div>Direction of the i-th source particle</div></blockquote>
|
||||
<p><strong>real(8) source_bank(i) % E</strong></p>
|
||||
<blockquote>
|
||||
<div>Energy of the i-th source particle.</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="revision-4">
|
||||
<h2>5.2. Revision 4<a class="headerlink" href="#revision-4" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>integer(4) REVISION_STATEPOINT</strong></p>
|
||||
<blockquote>
|
||||
<div>Revision of the binary state point file. Any time a change is made in the
|
||||
format of the state-point file, this integer is incremented.</div></blockquote>
|
||||
<p><strong>integer(4) VERSION_MAJOR</strong></p>
|
||||
<blockquote>
|
||||
<div>Major version number for OpenMC</div></blockquote>
|
||||
<p><strong>integer(4) VERSION_MINOR</strong></p>
|
||||
<blockquote>
|
||||
<div>Minor version number for OpenMC</div></blockquote>
|
||||
<p><strong>integer(4) VERSION_RELEASE</strong></p>
|
||||
<blockquote>
|
||||
<div>Release version number for OpenMC</div></blockquote>
|
||||
<p><strong>character(19) time_stamp</strong></p>
|
||||
<blockquote>
|
||||
<div>Date and time the state point was written.</div></blockquote>
|
||||
<p><strong>integer(8) seed</strong></p>
|
||||
<blockquote>
|
||||
<div>Pseudo-random number generator seed.</div></blockquote>
|
||||
<p><strong>integer(4) run_mode</strong></p>
|
||||
<blockquote>
|
||||
<div>run mode used. The modes are described in constants.F90.</div></blockquote>
|
||||
<p><strong>integer(8) n_particles</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of particles used per generation.</div></blockquote>
|
||||
<p><strong>integer(4) n_batches</strong></p>
|
||||
<blockquote>
|
||||
<div>Total number of batches (active + inactive).</div></blockquote>
|
||||
<p><strong>integer(4) current_batch</strong></p>
|
||||
<blockquote>
|
||||
<div>The number of batches already simulated.</div></blockquote>
|
||||
<p>if (run_mode == MODE_CRITICALITY)</p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) n_inactive</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of inactive batches</div></blockquote>
|
||||
<p><strong>integer(4) gen_per_batch</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of generations per batch for criticality calculations</div></blockquote>
|
||||
<p><em>do i = 1, current_batch</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) k_batch(i)</strong></p>
|
||||
<blockquote>
|
||||
<div>k-effective for the i-th batch</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><em>do i = 1, current_batch</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) entropy(i)</strong></p>
|
||||
<blockquote>
|
||||
<div>Shannon entropy for the i-th batch</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) n_meshes</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of meshes in tallies.xml file</div></blockquote>
|
||||
<p><em>do i = 1, n_meshes</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) meshes(i) % type</strong></p>
|
||||
<blockquote>
|
||||
<div>Type of mesh.</div></blockquote>
|
||||
<p><strong>integer(4) meshes(i) % n_dimension</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of dimensions for mesh (2 or 3).</div></blockquote>
|
||||
<p><strong>integer(4) meshes(i) % dimension(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of mesh cells in each dimension.</div></blockquote>
|
||||
<p><strong>real(8) meshes(i) % lower_left(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Coordinates of lower-left corner of mesh.</div></blockquote>
|
||||
<p><strong>real(8) meshes(i) % upper_right(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Coordinates of upper-right corner of mesh.</div></blockquote>
|
||||
<p><strong>real(8) meshes(i) % width(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Width of each mesh cell in each dimension.</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) n_tallies</strong></p>
|
||||
<p><em>do i = 1, n_tallies</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) size(tallies(i) % scores, 1)</strong></p>
|
||||
<blockquote>
|
||||
<div>Total number of score bins for the i-th tally</div></blockquote>
|
||||
<p><strong>integer(4) size(tallies(i) % scores, 2)</strong></p>
|
||||
<blockquote>
|
||||
<div>Total number of filter bins for the i-th tally</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % n_filters</strong></p>
|
||||
<p><em>do j = 1, tallies(i) % n_filters</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) tallies(i) % filter(j) % type</strong></p>
|
||||
<blockquote>
|
||||
<div>Type of tally filter.</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % filter(j) % n_bins</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of bins for filter.</div></blockquote>
|
||||
<p><strong>integer(4)/real(8) tallies(i) % filter(j) % bins(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Value for each filter bin of this type.</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % n_nuclide_bins</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of nuclide bins. If none are specified, this is just one.</div></blockquote>
|
||||
<p><em>do j = 1, tallies(i) % n_nuclide_bins</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) tallies(i) % nuclide_bins(j)</strong></p>
|
||||
<blockquote>
|
||||
<div>Values of specified nuclide bins</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % n_score_bins</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of scoring bins.</div></blockquote>
|
||||
<p><em>do j = 1, tallies(i) % n_score_bins</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) tallies(i) % score_bins(j)</strong></p>
|
||||
<blockquote>
|
||||
<div>Values of specified scoring bins (e.g. SCORE_FLUX).</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) N_GLOBAL_TALLIES</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of global tally scores</div></blockquote>
|
||||
<p><em>do i = 1, N_GLOBAL_TALLIES</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) global_tallies(i) % sum</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum for the i-th global tally</div></blockquote>
|
||||
<p><strong>real(8) global_tallies(i) % sum_sq</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum of squares for the i-th global tally</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) tallies_on</strong></p>
|
||||
<blockquote>
|
||||
<div>Flag indicated if tallies are present in the file.</div></blockquote>
|
||||
<p>if (tallies_on > 0)</p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) n_realizations</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of realizations for tally random variables.</div></blockquote>
|
||||
<p><em>do i = 1, n_tallies</em></p>
|
||||
<blockquote>
|
||||
<div><p><em>do k = 1, size(tallies(i) % scores, 2)</em></p>
|
||||
<blockquote>
|
||||
<div><p><em>do j = 1, size(tallies(i) % scores, 1)</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) tallies(i) % scores(j,k) % sum</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum for the j-th score and k-th filter of the
|
||||
i-th tally</div></blockquote>
|
||||
<p><strong>real(8) tallies(i) % scores(j,k) % sum_sq</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum of squares for the j-th score and k-th
|
||||
filter of the i-th tally</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p>if (run_mode == MODE_CRITICALITY)</p>
|
||||
<blockquote>
|
||||
<div><p><em>do i = 1, n_particles</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) source_bank(i) % wgt</strong></p>
|
||||
<blockquote>
|
||||
<div>Weight of the i-th source particle</div></blockquote>
|
||||
<p><strong>real(8) source_bank(i) % xyz(1:3)</strong></p>
|
||||
<blockquote>
|
||||
<div>Coordinates of the i-th source particle.</div></blockquote>
|
||||
<p><strong>real(8) source_bank(i) % uvw(1:3)</strong></p>
|
||||
<blockquote>
|
||||
<div>Direction of the i-th source particle</div></blockquote>
|
||||
<p><strong>real(8) source_bank(i) % E</strong></p>
|
||||
<blockquote>
|
||||
<div>Energy of the i-th source particle.</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="revision-3">
|
||||
<h2>5.3. Revision 3<a class="headerlink" href="#revision-3" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>integer(4) REVISION_STATEPOINT</strong></p>
|
||||
<blockquote>
|
||||
<div>Revision of the binary state point file. Any time a change is made in the
|
||||
format of the state-point file, this integer is incremented.</div></blockquote>
|
||||
<p><strong>integer(4) VERSION_MAJOR</strong></p>
|
||||
<blockquote>
|
||||
<div>Major version number for OpenMC</div></blockquote>
|
||||
<p><strong>integer(4) VERSION_MINOR</strong></p>
|
||||
<blockquote>
|
||||
<div>Minor version number for OpenMC</div></blockquote>
|
||||
<p><strong>integer(4) VERSION_RELEASE</strong></p>
|
||||
<blockquote>
|
||||
<div>Release version number for OpenMC</div></blockquote>
|
||||
<p><strong>character(19) time_stamp</strong></p>
|
||||
<blockquote>
|
||||
<div>Date and time the state point was written.</div></blockquote>
|
||||
<p><strong>integer(8) seed</strong></p>
|
||||
<blockquote>
|
||||
<div>Pseudo-random number generator seed.</div></blockquote>
|
||||
<p><strong>integer(4) run_mode</strong></p>
|
||||
<blockquote>
|
||||
<div>run mode used. The modes are described in constants.F90.</div></blockquote>
|
||||
<p><strong>integer(8) n_particles</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of particles used per generation.</div></blockquote>
|
||||
<p><strong>integer(4) n_batches</strong></p>
|
||||
<blockquote>
|
||||
<div>Total number of batches (active + inactive).</div></blockquote>
|
||||
<p><strong>integer(4) current_batch</strong></p>
|
||||
<blockquote>
|
||||
<div>The number of batches already simulated.</div></blockquote>
|
||||
<p>if (run_mode == MODE_CRITICALITY)</p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) n_inactive</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of inactive batches</div></blockquote>
|
||||
<p><strong>integer(4) gen_per_batch</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of generations per batch for criticality calculations</div></blockquote>
|
||||
<p><em>do i = 1, current_batch</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) k_batch(i)</strong></p>
|
||||
<blockquote>
|
||||
<div>k-effective for the i-th batch</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><em>do i = 1, current_batch</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) entropy(i)</strong></p>
|
||||
<blockquote>
|
||||
<div>Shannon entropy for the i-th batch</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) N_GLOBAL_TALLIES</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of global tally scores</div></blockquote>
|
||||
<p><em>do i = 1, N_GLOBAL_TALLIES</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) global_tallies(i) % sum</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum for the i-th global tally</div></blockquote>
|
||||
<p><strong>real(8) global_tallies(i) % sum_sq</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum of squares for the i-th global tally</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) n_meshes</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of meshes in tallies.xml file</div></blockquote>
|
||||
<p><em>do i = 1, n_meshes</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) meshes(i) % type</strong></p>
|
||||
<blockquote>
|
||||
<div>Type of mesh.</div></blockquote>
|
||||
<p><strong>integer(4) meshes(i) % n_dimension</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of dimensions for mesh (2 or 3).</div></blockquote>
|
||||
<p><strong>integer(4) meshes(i) % dimension(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of mesh cells in each dimension.</div></blockquote>
|
||||
<p><strong>real(8) meshes(i) % lower_left(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Coordinates of lower-left corner of mesh.</div></blockquote>
|
||||
<p><strong>real(8) meshes(i) % upper_right(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Coordinates of upper-right corner of mesh.</div></blockquote>
|
||||
<p><strong>real(8) meshes(i) % width(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Width of each mesh cell in each dimension.</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) n_tallies</strong></p>
|
||||
<p><em>do i = 1, n_tallies</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) size(tallies(i) % scores, 1)</strong></p>
|
||||
<blockquote>
|
||||
<div>Total number of score bins for the i-th tally</div></blockquote>
|
||||
<p><strong>integer(4) size(tallies(i) % scores, 2)</strong></p>
|
||||
<blockquote>
|
||||
<div>Total number of filter bins for the i-th tally</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % n_filters</strong></p>
|
||||
<p><em>do j = 1, tallies(i) % n_filters</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) tallies(i) % filter(j) % type</strong></p>
|
||||
<blockquote>
|
||||
<div>Type of tally filter.</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % filter(j) % n_bins</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of bins for filter.</div></blockquote>
|
||||
<p><strong>integer(4)/real(8) tallies(i) % filter(j) % bins(:)</strong></p>
|
||||
<blockquote>
|
||||
<div>Value for each filter bin of this type.</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % n_nuclide_bins</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of nuclide bins. If none are specified, this is just one.</div></blockquote>
|
||||
<p><em>do j = 1, tallies(i) % n_nuclide_bins</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) tallies(i) % nuclide_bins(j)</strong></p>
|
||||
<blockquote>
|
||||
<div>Values of specified nuclide bins</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) tallies(i) % n_score_bins</strong></p>
|
||||
<blockquote>
|
||||
<div>Number of scoring bins.</div></blockquote>
|
||||
<p><em>do j = 1, tallies(i) % n_score_bins</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>integer(4) tallies(i) % score_bins(j)</strong></p>
|
||||
<blockquote>
|
||||
<div>Values of specified scoring bins (e.g. SCORE_FLUX).</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) tallies_on</strong></p>
|
||||
<blockquote>
|
||||
<div>Flag indicated if tallies are present in the file.</div></blockquote>
|
||||
<p>if (tallies_on > 0)</p>
|
||||
<blockquote>
|
||||
<div><p><em>do i = 1, n_tallies</em></p>
|
||||
<blockquote>
|
||||
<div><p><em>do k = 1, size(tallies(i) % scores, 2)</em></p>
|
||||
<blockquote>
|
||||
<div><p><em>do j = 1, size(tallies(i) % scores, 1)</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) tallies(i) % scores(j,k) % sum</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum for the j-th score and k-th filter of the
|
||||
i-th tally</div></blockquote>
|
||||
<p><strong>real(8) tallies(i) % scores(j,k) % sum_sq</strong></p>
|
||||
<blockquote>
|
||||
<div>Accumulated sum of squares for the j-th score and k-th
|
||||
filter of the i-th tally</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p>if (run_mode == MODE_CRITICALITY)</p>
|
||||
<blockquote>
|
||||
<div><p><em>do i = 1, n_particles</em></p>
|
||||
<blockquote>
|
||||
<div><p><strong>real(8) source_bank(i) % wgt</strong></p>
|
||||
<blockquote>
|
||||
<div>Weight of the i-th source particle</div></blockquote>
|
||||
<p><strong>real(8) source_bank(i) % xyz(1:3)</strong></p>
|
||||
<blockquote>
|
||||
<div>Coordinates of the i-th source particle.</div></blockquote>
|
||||
<p><strong>real(8) source_bank(i) % uvw(1:3)</strong></p>
|
||||
<blockquote>
|
||||
<div>Direction of the i-th source particle</div></blockquote>
|
||||
<p><strong>real(8) source_bank(i) % E</strong></p>
|
||||
<blockquote>
|
||||
<div>Energy of the i-th source particle.</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="revision-2">
|
||||
<h2>3.1. Revision 2<a class="headerlink" href="#revision-2" title="Permalink to this headline">¶</a></h2>
|
||||
<h2>5.4. Revision 2<a class="headerlink" href="#revision-2" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>integer(4) REVISION_STATEPOINT</strong></p>
|
||||
<blockquote>
|
||||
<div>Revision of the binary state point file. Any time a change is made in the
|
||||
|
|
@ -94,7 +622,10 @@ format of the state-point file, this integer is incremented.</div></blockquote>
|
|||
<div>k-effective for the i-th batch</div></blockquote>
|
||||
<p>if (entropy_on)</p>
|
||||
<blockquote>
|
||||
<div><strong>real(8) entropy for the i-th batch</strong></div></blockquote>
|
||||
<div><p><strong>real(8) entropy(i)</strong></p>
|
||||
<blockquote>
|
||||
<div>Shannon entropy for the i-th batch</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) N_GLOBAL_TALLIES</strong></p>
|
||||
<blockquote>
|
||||
|
|
@ -140,7 +671,7 @@ the i-th tally</div></blockquote>
|
|||
</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="revision-1">
|
||||
<h2>3.2. Revision 1<a class="headerlink" href="#revision-1" title="Permalink to this headline">¶</a></h2>
|
||||
<h2>5.5. Revision 1<a class="headerlink" href="#revision-1" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>integer(4) REVISION_STATEPOINT</strong></p>
|
||||
<blockquote>
|
||||
<div>Revision of the binary state point file. Any time a change is made in the
|
||||
|
|
@ -179,7 +710,10 @@ format of the state-point file, this integer is incremented.</div></blockquote>
|
|||
<div>k-effective for the i-th batch</div></blockquote>
|
||||
<p>if (entropy_on)</p>
|
||||
<blockquote>
|
||||
<div><strong>real(8) entropy for the i-th batch</strong></div></blockquote>
|
||||
<div><p><strong>real(8) entropy(i)</strong></p>
|
||||
<blockquote>
|
||||
<div>Shannon entropy for the i-th batch</div></blockquote>
|
||||
</div></blockquote>
|
||||
</div></blockquote>
|
||||
<p><strong>integer(4) N_GLOBAL_TALLIES</strong></p>
|
||||
<blockquote>
|
||||
|
|
@ -234,7 +768,7 @@ the i-th tally</div></blockquote>
|
|||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="xml-fortran.html">2. xml-fortran Input Parsing</a>
|
||||
«  <a href="xml-fortran.html">4. xml-fortran Input Parsing</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<script type="text/javascript" src="../_static/theme_extras.js"></script>
|
||||
<link rel="top" title="OpenMC Documentation" href="../index.html" />
|
||||
<link rel="up" title="Developer’s Guide" href="index.html" />
|
||||
<link rel="next" title="2. xml-fortran Input Parsing" href="xml-fortran.html" />
|
||||
<link rel="next" title="2. Style Guide for OpenMC" href="styleguide.html" />
|
||||
<link rel="prev" title="Developer’s Guide" href="index.html" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="xml-fortran.html">2. xml-fortran Input Parsing</a>  »
|
||||
<a href="styleguide.html">2. Style Guide for OpenMC</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
|
@ -54,6 +54,69 @@
|
|||
|
||||
<div class="section" id="data-structures">
|
||||
<span id="devguide-structures"></span><h1>1. Data Structures<a class="headerlink" href="#data-structures" title="Permalink to this headline">¶</a></h1>
|
||||
<p>The purpose of this section is to give you an overview of the major data
|
||||
structures in OpenMC and how they are logically related. A majority of variables
|
||||
in OpenMC are <a class="reference external" href="http://nf.nci.org.au/training/FortranAdvanced/slides/slides.025.html">derived types</a> (similar to a struct in C). These derived types
|
||||
are defined in the various header modules, e.g. src/geometry_header.F90. Most
|
||||
important variables are found in the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/global.F90">global module</a>. Have a look through that
|
||||
module to get a feel for what variables you’ll often come across when looking at
|
||||
OpenMC code.</p>
|
||||
<div class="section" id="particle">
|
||||
<h2>1.1. Particle<a class="headerlink" href="#particle" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Perhaps the variable that you will see most often is simply called <tt class="docutils literal"><span class="pre">p</span></tt> and is
|
||||
of type(Particle). This variable stores information about a particle’s physical
|
||||
characteristics (coordinates, direction, energy), what cell and material it’s
|
||||
currently in, how many collisions it has undergone, etc. In practice, only one
|
||||
particle is followed at a time so there is no array of type(Particle). The
|
||||
Particle type is defined in the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/particle_header.F90">particle_header module</a>.</p>
|
||||
<p>You will notice that the direction and angle of the particle is stored in a
|
||||
linked list of type(LocalCoord). In geometries with multiple <a class="reference internal" href="../methods/geometry.html#universes"><em>Universes</em></a>,
|
||||
the coordinates in each universe are stored in this linked list. If universes or
|
||||
lattices are not used in a geometry, only one LocalCoord is present in the
|
||||
linked list.</p>
|
||||
<p>The LocalCoord type has a component called cell which gives the index in the
|
||||
<tt class="docutils literal"><span class="pre">cells</span></tt> array in the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/global.F90">global module</a>. The <tt class="docutils literal"><span class="pre">cells</span></tt> array is of type(Cell)
|
||||
and stored information about each region defined by the user.</p>
|
||||
</div>
|
||||
<div class="section" id="cell">
|
||||
<h2>1.2. Cell<a class="headerlink" href="#cell" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The Cell type is defined in the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/geometry_header.F90">geometry_header module</a> along with other
|
||||
geometry-related derived types. Each cell in the problem is described in terms
|
||||
of its bounding surfaces, which are listed on the <tt class="docutils literal"><span class="pre">surfaces</span></tt> component. The
|
||||
absolute value of each item in the <tt class="docutils literal"><span class="pre">surfaces</span></tt> component contains the index of
|
||||
the corresponding surface in the <tt class="docutils literal"><span class="pre">surfaces</span></tt> array defined in the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/global.F90">global
|
||||
module</a>. The sign on each item in the <tt class="docutils literal"><span class="pre">surfaces</span></tt> component indicates whether
|
||||
the cell exists on the positive or negative side of the surface (see
|
||||
<a class="reference internal" href="../methods/geometry.html#methods-geometry"><em>Geometry</em></a>).</p>
|
||||
<p>Each cell can either be filled with another universe/lattice or with a
|
||||
material. If it is filled with a material, the <tt class="docutils literal"><span class="pre">material</span></tt> component gives the
|
||||
index of the material in the <tt class="docutils literal"><span class="pre">materials</span></tt> array defined in the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/global.F90">global
|
||||
module</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="surface">
|
||||
<h2>1.3. Surface<a class="headerlink" href="#surface" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The Surface type is defined in the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/geometry_header.F90">geometry_header module</a>. A surface is
|
||||
defined by a type (sphere, cylinder, etc.) and a list of coefficients for that
|
||||
surface type. The simplest example would be a plane perpendicular to the xy, yz,
|
||||
or xz plane which needs only one parameter. The <tt class="docutils literal"><span class="pre">type</span></tt> component indicates the
|
||||
type through integer parameters such as SURF_SPHERE or SURF_CYL_Y (these are
|
||||
defined in the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/constants.F90">constants module</a>). The <tt class="docutils literal"><span class="pre">coeffs</span></tt> component gives the
|
||||
necessary coefficients to parameterize the surface type (see
|
||||
<a class="reference internal" href="../usersguide/input.html#surface-element"><em><surface> Element</em></a>).</p>
|
||||
</div>
|
||||
<div class="section" id="material">
|
||||
<h2>1.4. Material<a class="headerlink" href="#material" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The Material type is defined in the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/material_header.F90">material_header module</a>. Each material
|
||||
contains a number of nuclides at a given atom density. Each item in the
|
||||
<tt class="docutils literal"><span class="pre">nuclide</span></tt> component corresponds to the index in the global <tt class="docutils literal"><span class="pre">nuclides</span></tt> array
|
||||
(as usual, found in the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/global.F90">global module</a>). The <tt class="docutils literal"><span class="pre">atom_density</span></tt> component is the
|
||||
same length as the <tt class="docutils literal"><span class="pre">nuclides</span></tt> component and lists the corresponding atom
|
||||
density in atom/barn-cm for each nuclide in the <tt class="docutils literal"><span class="pre">nuclides</span></tt> component.</p>
|
||||
<p>If the material contains nuclides for which binding effects are important in
|
||||
low-energy scattering, a <img class="math" src="../_images/math/610a7fba4c1d89de40e26ba8f6c2915102b17eae.png" alt="S(\alpha,\beta)"/> can be associated with that
|
||||
material through the <tt class="docutils literal"><span class="pre">sab_table</span></tt> component. Again, this component contains the
|
||||
index in the <tt class="docutils literal"><span class="pre">sab_tables</span></tt> array from the <a class="reference external" href="https://github.com/mit-crpg/openmc/blob/master/src/global.F90">global module</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -65,7 +128,7 @@
|
|||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="xml-fortran.html">2. xml-fortran Input Parsing</a>  »
|
||||
<a href="styleguide.html">2. Style Guide for OpenMC</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
195
devguide/styleguide.html
Normal file
195
devguide/styleguide.html
Normal file
|
|
@ -0,0 +1,195 @@
|
|||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>2. Style Guide for OpenMC — OpenMC Documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/print.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
VERSION: '0.4.4',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="../_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="../_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="../_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="../_static/theme_extras.js"></script>
|
||||
<link rel="top" title="OpenMC Documentation" href="../index.html" />
|
||||
<link rel="up" title="Developer’s Guide" href="index.html" />
|
||||
<link rel="next" title="3. Development Workflow" href="workflow.html" />
|
||||
<link rel="prev" title="1. Data Structures" href="structures.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a href="../index.html">
|
||||
<img class="logo" src="../_static/openmc.png" alt="Logo"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="structures.html">1. Data Structures</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="workflow.html">3. Development Workflow</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="style-guide-for-openmc">
|
||||
<span id="devguide-styleguide"></span><h1>2. Style Guide for OpenMC<a class="headerlink" href="#style-guide-for-openmc" title="Permalink to this headline">¶</a></h1>
|
||||
<p>In order to keep the OpenMC code base consistent in style, this guide specifies
|
||||
a number of rules which should be adhered to when modified existing code or
|
||||
adding new code in OpenMC.</p>
|
||||
<div class="section" id="general-rules">
|
||||
<h2>2.1. General Rules<a class="headerlink" href="#general-rules" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Conform to the Fortran 2008 standard.</p>
|
||||
<p>Make sure code can be compiled with most common compilers, especially gfortran
|
||||
and the Intel Fortran compiler. This supercedes the previous rule — if a
|
||||
Fortran 2003/2008 feature is not implemented in a common compiler, do not use
|
||||
it.</p>
|
||||
<p>Do not use special extensions that can be only be used from certain compilers.</p>
|
||||
<p>In general, write your code in lower-case. Having code in all caps does not
|
||||
enhance code readability or otherwise.</p>
|
||||
<p>Always include comments to describe what your code is doing. Do not be afraid of
|
||||
using copious amounts of comments.</p>
|
||||
<p>Use <, >, <=, >=, ==, and /= rather than .lt., .gt., .le., .ge., .eq., and .ne.</p>
|
||||
<p>Try to keep code within 80 columns when possible.</p>
|
||||
<p>Don’t use <tt class="docutils literal"><span class="pre">print</span> <span class="pre">*</span></tt> or <tt class="docutils literal"><span class="pre">write(*,*)</span></tt>. If writing to a file, use a specific
|
||||
unit. Writing to standard output or standard error should be handled by the
|
||||
<tt class="docutils literal"><span class="pre">write_message</span></tt> subroutine or functionality in the error module.</p>
|
||||
</div>
|
||||
<div class="section" id="subroutines-and-functions">
|
||||
<h2>2.2. Subroutines and Functions<a class="headerlink" href="#subroutines-and-functions" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Above each subroutine/function, include a comment block giving a brief
|
||||
description of what the subroutine or function does.</p>
|
||||
<p>Arguments to subroutines/functions should be explicitly specified as intent(in),
|
||||
intent(out), or intent(inout).</p>
|
||||
<p>Include a comment describing what each argument to a subroutine/function is.</p>
|
||||
</div>
|
||||
<div class="section" id="variables">
|
||||
<h2>2.3. Variables<a class="headerlink" href="#variables" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Never, under any circumstances, should implicit variables be used! Always
|
||||
include <tt class="docutils literal"><span class="pre">implicit</span> <span class="pre">none</span></tt> and define all your variables.</p>
|
||||
<p>Variable names should be all lower-case and descriptive, i.e. not a random
|
||||
assortment of letters that doesn’t give any information to someone seeing it for
|
||||
the first time. Variables consisting of multiple words should be separated by
|
||||
underscores, not hyphens or in camel case.</p>
|
||||
<p>Constant (parameter) variables should be in ALL CAPITAL LETTERS and defined in
|
||||
in the constants.F90 module.</p>
|
||||
<p>32-bit reals (real(4)) should never be used. Always use 64-bit reals (real(8)).</p>
|
||||
<p>For arbitrary length character variables, use the pre-defined lengths
|
||||
MAX_LINE_LEN, MAX_WORD_LEN, and MAX_FILE_LEN if possible.</p>
|
||||
<p>Do not use old-style character/array length (e.g. character*80, real*8).</p>
|
||||
<p>Integer values being used to indicate a certain state should be defined as named
|
||||
constants (see the constants.F90 module for many examples).</p>
|
||||
<p>Yes:</p>
|
||||
<div class="highlight-fortran"><div class="highlight"><pre><span class="k">if</span> <span class="p">(</span><span class="nv">boundary_condition</span> <span class="o">==</span> <span class="nv">BC_VACUUM</span><span class="p">)</span> <span class="k">then</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>No:</p>
|
||||
<div class="highlight-fortran"><div class="highlight"><pre><span class="k">if</span> <span class="p">(</span><span class="nv">boundary_condition</span> <span class="o">==</span> <span class="o">-</span><span class="mi">10</span><span class="p">)</span> <span class="k">then</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Avoid creating arrays with a pre-defined maximum length. Use dynamic memory
|
||||
allocation instead. Use allocatable variables instead of pointer variables when
|
||||
possible.</p>
|
||||
<div class="section" id="shared-module-variables">
|
||||
<h3>2.3.1. Shared/Module Variables<a class="headerlink" href="#shared-module-variables" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Always put shared variables in modules. Access module variables through a
|
||||
<tt class="docutils literal"><span class="pre">use</span></tt> statement. Always use the <tt class="docutils literal"><span class="pre">only</span></tt> specifier on the <tt class="docutils literal"><span class="pre">use</span></tt> statement
|
||||
except for variables from the global, constants, and various header modules.</p>
|
||||
<p>Never use <tt class="docutils literal"><span class="pre">equivalence</span></tt> statements, <tt class="docutils literal"><span class="pre">common</span></tt> blocks, or <tt class="docutils literal"><span class="pre">data</span></tt> statements.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="derived-types-and-classes">
|
||||
<h2>2.4. Derived Types and Classes<a class="headerlink" href="#derived-types-and-classes" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Derived types and classes should have CamelCase names with words not separated
|
||||
by underscores or hyphens.</p>
|
||||
</div>
|
||||
<div class="section" id="indentation">
|
||||
<h2>2.5. Indentation<a class="headerlink" href="#indentation" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Never use tab characters. Indentation should always be applied using
|
||||
spaces. Emacs users should include the following line in their .emacs file:</p>
|
||||
<div class="highlight-common-lisp"><div class="highlight"><pre><span class="p">(</span><span class="nv">setq-default</span> <span class="nv">indent-tabs-mode</span> <span class="no">nil</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>vim users should include the following line in their .vimrc file:</p>
|
||||
<div class="highlight-python"><pre>set expandtab</pre>
|
||||
</div>
|
||||
<p>Use 2 spaces per indentation level. This applies to all constructs such as
|
||||
program, subroutine, function, if, associate, etc. Emacs users should set the
|
||||
variables f90-if-indent, f90-do-indent, f90-continuation-indent,
|
||||
f90-type-indent, f90-associate-indent, and f90-program indent to 2.</p>
|
||||
<p>Continuation lines should be indented by an extra 5 spaces. This is the default
|
||||
value of f90-continuation-indent in Emacs.</p>
|
||||
</div>
|
||||
<div class="section" id="whitespace-in-expressions">
|
||||
<h2>2.6. Whitespace in Expressions<a class="headerlink" href="#whitespace-in-expressions" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Avoid extraneous whitespace in the following situations:</p>
|
||||
<ul>
|
||||
<li><p class="first">In subroutine/function calls:</p>
|
||||
<div class="highlight-python"><pre>Yes: call somesub(x, y(2), z)
|
||||
No: call somesub( x, y( 2 ), z )</pre>
|
||||
</div>
|
||||
</li>
|
||||
<li><p class="first">In logical expressions, use one space around operators but nowhere else:</p>
|
||||
<div class="highlight-python"><pre>Yes: if (variable == 2) then
|
||||
No: if ( variable==2 ) then</pre>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="structures.html">1. Data Structures</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="workflow.html">3. Development Workflow</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2011-2012, Massachusetts Institute of Technology.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-30411614-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
122
devguide/workflow.html
Normal file
122
devguide/workflow.html
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>3. Development Workflow — OpenMC Documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/print.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
VERSION: '0.4.4',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="../_static/jquery.js"></script>
|
||||
<script type="text/javascript" src="../_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="../_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="../_static/theme_extras.js"></script>
|
||||
<link rel="top" title="OpenMC Documentation" href="../index.html" />
|
||||
<link rel="up" title="Developer’s Guide" href="index.html" />
|
||||
<link rel="next" title="4. xml-fortran Input Parsing" href="xml-fortran.html" />
|
||||
<link rel="prev" title="2. Style Guide for OpenMC" href="styleguide.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<a href="../index.html">
|
||||
<img class="logo" src="../_static/openmc.png" alt="Logo"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="styleguide.html">2. Style Guide for OpenMC</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="xml-fortran.html">4. xml-fortran Input Parsing</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
|
||||
<div class="section" id="development-workflow">
|
||||
<span id="devguide-workflow"></span><h1>3. Development Workflow<a class="headerlink" href="#development-workflow" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Anyone wishing to make contributions to OpenMC should be fully acquianted and
|
||||
comfortable working with <a class="reference external" href="http://git-scm.com/">git</a> and <a class="reference external" href="https://github.com/">GitHub</a>. The primary means of modifying and
|
||||
making contributions to OpenMC is through GitHub <a class="reference external" href="https://help.github.com/articles/using-pull-requests">pull requests</a>. This is
|
||||
what’s known as a fork and pull development model. The steps for this are as
|
||||
follows:</p>
|
||||
<p>1. Fork the main openmc repository from <a class="reference external" href="https://github.com/mit-crpg/openmc">mit-crpg/openmc</a>. This will create a
|
||||
repository with the same name under your personal account. As such, you can
|
||||
commit to it as you please without disrupting other developers.</p>
|
||||
<p>2. Create a branch that you want merged back to <a class="reference external" href="https://github.com/mit-crpg/openmc">mit-crpg/openmc</a> and make
|
||||
commits that you intend to go back. If you have made other changes that should
|
||||
not be merged back, those changes should be on another branch.</p>
|
||||
<ol class="arabic simple" start="3">
|
||||
<li>Issue a pull request from GitHub and select the branch you want merged.</li>
|
||||
</ol>
|
||||
<p>4. The OpenMC integration manager will review your pull request and make sure it
|
||||
conforms to the <a class="reference internal" href="styleguide.html#devguide-styleguide"><em>Style Guide for OpenMC</em></a>, compiles correctly, runs in parallel
|
||||
correctly, does not break other features in the code, etc. Any issues with the
|
||||
pull request can be discussed directly on the pull request page itself.</p>
|
||||
<p>5. After the pull request has been thoroughly vetted, it is merged back into
|
||||
<a class="reference external" href="https://github.com/mit-crpg/openmc">mit-crpg/openmc</a>.</p>
|
||||
<p>While the process above depends on the fork of the OpenMC repository being
|
||||
publicly available on GitHub, you may also wish to do development on a private
|
||||
repository for research or commercial purposes. The proper way to do this is to
|
||||
create a complete copy of the OpenMC repository (not a fork from GitHub). The
|
||||
private repository can then either be stored just locally or in conjunction with
|
||||
a private repository on Github (this requires a <a class="reference external" href="https://github.com/plans">paid plan</a>). If you want to
|
||||
merge some changes you’ve made in your private repository back to
|
||||
<a class="reference external" href="https://github.com/mit-crpg/openmc">mit-crpg/openmc</a> repository, simply follow the steps above with an extra step
|
||||
of pulling a branch from your private repository into your public fork.</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="styleguide.html">2. Style Guide for OpenMC</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="xml-fortran.html">4. xml-fortran Input Parsing</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="footer">
|
||||
© Copyright 2011-2012, Massachusetts Institute of Technology.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-30411614-1']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>2. xml-fortran Input Parsing — OpenMC Documentation</title>
|
||||
<title>4. xml-fortran Input Parsing — OpenMC Documentation</title>
|
||||
|
||||
<link rel="stylesheet" href="../_static/haiku.css" type="text/css" />
|
||||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||||
|
|
@ -29,8 +29,8 @@
|
|||
<script type="text/javascript" src="../_static/theme_extras.js"></script>
|
||||
<link rel="top" title="OpenMC Documentation" href="../index.html" />
|
||||
<link rel="up" title="Developer’s Guide" href="index.html" />
|
||||
<link rel="next" title="3. State Point Binary File Specifications" href="statepoint.html" />
|
||||
<link rel="prev" title="1. Data Structures" href="structures.html" />
|
||||
<link rel="next" title="5. State Point Binary File Specifications" href="statepoint.html" />
|
||||
<link rel="prev" title="3. Development Workflow" href="workflow.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
|
|
@ -41,11 +41,11 @@
|
|||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="structures.html">1. Data Structures</a>
|
||||
«  <a href="workflow.html">3. Development Workflow</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="statepoint.html">3. State Point Binary File Specifications</a>  »
|
||||
<a href="statepoint.html">5. State Point Binary File Specifications</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
|
@ -53,7 +53,31 @@
|
|||
|
||||
|
||||
<div class="section" id="xml-fortran-input-parsing">
|
||||
<span id="devguide-xml-fortran"></span><h1>2. xml-fortran Input Parsing<a class="headerlink" href="#xml-fortran-input-parsing" title="Permalink to this headline">¶</a></h1>
|
||||
<span id="devguide-xml-fortran"></span><h1>4. xml-fortran Input Parsing<a class="headerlink" href="#xml-fortran-input-parsing" title="Permalink to this headline">¶</a></h1>
|
||||
<p>OpenMC relies on the xml-fortran package for reading and intrepreting the XML
|
||||
input files for geometry, materials, settings, tallies, etc. The use of an XML
|
||||
format makes writing input files considerably more flexible than would otherwise
|
||||
be possible.</p>
|
||||
<p>With the xml-fortran package, extending the user input files to include new tags
|
||||
is fairly straightforward. A “template” file exists for each diferent type of
|
||||
input file that tells xml-fortran what to expect in a file. These template files
|
||||
can be found in the src/templates directory. The steps for modifying/adding
|
||||
input are as follows:</p>
|
||||
<p>1. Add a <tt class="docutils literal"><span class="pre"><variable>`</span></tt> tag to the desired template file,
|
||||
e.g. src/templates/geometry_t.xml. See the <a class="reference external" href="http://xml-fortran.sourceforge.net/documentation.html">xml-fortran documentation</a> for a
|
||||
description of the acceptable fields.</p>
|
||||
<p>2. In the input_xml module, any input given in your new tag will be read
|
||||
automatically through a call to, e.g. read_xml_file_geometry_t. Whatever
|
||||
variable name you specified should have the data available.</p>
|
||||
<p>3. Add code in the appropriate subroutine to check the variable for any possible
|
||||
errors.</p>
|
||||
<p>4. Add a variable in OpenMC to copy the temporary variable into if there are no
|
||||
errors.</p>
|
||||
<p>A set of <a class="reference external" href="http://relaxng.org/">RELAX NG</a> schemata exists that enables real-time validation of input
|
||||
files when using the GNU Emacs text editor. You should also modify the RELAX NG
|
||||
schema for the template you changed (e.g. src/templates/geometry.rnc) so that
|
||||
those who use Emacs can confirm whether their input is valid before they
|
||||
run. You will need to be familiar with RELAX NG <a class="reference external" href="http://relaxng.org/compact-tutorial-20030326.html">compact syntax</a>.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -61,11 +85,11 @@
|
|||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="structures.html">1. Data Structures</a>
|
||||
«  <a href="workflow.html">3. Development Workflow</a>
|
||||
  ::  
|
||||
<a class="uplink" href="../index.html">Contents</a>
|
||||
  ::  
|
||||
<a href="statepoint.html">3. State Point Binary File Specifications</a>  »
|
||||
<a href="statepoint.html">5. State Point Binary File Specifications</a>  »
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ material, known as “cells”.</p>
|
|||
</div><p>can be modeled in OpenMC. For example, the equation for a sphere centered at
|
||||
<img class="math" src="../_images/math/044ccf810d8b9fed4efe9df70dc0e70667c10381.png" alt="(\bar{x},\bar{y},\bar{z})"/> and of radius <img class="math" src="../_images/math/eff43e84f8a3bcf7b6965f0a3248bc4d3a9d0cd4.png" alt="R"/> can be written as</p>
|
||||
<div class="section" id="universes">
|
||||
<h3>4.1.1. Universes<a class="headerlink" href="#universes" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="id1"></span><h3>4.1.1. Universes<a class="headerlink" href="#universes" title="Permalink to this headline">¶</a></h3>
|
||||
<p>OpenMC supports universe-based geometry similar to the likes of <a class="reference external" href="http://mcnp.lanl.gov">MCNP</a> and
|
||||
<a class="reference external" href="http://montecarlo.vtt.fi">Serpent</a>. This capability enables user to model any identical repeated
|
||||
structures once and then fill them in various spots in the geometry. A
|
||||
|
|
@ -391,8 +391,8 @@ w' = w - \frac{2 ( \mathbf{\Omega} \cdot \nabla f )}{|| \nabla f ||^2}
|
|||
\frac{\partial f}{\partial z}"/></p>
|
||||
</div><p>We can now use this form to develop rules for how to transform a particle’s
|
||||
direction for different types of surfaces.</p>
|
||||
<div class="section" id="id1">
|
||||
<h3>4.7.1. Plane Perpendicular to an Axis<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="section" id="id2">
|
||||
<h3>4.7.1. Plane Perpendicular to an Axis<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
|
||||
<p>For a plane that is perpendicular to an axis, the rule for reflection is almost
|
||||
so simple that no derivation is needed at all. Nevertheless, we will proceed
|
||||
with the derivation to confirm that the rules of geometry agree with our
|
||||
|
|
@ -406,8 +406,8 @@ the first tell us that</p>
|
|||
</div><p>We see that reflection for a plane perpendicular to an axis only entails
|
||||
negating the directional cosine for that axis.</p>
|
||||
</div>
|
||||
<div class="section" id="id2">
|
||||
<h3>4.7.2. Generic Plane<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="section" id="id3">
|
||||
<h3>4.7.2. Generic Plane<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
|
||||
<p>A generic plane has the form <img class="math" src="../_images/math/320357accceeb2f8fc933f629b9af3ab513e9468.png" alt="f(x,y,z) = Ax + By + Cz - D = 0"/>. Thus, the
|
||||
gradient to the surface is simply <img class="math" src="../_images/math/6e5e48810a5cf01884bc6dd93293920d02fa3a4e.png" alt="\nabla f = (A,B,C)"/> whose norm squared
|
||||
is <img class="math" src="../_images/math/b8314fe89d6a6080868132447c26fdf3a41466f2.png" alt="A^2 + B^2 + C^2"/>. This implies that</p>
|
||||
|
|
@ -420,8 +420,8 @@ x-component of the reflected direction will be</p>
|
|||
<div class="math" id="equation-reflection-plane">
|
||||
<p><span class="eqno">(21)</span><img src="../_images/math/823b09cef32bbcf3b6d605a8574ae69bddc480e6.png" alt="u' = u - \frac{2A(Au + Bv + Cw)}{A^2 + B^2 + C^2}"/></p>
|
||||
</div></div>
|
||||
<div class="section" id="id3">
|
||||
<h3>4.7.3. Cylinder Parallel to an Axis<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="section" id="id4">
|
||||
<h3>4.7.3. Cylinder Parallel to an Axis<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
|
||||
<p>A cylinder parallel to, for example, the x-axis has the form <img class="math" src="../_images/math/b815ff99327142275d747ade16d9c36e05d84274.png" alt="f(x,y,z) =
|
||||
(y - y_0)^2 + (z - z_0)^2 - R^2 = 0"/>. Thus, the gradient to the surface is</p>
|
||||
<div class="math" id="equation-reflection-cylinder-grad">
|
||||
|
|
@ -445,8 +445,8 @@ and z-components of the reflected direction will be</p>
|
|||
|
||||
w' = w - \frac{2 ( \bar{y}v + \bar{z}w ) \bar{z}}{R^2}"/></p>
|
||||
</div></div>
|
||||
<div class="section" id="id4">
|
||||
<h3>4.7.4. Sphere<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
|
||||
<div class="section" id="id5">
|
||||
<h3>4.7.4. Sphere<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The surface equation for a sphere has the form <img class="math" src="../_images/math/565a202d4c73fb023d968d521bf6059d65f51b74.png" alt="f(x,y,z) = (x - x_0)^2 +
|
||||
(y - y_0)^2 + (z - z_0)^2 - R^2 = 0"/>. Thus, the gradient to the surface is</p>
|
||||
<div class="math" id="equation-reflection-sphere-grad">
|
||||
|
|
|
|||
|
|
@ -99,10 +99,10 @@
|
|||
<li class="toctree-l2"><a class="reference internal" href="geometry.html#handling-surface-crossings">4.5. Handling Surface Crossings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="geometry.html#building-neighbor-lists">4.6. Building Neighbor Lists</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="geometry.html#reflective-boundary-conditions">4.7. Reflective Boundary Conditions</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="geometry.html#id1">4.7.1. Plane Perpendicular to an Axis</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="geometry.html#id2">4.7.2. Generic Plane</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="geometry.html#id3">4.7.3. Cylinder Parallel to an Axis</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="geometry.html#id4">4.7.4. Sphere</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="geometry.html#id2">4.7.1. Plane Perpendicular to an Axis</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="geometry.html#id3">4.7.2. Generic Plane</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="geometry.html#id4">4.7.3. Cylinder Parallel to an Axis</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="geometry.html#id5">4.7.4. Sphere</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
|
|
@ -29,7 +29,7 @@
|
|||
<script type="text/javascript" src="_static/theme_extras.js"></script>
|
||||
<link rel="top" title="OpenMC Documentation" href="index.html" />
|
||||
<link rel="next" title="License Agreement" href="license.html" />
|
||||
<link rel="prev" title="3. State Point Binary File Specifications" href="devguide/statepoint.html" />
|
||||
<link rel="prev" title="5. State Point Binary File Specifications" href="devguide/statepoint.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
<div class="topnav">
|
||||
|
||||
<p>
|
||||
«  <a href="devguide/statepoint.html">3. State Point Binary File Specifications</a>
|
||||
«  <a href="devguide/statepoint.html">5. State Point Binary File Specifications</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
|
|
@ -55,17 +55,18 @@
|
|||
<span id="id1"></span><h1>Publications<a class="headerlink" href="#publications" title="Permalink to this headline">¶</a></h1>
|
||||
<ul class="simple">
|
||||
<li>Paul K. Romano and Benoit Forget, “Reducing Parallel Communication in Monte
|
||||
Carlo Simulations via Batch Statistics,” <em>Trans. Am. Nucl. Soc.</em>, Accepted
|
||||
(2012).</li>
|
||||
Carlo Simulations via Batch Statistics,” <em>Trans. Am. Nucl. Soc.</em>, <strong>107</strong>,
|
||||
xxx–xxx (2012).</li>
|
||||
<li>Paul K. Romano and Benoit Forget, “The OpenMC Monte Carlo Particle Transport
|
||||
Code,” <em>Annals of Nuclear Energy</em>, Accepted (2012).</li>
|
||||
Code,” <em>Ann. Nucl. Energy</em>, <strong>51</strong>, 274–281
|
||||
(2012). <a class="reference external" href="http://dx.doi.org/10.1016/j.anucene.2012.06.040">http://dx.doi.org/10.1016/j.anucene.2012.06.040</a></li>
|
||||
<li>Andrew R. Siegel, Kord Smith, Paul K. Romano, Benoit Forget, and Kyle Felker,
|
||||
“The effect of load imbalances on the performance of Monte Carlo codes in LWR
|
||||
analysis”, <em>Journal of Computational Physics</em>,
|
||||
analysis”, <em>J. Comput. Phys.</em>,
|
||||
<a class="reference external" href="http://dx.doi.org/10.1016/j.jcp.2012.06.012">http://dx.doi.org/10.1016/j.jcp.2012.06.012</a> (2012).</li>
|
||||
<li>Paul K. Romano and Benoit Forget, “Parallel Fission Bank Algorithms in Monte
|
||||
Carlo Criticality Calculations,” <em>Nuclear Science and Engineering</em>, <strong>170</strong>,
|
||||
pp. 125–135 (2012). [<a class="reference external" href="http://web.mit.edu/romano7/www/nse_v170_n2_pp125-135.pdf">PDF</a>]</li>
|
||||
Carlo Criticality Calculations,” <em>Nucl. Sci. Eng.</em>, <strong>170</strong>, 125–135
|
||||
(2012). <a class="reference external" href="http://hdl.handle.net/1721.1/73569">http://hdl.handle.net/1721.1/73569</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
@ -74,7 +75,7 @@ pp. 125–135 (2012). [<a class="reference external" href="http://web.mit.ed
|
|||
<div class="bottomnav">
|
||||
|
||||
<p>
|
||||
«  <a href="devguide/statepoint.html">3. State Point Binary File Specifications</a>
|
||||
«  <a href="devguide/statepoint.html">5. State Point Binary File Specifications</a>
|
||||
  ::  
|
||||
<a class="uplink" href="index.html">Contents</a>
|
||||
  ::  
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ and libraries may be needed. These include:</p>
|
|||
<li>A Fortran compiler such as <a class="reference external" href="http://gcc.gnu.org/wiki/GFortran">gfortran</a></li>
|
||||
<li><a class="reference external" href="http://git-scm.com">git</a> version control software for obtaining source code (<em>optional</em>)</li>
|
||||
<li>An MPI implementation for parallel runs (<em>optional</em>)</li>
|
||||
<li><a class="reference external" href="http://www.hdfgroup.org/HDF5/">HDF5</a> Library for improved output format (<em>optional</em>)</li>
|
||||
<li><a class="reference external" href="http://www.hdfgroup.org/HDF5/">HDF5</a> Library for portable binary output format (<em>optional</em>)</li>
|
||||
<li><a class="reference external" href="http://www.mcs.anl.gov/petsc/">PETSc</a> for CMFD acceleration (<em>optional</em>)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="obtaining-the-source">
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -117,6 +117,22 @@ essential aspects of using OpenMC to perform neutronic simulations.</p>
|
|||
<li class="toctree-l3"><a class="reference internal" href="input.html#plot-element">3.6.1. <tt class="docutils literal"><span class="pre"><plot></span></tt> Element</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="input.html#cmfd-specification-cmfd-xml">3.7. CMFD Specification – cmfd.xml</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#active-flush-element">3.7.1. <tt class="docutils literal"><span class="pre"><active_flush></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#begin-element">3.7.2. <tt class="docutils literal"><span class="pre"><begin></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#feedback-element">3.7.3. <tt class="docutils literal"><span class="pre"><feedback></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#inactive-element">3.7.4. <tt class="docutils literal"><span class="pre"><inactive></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#keff-tol-element">3.7.5. <tt class="docutils literal"><span class="pre"><keff_tol></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#ksp-monitor-element">3.7.6. <tt class="docutils literal"><span class="pre"><ksp_monitor></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#id2">3.7.7. <tt class="docutils literal"><span class="pre"><mesh></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#norm-element">3.7.8. <tt class="docutils literal"><span class="pre"><norm></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#n-procs-cmfd-element">3.7.9. <tt class="docutils literal"><span class="pre"><n_procs_cmfd></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#power-monitor-element">3.7.10. <tt class="docutils literal"><span class="pre"><power_monitor></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#write-balance-element">3.7.11. <tt class="docutils literal"><span class="pre"><write_balance></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#write-hdf5-element">3.7.12. <tt class="docutils literal"><span class="pre"><write_hdf5></span></tt> Element</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="input.html#write-matrices-element">3.7.13. <tt class="docutils literal"><span class="pre"><write_matrices></span></tt> Element</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="troubleshoot.html">4. Troubleshooting OpenMC</a><ul>
|
||||
|
|
|
|||
|
|
@ -78,16 +78,19 @@ materials, and settings for a Monte Carlo simulation.</p>
|
|||
<div class="section" id="overview-of-files">
|
||||
<h2>3.1. Overview of Files<a class="headerlink" href="#overview-of-files" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To assemble a complete model for OpenMC, one needs to create separate XML files
|
||||
for the geometry, materials, and settings. Additionally, there are two optional
|
||||
for the geometry, materials, and settings. Additionally, there are three optional
|
||||
input files. The first is a tallies XML file that specifies physical quantities
|
||||
to be tallied. The second is a plots XML file that specifies regions of geometry
|
||||
which should be plotted. OpenMC expects that these files are called:</p>
|
||||
which should be plotted. The third is a CMFD XML file that specifies coarse mesh
|
||||
acceleration geometry and execution parameters. OpenMC expects that these
|
||||
files are called:</p>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">geometry.xml</span></tt></li>
|
||||
<li><tt class="docutils literal"><span class="pre">materials.xml</span></tt></li>
|
||||
<li><tt class="docutils literal"><span class="pre">settings.xml</span></tt></li>
|
||||
<li><tt class="docutils literal"><span class="pre">tallies.xml</span></tt></li>
|
||||
<li><tt class="docutils literal"><span class="pre">plots.xml</span></tt></li>
|
||||
<li><tt class="docutils literal"><span class="pre">cmfd.xml</span></tt></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="settings-specification-settings-xml">
|
||||
|
|
@ -526,7 +529,7 @@ could be written as:</p>
|
|||
</pre></div>
|
||||
</div>
|
||||
<div class="section" id="surface-element">
|
||||
<h3>3.3.1. <tt class="docutils literal"><span class="pre"><surface></span></tt> Element<a class="headerlink" href="#surface-element" title="Permalink to this headline">¶</a></h3>
|
||||
<span id="id1"></span><h3>3.3.1. <tt class="docutils literal"><span class="pre"><surface></span></tt> Element<a class="headerlink" href="#surface-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Each <tt class="docutils literal"><span class="pre"><surface></span></tt> element can have the following attributes or sub-elements:</p>
|
||||
<blockquote>
|
||||
<div><table class="docutils field-list" frame="void" rules="none">
|
||||
|
|
@ -588,6 +591,18 @@ coefficients specified are “<img class="math" src="../_images/math/d9efe2f
|
|||
<tr class="field-even field"><th class="field-name">sphere:</th><td class="field-body">A sphere of the form <img class="math" src="../_images/math/62a745995df775198e16354b6b1ed9887e88c8a2.png" alt="(x - x_0)^2 + (y - y_0)^2 + (z - z_0)^2 =
|
||||
R^2"/>. The coefficients specified are “<img class="math" src="../_images/math/e13d971231512283e81d8480a218782f7d68b585.png" alt="x_0 \: y_0 \: z_0 \: R"/>”.</td>
|
||||
</tr>
|
||||
<tr class="field-odd field"><th class="field-name">x-cone:</th><td class="field-body">A cone parallel to the x-axis of the form <img class="math" src="../_images/math/48addcaae47a04de47d2a40f0095c771ec2ce891.png" alt="(y - y_0)^2 + (z - z_0)^2 =
|
||||
R^2 (x - x_0)^2"/>. The coefficients specified are “<img class="math" src="../_images/math/0ef6215a44c46c244ccd86bf6aadaa33b87b4e6d.png" alt="x_0 \: y_0 \: z_0
|
||||
\: R^2"/>”.</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">y-cone:</th><td class="field-body">A cone parallel to the y-axis of the form <img class="math" src="../_images/math/d939cb7e10ed48f1e43b0dd6c646e423a581ab40.png" alt="(x - x_0)^2 + (z - z_0)^2 =
|
||||
R^2 (y - y_0)^2"/>. The coefficients specified are “<img class="math" src="../_images/math/0ef6215a44c46c244ccd86bf6aadaa33b87b4e6d.png" alt="x_0 \: y_0 \: z_0
|
||||
\: R^2"/>”.</td>
|
||||
</tr>
|
||||
<tr class="field-odd field"><th class="field-name">z-cone:</th><td class="field-body">A cone parallel to the x-axis of the form <img class="math" src="../_images/math/2d94d2e3228f1977c395a51961b7184af5514ca7.png" alt="(x - x_0)^2 + (y - y_0)^2 =
|
||||
R^2 (z - z_0)^2"/>. The coefficients specified are “<img class="math" src="../_images/math/0ef6215a44c46c244ccd86bf6aadaa33b87b4e6d.png" alt="x_0 \: y_0 \: z_0
|
||||
\: R^2"/>”.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div></blockquote>
|
||||
|
|
@ -1058,6 +1073,175 @@ materials to plot. This overrides any <tt class="docutils literal"><span class=
|
|||
</div></blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="cmfd-specification-cmfd-xml">
|
||||
<h2>3.7. CMFD Specification – cmfd.xml<a class="headerlink" href="#cmfd-specification-cmfd-xml" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Coarse mesh finite difference acceleration method has been implemented in OpenMC.
|
||||
Currently, it allows users to accelerate fission source convergence during
|
||||
inactive neutron batches. To run CMFD, the <tt class="docutils literal"><span class="pre"><run_cmfd></span></tt> element in
|
||||
<tt class="docutils literal"><span class="pre">settings.xml</span></tt> should be set to <tt class="docutils literal"><span class="pre">.true.</span></tt>.</p>
|
||||
<div class="section" id="active-flush-element">
|
||||
<h3>3.7.1. <tt class="docutils literal"><span class="pre"><active_flush></span></tt> Element<a class="headerlink" href="#active-flush-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><active_flush></span></tt> element controls the batch where CMFD tallies should be
|
||||
reset. CMFD tallies should be reset before active batches so they are accumulated
|
||||
without bias.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: 0</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="begin-element">
|
||||
<h3>3.7.2. <tt class="docutils literal"><span class="pre"><begin></span></tt> Element<a class="headerlink" href="#begin-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><begin></span></tt> element controls what batch CMFD calculations should begin.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: 1</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="feedback-element">
|
||||
<h3>3.7.3. <tt class="docutils literal"><span class="pre"><feedback></span></tt> Element<a class="headerlink" href="#feedback-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><feedback></span></tt> element controls whether or not the CMFD diffusion result is
|
||||
used to adjust the weight of fission source neutrons on the next OpenMC batch.
|
||||
It can be turned on with ”.true.” and off with ”.false.”.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: .false.</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="inactive-element">
|
||||
<h3>3.7.4. <tt class="docutils literal"><span class="pre"><inactive></span></tt> Element<a class="headerlink" href="#inactive-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><inactive></span></tt> element controls if cmfd tallies should be accumulated
|
||||
during inactive batches. For some applications, CMFD tallies may not be
|
||||
needed until the start of active batches. This option can be turned on
|
||||
with ”.true.” and off with ”.false.”</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: .true.</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="keff-tol-element">
|
||||
<h3>3.7.5. <tt class="docutils literal"><span class="pre"><keff_tol></span></tt> Element<a class="headerlink" href="#keff-tol-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><keff_tol></span></tt> element specifies acceptance criteria of a CMFD eigenvalue.
|
||||
If the CMFD eigenvalue and OpenMC batch eigenvalue are within this tolerance,
|
||||
CMFD is allowed to modify source neutron weights.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: 0.005</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="ksp-monitor-element">
|
||||
<h3>3.7.6. <tt class="docutils literal"><span class="pre"><ksp_monitor></span></tt> Element<a class="headerlink" href="#ksp-monitor-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><ksp_monitor></span></tt> element is used to view the convergence of linear GMRES
|
||||
iterations in PETSc. This option can be turned on with ”.true.” and turned off
|
||||
with ”.false.”.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: .false.</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="id2">
|
||||
<h3>3.7.7. <tt class="docutils literal"><span class="pre"><mesh></span></tt> Element<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
|
||||
<p>If a structured mesh is desired as a filter for a tally, it must be specified in
|
||||
a separate element with the tag name <tt class="docutils literal"><span class="pre"><mesh></span></tt>. This element has the following
|
||||
attributes/sub-elements:</p>
|
||||
<blockquote>
|
||||
<div><table class="docutils field-list" frame="void" rules="none">
|
||||
<col class="field-name" />
|
||||
<col class="field-body" />
|
||||
<tbody valign="top">
|
||||
<tr class="field-odd field"><th class="field-name">type:</th><td class="field-body"><p class="first">The type of structured mesh. Only “rectangular” is currently supported.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">lower_left:</th><td class="field-body"><p class="first">The lower-left corner of the structured mesh. If only two coordinate are
|
||||
given, it is assumed that the mesh is an x-y mesh.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="field-odd field"><th class="field-name">upper_right:</th><td class="field-body"><p class="first">The upper-right corner of the structrued mesh. If only two coordinate are
|
||||
given, it is assumed that the mesh is an x-y mesh.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">dimension:</th><td class="field-body"><p class="first">The number of mesh cells in each direction.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="field-odd field"><th class="field-name">width:</th><td class="field-body"><p class="first">The width of mesh cells in each direction.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">energy:</th><td class="field-body"><p class="first">Energy bins [in MeV], listed in ascending order (e.g. 0.0 0.625e-7 20.0)
|
||||
for CMFD tallies and acceleration. If no energy bins are listed, OpenMC
|
||||
automatically assumes a one energy group calculation over the entire
|
||||
energy range.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="field-odd field"><th class="field-name">albedo:</th><td class="field-body"><p class="first">Surface ratio of incoming to outgoing partial currents on global boundary
|
||||
conditions. They are listed in the following order: -x +x -y +y -z +z.</p>
|
||||
<p><em>Default</em>: 1.0 1.0 1.0 1.0 1.0 1.0</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="field-even field"><th class="field-name">map:</th><td class="field-body"><p class="first">An optional acceleration map can be specified to overlay on the coarse
|
||||
mesh spatial grid. If this option is used a <tt class="docutils literal"><span class="pre">1</span></tt> is used for a
|
||||
non-accelerated region and a <tt class="docutils literal"><span class="pre">2</span></tt> is used for an accelerated region.
|
||||
For a simple 4x4 coarse mesh with a 2x2 fuel lattice surrounded by
|
||||
reflector, the map is:</p>
|
||||
<blockquote>
|
||||
<div><p><tt class="docutils literal"><span class="pre">1</span> <span class="pre">1</span> <span class="pre">1</span> <span class="pre">1</span></tt></p>
|
||||
<p><tt class="docutils literal"><span class="pre">1</span> <span class="pre">2</span> <span class="pre">2</span> <span class="pre">1</span></tt></p>
|
||||
<p><tt class="docutils literal"><span class="pre">1</span> <span class="pre">2</span> <span class="pre">2</span> <span class="pre">1</span></tt></p>
|
||||
<p><tt class="docutils literal"><span class="pre">1</span> <span class="pre">1</span> <span class="pre">1</span> <span class="pre">1</span></tt></p>
|
||||
</div></blockquote>
|
||||
<p>Therefore a 2x2 system of equations is solved rather than a 4x4. This
|
||||
is extremely important to use in reflectors as neutrons will not
|
||||
contribute to any tallies far away from fission source neutron regions.
|
||||
A <tt class="docutils literal"><span class="pre">2</span></tt> must be used to identify any fission source region.</p>
|
||||
<div class="last admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">Only two of the following three sub-elements are needed:
|
||||
<tt class="docutils literal"><span class="pre">lower_left</span></tt>, <tt class="docutils literal"><span class="pre">upper_right</span></tt> and <tt class="docutils literal"><span class="pre">width</span></tt>. Any combination
|
||||
of two of these will yield the third.</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="norm-element">
|
||||
<h3>3.7.8. <tt class="docutils literal"><span class="pre"><norm></span></tt> Element<a class="headerlink" href="#norm-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><norm></span></tt> element is used to normalize the CMFD fission source distribution
|
||||
to a particular value. For example, if a fission source is calculated for a
|
||||
17 x 17 lattice of pins, the fission source may be normalized to the number of
|
||||
fission source regions, in this case 289. This is useful when visualizing this
|
||||
distribution as the average peaking factor will be unity. This parameter will
|
||||
not impact the calculation.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: 1.0</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="n-procs-cmfd-element">
|
||||
<h3>3.7.9. <tt class="docutils literal"><span class="pre"><n_procs_cmfd></span></tt> Element<a class="headerlink" href="#n-procs-cmfd-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><n_procs_cmfd></span></tt> element is used to set the number of processors used
|
||||
for CMFD calculation. It should be less than or equal to the number of
|
||||
processors used during OpenMC.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: 1</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="power-monitor-element">
|
||||
<h3>3.7.10. <tt class="docutils literal"><span class="pre"><power_monitor></span></tt> Element<a class="headerlink" href="#power-monitor-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><power_monitor></span></tt> element is used to view the convergence of power iteration.
|
||||
This option can be turned on with ”.true.” and turned off with ”.false.”.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: .false.</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="write-balance-element">
|
||||
<h3>3.7.11. <tt class="docutils literal"><span class="pre"><write_balance></span></tt> Element<a class="headerlink" href="#write-balance-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><write_balance></span></tt> element is used to view the balance of OpenMC tally
|
||||
residuals for every coarse mesh region and energy group. This option can be
|
||||
turned on with ”.true.” and off with ”.false.”.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: .false.</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="write-hdf5-element">
|
||||
<h3>3.7.12. <tt class="docutils literal"><span class="pre"><write_hdf5></span></tt> Element<a class="headerlink" href="#write-hdf5-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><write_hdf5></span></tt> element can be turned on with ”.true.” to get an
|
||||
HDF5 output file of CMFD results.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: .false.</div></blockquote>
|
||||
</div>
|
||||
<div class="section" id="write-matrices-element">
|
||||
<h3>3.7.13. <tt class="docutils literal"><span class="pre"><write_matrices></span></tt> Element<a class="headerlink" href="#write-matrices-element" title="Permalink to this headline">¶</a></h3>
|
||||
<p>The <tt class="docutils literal"><span class="pre"><write_matrices></span></tt> element is used to view the PETSc sparse matrices
|
||||
created when solving CMFD equations. These binary output files can be imported
|
||||
into MATLAB using PETSc-MATLAB utilities. This option can be
|
||||
turned on with ”.true.” and off with ”.false.”.</p>
|
||||
<blockquote>
|
||||
<div><em>Default</em>: .false.</div></blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,9 @@ sudo apt-get install openmpi-bin</pre>
|
|||
<p>To compile with support for <a class="reference external" href="http://www.hdfgroup.org/HDF5/">HDF5</a> 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.</p>
|
||||
<p>To enable CMFD acceleration, you will need to have <a class="reference external" href="http://www.mcs.anl.gov/petsc/">PETSc</a> installed on your
|
||||
computer. The installed version will need to have been compiled with the same
|
||||
compiler you intend to compile OpenMC with.</p>
|
||||
</div>
|
||||
<div class="section" id="obtaining-the-source">
|
||||
<h2>2.2. Obtaining the Source<a class="headerlink" href="#obtaining-the-source" title="Permalink to this headline">¶</a></h2>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue