armi.physics.neutronics.fissionProductModel.lumpedFissionProduct module

The lumped fission product (LFP) module deals with representing LFPs and loading them from files.

These are generally managed by the FissionProductModel

class armi.physics.neutronics.fissionProductModel.lumpedFissionProduct.LumpedFissionProduct(name=None)[source]

Bases: object

Lumped fission product.

The yields are in number fraction and they sum to 2.0 in general so a fission of an actinide results in one LFP, which represents 2 real FPs.

This object is a data structure and works a lot like a dictionary in terms of accessing and modifying the data.

The yields are indexed by nuclideBase – in self.yld the yield fraction is indexed by nuclideBases of the individual fission product isotopes

Examples

>>> fpd = FissionProductDefinitionFile(stream)
>>> lfp = fpd.createSingleLFPFromFile('LFP39')
>>> lfp[<nuclidebase for EU151>]
2.9773e-05

Make a LFP

Parameters

name (str, optional) – A name for the LFP. Will be overwritten if you load from file. Provide only if you are spinning your own custom LFPs.

duplicate()[source]

Make a copy of this w/o using deepcopy

keys()[source]
values()[source]
items()[source]

make sure gas fraction gets applied

setGasRemovedFrac(removedFrac)[source]

Set the fraction of total fission gas that is removed from this LFP.

getGasRemovedFrac()[source]
getTotalYield()[source]

Get the fractional yield of all nuclides in this lumped fission product

Accounts for any fission gas that may be removed.

Return type

total yield of all fps

getMassFracs()[source]

Return a dictionary of mass fractions indexed by nuclide.

Returns

massFracs – mass fractions (floats) of LFP masses

Return type

dict

getNumberFracs()[source]

Return a dictionary of number fractions indexed by nuclide.

Returns

numberFracs – number fractions (floats) of fission products indexed by nuclide.

Return type

dict

getMassFrac(nucName=None, nuclideBase=None, useCache=True, storeCache=True)[source]

Return the mass fraction of the given nuclide.

Return type

nuclide mass fraction (float)

getMassFracDenom(useCache=True, storeCache=True)[source]
getExpandedMass(mass=1.0)[source]

returns a dictionary of masses indexed by nuclide base objects

Parameters

mass (float,) – the mass of all the expanded mass of the given LFP.

getGasFraction()[source]

get the fraction of gas that is from Xe and Kr gas

Returns

gasFrac – Fraction of LFP that is gaseous

Return type

float

getLanthanideFraction()[source]

Return the fraction of fission products that are lanthanides.

printDensities(lfpDens)[source]

Print densities of nuclides given a LFP density.

class armi.physics.neutronics.fissionProductModel.lumpedFissionProduct.LumpedFissionProductCollection[source]

Bases: dict

A set of lumped fission products

Typically there would be one of these on a block or on a global level.

duplicate()[source]
getLumpedFissionProductNames()[source]
getAllFissionProductNames()[source]

Gets names of all fission products in this collection

TODO: This can use a set, continually updated from the keys() for each lfp, then converted to a list. This will change the order of the fission products, though, so should be done with care

getAllFissionProductNuclideBases()[source]

Gets names of all fission products in this collection

getNumberDensities(objectWithParentDensities=None, densFunc=None)[source]

Gets all FP number densities in collection

Parameters
  • objectWithParentDensities (ArmiObject) – object (probably block) that can be called with getNumberDensity(‘LFP35’), etc. to get densities of LFPs.

  • densFunc (function, optional) – Optional method to extract LFP densities

Returns

fpDensities – keys are fp names, vals are fission product number density in atoms/bn-cm.

Return type

dict

getMassFrac(oldMassFrac=None)[source]

returns the mass fraction vector of the collection of lumped fission products

setGasRemovedFrac(removedFrac)[source]

Set the fraction of total fission gas that is removed from all LFPs.

getGasRemovedFrac()[source]

Get the fraction of total fission gas that is removed from all LFPs.

class armi.physics.neutronics.fissionProductModel.lumpedFissionProduct.SingleLumpedFissionProductCollection[source]

Bases: armi.physics.neutronics.fissionProductModel.lumpedFissionProduct.LumpedFissionProductCollection

This is a subclass of LumpedFissionProductCollection to be used when you want to collapse all the fission products into a single lumped fission product

There were numerous checks in places to ensure that a collection of fission products only had 1 lfp and this object consolidates them.

Notes

armi.physics.neutronics.fissionProductModel.lumpedFissionProduct.FissionProductDefinitionFile.createSingleLFPFromFile

is a factory for these

getFirstLfp()[source]
getName()[source]
updateYieldVector(numberDensities=None, massFrac=None, fpFiltered=False)[source]

update the yield values on the single lumped fission product

class armi.physics.neutronics.fissionProductModel.lumpedFissionProduct.FissionProductDefinitionFile(stream)[source]

Bases: object

Reads a file that has definitions of one or more LFPs in it to produce LFPs

The format for this file is effectively input lines from a MC2-2 file:

13          LFP35 GE73 5  5.9000E-06
13          LFP35 GE74 5  1.4000E-05
13          LFP35 GE76 5  1.6000E-04
13          LFP35 AS75 5  8.9000E-05

and so on

Examples

>>> fpd = FissionProductDefinitionFile(stream)
>>> lfps = fpd.createLFPsFromFile()

The path to this file name is specified by the

fpPat = re.compile('13\\s+([A-Z]+\\d+)[_]{0,1}[0-9]{0,1}\\s+(......)\\s+([+-]?\\d*\\.\\d+[eEdD][+-]\\d+)')
createLFPsFromFile()[source]

Read the file and create LFPs from the contents

Returns

lfps – List of LumpedFissionProducts contained in the file

Return type

list

createSingleLFPFromFile(name)[source]

Read one LFP from the file

createSingleLFPCollectionFromFile(name)[source]

Creates a LFPCollection with only one LFP from the file

armi.physics.neutronics.fissionProductModel.lumpedFissionProduct.lumpedFissionProductFactory(cs)[source]

Build lumped fission products.

armi.physics.neutronics.fissionProductModel.lumpedFissionProduct.expandFissionProducts(massFrac, lumpedFissionProducts)[source]

expands lumped fission products in a massFrac vector

Parameters
Returns

newMassFracs

Return type

dict

armi.physics.neutronics.fissionProductModel.lumpedFissionProduct.collapseFissionProducts(massFracs, lumpedFissionProducts, updateLumpedFissionProduct=False)[source]

collapses fission products into a single lumped fission product

Parameters
  • massFracs (dict) –

  • dict) (lumpedFissionProducts - LumpedFissionProductCollection (acts like a) – result of <fissionProductInterface>.getGlobalLumpedFissionProducts

Returns

newMassFracs

Return type

dict

Notes

collapsing only works if there is a ‘single lumped fission product collection’ – otherwise its confusing to determine how much of what isotope goes to which lumped fission products

armi.physics.neutronics.fissionProductModel.lumpedFissionProduct.isGas(nuc)[source]

True if nuclide is considered a gas.