openmc.deplete.AtomNumber¶
- class openmc.deplete.AtomNumber(local_mats, nuclides, volume, n_nuc_burn)[source]¶
Stores local material compositions (atoms of each nuclide).
- Parameters
- 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_densities(mat, units='atom/b-cm')[source]¶
Return atom densities for a given material
- Parameters
mat (str, int, openmc.Material or slice) – Material index.
units ({"atom/b-cm", "atom/cm3"}, optional) –
Units for the returned concentration. Default is
"atom/b-cm"
New in version 0.13.1.
- Returns
Dictionary mapping nuclides to atom densities
- Return type
- get_atom_density(mat, nuc)[source]¶
Return atom density of given material and nuclide
- Parameters
- Returns
Density in [atom/cm^3]
- Return type
- get_mat_slice(mat)[source]¶
Gets atom quantity indexed by mats for all burned nuclides
- Parameters
mat (str, int, openmc.Material or slice) – Material index.
- Returns
The slice requested in [atom].
- Return type
- get_mat_volume(mat)[source]¶
Return material volume
- Parameters
mat (str, int, openmc.Material, or slice) – Material index.
- Returns
Material volume in [cm^3]
- Return type
- set_atom_density(mat, nuc, val)[source]¶
Sets atom density instead of total number.
- Parameters
mat (str, int, openmc.Material or slice) – Material index.
val (numpy.ndarray) – Array of densities to set in [atom/cm^3]
- 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
mat (str, int, openmc.Material, or slice) – Material index.
val (numpy.ndarray) – The slice to set in [atom]