10.2.8. armicontrib.dif3d.schedulers module

Code that schedules DIF3D executions during ARMI cases.

This module contains the Dif3dInterface class, which integrates DIF3D runs into ARMI runs using the ARMI Interface API. The Dif3dInterface is implemented on top of the Dif3dCoreEvaluation class, which handles the actual task of running DIF3D. This separation between scheduling the DIF3D analysis and performing the analysis aids in code re-use and flexibility; rather than binding the process of running DIF3D analysis to the Interface interaction hooks, the Dif3dCoreEvaluation can be used as a standard MPI action in custom scripts, or be driven directly by a reactivity coefficients interface, for instance.

../_images/pyr_classes_armicontrib.dif3d.schedulers.png
class armicontrib.dif3d.schedulers.Dif3dInterface(r, cs)[source]

Bases: armi.interfaces.Interface

“Schedules activities related to DIF3D during ARMI run.

Construct an interface.

The r and cs arguments are required, but may be None, where appropriate for the specific Interface implementation.

Parameters
  • r (Reactor) – A reactor to attach to

  • cs (Settings) – Settings object to use

Raises

RuntimeError – Interfaces derived from Interface must define their name

name: Optional[str] = 'dif3d'

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

interactEveryNode(cycle=None, node=None)[source]

Run DIF3D on the Core.

Builds a Dif3dCoreEvaluation (MpiAction) and invokes it.

class armicontrib.dif3d.schedulers.Dif3dCoreEvaluation[source]

Bases: armi.mpiActions.MpiAction

Sets up a DIF3D run on the Core object and executes it.

This is one specific client of the DIF3D Executor that happens to be used in a normal ARMI run to run DIF3D on the Core.

MpiActions have access to the operator and the reactor and can therefore reach in as appropriate to select which blocks to execute on in a analysis-specific way.

This default implementation just runs one case, on the core, though it can be extended to run other cases (e.g. on branch-searched copies of the core, the core + sfp, etc.)

invokeHook()[source]

Perform DIF3D calculation for the blocks assigned to this process.

armicontrib.dif3d.schedulers.selectObjsToRun(o)[source]

Choose objects that will be passed for DIF3D analysis.

We choose the reactor rather than the core because the globalflux code makes some assumptions that it’s using the reactor for geometry conversions (should be changed in the framework!)