armi.physics.neutronics.isotopicDepletion.isotopicDepletionInterface module

An abstract class for interfaces between ARMI and programs that simulate transmutation and decay.

armi.physics.neutronics.isotopicDepletion.isotopicDepletionInterface.isDepletable(obj: ArmiObject)[source]

Return True if obj or any child is flagged as DEPLETABLE.

The DEPLETABLE flag is automatically set to True if any composition contains nuclides that are in the active nuclides list, unless flags are specifically set and DEPLETABLE is left out.

This is often interpreted by depletion plugins as indicating which parts of the problem to apply depletion to. Analysts may want to turn on and off depletion in certain problems.

For example, sometimes they want the control rods to deplete to figure out how often to replace them.

Warning

The DEPLETABLE flag is automatically added to compositions that have active nuclides. If you explicitly define any flags at all, you must also manually include DEPLETABLE or else the objects will silently not deplete.

Notes

The auto-flagging of DEPLETABLE happens in the construction of blueprints rather than in a plugin hook because the reactor is not available at the time the plugin hook runs.

class armi.physics.neutronics.isotopicDepletion.isotopicDepletionInterface.AbstractIsotopicDepleter(r=None, cs=None, o=None)[source]

Bases: object

Interact with a depletion code.

This interface and subClasses deplete under a flux defined outside this interface

The depletion in this analysis only depends on the flux, material vectors, nuclear data and continuous source and loss objects.

The depleters derived from this abstract class use all the fission products ARMI can handle – i.e. do not form lumped fission products.

The class attribute _depleteByName contains a ARMI objects to deplete keyed by name.

Implementation: ARMI provides a base class to deplete isotopes. I_ARMI_DEPL_ABC
signature: AbstractIsotopicDepleter
requirements: R_ARMI_DEPL_ABC

This class provides some basic infrastructure typically needed in depletion calculations within the ARMI framework. It stores a reactor, operator, and case settings object, and also defines methods to store and retrieve the objects which should be depleted based on their names.

name = None
purpose = 'depletion'
addToDeplete(armiObj)[source]

Add the object to the group of objects to be depleted.

setToDeplete(armiObjects)[source]

Change the group of objects to deplete to the specified group.

getToDeplete()[source]

Return objects to be depleted.

run()[source]

Submit depletion case with external solver to the cluster.

In addition to running the physics kernel, this method calls the waitForJob method to wait for it job to finish.

comm = MPI.COMM_SELF.Spawn(sys.executable,args=[‘cpi.py’],maxprocs=5)

armi.physics.neutronics.isotopicDepletion.isotopicDepletionInterface.makeXsecTable(compositeName, xsType, mgFlux, isotxs, headerFormat='$ xsecs for {}', tableFormat='\n{mcnpId} {nG:.5e} {nF:.5e} {n2n:.5e} {n3n:.5e} {nA:.5e} {nP:.5e}')[source]

Make a cross section table for depletion physics input decks.

Parameters:
  • armiObject (armiObject) – an armi object – batch or block – with a .p.xsType and a getMgFlux method

  • activeNuclides (list) – a list of the nucNames of active isotopes

  • isotxs (isotxs object)

  • headerFormat (string (optional)) – this is the format in which the elements of the header with be returned – i.e. if you use a .format() call with the case name you’ll return a formatted list of string elements

  • tableFormat (string (optional)) – This is the format in which the elements of the table with be returned – i.e. if you use a .format() call with mcnpId, nG, nF, n2n, n3n, nA, and nP you’ll get the format you want. If you use a .format() call with the case name you’ll return a formatted list of strings.

  • Results

  • -------

  • output (list) – a list of string elements that together make a xsec card

See also

crossSectionTable.makeCrossSectionTable

Makes a table for arbitrary ArmiObjects

class armi.physics.neutronics.isotopicDepletion.isotopicDepletionInterface.AbstractIsotopicDepletionReader(r=None, externalCodeInterface=None, fName=None, cs=None)[source]

Bases: OutputReader

Read number density output produced by the isotopic depletion.

read()[source]

Read a isotopic depletion Output File and applies results to armi objects in the ToDepletion attribute.

class armi.physics.neutronics.isotopicDepletion.isotopicDepletionInterface.Csrc[source]

Bases: object

Writes a continuous source term card in a depletion interface.

Notes

The chemical vector is a dictionary of chemicals and their removal rate constant. This works like a decay constant.

The isotopic vector is used to make a source material in continuous source definitions.

This is also the base class for continuous loss cards.

setChemicalVector(chemicalVector)[source]
getChemicalVector()[source]
write()[source]

Return a list of lines to write for a csrc card.