armi.physics.neutronics.macroXSGenerationInterface module¶
Converts microscopic cross sections to macroscopic cross sections by multiplying by number density.
-
class
armi.physics.neutronics.macroXSGenerationInterface.
MacroXSGenerator
(blocks, lib, buildScatterMatrix, buildOnlyCoolant, libType)[source]¶ Bases:
armi.mpiActions.MpiAction
An action that can make macroscopic cross sections, even in parallel.
-
invokeHook
()[source]¶ This method must be overridden in sub-clases.
This method is called by worker nodes, and has access to the worker node’s operator, reactor, and settings (through
self.o
,self.r
, andself.cs
). It must return a boolean value ofTrue
orFalse
, otherwise the worker node will raise an exception and terminate execution.- Returns
result – Dependent on implementation
- Return type
-
-
class
armi.physics.neutronics.macroXSGenerationInterface.
MacroXSGenerationInterface
(r, cs)[source]¶ Bases:
armi.interfaces.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.
Construct an interface.
The
r
andcs
arguments are required, but may beNone
, where appropriate for the specificInterface
implementation.- Parameters
- Raises
RuntimeError – Interfaces derived from Interface must define their name
-
name
= 'macroXsGen'¶
-
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.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.