armi.physics.neutronics.latticePhysics.latticePhysicsInterface module¶
” Lattice Physics Interface
Parent classes for codes responsible for generating broad-group cross sections
- armi.physics.neutronics.latticePhysics.latticePhysicsInterface.setBlockNeutronVelocities(r, neutronVelocities)[source]¶
Set the
mgNeutronVelocity
parameter for each block using theneutronVelocities
dictionary data.- Parameters
neutronVelocities (dict) – Dictionary that is keyed with the
representativeBlock
XS IDs with values of multigroup neutron velocity data computed by MC2.- Raises
ValueError – Multi-group neutron velocities was not computed during the cross section calculation.
- class armi.physics.neutronics.latticePhysics.latticePhysicsInterface.LatticePhysicsInterface(r, cs)[source]¶
Bases:
armi.interfaces.Interface
Class for interacting with lattice physics codes.
- function = 'latticePhysics'¶
The function performed by an Interface. This is not required be be defined by implementations of Interface, but is used to form categories of interfaces.
- interactBOC(**kwargs)¶
- updateXSLibrary(cycle)[source]¶
Update the current XS library, either by creating or reloading one.
- Parameters
cycle (int) – The cycle that is being processed. Used to name the library.
See also
computeCrossSections
run lattice physics on the current reactor state no matter weather needed or not.
- interactCoupled(iteration)[source]¶
Runs on coupled iterations to generate cross sections that are updated with the temperature state.
Notes
This accounts for changes in cross section data due to temperature changes, which are important for cross section resonance effects and accurately characterizing Doppler constant and coefficient evaluations. This coupling iteration is limited to when the time node is equal to zero. This is assumed to be reasonable for most applications as 1) microscopic cross section changes with burn-up are deemed to be less significant compared to convergence on the temperature state, and 2) temperature distributions are not expected to dramatically change for time steps > 0.
Warning
The latter assumptions are design and application-specific and a subclass should be considered when violated.
- Parameters
iteration (int) – This is unused since cross sections are generated on a per-cycle basis.
- interactEOC(cycle=None)[source]¶
Interact at the end of a cycle.
Force updating cross sections at the start of the next cycle.
- computeCrossSections(baseList=None, forceSerial=False, xsLibrarySuffix='', blockList=None)[source]¶
Prepare a batch of inputs, execute them, and store results on reactor library.
- Parameters
baseList (list) – a user-specified set of bases that will be run instead of calculating all of them
forceSerial (bool, optional) – Will run on 1 processor in sequence instead of on many in parallel Useful for optimization/batch runs where every processor is on a different branch
xsLibrarySuffix (str, optional) – A book-keeping suffix used in Doppler calculations
blockList (list, optional) – List of blocks for which to generate cross sections. If None, representative blocks will be determined
- generateLatticePhysicsInputs(baseList, xsLibrarySuffix, blockList, xsWriters=None)[source]¶
Write input files for the generation of cross section libraries.
- Parameters
baseList (list) – A list of cross-section id strings (e.g. AA, BC) that will be generated. Default: all in reactor
xsLibrarySuffix (str) – A suffix added to the end of the XS file names such as ‘voided’ for voided XS. Default: Empty
blockList (list) – The blocks to write inputs for.
xsWriters (list, optional) – The specified writers to write the input files
- Returns
returnedFromWriters – A list of what this specific writer instance returns for each representative block. It is the responsibility of the subclassed interface to implement. In many cases, it is the executing agent.
- Return type
- getWriters(representativeBlock, xsLibrarySuffix, writers=None)[source]¶
Return valid lattice physics writer subclass(es).
- Parameters
representativeBlock (Block) – A representative block object that can be created from a block collection.
xsLibrarySuffix (str) – A suffix added to the end of the XS file names such as ‘voided’ for voided XS. Default: Empty
writers (list of lattice physics writer objects, optional) – If the writers are known, they can be provided and constructed.
- Returns
writers – A list of writers for the provided representative block.
- Return type