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: armi.reactor.composites.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. But in conceptual design, they may want to just leave them as they are as an approximation.

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 countinuous 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.

_depleteByName contains a ARMI objects to deplete keyed by name.

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

Add the oject 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 string elements

  • 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)[source]

Bases: armi.interfaces.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.