openmc.deplete.AtomNumber

class openmc.deplete.AtomNumber(local_mats, nuclides, volume, n_nuc_burn)[source]

Stores local material compositions (atoms of each nuclide).

Parameters:
  • local_mats (list of str) – Material IDs
  • nuclides (list of str) – Nuclides to be tracked
  • volume (dict) – Volume of each material in [cm^3]
  • n_nuc_burn (int) – Number of nuclides to be burned.
Variables:
  • index_mat (dict) – A dictionary mapping material ID as string to index.
  • index_nuc (dict) – A dictionary mapping nuclide name to index.
  • volume (numpy.ndarray) – Volume of each material in [cm^3]. If a volume is not found, it defaults to 1 so that reading density still works correctly.
  • number (numpy.ndarray) – Array storing total atoms for each material/nuclide
  • materials (list of str) – Material IDs as strings
  • nuclides (list of str) – All nuclide names
  • burnable_nuclides (list of str) – Burnable nuclides names. Used for sorting the simulation.
  • n_nuc_burn (int) – Number of burnable nuclides.
  • n_nuc (int) – Number of nuclides.
get_atom_density(mat, nuc)[source]

Accesses atom density instead of total number.

Parameters:
Returns:

Density in [atom/cm^3]

Return type:

numpy.ndarray

get_mat_slice(mat)[source]

Gets atom quantity indexed by mats for all burned nuclides

Parameters:mat (str, int or slice) – Material index.
Returns:The slice requested in [atom].
Return type:numpy.ndarray
set_atom_density(mat, nuc, val)[source]

Sets atom density instead of total number.

Parameters:
set_density(total_density)[source]

Sets density.

Sets the density in the exact same order as total_density_list outputs, allowing for internal consistency

Parameters:total_density (list of numpy.ndarray) – Total atoms.
set_mat_slice(mat, val)[source]

Sets atom quantity indexed by mats for all burned nuclides

Parameters: