Material¶
The nuclide inventory being assessed, and its five constructors.
Material
¶
Material(atoms: Mapping[str, float] | None = None, *, density: float | None = None, volume: float | None = None, name: str = '', decay_data: DecayData | None = None, _specific_activities: Mapping[str, float] | None = None, _atoms_absolute: bool = True)
A nuclide inventory to assess for clearance.
The primary input is a mapping of nuclide name to atom count, which is what an activation or depletion calculation produces:
>>> mat = Material({"Fe56": 8.4e22, "Co60": 1.2e12})
Specific activity in Bq/g is scale invariant, so atom counts, atom
densities and atom fractions all give the same answer for the Bq/g limit
sets and no density is needed. Volumetric limit sets (Ci/m3) do need one,
supplied as density or derived from atom densities.
Warning
The Bq/g denominator is the mass of everything in the mapping, so stable isotopes must be included. Passing only the radioactive nuclides of an activated steel gives a mass thousands of times too small and a specific activity thousands of times too high.
Parameters:
-
(atoms¶Mapping[str, float] | None, default:None) –Nuclide name to atom count. Names may be spelled in any form
normaliseaccepts. -
(density¶float | None, default:None) –Mass density in g/cm3. Only needed for volumetric limit sets.
-
(volume¶float | None, default:None) –Volume in cm3. Only needed for total activity in Bq or Ci.
-
(name¶str, default:'') –A label carried through to results, for reporting.
-
(decay_data¶DecayData | None, default:None) –Half-life and mass tables. Defaults to the vendored ENDF/B-VIII.0 and AME2020 values.
Methods:
-
from_atom_counts–Build from absolute atom counts. Identical to the constructor.
-
from_atom_densities–Build from atom densities in atoms per barn-cm, OpenMC's unit.
-
from_masses–Build from a mass in grams per nuclide.
-
from_mass_fractions–Build from mass fractions, which need not sum to one.
-
from_specific_activities–Build from specific activities in Bq/g, as an assay reports them.
-
specific_activity–Specific activity in Bq/g.
-
activity–Activity in the requested units.
Attributes:
-
nuclides(tuple[str, ...]) –The nuclides present, in canonical form, sorted.
-
atoms(dict[str, float]) –Atom amounts as supplied, keyed by canonical name.
-
mass(float) –Total mass in grams.
-
density(float) –Mass density in g/cm3.
mass
property
¶
mass: float
Total mass in grams.
Raises:
-
InsufficientDataError–If the material carries only relative amounts, such as atom densities or mass fractions, with no volume to scale them by.
density
property
¶
density: float
Mass density in g/cm3.
Raises:
-
InsufficientDataError–If no density was supplied and none can be derived, naming what to pass.
from_atom_counts
classmethod
¶
from_atom_counts(atoms: Mapping[str, float], *, density: float | None = None, volume: float | None = None, **kwargs) -> 'Material'
Build from absolute atom counts. Identical to the constructor.
from_atom_densities
classmethod
¶
from_atom_densities(densities: Mapping[str, float], *, volume: float | None = None, density: float | None = None, **kwargs) -> 'Material'
Build from atom densities in atoms per barn-cm, OpenMC's unit.
The mass density follows from the atom densities and the atomic masses,
so no density argument is accepted or needed: supplying one could
only contradict the inventory.
Parameters:
-
(densities¶Mapping[str, float]) –Nuclide name to atoms/barn-cm.
-
(volume¶float | None, default:None) –Volume in cm3, only needed for total activity.
-
(density¶float | None, default:None) –Not accepted. Present only so that passing it raises rather than being swallowed and ignored.
Raises:
-
TypeError–If
densityis given.
from_masses
classmethod
¶
from_mass_fractions
classmethod
¶
from_specific_activities
classmethod
¶
from_specific_activities(activities: Mapping[str, float], *, density: float | None = None, **kwargs) -> 'Material'
Build from specific activities in Bq/g, as an assay reports them.
No half-life or atomic mass data is used, since the specific activity is
the direct input to the index. Volumetric limit sets then need an
explicit density, because activity alone does not imply a mass.
Parameters:
specific_activity
¶
specific_activity(by_nuclide: bool = False) -> 'float | dict[str, float]'
activity
¶
activity(units: str = 'Bq/g', by_nuclide: bool = False) -> 'float | dict[str, float]'
Activity in the requested units.
Parameters:
-
(units¶str, default:'Bq/g') –One of
ACTIVITY_UNITS. -
(by_nuclide¶bool, default:False) –Return a dict keyed by nuclide rather than the total.
Returns:
-
'float | dict[str, float]'–The activity as a float, or a dict of them.
Raises:
-
ValueError–If the units are not recognised.
-
InsufficientDataError–If the units need a density or volume the material does not have.