armi.physics.neutronics.macroXSGenerationInterface module

Converts microscopic cross sections to macroscopic cross sections by multiplying by number density.

\[\Sigma_i = N_i \sigma_i\]
class armi.physics.neutronics.macroXSGenerationInterface.MacroXSGenerator(blocks, lib, buildScatterMatrix, buildOnlyCoolant, libType, minimumNuclideDensity=0.0)[source]

Bases: MpiAction

An action that can make macroscopic cross sections, even in parallel.

invokeHook()[source]
class armi.physics.neutronics.macroXSGenerationInterface.MacroXSGenerationInterface(r, cs)[source]

Bases: Interface

Builds macroscopic cross sections on all Blocks.

Warning

This probably shouldn’t be an interface since it has no interactXYZ methods. It should probably be converted to an MpiAction.

name: str | None = 'macroXsGen'

The name of the interface. This is undefined for the base class, and must be overridden by any concrete class that extends this one.

buildMacros(lib=None, bListSome=None, buildScatterMatrix=True, buildOnlyCoolant=False, libType='micros')[source]

Builds block-level macroscopic cross sections for making diffusion equation matrices.

This will use MPI if armi.context.MPI_SIZE > 1

Builds G-vectors of the basic XS (‘nGamma’,’fission’,’nalph’,’np’,’n2n’,’nd’,’nt’) Builds GxG matrices for scatter matrices

Implementation: Build macroscopic cross sections for blocks. I_ARMI_MACRO_XS
signature: buildMacros
requirements: R_ARMI_MACRO_XS

This method builds macroscopic cross sections for a user-specified set of blocks using a specified microscopic neutron or gamma cross section library. If no blocks are specified, cross sections are calculated for all blocks in the core. If no library is specified, the existing r.core.lib is used. The basic arithmetic involved in generating macroscopic cross sections consists of multiplying isotopic number densities by isotopic microscopic cross sections and summing over all isotopes in a composition. The calculation is implemented in computeMacroscopicGroupConstants. This method uses an mpiAction to distribute the work of calculating macroscopic cross sections across the worker processes.

Parameters:
  • lib (library object , optional) – If lib is specified, then buildMacros will build macro XS using micro XS data from lib. If lib = None, then buildMacros will use the existing library self.r.core.lib. If that does not exist, then buildMacros will use a new nuclearDataIO.ISOTXS object.

  • buildScatterMatrix (Boolean, optional) – If True, all macro XS will be built, including the time-consuming scatter matrix. If False, only the macro XS that are needed for fluxRecon.computePinMGFluxAndPower will be built. These include ‘transport’, ‘fission’, and a few others. No ng x ng matrices (such as ‘scatter’ or ‘chi’) will be built. Essentially, this option saves huge runtime for the fluxRecon module.

  • buildOnlyCoolant (Boolean, optional) – If True, homogenized macro XS will be built only for NA-23. If False, the function runs normally.

  • libType (str, optional) – The block attribute containing the desired microscopic XS for this block: either “micros” for neutron XS or “gammaXS” for gamma XS.