pyopensn.post.VolumePostprocessor

class pyopensn.post.VolumePostprocessor

Volume post-processor.

Wrapper of opensn::VolumePostprocessor.

Execute(self: pyopensn.post.VolumePostprocessor) → None

Execute the postprocessor. Collective.

Raises:

ValueError – If xs_multiplier is not a known cross-section name, no material in the problem has that cross section, a custom cross section is missing from some material, or the cross section of some material does not have one value per group.

GetValue(self: pyopensn.post.VolumePostprocessor) → numpy.ndarray[numpy.float64]

Returns the value of the postprocessor.

Rows correspond to the spatial restriction (i.e. logical volumes, if specified) Columns correspond to the energy restrictions (i.e. groups, or groups within a groupset if specified)

__init__(self: pyopensn.post.VolumePostprocessor, **kwargs) → None

Construct a volume post processor object.

Parameters:
  • problem (LBSProblem) – A handle to an existing LBS problem.

  • block_ids (List[int], optional) – Block restriction for the postprocessor. Empty/unspecified means no block restriction.

  • logical_volumes (List[LogicalVolume], optional) – Logical volumes to restrict the computation to.

  • value_type (str, optional) – Type of value to compute: ‘integral’ (default), ‘max’, ‘min’, or ‘avg’.

  • group (int, optional) – Single group to compute (mutually exclusive with groupset).

  • groupset (int, optional) – Single groupset to compute (mutually exclusive with group).

  • multiplier (float, optional) – Constant multiplier. Default 1.0.

  • group_multipliers (List[float], optional) – Group-wise multipliers, one per group.

  • xs_multiplier (str, optional) – Name of a 1D cross section (one value per group) used as a group-wise multiplier. Materials without an optional standard cross section (sigma_f, nu_sigma_f, chi, inv_velocity, energy_deposition, or stopping_power; e.g. sigma_f of a non-fissile material) contribute zero, but at least one material in the problem must have it. A custom cross section must be defined on every material. At most one of multiplier, group_multipliers, and xs_multiplier may be given.

Raises:

ValueError – If the block or logical-volume restriction selects no cells on any rank.

Notes

Construction and Execute() are collective and must be called on all MPI ranks. Cells are selected by centroid. integral and avg use the physical volume (the full revolution in RZ and 1D spherical geometry); max and min use nodal values.