armi.physics.neutronics.latticePhysics.latticePhysicsInterface module¶
” Lattice Physics Interface
Parent classes for codes responsible for generating broad-group cross sections
-
class
armi.physics.neutronics.latticePhysics.latticePhysicsInterface.LatticePhysicsInterface(r, cs)[source]¶ Bases:
armi.interfaces.InterfaceClass for interacting with lattice physics codes.
Construct an interface.
The
randcsarguments are required, but may beNone, where appropriate for the specificInterfaceimplementation.- Parameters
- Raises
RuntimeError – Interfaces derived from Interface must define their name
-
function= 'latticePhysics'¶
-
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 secondary coupled iterations.
After a coupled iteration, the cross sections need to be regenerated. This will bring in the spectral effects of changes in densities, as well as changes in Doppler.
- 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 imc2
- Return type
list
See also
terrapower.physics.neutronics.mc2.mc2Writers.Mc2V2Writer.write(),armi.physics.neutronics.latticePhysics.serpentWriters.SerpentWriter.write()
-
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
list