mcdc.Material#

class mcdc.Material(name: str = '', nuclide_composition: dict[str, float] = {}, element_composition: dict[str, float] = {}, temperature: float = 293.6)#

Continuous-energy particle-interaction properties assigned to simulation cells.

Parameters:
  • name (str, optional) – User-facing material name.

  • nuclide_composition (dict of str to float, optional) – Nuclide names and atomic densities in atoms/(barn cm).

  • element_composition (dict of str to float, optional) – Element symbols and atomic densities in atoms/(barn cm).

  • temperature (float, optional) – Material temperature in kelvin. Each nuclide uses the closest temperature available in the data library.

Notes

Exactly one of nuclide_composition or element_composition must be supplied. Nuclide and element objects are created immediately; their data-library properties are loaded when the material is compiled into a simulation. Construction therefore does not access the data library. Before compiling, visualizing, or running the model, MCDC_LIB must identify the directory containing the required HDF5 files.

Examples

Define uranium dioxide from nuclide atomic densities:

>>> import mcdc
>>> fuel = mcdc.Material(
...     name="UO2",
...     nuclide_composition={"U235": 5.0e-4, "U238": 2.2e-2, "O16": 4.5e-2},
...     temperature=293.6,
... )

Define a material from natural elemental compositions:

>>> steel = mcdc.Material(
...     name="Steel",
...     element_composition={"Fe": 8.0e-2, "C": 8.0e-4},
...     temperature=600.0,
... )

Define a single-isotope material at another supported temperature:

>>> moderator = mcdc.Material(
...     name="Hydrogen",
...     nuclide_composition={"H1": 6.7e-2},
...     temperature=273.15,
... )