openmc interop¶
Getting an inventory out of OpenMC without depending on it.
openmc_interop
¶
Getting an inventory out of OpenMC without depending on it.
OpenMC is imported only inside these functions and only when they are called, so installing this package pulls in nothing, and everything except these two functions works with no OpenMC present.
Functions:
-
from_openmc_material–Convert an
openmc.Materialinto aMaterial. -
from_depletion_results–Build a cooling time series from an OpenMC depletion results file.
from_openmc_material
¶
from_openmc_material(openmc_material, *, decay_data=None) -> Material
Convert an openmc.Material into a Material.
Reads the atom densities in atoms per barn-cm, which fixes the mass density too, so the result supports both the Bq/g and the Ci/m3 limit sets.
Parameters:
-
–openmc_material¶An
openmc.Material. Its nuclides must be expanded, whichget_nuclide_atom_densitiesdoes. -
–decay_data¶Half-life and mass tables to use instead of the defaults.
Returns:
from_depletion_results
¶
from_depletion_results(results, material_id, *, decay_data=None) -> dict[float, Material]
Build a cooling time series from an OpenMC depletion results file.
The result is in the form
time_to_clear
expects, so a depletion can be taken straight through to a clearance date.
Parameters:
-
–results¶An
openmc.deplete.Resultsobject. -
–material_id¶The depleted material's id, as a string or int.
-
–decay_data¶Half-life and mass tables to use instead of the defaults.
Returns: