openmc.WeightWindows¶
- class openmc.WeightWindows(mesh: MeshBase, lower_ww_bounds: Iterable[float], upper_ww_bounds: Optional[Iterable[float]] = None, upper_bound_ratio: Optional[float] = None, energy_bounds: Optional[Iterable[Real]] = None, particle_type: str = 'neutron', survival_ratio: float = 3, max_lower_bound_ratio: Optional[float] = None, max_split: int = 10, weight_cutoff: float = 1e-38, id: Optional[int] = None)[source]¶
Mesh-based weight windows
This class enables you to specify weight window parameters that are used in a simulation. Multiple sets of weight windows can be defined for different meshes and different particles. An iterable of
WeightWindows
instances can be assigned to theopenmc.Settings.weight_windows
attribute, which is then exported to XML.Weight window lower/upper bounds are to be specified for each combination of a mesh element and an energy bin. Thus the total number of bounds should be equal to the product of the number of mesh bins and the number of energy bins.
New in version 0.13.
- Parameters
mesh (openmc.MeshBase) – Mesh for the weight windows
lower_ww_bounds (Iterable of Real) – A list of values for which each value is the lower bound of a weight window
upper_ww_bounds (Iterable of Real) – A list of values for which each value is the upper bound of a weight window
upper_bound_ratio (float) – Ratio of the lower to upper weight window bounds
energy_bounds (Iterable of Real) – A list of values for which each successive pair constitutes a range of energies in [eV] for a single bin. If no energy bins are provided, the maximum and minimum energy for the data available at runtime.
particle_type ({'neutron', 'photon'}) – Particle type the weight windows apply to
survival_ratio (float) – Ratio of the survival weight to the lower weight window bound for rouletting
max_lower_bound_ratio (float) – Maximum allowed ratio of a particle’s weight to the weight window’s lower bound. A factor will be applied to raise the weight window to be lower than the particle’s weight by a factor of max_lower_bound_ratio during transport if exceeded.
max_split (int) – Maximum allowable number of particles when splitting
weight_cutoff (float) – Threshold below which particles will be terminated
id (int) – Unique identifier for the weight window settings. If not specified, an identifier will automatically be assigned.
- Variables
id (int) – Unique identifier for the weight window settings.
mesh (openmc.MeshBase) – Mesh for the weight windows with dimension (ni, nj, nk)
particle_type (str) – Particle type the weight windows apply to
energy_bounds (Iterable of Real) – A list of values for which each successive pair constitutes a range of energies in [eV] for a single bin
num_energy_bins (int) – Number of energy bins
lower_ww_bounds (numpy.ndarray of float) – An array of values for which each value is the lower bound of a weight window. Shape: (ni, nj, nk, num_energy_bins) for StructuredMesh; (num_elements, num_energy_bins) for UnstructuredMesh
upper_ww_bounds (numpy.ndarray of float) – An array of values for which each value is the upper bound of a weight window. Shape: (ni, nj, nk, num_energy_bins) for StructuredMesh; (num_elements, num_energy_bins) for UnstructuredMesh
survival_ratio (float) – Ratio of the survival weight to the lower weight window bound for rouletting
max_lower_bound_ratio (float) – Maximum allowed ratio of a particle’s weight to the weight window’s lower bound. (Default: 1.0)
max_split (int) – Maximum allowable number of particles when splitting
weight_cutoff (float) – Threshold below which particles will be terminated
See also