From 759f96c9e05f6bcc8ab588b93c1ddbda2edb6e9e Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 25 Sep 2015 10:40:50 +0700 Subject: [PATCH] Complete documentation of summary file format, including suggestions from @wbinventor. --- docs/source/usersguide/input.rst | 3 +- docs/source/usersguide/output/statepoint.rst | 95 +++--- docs/source/usersguide/output/summary.rst | 292 +++++++++++++------ src/summary.F90 | 1 + 4 files changed, 254 insertions(+), 137 deletions(-) diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index 833cd99b2a..b4d153f184 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -1426,8 +1426,7 @@ a separate element with the tag name ````. This element has the following attributes/sub-elements: :type: - The type of structured mesh. Valid options include "rectangular" and - "hexagonal". + The type of structured mesh. The only valid option is "regular". :dimension: The number of mesh cells in each direction. diff --git a/docs/source/usersguide/output/statepoint.rst b/docs/source/usersguide/output/statepoint.rst index b9898ea5db..02f4fdcf36 100644 --- a/docs/source/usersguide/output/statepoint.rst +++ b/docs/source/usersguide/output/statepoint.rst @@ -56,7 +56,7 @@ The current revision of the statepoint file format is 13. The number of batches already simulated. -if (run_mode == MODE_EIGENVALUE) +if run_mode == 'k-eigenvalue': **/n_inactive** (*int*) @@ -136,31 +136,29 @@ if (run_mode == MODE_EIGENVALUE) User-identified unique ID of each mesh -*do i = 1, n_meshes* +**/tallies/meshes/mesh /id** (*int*) - **/tallies/meshes/mesh i/id** (*int*) + Unique identifier of the mesh. - Unique identifier of the mesh. +**/tallies/meshes/mesh /type** (*char[]*) - **/tallies/meshes/mesh i/type** (*char[]*) + Type of mesh. - Type of mesh. +**/tallies/meshes/mesh /dimension** (*int*) - **/tallies/meshes/mesh i/dimension** (*int*) + Number of mesh cells in each dimension. - Number of mesh cells in each dimension. +**/tallies/meshes/mesh /lower_left** (*double[]*) - **/tallies/meshes/mesh i/lower_left** (*double[]*) + Coordinates of lower-left corner of mesh. - Coordinates of lower-left corner of mesh. +**/tallies/meshes/mesh /upper_right** (*double[]*) - **/tallies/meshes/mesh i/upper_right** (*double[]*) + Coordinates of upper-right corner of mesh. - Coordinates of upper-right corner of mesh. +**/tallies/meshes/mesh /width** (*double[]*) - **/tallies/meshes/mesh i/width** (*double[]*) - - Width of each mesh cell in each dimension. + Width of each mesh cell in each dimension. **/tallies/n_tallies** (*int*) @@ -174,63 +172,66 @@ if (run_mode == MODE_EIGENVALUE) User-identified unique ID of each tally. -*do i = 1, n_tallies* +**/tallies/tally /estimator** (*char[]*) - **/tallies/tally i/estimator** (*char[]*) + Type of tally estimator, either 'analog', 'tracklength', or 'collision'. - Type of tally estimator. +**/tallies/tally /n_realizations** (*int*) - **/tallies/tally i/n_realizations** (*int*) + Number of realizations. - Number of realizations. +**/tallies/tally /n_filters** (*int*) - **/tallies/tally i/n_filters** (*int*) + Number of filters used. - Number of filters used. +**/tallies/tally /filter /type** (*char[]*) - *do j = 1, tallies(i) % n_filters* + Type of the j-th filter. Can be 'universe', 'material', 'cell', 'cellborn', + 'surface', 'mesh', 'energy', 'energyout', or 'distribcell'. - **/tallies/tally i/filter j/type** (*char[]*) +**/tallies/tally /filter /offset** (*int*) - Type of tally filter. + Filter offset (used for distribcell filter). - **/tallies/tally i/filter j/offset** (*int*) +**/tallies/tally /filter /n_bins** (*int*) - Filter offset (used for distribcell). + Number of bins for the j-th filter. - **/tallies/tally i/filter j/n_bins** (*int*) +**/tallies/tally /filter /bins** (*int[]* or *double[]*) - Number of bins for filter. + Value for each filter bin of this type. - **/tallies/tally i/filter j/bins** (*int[]* or *double[]*) +**/tallies/tally /nuclides** (*char[][]*) - Value for each filter bin of this type. + Array of nuclides to tally. Note that if no nuclide is specified in the user + input, a single 'total' nuclide appears here. - **/tallies/tally i/nuclides** (*char[][]*) +**/tallies/tally /n_score_bins** (*int*) - Values of specified nuclide bins. + Number of scoring bins for a single nuclide. In general, this can be greater + than the number of user-specified scores since each score might have + multiple scoring bins, e.g., scatter-PN. - **/tallies/tally i/n_score_bins** (*int*) +**/tallies/tally /score_bins** (*char[][]*) - Number of scores. + Values of specified scores. - **/tallies/tally i/score_bins** (*char[][]*) +**/tallies/tally /n_user_scores** (*int*) - Values of specified scores. + Number of scores without accounting for those added by expansions, + e.g. scatter-PN. - **/tallies/tally i/n_user_scores** (*int*) +**/tallies/tally /moment_orders** (*char[][]*) - Number of scores without accounting for those added by expansions, - e.g. scatter-PN. + Tallying moment orders for Legendre and spherical harmonic tally expansions + (*e.g.*, 'P2', 'Y1,2', etc.). - **/tallies/tally i/moment_orders** (*char[][]*) +**/tallies/tally /results** (Compound type) - Tallying moment orders for Legendre and spherical harmonic tally - expansions (*e.g.*, 'P2', 'Y1,2', etc.). - - **/tallies/tally i/results** (Compound type) - - Accumulated sum and sum-of-squares for each bin of the i-th tally. + Accumulated sum and sum-of-squares for each bin of the i-th tally. This is a + two-dimensional array, the first dimension of which represents combinations + of filter bins and the second dimensions of which represents scoring + bins. Each element of the array has fields 'sum' and 'sum_sq'. **/source_present** (*int*) diff --git a/docs/source/usersguide/output/summary.rst b/docs/source/usersguide/output/summary.rst index 453a48d98d..f7e0269988 100644 --- a/docs/source/usersguide/output/summary.rst +++ b/docs/source/usersguide/output/summary.rst @@ -29,7 +29,7 @@ The current revision of the summary file format is 1. **/date_and_time** (*char[]*) - Date and time the state point was written. + Date and time the summary was written. **/n_procs** (*int*) @@ -43,186 +43,302 @@ The current revision of the summary file format is 1. Number of batches to simulate. -if (run_mode == MODE_EIGENVALUE) +**/n_inactive** (*int*) - **/n_inactive** (*int*) + Number of inactive batches. Only present if /run_mode is set to + 'k-eigenvalue'. - Number of inactive batches. +**/n_active** (*int*) - **/n_active** (*int*) + Number of active batches. Only present if /run_mode is set to + 'k-eigenvalue'. - Number of active batches. +**/gen_per_batch** (*int*) - **/gen_per_batch** (*int*) - - Number of generations per batch. - -end if + Number of generations per batch. Only present if /run_mode is set to + 'k-eigenvalue'. **/geometry/n_cells** (*int*) + Number of cells in the problem. + **/geometry/n_surfaces** (*int*) + Number of surfaces in the problem. + **/geometry/n_universes** (*int*) + Number of unique universes in the problem. + **/geometry/n_lattices** (*int*) -do i = 1, n_cells + Number of lattices in the problem. - **/geometry/cells/cell /index** (*int*) +**/geometry/cells/cell /index** (*int*) - **/geometry/cells/cell /name** (*char[]*) + Index in cells array used internally in OpenMC. - **/geometry/cells/cell /universe** (*int*) +**/geometry/cells/cell /name** (*char[]*) - **/geometry/cells/cell /fill_type** (*char[]*) + Name of the cell. - **/geometry/cells/cell /material** (*int*) +**/geometry/cells/cell /universe** (*int*) - **/geometry/cells/cell /maps** (*int*) + Universe assigned to the cell. If none is specified, the default + universe (0) is assigned. - **/geometry/cells/cell /offset** (*int[]*) +**/geometry/cells/cell /fill_type** (*char[]*) - **/geometry/cells/cell /translated** (*int*) + Type of fill for the cell. Can be 'normal', 'universe', or 'lattice'. - **/geometry/cells/cell /translation** (*double[]*) +**/geometry/cells/cell /material** (*int*) - **/geometry/cells/cell /rotated** (*int*) + Unique ID of the material assigned to the cell. This dataset is present only + if fill_type is set to 'normal'. - **/geometry/cells/cell /rotation** (*double[]*) +**/geometry/cells/cell /maps** (*int*) - **/geometry/cells/cell /lattice** (*int*) + TODO: Add description. - **/geometry/cells/cell /surfaces** (*int[]*) +**/geometry/cells/cell /offset** (*int[]*) -end do + Offset used for distribcell tally filter. This dataset is present only if + fill_type is set to 'universe'. -do i = 1, n_surfaces +**/geometry/cells/cell /translated** (*int*) - **/geometry/surfaces/surface /index** (*int*) + Indicates if a translation is to be applied to the fill universe if one is + present. Note that this dataset assumes values of 0 or 1. This dataset is + present only if fill_type is set to 'universe'. - **/geometry/surfaces/surface /name** (*char[]*) +**/geometry/cells/cell /translation** (*double[3]*) - **/geometry/surfaces/surface /type** (*char[]*) + Translation applied to the fill universe. This dataset is present only if + fill_type is set to 'universe'. - **/geometry/surfaces/surface /coefficients** (*double[]*) +**/geometry/cells/cell /rotated** (*int*) - **/geometry/surfaces/surface /boundary_condition** (*char[]*) + Indicates if a rotation is to be applied to the fill universe if one is + present. Note that this dataset assumes values of 0 or 1. This dataset is + present only if fill_type is set to 'universe'. -end do +**/geometry/cells/cell /rotation** (*double[3]*) -do i = 1, n_universes + Angles in degrees about the x-, y-, and z-axes for which the fill universe + should be rotated. This dataset is present only if fill_type is set to + 'universe'. - **/geometry/universes/universe /index** (*int*) +**/geometry/cells/cell /lattice** (*int*) - **/geometry/universes/universe /cells** (*int[]*) + Unique ID of the lattice which fills the cell. Only present if fill_type is + set to 'lattice'. -end do +**/geometry/cells/cell /surfaces** (*int[]*) -do i = 1, n_lattices + Surface specification for the cell. - **/geometry/lattices/lattice /index** (*int*) +**/geometry/surfaces/surface /index** (*int*) - **/geometry/lattices/lattice /name** (*char[]*) + Index in surfaces array used internally in OpenMC. - **/geometry/lattices/lattice /type** (*char[]*) +**/geometry/surfaces/surface /name** (*char[]*) - **/geometry/lattices/lattice /pitch** (*double[]*) + Name of the surface. - **/geometry/lattices/lattice /outer** (*int*) +**/geometry/surfaces/surface /type** (*char[]*) - **/geometry/lattices/lattice /offset_size** (*int[]*) + Type of the surface. Can be 'X Plane', 'Y Plane', 'Z Plane', 'Plane', 'X + Cylinder', 'Y Cylinder', 'Sphere', 'X Cone', 'Y Cone', or 'Z Cone'. - **/geometry/lattices/lattice /maps** (*int*) +**/geometry/surfaces/surface /coefficients** (*double[]*) - **/geometry/lattices/lattice /offsets** (*int[]*) + Array of coefficients that define the surface. See :ref:`surface_element` + for what coefficients are defined for each surface type. - **/geometry/lattices/lattice /universes** (*int[]*) +**/geometry/surfaces/surface /boundary_condition** (*char[]*) - if (rectangular lattice) + Boundary condition applied to the surface. Can be 'transmission', 'vacuum', + 'reflective', or 'periodic'. - **/geometry/lattices/lattice /dimension** (*int[]*) +**/geometry/universes/universe /index** (*int*) - **/geometry/lattices/lattice /lower_left** (*double[]*) + Index in the universes array used internally in OpenMC. - elseif (hexagonal lattice) +**/geometry/universes/universe /cells** (*int[]*) - **/geometry/lattices/lattice /n_rings** (*int*) + Array of unique IDs of cells that appear in the universe. - **/geometry/lattices/lattice /n_axial** (*int*) +**/geometry/lattices/lattice /index** (*int*) - **/geometry/lattices/lattice /center** (*double[]*) + Index in the lattices array used internally in OpenMC. - end if +**/geometry/lattices/lattice /name** (*char[]*) -end do + Name of the lattice. + +**/geometry/lattices/lattice /type** (*char[]*) + + Type of the lattice, either 'rectangular' or 'hexagonal'. + +**/geometry/lattices/lattice /pitch** (*double[]*) + + Pitch of the lattice. + +**/geometry/lattices/lattice /outer** (*int*) + + Outer universe assigned to lattice cells outside the defined range. + +**/geometry/lattices/lattice /offset_size** (*int[]*) + + TODO: Explain offset_size + +**/geometry/lattices/lattice /maps** (*int*) + + TODO: Explain maps + +**/geometry/lattices/lattice /offsets** (*int[]*) + + Offsets used for distribcell tally filter. + +**/geometry/lattices/lattice /universes** (*int[]*) + + Three-dimensional array of universes assigned to each cell of the lattice. + +**/geometry/lattices/lattice /dimension** (*int[]*) + + The number of lattice cells in each direction. This dataset is present only + when the 'type' dataset is set to 'rectangular'. + +**/geometry/lattices/lattice /lower_left** (*double[]*) + + The coordinates of the lower-left corner of the lattice. This dataset is + present only when the 'type' dataset is set to 'rectangular'. + +**/geometry/lattices/lattice /n_rings** (*int*) + + Number of radial ring positions in the xy-plane. This dataset is present + only when the 'type' dataset is set to 'hexagonal'. + +**/geometry/lattices/lattice /n_axial** (*int*) + + Number of lattice positions along the z-axis. This dataset is present only + when the 'type' dataset is set to 'hexagonal'. + +**/geometry/lattices/lattice /center** (*double[]*) + + Coordinates of the center of the lattice. This dataset is present only when + the 'type' dataset is set to 'hexagonal'. **/n_materials** (*int*) -do i = 1, n_materials + Number of materials in the problem. - **/materials/material /index** (*int*) +**/materials/material /index** (*int*) - **/materials/material /name** (*char[]*) + Index in materials array used internally in OpenMC. - **/materials/material /atom_density** (*double[]*) +**/materials/material /name** (*char[]*) - **/materials/material /nuclides** (*int[]*) + Name of the material. - **/materials/material /nuclide_densities** (*double[]*) +**/materials/material /atom_density** (*double[]*) - **/materials/material /sab_names** (*char[][]*) + Total atom density of the material in atom/b-cm. -end do +**/materials/material /nuclides** (*char[][]*) + + Array of nuclides present in the material, e.g., 'U-235.71c'. + +**/materials/material /nuclide_densities** (*double[]*) + + Atom density of each nuclide. + +**/materials/material /sab_names** (*char[][]*) + + Names of S(:math:`\alpha`,:math:`\beta`) tables assigned to the material. **/tallies/n_tallies** (*int*) + Number of tallies in the problem. + **/tallies/n_meshes** (*int*) -do i = 1, n_meshes + Number of meshes in the problem. - **/tallies/mesh /index** (*int*) +**/tallies/mesh /index** (*int*) - **/tallies/mesh /type** (*char[]*) + Index in the meshes array used internally in OpenMC - **/tallies/mesh /dimension** (*int[]*) +**/tallies/mesh /type** (*char[]*) - **/tallies/mesh /lower_left** (*double[]*) + Type of the mesh. The only valid option is currently 'regular'. - **/tallies/mesh /upper_right** (*double[]*) +**/tallies/mesh /dimension** (*int[]*) - **/tallies/mesh /width** (*double[]*) + Number of mesh cells in each direction. -end do +**/tallies/mesh /lower_left** (*double[]*) -do i = 1, n_tallies + Coordinates of the lower-left corner of the mesh. - **/tallies/tally /index** (*int*) +**/tallies/mesh /upper_right** (*double[]*) - **/tallies/tally /name** (*char[]*) + Coordinates of the upper-right corner of the mesh. - **/tallies/tally /total_score_bins** (*int*) +**/tallies/mesh /width** (*double[]*) - **/tallies/tally /total_filter_bins** (*int*) + Width of a single mesh cell in each direction. - **/tallies/tally /n_filters** (*int*) +**/tallies/tally /index** (*int*) - do j = 1, n_filters + Index in tallies array used internally in OpenMC. - **/tallies/tally /filter j/type** (*char[]*) +**/tallies/tally /name** (*char[]*) - **/tallies/tally /filter j/n_bins** (*int*) + Name of the tally. - **/tallies/tally /filter j/bins** (*int[]* or *double[]*) +**/tallies/tally /total_score_bins** (*int*) - **/tallies/tally /filter j/type_name** (*char[]*) + Total number of scoring bins for all nuclides. This is used as the size of + second dimension of the tally results array. - end do +**/tallies/tally /total_filter_bins** (*int*) - **/tallies/tally /nuclides** (*char[][]*) + Total number of filter bins accounting for all filters. This is used as the + size of first dimension of the tally results array. - **/tallies/tally /n_score_bins** (*int*) +**/tallies/tally /n_filters** (*int*) - **/tallies/tally /score_bins** (*char[][]*) + Number of filters applied to the tally. -end do +**/tallies/tally /filter /type** (*char[]*) + + Type of the j-th filter. Can be 'universe', 'material', 'cell', 'cellborn', + 'surface', 'mesh', 'energy', 'energyout', or 'distribcell'. + +**/tallies/tally /filter /offset** (*int*) + + Filter offset (used for distribcell filter). + +**/tallies/tally /filter /n_bins** (*int*) + + Number of bins for the j-th filter. + +**/tallies/tally /filter /bins** (*int[]* or *double[]*) + + Value for each filter bin of this type. + +**/tallies/tally /nuclides** (*char[][]*) + + Array of nuclides to tally. Note that if no nuclide is specified in the user + input, a single 'total' nuclide appears here. + +**/tallies/tally /n_score_bins** (*int*) + + Number of scoring bins for a single nuclide. In general, this can be greater + than the number of user-specified scores since each score might have + multiple scoring bins, e.g., scatter-PN. + +**/tallies/tally /score_bins** (*char[][]*) + + Scoring bins for the tally. diff --git a/src/summary.F90 b/src/summary.F90 index d80f357480..7c6a3a29a5 100644 --- a/src/summary.F90 +++ b/src/summary.F90 @@ -515,6 +515,7 @@ contains filter_group = create_group(tally_group, "filter " // trim(to_str(j))) ! Write number of bins for this filter + call write_dataset(filter_group, "offset", t%filters(j)%offset) call write_dataset(filter_group, "n_bins", t%filters(j)%n_bins) ! Write filter bins