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: Optional[str] = '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

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.