openmc.StatePoint¶
- class openmc.StatePoint(filepath, autolink=True)[source]¶
State information on a simulation at a certain point in time (at the end of a given batch). Statepoints can be used to analyze tally results as well as restart a simulation.
- Parameters
- Variables
cmfd_on (bool) – Indicate whether CMFD is active
cmfd_balance (numpy.ndarray) – Residual neutron balance for each batch
cmfd_dominance – Dominance ratio for each batch
cmfd_entropy (numpy.ndarray) – Shannon entropy of CMFD fission source for each batch
cmfd_indices (numpy.ndarray) – Number of CMFD mesh cells and energy groups. The first three indices correspond to the x-, y-, and z- spatial directions and the fourth index is the number of energy groups.
cmfd_srccmp (numpy.ndarray) – Root-mean-square difference between OpenMC and CMFD fission source for each batch
cmfd_src (numpy.ndarray) – CMFD fission source distribution over all mesh cells and energy groups.
current_batch (int) – Number of batches simulated
date_and_time (datetime.datetime) – Date and time at which statepoint was written
entropy (numpy.ndarray) – Shannon entropy of fission source at each batch
filters (dict) – Dictionary whose keys are filter IDs and whose values are Filter objects
generations_per_batch (int) – Number of fission generations per batch
global_tallies (numpy.ndarray of compound datatype) – Global tallies for k-effective estimates and leakage. The compound datatype has fields ‘name’, ‘sum’, ‘sum_sq’, ‘mean’, and ‘std_dev’.
k_combined (uncertainties.UFloat) –
Combined estimator for k-effective
Deprecated since version 0.13.1.
k_col_abs (float) – Cross-product of collision and absorption estimates of k-effective
k_col_tra (float) – Cross-product of collision and tracklength estimates of k-effective
k_abs_tra (float) – Cross-product of absorption and tracklength estimates of k-effective
k_generation (numpy.ndarray) – Estimate of k-effective for each batch/generation
keff (uncertainties.UFloat) –
Combined estimator for k-effective
New in version 0.13.1.
meshes (dict) – Dictionary whose keys are mesh IDs and whose values are MeshBase objects
n_batches (int) – Number of batches
n_inactive (int) – Number of inactive batches
n_particles (int) – Number of particles per generation
n_realizations (int) – Number of tally realizations
path (str) – Working directory for simulation
photon_transport (bool) – Indicate whether photon transport is active
run_mode (str) – Simulation run mode, e.g. ‘eigenvalue’
runtime (dict) – Dictionary whose keys are strings describing various runtime metrics and whose values are time values in seconds.
seed (int) – Pseudorandom number generator seed
source (numpy.ndarray of compound datatype) – Array of source sites. The compound datatype has fields ‘r’, ‘u’, ‘E’, ‘wgt’, ‘delayed_group’, ‘surf_id’, and ‘particle’, corresponding to the position, direction, energy, weight, delayed group, surface ID and particle type of the source site, respectively.
source_present (bool) – Indicate whether source sites are present
sparse (bool) – Whether or not the tallies uses SciPy’s LIL sparse matrix format for compressed data storage
tallies (dict) – Dictionary whose keys are tally IDs and whose values are Tally objects
tallies_present (bool) – Indicate whether user-defined tallies are present
tally_derivatives (dict) – Dictionary whose keys are tally derivative IDs and whose values are TallyDerivative objects
version (tuple of Integral) – Version of OpenMC
summary (None or openmc.Summary) – A summary object if the statepoint has been linked with a summary file
- add_volume_information(volume_calc)[source]¶
Add volume information to the geometry within the file
- Parameters
volume_calc (openmc.VolumeCalculation) – Results from a stochastic volume calculation
- get_tally(scores=[], filters=[], nuclides=[], name=None, id=None, estimator=None, exact_filters=False, exact_nuclides=False, exact_scores=False)[source]¶
Finds and returns a Tally object with certain properties.
This routine searches the list of Tallies and returns the first Tally found which satisfies all of the input parameters.
NOTE: If any of the “exact” parameters are False (default), the input parameters do not need to match the complete Tally specification and may only represent a subset of the Tally’s properties. If an “exact” parameter is True then number of scores, filters, or nuclides in the parameters must precisely match those of any matching Tally.
- Parameters
scores (list, optional) – A list of one or more score strings (default is []).
filters (list, optional) – A list of Filter objects (default is []).
nuclides (list, optional) – A list of Nuclide objects (default is []).
name (str, optional) – The name specified for the Tally (default is None).
id (Integral, optional) – The id specified for the Tally (default is None).
estimator (str, optional) – The type of estimator (‘tracklength’, ‘analog’; default is None).
exact_filters (bool) – If True, the number of filters in the parameters must be identical to those in the matching Tally. If False (default), the filters in the parameters may be a subset of those in the matching Tally.
exact_nuclides (bool) – If True, the number of nuclides in the parameters must be identical to those in the matching Tally. If False (default), the nuclides in the parameters may be a subset of those in the matching Tally.
exact_scores (bool) – If True, the number of scores in the parameters must be identical to those in the matching Tally. If False (default), the scores in the parameters may be a subset of those in the matching Tally.
- Returns
tally – A tally matching the specified criteria
- Return type
- Raises
LookupError – If a Tally meeting all of the input parameters cannot be found in the statepoint.
- link_with_summary(summary)[source]¶
Links Tallies and Filters with Summary model information.
This routine retrieves model information (materials, geometry) from a Summary object populated with an HDF5 ‘summary.h5’ file and inserts it into the Tally objects. This can be helpful when viewing and manipulating large scale Tally data. Note that it is necessary to link against a summary to populate the Tallies with any user-specified “name” XML tags.
- Parameters
summary (openmc.Summary) – A Summary object.
- Raises
ValueError – An error when the argument passed to the ‘summary’ parameter is not an openmc.Summary object.